diff --git a/ReadMe.md b/ReadMe.md index ba956e7a677..8168a57e163 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -109,13 +109,13 @@ Refer to [libraries/ReadMe.md](libraries/ReadMe.md) for details. ### Building for different versions of IntelliJ IDEA and Android Studio -Kotlin plugin is intended to work with several recent versions of IntelliJ IDEA and Android Studio. Each platform is allowed to have a different set of features and might provide a slightly different API. Instead of using several parallel Git branches, project stores everything in a single branch, but files may have counterparts with version extensions (\*.as32, \*.172, \*.181). The primary file is expected to be replaced with its counterpart when targeting non-default platform. +Kotlin plugin is intended to work with several recent versions of IntelliJ IDEA and Android Studio. Each platform is allowed to have a different set of features and might provide a slightly different API. Instead of using several parallel Git branches, the project stores everything in a single branch, but files may have counterparts with version extensions (\*.as32, \*.172, \*.181). The primary file is expected to be replaced with its counterpart when targeting a non-default platform. -More detailed description of this scheme can be found at https://github.com/JetBrains/bunches/blob/master/ReadMe.md. +A More detailed description of this scheme can be found at https://github.com/JetBrains/bunches/blob/master/ReadMe.md. Usually, there's no need to care about multiple platforms as all features are enabled everywhere by default. Additional counterparts should be created if there's an expected difference in behavior or an incompatible API usage is required **and** there's no reasonable workaround to save source compatibility. Kotlin plugin contains a pre-commit check that shows a warning if a file has been updated without its counterparts. -Development for some particular platform is possible after 'switching' that can be done with [Bunch Tool](https://github.com/JetBrains/bunches/releases) from the command line. +Development for some particular platform is possible after 'switching' that can be done with the [Bunch Tool](https://github.com/JetBrains/bunches/releases) from the command line. ```sh cd kotlin-project-dir diff --git a/build-common/src/org/jetbrains/kotlin/incremental/IncrementalModuleInfo.kt b/build-common/src/org/jetbrains/kotlin/incremental/IncrementalModuleInfo.kt index a49ec4eb04a..30ee30d35e1 100644 --- a/build-common/src/org/jetbrains/kotlin/incremental/IncrementalModuleInfo.kt +++ b/build-common/src/org/jetbrains/kotlin/incremental/IncrementalModuleInfo.kt @@ -21,6 +21,7 @@ data class IncrementalModuleEntry( class IncrementalModuleInfo( val projectRoot: File, + val rootProjectBuildDir: File, val dirToModule: Map, val nameToModules: Map>, val jarToClassListFile: Map, @@ -28,6 +29,6 @@ class IncrementalModuleInfo( val jarToModule: Map ) : Serializable { companion object { - private const val serialVersionUID = 0L + private const val serialVersionUID = 1L } } \ No newline at end of file diff --git a/build.gradle.kts b/build.gradle.kts index 97fcae0b3ad..3dc12a70df2 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -345,6 +345,7 @@ val coreLibProjects = listOfNotNull( ":kotlin-stdlib-js", ":kotlin-stdlib-jdk7", ":kotlin-stdlib-jdk8", + ":kotlin-test", ":kotlin-test:kotlin-test-annotations-common", ":kotlin-test:kotlin-test-common", ":kotlin-test:kotlin-test-jvm", @@ -471,7 +472,7 @@ allprojects { } } - if (!kotlinBuildProperties.isInJpsBuildIdeaSync && !kotlinBuildProperties.useFir) { + if (!kotlinBuildProperties.isInJpsBuildIdeaSync && !kotlinBuildProperties.useFir && !kotlinBuildProperties.disableWerror) { // For compiler and stdlib, allWarningsAsErrors is configured in the corresponding "root" projects // (compiler/build.gradle.kts and libraries/commonConfiguration.gradle). val projectsWithWarningsAsErrors = listOf("core", "plugins").map { File(it).absoluteFile } @@ -637,7 +638,10 @@ tasks { listOf("clean", "assemble", "install").forEach { taskName -> register("coreLibs${taskName.capitalize()}") { - coreLibProjects.forEach { projectName -> dependsOn("$projectName:$taskName") } + for (projectName in coreLibProjects) { + if (projectName.startsWith(":kotlin-test:") && taskName == "install") continue + dependsOn("$projectName:$taskName") + } } } @@ -953,7 +957,6 @@ tasks { dependsOn( ":prepare:ide-plugin-dependencies:android-extensions-compiler-plugin-for-ide:publish", ":prepare:ide-plugin-dependencies:allopen-compiler-plugin-for-ide:publish", - ":prepare:ide-plugin-dependencies:allopen-compiler-plugin-tests-for-ide:publish", ":prepare:ide-plugin-dependencies:incremental-compilation-impl-tests-for-ide:publish", ":prepare:ide-plugin-dependencies:kotlin-build-common-tests-for-ide:publish", ":prepare:ide-plugin-dependencies:kotlin-compiler-for-ide:publish", @@ -975,9 +978,7 @@ tasks { ":kotlin-stdlib-jdk7:publish", ":kotlin-stdlib-jdk8:publish", ":kotlin-reflect:publish", - ":kotlin-main-kts:publish", - ":kotlin-stdlib-js:publish", - ":kotlin-test:kotlin-test-js:publish" + ":kotlin-main-kts:publish" ) } } diff --git a/buildSrc/src/main/kotlin/BuildPropertiesExt.kt b/buildSrc/src/main/kotlin/BuildPropertiesExt.kt index ffaf6d2db72..3adb3ddfff8 100644 --- a/buildSrc/src/main/kotlin/BuildPropertiesExt.kt +++ b/buildSrc/src/main/kotlin/BuildPropertiesExt.kt @@ -18,3 +18,5 @@ val KotlinBuildProperties.proguard: Boolean get() = postProcessing && getBoolean val KotlinBuildProperties.jarCompression: Boolean get() = getBoolean("kotlin.build.jar.compression", isTeamcityBuild) val KotlinBuildProperties.ignoreTestFailures: Boolean get() = getBoolean("ignoreTestFailures", isTeamcityBuild) + +val KotlinBuildProperties.disableWerror: Boolean get() = getBoolean("kotlin.build.disable.werror", false) diff --git a/buildSrc/src/main/kotlin/dependencies.kt b/buildSrc/src/main/kotlin/dependencies.kt index c2dc1d2880e..67ae48d510a 100644 --- a/buildSrc/src/main/kotlin/dependencies.kt +++ b/buildSrc/src/main/kotlin/dependencies.kt @@ -9,10 +9,13 @@ import org.gradle.api.GradleException import org.gradle.api.Project +import org.gradle.api.artifacts.Dependency +import org.gradle.api.artifacts.ExternalModuleDependency import org.gradle.api.artifacts.ProjectDependency import org.gradle.api.artifacts.dsl.DependencyHandler import org.gradle.api.file.ConfigurableFileCollection import org.gradle.api.file.FileCollection +import org.gradle.kotlin.dsl.accessors.runtime.addDependencyTo import org.gradle.kotlin.dsl.extra import org.gradle.kotlin.dsl.project import java.io.File @@ -112,6 +115,50 @@ fun DependencyHandler.projectTests(name: String): ProjectDependency = project(na fun DependencyHandler.projectRuntimeJar(name: String): ProjectDependency = project(name, configuration = "runtimeJar") fun DependencyHandler.projectArchives(name: String): ProjectDependency = project(name, configuration = "archives") +fun Project.testApiJUnit5( + vintageEngine: Boolean = false, + runner: Boolean = false, + suiteApi: Boolean = false +) { + with(dependencies) { + val platformVersion = commonVer("org.junit", "junit-bom") + testApi(platform("org.junit:junit-bom:$platformVersion")) + testApi("org.junit.jupiter:junit-jupiter") + if (vintageEngine) { + testApi("org.junit.vintage:junit-vintage-engine:$platformVersion") + } + val componentsVersion = commonVer("org.junit.platform", "") + + val components = mutableListOf( + "org.junit.platform:junit-platform-commons", + "org.junit.platform:junit-platform-launcher" + ) + if (runner) { + components += "org.junit.platform:junit-platform-runner" + } + if (suiteApi) { + components += "org.junit.platform:junit-platform-suite-api" + } + + for (component in components) { + testApi("$component:$componentsVersion") + } + + addDependencyTo(this, "testImplementation", intellijDep()) { + // This dependency is needed only for FileComparisonFailure + includeJars("idea_rt", rootProject = rootProject) + isTransitive = false + } + + // This is needed only for using FileComparisonFailure, which relies on JUnit 3 classes + add("testRuntimeOnly", commonDep("junit:junit")) + } +} + +private fun DependencyHandler.testApi(dependencyNotation: Any) { + add("testApi", dependencyNotation) +} + val Project.protobufVersion: String get() = findProperty("versions.protobuf") as String val Project.protobufRepo: String diff --git a/buildSrc/src/main/kotlin/plugins/KotlinBuildPublishingPlugin.kt b/buildSrc/src/main/kotlin/plugins/KotlinBuildPublishingPlugin.kt index 00ff6701d4f..022e49d7f12 100644 --- a/buildSrc/src/main/kotlin/plugins/KotlinBuildPublishingPlugin.kt +++ b/buildSrc/src/main/kotlin/plugins/KotlinBuildPublishingPlugin.kt @@ -1,5 +1,5 @@ /* - * Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Copyright 2010-2021 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. */ @@ -71,62 +71,11 @@ class KotlinBuildPublishingPlugin @Inject constructor( create(PUBLICATION_NAME) { from(kotlinLibraryComponent) - pom { - packaging = "jar" - name.set(humanReadableName(project)) - description.set(project.description ?: humanReadableName(project)) - url.set("https://kotlinlang.org/") - licenses { - license { - name.set("The Apache License, Version 2.0") - url.set("http://www.apache.org/licenses/LICENSE-2.0.txt") - } - } - scm { - url.set("https://github.com/JetBrains/kotlin") - connection.set("scm:git:https://github.com/JetBrains/kotlin.git") - developerConnection.set("scm:git:https://github.com/JetBrains/kotlin.git") - } - developers { - developer { - name.set("Kotlin Team") - organization.set("JetBrains") - organizationUrl.set("https://www.jetbrains.com") - } - } - } - } - } - - repositories { - maven { - name = REPOSITORY_NAME - url = file("${project.rootDir}/build/repo").toURI() + configureKotlinPomAttributes(project) } } } - - val signingRequired = provider { - project.findProperty("signingRequired")?.toString()?.toBoolean() - ?: project.property("isSonatypeRelease") as Boolean - } - - configure { - setRequired(signingRequired) - sign(extensions.getByType().publications[PUBLICATION_NAME]) - useGpgCmd() - } - - tasks.withType().configureEach { - setOnlyIf { signingRequired.get() } - } - - tasks.register("install") { - dependsOn(tasks.named("publishToMavenLocal")) - } - - tasks.named("publish${PUBLICATION_NAME}PublicationTo${REPOSITORY_NAME}Repository") - .configureRepository() + configureDefaultPublishing() } companion object { @@ -137,13 +86,84 @@ class KotlinBuildPublishingPlugin @Inject constructor( const val COMPILE_CONFIGURATION = "publishedCompile" const val RUNTIME_CONFIGURATION = "publishedRuntime" - @OptIn(ExperimentalStdlibApi::class) - fun humanReadableName(project: Project) = - project.name.split("-").joinToString(separator = " ") { it.capitalize(Locale.ROOT) } } } -fun TaskProvider.configureRepository() = configure { +@OptIn(ExperimentalStdlibApi::class) +private fun humanReadableName(name: String) = + name.split("-").joinToString(separator = " ") { it.capitalize(Locale.ROOT) } + +fun MavenPublication.configureKotlinPomAttributes(project: Project, explicitDescription: String? = null) { + val publication = this + pom { + packaging = "jar" + name.set(humanReadableName(publication.artifactId)) + description.set(explicitDescription ?: project.description ?: humanReadableName(publication.artifactId)) + url.set("https://kotlinlang.org/") + licenses { + license { + name.set("The Apache License, Version 2.0") + url.set("http://www.apache.org/licenses/LICENSE-2.0.txt") + } + } + scm { + url.set("https://github.com/JetBrains/kotlin") + connection.set("scm:git:https://github.com/JetBrains/kotlin.git") + developerConnection.set("scm:git:https://github.com/JetBrains/kotlin.git") + } + developers { + developer { + name.set("Kotlin Team") + organization.set("JetBrains") + organizationUrl.set("https://www.jetbrains.com") + } + } + } +} + + +fun Project.configureDefaultPublishing() { + configure { + repositories { + maven { + name = KotlinBuildPublishingPlugin.REPOSITORY_NAME + url = file("${project.rootDir}/build/repo").toURI() + } + } + } + + configureSigning() + + tasks.register("install") { + dependsOn(tasks.named("publishToMavenLocal")) + } + + tasks.withType() + .matching { it.name.endsWith("PublicationTo${KotlinBuildPublishingPlugin.REPOSITORY_NAME}Repository") } + .all { configureRepository() } +} + +private fun Project.configureSigning() { + val signingRequired = provider { + project.findProperty("signingRequired")?.toString()?.toBoolean() + ?: project.property("isSonatypeRelease") as Boolean + } + + configure { + setRequired(signingRequired) + sign(extensions.getByType().publications) // all publications + useGpgCmd() + } + + tasks.withType().configureEach { + setOnlyIf { signingRequired.get() } + } +} + +fun TaskProvider.configureRepository() = + configure { configureRepository() } + +private fun PublishToMavenRepository.configureRepository() { dependsOn(project.rootProject.tasks.named("preparePublication")) doFirst { val preparePublication = project.rootProject.tasks.named("preparePublication").get() diff --git a/buildSrc/src/main/kotlin/tasks.kt b/buildSrc/src/main/kotlin/tasks.kt index efce0a21d66..58b37c62099 100644 --- a/buildSrc/src/main/kotlin/tasks.kt +++ b/buildSrc/src/main/kotlin/tasks.kt @@ -1,17 +1,6 @@ /* - * Copyright 2010-2017 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Copyright 2010-2021 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. */ @@ -51,11 +40,7 @@ fun Task.dependsOnKotlinPluginInstall() { ":kotlin-gradle-plugin-model:install", ":kotlin-reflect:install", ":kotlin-annotation-processing-gradle:install", - ":kotlin-test:kotlin-test-common:install", - ":kotlin-test:kotlin-test-annotations-common:install", - ":kotlin-test:kotlin-test-jvm:install", - ":kotlin-test:kotlin-test-js:install", - ":kotlin-test:kotlin-test-junit:install", + ":kotlin-test:install", ":kotlin-gradle-subplugin-example:install", ":kotlin-stdlib-common:install", ":kotlin-stdlib:install", diff --git a/compiler/android-tests/android-module/build.gradle b/compiler/android-tests/android-module/build.gradle index 91bbd497f93..8536a0ca0b6 100644 --- a/compiler/android-tests/android-module/build.gradle +++ b/compiler/android-tests/android-module/build.gradle @@ -80,14 +80,6 @@ android { reflect0 { dimension "box" } - - jvm80 { - dimension "box" - } - - reflectjvm80 { - dimension "box" - } } } diff --git a/compiler/android-tests/tests/org/jetbrains/kotlin/android/tests/CodegenTestsOnAndroidGenerator.kt b/compiler/android-tests/tests/org/jetbrains/kotlin/android/tests/CodegenTestsOnAndroidGenerator.kt index 28c8dd9799a..174d86088d5 100644 --- a/compiler/android-tests/tests/org/jetbrains/kotlin/android/tests/CodegenTestsOnAndroidGenerator.kt +++ b/compiler/android-tests/tests/org/jetbrains/kotlin/android/tests/CodegenTestsOnAndroidGenerator.kt @@ -44,10 +44,8 @@ class CodegenTestsOnAndroidGenerator private constructor(private val pathManager //keep it globally to avoid test grouping on TC private val generatedTestNames = hashSetOf() - private val COMMON = FlavorConfig("common", 3); - private val REFLECT = FlavorConfig("reflect", 1); - private val JVM8 = FlavorConfig("jvm8", 1); - private val JVM8REFLECT = FlavorConfig("reflectjvm8", 1); + private val COMMON = FlavorConfig("common", 3) + private val REFLECT = FlavorConfig("reflect", 1) class FlavorConfig(private val prefix: String, val limit: Int) { @@ -100,7 +98,7 @@ class CodegenTestsOnAndroidGenerator private constructor(private val pathManager it.setExecutable(true) } } - File("./gradlew.bat").copyTo(File(projectRoot, "gradlew.bat")); + File("./gradlew.bat").copyTo(File(projectRoot, "gradlew.bat")) val file = File(target, "gradle-wrapper.properties") file.readLines().map { when { @@ -156,8 +154,6 @@ class CodegenTestsOnAndroidGenerator private constructor(private val pathManager COMMON.printStatistics() REFLECT.printStatistics() - JVM8.printStatistics() - JVM8REFLECT.printStatistics() } internal inner class FilesWriter( @@ -279,14 +275,16 @@ class CodegenTestsOnAndroidGenerator private constructor(private val pathManager //TODO support JvmPackageName if (fullFileText.contains("@file:JvmPackageName(")) continue // TODO: Support jvm assertions - if (fullFileText.contains("// KOTLIN_CONFIGURATION_FLAGS: ASSERTIONS_MODE=jvm")) continue + if (fullFileText.contains("// ASSERTIONS_MODE: jvm")) continue + if (fullFileText.contains("// MODULE: ")) continue val targets = InTextDirectivesUtils.findLinesWithPrefixesRemoved(fullFileText, "// JVM_TARGET:") - .also { it.remove(JvmTarget.JVM_1_6.description) } - val isJvm8Target = - if (targets.isEmpty()) false - else if (targets.contains(JvmTarget.JVM_1_8.description) && targets.size == 1) true - else continue //TODO: support other targets on Android + val isAtLeastJvm8Target = !targets.contains(JvmTarget.JVM_1_6.description) + + if (isAtLeastJvm8Target && fullFileText.contains("@Target(AnnotationTarget.TYPE)")) { + //TODO: type annotations supported on sdk 26 emulator + continue + } // TODO: support SKIP_JDK6 on new platforms if (fullFileText.contains("// SKIP_JDK6")) continue @@ -299,9 +297,7 @@ class CodegenTestsOnAndroidGenerator private constructor(private val pathManager KotlinBaseTest.updateConfigurationByDirectivesInTestFiles(testFiles, keyConfiguration) val key = ConfigurationKey(kind, jdkKind, keyConfiguration.toString()) - val compiler = if (isJvm8Target) { - if (kind.withReflection) JVM8REFLECT else JVM8 - } else if (kind.withReflection) REFLECT else COMMON + val compiler = if (kind.withReflection) REFLECT else COMMON val filesHolder = holders.getOrPut(key) { FilesWriter(compiler, KotlinTestUtils.newConfiguration(kind, jdkKind, KtTestUtil.getAnnotationsJar() diff --git a/compiler/backend.common.jvm/src/org/jetbrains/kotlin/resolve/jvm/AsmTypes.java b/compiler/backend.common.jvm/src/org/jetbrains/kotlin/resolve/jvm/AsmTypes.java index 76ba76d30b3..9aa3dc97f62 100644 --- a/compiler/backend.common.jvm/src/org/jetbrains/kotlin/resolve/jvm/AsmTypes.java +++ b/compiler/backend.common.jvm/src/org/jetbrains/kotlin/resolve/jvm/AsmTypes.java @@ -14,7 +14,6 @@ import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; -import java.util.function.Function; public class AsmTypes { private static final Map, Type> TYPES_MAP = new HashMap<>(); diff --git a/compiler/backend/src/org/jetbrains/kotlin/codegen/OriginCollectingClassBuilderFactory.kt b/compiler/backend/src/org/jetbrains/kotlin/codegen/OriginCollectingClassBuilderFactory.kt index d9b3869893f..238cd25f13d 100644 --- a/compiler/backend/src/org/jetbrains/kotlin/codegen/OriginCollectingClassBuilderFactory.kt +++ b/compiler/backend/src/org/jetbrains/kotlin/codegen/OriginCollectingClassBuilderFactory.kt @@ -58,7 +58,7 @@ class OriginCollectingClassBuilderFactory(private val builderMode: ClassBuilderM } override fun asBytes(builder: ClassBuilder): ByteArray { - val classWriter = ClassWriter(0) + val classWriter = ClassWriter(ClassWriter.COMPUTE_FRAMES or ClassWriter.COMPUTE_MAXS) (builder as OriginCollectingClassBuilder).classNode.accept(classWriter) return classWriter.toByteArray() } @@ -66,4 +66,4 @@ class OriginCollectingClassBuilderFactory(private val builderMode: ClassBuilderM override fun asText(builder: ClassBuilder) = throw UnsupportedOperationException() override fun close() {} -} \ No newline at end of file +} diff --git a/compiler/backend/src/org/jetbrains/kotlin/codegen/StackValue.java b/compiler/backend/src/org/jetbrains/kotlin/codegen/StackValue.java index 496f8940956..4a76cc9bce7 100644 --- a/compiler/backend/src/org/jetbrains/kotlin/codegen/StackValue.java +++ b/compiler/backend/src/org/jetbrains/kotlin/codegen/StackValue.java @@ -629,7 +629,11 @@ public abstract class StackValue { } public static void coerce(@NotNull Type fromType, @NotNull Type toType, @NotNull InstructionAdapter v) { - if (toType.equals(fromType)) return; + coerce(fromType, toType, v, false); + } + + public static void coerce(@NotNull Type fromType, @NotNull Type toType, @NotNull InstructionAdapter v, boolean forceSelfCast) { + if (toType.equals(fromType) && !forceSelfCast) return; if (toType.getSort() == Type.VOID) { pop(v, fromType); diff --git a/compiler/backend/src/org/jetbrains/kotlin/codegen/inline/AnonymousObjectTransformer.kt b/compiler/backend/src/org/jetbrains/kotlin/codegen/inline/AnonymousObjectTransformer.kt index f6beca2bce2..c4a846e2db7 100644 --- a/compiler/backend/src/org/jetbrains/kotlin/codegen/inline/AnonymousObjectTransformer.kt +++ b/compiler/backend/src/org/jetbrains/kotlin/codegen/inline/AnonymousObjectTransformer.kt @@ -319,7 +319,7 @@ class AnonymousObjectTransformer( ), null ) - val result = inliner.doInline(deferringVisitor, LocalVarRemapper(parameters, 0), false, ReturnLabelOwner.NOT_APPLICABLE) + val result = inliner.doInline(deferringVisitor, LocalVarRemapper(parameters, 0), false, mapOf()) result.reifiedTypeParametersUsages.mergeAll(typeParametersToReify) deferringVisitor.visitMaxs(-1, -1) return result diff --git a/compiler/backend/src/org/jetbrains/kotlin/codegen/inline/InlineCodegen.kt b/compiler/backend/src/org/jetbrains/kotlin/codegen/inline/InlineCodegen.kt index 7c45a0bfbff..ea97043b650 100644 --- a/compiler/backend/src/org/jetbrains/kotlin/codegen/inline/InlineCodegen.kt +++ b/compiler/backend/src/org/jetbrains/kotlin/codegen/inline/InlineCodegen.kt @@ -243,12 +243,10 @@ abstract class InlineCodegen( //hack to keep linenumber info, otherwise jdi will skip begin of linenumber chain adapter.visitInsn(Opcodes.NOP) - val result = inliner.doInline(adapter, remapper, true, ReturnLabelOwner.SKIP_ALL) + val result = inliner.doInline(adapter, remapper, true, mapOf()) result.reifiedTypeParametersUsages.mergeAll(reificationResult) - val labels = sourceCompiler.getContextLabels() - - val infos = MethodInliner.processReturns(adapter, ReturnLabelOwner { labels.contains(it) }, true, null) + val infos = MethodInliner.processReturns(adapter, sourceCompiler.getContextLabels(), null) generateAndInsertFinallyBlocks( adapter, infos, (remapper.remap(parameters.argsSizeOnStack + 1).value as StackValue.Local).index ) @@ -319,7 +317,9 @@ abstract class InlineCodegen( frameMap.enterTemp(Type.INT_TYPE) } - sourceCompiler.generateFinallyBlocksIfNeeded(finallyCodegen, extension.returnType, extension.finallyIntervalEnd.label) + sourceCompiler.generateFinallyBlocksIfNeeded( + finallyCodegen, extension.returnType, extension.finallyIntervalEnd.label, extension.jumpTarget + ) //Exception table for external try/catch/finally blocks will be generated in original codegen after exiting this method insertNodeBefore(finallyNode, intoNode, curInstr) diff --git a/compiler/backend/src/org/jetbrains/kotlin/codegen/inline/LambdaInfo.kt b/compiler/backend/src/org/jetbrains/kotlin/codegen/inline/LambdaInfo.kt index 2da961b68cd..e20441fa587 100644 --- a/compiler/backend/src/org/jetbrains/kotlin/codegen/inline/LambdaInfo.kt +++ b/compiler/backend/src/org/jetbrains/kotlin/codegen/inline/LambdaInfo.kt @@ -30,17 +30,14 @@ import org.jetbrains.kotlin.resolve.calls.callUtil.getResolvedCallWithAssert import org.jetbrains.kotlin.resolve.jvm.AsmTypes.* import org.jetbrains.kotlin.types.KotlinType import org.jetbrains.kotlin.util.OperatorNameConventions -import org.jetbrains.org.objectweb.asm.ClassReader -import org.jetbrains.org.objectweb.asm.ClassVisitor -import org.jetbrains.org.objectweb.asm.Opcodes -import org.jetbrains.org.objectweb.asm.Type +import org.jetbrains.org.objectweb.asm.* import org.jetbrains.org.objectweb.asm.commons.Method import org.jetbrains.org.objectweb.asm.tree.FieldInsnNode import kotlin.properties.Delegates interface FunctionalArgument -abstract class LambdaInfo(@JvmField val isCrossInline: Boolean) : FunctionalArgument, ReturnLabelOwner { +abstract class LambdaInfo(@JvmField val isCrossInline: Boolean) : FunctionalArgument { abstract val isBoundCallableReference: Boolean @@ -54,6 +51,9 @@ abstract class LambdaInfo(@JvmField val isCrossInline: Boolean) : FunctionalArgu abstract val capturedVars: List + open val returnLabels: Map + get() = mapOf() + lateinit var node: SMAPAndMethodNode abstract fun generateLambdaBody(sourceCompiler: SourceCompilerForInline, reifiedTypeInliner: ReifiedTypeInliner<*>) @@ -129,8 +129,6 @@ abstract class DefaultLambda( final override lateinit var capturedVars: List private set - override fun isReturnFromMe(labelName: String): Boolean = false - var originalBoundReceiverType: Type? = null private set @@ -247,7 +245,7 @@ class PsiExpressionLambda( val functionWithBodyOrCallableReference: KtExpression = (expression as? KtLambdaExpression)?.functionLiteral ?: expression - private val labels: Set + override val returnLabels: Map override val isSuspend: Boolean @@ -284,7 +282,7 @@ class PsiExpressionLambda( closure = it!! } - labels = InlineCodegen.getDeclarationLabels(expression, invokeMethodDescriptor) + returnLabels = InlineCodegen.getDeclarationLabels(expression, invokeMethodDescriptor).associateWith { null } invokeMethod = typeMapper.mapAsmMethod(invokeMethodDescriptor) isSuspend = invokeMethodDescriptor.isSuspend } @@ -324,10 +322,6 @@ class PsiExpressionLambda( } } - override fun isReturnFromMe(labelName: String): Boolean { - return labels.contains(labelName) - } - val isPropertyReference: Boolean get() = propertyReferenceInfo != null diff --git a/compiler/backend/src/org/jetbrains/kotlin/codegen/inline/MethodInliner.kt b/compiler/backend/src/org/jetbrains/kotlin/codegen/inline/MethodInliner.kt index df48334c6e4..970c93c146e 100644 --- a/compiler/backend/src/org/jetbrains/kotlin/codegen/inline/MethodInliner.kt +++ b/compiler/backend/src/org/jetbrains/kotlin/codegen/inline/MethodInliner.kt @@ -21,6 +21,7 @@ import org.jetbrains.kotlin.codegen.optimization.common.isMeaningful import org.jetbrains.kotlin.codegen.optimization.fixStack.peek import org.jetbrains.kotlin.codegen.optimization.fixStack.top import org.jetbrains.kotlin.codegen.optimization.nullCheck.isCheckParameterIsNotNull +import org.jetbrains.kotlin.codegen.pseudoInsns.PseudoInsn import org.jetbrains.kotlin.config.LanguageFeature import org.jetbrains.kotlin.descriptors.FunctionDescriptor import org.jetbrains.kotlin.descriptors.ParameterDescriptor @@ -72,9 +73,9 @@ class MethodInliner( adapter: MethodVisitor, remapper: LocalVarRemapper, remapReturn: Boolean, - returnLabelOwner: ReturnLabelOwner + returnLabels: Map ): InlineResult { - return doInline(adapter, remapper, remapReturn, returnLabelOwner, 0) + return doInline(adapter, remapper, remapReturn, returnLabels, 0) } private fun recordTransformation(info: TransformationInfo) { @@ -91,11 +92,11 @@ class MethodInliner( adapter: MethodVisitor, remapper: LocalVarRemapper, remapReturn: Boolean, - returnLabelOwner: ReturnLabelOwner, + returnLabels: Map, finallyDeepShift: Int ): InlineResult { //analyze body - var transformedNode = markPlacesForInlineAndRemoveInlinable(node, returnLabelOwner, finallyDeepShift) + var transformedNode = markPlacesForInlineAndRemoveInlinable(node, returnLabels, finallyDeepShift) if (inliningContext.isInliningLambda && isDefaultLambdaWithReification(inliningContext.lambdaInfo!!)) { //TODO maybe move reification in one place inliningContext.root.inlineMethodReifier.reifyInstructions(transformedNode) @@ -139,7 +140,9 @@ class MethodInliner( ) } - processReturns(resultNode, returnLabelOwner, remapReturn, end) + if (remapReturn) { + processReturns(resultNode, returnLabels, end) + } //flush transformed node to output resultNode.accept(SkipMaxAndEndVisitor(adapter)) return result @@ -297,7 +300,7 @@ class MethodInliner( val varRemapper = LocalVarRemapper(lambdaParameters, valueParamShift) //TODO add skipped this and receiver - val lambdaResult = inliner.doInline(localVariablesSorter, varRemapper, true, info, invokeCall.finallyDepthShift) + val lambdaResult = inliner.doInline(localVariablesSorter, varRemapper, true, info.returnLabels, invokeCall.finallyDepthShift) result.mergeWithNotChangeInfo(lambdaResult) result.reifiedTypeParametersUsages.mergeAll(lambdaResult.reifiedTypeParametersUsages) @@ -486,11 +489,11 @@ class MethodInliner( } private fun markPlacesForInlineAndRemoveInlinable( - node: MethodNode, returnLabelOwner: ReturnLabelOwner, finallyDeepShift: Int + node: MethodNode, returnLabels: Map, finallyDeepShift: Int ): MethodNode { val processingNode = prepareNode(node, finallyDeepShift) - preprocessNodeBeforeInline(processingNode, returnLabelOwner) + preprocessNodeBeforeInline(processingNode, returnLabels) replaceContinuationAccessesWithFakeContinuationsIfNeeded(processingNode) @@ -765,7 +768,7 @@ class MethodInliner( } } - private fun preprocessNodeBeforeInline(node: MethodNode, returnLabelOwner: ReturnLabelOwner) { + private fun preprocessNodeBeforeInline(node: MethodNode, returnLabels: Map) { try { FixStackWithLabelNormalizationMethodTransformer().transform("fake", node) } catch (e: Throwable) { @@ -787,16 +790,13 @@ class MethodInliner( if (!isReturnOpcode(insnNode.opcode)) continue - var insertBeforeInsn = insnNode - // TODO extract isLocalReturn / isNonLocalReturn, see processReturns val labelName = getMarkedReturnLabelOrNull(insnNode) - if (labelName != null) { - if (!returnLabelOwner.isReturnFromMe(labelName)) continue - insertBeforeInsn = insnNode.previous + if (labelName == null) { + localReturnsNormalizer.addLocalReturnToTransform(insnNode, insnNode, frame) + } else if (labelName in returnLabels) { + localReturnsNormalizer.addLocalReturnToTransform(insnNode, insnNode.previous, frame) } - - localReturnsNormalizer.addLocalReturnToTransform(insnNode, insertBeforeInsn, frame) } localReturnsNormalizer.transform(node) @@ -1001,7 +1001,8 @@ class MethodInliner( class PointForExternalFinallyBlocks( @JvmField val beforeIns: AbstractInsnNode, @JvmField val returnType: Type, - @JvmField val finallyIntervalEnd: LabelNode + @JvmField val finallyIntervalEnd: LabelNode, + @JvmField val jumpTarget: Label? ) companion object { @@ -1115,55 +1116,44 @@ class MethodInliner( //process local and global returns (local substituted with goto end-label global kept unchanged) @JvmStatic fun processReturns( - node: MethodNode, returnLabelOwner: ReturnLabelOwner, remapReturn: Boolean, endLabel: Label? + node: MethodNode, returnLabels: Map, endLabel: Label? ): List { - if (!remapReturn) { - return emptyList() - } val result = ArrayList() val instructions = node.instructions var insnNode: AbstractInsnNode? = instructions.first while (insnNode != null) { if (isReturnOpcode(insnNode.opcode)) { - var isLocalReturn = true val labelName = getMarkedReturnLabelOrNull(insnNode) + val returnType = getReturnType(insnNode.opcode) - if (labelName != null) { - isLocalReturn = returnLabelOwner.isReturnFromMe(labelName) - //remove global return flag - if (isLocalReturn) { - instructions.remove(insnNode.previous) - } + val isLocalReturn = labelName == null || labelName in returnLabels + val jumpTarget = returnLabels[labelName] ?: endLabel + + if (isLocalReturn && labelName != null) { + // remove non-local return flag + instructions.remove(insnNode.previous) } - if (isLocalReturn && endLabel != null) { - val nop = InsnNode(Opcodes.NOP) - instructions.insert(insnNode, nop) - - val labelNode = endLabel.info as LabelNode - val jumpInsnNode = JumpInsnNode(Opcodes.GOTO, labelNode) - instructions.insert(nop, jumpInsnNode) - + if (isLocalReturn && jumpTarget != null) { + val jumpInsnNode = JumpInsnNode(Opcodes.GOTO, jumpTarget.info as LabelNode) + instructions.insertBefore(insnNode, InsnNode(Opcodes.NOP)) + if (jumpTarget != endLabel) { + instructions.insertBefore(insnNode, PseudoInsn.FIX_STACK_BEFORE_JUMP.createInsnNode()) + } + instructions.insertBefore(insnNode, jumpInsnNode) instructions.remove(insnNode) insnNode = jumpInsnNode } - //generate finally block before nonLocalReturn flag/return/goto val label = LabelNode() instructions.insert(insnNode, label) - result.add( - PointForExternalFinallyBlocks( - getInstructionToInsertFinallyBefore(insnNode, isLocalReturn), getReturnType(insnNode.opcode), label - ) - ) + // generate finally blocks before the non-local return flag or the stack fixup pseudo instruction + val finallyInsertionPoint = if (isLocalReturn && jumpTarget == endLabel) insnNode else insnNode.previous + result.add(PointForExternalFinallyBlocks(finallyInsertionPoint, returnType, label, jumpTarget)) } insnNode = insnNode.next } return result } - - private fun getInstructionToInsertFinallyBefore(nonLocalReturnOrJump: AbstractInsnNode, isLocal: Boolean): AbstractInsnNode { - return if (isLocal) nonLocalReturnOrJump else nonLocalReturnOrJump.previous - } } } diff --git a/compiler/backend/src/org/jetbrains/kotlin/codegen/inline/ReturnLabelOwner.java b/compiler/backend/src/org/jetbrains/kotlin/codegen/inline/ReturnLabelOwner.java deleted file mode 100644 index 4b1d1e78cda..00000000000 --- a/compiler/backend/src/org/jetbrains/kotlin/codegen/inline/ReturnLabelOwner.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright 2010-2015 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.jetbrains.kotlin.codegen.inline; - -import org.jetbrains.annotations.NotNull; - -public interface ReturnLabelOwner { - boolean isReturnFromMe(@NotNull String labelName); - - ReturnLabelOwner SKIP_ALL = name -> false; - - ReturnLabelOwner NOT_APPLICABLE = name -> { - throw new RuntimeException("This operation not applicable for current context"); - }; -} diff --git a/compiler/backend/src/org/jetbrains/kotlin/codegen/inline/SourceCompilerForInline.kt b/compiler/backend/src/org/jetbrains/kotlin/codegen/inline/SourceCompilerForInline.kt index e01026264ab..360760bd27b 100644 --- a/compiler/backend/src/org/jetbrains/kotlin/codegen/inline/SourceCompilerForInline.kt +++ b/compiler/backend/src/org/jetbrains/kotlin/codegen/inline/SourceCompilerForInline.kt @@ -64,7 +64,7 @@ interface SourceCompilerForInline { curFinallyDepth: Int ): BaseExpressionCodegen - fun generateFinallyBlocksIfNeeded(finallyCodegen: BaseExpressionCodegen, returnType: Type, afterReturnLabel: Label) + fun generateFinallyBlocksIfNeeded(codegen: BaseExpressionCodegen, returnType: Type, afterReturnLabel: Label, target: Label?) fun isCallInsideSameModuleAsDeclared(functionDescriptor: FunctionDescriptor): Boolean @@ -74,7 +74,7 @@ interface SourceCompilerForInline { val compilationContextFunctionDescriptor: FunctionDescriptor - fun getContextLabels(): Set + fun getContextLabels(): Map fun reportSuspensionPointInsideMonitor(stackTraceElement: String) } @@ -311,9 +311,10 @@ class PsiSourceCompilerForInline(private val codegen: ExpressionCodegen, overrid override fun hasFinallyBlocks() = codegen.hasFinallyBlocks() - override fun generateFinallyBlocksIfNeeded(finallyCodegen: BaseExpressionCodegen, returnType: Type, afterReturnLabel: Label) { - require(finallyCodegen is ExpressionCodegen) - finallyCodegen.generateFinallyBlocksIfNeeded(returnType, null, afterReturnLabel) + override fun generateFinallyBlocksIfNeeded(codegen: BaseExpressionCodegen, returnType: Type, afterReturnLabel: Label, target: Label?) { + // TODO use the target label for non-local break/continue + require(codegen is ExpressionCodegen) + codegen.generateFinallyBlocksIfNeeded(returnType, null, afterReturnLabel) } override fun createCodegenForExternalFinallyBlockGenerationOnNonLocalReturn(finallyNode: MethodNode, curFinallyDepth: Int) = @@ -337,14 +338,15 @@ class PsiSourceCompilerForInline(private val codegen: ExpressionCodegen, overrid override val compilationContextFunctionDescriptor get() = codegen.getContext().functionDescriptor - override fun getContextLabels(): Set { + override fun getContextLabels(): Map { val context = codegen.getContext() val parentContext = context.parentContext val descriptor = if (parentContext is ClosureContext && parentContext.originalSuspendLambdaDescriptor != null) { parentContext.originalSuspendLambdaDescriptor!! } else context.contextDescriptor - return InlineCodegen.getDeclarationLabels(DescriptorToSourceUtils.descriptorToDeclaration(descriptor), descriptor) + val labels = InlineCodegen.getDeclarationLabels(DescriptorToSourceUtils.descriptorToDeclaration(descriptor), descriptor) + return labels.associateWith { null } // TODO add break/continue labels } fun initializeInlineFunctionContext(functionDescriptor: FunctionDescriptor) { diff --git a/compiler/backend/src/org/jetbrains/kotlin/codegen/inline/inlineIntrinsics.kt b/compiler/backend/src/org/jetbrains/kotlin/codegen/inline/inlineIntrinsics.kt index fddf9908ab3..73e0bcaef8d 100644 --- a/compiler/backend/src/org/jetbrains/kotlin/codegen/inline/inlineIntrinsics.kt +++ b/compiler/backend/src/org/jetbrains/kotlin/codegen/inline/inlineIntrinsics.kt @@ -84,9 +84,11 @@ private fun createSpecialEnumMethodBody( Opcodes.INVOKESTATIC, ENUM_TYPE.internalName, "valueOf", Type.getMethodDescriptor(ENUM_TYPE, JAVA_CLASS_TYPE, JAVA_STRING_TYPE), false ) + node.visitTypeInsn(Opcodes.CHECKCAST, ENUM_TYPE.internalName) } else { node.visitInsn(Opcodes.ICONST_0) node.visitTypeInsn(Opcodes.ANEWARRAY, ENUM_TYPE.internalName) + node.visitTypeInsn(Opcodes.CHECKCAST, AsmUtil.getArrayType(ENUM_TYPE).internalName) } node.visitInsn(Opcodes.ARETURN) node.visitMaxs(if (isValueOf) 3 else 2, if (isValueOf) 1 else 0) diff --git a/compiler/backend/src/org/jetbrains/kotlin/codegen/optimization/CapturedVarsOptimizationMethodTransformer.kt b/compiler/backend/src/org/jetbrains/kotlin/codegen/optimization/CapturedVarsOptimizationMethodTransformer.kt index 2bf01a52891..9ca20a69b04 100644 --- a/compiler/backend/src/org/jetbrains/kotlin/codegen/optimization/CapturedVarsOptimizationMethodTransformer.kt +++ b/compiler/backend/src/org/jetbrains/kotlin/codegen/optimization/CapturedVarsOptimizationMethodTransformer.kt @@ -37,17 +37,9 @@ class CapturedVarsOptimizationMethodTransformer : MethodTransformer() { // Tracks proper usages of objects corresponding to captured variables. // - // The 'kotlin.jvm.internal.Ref.*' instance can be replaced with a local variable, - // if all of the following conditions are satisfied: - // * It is created inside a current method. - // * The only permitted operations on it are: - // - store to a local variable - // - ALOAD, ASTORE - // - DUP, POP - // - GETFIELD .element, PUTFIELD .element - // * There's a corresponding local variable definition, - // and all ALOAD/ASTORE instructions operate on that particular local variable. - // * Its 'element' field is initialized at start of local variable visibility range. + // The 'kotlin.jvm.internal.Ref.*' instance can be replaced with a local variable, if + // * it is created inside a current method; + // * the only operations on it are ALOAD, ASTORE, DUP, POP, GETFIELD element, PUTFIELD element. // // Note that for code that doesn't create Ref objects explicitly these conditions are true, // unless the Ref object escapes to a local class constructor (including local classes for lambdas). @@ -58,18 +50,9 @@ class CapturedVarsOptimizationMethodTransformer : MethodTransformer() { var initCallInsn: MethodInsnNode? = null var localVar: LocalVariableNode? = null var localVarIndex = -1 - val astoreInsns: MutableCollection = LinkedHashSet() - val aloadInsns: MutableCollection = LinkedHashSet() - val stackInsns: MutableCollection = LinkedHashSet() + val wrapperInsns: MutableCollection = LinkedHashSet() val getFieldInsns: MutableCollection = LinkedHashSet() val putFieldInsns: MutableCollection = LinkedHashSet() - var cleanVarInstruction: VarInsnNode? = null - - fun canRewrite(): Boolean = - !hazard && - initCallInsn != null && - localVar != null && - localVarIndex >= 0 override fun onUseAsTainted() { hazard = true @@ -79,26 +62,29 @@ class CapturedVarsOptimizationMethodTransformer : MethodTransformer() { private class Transformer(private val internalClassName: String, private val methodNode: MethodNode) { private val refValues = ArrayList() private val refValuesByNewInsn = LinkedHashMap() - private val insns = methodNode.instructions.toArray() - private lateinit var frames: Array?> - - val hasRewritableRefValues: Boolean - get() = refValues.isNotEmpty() fun run() { createRefValues() - if (!hasRewritableRefValues) return + if (refValues.isEmpty()) return - analyze() - if (!hasRewritableRefValues) return + val frames = analyze(internalClassName, methodNode, Interpreter()) + trackPops(frames) + assignLocalVars(frames) - rewrite() + for (refValue in refValues) { + if (!refValue.hazard) { + rewriteRefValue(refValue) + } + } + + methodNode.removeEmptyCatchBlocks() + methodNode.removeUnusedLocalVariables() } private fun AbstractInsnNode.getIndex() = methodNode.instructions.indexOf(this) private fun createRefValues() { - for (insn in insns) { + for (insn in methodNode.instructions.asSequence()) { if (insn.opcode == Opcodes.NEW && insn is TypeInsnNode) { val type = Type.getObjectType(insn.desc) if (AsmTypes.isSharedVarType(type)) { @@ -113,19 +99,15 @@ class CapturedVarsOptimizationMethodTransformer : MethodTransformer() { private inner class Interpreter : ReferenceTrackingInterpreter() { override fun newOperation(insn: AbstractInsnNode): BasicValue = - refValuesByNewInsn[insn]?.let { descriptor -> - ProperTrackedReferenceValue(descriptor.refType, descriptor) - } - ?: super.newOperation(insn) + refValuesByNewInsn[insn]?.let { ProperTrackedReferenceValue(it.refType, it) } ?: super.newOperation(insn) override fun processRefValueUsage(value: TrackedReferenceValue, insn: AbstractInsnNode, position: Int) { for (descriptor in value.descriptors) { if (descriptor !is CapturedVarDescriptor) throw AssertionError("Unexpected descriptor: $descriptor") when { - insn.opcode == Opcodes.ALOAD -> - descriptor.aloadInsns.add(insn as VarInsnNode) - insn.opcode == Opcodes.ASTORE -> - descriptor.astoreInsns.add(insn as VarInsnNode) + insn.opcode == Opcodes.DUP -> descriptor.wrapperInsns.add(insn) + insn.opcode == Opcodes.ALOAD -> descriptor.wrapperInsns.add(insn) + insn.opcode == Opcodes.ASTORE -> descriptor.wrapperInsns.add(insn) insn.opcode == Opcodes.GETFIELD && insn is FieldInsnNode && insn.name == REF_ELEMENT_FIELD && position == 0 -> descriptor.getFieldInsns.add(insn) insn.opcode == Opcodes.PUTFIELD && insn is FieldInsnNode && insn.name == REF_ELEMENT_FIELD && position == 0 -> @@ -135,32 +117,18 @@ class CapturedVarsOptimizationMethodTransformer : MethodTransformer() { descriptor.hazard = true else descriptor.initCallInsn = insn - insn.opcode == Opcodes.DUP -> - descriptor.stackInsns.add(insn) - else -> - descriptor.hazard = true + else -> descriptor.hazard = true } } } - } - private fun analyze() { - frames = MethodTransformer.analyze(internalClassName, methodNode, Interpreter()) - trackPops() - assignLocalVars() - - refValues.removeAll { !it.canRewrite() } - } - - private fun trackPops() { - for (i in insns.indices) { + private fun trackPops(frames: Array?>) { + for ((i, insn) in methodNode.instructions.asSequence().withIndex()) { val frame = frames[i] ?: continue - val insn = insns[i] - when (insn.opcode) { Opcodes.POP -> { - frame.top()?.getCapturedVarOrNull()?.run { stackInsns.add(insn) } + frame.top()?.getCapturedVarOrNull()?.run { wrapperInsns.add(insn) } } Opcodes.POP2 -> { val top = frame.top() @@ -176,7 +144,7 @@ class CapturedVarsOptimizationMethodTransformer : MethodTransformer() { private fun BasicValue.getCapturedVarOrNull() = safeAs()?.descriptor?.safeAs() - private fun assignLocalVars() { + private fun assignLocalVars(frames: Array?>) { for (localVar in methodNode.localVariables) { val type = Type.getType(localVar.desc) if (!AsmTypes.isSharedVarType(type)) continue @@ -197,51 +165,20 @@ class CapturedVarsOptimizationMethodTransformer : MethodTransformer() { for (refValue in refValues) { if (refValue.hazard) continue - val localVar = refValue.localVar ?: continue - val oldVarIndex = localVar.index - - if (refValue.valueType.size != 1) { + if (refValue.localVar == null || refValue.valueType.size != 1) { refValue.localVarIndex = methodNode.maxLocals - methodNode.maxLocals += 2 - localVar.index = refValue.localVarIndex + methodNode.maxLocals += refValue.valueType.size } else { - refValue.localVarIndex = localVar.index + refValue.localVarIndex = refValue.localVar!!.index } - - val cleanInstructions = findCleanInstructions(refValue, oldVarIndex, methodNode.instructions) - if (cleanInstructions.size > 1) { - refValue.hazard = true - continue - } - refValue.cleanVarInstruction = cleanInstructions.firstOrNull() } } - private fun findCleanInstructions(refValue: CapturedVarDescriptor, oldVarIndex: Int, instructions: InsnList): List { - return InsnSequence(instructions).filterIsInstance().filter { - it.opcode == Opcodes.ASTORE && it.`var` == oldVarIndex - }.filter { - it.previous?.opcode == Opcodes.ACONST_NULL - }.filter { - val operationIndex = instructions.indexOf(it) - val localVariableNode = refValue.localVar!! - instructions.indexOf(localVariableNode.start) < operationIndex && operationIndex < instructions.indexOf( - localVariableNode.end - ) - }.toList() - } - - private fun rewrite() { - for (refValue in refValues) { - if (!refValue.canRewrite()) continue - - rewriteRefValue(refValue) + private fun LocalVariableNode.findCleanInstructions() = + InsnSequence(methodNode.instructions).dropWhile { it != start }.takeWhile { it != end }.filter { + it is VarInsnNode && it.opcode == Opcodes.ASTORE && it.`var` == index && it.previous?.opcode == Opcodes.ACONST_NULL } - methodNode.removeEmptyCatchBlocks() - methodNode.removeUnusedLocalVariables() - } - // Be careful to not remove instructions that are the only instruction for a line number. That will // break debugging. If the previous instruction is a line number and the following instruction is // a label followed by a line number, insert a nop instead of deleting the instruction. @@ -255,34 +192,38 @@ class CapturedVarsOptimizationMethodTransformer : MethodTransformer() { private fun rewriteRefValue(capturedVar: CapturedVarDescriptor) { methodNode.instructions.run { - val localVar = capturedVar.localVar!! - localVar.signature = null - localVar.desc = capturedVar.valueType.descriptor - val loadOpcode = capturedVar.valueType.getOpcode(Opcodes.ILOAD) val storeOpcode = capturedVar.valueType.getOpcode(Opcodes.ISTORE) - if (capturedVar.putFieldInsns.none { it.getIndex() < localVar.start.getIndex() }) { - // variable needs to be initialized before its live range can begin - insertBefore(capturedVar.newInsn, InsnNode(AsmUtil.defaultValueOpcode(capturedVar.valueType))) - insertBefore(capturedVar.newInsn, VarInsnNode(storeOpcode, capturedVar.localVarIndex)) + val localVar = capturedVar.localVar + if (localVar != null) { + if (capturedVar.putFieldInsns.none { it.getIndex() < localVar.start.getIndex() }) { + // variable needs to be initialized before its live range can begin + insertBefore(capturedVar.newInsn, InsnNode(AsmUtil.defaultValueOpcode(capturedVar.valueType))) + insertBefore(capturedVar.newInsn, VarInsnNode(storeOpcode, capturedVar.localVarIndex)) + } + + for (insn in localVar.findCleanInstructions()) { + // after visiting block codegen tries to delete all allocated references: + // see ExpressionCodegen.addLeaveTaskToRemoveLocalVariableFromFrameMap + if (storeOpcode == Opcodes.ASTORE) { + set(insn.previous, InsnNode(AsmUtil.defaultValueOpcode(capturedVar.valueType))) + } else { + remove(insn.previous) + remove(insn) + } + } + + localVar.index = capturedVar.localVarIndex + localVar.desc = capturedVar.valueType.descriptor + localVar.signature = null } remove(capturedVar.newInsn) remove(capturedVar.initCallInsn!!) - - capturedVar.stackInsns.forEach { removeOrReplaceByNop(it) } - capturedVar.aloadInsns.forEach { removeOrReplaceByNop(it) } - capturedVar.astoreInsns.forEach { removeOrReplaceByNop(it) } + capturedVar.wrapperInsns.forEach { removeOrReplaceByNop(it) } capturedVar.getFieldInsns.forEach { set(it, VarInsnNode(loadOpcode, capturedVar.localVarIndex)) } capturedVar.putFieldInsns.forEach { set(it, VarInsnNode(storeOpcode, capturedVar.localVarIndex)) } - - //after visiting block codegen tries to delete all allocated references: - // see ExpressionCodegen.addLeaveTaskToRemoveLocalVariableFromFrameMap - capturedVar.cleanVarInstruction?.let { - remove(it.previous) - remove(it) - } } } diff --git a/compiler/backend/src/org/jetbrains/kotlin/codegen/optimization/RedundantCheckCastElimination.kt b/compiler/backend/src/org/jetbrains/kotlin/codegen/optimization/RedundantCheckCastElimination.kt index e9175d6b794..591c89c28d2 100644 --- a/compiler/backend/src/org/jetbrains/kotlin/codegen/optimization/RedundantCheckCastElimination.kt +++ b/compiler/backend/src/org/jetbrains/kotlin/codegen/optimization/RedundantCheckCastElimination.kt @@ -28,7 +28,8 @@ import org.jetbrains.org.objectweb.asm.tree.TypeInsnNode class RedundantCheckCastEliminationMethodTransformer : MethodTransformer() { override fun transform(internalClassName: String, methodNode: MethodNode) { val insns = methodNode.instructions.toArray() - if (!insns.any { it.opcode == Opcodes.CHECKCAST }) return + if (!insns.any { it.opcode == Opcodes.CHECKCAST}) return + if (insns.any { ReifiedTypeInliner.isOperationReifiedMarker(it) }) return val redundantCheckCasts = ArrayList() @@ -36,7 +37,6 @@ class RedundantCheckCastEliminationMethodTransformer : MethodTransformer() { for (i in insns.indices) { val valueType = frames[i]?.top()?.type ?: continue val insn = insns[i] - if (ReifiedTypeInliner.isOperationReifiedMarker(insn.previous)) continue if (insn is TypeInsnNode) { val insnType = Type.getObjectType(insn.desc) diff --git a/compiler/backend/src/org/jetbrains/kotlin/codegen/state/GenerationState.kt b/compiler/backend/src/org/jetbrains/kotlin/codegen/state/GenerationState.kt index ae7ffae8b83..92239187b51 100644 --- a/compiler/backend/src/org/jetbrains/kotlin/codegen/state/GenerationState.kt +++ b/compiler/backend/src/org/jetbrains/kotlin/codegen/state/GenerationState.kt @@ -208,11 +208,21 @@ class GenerationState private constructor( else JvmStringConcat.INLINE val samConversionsScheme = run { - val fromConfig = configuration.get(JVMConfigurationKeys.SAM_CONVERSIONS) ?: JvmSamConversions.DEFAULT + val fromConfig = configuration.get(JVMConfigurationKeys.SAM_CONVERSIONS) + ?: JvmClosureGenerationScheme.DEFAULT if (target >= fromConfig.minJvmTarget) fromConfig else - JvmSamConversions.DEFAULT + JvmClosureGenerationScheme.DEFAULT + } + + val lambdasScheme = run { + val fromConfig = configuration.get(JVMConfigurationKeys.LAMBDAS) + ?: JvmClosureGenerationScheme.DEFAULT + if (target >= fromConfig.minJvmTarget) + fromConfig + else + JvmClosureGenerationScheme.DEFAULT } val moduleName: String = moduleName ?: JvmCodegenUtil.getModuleName(module) diff --git a/compiler/build.gradle.kts b/compiler/build.gradle.kts index a89d17ab830..2ffdfd9917d 100644 --- a/compiler/build.gradle.kts +++ b/compiler/build.gradle.kts @@ -86,7 +86,7 @@ if (kotlinBuildProperties.isInJpsBuildIdeaSync) { idea { this.module.generatedSourceDirs.add(generationRoot) } -} else { +} else if (!kotlinBuildProperties.useFir && !kotlinBuildProperties.disableWerror) { allprojects { tasks.withType> { if (path !in tasksWithWarnings) { diff --git a/compiler/cli/build.gradle.kts b/compiler/cli/build.gradle.kts index a450e082560..536c89fc0f9 100644 --- a/compiler/cli/build.gradle.kts +++ b/compiler/cli/build.gradle.kts @@ -30,7 +30,6 @@ dependencies { compile(project(":compiler:fir:checkers")) compile(project(":kotlin-util-klib")) compile(project(":kotlin-util-io")) - compile(project(":compiler:ir.serialization.common")) // TODO: as soon as cli-jvm is extracted out of this module, move this dependency there compileOnly(project(":compiler:ir.tree.impl")) diff --git a/compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/arguments/CommonCompilerArguments.kt b/compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/arguments/CommonCompilerArguments.kt index 497470153e6..d56f5fc657c 100644 --- a/compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/arguments/CommonCompilerArguments.kt +++ b/compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/arguments/CommonCompilerArguments.kt @@ -351,6 +351,12 @@ abstract class CommonCompilerArguments : CommonToolArguments() { ) var inferenceCompatibility: Boolean by FreezableVar(false) + @Argument( + value = "-Xsuppress-version-warnings", + description = "Suppress warnings about outdated, inconsistent or experimental language or API versions" + ) + var suppressVersionWarnings: Boolean by FreezableVar(false) + open fun configureAnalysisFlags(collector: MessageCollector): MutableMap, Any> { return HashMap, Any>().apply { put(AnalysisFlags.skipMetadataVersionCheck, skipMetadataVersionCheck) @@ -496,9 +502,6 @@ abstract class CommonCompilerArguments : CommonToolArguments() { val apiVersion = parseVersion(collector, apiVersion, "API") ?: languageVersion checkApiVersionIsNotGreaterThenLanguageVersion(languageVersion, apiVersion, collector) - checkLanguageVersionIsStable(languageVersion, collector) - checkOutdatedVersions(languageVersion, apiVersion, collector) - checkProgressiveMode(languageVersion, collector) val languageVersionSettings = LanguageVersionSettingsImpl( languageVersion, @@ -507,7 +510,13 @@ abstract class CommonCompilerArguments : CommonToolArguments() { configureLanguageFeatures(collector) ) - checkIrSupport(languageVersionSettings, collector) + if (!suppressVersionWarnings) { + checkLanguageVersionIsStable(languageVersion, collector) + checkOutdatedVersions(languageVersion, apiVersion, collector) + checkProgressiveMode(languageVersion, collector) + + checkIrSupport(languageVersionSettings, collector) + } return languageVersionSettings } diff --git a/compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/arguments/K2JVMCompilerArguments.kt b/compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/arguments/K2JVMCompilerArguments.kt index cd7237ce2ad..9eb8a13aed3 100644 --- a/compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/arguments/K2JVMCompilerArguments.kt +++ b/compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/arguments/K2JVMCompilerArguments.kt @@ -71,7 +71,7 @@ class K2JVMCompilerArguments : CommonCompilerArguments() { @Argument( value = "-jvm-target", valueDescription = "", - description = "Target version of the generated JVM bytecode (1.6, 1.8, 9, 10, 11, 12, 13, 14 or 15), default is 1.6" + description = "Target version of the generated JVM bytecode (1.6 (DEPRECATED), 1.8, 9, 10, 11, 12, 13, 14 or 15), default is 1.8" ) var jvmTarget: String? by NullableStringFreezableVar(JvmTarget.DEFAULT.description) @@ -355,10 +355,10 @@ class K2JVMCompilerArguments : CommonCompilerArguments() { @Argument( value = "-Xstring-concat", valueDescription = "{indy-with-constants|indy|inline}", - description = """Switch a way in which string concatenation is performed. --Xstring-concat=indy-with-constants Performs string concatenation via `invokedynamic` 'makeConcatWithConstants'. Works only with `-jvm-target 9` or greater --Xstring-concat=indy Performs string concatenation via `invokedynamic` 'makeConcat'. Works only with `-jvm-target 9` or greater --Xstring-concat=inline Performs string concatenation via `StringBuilder`""" + description = """Select code generation scheme for string concatenation. +-Xstring-concat=indy-with-constants Concatenate strings using `invokedynamic` `makeConcatWithConstants`. Requires `-jvm-target 9` or greater. +-Xstring-concat=indy Concatenate strings using `invokedynamic` `makeConcat`. Requires `-jvm-target 9` or greater. +-Xstring-concat=inline Concatenate strings using `StringBuilder`""" ) var stringConcat: String? by NullableStringFreezableVar(JvmStringConcat.INLINE.description) @@ -366,10 +366,20 @@ class K2JVMCompilerArguments : CommonCompilerArguments() { value = "-Xsam-conversions", valueDescription = "{class|indy}", description = """Select code generation scheme for SAM conversions. --Xsam-conversions=indy Generate SAM conversions using `invokedynamic` with `LambdaMetafactory.metafactory`. Requires `-jvm-target 8` or greater. +-Xsam-conversions=indy Generate SAM conversions using `invokedynamic` with `LambdaMetafactory.metafactory`. Requires `-jvm-target 1.8` or greater. -Xsam-conversions=class Generate SAM conversions as explicit classes""" ) - var samConversions: String? by NullableStringFreezableVar(JvmSamConversions.CLASS.description) + var samConversions: String? by NullableStringFreezableVar(null) + + @Argument( + value = "-Xlambdas", + valueDescription = "{class|indy}", + description = """Select code generation scheme for lambdas. +-Xlambdas=indy Generate lambdas using `invokedynamic` with `LambdaMetafactory.metafactory`. Requires `-jvm-target 1.8` or greater. + Lambda objects created using `LambdaMetafactory.metafactory` will have different `toString()`. +-Xlambdas=class Generate lambdas as explicit classes""" + ) + var lambdas: String? by NullableStringFreezableVar(null) @Argument( value = "-Xklib", @@ -438,6 +448,12 @@ class K2JVMCompilerArguments : CommonCompilerArguments() { ) var enableJvmPreview: Boolean by FreezableVar(false) + @Argument( + value = "-Xsuppress-deprecated-jvm-target-warning", + description = "Suppress deprecation warning about deprecated JVM target versions" + ) + var suppressDeprecatedJvmTargetWarning: Boolean by FreezableVar(false) + override fun configureAnalysisFlags(collector: MessageCollector): MutableMap, Any> { val result = super.configureAnalysisFlags(collector) result[JvmAnalysisFlags.strictMetadataVersionSemantics] = strictMetadataVersionSemantics diff --git a/compiler/cli/cli-js/src/org/jetbrains/kotlin/cli/js/K2JsIrCompiler.kt b/compiler/cli/cli-js/src/org/jetbrains/kotlin/cli/js/K2JsIrCompiler.kt index bcd18138905..a359dc22cf1 100644 --- a/compiler/cli/cli-js/src/org/jetbrains/kotlin/cli/js/K2JsIrCompiler.kt +++ b/compiler/cli/cli-js/src/org/jetbrains/kotlin/cli/js/K2JsIrCompiler.kt @@ -192,21 +192,17 @@ class K2JsIrCompiler : CLICompiler() { require(outputFile.extension == KLIB_FILE_EXTENSION) { "Please set up .klib file as output" } } - try { - generateKLib( - project = config.project, - files = sourcesFiles, - analyzer = AnalyzerWithCompilerReport(config.configuration), - configuration = config.configuration, - allDependencies = resolvedLibraries, - friendDependencies = friendDependencies, - irFactory = PersistentIrFactory, - outputKlibPath = outputFile.path, - nopack = arguments.irProduceKlibDir - ) - } catch (e: JsIrCompilationError) { - return COMPILATION_ERROR - } + generateKLib( + project = config.project, + files = sourcesFiles, + analyzer = AnalyzerWithCompilerReport(config.configuration), + configuration = config.configuration, + allDependencies = resolvedLibraries, + friendDependencies = friendDependencies, + irFactory = PersistentIrFactory, + outputKlibPath = outputFile.path, + nopack = arguments.irProduceKlibDir + ) } if (arguments.irProduceJs) { @@ -252,26 +248,22 @@ class K2JsIrCompiler : CLICompiler() { return OK } - val compiledModule = try { - compile( - projectJs, - mainModule, - AnalyzerWithCompilerReport(config.configuration), - config.configuration, - phaseConfig, - allDependencies = resolvedLibraries, - friendDependencies = friendDependencies, - mainArguments = mainCallArguments, - generateFullJs = !arguments.irDce, - generateDceJs = arguments.irDce, - dceDriven = arguments.irDceDriven, - multiModule = arguments.irPerModule, - relativeRequirePath = true, - propertyLazyInitialization = arguments.irPropertyLazyInitialization, - ) - } catch (e: JsIrCompilationError) { - return COMPILATION_ERROR - } + val compiledModule = compile( + projectJs, + mainModule, + AnalyzerWithCompilerReport(config.configuration), + config.configuration, + phaseConfig, + allDependencies = resolvedLibraries, + friendDependencies = friendDependencies, + mainArguments = mainCallArguments, + generateFullJs = !arguments.irDce, + generateDceJs = arguments.irDce, + dceDriven = arguments.irDceDriven, + multiModule = arguments.irPerModule, + relativeRequirePath = true, + propertyLazyInitialization = arguments.irPropertyLazyInitialization, + ) val jsCode = if (arguments.irDce && !arguments.irDceDriven) compiledModule.dceJsCode!! else compiledModule.jsCode!! outputFile.writeText(jsCode.mainModule) diff --git a/compiler/cli/cli-js/src/org/jetbrains/kotlin/cli/js/dce/K2JSDce.kt b/compiler/cli/cli-js/src/org/jetbrains/kotlin/cli/js/dce/K2JSDce.kt index 109945611c3..bec311e0b37 100644 --- a/compiler/cli/cli-js/src/org/jetbrains/kotlin/cli/js/dce/K2JSDce.kt +++ b/compiler/cli/cli-js/src/org/jetbrains/kotlin/cli/js/dce/K2JSDce.kt @@ -76,17 +76,23 @@ class K2JSDce : CLITool() { messageCollector.report(severity, message) } - val dceResult = DeadCodeElimination.run(files, includedDeclarations, logConsumer) + val dceResult = DeadCodeElimination.run( + files, + includedDeclarations, + arguments.printReachabilityInfo, + logConsumer + ) if (dceResult.status == DeadCodeEliminationStatus.FAILED) return ExitCode.COMPILATION_ERROR - val nodes = dceResult.reachableNodes.filterTo(mutableSetOf()) { it.reachable } - val reachabilitySeverity = if (arguments.printReachabilityInfo) CompilerMessageSeverity.INFO else CompilerMessageSeverity.LOGGING - messageCollector.report(reachabilitySeverity, "") - for (node in nodes.extractRoots()) { - printTree( - node, { messageCollector.report(reachabilitySeverity, it) }, - printNestedMembers = false, showLocations = true - ) + if (arguments.printReachabilityInfo) { + val reachabilitySeverity = CompilerMessageSeverity.INFO + messageCollector.report(reachabilitySeverity, "") + for (node in dceResult.reachableNodes.extractReachableRoots(dceResult.context!!)) { + printTree( + node, { messageCollector.report(reachabilitySeverity, it) }, + printNestedMembers = false, showLocations = true + ) + } } return ExitCode.OK diff --git a/compiler/cli/src/org/jetbrains/kotlin/cli/common/CLICompiler.kt b/compiler/cli/src/org/jetbrains/kotlin/cli/common/CLICompiler.kt index d401016039e..4fe63b2c580 100644 --- a/compiler/cli/src/org/jetbrains/kotlin/cli/common/CLICompiler.kt +++ b/compiler/cli/src/org/jetbrains/kotlin/cli/common/CLICompiler.kt @@ -30,6 +30,7 @@ import org.jetbrains.kotlin.cli.jvm.plugins.PluginCliParser import org.jetbrains.kotlin.compiler.plugin.ComponentRegistrar import org.jetbrains.kotlin.config.CompilerConfiguration import org.jetbrains.kotlin.config.Services +import org.jetbrains.kotlin.ir.util.IrMessageLogger import org.jetbrains.kotlin.metadata.deserialization.BinaryVersion import org.jetbrains.kotlin.progress.CompilationCanceledException import org.jetbrains.kotlin.progress.CompilationCanceledStatus @@ -39,7 +40,7 @@ import org.jetbrains.kotlin.utils.KotlinPaths import org.jetbrains.kotlin.utils.PathUtil import java.io.File import java.io.PrintStream -import java.util.ArrayList +import java.util.* abstract class CLICompiler : CLITool() { @@ -69,6 +70,8 @@ abstract class CLICompiler : CLITool() { configuration.put(CLIConfigurationKeys.MESSAGE_COLLECTOR_KEY, it) } + configuration.put(IrMessageLogger.IR_MESSAGE_LOGGER, IrMessageCollector(collector)) + configuration.put(CLIConfigurationKeys.PERF_MANAGER, performanceManager) try { setupCommonArguments(configuration, arguments) diff --git a/compiler/cli/src/org/jetbrains/kotlin/cli/common/messages/IrMessageCollector.kt b/compiler/cli/src/org/jetbrains/kotlin/cli/common/messages/IrMessageCollector.kt new file mode 100644 index 00000000000..ce0d67647dc --- /dev/null +++ b/compiler/cli/src/org/jetbrains/kotlin/cli/common/messages/IrMessageCollector.kt @@ -0,0 +1,30 @@ +/* + * Copyright 2010-2021 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. + */ + +package org.jetbrains.kotlin.cli.common.messages + +import org.jetbrains.kotlin.ir.util.IrMessageLogger + +class IrMessageCollector(private val messageCollector: MessageCollector) : IrMessageLogger { + override fun report(severity: IrMessageLogger.Severity, message: String, location: IrMessageLogger.Location?) { + messageCollector.report(severityToCLISeverity(severity), message, locationToCLILocation(location)) + } + + companion object { + private fun severityToCLISeverity(severity: IrMessageLogger.Severity): CompilerMessageSeverity { + return when (severity) { + IrMessageLogger.Severity.INFO -> CompilerMessageSeverity.INFO + IrMessageLogger.Severity.WARNING -> CompilerMessageSeverity.WARNING + IrMessageLogger.Severity.ERROR -> CompilerMessageSeverity.ERROR + } + } + + private fun locationToCLILocation(location: IrMessageLogger.Location?): CompilerMessageLocation? { + return location?.run { + CompilerMessageLocation.Companion.create(filePath, line, column, null) + } + } + } +} \ No newline at end of file diff --git a/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/compiler/CliKotlinAsJavaSupport.kt b/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/compiler/CliKotlinAsJavaSupport.kt index 6faea366e24..a5799d05f0a 100644 --- a/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/compiler/CliKotlinAsJavaSupport.kt +++ b/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/compiler/CliKotlinAsJavaSupport.kt @@ -12,10 +12,7 @@ import com.intellij.psi.search.GlobalSearchScope import com.intellij.psi.search.PsiSearchScopeUtil import com.intellij.util.SmartList import org.jetbrains.kotlin.asJava.KotlinAsJavaSupport -import org.jetbrains.kotlin.asJava.classes.KtLightClass -import org.jetbrains.kotlin.asJava.classes.KtLightClassForFacade -import org.jetbrains.kotlin.asJava.classes.KtLightClassForScript -import org.jetbrains.kotlin.asJava.classes.KtLightClassForSourceDeclaration +import org.jetbrains.kotlin.asJava.classes.* import org.jetbrains.kotlin.descriptors.PackageViewDescriptor import org.jetbrains.kotlin.fileClasses.javaFileFacadeFqName import org.jetbrains.kotlin.load.java.components.FilesByFacadeFqNameIndexer @@ -81,6 +78,8 @@ class CliKotlinAsJavaSupport( }.orEmpty() } + override fun getFakeLightClass(classOrObject: KtClassOrObject): KtFakeLightClass = + KtDescriptorBasedFakeLightClass(classOrObject) override fun findClassOrObjectDeclarationsInPackage( packageFqName: FqName, searchScope: GlobalSearchScope diff --git a/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/compiler/CliLightClassGenerationSupport.kt b/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/compiler/CliLightClassGenerationSupport.kt index 6cb009f43ad..127ca48593a 100644 --- a/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/compiler/CliLightClassGenerationSupport.kt +++ b/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/compiler/CliLightClassGenerationSupport.kt @@ -23,11 +23,17 @@ import org.jetbrains.kotlin.asJava.builder.InvalidLightClassDataHolder import org.jetbrains.kotlin.asJava.builder.LightClassConstructionContext import org.jetbrains.kotlin.asJava.builder.LightClassDataHolder import org.jetbrains.kotlin.asJava.builder.LightClassDataHolderImpl -import org.jetbrains.kotlin.asJava.classes.* +import org.jetbrains.kotlin.asJava.classes.KtUltraLightSupport +import org.jetbrains.kotlin.asJava.classes.cleanFromAnonymousTypes +import org.jetbrains.kotlin.asJava.classes.lazyPub +import org.jetbrains.kotlin.asJava.classes.tryGetPredefinedName import org.jetbrains.kotlin.codegen.ClassBuilderMode import org.jetbrains.kotlin.codegen.JvmCodegenUtil import org.jetbrains.kotlin.codegen.state.KotlinTypeMapper -import org.jetbrains.kotlin.config.* +import org.jetbrains.kotlin.config.JvmAnalysisFlags +import org.jetbrains.kotlin.config.JvmTarget +import org.jetbrains.kotlin.config.LanguageFeature +import org.jetbrains.kotlin.config.LanguageVersionSettings import org.jetbrains.kotlin.descriptors.DeclarationDescriptor import org.jetbrains.kotlin.load.java.components.JavaDeprecationSettings import org.jetbrains.kotlin.name.Name @@ -57,7 +63,8 @@ class CliLightClassGenerationSupport( private class CliLightClassSupport( private val project: Project, - override val languageVersionSettings: LanguageVersionSettings + override val languageVersionSettings: LanguageVersionSettings, + private val jvmTarget: JvmTarget ) : KtUltraLightSupport { // This is the way to untie CliLightClassSupport and CliLightClassGenerationSupport to prevent descriptors leak @@ -88,7 +95,7 @@ class CliLightClassGenerationSupport( moduleName, languageVersionSettings, useOldInlineClassesManglingScheme = false, - jvmTarget = JvmTarget.JVM_1_8, + jvmTarget = jvmTarget, typePreprocessor = KotlinType::cleanFromAnonymousTypes, namePreprocessor = ::tryGetPredefinedName ) @@ -96,7 +103,7 @@ class CliLightClassGenerationSupport( } private val ultraLightSupport: KtUltraLightSupport by lazyPub { - CliLightClassSupport(project, traceHolder.languageVersionSettings) + CliLightClassSupport(project, traceHolder.languageVersionSettings, traceHolder.jvmTarget) } override fun getUltraLightClassSupport(element: KtElement): KtUltraLightSupport { @@ -129,7 +136,9 @@ class CliLightClassGenerationSupport( } private fun getContext(): LightClassConstructionContext = - LightClassConstructionContext(traceHolder.bindingContext, traceHolder.module) + LightClassConstructionContext( + traceHolder.bindingContext, traceHolder.module, null /* TODO: traceHolder.languageVersionSettings? */, traceHolder.jvmTarget + ) override fun resolveToDescriptor(declaration: KtDeclaration): DeclarationDescriptor? { return traceHolder.bindingContext.get(BindingContext.DECLARATION_TO_DESCRIPTOR, declaration) @@ -140,4 +149,4 @@ class CliLightClassGenerationSupport( override fun analyzeAnnotation(element: KtAnnotationEntry) = traceHolder.bindingContext.get(BindingContext.ANNOTATION, element) override fun analyzeWithContent(element: KtClassOrObject) = traceHolder.bindingContext -} \ No newline at end of file +} diff --git a/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/compiler/CliTrace.kt b/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/compiler/CliTrace.kt index 16a55f3edfb..790140a1943 100644 --- a/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/compiler/CliTrace.kt +++ b/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/compiler/CliTrace.kt @@ -6,6 +6,7 @@ package org.jetbrains.kotlin.cli.jvm.compiler import org.jetbrains.annotations.TestOnly +import org.jetbrains.kotlin.config.JvmTarget import org.jetbrains.kotlin.config.LanguageVersionSettings import org.jetbrains.kotlin.descriptors.ModuleDescriptor import org.jetbrains.kotlin.psi.KtDeclaration @@ -13,30 +14,32 @@ import org.jetbrains.kotlin.psi.KtPsiUtil import org.jetbrains.kotlin.resolve.BindingContext import org.jetbrains.kotlin.resolve.BindingTrace import org.jetbrains.kotlin.resolve.BindingTraceContext -import org.jetbrains.kotlin.resolve.CodeAnalyzerInitializer +import org.jetbrains.kotlin.resolve.jvm.JvmCodeAnalyzerInitializer import org.jetbrains.kotlin.resolve.lazy.KotlinCodeAnalyzer import org.jetbrains.kotlin.util.slicedMap.ReadOnlySlice import org.jetbrains.kotlin.util.slicedMap.WritableSlice -import kotlin.properties.Delegates -class CliTraceHolder : CodeAnalyzerInitializer { - var bindingContext: BindingContext by Delegates.notNull() +class CliTraceHolder : JvmCodeAnalyzerInitializer() { + lateinit var bindingContext: BindingContext private set - var module: ModuleDescriptor by Delegates.notNull() + lateinit var module: ModuleDescriptor private set - var languageVersionSettings: LanguageVersionSettings by Delegates.notNull() + lateinit var languageVersionSettings: LanguageVersionSettings + private set + lateinit var jvmTarget: JvmTarget private set - override fun initialize( trace: BindingTrace, module: ModuleDescriptor, codeAnalyzer: KotlinCodeAnalyzer, - languageVersionSettings: LanguageVersionSettings + languageVersionSettings: LanguageVersionSettings, + jvmTarget: JvmTarget ) { this.bindingContext = trace.bindingContext this.module = module this.languageVersionSettings = languageVersionSettings + this.jvmTarget = jvmTarget if (trace !is CliBindingTrace) { throw IllegalArgumentException("Shared trace is expected to be subclass of ${CliBindingTrace::class.java.simpleName} class") diff --git a/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/compiler/CompileEnvironmentUtil.java b/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/compiler/CompileEnvironmentUtil.java index ec109d3b274..d46ebc5a4db 100644 --- a/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/compiler/CompileEnvironmentUtil.java +++ b/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/compiler/CompileEnvironmentUtil.java @@ -28,6 +28,7 @@ import org.jetbrains.kotlin.cli.common.messages.MessageCollector; import org.jetbrains.kotlin.cli.common.modules.ModuleChunk; import org.jetbrains.kotlin.cli.common.modules.ModuleXmlParser; import org.jetbrains.kotlin.name.FqName; +import org.jetbrains.kotlin.serialization.deserialization.builtins.BuiltInSerializerProtocol; import org.jetbrains.kotlin.utils.ExceptionUtilsKt; import org.jetbrains.kotlin.utils.PathUtil; @@ -60,6 +61,7 @@ public class CompileEnvironmentUtil { OutputStream fos, @Nullable FqName mainClass, boolean includeRuntime, + boolean noReflect, boolean resetJarTimestamps ) { try { @@ -89,6 +91,9 @@ public class CompileEnvironmentUtil { } if (includeRuntime) { writeRuntimeToJar(stream, resetJarTimestamps); + if (!noReflect) { + writeReflectToJar(stream, resetJarTimestamps); + } } stream.finish(); } @@ -98,12 +103,12 @@ public class CompileEnvironmentUtil { } public static void writeToJar( - File jarPath, boolean jarRuntime, boolean resetJarTimestamps, FqName mainClass, OutputFileCollection outputFiles + File jarPath, boolean jarRuntime, boolean noReflect, boolean resetJarTimestamps, FqName mainClass, OutputFileCollection outputFiles ) { FileOutputStream outputStream = null; try { outputStream = new FileOutputStream(jarPath); - doWriteToJar(outputFiles, outputStream, mainClass, jarRuntime, resetJarTimestamps); + doWriteToJar(outputFiles, outputStream, mainClass, jarRuntime, noReflect, resetJarTimestamps); outputStream.close(); } catch (FileNotFoundException e) { @@ -125,13 +130,22 @@ public class CompileEnvironmentUtil { copyJarImpl(stream, stdlibPath, resetJarTimestamps); } + private static void writeReflectToJar(JarOutputStream stream, boolean resetJarTimestamps) throws IOException { + File reflectPath = PathUtil.getKotlinPathsForCompiler().getReflectPath(); + if (!reflectPath.exists()) { + throw new CompileEnvironmentException("Couldn't find kotlin-reflect at " + reflectPath); + } + copyJarImpl(stream, reflectPath, resetJarTimestamps); + } + private static void copyJarImpl(JarOutputStream stream, File jarPath, boolean resetJarTimestamps) throws IOException { try (JarInputStream jis = new JarInputStream(new FileInputStream(jarPath))) { while (true) { JarEntry e = jis.getNextJarEntry(); if (e == null) break; - if (!FileUtilRt.extensionEquals(e.getName(), "class") || + if ((!FileUtilRt.extensionEquals(e.getName(), "class") && + !FileUtilRt.extensionEquals(e.getName(), BuiltInSerializerProtocol.BUILTINS_FILE_EXTENSION)) || StringsKt.substringAfterLast(e.getName(), "/", e.getName()).equals("module-info.class")) { continue; } diff --git a/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/compiler/KotlinCoreProjectEnvironment.kt b/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/compiler/KotlinCoreProjectEnvironment.kt index cfc8bb7da3b..6de65ad13f8 100644 --- a/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/compiler/KotlinCoreProjectEnvironment.kt +++ b/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/compiler/KotlinCoreProjectEnvironment.kt @@ -19,10 +19,11 @@ package org.jetbrains.kotlin.cli.jvm.compiler import com.intellij.core.JavaCoreProjectEnvironment import com.intellij.openapi.Disposable import com.intellij.psi.PsiManager +import org.jetbrains.kotlin.resolve.jvm.KotlinCliJavaFileManager open class KotlinCoreProjectEnvironment( disposable: Disposable, applicationEnvironment: KotlinCoreApplicationEnvironment ) : JavaCoreProjectEnvironment(disposable, applicationEnvironment) { - override fun createCoreFileManager() = KotlinCliJavaFileManagerImpl(PsiManager.getInstance(project)) + override fun createCoreFileManager(): KotlinCliJavaFileManager = KotlinCliJavaFileManagerImpl(PsiManager.getInstance(project)) } diff --git a/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/compiler/KotlinToJVMBytecodeCompiler.kt b/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/compiler/KotlinToJVMBytecodeCompiler.kt index 625581cdb7a..867ab0a1bb9 100644 --- a/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/compiler/KotlinToJVMBytecodeCompiler.kt +++ b/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/compiler/KotlinToJVMBytecodeCompiler.kt @@ -86,8 +86,9 @@ object KotlinToJVMBytecodeCompiler { val messageCollector = configuration.get(CLIConfigurationKeys.MESSAGE_COLLECTOR_KEY, MessageCollector.NONE) if (jarPath != null) { val includeRuntime = configuration.get(JVMConfigurationKeys.INCLUDE_RUNTIME, false) + val noReflect = configuration.get(JVMConfigurationKeys.NO_REFLECT, false) val resetJarTimestamps = !configuration.get(JVMConfigurationKeys.NO_RESET_JAR_TIMESTAMPS, false) - CompileEnvironmentUtil.writeToJar(jarPath, includeRuntime, resetJarTimestamps, mainClassFqName, outputFiles) + CompileEnvironmentUtil.writeToJar(jarPath, includeRuntime, noReflect, resetJarTimestamps, mainClassFqName, outputFiles) if (reportOutputFiles) { val message = OutputMessageUtil.formatOutputMessage(outputFiles.asList().flatMap { it.sourceFiles }.distinct(), jarPath) messageCollector.report(OUTPUT, message) diff --git a/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/jvmArguments.kt b/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/jvmArguments.kt index 3cbe6cc8780..84ab300d7db 100644 --- a/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/jvmArguments.kt +++ b/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/jvmArguments.kt @@ -21,6 +21,7 @@ import java.io.File fun CompilerConfiguration.setupJvmSpecificArguments(arguments: K2JVMCompilerArguments) { put(JVMConfigurationKeys.INCLUDE_RUNTIME, arguments.includeRuntime) + put(JVMConfigurationKeys.NO_REFLECT, arguments.noReflect) putIfNotNull(JVMConfigurationKeys.FRIEND_PATHS, arguments.friendPaths?.asList()) @@ -28,6 +29,12 @@ fun CompilerConfiguration.setupJvmSpecificArguments(arguments: K2JVMCompilerArgu val jvmTarget = JvmTarget.fromString(arguments.jvmTarget!!) if (jvmTarget != null) { put(JVMConfigurationKeys.JVM_TARGET, jvmTarget) + if (jvmTarget == JvmTarget.JVM_1_6 && !arguments.suppressDeprecatedJvmTargetWarning) { + messageCollector.report( + STRONG_WARNING, + "JVM target 1.6 is deprecated and will be removed in a future release. Please migrate to JVM target 1.8 or above" + ) + } } else { messageCollector.report( ERROR, "Unknown JVM target version: ${arguments.jvmTarget}\n" + @@ -65,27 +72,37 @@ fun CompilerConfiguration.setupJvmSpecificArguments(arguments: K2JVMCompilerArgu } } - if (arguments.samConversions != null) { - val samConversions = JvmSamConversions.fromString(arguments.samConversions) - if (samConversions != null) { - put(JVMConfigurationKeys.SAM_CONVERSIONS, samConversions) - if (jvmTarget < samConversions.minJvmTarget) { + handleClosureGenerationSchemeArgument("-Xsam-conversions", arguments.samConversions, JVMConfigurationKeys.SAM_CONVERSIONS, jvmTarget) + handleClosureGenerationSchemeArgument("-Xlambdas", arguments.lambdas, JVMConfigurationKeys.LAMBDAS, jvmTarget) + + addAll(JVMConfigurationKeys.ADDITIONAL_JAVA_MODULES, arguments.additionalJavaModules?.asList()) +} + +private fun CompilerConfiguration.handleClosureGenerationSchemeArgument( + flag: String, + value: String?, + key: CompilerConfigurationKey, + jvmTarget: JvmTarget +) { + if (value != null) { + val parsedValue = JvmClosureGenerationScheme.fromString(value) + if (parsedValue != null) { + put(key, parsedValue) + if (jvmTarget < parsedValue.minJvmTarget) { messageCollector.report( WARNING, - "`-Xsam-conversions=${arguments.samConversions}` requires JVM target at least " + - "${samConversions.minJvmTarget.description} and is ignored." + "`$flag=$value` requires JVM target at least " + + "${parsedValue.minJvmTarget.description} and is ignored." ) } } else { messageCollector.report( ERROR, - "Unknown `-Xsam-conversions` argument: ${arguments.samConversions}\n" + - "Supported arguments: ${JvmSamConversions.values().joinToString { it.description }}" + "Unknown `$flag` argument: ${value}\n." + + "Supported arguments: ${JvmClosureGenerationScheme.values().joinToString { it.description }}" ) } } - - addAll(JVMConfigurationKeys.ADDITIONAL_JAVA_MODULES, arguments.additionalJavaModules?.asList()) } fun CompilerConfiguration.configureJdkHome(arguments: K2JVMCompilerArguments): Boolean { diff --git a/compiler/config.jvm/src/org/jetbrains/kotlin/config/JVMConfigurationKeys.java b/compiler/config.jvm/src/org/jetbrains/kotlin/config/JVMConfigurationKeys.java index b1c11d8f696..ed8f37de4af 100644 --- a/compiler/config.jvm/src/org/jetbrains/kotlin/config/JVMConfigurationKeys.java +++ b/compiler/config.jvm/src/org/jetbrains/kotlin/config/JVMConfigurationKeys.java @@ -114,9 +114,12 @@ public class JVMConfigurationKeys { public static final CompilerConfigurationKey STRING_CONCAT = CompilerConfigurationKey.create("Specifies string concatenation scheme"); - public static final CompilerConfigurationKey SAM_CONVERSIONS = + public static final CompilerConfigurationKey SAM_CONVERSIONS = CompilerConfigurationKey.create("SAM conversions code generation scheme"); + public static final CompilerConfigurationKey LAMBDAS = + CompilerConfigurationKey.create("Lambdas code generation scheme"); + public static final CompilerConfigurationKey> KLIB_PATHS = CompilerConfigurationKey.create("Paths to .klib libraries"); @@ -146,4 +149,7 @@ public class JVMConfigurationKeys { public static final CompilerConfigurationKey ENABLE_JVM_PREVIEW = CompilerConfigurationKey.create("Enable Java language preview features"); + + public static final CompilerConfigurationKey NO_REFLECT = + CompilerConfigurationKey.create("Don't automatically include kotlin-reflect.jar into the output if the output is a jar"); } diff --git a/compiler/config.jvm/src/org/jetbrains/kotlin/config/JvmSamConversions.kt b/compiler/config.jvm/src/org/jetbrains/kotlin/config/JvmClosureGenerationScheme.kt similarity index 93% rename from compiler/config.jvm/src/org/jetbrains/kotlin/config/JvmSamConversions.kt rename to compiler/config.jvm/src/org/jetbrains/kotlin/config/JvmClosureGenerationScheme.kt index 3ed25ea0b7f..70d950979a5 100644 --- a/compiler/config.jvm/src/org/jetbrains/kotlin/config/JvmSamConversions.kt +++ b/compiler/config.jvm/src/org/jetbrains/kotlin/config/JvmClosureGenerationScheme.kt @@ -5,7 +5,7 @@ package org.jetbrains.kotlin.config -enum class JvmSamConversions( +enum class JvmClosureGenerationScheme( val description: String, val minJvmTarget: JvmTarget ) { diff --git a/compiler/config.jvm/src/org/jetbrains/kotlin/config/JvmTarget.kt b/compiler/config.jvm/src/org/jetbrains/kotlin/config/JvmTarget.kt index 69ebe32e62b..df3a0df53f1 100644 --- a/compiler/config.jvm/src/org/jetbrains/kotlin/config/JvmTarget.kt +++ b/compiler/config.jvm/src/org/jetbrains/kotlin/config/JvmTarget.kt @@ -36,7 +36,7 @@ enum class JvmTarget( companion object { @JvmField - val DEFAULT = JVM_1_6 + val DEFAULT = JVM_1_8 @JvmStatic fun fromString(string: String) = values().find { it.description == string } diff --git a/compiler/fir/analysis-tests/build.gradle.kts b/compiler/fir/analysis-tests/build.gradle.kts index ce6a74b6be5..f9424147c9f 100644 --- a/compiler/fir/analysis-tests/build.gradle.kts +++ b/compiler/fir/analysis-tests/build.gradle.kts @@ -24,10 +24,7 @@ dependencies { testApi(project(":compiler:fir:entrypoint")) testApi(project(":compiler:frontend")) - testApi(platform("org.junit:junit-bom:5.7.0")) - testApi("org.junit.jupiter:junit-jupiter") - testApi("org.junit.platform:junit-platform-commons:1.7.0") - testApi("org.junit.platform:junit-platform-launcher:1.7.0") + testApiJUnit5() testCompileOnly(project(":kotlin-reflect-api")) testRuntimeOnly(project(":kotlin-reflect")) @@ -35,14 +32,6 @@ dependencies { testRuntimeOnly(project(":compiler:fir:fir2ir:jvm-backend")) testImplementation(intellijCoreDep()) { includeJars("intellij-core") } - testImplementation(intellijDep()) { - // This dependency is needed only for FileComparisonFailure - includeJars("idea_rt", rootProject = rootProject) - isTransitive = false - } - - // This is needed only for using FileComparisonFailure, which relies on JUnit 3 classes - testRuntimeOnly(commonDep("junit:junit")) testRuntimeOnly(intellijDep()) { includeJars( "jps-model", diff --git a/compiler/fir/analysis-tests/legacy-fir-tests/tests-gen/org/jetbrains/kotlin/fir/LazyBodyIsNotTouchedTilContractsPhaseTestGenerated.java b/compiler/fir/analysis-tests/legacy-fir-tests/tests-gen/org/jetbrains/kotlin/fir/LazyBodyIsNotTouchedTilContractsPhaseTestGenerated.java index 18e275d1142..698661d6ac2 100644 --- a/compiler/fir/analysis-tests/legacy-fir-tests/tests-gen/org/jetbrains/kotlin/fir/LazyBodyIsNotTouchedTilContractsPhaseTestGenerated.java +++ b/compiler/fir/analysis-tests/legacy-fir-tests/tests-gen/org/jetbrains/kotlin/fir/LazyBodyIsNotTouchedTilContractsPhaseTestGenerated.java @@ -54,6 +54,11 @@ public class LazyBodyIsNotTouchedTilContractsPhaseTestGenerated extends Abstract runTest("compiler/fir/analysis-tests/testData/resolve/cast.kt"); } + @TestMetadata("catchParameter.kt") + public void testCatchParameter() throws Exception { + runTest("compiler/fir/analysis-tests/testData/resolve/catchParameter.kt"); + } + @TestMetadata("companion.kt") public void testCompanion() throws Exception { runTest("compiler/fir/analysis-tests/testData/resolve/companion.kt"); @@ -414,6 +419,11 @@ public class LazyBodyIsNotTouchedTilContractsPhaseTestGenerated extends Abstract runTest("compiler/fir/analysis-tests/testData/resolve/syntheticsVsNormalProperties.kt"); } + @TestMetadata("throwableSubclass.kt") + public void testThrowableSubclass() throws Exception { + runTest("compiler/fir/analysis-tests/testData/resolve/throwableSubclass.kt"); + } + @TestMetadata("treeSet.kt") public void testTreeSet() throws Exception { runTest("compiler/fir/analysis-tests/testData/resolve/treeSet.kt"); @@ -3098,6 +3108,39 @@ public class LazyBodyIsNotTouchedTilContractsPhaseTestGenerated extends Abstract } } + @TestMetadata("compiler/fir/analysis-tests/testData/resolve/suppress") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Suppress extends AbstractLazyBodyIsNotTouchedTilContractsPhaseTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + public void testAllFilesPresentInSuppress() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolve/suppress"), Pattern.compile("^([^.]+)\\.kt$"), null, true); + } + + @TestMetadata("allWarnings.kt") + public void testAllWarnings() throws Exception { + runTest("compiler/fir/analysis-tests/testData/resolve/suppress/allWarnings.kt"); + } + + @TestMetadata("multipleWarnings.kt") + public void testMultipleWarnings() throws Exception { + runTest("compiler/fir/analysis-tests/testData/resolve/suppress/multipleWarnings.kt"); + } + + @TestMetadata("singleError.kt") + public void testSingleError() throws Exception { + runTest("compiler/fir/analysis-tests/testData/resolve/suppress/singleError.kt"); + } + + @TestMetadata("singleWarning.kt") + public void testSingleWarning() throws Exception { + runTest("compiler/fir/analysis-tests/testData/resolve/suppress/singleWarning.kt"); + } + } + @TestMetadata("compiler/fir/analysis-tests/testData/resolve/types") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) diff --git a/compiler/fir/analysis-tests/testData/resolve/catchParameter.fir.txt b/compiler/fir/analysis-tests/testData/resolve/catchParameter.fir.txt new file mode 100644 index 00000000000..5041043b1c8 --- /dev/null +++ b/compiler/fir/analysis-tests/testData/resolve/catchParameter.fir.txt @@ -0,0 +1,41 @@ +FILE: catchParameter.kt + public final typealias StringType = R|kotlin/String| + public final fun test(): R|kotlin/Unit| { + try { + } + catch (e: R|kotlin/NullPointerException| = R|java/lang/NullPointerException.NullPointerException|()) { + } + + try { + } + catch (e: R|T|) { + } + + try { + } + catch (e: R|() -> kotlin/Int|) { + } + + try { + } + catch (e: R|StringType|) { + } + + try { + } + catch (e: R|kotlin/Int| = Int(5)) { + } + + try { + } + catch (e: R|kotlin/Throwable|) { + } + + } + public final inline fun anotherTest(): R|kotlin/Unit| { + try { + } + catch (e: R|T|) { + } + + } diff --git a/compiler/fir/analysis-tests/testData/resolve/catchParameter.kt b/compiler/fir/analysis-tests/testData/resolve/catchParameter.kt new file mode 100644 index 00000000000..e1a5d34d99e --- /dev/null +++ b/compiler/fir/analysis-tests/testData/resolve/catchParameter.kt @@ -0,0 +1,23 @@ +typealias StringType = String + +fun test() { + try { + + } catch (e: NullPointerException = NullPointerException()) { + + } + + try {} catch (e: T) {} + + try {} catch (e: () -> Int) {} + + try {} catch (e: StringType) {} + + try {} catch (e: Int = 5) {} + + try {} catch (e: Throwable) {} +} + +inline fun anotherTest() { + try {} catch (e: T) {} +} diff --git a/compiler/fir/analysis-tests/testData/resolve/diagnostics/conflictingProjection.kt b/compiler/fir/analysis-tests/testData/resolve/diagnostics/conflictingProjection.kt index 2e46ea04ee0..dc0dda94171 100644 --- a/compiler/fir/analysis-tests/testData/resolve/diagnostics/conflictingProjection.kt +++ b/compiler/fir/analysis-tests/testData/resolve/diagnostics/conflictingProjection.kt @@ -18,37 +18,37 @@ typealias A1 = None typealias A2 = None typealias A3 = None -typealias A4<in K> = None -typealias A5<in K> = None -typealias A6<in K> = None +typealias A4<in K> = None +typealias A5<in K> = None +typealias A6<in K> = None -typealias A7<out K> = None -typealias A8<out K> = None -typealias A9<out K> = None +typealias A7<out K> = None +typealias A8<out K> = None +typealias A9<out K> = None typealias A10 = In typealias A11 = In typealias A12 = In -typealias A13<in K> = In -typealias A14<in K> = In -typealias A15<in K> = In +typealias A13<in K> = In +typealias A14<in K> = In +typealias A15<in K> = In -typealias A16<out K> = In -typealias A17<out K> = In -typealias A18<out K> = In +typealias A16<out K> = In +typealias A17<out K> = In +typealias A18<out K> = In typealias A19 = Out typealias A20 = Out typealias A21 = Out -typealias A22<in K> = Out -typealias A23<in K> = Out -typealias A24<in K> = Out +typealias A22<in K> = Out +typealias A23<in K> = Out +typealias A24<in K> = Out -typealias A25<out K> = Out -typealias A26<out K> = Out -typealias A27<out K> = Out +typealias A25<out K> = Out +typealias A26<out K> = Out +typealias A27<out K> = Out class Outer { inner class Intermediate { diff --git a/compiler/fir/analysis-tests/testData/resolve/suppress/allWarnings.fir.txt b/compiler/fir/analysis-tests/testData/resolve/suppress/allWarnings.fir.txt new file mode 100644 index 00000000000..6c20e88a786 --- /dev/null +++ b/compiler/fir/analysis-tests/testData/resolve/suppress/allWarnings.fir.txt @@ -0,0 +1,10 @@ +FILE: allWarnings.kt + @R|kotlin/Suppress|(vararg(String(warnings))) public final class A : R|kotlin/Any| { + public constructor(): R|A| { + super() + } + + public final fun foo(): R|kotlin/Unit| { + } + + } diff --git a/compiler/fir/analysis-tests/testData/resolve/suppress/allWarnings.kt b/compiler/fir/analysis-tests/testData/resolve/suppress/allWarnings.kt new file mode 100644 index 00000000000..b3390930d71 --- /dev/null +++ b/compiler/fir/analysis-tests/testData/resolve/suppress/allWarnings.kt @@ -0,0 +1,6 @@ +// WITH_EXTENDED_CHECKERS + +@Suppress("warnings") +public class A { + final fun foo() {} +} diff --git a/compiler/fir/analysis-tests/testData/resolve/suppress/multipleWarnings.fir.txt b/compiler/fir/analysis-tests/testData/resolve/suppress/multipleWarnings.fir.txt new file mode 100644 index 00000000000..b34ddd212ea --- /dev/null +++ b/compiler/fir/analysis-tests/testData/resolve/suppress/multipleWarnings.fir.txt @@ -0,0 +1,10 @@ +FILE: multipleWarnings.kt + @R|kotlin/Suppress|(vararg(String(REDUNDANT_VISIBILITY_MODIFIER))) public final class A : R|kotlin/Any| { + public constructor(): R|A| { + super() + } + + @R|kotlin/Suppress|(vararg(String(REDUNDANT_MODALITY_MODIFIER))) public final fun foo(): R|kotlin/Unit| { + } + + } diff --git a/compiler/fir/analysis-tests/testData/resolve/suppress/multipleWarnings.kt b/compiler/fir/analysis-tests/testData/resolve/suppress/multipleWarnings.kt new file mode 100644 index 00000000000..ecc7612bc2b --- /dev/null +++ b/compiler/fir/analysis-tests/testData/resolve/suppress/multipleWarnings.kt @@ -0,0 +1,7 @@ +// WITH_EXTENDED_CHECKERS + +@Suppress("REDUNDANT_VISIBILITY_MODIFIER") +public class A { + @Suppress("REDUNDANT_MODALITY_MODIFIER") + public final fun foo() {} +} diff --git a/compiler/fir/analysis-tests/testData/resolve/suppress/singleError.fir.txt b/compiler/fir/analysis-tests/testData/resolve/suppress/singleError.fir.txt new file mode 100644 index 00000000000..1baaf30ee06 --- /dev/null +++ b/compiler/fir/analysis-tests/testData/resolve/suppress/singleError.fir.txt @@ -0,0 +1,6 @@ +FILE: singleError.kt + public final fun foo(x: R|kotlin/String|): R|kotlin/Unit| { + } + @R|kotlin/Suppress|(vararg(String(INAPPLICABLE_CANDIDATE))) public final fun bar(): R|kotlin/Unit| { + #(Int(10)) + } diff --git a/compiler/fir/analysis-tests/testData/resolve/suppress/singleError.kt b/compiler/fir/analysis-tests/testData/resolve/suppress/singleError.kt new file mode 100644 index 00000000000..d80a4283953 --- /dev/null +++ b/compiler/fir/analysis-tests/testData/resolve/suppress/singleError.kt @@ -0,0 +1,6 @@ +fun foo(x: String) {} + +@Suppress("INAPPLICABLE_CANDIDATE") +fun bar() { + foo(10) +} diff --git a/compiler/fir/analysis-tests/testData/resolve/suppress/singleWarning.fir.txt b/compiler/fir/analysis-tests/testData/resolve/suppress/singleWarning.fir.txt new file mode 100644 index 00000000000..60a8e07837b --- /dev/null +++ b/compiler/fir/analysis-tests/testData/resolve/suppress/singleWarning.fir.txt @@ -0,0 +1,3 @@ +FILE: singleWarning.kt + @R|kotlin/Suppress|(vararg(String(REDUNDANT_VISIBILITY_MODIFIER))) public final fun foo(): R|kotlin/Unit| { + } diff --git a/compiler/fir/analysis-tests/testData/resolve/suppress/singleWarning.kt b/compiler/fir/analysis-tests/testData/resolve/suppress/singleWarning.kt new file mode 100644 index 00000000000..259808b63ca --- /dev/null +++ b/compiler/fir/analysis-tests/testData/resolve/suppress/singleWarning.kt @@ -0,0 +1,4 @@ +// WITH_EXTENDED_CHECKERS + +@Suppress("REDUNDANT_VISIBILITY_MODIFIER") +public fun foo() {} diff --git a/compiler/fir/analysis-tests/testData/resolve/throwableSubclass.fir.txt b/compiler/fir/analysis-tests/testData/resolve/throwableSubclass.fir.txt new file mode 100644 index 00000000000..d5df7c45fa8 --- /dev/null +++ b/compiler/fir/analysis-tests/testData/resolve/throwableSubclass.fir.txt @@ -0,0 +1,67 @@ +FILE: throwableSubclass.kt + public final class Test1 : R|kotlin/Exception| { + public constructor(): R|Test1| { + super() + } + + public final inner class Test2 : R|kotlin/Throwable| { + public constructor(): R|Test1.Test2| { + super() + } + + } + + public final class Test3 : R|kotlin/NullPointerException| { + public constructor(): R|Test1.Test3| { + super() + } + + } + + public final object Test4 : R|kotlin/Throwable| { + private constructor(): R|Test1.Test4| { + super() + } + + } + + } + public final class Test5 : R|kotlin/Any| { + public constructor(): R|Test5| { + super() + } + + public final inner class Test6 : R|kotlin/Exception| { + public constructor(): R|Test5.Test6| { + super() + } + + } + + public final fun foo(): R|kotlin/Unit| { + local final class Test7 : R|kotlin/Throwable| { + public constructor(): R|Test5.Test7| { + super() + } + + } + + } + + } + public final fun topLevelFun(): R|kotlin/Unit| { + local final class Test8 : R|kotlin/Error| { + public constructor(): R|Test8| { + super() + } + + } + + lval obj: R|| = object : R|kotlin/Throwable| { + private constructor(): R|| { + super() + } + + } + + } diff --git a/compiler/fir/analysis-tests/testData/resolve/throwableSubclass.kt b/compiler/fir/analysis-tests/testData/resolve/throwableSubclass.kt new file mode 100644 index 00000000000..374ffdbdf0d --- /dev/null +++ b/compiler/fir/analysis-tests/testData/resolve/throwableSubclass.kt @@ -0,0 +1,18 @@ +class Test1<T, B> : Exception() { + inner class Test2<S> : Throwable() + class Test3 : NullPointerException() + object Test4 : Throwable() {} +} + +class Test5 { + inner class Test6 : Exception() + + fun foo() { + class Test7 : Throwable() + } +} + +fun topLevelFun() { + class Test8 : Error() + val obj = object : Throwable() {} +} diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/problems/valueOfOrNull.fir.txt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/problems/valueOfOrNull.fir.txt new file mode 100644 index 00000000000..6c789a911cb --- /dev/null +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/problems/valueOfOrNull.fir.txt @@ -0,0 +1,59 @@ +FILE: valueOfOrNull.kt + public final enum class SomeEnum : R|kotlin/Enum| { + private constructor(): R|SomeEnum| { + super|>() + } + + public final static enum entry ENTRY: R|SomeEnum| + public final static fun values(): R|kotlin/Array| { + } + + public final static fun valueOf(value: R|kotlin/String|): R|SomeEnum| { + } + + } + public final fun foo(s: R|kotlin/String?|): R|kotlin/Unit| { + lval result: R|SomeEnum| = R|/s|?.{ $subj$.R|kotlin/let|( = let@fun (it: R|kotlin/String|): R|SomeEnum?| { + ^ R|/valueOfOrNull|(R|/it|) + } + ) } ?: Q|SomeEnum|.R|/SomeEnum.ENTRY| + lval result2: R|SomeEnum| = R|/s|?.{ $subj$.R|kotlin/let|( = let@fun (it: R|kotlin/String|): R|SomeEnum?| { + ^ R|/valueOfOrNull|(R|/it|) + } + ) } ?: Q|SomeEnum|.R|/SomeEnum.ENTRY| + lval result3: R|SomeEnum?| = when () { + ==(R|/s|, Null(null)) -> { + Q|SomeEnum|.R|/SomeEnum.ENTRY| + } + else -> { + R|/valueOfOrNull|(R|/s|) + } + } + + lval result4: R|SomeEnum?| = when () { + ==(R|/s|, Null(null)) -> { + Q|SomeEnum|.R|/SomeEnum.ENTRY| + } + else -> { + R|/s|.R|kotlin/let|( = let@fun (it: R|kotlin/String|): R|SomeEnum?| { + ^ R|/valueOfOrNull|(R|/it|) + } + ) + } + } + + } + public final inline fun |> valueOfOrNull(value: R|kotlin/String|): R|E?| { + lval : R|kotlin/collections/Iterator| = R|kotlin/enumValues|().R|SubstitutionOverride|>|() + while(R|/|.R|kotlin/collections/Iterator.hasNext|()) { + lval enumValue: R|E| = R|/|.R|SubstitutionOverride|() + when () { + ==(R|/enumValue|.R|kotlin/Enum.name|, R|/value|) -> { + ^valueOfOrNull R|/enumValue| + } + } + + } + + ^valueOfOrNull Null(null) + } diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/problems/valueOfOrNull.kt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/problems/valueOfOrNull.kt new file mode 100644 index 00000000000..68eca9feabe --- /dev/null +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/problems/valueOfOrNull.kt @@ -0,0 +1,19 @@ +enum class SomeEnum { + ENTRY; +} + +fun foo(s: String?) { + val result = s?.let { valueOfOrNull(it) } ?: SomeEnum.ENTRY + val result2 = s?.let { valueOfOrNull(it) } ?: SomeEnum.ENTRY + val result3 = if (s == null) SomeEnum.ENTRY else valueOfOrNull(s) + val result4 = if (s == null) SomeEnum.ENTRY else s.let { valueOfOrNull(it) } +} + +inline fun > valueOfOrNull(value: String): E? { + for (enumValue in enumValues()) { + if (enumValue.name == value) { + return enumValue + } + } + return null +} diff --git a/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirDiagnosticTestGenerated.java b/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirDiagnosticTestGenerated.java index 0a8480423e5..92d29a5322b 100644 --- a/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirDiagnosticTestGenerated.java +++ b/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirDiagnosticTestGenerated.java @@ -20,7 +20,7 @@ public class FirDiagnosticTestGenerated extends AbstractFirDiagnosticTest { @Nested @TestMetadata("compiler/fir/analysis-tests/testData/resolve") @TestDataPath("$PROJECT_ROOT") - public class Resolve extends AbstractFirDiagnosticTest { + public class Resolve { @Test public void testAllFilesPresentInResolve() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolve"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -56,6 +56,12 @@ public class FirDiagnosticTestGenerated extends AbstractFirDiagnosticTest { runTest("compiler/fir/analysis-tests/testData/resolve/cast.kt"); } + @Test + @TestMetadata("catchParameter.kt") + public void testCatchParameter() throws Exception { + runTest("compiler/fir/analysis-tests/testData/resolve/catchParameter.kt"); + } + @Test @TestMetadata("companion.kt") public void testCompanion() throws Exception { @@ -488,6 +494,12 @@ public class FirDiagnosticTestGenerated extends AbstractFirDiagnosticTest { runTest("compiler/fir/analysis-tests/testData/resolve/syntheticsVsNormalProperties.kt"); } + @Test + @TestMetadata("throwableSubclass.kt") + public void testThrowableSubclass() throws Exception { + runTest("compiler/fir/analysis-tests/testData/resolve/throwableSubclass.kt"); + } + @Test @TestMetadata("treeSet.kt") public void testTreeSet() throws Exception { @@ -575,7 +587,7 @@ public class FirDiagnosticTestGenerated extends AbstractFirDiagnosticTest { @Nested @TestMetadata("compiler/fir/analysis-tests/testData/resolve/arguments") @TestDataPath("$PROJECT_ROOT") - public class Arguments extends AbstractFirDiagnosticTest { + public class Arguments { @Test public void testAllFilesPresentInArguments() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolve/arguments"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -759,7 +771,7 @@ public class FirDiagnosticTestGenerated extends AbstractFirDiagnosticTest { @Nested @TestMetadata("compiler/fir/analysis-tests/testData/resolve/arrays") @TestDataPath("$PROJECT_ROOT") - public class Arrays extends AbstractFirDiagnosticTest { + public class Arrays { @Test public void testAllFilesPresentInArrays() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolve/arrays"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -781,7 +793,7 @@ public class FirDiagnosticTestGenerated extends AbstractFirDiagnosticTest { @Nested @TestMetadata("compiler/fir/analysis-tests/testData/resolve/builtins") @TestDataPath("$PROJECT_ROOT") - public class Builtins extends AbstractFirDiagnosticTest { + public class Builtins { @Test public void testAllFilesPresentInBuiltins() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolve/builtins"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -797,7 +809,7 @@ public class FirDiagnosticTestGenerated extends AbstractFirDiagnosticTest { @Nested @TestMetadata("compiler/fir/analysis-tests/testData/resolve/callResolution") @TestDataPath("$PROJECT_ROOT") - public class CallResolution extends AbstractFirDiagnosticTest { + public class CallResolution { @Test public void testAllFilesPresentInCallResolution() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolve/callResolution"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -897,7 +909,7 @@ public class FirDiagnosticTestGenerated extends AbstractFirDiagnosticTest { @Nested @TestMetadata("compiler/fir/analysis-tests/testData/resolve/cfg") @TestDataPath("$PROJECT_ROOT") - public class Cfg extends AbstractFirDiagnosticTest { + public class Cfg { @Test public void testAllFilesPresentInCfg() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolve/cfg"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -1057,7 +1069,7 @@ public class FirDiagnosticTestGenerated extends AbstractFirDiagnosticTest { @Nested @TestMetadata("compiler/fir/analysis-tests/testData/resolve/constructors") @TestDataPath("$PROJECT_ROOT") - public class Constructors extends AbstractFirDiagnosticTest { + public class Constructors { @Test public void testAllFilesPresentInConstructors() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolve/constructors"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -1073,7 +1085,7 @@ public class FirDiagnosticTestGenerated extends AbstractFirDiagnosticTest { @Nested @TestMetadata("compiler/fir/analysis-tests/testData/resolve/delegates") @TestDataPath("$PROJECT_ROOT") - public class Delegates extends AbstractFirDiagnosticTest { + public class Delegates { @Test public void testAllFilesPresentInDelegates() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolve/delegates"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -1119,7 +1131,7 @@ public class FirDiagnosticTestGenerated extends AbstractFirDiagnosticTest { @Nested @TestMetadata("compiler/fir/analysis-tests/testData/resolve/diagnostics") @TestDataPath("$PROJECT_ROOT") - public class Diagnostics extends AbstractFirDiagnosticTest { + public class Diagnostics { @Test @TestMetadata("abstractSuperCall.kt") public void testAbstractSuperCall() throws Exception { @@ -1428,7 +1440,7 @@ public class FirDiagnosticTestGenerated extends AbstractFirDiagnosticTest { @Nested @TestMetadata("compiler/fir/analysis-tests/testData/resolve/diagnostics/functionAsExpression") @TestDataPath("$PROJECT_ROOT") - public class FunctionAsExpression extends AbstractFirDiagnosticTest { + public class FunctionAsExpression { @Test public void testAllFilesPresentInFunctionAsExpression() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolve/diagnostics/functionAsExpression"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -1445,7 +1457,7 @@ public class FirDiagnosticTestGenerated extends AbstractFirDiagnosticTest { @Nested @TestMetadata("compiler/fir/analysis-tests/testData/resolve/expresssions") @TestDataPath("$PROJECT_ROOT") - public class Expresssions extends AbstractFirDiagnosticTest { + public class Expresssions { @Test @TestMetadata("access.kt") public void testAccess() throws Exception { @@ -1820,7 +1832,7 @@ public class FirDiagnosticTestGenerated extends AbstractFirDiagnosticTest { @Nested @TestMetadata("compiler/fir/analysis-tests/testData/resolve/expresssions/inference") @TestDataPath("$PROJECT_ROOT") - public class Inference extends AbstractFirDiagnosticTest { + public class Inference { @Test public void testAllFilesPresentInInference() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolve/expresssions/inference"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -1848,7 +1860,7 @@ public class FirDiagnosticTestGenerated extends AbstractFirDiagnosticTest { @Nested @TestMetadata("compiler/fir/analysis-tests/testData/resolve/expresssions/invoke") @TestDataPath("$PROJECT_ROOT") - public class Invoke extends AbstractFirDiagnosticTest { + public class Invoke { @Test public void testAllFilesPresentInInvoke() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolve/expresssions/invoke"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -1948,7 +1960,7 @@ public class FirDiagnosticTestGenerated extends AbstractFirDiagnosticTest { @Nested @TestMetadata("compiler/fir/analysis-tests/testData/resolve/expresssions/operators") @TestDataPath("$PROJECT_ROOT") - public class Operators extends AbstractFirDiagnosticTest { + public class Operators { @Test public void testAllFilesPresentInOperators() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolve/expresssions/operators"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -1977,7 +1989,7 @@ public class FirDiagnosticTestGenerated extends AbstractFirDiagnosticTest { @Nested @TestMetadata("compiler/fir/analysis-tests/testData/resolve/extendedCheckers") @TestDataPath("$PROJECT_ROOT") - public class ExtendedCheckers extends AbstractFirDiagnosticTest { + public class ExtendedCheckers { @Test public void testAllFilesPresentInExtendedCheckers() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolve/extendedCheckers"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -2034,7 +2046,7 @@ public class FirDiagnosticTestGenerated extends AbstractFirDiagnosticTest { @Nested @TestMetadata("compiler/fir/analysis-tests/testData/resolve/extendedCheckers/canBeReplacedWithOperatorAssignment") @TestDataPath("$PROJECT_ROOT") - public class CanBeReplacedWithOperatorAssignment extends AbstractFirDiagnosticTest { + public class CanBeReplacedWithOperatorAssignment { @Test public void testAllFilesPresentInCanBeReplacedWithOperatorAssignment() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolve/extendedCheckers/canBeReplacedWithOperatorAssignment"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -2158,7 +2170,7 @@ public class FirDiagnosticTestGenerated extends AbstractFirDiagnosticTest { @Nested @TestMetadata("compiler/fir/analysis-tests/testData/resolve/extendedCheckers/emptyRangeChecker") @TestDataPath("$PROJECT_ROOT") - public class EmptyRangeChecker extends AbstractFirDiagnosticTest { + public class EmptyRangeChecker { @Test public void testAllFilesPresentInEmptyRangeChecker() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolve/extendedCheckers/emptyRangeChecker"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -2180,7 +2192,7 @@ public class FirDiagnosticTestGenerated extends AbstractFirDiagnosticTest { @Nested @TestMetadata("compiler/fir/analysis-tests/testData/resolve/extendedCheckers/RedundantCallOfConversionMethod") @TestDataPath("$PROJECT_ROOT") - public class RedundantCallOfConversionMethod extends AbstractFirDiagnosticTest { + public class RedundantCallOfConversionMethod { @Test public void testAllFilesPresentInRedundantCallOfConversionMethod() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolve/extendedCheckers/RedundantCallOfConversionMethod"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -2310,7 +2322,7 @@ public class FirDiagnosticTestGenerated extends AbstractFirDiagnosticTest { @Nested @TestMetadata("compiler/fir/analysis-tests/testData/resolve/extendedCheckers/unused") @TestDataPath("$PROJECT_ROOT") - public class Unused extends AbstractFirDiagnosticTest { + public class Unused { @Test public void testAllFilesPresentInUnused() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolve/extendedCheckers/unused"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -2362,7 +2374,7 @@ public class FirDiagnosticTestGenerated extends AbstractFirDiagnosticTest { @Nested @TestMetadata("compiler/fir/analysis-tests/testData/resolve/extendedCheckers/UselessCallOnNotNullChecker") @TestDataPath("$PROJECT_ROOT") - public class UselessCallOnNotNullChecker extends AbstractFirDiagnosticTest { + public class UselessCallOnNotNullChecker { @Test public void testAllFilesPresentInUselessCallOnNotNullChecker() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolve/extendedCheckers/UselessCallOnNotNullChecker"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -2439,7 +2451,7 @@ public class FirDiagnosticTestGenerated extends AbstractFirDiagnosticTest { @Nested @TestMetadata("compiler/fir/analysis-tests/testData/resolve/fromBuilder") @TestDataPath("$PROJECT_ROOT") - public class FromBuilder extends AbstractFirDiagnosticTest { + public class FromBuilder { @Test public void testAllFilesPresentInFromBuilder() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolve/fromBuilder"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -2479,7 +2491,7 @@ public class FirDiagnosticTestGenerated extends AbstractFirDiagnosticTest { @Nested @TestMetadata("compiler/fir/analysis-tests/testData/resolve/inference") @TestDataPath("$PROJECT_ROOT") - public class Inference extends AbstractFirDiagnosticTest { + public class Inference { @Test public void testAllFilesPresentInInference() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolve/inference"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -2609,7 +2621,7 @@ public class FirDiagnosticTestGenerated extends AbstractFirDiagnosticTest { @Nested @TestMetadata("compiler/fir/analysis-tests/testData/resolve/innerClasses") @TestDataPath("$PROJECT_ROOT") - public class InnerClasses extends AbstractFirDiagnosticTest { + public class InnerClasses { @Test public void testAllFilesPresentInInnerClasses() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolve/innerClasses"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -2643,7 +2655,7 @@ public class FirDiagnosticTestGenerated extends AbstractFirDiagnosticTest { @Nested @TestMetadata("compiler/fir/analysis-tests/testData/resolve/localClasses") @TestDataPath("$PROJECT_ROOT") - public class LocalClasses extends AbstractFirDiagnosticTest { + public class LocalClasses { @Test public void testAllFilesPresentInLocalClasses() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolve/localClasses"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -2671,7 +2683,7 @@ public class FirDiagnosticTestGenerated extends AbstractFirDiagnosticTest { @Nested @TestMetadata("compiler/fir/analysis-tests/testData/resolve/multifile") @TestDataPath("$PROJECT_ROOT") - public class Multifile extends AbstractFirDiagnosticTest { + public class Multifile { @Test public void testAllFilesPresentInMultifile() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolve/multifile"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -2747,7 +2759,7 @@ public class FirDiagnosticTestGenerated extends AbstractFirDiagnosticTest { @Nested @TestMetadata("compiler/fir/analysis-tests/testData/resolve/overrides") @TestDataPath("$PROJECT_ROOT") - public class Overrides extends AbstractFirDiagnosticTest { + public class Overrides { @Test public void testAllFilesPresentInOverrides() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolve/overrides"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -2805,7 +2817,7 @@ public class FirDiagnosticTestGenerated extends AbstractFirDiagnosticTest { @Nested @TestMetadata("compiler/fir/analysis-tests/testData/resolve/problems") @TestDataPath("$PROJECT_ROOT") - public class Problems extends AbstractFirDiagnosticTest { + public class Problems { @Test public void testAllFilesPresentInProblems() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolve/problems"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -2905,7 +2917,7 @@ public class FirDiagnosticTestGenerated extends AbstractFirDiagnosticTest { @Nested @TestMetadata("compiler/fir/analysis-tests/testData/resolve/properties") @TestDataPath("$PROJECT_ROOT") - public class Properties extends AbstractFirDiagnosticTest { + public class Properties { @Test public void testAllFilesPresentInProperties() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolve/properties"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -2951,7 +2963,7 @@ public class FirDiagnosticTestGenerated extends AbstractFirDiagnosticTest { @Nested @TestMetadata("compiler/fir/analysis-tests/testData/resolve/references") @TestDataPath("$PROJECT_ROOT") - public class References extends AbstractFirDiagnosticTest { + public class References { @Test public void testAllFilesPresentInReferences() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolve/references"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -2985,7 +2997,7 @@ public class FirDiagnosticTestGenerated extends AbstractFirDiagnosticTest { @Nested @TestMetadata("compiler/fir/analysis-tests/testData/resolve/samConstructors") @TestDataPath("$PROJECT_ROOT") - public class SamConstructors extends AbstractFirDiagnosticTest { + public class SamConstructors { @Test public void testAllFilesPresentInSamConstructors() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolve/samConstructors"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -3031,7 +3043,7 @@ public class FirDiagnosticTestGenerated extends AbstractFirDiagnosticTest { @Nested @TestMetadata("compiler/fir/analysis-tests/testData/resolve/samConversions") @TestDataPath("$PROJECT_ROOT") - public class SamConversions extends AbstractFirDiagnosticTest { + public class SamConversions { @Test public void testAllFilesPresentInSamConversions() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolve/samConversions"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -3095,7 +3107,7 @@ public class FirDiagnosticTestGenerated extends AbstractFirDiagnosticTest { @Nested @TestMetadata("compiler/fir/analysis-tests/testData/resolve/smartcasts") @TestDataPath("$PROJECT_ROOT") - public class Smartcasts extends AbstractFirDiagnosticTest { + public class Smartcasts { @Test public void testAllFilesPresentInSmartcasts() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolve/smartcasts"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -3170,7 +3182,7 @@ public class FirDiagnosticTestGenerated extends AbstractFirDiagnosticTest { @Nested @TestMetadata("compiler/fir/analysis-tests/testData/resolve/smartcasts/booleans") @TestDataPath("$PROJECT_ROOT") - public class Booleans extends AbstractFirDiagnosticTest { + public class Booleans { @Test public void testAllFilesPresentInBooleans() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolve/smartcasts/booleans"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -3198,7 +3210,7 @@ public class FirDiagnosticTestGenerated extends AbstractFirDiagnosticTest { @Nested @TestMetadata("compiler/fir/analysis-tests/testData/resolve/smartcasts/boundSmartcasts") @TestDataPath("$PROJECT_ROOT") - public class BoundSmartcasts extends AbstractFirDiagnosticTest { + public class BoundSmartcasts { @Test public void testAllFilesPresentInBoundSmartcasts() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolve/smartcasts/boundSmartcasts"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -3226,7 +3238,7 @@ public class FirDiagnosticTestGenerated extends AbstractFirDiagnosticTest { @Nested @TestMetadata("compiler/fir/analysis-tests/testData/resolve/smartcasts/controlStructures") @TestDataPath("$PROJECT_ROOT") - public class ControlStructures extends AbstractFirDiagnosticTest { + public class ControlStructures { @Test public void testAllFilesPresentInControlStructures() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolve/smartcasts/controlStructures"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -3266,7 +3278,7 @@ public class FirDiagnosticTestGenerated extends AbstractFirDiagnosticTest { @Nested @TestMetadata("compiler/fir/analysis-tests/testData/resolve/smartcasts/lambdas") @TestDataPath("$PROJECT_ROOT") - public class Lambdas extends AbstractFirDiagnosticTest { + public class Lambdas { @Test public void testAllFilesPresentInLambdas() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolve/smartcasts/lambdas"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -3294,7 +3306,7 @@ public class FirDiagnosticTestGenerated extends AbstractFirDiagnosticTest { @Nested @TestMetadata("compiler/fir/analysis-tests/testData/resolve/smartcasts/loops") @TestDataPath("$PROJECT_ROOT") - public class Loops extends AbstractFirDiagnosticTest { + public class Loops { @Test public void testAllFilesPresentInLoops() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolve/smartcasts/loops"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -3316,7 +3328,7 @@ public class FirDiagnosticTestGenerated extends AbstractFirDiagnosticTest { @Nested @TestMetadata("compiler/fir/analysis-tests/testData/resolve/smartcasts/problems") @TestDataPath("$PROJECT_ROOT") - public class Problems extends AbstractFirDiagnosticTest { + public class Problems { @Test public void testAllFilesPresentInProblems() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolve/smartcasts/problems"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -3332,7 +3344,7 @@ public class FirDiagnosticTestGenerated extends AbstractFirDiagnosticTest { @Nested @TestMetadata("compiler/fir/analysis-tests/testData/resolve/smartcasts/receivers") @TestDataPath("$PROJECT_ROOT") - public class Receivers extends AbstractFirDiagnosticTest { + public class Receivers { @Test public void testAllFilesPresentInReceivers() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolve/smartcasts/receivers"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -3366,7 +3378,7 @@ public class FirDiagnosticTestGenerated extends AbstractFirDiagnosticTest { @Nested @TestMetadata("compiler/fir/analysis-tests/testData/resolve/smartcasts/safeCalls") @TestDataPath("$PROJECT_ROOT") - public class SafeCalls extends AbstractFirDiagnosticTest { + public class SafeCalls { @Test public void testAllFilesPresentInSafeCalls() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolve/smartcasts/safeCalls"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -3400,7 +3412,7 @@ public class FirDiagnosticTestGenerated extends AbstractFirDiagnosticTest { @Nested @TestMetadata("compiler/fir/analysis-tests/testData/resolve/smartcasts/stability") @TestDataPath("$PROJECT_ROOT") - public class Stability extends AbstractFirDiagnosticTest { + public class Stability { @Test public void testAllFilesPresentInStability() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolve/smartcasts/stability"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -3416,7 +3428,7 @@ public class FirDiagnosticTestGenerated extends AbstractFirDiagnosticTest { @Nested @TestMetadata("compiler/fir/analysis-tests/testData/resolve/smartcasts/variables") @TestDataPath("$PROJECT_ROOT") - public class Variables extends AbstractFirDiagnosticTest { + public class Variables { @Test public void testAllFilesPresentInVariables() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolve/smartcasts/variables"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -3439,7 +3451,7 @@ public class FirDiagnosticTestGenerated extends AbstractFirDiagnosticTest { @Nested @TestMetadata("compiler/fir/analysis-tests/testData/resolve/stdlib") @TestDataPath("$PROJECT_ROOT") - public class Stdlib extends AbstractFirDiagnosticTest { + public class Stdlib { @Test public void testAllFilesPresentInStdlib() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolve/stdlib"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -3448,7 +3460,7 @@ public class FirDiagnosticTestGenerated extends AbstractFirDiagnosticTest { @Nested @TestMetadata("compiler/fir/analysis-tests/testData/resolve/stdlib/j+k") @TestDataPath("$PROJECT_ROOT") - public class J_k extends AbstractFirDiagnosticTest { + public class J_k { @Test public void testAllFilesPresentInJ_k() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolve/stdlib/j+k"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -3468,10 +3480,44 @@ public class FirDiagnosticTestGenerated extends AbstractFirDiagnosticTest { } } + @Nested + @TestMetadata("compiler/fir/analysis-tests/testData/resolve/suppress") + @TestDataPath("$PROJECT_ROOT") + public class Suppress { + @Test + public void testAllFilesPresentInSuppress() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolve/suppress"), Pattern.compile("^([^.]+)\\.kt$"), null, true); + } + + @Test + @TestMetadata("allWarnings.kt") + public void testAllWarnings() throws Exception { + runTest("compiler/fir/analysis-tests/testData/resolve/suppress/allWarnings.kt"); + } + + @Test + @TestMetadata("multipleWarnings.kt") + public void testMultipleWarnings() throws Exception { + runTest("compiler/fir/analysis-tests/testData/resolve/suppress/multipleWarnings.kt"); + } + + @Test + @TestMetadata("singleError.kt") + public void testSingleError() throws Exception { + runTest("compiler/fir/analysis-tests/testData/resolve/suppress/singleError.kt"); + } + + @Test + @TestMetadata("singleWarning.kt") + public void testSingleWarning() throws Exception { + runTest("compiler/fir/analysis-tests/testData/resolve/suppress/singleWarning.kt"); + } + } + @Nested @TestMetadata("compiler/fir/analysis-tests/testData/resolve/types") @TestDataPath("$PROJECT_ROOT") - public class Types extends AbstractFirDiagnosticTest { + public class Types { @Test public void testAllFilesPresentInTypes() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolve/types"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -3493,7 +3539,7 @@ public class FirDiagnosticTestGenerated extends AbstractFirDiagnosticTest { @Nested @TestMetadata("compiler/fir/analysis-tests/testData/resolve/visibility") @TestDataPath("$PROJECT_ROOT") - public class Visibility extends AbstractFirDiagnosticTest { + public class Visibility { @Test public void testAllFilesPresentInVisibility() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolve/visibility"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -3570,7 +3616,7 @@ public class FirDiagnosticTestGenerated extends AbstractFirDiagnosticTest { @Nested @TestMetadata("compiler/fir/analysis-tests/testData/resolveWithStdlib") @TestDataPath("$PROJECT_ROOT") - public class ResolveWithStdlib extends AbstractFirDiagnosticTest { + public class ResolveWithStdlib { @Test @TestMetadata("addAllOnJavaCollection.kt") public void testAddAllOnJavaCollection() throws Exception { @@ -3909,7 +3955,7 @@ public class FirDiagnosticTestGenerated extends AbstractFirDiagnosticTest { @Nested @TestMetadata("compiler/fir/analysis-tests/testData/resolveWithStdlib/callableReferences") @TestDataPath("$PROJECT_ROOT") - public class CallableReferences extends AbstractFirDiagnosticTest { + public class CallableReferences { @Test public void testAllFilesPresentInCallableReferences() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolveWithStdlib/callableReferences"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -4056,7 +4102,7 @@ public class FirDiagnosticTestGenerated extends AbstractFirDiagnosticTest { @Nested @TestMetadata("compiler/fir/analysis-tests/testData/resolveWithStdlib/callableReferences/fromBasicDiagnosticTests") @TestDataPath("$PROJECT_ROOT") - public class FromBasicDiagnosticTests extends AbstractFirDiagnosticTest { + public class FromBasicDiagnosticTests { @Test public void testAllFilesPresentInFromBasicDiagnosticTests() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolveWithStdlib/callableReferences/fromBasicDiagnosticTests"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -4145,7 +4191,7 @@ public class FirDiagnosticTestGenerated extends AbstractFirDiagnosticTest { @Nested @TestMetadata("compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts") @TestDataPath("$PROJECT_ROOT") - public class Contracts extends AbstractFirDiagnosticTest { + public class Contracts { @Test public void testAllFilesPresentInContracts() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -4154,7 +4200,7 @@ public class FirDiagnosticTestGenerated extends AbstractFirDiagnosticTest { @Nested @TestMetadata("compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromLibrary") @TestDataPath("$PROJECT_ROOT") - public class FromLibrary extends AbstractFirDiagnosticTest { + public class FromLibrary { @Test public void testAllFilesPresentInFromLibrary() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromLibrary"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -4182,7 +4228,7 @@ public class FirDiagnosticTestGenerated extends AbstractFirDiagnosticTest { @Nested @TestMetadata("compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource") @TestDataPath("$PROJECT_ROOT") - public class FromSource extends AbstractFirDiagnosticTest { + public class FromSource { @Test public void testAllFilesPresentInFromSource() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -4191,7 +4237,7 @@ public class FirDiagnosticTestGenerated extends AbstractFirDiagnosticTest { @Nested @TestMetadata("compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/bad") @TestDataPath("$PROJECT_ROOT") - public class Bad extends AbstractFirDiagnosticTest { + public class Bad { @Test public void testAllFilesPresentInBad() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/bad"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -4200,7 +4246,7 @@ public class FirDiagnosticTestGenerated extends AbstractFirDiagnosticTest { @Nested @TestMetadata("compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/bad/callsInPlace") @TestDataPath("$PROJECT_ROOT") - public class CallsInPlace extends AbstractFirDiagnosticTest { + public class CallsInPlace { @Test public void testAllFilesPresentInCallsInPlace() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/bad/callsInPlace"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -4234,7 +4280,7 @@ public class FirDiagnosticTestGenerated extends AbstractFirDiagnosticTest { @Nested @TestMetadata("compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/bad/returnsImplies") @TestDataPath("$PROJECT_ROOT") - public class ReturnsImplies extends AbstractFirDiagnosticTest { + public class ReturnsImplies { @Test public void testAllFilesPresentInReturnsImplies() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/bad/returnsImplies"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -4257,7 +4303,7 @@ public class FirDiagnosticTestGenerated extends AbstractFirDiagnosticTest { @Nested @TestMetadata("compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good") @TestDataPath("$PROJECT_ROOT") - public class Good extends AbstractFirDiagnosticTest { + public class Good { @Test public void testAllFilesPresentInGood() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -4266,7 +4312,7 @@ public class FirDiagnosticTestGenerated extends AbstractFirDiagnosticTest { @Nested @TestMetadata("compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace") @TestDataPath("$PROJECT_ROOT") - public class CallsInPlace extends AbstractFirDiagnosticTest { + public class CallsInPlace { @Test public void testAllFilesPresentInCallsInPlace() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -4324,7 +4370,7 @@ public class FirDiagnosticTestGenerated extends AbstractFirDiagnosticTest { @Nested @TestMetadata("compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/returnsImplies") @TestDataPath("$PROJECT_ROOT") - public class ReturnsImplies extends AbstractFirDiagnosticTest { + public class ReturnsImplies { @Test public void testAllFilesPresentInReturnsImplies() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/returnsImplies"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -4400,7 +4446,7 @@ public class FirDiagnosticTestGenerated extends AbstractFirDiagnosticTest { @Nested @TestMetadata("compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/variousContracts") @TestDataPath("$PROJECT_ROOT") - public class VariousContracts extends AbstractFirDiagnosticTest { + public class VariousContracts { @Test public void testAllFilesPresentInVariousContracts() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/variousContracts"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -4409,7 +4455,7 @@ public class FirDiagnosticTestGenerated extends AbstractFirDiagnosticTest { @Nested @TestMetadata("compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/variousContracts/newSyntax") @TestDataPath("$PROJECT_ROOT") - public class NewSyntax extends AbstractFirDiagnosticTest { + public class NewSyntax { @Test public void testAllFilesPresentInNewSyntax() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/variousContracts/newSyntax"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -4429,7 +4475,7 @@ public class FirDiagnosticTestGenerated extends AbstractFirDiagnosticTest { @Nested @TestMetadata("compiler/fir/analysis-tests/testData/resolveWithStdlib/delegates") @TestDataPath("$PROJECT_ROOT") - public class Delegates extends AbstractFirDiagnosticTest { + public class Delegates { @Test public void testAllFilesPresentInDelegates() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolveWithStdlib/delegates"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -4475,7 +4521,7 @@ public class FirDiagnosticTestGenerated extends AbstractFirDiagnosticTest { @Nested @TestMetadata("compiler/fir/analysis-tests/testData/resolveWithStdlib/inference") @TestDataPath("$PROJECT_ROOT") - public class Inference extends AbstractFirDiagnosticTest { + public class Inference { @Test public void testAllFilesPresentInInference() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolveWithStdlib/inference"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -4527,7 +4573,7 @@ public class FirDiagnosticTestGenerated extends AbstractFirDiagnosticTest { @Nested @TestMetadata("compiler/fir/analysis-tests/testData/resolveWithStdlib/initialization") @TestDataPath("$PROJECT_ROOT") - public class Initialization extends AbstractFirDiagnosticTest { + public class Initialization { @Test public void testAllFilesPresentInInitialization() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolveWithStdlib/initialization"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -4543,7 +4589,7 @@ public class FirDiagnosticTestGenerated extends AbstractFirDiagnosticTest { @Nested @TestMetadata("compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k") @TestDataPath("$PROJECT_ROOT") - public class J_k extends AbstractFirDiagnosticTest { + public class J_k { @Test public void testAllFilesPresentInJ_k() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -4835,7 +4881,7 @@ public class FirDiagnosticTestGenerated extends AbstractFirDiagnosticTest { @Nested @TestMetadata("compiler/fir/analysis-tests/testData/resolveWithStdlib/multiModule") @TestDataPath("$PROJECT_ROOT") - public class MultiModule extends AbstractFirDiagnosticTest { + public class MultiModule { @Test public void testAllFilesPresentInMultiModule() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolveWithStdlib/multiModule"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -4875,7 +4921,7 @@ public class FirDiagnosticTestGenerated extends AbstractFirDiagnosticTest { @Nested @TestMetadata("compiler/fir/analysis-tests/testData/resolveWithStdlib/problems") @TestDataPath("$PROJECT_ROOT") - public class Problems extends AbstractFirDiagnosticTest { + public class Problems { @Test public void testAllFilesPresentInProblems() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolveWithStdlib/problems"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -4941,6 +4987,12 @@ public class FirDiagnosticTestGenerated extends AbstractFirDiagnosticTest { runTest("compiler/fir/analysis-tests/testData/resolveWithStdlib/problems/TypesEligibleForSimpleVisit.kt"); } + @Test + @TestMetadata("valueOfOrNull.kt") + public void testValueOfOrNull() throws Exception { + runTest("compiler/fir/analysis-tests/testData/resolveWithStdlib/problems/valueOfOrNull.kt"); + } + @Test @TestMetadata("weakHashMap.kt") public void testWeakHashMap() throws Exception { @@ -4951,7 +5003,7 @@ public class FirDiagnosticTestGenerated extends AbstractFirDiagnosticTest { @Nested @TestMetadata("compiler/fir/analysis-tests/testData/resolveWithStdlib/reinitializations") @TestDataPath("$PROJECT_ROOT") - public class Reinitializations extends AbstractFirDiagnosticTest { + public class Reinitializations { @Test public void testAllFilesPresentInReinitializations() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolveWithStdlib/reinitializations"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -4967,7 +5019,7 @@ public class FirDiagnosticTestGenerated extends AbstractFirDiagnosticTest { @Nested @TestMetadata("compiler/fir/analysis-tests/testData/resolveWithStdlib/smartcasts") @TestDataPath("$PROJECT_ROOT") - public class Smartcasts extends AbstractFirDiagnosticTest { + public class Smartcasts { @Test public void testAllFilesPresentInSmartcasts() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolveWithStdlib/smartcasts"), Pattern.compile("^([^.]+)\\.kt$"), null, true); diff --git a/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirDiagnosticTestSpecGenerated.java b/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirDiagnosticTestSpecGenerated.java index 6febc8a5ba6..91962e933c7 100644 --- a/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirDiagnosticTestSpecGenerated.java +++ b/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirDiagnosticTestSpecGenerated.java @@ -10,8 +10,6 @@ import org.jetbrains.kotlin.test.util.KtTestUtil; import org.jetbrains.kotlin.test.TestMetadata; import org.junit.jupiter.api.Nested; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.parallel.Execution; -import org.junit.jupiter.api.parallel.ExecutionMode; import java.io.File; import java.util.regex.Pattern; diff --git a/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirDiagnosticsWithLightTreeTestGenerated.java b/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirDiagnosticsWithLightTreeTestGenerated.java index 5715994f8f3..931d3a4966f 100644 --- a/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirDiagnosticsWithLightTreeTestGenerated.java +++ b/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirDiagnosticsWithLightTreeTestGenerated.java @@ -23,7 +23,7 @@ public class FirDiagnosticsWithLightTreeTestGenerated extends AbstractFirDiagnos @TestMetadata("compiler/fir/analysis-tests/testData/resolve") @TestDataPath("$PROJECT_ROOT") @Execution(ExecutionMode.SAME_THREAD) - public class Resolve extends AbstractFirDiagnosticsWithLightTreeTest { + public class Resolve { @Test public void testAllFilesPresentInResolve() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolve"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -59,6 +59,12 @@ public class FirDiagnosticsWithLightTreeTestGenerated extends AbstractFirDiagnos runTest("compiler/fir/analysis-tests/testData/resolve/cast.kt"); } + @Test + @TestMetadata("catchParameter.kt") + public void testCatchParameter() throws Exception { + runTest("compiler/fir/analysis-tests/testData/resolve/catchParameter.kt"); + } + @Test @TestMetadata("companion.kt") public void testCompanion() throws Exception { @@ -491,6 +497,12 @@ public class FirDiagnosticsWithLightTreeTestGenerated extends AbstractFirDiagnos runTest("compiler/fir/analysis-tests/testData/resolve/syntheticsVsNormalProperties.kt"); } + @Test + @TestMetadata("throwableSubclass.kt") + public void testThrowableSubclass() throws Exception { + runTest("compiler/fir/analysis-tests/testData/resolve/throwableSubclass.kt"); + } + @Test @TestMetadata("treeSet.kt") public void testTreeSet() throws Exception { @@ -579,7 +591,7 @@ public class FirDiagnosticsWithLightTreeTestGenerated extends AbstractFirDiagnos @TestMetadata("compiler/fir/analysis-tests/testData/resolve/arguments") @TestDataPath("$PROJECT_ROOT") @Execution(ExecutionMode.SAME_THREAD) - public class Arguments extends AbstractFirDiagnosticsWithLightTreeTest { + public class Arguments { @Test public void testAllFilesPresentInArguments() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolve/arguments"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -764,7 +776,7 @@ public class FirDiagnosticsWithLightTreeTestGenerated extends AbstractFirDiagnos @TestMetadata("compiler/fir/analysis-tests/testData/resolve/arrays") @TestDataPath("$PROJECT_ROOT") @Execution(ExecutionMode.SAME_THREAD) - public class Arrays extends AbstractFirDiagnosticsWithLightTreeTest { + public class Arrays { @Test public void testAllFilesPresentInArrays() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolve/arrays"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -787,7 +799,7 @@ public class FirDiagnosticsWithLightTreeTestGenerated extends AbstractFirDiagnos @TestMetadata("compiler/fir/analysis-tests/testData/resolve/builtins") @TestDataPath("$PROJECT_ROOT") @Execution(ExecutionMode.SAME_THREAD) - public class Builtins extends AbstractFirDiagnosticsWithLightTreeTest { + public class Builtins { @Test public void testAllFilesPresentInBuiltins() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolve/builtins"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -804,7 +816,7 @@ public class FirDiagnosticsWithLightTreeTestGenerated extends AbstractFirDiagnos @TestMetadata("compiler/fir/analysis-tests/testData/resolve/callResolution") @TestDataPath("$PROJECT_ROOT") @Execution(ExecutionMode.SAME_THREAD) - public class CallResolution extends AbstractFirDiagnosticsWithLightTreeTest { + public class CallResolution { @Test public void testAllFilesPresentInCallResolution() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolve/callResolution"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -905,7 +917,7 @@ public class FirDiagnosticsWithLightTreeTestGenerated extends AbstractFirDiagnos @TestMetadata("compiler/fir/analysis-tests/testData/resolve/cfg") @TestDataPath("$PROJECT_ROOT") @Execution(ExecutionMode.SAME_THREAD) - public class Cfg extends AbstractFirDiagnosticsWithLightTreeTest { + public class Cfg { @Test public void testAllFilesPresentInCfg() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolve/cfg"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -1066,7 +1078,7 @@ public class FirDiagnosticsWithLightTreeTestGenerated extends AbstractFirDiagnos @TestMetadata("compiler/fir/analysis-tests/testData/resolve/constructors") @TestDataPath("$PROJECT_ROOT") @Execution(ExecutionMode.SAME_THREAD) - public class Constructors extends AbstractFirDiagnosticsWithLightTreeTest { + public class Constructors { @Test public void testAllFilesPresentInConstructors() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolve/constructors"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -1083,7 +1095,7 @@ public class FirDiagnosticsWithLightTreeTestGenerated extends AbstractFirDiagnos @TestMetadata("compiler/fir/analysis-tests/testData/resolve/delegates") @TestDataPath("$PROJECT_ROOT") @Execution(ExecutionMode.SAME_THREAD) - public class Delegates extends AbstractFirDiagnosticsWithLightTreeTest { + public class Delegates { @Test public void testAllFilesPresentInDelegates() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolve/delegates"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -1130,7 +1142,7 @@ public class FirDiagnosticsWithLightTreeTestGenerated extends AbstractFirDiagnos @TestMetadata("compiler/fir/analysis-tests/testData/resolve/diagnostics") @TestDataPath("$PROJECT_ROOT") @Execution(ExecutionMode.SAME_THREAD) - public class Diagnostics extends AbstractFirDiagnosticsWithLightTreeTest { + public class Diagnostics { @Test @TestMetadata("abstractSuperCall.kt") public void testAbstractSuperCall() throws Exception { @@ -1440,7 +1452,7 @@ public class FirDiagnosticsWithLightTreeTestGenerated extends AbstractFirDiagnos @TestMetadata("compiler/fir/analysis-tests/testData/resolve/diagnostics/functionAsExpression") @TestDataPath("$PROJECT_ROOT") @Execution(ExecutionMode.SAME_THREAD) - public class FunctionAsExpression extends AbstractFirDiagnosticsWithLightTreeTest { + public class FunctionAsExpression { @Test public void testAllFilesPresentInFunctionAsExpression() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolve/diagnostics/functionAsExpression"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -1458,7 +1470,7 @@ public class FirDiagnosticsWithLightTreeTestGenerated extends AbstractFirDiagnos @TestMetadata("compiler/fir/analysis-tests/testData/resolve/expresssions") @TestDataPath("$PROJECT_ROOT") @Execution(ExecutionMode.SAME_THREAD) - public class Expresssions extends AbstractFirDiagnosticsWithLightTreeTest { + public class Expresssions { @Test @TestMetadata("access.kt") public void testAccess() throws Exception { @@ -1834,7 +1846,7 @@ public class FirDiagnosticsWithLightTreeTestGenerated extends AbstractFirDiagnos @TestMetadata("compiler/fir/analysis-tests/testData/resolve/expresssions/inference") @TestDataPath("$PROJECT_ROOT") @Execution(ExecutionMode.SAME_THREAD) - public class Inference extends AbstractFirDiagnosticsWithLightTreeTest { + public class Inference { @Test public void testAllFilesPresentInInference() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolve/expresssions/inference"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -1863,7 +1875,7 @@ public class FirDiagnosticsWithLightTreeTestGenerated extends AbstractFirDiagnos @TestMetadata("compiler/fir/analysis-tests/testData/resolve/expresssions/invoke") @TestDataPath("$PROJECT_ROOT") @Execution(ExecutionMode.SAME_THREAD) - public class Invoke extends AbstractFirDiagnosticsWithLightTreeTest { + public class Invoke { @Test public void testAllFilesPresentInInvoke() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolve/expresssions/invoke"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -1964,7 +1976,7 @@ public class FirDiagnosticsWithLightTreeTestGenerated extends AbstractFirDiagnos @TestMetadata("compiler/fir/analysis-tests/testData/resolve/expresssions/operators") @TestDataPath("$PROJECT_ROOT") @Execution(ExecutionMode.SAME_THREAD) - public class Operators extends AbstractFirDiagnosticsWithLightTreeTest { + public class Operators { @Test public void testAllFilesPresentInOperators() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolve/expresssions/operators"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -1994,7 +2006,7 @@ public class FirDiagnosticsWithLightTreeTestGenerated extends AbstractFirDiagnos @TestMetadata("compiler/fir/analysis-tests/testData/resolve/extendedCheckers") @TestDataPath("$PROJECT_ROOT") @Execution(ExecutionMode.SAME_THREAD) - public class ExtendedCheckers extends AbstractFirDiagnosticsWithLightTreeTest { + public class ExtendedCheckers { @Test public void testAllFilesPresentInExtendedCheckers() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolve/extendedCheckers"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -2052,7 +2064,7 @@ public class FirDiagnosticsWithLightTreeTestGenerated extends AbstractFirDiagnos @TestMetadata("compiler/fir/analysis-tests/testData/resolve/extendedCheckers/canBeReplacedWithOperatorAssignment") @TestDataPath("$PROJECT_ROOT") @Execution(ExecutionMode.SAME_THREAD) - public class CanBeReplacedWithOperatorAssignment extends AbstractFirDiagnosticsWithLightTreeTest { + public class CanBeReplacedWithOperatorAssignment { @Test public void testAllFilesPresentInCanBeReplacedWithOperatorAssignment() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolve/extendedCheckers/canBeReplacedWithOperatorAssignment"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -2177,7 +2189,7 @@ public class FirDiagnosticsWithLightTreeTestGenerated extends AbstractFirDiagnos @TestMetadata("compiler/fir/analysis-tests/testData/resolve/extendedCheckers/emptyRangeChecker") @TestDataPath("$PROJECT_ROOT") @Execution(ExecutionMode.SAME_THREAD) - public class EmptyRangeChecker extends AbstractFirDiagnosticsWithLightTreeTest { + public class EmptyRangeChecker { @Test public void testAllFilesPresentInEmptyRangeChecker() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolve/extendedCheckers/emptyRangeChecker"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -2200,7 +2212,7 @@ public class FirDiagnosticsWithLightTreeTestGenerated extends AbstractFirDiagnos @TestMetadata("compiler/fir/analysis-tests/testData/resolve/extendedCheckers/RedundantCallOfConversionMethod") @TestDataPath("$PROJECT_ROOT") @Execution(ExecutionMode.SAME_THREAD) - public class RedundantCallOfConversionMethod extends AbstractFirDiagnosticsWithLightTreeTest { + public class RedundantCallOfConversionMethod { @Test public void testAllFilesPresentInRedundantCallOfConversionMethod() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolve/extendedCheckers/RedundantCallOfConversionMethod"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -2331,7 +2343,7 @@ public class FirDiagnosticsWithLightTreeTestGenerated extends AbstractFirDiagnos @TestMetadata("compiler/fir/analysis-tests/testData/resolve/extendedCheckers/unused") @TestDataPath("$PROJECT_ROOT") @Execution(ExecutionMode.SAME_THREAD) - public class Unused extends AbstractFirDiagnosticsWithLightTreeTest { + public class Unused { @Test public void testAllFilesPresentInUnused() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolve/extendedCheckers/unused"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -2384,7 +2396,7 @@ public class FirDiagnosticsWithLightTreeTestGenerated extends AbstractFirDiagnos @TestMetadata("compiler/fir/analysis-tests/testData/resolve/extendedCheckers/UselessCallOnNotNullChecker") @TestDataPath("$PROJECT_ROOT") @Execution(ExecutionMode.SAME_THREAD) - public class UselessCallOnNotNullChecker extends AbstractFirDiagnosticsWithLightTreeTest { + public class UselessCallOnNotNullChecker { @Test public void testAllFilesPresentInUselessCallOnNotNullChecker() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolve/extendedCheckers/UselessCallOnNotNullChecker"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -2462,7 +2474,7 @@ public class FirDiagnosticsWithLightTreeTestGenerated extends AbstractFirDiagnos @TestMetadata("compiler/fir/analysis-tests/testData/resolve/fromBuilder") @TestDataPath("$PROJECT_ROOT") @Execution(ExecutionMode.SAME_THREAD) - public class FromBuilder extends AbstractFirDiagnosticsWithLightTreeTest { + public class FromBuilder { @Test public void testAllFilesPresentInFromBuilder() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolve/fromBuilder"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -2503,7 +2515,7 @@ public class FirDiagnosticsWithLightTreeTestGenerated extends AbstractFirDiagnos @TestMetadata("compiler/fir/analysis-tests/testData/resolve/inference") @TestDataPath("$PROJECT_ROOT") @Execution(ExecutionMode.SAME_THREAD) - public class Inference extends AbstractFirDiagnosticsWithLightTreeTest { + public class Inference { @Test public void testAllFilesPresentInInference() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolve/inference"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -2634,7 +2646,7 @@ public class FirDiagnosticsWithLightTreeTestGenerated extends AbstractFirDiagnos @TestMetadata("compiler/fir/analysis-tests/testData/resolve/innerClasses") @TestDataPath("$PROJECT_ROOT") @Execution(ExecutionMode.SAME_THREAD) - public class InnerClasses extends AbstractFirDiagnosticsWithLightTreeTest { + public class InnerClasses { @Test public void testAllFilesPresentInInnerClasses() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolve/innerClasses"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -2669,7 +2681,7 @@ public class FirDiagnosticsWithLightTreeTestGenerated extends AbstractFirDiagnos @TestMetadata("compiler/fir/analysis-tests/testData/resolve/localClasses") @TestDataPath("$PROJECT_ROOT") @Execution(ExecutionMode.SAME_THREAD) - public class LocalClasses extends AbstractFirDiagnosticsWithLightTreeTest { + public class LocalClasses { @Test public void testAllFilesPresentInLocalClasses() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolve/localClasses"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -2698,7 +2710,7 @@ public class FirDiagnosticsWithLightTreeTestGenerated extends AbstractFirDiagnos @TestMetadata("compiler/fir/analysis-tests/testData/resolve/multifile") @TestDataPath("$PROJECT_ROOT") @Execution(ExecutionMode.SAME_THREAD) - public class Multifile extends AbstractFirDiagnosticsWithLightTreeTest { + public class Multifile { @Test public void testAllFilesPresentInMultifile() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolve/multifile"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -2775,7 +2787,7 @@ public class FirDiagnosticsWithLightTreeTestGenerated extends AbstractFirDiagnos @TestMetadata("compiler/fir/analysis-tests/testData/resolve/overrides") @TestDataPath("$PROJECT_ROOT") @Execution(ExecutionMode.SAME_THREAD) - public class Overrides extends AbstractFirDiagnosticsWithLightTreeTest { + public class Overrides { @Test public void testAllFilesPresentInOverrides() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolve/overrides"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -2834,7 +2846,7 @@ public class FirDiagnosticsWithLightTreeTestGenerated extends AbstractFirDiagnos @TestMetadata("compiler/fir/analysis-tests/testData/resolve/problems") @TestDataPath("$PROJECT_ROOT") @Execution(ExecutionMode.SAME_THREAD) - public class Problems extends AbstractFirDiagnosticsWithLightTreeTest { + public class Problems { @Test public void testAllFilesPresentInProblems() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolve/problems"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -2935,7 +2947,7 @@ public class FirDiagnosticsWithLightTreeTestGenerated extends AbstractFirDiagnos @TestMetadata("compiler/fir/analysis-tests/testData/resolve/properties") @TestDataPath("$PROJECT_ROOT") @Execution(ExecutionMode.SAME_THREAD) - public class Properties extends AbstractFirDiagnosticsWithLightTreeTest { + public class Properties { @Test public void testAllFilesPresentInProperties() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolve/properties"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -2982,7 +2994,7 @@ public class FirDiagnosticsWithLightTreeTestGenerated extends AbstractFirDiagnos @TestMetadata("compiler/fir/analysis-tests/testData/resolve/references") @TestDataPath("$PROJECT_ROOT") @Execution(ExecutionMode.SAME_THREAD) - public class References extends AbstractFirDiagnosticsWithLightTreeTest { + public class References { @Test public void testAllFilesPresentInReferences() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolve/references"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -3017,7 +3029,7 @@ public class FirDiagnosticsWithLightTreeTestGenerated extends AbstractFirDiagnos @TestMetadata("compiler/fir/analysis-tests/testData/resolve/samConstructors") @TestDataPath("$PROJECT_ROOT") @Execution(ExecutionMode.SAME_THREAD) - public class SamConstructors extends AbstractFirDiagnosticsWithLightTreeTest { + public class SamConstructors { @Test public void testAllFilesPresentInSamConstructors() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolve/samConstructors"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -3064,7 +3076,7 @@ public class FirDiagnosticsWithLightTreeTestGenerated extends AbstractFirDiagnos @TestMetadata("compiler/fir/analysis-tests/testData/resolve/samConversions") @TestDataPath("$PROJECT_ROOT") @Execution(ExecutionMode.SAME_THREAD) - public class SamConversions extends AbstractFirDiagnosticsWithLightTreeTest { + public class SamConversions { @Test public void testAllFilesPresentInSamConversions() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolve/samConversions"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -3129,7 +3141,7 @@ public class FirDiagnosticsWithLightTreeTestGenerated extends AbstractFirDiagnos @TestMetadata("compiler/fir/analysis-tests/testData/resolve/smartcasts") @TestDataPath("$PROJECT_ROOT") @Execution(ExecutionMode.SAME_THREAD) - public class Smartcasts extends AbstractFirDiagnosticsWithLightTreeTest { + public class Smartcasts { @Test public void testAllFilesPresentInSmartcasts() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolve/smartcasts"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -3205,7 +3217,7 @@ public class FirDiagnosticsWithLightTreeTestGenerated extends AbstractFirDiagnos @TestMetadata("compiler/fir/analysis-tests/testData/resolve/smartcasts/booleans") @TestDataPath("$PROJECT_ROOT") @Execution(ExecutionMode.SAME_THREAD) - public class Booleans extends AbstractFirDiagnosticsWithLightTreeTest { + public class Booleans { @Test public void testAllFilesPresentInBooleans() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolve/smartcasts/booleans"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -3234,7 +3246,7 @@ public class FirDiagnosticsWithLightTreeTestGenerated extends AbstractFirDiagnos @TestMetadata("compiler/fir/analysis-tests/testData/resolve/smartcasts/boundSmartcasts") @TestDataPath("$PROJECT_ROOT") @Execution(ExecutionMode.SAME_THREAD) - public class BoundSmartcasts extends AbstractFirDiagnosticsWithLightTreeTest { + public class BoundSmartcasts { @Test public void testAllFilesPresentInBoundSmartcasts() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolve/smartcasts/boundSmartcasts"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -3263,7 +3275,7 @@ public class FirDiagnosticsWithLightTreeTestGenerated extends AbstractFirDiagnos @TestMetadata("compiler/fir/analysis-tests/testData/resolve/smartcasts/controlStructures") @TestDataPath("$PROJECT_ROOT") @Execution(ExecutionMode.SAME_THREAD) - public class ControlStructures extends AbstractFirDiagnosticsWithLightTreeTest { + public class ControlStructures { @Test public void testAllFilesPresentInControlStructures() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolve/smartcasts/controlStructures"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -3304,7 +3316,7 @@ public class FirDiagnosticsWithLightTreeTestGenerated extends AbstractFirDiagnos @TestMetadata("compiler/fir/analysis-tests/testData/resolve/smartcasts/lambdas") @TestDataPath("$PROJECT_ROOT") @Execution(ExecutionMode.SAME_THREAD) - public class Lambdas extends AbstractFirDiagnosticsWithLightTreeTest { + public class Lambdas { @Test public void testAllFilesPresentInLambdas() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolve/smartcasts/lambdas"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -3333,7 +3345,7 @@ public class FirDiagnosticsWithLightTreeTestGenerated extends AbstractFirDiagnos @TestMetadata("compiler/fir/analysis-tests/testData/resolve/smartcasts/loops") @TestDataPath("$PROJECT_ROOT") @Execution(ExecutionMode.SAME_THREAD) - public class Loops extends AbstractFirDiagnosticsWithLightTreeTest { + public class Loops { @Test public void testAllFilesPresentInLoops() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolve/smartcasts/loops"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -3356,7 +3368,7 @@ public class FirDiagnosticsWithLightTreeTestGenerated extends AbstractFirDiagnos @TestMetadata("compiler/fir/analysis-tests/testData/resolve/smartcasts/problems") @TestDataPath("$PROJECT_ROOT") @Execution(ExecutionMode.SAME_THREAD) - public class Problems extends AbstractFirDiagnosticsWithLightTreeTest { + public class Problems { @Test public void testAllFilesPresentInProblems() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolve/smartcasts/problems"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -3373,7 +3385,7 @@ public class FirDiagnosticsWithLightTreeTestGenerated extends AbstractFirDiagnos @TestMetadata("compiler/fir/analysis-tests/testData/resolve/smartcasts/receivers") @TestDataPath("$PROJECT_ROOT") @Execution(ExecutionMode.SAME_THREAD) - public class Receivers extends AbstractFirDiagnosticsWithLightTreeTest { + public class Receivers { @Test public void testAllFilesPresentInReceivers() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolve/smartcasts/receivers"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -3408,7 +3420,7 @@ public class FirDiagnosticsWithLightTreeTestGenerated extends AbstractFirDiagnos @TestMetadata("compiler/fir/analysis-tests/testData/resolve/smartcasts/safeCalls") @TestDataPath("$PROJECT_ROOT") @Execution(ExecutionMode.SAME_THREAD) - public class SafeCalls extends AbstractFirDiagnosticsWithLightTreeTest { + public class SafeCalls { @Test public void testAllFilesPresentInSafeCalls() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolve/smartcasts/safeCalls"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -3443,7 +3455,7 @@ public class FirDiagnosticsWithLightTreeTestGenerated extends AbstractFirDiagnos @TestMetadata("compiler/fir/analysis-tests/testData/resolve/smartcasts/stability") @TestDataPath("$PROJECT_ROOT") @Execution(ExecutionMode.SAME_THREAD) - public class Stability extends AbstractFirDiagnosticsWithLightTreeTest { + public class Stability { @Test public void testAllFilesPresentInStability() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolve/smartcasts/stability"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -3460,7 +3472,7 @@ public class FirDiagnosticsWithLightTreeTestGenerated extends AbstractFirDiagnos @TestMetadata("compiler/fir/analysis-tests/testData/resolve/smartcasts/variables") @TestDataPath("$PROJECT_ROOT") @Execution(ExecutionMode.SAME_THREAD) - public class Variables extends AbstractFirDiagnosticsWithLightTreeTest { + public class Variables { @Test public void testAllFilesPresentInVariables() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolve/smartcasts/variables"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -3484,7 +3496,7 @@ public class FirDiagnosticsWithLightTreeTestGenerated extends AbstractFirDiagnos @TestMetadata("compiler/fir/analysis-tests/testData/resolve/stdlib") @TestDataPath("$PROJECT_ROOT") @Execution(ExecutionMode.SAME_THREAD) - public class Stdlib extends AbstractFirDiagnosticsWithLightTreeTest { + public class Stdlib { @Test public void testAllFilesPresentInStdlib() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolve/stdlib"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -3494,7 +3506,7 @@ public class FirDiagnosticsWithLightTreeTestGenerated extends AbstractFirDiagnos @TestMetadata("compiler/fir/analysis-tests/testData/resolve/stdlib/j+k") @TestDataPath("$PROJECT_ROOT") @Execution(ExecutionMode.SAME_THREAD) - public class J_k extends AbstractFirDiagnosticsWithLightTreeTest { + public class J_k { @Test public void testAllFilesPresentInJ_k() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolve/stdlib/j+k"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -3514,11 +3526,46 @@ public class FirDiagnosticsWithLightTreeTestGenerated extends AbstractFirDiagnos } } + @Nested + @TestMetadata("compiler/fir/analysis-tests/testData/resolve/suppress") + @TestDataPath("$PROJECT_ROOT") + @Execution(ExecutionMode.SAME_THREAD) + public class Suppress { + @Test + public void testAllFilesPresentInSuppress() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolve/suppress"), Pattern.compile("^([^.]+)\\.kt$"), null, true); + } + + @Test + @TestMetadata("allWarnings.kt") + public void testAllWarnings() throws Exception { + runTest("compiler/fir/analysis-tests/testData/resolve/suppress/allWarnings.kt"); + } + + @Test + @TestMetadata("multipleWarnings.kt") + public void testMultipleWarnings() throws Exception { + runTest("compiler/fir/analysis-tests/testData/resolve/suppress/multipleWarnings.kt"); + } + + @Test + @TestMetadata("singleError.kt") + public void testSingleError() throws Exception { + runTest("compiler/fir/analysis-tests/testData/resolve/suppress/singleError.kt"); + } + + @Test + @TestMetadata("singleWarning.kt") + public void testSingleWarning() throws Exception { + runTest("compiler/fir/analysis-tests/testData/resolve/suppress/singleWarning.kt"); + } + } + @Nested @TestMetadata("compiler/fir/analysis-tests/testData/resolve/types") @TestDataPath("$PROJECT_ROOT") @Execution(ExecutionMode.SAME_THREAD) - public class Types extends AbstractFirDiagnosticsWithLightTreeTest { + public class Types { @Test public void testAllFilesPresentInTypes() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolve/types"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -3541,7 +3588,7 @@ public class FirDiagnosticsWithLightTreeTestGenerated extends AbstractFirDiagnos @TestMetadata("compiler/fir/analysis-tests/testData/resolve/visibility") @TestDataPath("$PROJECT_ROOT") @Execution(ExecutionMode.SAME_THREAD) - public class Visibility extends AbstractFirDiagnosticsWithLightTreeTest { + public class Visibility { @Test public void testAllFilesPresentInVisibility() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolve/visibility"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -3619,7 +3666,7 @@ public class FirDiagnosticsWithLightTreeTestGenerated extends AbstractFirDiagnos @TestMetadata("compiler/fir/analysis-tests/testData/resolveWithStdlib") @TestDataPath("$PROJECT_ROOT") @Execution(ExecutionMode.SAME_THREAD) - public class ResolveWithStdlib extends AbstractFirDiagnosticsWithLightTreeTest { + public class ResolveWithStdlib { @Test @TestMetadata("addAllOnJavaCollection.kt") public void testAddAllOnJavaCollection() throws Exception { @@ -3959,7 +4006,7 @@ public class FirDiagnosticsWithLightTreeTestGenerated extends AbstractFirDiagnos @TestMetadata("compiler/fir/analysis-tests/testData/resolveWithStdlib/callableReferences") @TestDataPath("$PROJECT_ROOT") @Execution(ExecutionMode.SAME_THREAD) - public class CallableReferences extends AbstractFirDiagnosticsWithLightTreeTest { + public class CallableReferences { @Test public void testAllFilesPresentInCallableReferences() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolveWithStdlib/callableReferences"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -4107,7 +4154,7 @@ public class FirDiagnosticsWithLightTreeTestGenerated extends AbstractFirDiagnos @TestMetadata("compiler/fir/analysis-tests/testData/resolveWithStdlib/callableReferences/fromBasicDiagnosticTests") @TestDataPath("$PROJECT_ROOT") @Execution(ExecutionMode.SAME_THREAD) - public class FromBasicDiagnosticTests extends AbstractFirDiagnosticsWithLightTreeTest { + public class FromBasicDiagnosticTests { @Test public void testAllFilesPresentInFromBasicDiagnosticTests() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolveWithStdlib/callableReferences/fromBasicDiagnosticTests"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -4197,7 +4244,7 @@ public class FirDiagnosticsWithLightTreeTestGenerated extends AbstractFirDiagnos @TestMetadata("compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts") @TestDataPath("$PROJECT_ROOT") @Execution(ExecutionMode.SAME_THREAD) - public class Contracts extends AbstractFirDiagnosticsWithLightTreeTest { + public class Contracts { @Test public void testAllFilesPresentInContracts() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -4207,7 +4254,7 @@ public class FirDiagnosticsWithLightTreeTestGenerated extends AbstractFirDiagnos @TestMetadata("compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromLibrary") @TestDataPath("$PROJECT_ROOT") @Execution(ExecutionMode.SAME_THREAD) - public class FromLibrary extends AbstractFirDiagnosticsWithLightTreeTest { + public class FromLibrary { @Test public void testAllFilesPresentInFromLibrary() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromLibrary"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -4236,7 +4283,7 @@ public class FirDiagnosticsWithLightTreeTestGenerated extends AbstractFirDiagnos @TestMetadata("compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource") @TestDataPath("$PROJECT_ROOT") @Execution(ExecutionMode.SAME_THREAD) - public class FromSource extends AbstractFirDiagnosticsWithLightTreeTest { + public class FromSource { @Test public void testAllFilesPresentInFromSource() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -4246,7 +4293,7 @@ public class FirDiagnosticsWithLightTreeTestGenerated extends AbstractFirDiagnos @TestMetadata("compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/bad") @TestDataPath("$PROJECT_ROOT") @Execution(ExecutionMode.SAME_THREAD) - public class Bad extends AbstractFirDiagnosticsWithLightTreeTest { + public class Bad { @Test public void testAllFilesPresentInBad() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/bad"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -4256,7 +4303,7 @@ public class FirDiagnosticsWithLightTreeTestGenerated extends AbstractFirDiagnos @TestMetadata("compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/bad/callsInPlace") @TestDataPath("$PROJECT_ROOT") @Execution(ExecutionMode.SAME_THREAD) - public class CallsInPlace extends AbstractFirDiagnosticsWithLightTreeTest { + public class CallsInPlace { @Test public void testAllFilesPresentInCallsInPlace() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/bad/callsInPlace"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -4291,7 +4338,7 @@ public class FirDiagnosticsWithLightTreeTestGenerated extends AbstractFirDiagnos @TestMetadata("compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/bad/returnsImplies") @TestDataPath("$PROJECT_ROOT") @Execution(ExecutionMode.SAME_THREAD) - public class ReturnsImplies extends AbstractFirDiagnosticsWithLightTreeTest { + public class ReturnsImplies { @Test public void testAllFilesPresentInReturnsImplies() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/bad/returnsImplies"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -4315,7 +4362,7 @@ public class FirDiagnosticsWithLightTreeTestGenerated extends AbstractFirDiagnos @TestMetadata("compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good") @TestDataPath("$PROJECT_ROOT") @Execution(ExecutionMode.SAME_THREAD) - public class Good extends AbstractFirDiagnosticsWithLightTreeTest { + public class Good { @Test public void testAllFilesPresentInGood() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -4325,7 +4372,7 @@ public class FirDiagnosticsWithLightTreeTestGenerated extends AbstractFirDiagnos @TestMetadata("compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace") @TestDataPath("$PROJECT_ROOT") @Execution(ExecutionMode.SAME_THREAD) - public class CallsInPlace extends AbstractFirDiagnosticsWithLightTreeTest { + public class CallsInPlace { @Test public void testAllFilesPresentInCallsInPlace() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -4384,7 +4431,7 @@ public class FirDiagnosticsWithLightTreeTestGenerated extends AbstractFirDiagnos @TestMetadata("compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/returnsImplies") @TestDataPath("$PROJECT_ROOT") @Execution(ExecutionMode.SAME_THREAD) - public class ReturnsImplies extends AbstractFirDiagnosticsWithLightTreeTest { + public class ReturnsImplies { @Test public void testAllFilesPresentInReturnsImplies() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/returnsImplies"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -4461,7 +4508,7 @@ public class FirDiagnosticsWithLightTreeTestGenerated extends AbstractFirDiagnos @TestMetadata("compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/variousContracts") @TestDataPath("$PROJECT_ROOT") @Execution(ExecutionMode.SAME_THREAD) - public class VariousContracts extends AbstractFirDiagnosticsWithLightTreeTest { + public class VariousContracts { @Test public void testAllFilesPresentInVariousContracts() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/variousContracts"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -4471,7 +4518,7 @@ public class FirDiagnosticsWithLightTreeTestGenerated extends AbstractFirDiagnos @TestMetadata("compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/variousContracts/newSyntax") @TestDataPath("$PROJECT_ROOT") @Execution(ExecutionMode.SAME_THREAD) - public class NewSyntax extends AbstractFirDiagnosticsWithLightTreeTest { + public class NewSyntax { @Test public void testAllFilesPresentInNewSyntax() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/variousContracts/newSyntax"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -4492,7 +4539,7 @@ public class FirDiagnosticsWithLightTreeTestGenerated extends AbstractFirDiagnos @TestMetadata("compiler/fir/analysis-tests/testData/resolveWithStdlib/delegates") @TestDataPath("$PROJECT_ROOT") @Execution(ExecutionMode.SAME_THREAD) - public class Delegates extends AbstractFirDiagnosticsWithLightTreeTest { + public class Delegates { @Test public void testAllFilesPresentInDelegates() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolveWithStdlib/delegates"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -4539,7 +4586,7 @@ public class FirDiagnosticsWithLightTreeTestGenerated extends AbstractFirDiagnos @TestMetadata("compiler/fir/analysis-tests/testData/resolveWithStdlib/inference") @TestDataPath("$PROJECT_ROOT") @Execution(ExecutionMode.SAME_THREAD) - public class Inference extends AbstractFirDiagnosticsWithLightTreeTest { + public class Inference { @Test public void testAllFilesPresentInInference() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolveWithStdlib/inference"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -4592,7 +4639,7 @@ public class FirDiagnosticsWithLightTreeTestGenerated extends AbstractFirDiagnos @TestMetadata("compiler/fir/analysis-tests/testData/resolveWithStdlib/initialization") @TestDataPath("$PROJECT_ROOT") @Execution(ExecutionMode.SAME_THREAD) - public class Initialization extends AbstractFirDiagnosticsWithLightTreeTest { + public class Initialization { @Test public void testAllFilesPresentInInitialization() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolveWithStdlib/initialization"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -4609,7 +4656,7 @@ public class FirDiagnosticsWithLightTreeTestGenerated extends AbstractFirDiagnos @TestMetadata("compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k") @TestDataPath("$PROJECT_ROOT") @Execution(ExecutionMode.SAME_THREAD) - public class J_k extends AbstractFirDiagnosticsWithLightTreeTest { + public class J_k { @Test public void testAllFilesPresentInJ_k() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -4902,7 +4949,7 @@ public class FirDiagnosticsWithLightTreeTestGenerated extends AbstractFirDiagnos @TestMetadata("compiler/fir/analysis-tests/testData/resolveWithStdlib/multiModule") @TestDataPath("$PROJECT_ROOT") @Execution(ExecutionMode.SAME_THREAD) - public class MultiModule extends AbstractFirDiagnosticsWithLightTreeTest { + public class MultiModule { @Test public void testAllFilesPresentInMultiModule() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolveWithStdlib/multiModule"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -4943,7 +4990,7 @@ public class FirDiagnosticsWithLightTreeTestGenerated extends AbstractFirDiagnos @TestMetadata("compiler/fir/analysis-tests/testData/resolveWithStdlib/problems") @TestDataPath("$PROJECT_ROOT") @Execution(ExecutionMode.SAME_THREAD) - public class Problems extends AbstractFirDiagnosticsWithLightTreeTest { + public class Problems { @Test public void testAllFilesPresentInProblems() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolveWithStdlib/problems"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -5009,6 +5056,12 @@ public class FirDiagnosticsWithLightTreeTestGenerated extends AbstractFirDiagnos runTest("compiler/fir/analysis-tests/testData/resolveWithStdlib/problems/TypesEligibleForSimpleVisit.kt"); } + @Test + @TestMetadata("valueOfOrNull.kt") + public void testValueOfOrNull() throws Exception { + runTest("compiler/fir/analysis-tests/testData/resolveWithStdlib/problems/valueOfOrNull.kt"); + } + @Test @TestMetadata("weakHashMap.kt") public void testWeakHashMap() throws Exception { @@ -5020,7 +5073,7 @@ public class FirDiagnosticsWithLightTreeTestGenerated extends AbstractFirDiagnos @TestMetadata("compiler/fir/analysis-tests/testData/resolveWithStdlib/reinitializations") @TestDataPath("$PROJECT_ROOT") @Execution(ExecutionMode.SAME_THREAD) - public class Reinitializations extends AbstractFirDiagnosticsWithLightTreeTest { + public class Reinitializations { @Test public void testAllFilesPresentInReinitializations() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolveWithStdlib/reinitializations"), Pattern.compile("^([^.]+)\\.kt$"), null, true); @@ -5037,7 +5090,7 @@ public class FirDiagnosticsWithLightTreeTestGenerated extends AbstractFirDiagnos @TestMetadata("compiler/fir/analysis-tests/testData/resolveWithStdlib/smartcasts") @TestDataPath("$PROJECT_ROOT") @Execution(ExecutionMode.SAME_THREAD) - public class Smartcasts extends AbstractFirDiagnosticsWithLightTreeTest { + public class Smartcasts { @Test public void testAllFilesPresentInSmartcasts() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolveWithStdlib/smartcasts"), Pattern.compile("^([^.]+)\\.kt$"), null, true); diff --git a/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirOldFrontendDiagnosticsTestGenerated.java b/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirOldFrontendDiagnosticsTestGenerated.java index 4f3716e24a4..e0d4ca07cfb 100644 --- a/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirOldFrontendDiagnosticsTestGenerated.java +++ b/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirOldFrontendDiagnosticsTestGenerated.java @@ -20,7 +20,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests") @TestDataPath("$PROJECT_ROOT") - public class Tests extends AbstractFirDiagnosticTest { + public class Tests { @Test @TestMetadata("Abstract.kt") public void testAbstract() throws Exception { @@ -686,6 +686,12 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti runTest("compiler/testData/diagnostics/tests/SafeCallOnSuperReceiver.kt"); } + @Test + @TestMetadata("SafeCallUnknownType.kt") + public void testSafeCallUnknownType() throws Exception { + runTest("compiler/testData/diagnostics/tests/SafeCallUnknownType.kt"); + } + @Test @TestMetadata("Serializable.kt") public void testSerializable() throws Exception { @@ -905,7 +911,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/annotations") @TestDataPath("$PROJECT_ROOT") - public class Annotations extends AbstractFirDiagnosticTest { + public class Annotations { @Test public void testAllFilesPresentInAnnotations() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/annotations"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -1370,7 +1376,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/annotations/annotationParameterMustBeConstant") @TestDataPath("$PROJECT_ROOT") - public class AnnotationParameterMustBeConstant extends AbstractFirDiagnosticTest { + public class AnnotationParameterMustBeConstant { @Test public void testAllFilesPresentInAnnotationParameterMustBeConstant() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/annotations/annotationParameterMustBeConstant"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -1434,7 +1440,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/annotations/functionalTypes") @TestDataPath("$PROJECT_ROOT") - public class FunctionalTypes extends AbstractFirDiagnosticTest { + public class FunctionalTypes { @Test public void testAllFilesPresentInFunctionalTypes() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/annotations/functionalTypes"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -1468,7 +1474,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/annotations/options") @TestDataPath("$PROJECT_ROOT") - public class Options extends AbstractFirDiagnosticTest { + public class Options { @Test public void testAllFilesPresentInOptions() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/annotations/options"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -1585,7 +1591,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/annotations/options/targets") @TestDataPath("$PROJECT_ROOT") - public class Targets extends AbstractFirDiagnosticTest { + public class Targets { @Test @TestMetadata("accessors.kt") public void testAccessors() throws Exception { @@ -1728,7 +1734,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/annotations/rendering") @TestDataPath("$PROJECT_ROOT") - public class Rendering extends AbstractFirDiagnosticTest { + public class Rendering { @Test public void testAllFilesPresentInRendering() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/annotations/rendering"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -1804,7 +1810,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/annotations/withUseSiteTarget") @TestDataPath("$PROJECT_ROOT") - public class WithUseSiteTarget extends AbstractFirDiagnosticTest { + public class WithUseSiteTarget { @Test public void testAllFilesPresentInWithUseSiteTarget() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/annotations/withUseSiteTarget"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -1959,7 +1965,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/backingField") @TestDataPath("$PROJECT_ROOT") - public class BackingField extends AbstractFirDiagnosticTest { + public class BackingField { @Test public void testAllFilesPresentInBackingField() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/backingField"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -2089,7 +2095,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/callableReference") @TestDataPath("$PROJECT_ROOT") - public class CallableReference extends AbstractFirDiagnosticTest { + public class CallableReference { @Test public void testAllFilesPresentInCallableReference() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/callableReference"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -2380,7 +2386,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/callableReference/bound") @TestDataPath("$PROJECT_ROOT") - public class Bound extends AbstractFirDiagnosticTest { + public class Bound { @Test public void testAllFilesPresentInBound() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/callableReference/bound"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -2504,7 +2510,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/callableReference/function") @TestDataPath("$PROJECT_ROOT") - public class Function extends AbstractFirDiagnosticTest { + public class Function { @Test @TestMetadata("abstractClassConstructors.kt") public void testAbstractClassConstructors() throws Exception { @@ -2820,7 +2826,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/callableReference/generic") @TestDataPath("$PROJECT_ROOT") - public class Generic extends AbstractFirDiagnosticTest { + public class Generic { @Test public void testAllFilesPresentInGeneric() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/callableReference/generic"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -2932,7 +2938,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/callableReference/property") @TestDataPath("$PROJECT_ROOT") - public class Property extends AbstractFirDiagnosticTest { + public class Property { @Test @TestMetadata("abstractPropertyViaSubclasses.kt") public void testAbstractPropertyViaSubclasses() throws Exception { @@ -3044,7 +3050,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/callableReference/resolve") @TestDataPath("$PROJECT_ROOT") - public class Resolve extends AbstractFirDiagnosticTest { + public class Resolve { @Test @TestMetadata("adaptedReferenceAgainstKCallable.kt") public void testAdaptedReferenceAgainstKCallable() throws Exception { @@ -3354,7 +3360,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/callableReference/unsupported") @TestDataPath("$PROJECT_ROOT") - public class Unsupported extends AbstractFirDiagnosticTest { + public class Unsupported { @Test public void testAllFilesPresentInUnsupported() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/callableReference/unsupported"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -3395,7 +3401,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/cast") @TestDataPath("$PROJECT_ROOT") - public class Cast extends AbstractFirDiagnosticTest { + public class Cast { @Test public void testAllFilesPresentInCast() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/cast"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -3770,7 +3776,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/cast/bare") @TestDataPath("$PROJECT_ROOT") - public class Bare extends AbstractFirDiagnosticTest { + public class Bare { @Test public void testAllFilesPresentInBare() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/cast/bare"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -3894,7 +3900,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/cast/neverSucceeds") @TestDataPath("$PROJECT_ROOT") - public class NeverSucceeds extends AbstractFirDiagnosticTest { + public class NeverSucceeds { @Test public void testAllFilesPresentInNeverSucceeds() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/cast/neverSucceeds"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -3935,7 +3941,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/checkArguments") @TestDataPath("$PROJECT_ROOT") - public class CheckArguments extends AbstractFirDiagnosticTest { + public class CheckArguments { @Test public void testAllFilesPresentInCheckArguments() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/checkArguments"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -4005,7 +4011,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/classLiteral") @TestDataPath("$PROJECT_ROOT") - public class ClassLiteral extends AbstractFirDiagnosticTest { + public class ClassLiteral { @Test public void testAllFilesPresentInClassLiteral() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/classLiteral"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -4105,7 +4111,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/classObjects") @TestDataPath("$PROJECT_ROOT") - public class ClassObjects extends AbstractFirDiagnosticTest { + public class ClassObjects { @Test public void testAllFilesPresentInClassObjects() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/classObjects"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -4241,7 +4247,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/collectionLiterals") @TestDataPath("$PROJECT_ROOT") - public class CollectionLiterals extends AbstractFirDiagnosticTest { + public class CollectionLiterals { @Test public void testAllFilesPresentInCollectionLiterals() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/collectionLiterals"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -4317,7 +4323,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/constructorConsistency") @TestDataPath("$PROJECT_ROOT") - public class ConstructorConsistency extends AbstractFirDiagnosticTest { + public class ConstructorConsistency { @Test @TestMetadata("afterInitialization.kt") public void testAfterInitialization() throws Exception { @@ -4483,7 +4489,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis") @TestDataPath("$PROJECT_ROOT") - public class ControlFlowAnalysis extends AbstractFirDiagnosticTest { + public class ControlFlowAnalysis { @Test public void testAllFilesPresentInControlFlowAnalysis() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/controlFlowAnalysis"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -5008,7 +5014,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode") @TestDataPath("$PROJECT_ROOT") - public class DeadCode extends AbstractFirDiagnosticTest { + public class DeadCode { @Test public void testAllFilesPresentInDeadCode() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -5168,7 +5174,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/definiteReturn") @TestDataPath("$PROJECT_ROOT") - public class DefiniteReturn extends AbstractFirDiagnosticTest { + public class DefiniteReturn { @Test public void testAllFilesPresentInDefiniteReturn() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/controlFlowAnalysis/definiteReturn"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -5202,7 +5208,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/unnecessaryLateinit") @TestDataPath("$PROJECT_ROOT") - public class UnnecessaryLateinit extends AbstractFirDiagnosticTest { + public class UnnecessaryLateinit { @Test public void testAllFilesPresentInUnnecessaryLateinit() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/controlFlowAnalysis/unnecessaryLateinit"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -5285,7 +5291,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/controlStructures") @TestDataPath("$PROJECT_ROOT") - public class ControlStructures extends AbstractFirDiagnosticTest { + public class ControlStructures { @Test public void testAllFilesPresentInControlStructures() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/controlStructures"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -5559,7 +5565,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/coroutines") @TestDataPath("$PROJECT_ROOT") - public class Coroutines extends AbstractFirDiagnosticTest { + public class Coroutines { @Test public void testAllFilesPresentInCoroutines() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/coroutines"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -5580,7 +5586,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/coroutines/callableReference") @TestDataPath("$PROJECT_ROOT") - public class CallableReference extends AbstractFirDiagnosticTest { + public class CallableReference { @Test public void testAllFilesPresentInCallableReference() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/coroutines/callableReference"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -5603,7 +5609,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/cyclicHierarchy") @TestDataPath("$PROJECT_ROOT") - public class CyclicHierarchy extends AbstractFirDiagnosticTest { + public class CyclicHierarchy { @Test public void testAllFilesPresentInCyclicHierarchy() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/cyclicHierarchy"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -5702,7 +5708,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/cyclicHierarchy/withCompanion") @TestDataPath("$PROJECT_ROOT") - public class WithCompanion extends AbstractFirDiagnosticTest { + public class WithCompanion { @Test public void testAllFilesPresentInWithCompanion() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/cyclicHierarchy/withCompanion"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -5785,7 +5791,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/dataClasses") @TestDataPath("$PROJECT_ROOT") - public class DataClasses extends AbstractFirDiagnosticTest { + public class DataClasses { @Test public void testAllFilesPresentInDataClasses() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/dataClasses"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -5987,7 +5993,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/dataFlow") @TestDataPath("$PROJECT_ROOT") - public class DataFlow extends AbstractFirDiagnosticTest { + public class DataFlow { @Test public void testAllFilesPresentInDataFlow() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/dataFlow"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -6020,7 +6026,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/dataFlow/assignment") @TestDataPath("$PROJECT_ROOT") - public class Assignment extends AbstractFirDiagnosticTest { + public class Assignment { @Test public void testAllFilesPresentInAssignment() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/dataFlow/assignment"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -6060,7 +6066,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/dataFlow/local") @TestDataPath("$PROJECT_ROOT") - public class Local extends AbstractFirDiagnosticTest { + public class Local { @Test public void testAllFilesPresentInLocal() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/dataFlow/local"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -6143,7 +6149,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal") @TestDataPath("$PROJECT_ROOT") - public class DataFlowInfoTraversal extends AbstractFirDiagnosticTest { + public class DataFlowInfoTraversal { @Test public void testAllFilesPresentInDataFlowInfoTraversal() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/dataFlowInfoTraversal"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -6464,7 +6470,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/smartcasts") @TestDataPath("$PROJECT_ROOT") - public class Smartcasts extends AbstractFirDiagnosticTest { + public class Smartcasts { @Test public void testAllFilesPresentInSmartcasts() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/smartcasts"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -6487,7 +6493,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/declarationChecks") @TestDataPath("$PROJECT_ROOT") - public class DeclarationChecks extends AbstractFirDiagnosticTest { + public class DeclarationChecks { @Test public void testAllFilesPresentInDeclarationChecks() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/declarationChecks"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -6706,7 +6712,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations") @TestDataPath("$PROJECT_ROOT") - public class DestructuringDeclarations extends AbstractFirDiagnosticTest { + public class DestructuringDeclarations { @Test public void testAllFilesPresentInDestructuringDeclarations() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -6800,7 +6806,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/declarationChecks/finiteBoundRestriction") @TestDataPath("$PROJECT_ROOT") - public class FiniteBoundRestriction extends AbstractFirDiagnosticTest { + public class FiniteBoundRestriction { @Test public void testAllFilesPresentInFiniteBoundRestriction() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/declarationChecks/finiteBoundRestriction"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -6828,7 +6834,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/declarationChecks/nonExpansiveInheritanceRestriction") @TestDataPath("$PROJECT_ROOT") - public class NonExpansiveInheritanceRestriction extends AbstractFirDiagnosticTest { + public class NonExpansiveInheritanceRestriction { @Test public void testAllFilesPresentInNonExpansiveInheritanceRestriction() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/declarationChecks/nonExpansiveInheritanceRestriction"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -6857,7 +6863,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/defaultArguments") @TestDataPath("$PROJECT_ROOT") - public class DefaultArguments extends AbstractFirDiagnosticTest { + public class DefaultArguments { @Test public void testAllFilesPresentInDefaultArguments() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/defaultArguments"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -6879,7 +6885,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/delegatedProperty") @TestDataPath("$PROJECT_ROOT") - public class DelegatedProperty extends AbstractFirDiagnosticTest { + public class DelegatedProperty { @Test @TestMetadata("absentErrorAboutInitializer.kt") public void testAbsentErrorAboutInitializer() throws Exception { @@ -7116,7 +7122,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/delegatedProperty/inference") @TestDataPath("$PROJECT_ROOT") - public class Inference extends AbstractFirDiagnosticTest { + public class Inference { @Test public void testAllFilesPresentInInference() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/delegatedProperty/inference"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -7228,7 +7234,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate") @TestDataPath("$PROJECT_ROOT") - public class ProvideDelegate extends AbstractFirDiagnosticTest { + public class ProvideDelegate { @Test public void testAllFilesPresentInProvideDelegate() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -7341,7 +7347,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/delegation") @TestDataPath("$PROJECT_ROOT") - public class Delegation extends AbstractFirDiagnosticTest { + public class Delegation { @Test public void testAllFilesPresentInDelegation() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/delegation"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -7410,7 +7416,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/delegation/clashes") @TestDataPath("$PROJECT_ROOT") - public class Clashes extends AbstractFirDiagnosticTest { + public class Clashes { @Test public void testAllFilesPresentInClashes() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/delegation/clashes"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -7444,7 +7450,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/delegation/covariantOverrides") @TestDataPath("$PROJECT_ROOT") - public class CovariantOverrides extends AbstractFirDiagnosticTest { + public class CovariantOverrides { @Test public void testAllFilesPresentInCovariantOverrides() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/delegation/covariantOverrides"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -7478,7 +7484,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/delegation/memberHidesSupertypeOverride") @TestDataPath("$PROJECT_ROOT") - public class MemberHidesSupertypeOverride extends AbstractFirDiagnosticTest { + public class MemberHidesSupertypeOverride { @Test @TestMetadata("abstractOverride.kt") public void testAbstractOverride() throws Exception { @@ -7579,7 +7585,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/deparenthesize") @TestDataPath("$PROJECT_ROOT") - public class Deparenthesize extends AbstractFirDiagnosticTest { + public class Deparenthesize { @Test public void testAllFilesPresentInDeparenthesize() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/deparenthesize"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -7625,7 +7631,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/deprecated") @TestDataPath("$PROJECT_ROOT") - public class Deprecated extends AbstractFirDiagnosticTest { + public class Deprecated { @Test public void testAllFilesPresentInDeprecated() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/deprecated"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -7832,7 +7838,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/deprecated/deprecatedSinceKotlin") @TestDataPath("$PROJECT_ROOT") - public class DeprecatedSinceKotlin extends AbstractFirDiagnosticTest { + public class DeprecatedSinceKotlin { @Test public void testAllFilesPresentInDeprecatedSinceKotlin() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/deprecated/deprecatedSinceKotlin"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -7897,7 +7903,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature") @TestDataPath("$PROJECT_ROOT") - public class DuplicateJvmSignature extends AbstractFirDiagnosticTest { + public class DuplicateJvmSignature { @Test public void testAllFilesPresentInDuplicateJvmSignature() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/duplicateJvmSignature"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -7924,7 +7930,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/accidentalOverrides") @TestDataPath("$PROJECT_ROOT") - public class AccidentalOverrides extends AbstractFirDiagnosticTest { + public class AccidentalOverrides { @Test @TestMetadata("accidentalOverrideFromGrandparent.kt") public void testAccidentalOverrideFromGrandparent() throws Exception { @@ -8024,7 +8030,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/bridges") @TestDataPath("$PROJECT_ROOT") - public class Bridges extends AbstractFirDiagnosticTest { + public class Bridges { @Test public void testAllFilesPresentInBridges() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/duplicateJvmSignature/bridges"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -8052,7 +8058,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/erasure") @TestDataPath("$PROJECT_ROOT") - public class Erasure extends AbstractFirDiagnosticTest { + public class Erasure { @Test public void testAllFilesPresentInErasure() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/duplicateJvmSignature/erasure"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -8164,7 +8170,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/finalMembersFromBuiltIns") @TestDataPath("$PROJECT_ROOT") - public class FinalMembersFromBuiltIns extends AbstractFirDiagnosticTest { + public class FinalMembersFromBuiltIns { @Test public void testAllFilesPresentInFinalMembersFromBuiltIns() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/duplicateJvmSignature/finalMembersFromBuiltIns"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -8186,7 +8192,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/functionAndProperty") @TestDataPath("$PROJECT_ROOT") - public class FunctionAndProperty extends AbstractFirDiagnosticTest { + public class FunctionAndProperty { @Test public void testAllFilesPresentInFunctionAndProperty() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/duplicateJvmSignature/functionAndProperty"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -8310,7 +8316,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/specialNames") @TestDataPath("$PROJECT_ROOT") - public class SpecialNames extends AbstractFirDiagnosticTest { + public class SpecialNames { @Test public void testAllFilesPresentInSpecialNames() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/duplicateJvmSignature/specialNames"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -8374,7 +8380,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/statics") @TestDataPath("$PROJECT_ROOT") - public class Statics extends AbstractFirDiagnosticTest { + public class Statics { @Test public void testAllFilesPresentInStatics() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/duplicateJvmSignature/statics"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -8420,7 +8426,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/synthesized") @TestDataPath("$PROJECT_ROOT") - public class Synthesized extends AbstractFirDiagnosticTest { + public class Synthesized { @Test public void testAllFilesPresentInSynthesized() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/duplicateJvmSignature/synthesized"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -8436,7 +8442,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/traitImpl") @TestDataPath("$PROJECT_ROOT") - public class TraitImpl extends AbstractFirDiagnosticTest { + public class TraitImpl { @Test public void testAllFilesPresentInTraitImpl() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/duplicateJvmSignature/traitImpl"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -8471,7 +8477,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/dynamicTypes") @TestDataPath("$PROJECT_ROOT") - public class DynamicTypes extends AbstractFirDiagnosticTest { + public class DynamicTypes { @Test public void testAllFilesPresentInDynamicTypes() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/dynamicTypes"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -8499,7 +8505,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/enum") @TestDataPath("$PROJECT_ROOT") - public class Enum extends AbstractFirDiagnosticTest { + public class Enum { @Test @TestMetadata("AbstractEnum.kt") public void testAbstractEnum() throws Exception { @@ -8868,7 +8874,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/enum/inner") @TestDataPath("$PROJECT_ROOT") - public class Inner extends AbstractFirDiagnosticTest { + public class Inner { @Test public void testAllFilesPresentInInner() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/enum/inner"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -8951,7 +8957,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/evaluate") @TestDataPath("$PROJECT_ROOT") - public class Evaluate extends AbstractFirDiagnosticTest { + public class Evaluate { @Test public void testAllFilesPresentInEvaluate() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/evaluate"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -9098,7 +9104,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/evaluate/inlineClasses") @TestDataPath("$PROJECT_ROOT") - public class InlineClasses extends AbstractFirDiagnosticTest { + public class InlineClasses { @Test public void testAllFilesPresentInInlineClasses() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/evaluate/inlineClasses"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -9115,7 +9121,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/exceptions") @TestDataPath("$PROJECT_ROOT") - public class Exceptions extends AbstractFirDiagnosticTest { + public class Exceptions { @Test public void testAllFilesPresentInExceptions() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/exceptions"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -9131,7 +9137,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/exposed") @TestDataPath("$PROJECT_ROOT") - public class Exposed extends AbstractFirDiagnosticTest { + public class Exposed { @Test public void testAllFilesPresentInExposed() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/exposed"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -9309,7 +9315,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/extensions") @TestDataPath("$PROJECT_ROOT") - public class Extensions extends AbstractFirDiagnosticTest { + public class Extensions { @Test public void testAllFilesPresentInExtensions() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/extensions"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -9421,7 +9427,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/funInterface") @TestDataPath("$PROJECT_ROOT") - public class FunInterface extends AbstractFirDiagnosticTest { + public class FunInterface { @Test public void testAllFilesPresentInFunInterface() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/funInterface"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -9515,7 +9521,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/functionAsExpression") @TestDataPath("$PROJECT_ROOT") - public class FunctionAsExpression extends AbstractFirDiagnosticTest { + public class FunctionAsExpression { @Test public void testAllFilesPresentInFunctionAsExpression() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/functionAsExpression"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -9627,7 +9633,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/functionLiterals") @TestDataPath("$PROJECT_ROOT") - public class FunctionLiterals extends AbstractFirDiagnosticTest { + public class FunctionLiterals { @Test public void testAllFilesPresentInFunctionLiterals() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/functionLiterals"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -9816,7 +9822,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas") @TestDataPath("$PROJECT_ROOT") - public class DestructuringInLambdas extends AbstractFirDiagnosticTest { + public class DestructuringInLambdas { @Test public void testAllFilesPresentInDestructuringInLambdas() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -9892,7 +9898,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/functionLiterals/return") @TestDataPath("$PROJECT_ROOT") - public class Return extends AbstractFirDiagnosticTest { + public class Return { @Test public void testAllFilesPresentInReturn() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/functionLiterals/return"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -10064,7 +10070,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/functionLiterals/suspend") @TestDataPath("$PROJECT_ROOT") - public class Suspend extends AbstractFirDiagnosticTest { + public class Suspend { @Test public void testAllFilesPresentInSuspend() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/functionLiterals/suspend"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -10087,7 +10093,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/generics") @TestDataPath("$PROJECT_ROOT") - public class Generics extends AbstractFirDiagnosticTest { + public class Generics { @Test public void testAllFilesPresentInGenerics() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/generics"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -10300,7 +10306,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/generics/capturedParameters") @TestDataPath("$PROJECT_ROOT") - public class CapturedParameters extends AbstractFirDiagnosticTest { + public class CapturedParameters { @Test public void testAllFilesPresentInCapturedParameters() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/generics/capturedParameters"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -10346,7 +10352,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/generics/cyclicBounds") @TestDataPath("$PROJECT_ROOT") - public class CyclicBounds extends AbstractFirDiagnosticTest { + public class CyclicBounds { @Test public void testAllFilesPresentInCyclicBounds() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/generics/cyclicBounds"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -10368,7 +10374,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/generics/innerClasses") @TestDataPath("$PROJECT_ROOT") - public class InnerClasses extends AbstractFirDiagnosticTest { + public class InnerClasses { @Test public void testAllFilesPresentInInnerClasses() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/generics/innerClasses"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -10521,7 +10527,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/generics/innerClasses/implicitArguments") @TestDataPath("$PROJECT_ROOT") - public class ImplicitArguments extends AbstractFirDiagnosticTest { + public class ImplicitArguments { @Test public void testAllFilesPresentInImplicitArguments() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/generics/innerClasses/implicitArguments"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -10586,7 +10592,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/generics/multipleBoundsMemberScope") @TestDataPath("$PROJECT_ROOT") - public class MultipleBoundsMemberScope extends AbstractFirDiagnosticTest { + public class MultipleBoundsMemberScope { @Test public void testAllFilesPresentInMultipleBoundsMemberScope() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/generics/multipleBoundsMemberScope"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -10638,7 +10644,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/generics/nullability") @TestDataPath("$PROJECT_ROOT") - public class Nullability extends AbstractFirDiagnosticTest { + public class Nullability { @Test public void testAllFilesPresentInNullability() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/generics/nullability"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -10762,7 +10768,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/generics/projectionsScope") @TestDataPath("$PROJECT_ROOT") - public class ProjectionsScope extends AbstractFirDiagnosticTest { + public class ProjectionsScope { @Test @TestMetadata("addAll.kt") public void testAddAll() throws Exception { @@ -10946,7 +10952,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/generics/starProjections") @TestDataPath("$PROJECT_ROOT") - public class StarProjections extends AbstractFirDiagnosticTest { + public class StarProjections { @Test public void testAllFilesPresentInStarProjections() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/generics/starProjections"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -10992,7 +10998,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/generics/tpAsReified") @TestDataPath("$PROJECT_ROOT") - public class TpAsReified extends AbstractFirDiagnosticTest { + public class TpAsReified { @Test public void testAllFilesPresentInTpAsReified() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/generics/tpAsReified"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -11086,7 +11092,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/generics/varProjection") @TestDataPath("$PROJECT_ROOT") - public class VarProjection extends AbstractFirDiagnosticTest { + public class VarProjection { @Test public void testAllFilesPresentInVarProjection() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/generics/varProjection"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -11121,7 +11127,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/imports") @TestDataPath("$PROJECT_ROOT") - public class Imports extends AbstractFirDiagnosticTest { + public class Imports { @Test public void testAllFilesPresentInImports() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/imports"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -11467,7 +11473,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/incompleteCode") @TestDataPath("$PROJECT_ROOT") - public class IncompleteCode extends AbstractFirDiagnosticTest { + public class IncompleteCode { @Test public void testAllFilesPresentInIncompleteCode() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/incompleteCode"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -11596,7 +11602,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError") @TestDataPath("$PROJECT_ROOT") - public class DiagnosticWithSyntaxError extends AbstractFirDiagnosticTest { + public class DiagnosticWithSyntaxError { @Test public void testAllFilesPresentInDiagnosticWithSyntaxError() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -11715,7 +11721,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/inference") @TestDataPath("$PROJECT_ROOT") - public class Inference extends AbstractFirDiagnosticTest { + public class Inference { @Test public void testAllFilesPresentInInference() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/inference"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -12288,7 +12294,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/inference/builderInference") @TestDataPath("$PROJECT_ROOT") - public class BuilderInference extends AbstractFirDiagnosticTest { + public class BuilderInference { @Test public void testAllFilesPresentInBuilderInference() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/inference/builderInference"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -12346,7 +12352,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/inference/capturedTypes") @TestDataPath("$PROJECT_ROOT") - public class CapturedTypes extends AbstractFirDiagnosticTest { + public class CapturedTypes { @Test public void testAllFilesPresentInCapturedTypes() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/inference/capturedTypes"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -12554,7 +12560,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/inference/coercionToUnit") @TestDataPath("$PROJECT_ROOT") - public class CoercionToUnit extends AbstractFirDiagnosticTest { + public class CoercionToUnit { @Test public void testAllFilesPresentInCoercionToUnit() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/inference/coercionToUnit"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -12648,7 +12654,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/inference/commonSystem") @TestDataPath("$PROJECT_ROOT") - public class CommonSystem extends AbstractFirDiagnosticTest { + public class CommonSystem { @Test public void testAllFilesPresentInCommonSystem() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/inference/commonSystem"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -12820,7 +12826,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/inference/completion") @TestDataPath("$PROJECT_ROOT") - public class Completion extends AbstractFirDiagnosticTest { + public class Completion { @Test public void testAllFilesPresentInCompletion() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/inference/completion"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -12919,7 +12925,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/inference/completion/postponedArgumentsAnalysis") @TestDataPath("$PROJECT_ROOT") - public class PostponedArgumentsAnalysis extends AbstractFirDiagnosticTest { + public class PostponedArgumentsAnalysis { @Test public void testAllFilesPresentInPostponedArgumentsAnalysis() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/inference/completion/postponedArgumentsAnalysis"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -12990,7 +12996,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/inference/constraints") @TestDataPath("$PROJECT_ROOT") - public class Constraints extends AbstractFirDiagnosticTest { + public class Constraints { @Test public void testAllFilesPresentInConstraints() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/inference/constraints"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -13162,7 +13168,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/inference/nestedCalls") @TestDataPath("$PROJECT_ROOT") - public class NestedCalls extends AbstractFirDiagnosticTest { + public class NestedCalls { @Test public void testAllFilesPresentInNestedCalls() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/inference/nestedCalls"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -13256,7 +13262,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/inference/nothingType") @TestDataPath("$PROJECT_ROOT") - public class NothingType extends AbstractFirDiagnosticTest { + public class NothingType { @Test public void testAllFilesPresentInNothingType() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/inference/nothingType"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -13410,7 +13416,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/inference/publicApproximation") @TestDataPath("$PROJECT_ROOT") - public class PublicApproximation extends AbstractFirDiagnosticTest { + public class PublicApproximation { @Test public void testAllFilesPresentInPublicApproximation() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/inference/publicApproximation"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -13498,7 +13504,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/inference/recursiveCalls") @TestDataPath("$PROJECT_ROOT") - public class RecursiveCalls extends AbstractFirDiagnosticTest { + public class RecursiveCalls { @Test public void testAllFilesPresentInRecursiveCalls() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/inference/recursiveCalls"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -13514,7 +13520,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/inference/recursiveLocalFuns") @TestDataPath("$PROJECT_ROOT") - public class RecursiveLocalFuns extends AbstractFirDiagnosticTest { + public class RecursiveLocalFuns { @Test public void testAllFilesPresentInRecursiveLocalFuns() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/inference/recursiveLocalFuns"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -13548,7 +13554,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/inference/recursiveTypes") @TestDataPath("$PROJECT_ROOT") - public class RecursiveTypes extends AbstractFirDiagnosticTest { + public class RecursiveTypes { @Test public void testAllFilesPresentInRecursiveTypes() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/inference/recursiveTypes"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -13630,7 +13636,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/inference/regressions") @TestDataPath("$PROJECT_ROOT") - public class Regressions extends AbstractFirDiagnosticTest { + public class Regressions { @Test public void testAllFilesPresentInRegressions() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/inference/regressions"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -14072,7 +14078,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/inference/reportingImprovements") @TestDataPath("$PROJECT_ROOT") - public class ReportingImprovements extends AbstractFirDiagnosticTest { + public class ReportingImprovements { @Test public void testAllFilesPresentInReportingImprovements() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/inference/reportingImprovements"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -14154,7 +14160,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/inference/substitutions") @TestDataPath("$PROJECT_ROOT") - public class Substitutions extends AbstractFirDiagnosticTest { + public class Substitutions { @Test public void testAllFilesPresentInSubstitutions() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/inference/substitutions"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -14212,7 +14218,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/inference/upperBounds") @TestDataPath("$PROJECT_ROOT") - public class UpperBounds extends AbstractFirDiagnosticTest { + public class UpperBounds { @Test public void testAllFilesPresentInUpperBounds() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/inference/upperBounds"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -14289,7 +14295,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/infos") @TestDataPath("$PROJECT_ROOT") - public class Infos extends AbstractFirDiagnosticTest { + public class Infos { @Test public void testAllFilesPresentInInfos() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/infos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -14311,7 +14317,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/inline") @TestDataPath("$PROJECT_ROOT") - public class Inline extends AbstractFirDiagnosticTest { + public class Inline { @Test public void testAllFilesPresentInInline() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/inline"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -14590,7 +14596,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/inline/binaryExpressions") @TestDataPath("$PROJECT_ROOT") - public class BinaryExpressions extends AbstractFirDiagnosticTest { + public class BinaryExpressions { @Test public void testAllFilesPresentInBinaryExpressions() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/inline/binaryExpressions"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -14648,7 +14654,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/inline/nonLocalReturns") @TestDataPath("$PROJECT_ROOT") - public class NonLocalReturns extends AbstractFirDiagnosticTest { + public class NonLocalReturns { @Test public void testAllFilesPresentInNonLocalReturns() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/inline/nonLocalReturns"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -14766,7 +14772,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/inline/nonPublicMember") @TestDataPath("$PROJECT_ROOT") - public class NonPublicMember extends AbstractFirDiagnosticTest { + public class NonPublicMember { @Test public void testAllFilesPresentInNonPublicMember() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/inline/nonPublicMember"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -14830,7 +14836,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/inline/property") @TestDataPath("$PROJECT_ROOT") - public class Property extends AbstractFirDiagnosticTest { + public class Property { @Test public void testAllFilesPresentInProperty() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/inline/property"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -14864,7 +14870,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/inline/regressions") @TestDataPath("$PROJECT_ROOT") - public class Regressions extends AbstractFirDiagnosticTest { + public class Regressions { @Test public void testAllFilesPresentInRegressions() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/inline/regressions"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -14880,7 +14886,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/inline/unaryExpressions") @TestDataPath("$PROJECT_ROOT") - public class UnaryExpressions extends AbstractFirDiagnosticTest { + public class UnaryExpressions { @Test public void testAllFilesPresentInUnaryExpressions() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/inline/unaryExpressions"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -14909,7 +14915,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/inlineClasses") @TestDataPath("$PROJECT_ROOT") - public class InlineClasses extends AbstractFirDiagnosticTest { + public class InlineClasses { @Test public void testAllFilesPresentInInlineClasses() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/inlineClasses"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -15069,7 +15075,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/inner") @TestDataPath("$PROJECT_ROOT") - public class Inner extends AbstractFirDiagnosticTest { + public class Inner { @Test @TestMetadata("accessingToJavaNestedClass.kt") public void testAccessingToJavaNestedClass() throws Exception { @@ -15354,7 +15360,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/inner/qualifiedExpression") @TestDataPath("$PROJECT_ROOT") - public class QualifiedExpression extends AbstractFirDiagnosticTest { + public class QualifiedExpression { @Test public void testAllFilesPresentInQualifiedExpression() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/inner/qualifiedExpression"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -15425,7 +15431,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/j+k") @TestDataPath("$PROJECT_ROOT") - public class J_k extends AbstractFirDiagnosticTest { + public class J_k { @Test @TestMetadata("accessClassObjectFromJava.kt") public void testAccessClassObjectFromJava() throws Exception { @@ -15875,6 +15881,12 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti runTest("compiler/testData/diagnostics/tests/j+k/SupertypeArgumentsNullability-UserTypes.kt"); } + @Test + @TestMetadata("supertypeUsesNested.kt") + public void testSupertypeUsesNested() throws Exception { + runTest("compiler/testData/diagnostics/tests/j+k/supertypeUsesNested.kt"); + } + @Test @TestMetadata("traitDefaultCall.kt") public void testTraitDefaultCall() throws Exception { @@ -15902,7 +15914,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/j+k/brokenCode") @TestDataPath("$PROJECT_ROOT") - public class BrokenCode extends AbstractFirDiagnosticTest { + public class BrokenCode { @Test public void testAllFilesPresentInBrokenCode() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/j+k/brokenCode"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -15924,7 +15936,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/j+k/collectionOverrides") @TestDataPath("$PROJECT_ROOT") - public class CollectionOverrides extends AbstractFirDiagnosticTest { + public class CollectionOverrides { @Test public void testAllFilesPresentInCollectionOverrides() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/j+k/collectionOverrides"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -16042,7 +16054,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/j+k/deprecations") @TestDataPath("$PROJECT_ROOT") - public class Deprecations extends AbstractFirDiagnosticTest { + public class Deprecations { @Test public void testAllFilesPresentInDeprecations() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/j+k/deprecations"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -16070,7 +16082,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/j+k/genericConstructor") @TestDataPath("$PROJECT_ROOT") - public class GenericConstructor extends AbstractFirDiagnosticTest { + public class GenericConstructor { @Test public void testAllFilesPresentInGenericConstructor() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/j+k/genericConstructor"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -16134,7 +16146,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/j+k/polymorphicSignature") @TestDataPath("$PROJECT_ROOT") - public class PolymorphicSignature extends AbstractFirDiagnosticTest { + public class PolymorphicSignature { @Test public void testAllFilesPresentInPolymorphicSignature() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/j+k/polymorphicSignature"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -16156,7 +16168,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/j+k/primitiveOverrides") @TestDataPath("$PROJECT_ROOT") - public class PrimitiveOverrides extends AbstractFirDiagnosticTest { + public class PrimitiveOverrides { @Test public void testAllFilesPresentInPrimitiveOverrides() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/j+k/primitiveOverrides"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -16184,7 +16196,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/j+k/primitiveOverridesWithInlineClass") @TestDataPath("$PROJECT_ROOT") - public class PrimitiveOverridesWithInlineClass extends AbstractFirDiagnosticTest { + public class PrimitiveOverridesWithInlineClass { @Test public void testAllFilesPresentInPrimitiveOverridesWithInlineClass() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/j+k/primitiveOverridesWithInlineClass"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -16200,7 +16212,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/j+k/properties") @TestDataPath("$PROJECT_ROOT") - public class Properties extends AbstractFirDiagnosticTest { + public class Properties { @Test public void testAllFilesPresentInProperties() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/j+k/properties"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -16258,7 +16270,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/j+k/sam") @TestDataPath("$PROJECT_ROOT") - public class Sam extends AbstractFirDiagnosticTest { + public class Sam { @Test public void testAllFilesPresentInSam() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/j+k/sam"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -16364,7 +16376,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/j+k/samByProjectedType") @TestDataPath("$PROJECT_ROOT") - public class SamByProjectedType extends AbstractFirDiagnosticTest { + public class SamByProjectedType { @Test public void testAllFilesPresentInSamByProjectedType() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/j+k/samByProjectedType"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -16404,7 +16416,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/j+k/signatureAnnotations") @TestDataPath("$PROJECT_ROOT") - public class SignatureAnnotations extends AbstractFirDiagnosticTest { + public class SignatureAnnotations { @Test public void testAllFilesPresentInSignatureAnnotations() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/j+k/signatureAnnotations"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -16504,7 +16516,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/j+k/specialBuiltIns") @TestDataPath("$PROJECT_ROOT") - public class SpecialBuiltIns extends AbstractFirDiagnosticTest { + public class SpecialBuiltIns { @Test public void testAllFilesPresentInSpecialBuiltIns() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/j+k/specialBuiltIns"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -16526,7 +16538,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/j+k/types") @TestDataPath("$PROJECT_ROOT") - public class Types extends AbstractFirDiagnosticTest { + public class Types { @Test public void testAllFilesPresentInTypes() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/j+k/types"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -16579,7 +16591,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/java8Overrides") @TestDataPath("$PROJECT_ROOT") - public class Java8Overrides extends AbstractFirDiagnosticTest { + public class Java8Overrides { @Test @TestMetadata("abstractBaseClassMemberNotImplemented.kt") public void testAbstractBaseClassMemberNotImplemented() throws Exception { @@ -16643,7 +16655,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/javac") @TestDataPath("$PROJECT_ROOT") - public class Javac extends AbstractFirDiagnosticTest { + public class Javac { @Test public void testAllFilesPresentInJavac() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/javac"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -16658,7 +16670,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/javac/fieldsResolution") @TestDataPath("$PROJECT_ROOT") - public class FieldsResolution extends AbstractFirDiagnosticTest { + public class FieldsResolution { @Test public void testAllFilesPresentInFieldsResolution() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/javac/fieldsResolution"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -16740,7 +16752,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/javac/imports") @TestDataPath("$PROJECT_ROOT") - public class Imports extends AbstractFirDiagnosticTest { + public class Imports { @Test public void testAllFilesPresentInImports() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/javac/imports"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -16852,7 +16864,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/javac/inheritance") @TestDataPath("$PROJECT_ROOT") - public class Inheritance extends AbstractFirDiagnosticTest { + public class Inheritance { @Test public void testAllFilesPresentInInheritance() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/javac/inheritance"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -16964,7 +16976,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/javac/inners") @TestDataPath("$PROJECT_ROOT") - public class Inners extends AbstractFirDiagnosticTest { + public class Inners { @Test public void testAllFilesPresentInInners() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/javac/inners"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -17016,7 +17028,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/javac/qualifiedExpression") @TestDataPath("$PROJECT_ROOT") - public class QualifiedExpression extends AbstractFirDiagnosticTest { + public class QualifiedExpression { @Test public void testAllFilesPresentInQualifiedExpression() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/javac/qualifiedExpression"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -17056,7 +17068,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/javac/typeParameters") @TestDataPath("$PROJECT_ROOT") - public class TypeParameters extends AbstractFirDiagnosticTest { + public class TypeParameters { @Test public void testAllFilesPresentInTypeParameters() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/javac/typeParameters"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -17109,7 +17121,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/labels") @TestDataPath("$PROJECT_ROOT") - public class Labels extends AbstractFirDiagnosticTest { + public class Labels { @Test public void testAllFilesPresentInLabels() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/labels"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -17191,7 +17203,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/lateinit") @TestDataPath("$PROJECT_ROOT") - public class Lateinit extends AbstractFirDiagnosticTest { + public class Lateinit { @Test public void testAllFilesPresentInLateinit() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/lateinit"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -17218,7 +17230,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/lateinit/local") @TestDataPath("$PROJECT_ROOT") - public class Local extends AbstractFirDiagnosticTest { + public class Local { @Test public void testAllFilesPresentInLocal() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/lateinit/local"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -17247,7 +17259,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/library") @TestDataPath("$PROJECT_ROOT") - public class Library extends AbstractFirDiagnosticTest { + public class Library { @Test public void testAllFilesPresentInLibrary() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/library"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -17269,7 +17281,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/localClasses") @TestDataPath("$PROJECT_ROOT") - public class LocalClasses extends AbstractFirDiagnosticTest { + public class LocalClasses { @Test public void testAllFilesPresentInLocalClasses() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/localClasses"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -17291,7 +17303,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/modifiers") @TestDataPath("$PROJECT_ROOT") - public class Modifiers extends AbstractFirDiagnosticTest { + public class Modifiers { @Test public void testAllFilesPresentInModifiers() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/modifiers"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -17396,7 +17408,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/modifiers/const") @TestDataPath("$PROJECT_ROOT") - public class Const extends AbstractFirDiagnosticTest { + public class Const { @Test public void testAllFilesPresentInConst() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/modifiers/const"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -17460,7 +17472,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/modifiers/operatorInfix") @TestDataPath("$PROJECT_ROOT") - public class OperatorInfix extends AbstractFirDiagnosticTest { + public class OperatorInfix { @Test public void testAllFilesPresentInOperatorInfix() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/modifiers/operatorInfix"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -17489,7 +17501,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/multimodule") @TestDataPath("$PROJECT_ROOT") - public class Multimodule extends AbstractFirDiagnosticTest { + public class Multimodule { @Test public void testAllFilesPresentInMultimodule() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/multimodule"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -17534,7 +17546,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/multimodule/duplicateClass") @TestDataPath("$PROJECT_ROOT") - public class DuplicateClass extends AbstractFirDiagnosticTest { + public class DuplicateClass { @Test public void testAllFilesPresentInDuplicateClass() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/multimodule/duplicateClass"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -17622,7 +17634,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/multimodule/duplicateMethod") @TestDataPath("$PROJECT_ROOT") - public class DuplicateMethod extends AbstractFirDiagnosticTest { + public class DuplicateMethod { @Test public void testAllFilesPresentInDuplicateMethod() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/multimodule/duplicateMethod"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -17782,7 +17794,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/multimodule/duplicateSuper") @TestDataPath("$PROJECT_ROOT") - public class DuplicateSuper extends AbstractFirDiagnosticTest { + public class DuplicateSuper { @Test public void testAllFilesPresentInDuplicateSuper() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/multimodule/duplicateSuper"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -17816,7 +17828,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/multimodule/hiddenClass") @TestDataPath("$PROJECT_ROOT") - public class HiddenClass extends AbstractFirDiagnosticTest { + public class HiddenClass { @Test public void testAllFilesPresentInHiddenClass() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/multimodule/hiddenClass"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -17851,7 +17863,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/multiplatform") @TestDataPath("$PROJECT_ROOT") - public class Multiplatform extends AbstractFirDiagnosticTest { + public class Multiplatform { @Test public void testAllFilesPresentInMultiplatform() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/multiplatform"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -17926,7 +17938,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/multiplatform/defaultArguments") @TestDataPath("$PROJECT_ROOT") - public class DefaultArguments extends AbstractFirDiagnosticTest { + public class DefaultArguments { @Test public void testAllFilesPresentInDefaultArguments() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/multiplatform/defaultArguments"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -17984,7 +17996,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/multiplatform/deprecated") @TestDataPath("$PROJECT_ROOT") - public class Deprecated extends AbstractFirDiagnosticTest { + public class Deprecated { @Test public void testAllFilesPresentInDeprecated() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/multiplatform/deprecated"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -18000,7 +18012,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/multiplatform/enum") @TestDataPath("$PROJECT_ROOT") - public class Enum extends AbstractFirDiagnosticTest { + public class Enum { @Test @TestMetadata("additionalEntriesInImpl.kt") public void testAdditionalEntriesInImpl() throws Exception { @@ -18046,7 +18058,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/multiplatform/generic") @TestDataPath("$PROJECT_ROOT") - public class Generic extends AbstractFirDiagnosticTest { + public class Generic { @Test public void testAllFilesPresentInGeneric() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/multiplatform/generic"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -18080,7 +18092,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/multiplatform/headerClass") @TestDataPath("$PROJECT_ROOT") - public class HeaderClass extends AbstractFirDiagnosticTest { + public class HeaderClass { @Test @TestMetadata("actualClassWithDefaultValuesInAnnotationViaTypealias.kt") public void testActualClassWithDefaultValuesInAnnotationViaTypealias() throws Exception { @@ -18288,7 +18300,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/multiplatform/inlineClasses") @TestDataPath("$PROJECT_ROOT") - public class InlineClasses extends AbstractFirDiagnosticTest { + public class InlineClasses { @Test public void testAllFilesPresentInInlineClasses() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/multiplatform/inlineClasses"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -18304,7 +18316,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/multiplatform/java") @TestDataPath("$PROJECT_ROOT") - public class Java extends AbstractFirDiagnosticTest { + public class Java { @Test public void testAllFilesPresentInJava() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/multiplatform/java"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -18326,7 +18338,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/multiplatform/topLevelFun") @TestDataPath("$PROJECT_ROOT") - public class TopLevelFun extends AbstractFirDiagnosticTest { + public class TopLevelFun { @Test public void testAllFilesPresentInTopLevelFun() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/multiplatform/topLevelFun"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -18414,7 +18426,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/multiplatform/topLevelProperty") @TestDataPath("$PROJECT_ROOT") - public class TopLevelProperty extends AbstractFirDiagnosticTest { + public class TopLevelProperty { @Test public void testAllFilesPresentInTopLevelProperty() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/multiplatform/topLevelProperty"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -18437,7 +18449,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/namedArguments") @TestDataPath("$PROJECT_ROOT") - public class NamedArguments extends AbstractFirDiagnosticTest { + public class NamedArguments { @Test public void testAllFilesPresentInNamedArguments() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/namedArguments"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -18524,7 +18536,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/namedArguments/mixedNamedPosition") @TestDataPath("$PROJECT_ROOT") - public class MixedNamedPosition extends AbstractFirDiagnosticTest { + public class MixedNamedPosition { @Test public void testAllFilesPresentInMixedNamedPosition() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/namedArguments/mixedNamedPosition"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -18571,7 +18583,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts") @TestDataPath("$PROJECT_ROOT") - public class NullabilityAndSmartCasts extends AbstractFirDiagnosticTest { + public class NullabilityAndSmartCasts { @Test public void testAllFilesPresentInNullabilityAndSmartCasts() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -18809,7 +18821,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/nullableTypes") @TestDataPath("$PROJECT_ROOT") - public class NullableTypes extends AbstractFirDiagnosticTest { + public class NullableTypes { @Test public void testAllFilesPresentInNullableTypes() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/nullableTypes"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -18915,7 +18927,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/numbers") @TestDataPath("$PROJECT_ROOT") - public class Numbers extends AbstractFirDiagnosticTest { + public class Numbers { @Test public void testAllFilesPresentInNumbers() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/numbers"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -18955,7 +18967,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/objects") @TestDataPath("$PROJECT_ROOT") - public class Objects extends AbstractFirDiagnosticTest { + public class Objects { @Test public void testAllFilesPresentInObjects() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/objects"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -19048,7 +19060,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/objects/kt21515") @TestDataPath("$PROJECT_ROOT") - public class Kt21515 extends AbstractFirDiagnosticTest { + public class Kt21515 { @Test public void testAllFilesPresentInKt21515() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/objects/kt21515"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -19209,7 +19221,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/operatorRem") @TestDataPath("$PROJECT_ROOT") - public class OperatorRem extends AbstractFirDiagnosticTest { + public class OperatorRem { @Test public void testAllFilesPresentInOperatorRem() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/operatorRem"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -19345,7 +19357,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/operatorsOverloading") @TestDataPath("$PROJECT_ROOT") - public class OperatorsOverloading extends AbstractFirDiagnosticTest { + public class OperatorsOverloading { @Test public void testAllFilesPresentInOperatorsOverloading() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/operatorsOverloading"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -19439,7 +19451,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/overload") @TestDataPath("$PROJECT_ROOT") - public class Overload extends AbstractFirDiagnosticTest { + public class Overload { @Test public void testAllFilesPresentInOverload() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/overload"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -19611,7 +19623,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/override") @TestDataPath("$PROJECT_ROOT") - public class Override extends AbstractFirDiagnosticTest { + public class Override { @Test @TestMetadata("AbstractFunImplemented.kt") public void testAbstractFunImplemented() throws Exception { @@ -19950,7 +19962,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/override/clashesOnInheritance") @TestDataPath("$PROJECT_ROOT") - public class ClashesOnInheritance extends AbstractFirDiagnosticTest { + public class ClashesOnInheritance { @Test public void testAllFilesPresentInClashesOnInheritance() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/override/clashesOnInheritance"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -20032,7 +20044,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/override/parameterNames") @TestDataPath("$PROJECT_ROOT") - public class ParameterNames extends AbstractFirDiagnosticTest { + public class ParameterNames { @Test public void testAllFilesPresentInParameterNames() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/override/parameterNames"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -20090,7 +20102,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/override/typeParameters") @TestDataPath("$PROJECT_ROOT") - public class TypeParameters extends AbstractFirDiagnosticTest { + public class TypeParameters { @Test public void testAllFilesPresentInTypeParameters() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/override/typeParameters"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -20125,7 +20137,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/parenthesizedTypes") @TestDataPath("$PROJECT_ROOT") - public class ParenthesizedTypes extends AbstractFirDiagnosticTest { + public class ParenthesizedTypes { @Test public void testAllFilesPresentInParenthesizedTypes() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/parenthesizedTypes"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -20153,7 +20165,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/platformTypes") @TestDataPath("$PROJECT_ROOT") - public class PlatformTypes extends AbstractFirDiagnosticTest { + public class PlatformTypes { @Test public void testAllFilesPresentInPlatformTypes() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/platformTypes"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -20270,7 +20282,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/platformTypes/commonSupertype") @TestDataPath("$PROJECT_ROOT") - public class CommonSupertype extends AbstractFirDiagnosticTest { + public class CommonSupertype { @Test public void testAllFilesPresentInCommonSupertype() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/platformTypes/commonSupertype"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -20328,7 +20340,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/platformTypes/genericVarianceViolation") @TestDataPath("$PROJECT_ROOT") - public class GenericVarianceViolation extends AbstractFirDiagnosticTest { + public class GenericVarianceViolation { @Test public void testAllFilesPresentInGenericVarianceViolation() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/platformTypes/genericVarianceViolation"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -20386,7 +20398,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/platformTypes/methodCall") @TestDataPath("$PROJECT_ROOT") - public class MethodCall extends AbstractFirDiagnosticTest { + public class MethodCall { @Test public void testAllFilesPresentInMethodCall() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/platformTypes/methodCall"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -20516,7 +20528,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/platformTypes/notNullTypeParameter") @TestDataPath("$PROJECT_ROOT") - public class NotNullTypeParameter extends AbstractFirDiagnosticTest { + public class NotNullTypeParameter { @Test public void testAllFilesPresentInNotNullTypeParameter() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/platformTypes/notNullTypeParameter"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -20568,7 +20580,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings") @TestDataPath("$PROJECT_ROOT") - public class NullabilityWarnings extends AbstractFirDiagnosticTest { + public class NullabilityWarnings { @Test public void testAllFilesPresentInNullabilityWarnings() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -20764,7 +20776,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/platformTypes/rawTypes") @TestDataPath("$PROJECT_ROOT") - public class RawTypes extends AbstractFirDiagnosticTest { + public class RawTypes { @Test public void testAllFilesPresentInRawTypes() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/platformTypes/rawTypes"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -20876,7 +20888,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/platformTypes/typeEnhancement") @TestDataPath("$PROJECT_ROOT") - public class TypeEnhancement extends AbstractFirDiagnosticTest { + public class TypeEnhancement { @Test public void testAllFilesPresentInTypeEnhancement() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/platformTypes/typeEnhancement"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -20917,7 +20929,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/privateInFile") @TestDataPath("$PROJECT_ROOT") - public class PrivateInFile extends AbstractFirDiagnosticTest { + public class PrivateInFile { @Test public void testAllFilesPresentInPrivateInFile() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/privateInFile"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -20945,7 +20957,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/properties") @TestDataPath("$PROJECT_ROOT") - public class Properties extends AbstractFirDiagnosticTest { + public class Properties { @Test public void testAllFilesPresentInProperties() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/properties"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -20966,7 +20978,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/properties/inferenceFromGetters") @TestDataPath("$PROJECT_ROOT") - public class InferenceFromGetters extends AbstractFirDiagnosticTest { + public class InferenceFromGetters { @Test public void testAllFilesPresentInInferenceFromGetters() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/properties/inferenceFromGetters"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -21049,7 +21061,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/qualifiedExpression") @TestDataPath("$PROJECT_ROOT") - public class QualifiedExpression extends AbstractFirDiagnosticTest { + public class QualifiedExpression { @Test public void testAllFilesPresentInQualifiedExpression() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/qualifiedExpression"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -21113,7 +21125,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/reassignment") @TestDataPath("$PROJECT_ROOT") - public class Reassignment extends AbstractFirDiagnosticTest { + public class Reassignment { @Test @TestMetadata("afterfor.kt") public void testAfterfor() throws Exception { @@ -21177,7 +21189,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/recovery") @TestDataPath("$PROJECT_ROOT") - public class Recovery extends AbstractFirDiagnosticTest { + public class Recovery { @Test @TestMetadata("absentLeftHandSide.kt") public void testAbsentLeftHandSide() throws Exception { @@ -21217,7 +21229,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/redeclarations") @TestDataPath("$PROJECT_ROOT") - public class Redeclarations extends AbstractFirDiagnosticTest { + public class Redeclarations { @Test public void testAllFilesPresentInRedeclarations() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/redeclarations"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -21424,7 +21436,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/redeclarations/shadowedExtension") @TestDataPath("$PROJECT_ROOT") - public class ShadowedExtension extends AbstractFirDiagnosticTest { + public class ShadowedExtension { @Test public void testAllFilesPresentInShadowedExtension() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/redeclarations/shadowedExtension"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -21519,7 +21531,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/regressions") @TestDataPath("$PROJECT_ROOT") - public class Regressions extends AbstractFirDiagnosticTest { + public class Regressions { @Test public void testAllFilesPresentInRegressions() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/regressions"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -22476,7 +22488,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/regressions/kt7585") @TestDataPath("$PROJECT_ROOT") - public class Kt7585 extends AbstractFirDiagnosticTest { + public class Kt7585 { @Test public void testAllFilesPresentInKt7585() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/regressions/kt7585"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -22505,7 +22517,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/resolve") @TestDataPath("$PROJECT_ROOT") - public class Resolve extends AbstractFirDiagnosticTest { + public class Resolve { @Test public void testAllFilesPresentInResolve() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/resolve"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -22706,7 +22718,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/resolve/dslMarker") @TestDataPath("$PROJECT_ROOT") - public class DslMarker extends AbstractFirDiagnosticTest { + public class DslMarker { @Test public void testAllFilesPresentInDslMarker() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/resolve/dslMarker"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -22872,7 +22884,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/resolve/invoke") @TestDataPath("$PROJECT_ROOT") - public class Invoke extends AbstractFirDiagnosticTest { + public class Invoke { @Test public void testAllFilesPresentInInvoke() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/resolve/invoke"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -23025,7 +23037,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/resolve/invoke/errors") @TestDataPath("$PROJECT_ROOT") - public class Errors extends AbstractFirDiagnosticTest { + public class Errors { @Test public void testAllFilesPresentInErrors() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/resolve/invoke/errors"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -23084,7 +23096,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/resolve/nestedCalls") @TestDataPath("$PROJECT_ROOT") - public class NestedCalls extends AbstractFirDiagnosticTest { + public class NestedCalls { @Test public void testAllFilesPresentInNestedCalls() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/resolve/nestedCalls"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -23148,7 +23160,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/resolve/noCandidates") @TestDataPath("$PROJECT_ROOT") - public class NoCandidates extends AbstractFirDiagnosticTest { + public class NoCandidates { @Test public void testAllFilesPresentInNoCandidates() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/resolve/noCandidates"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -23176,7 +23188,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/resolve/overloadConflicts") @TestDataPath("$PROJECT_ROOT") - public class OverloadConflicts extends AbstractFirDiagnosticTest { + public class OverloadConflicts { @Test public void testAllFilesPresentInOverloadConflicts() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/resolve/overloadConflicts"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -23312,7 +23324,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/resolve/priority") @TestDataPath("$PROJECT_ROOT") - public class Priority extends AbstractFirDiagnosticTest { + public class Priority { @Test public void testAllFilesPresentInPriority() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/resolve/priority"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -23394,7 +23406,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/resolve/specialConstructions") @TestDataPath("$PROJECT_ROOT") - public class SpecialConstructions extends AbstractFirDiagnosticTest { + public class SpecialConstructions { @Test public void testAllFilesPresentInSpecialConstructions() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/resolve/specialConstructions"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -23441,7 +23453,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/samConversions") @TestDataPath("$PROJECT_ROOT") - public class SamConversions extends AbstractFirDiagnosticTest { + public class SamConversions { @Test public void testAllFilesPresentInSamConversions() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/samConversions"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -23559,7 +23571,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/scopes") @TestDataPath("$PROJECT_ROOT") - public class Scopes extends AbstractFirDiagnosticTest { + public class Scopes { @Test public void testAllFilesPresentInScopes() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/scopes"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -23796,7 +23808,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/scopes/classHeader") @TestDataPath("$PROJECT_ROOT") - public class ClassHeader extends AbstractFirDiagnosticTest { + public class ClassHeader { @Test public void testAllFilesPresentInClassHeader() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/scopes/classHeader"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -23884,7 +23896,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/scopes/inheritance") @TestDataPath("$PROJECT_ROOT") - public class Inheritance extends AbstractFirDiagnosticTest { + public class Inheritance { @Test public void testAllFilesPresentInInheritance() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/scopes/inheritance"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -23977,7 +23989,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/scopes/inheritance/statics") @TestDataPath("$PROJECT_ROOT") - public class Statics extends AbstractFirDiagnosticTest { + public class Statics { @Test public void testAllFilesPresentInStatics() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/scopes/inheritance/statics"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -24082,7 +24094,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/scopes/inheritance/statics/companionObject") @TestDataPath("$PROJECT_ROOT") - public class CompanionObject extends AbstractFirDiagnosticTest { + public class CompanionObject { @Test @TestMetadata("accessToStaticMembersOfParentClassJKJ_after.kt") public void testAccessToStaticMembersOfParentClassJKJ_after() throws Exception { @@ -24154,7 +24166,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/scopes/protectedVisibility") @TestDataPath("$PROJECT_ROOT") - public class ProtectedVisibility extends AbstractFirDiagnosticTest { + public class ProtectedVisibility { @Test public void testAllFilesPresentInProtectedVisibility() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/scopes/protectedVisibility"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -24261,7 +24273,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/script") @TestDataPath("$PROJECT_ROOT") - public class Script extends AbstractFirDiagnosticTest { + public class Script { @Test public void testAllFilesPresentInScript() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/script"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -24271,7 +24283,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/sealed") @TestDataPath("$PROJECT_ROOT") - public class Sealed extends AbstractFirDiagnosticTest { + public class Sealed { @Test public void testAllFilesPresentInSealed() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/sealed"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -24520,7 +24532,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/sealed/interfaces") @TestDataPath("$PROJECT_ROOT") - public class Interfaces extends AbstractFirDiagnosticTest { + public class Interfaces { @Test public void testAllFilesPresentInInterfaces() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/sealed/interfaces"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -24549,7 +24561,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/secondaryConstructors") @TestDataPath("$PROJECT_ROOT") - public class SecondaryConstructors extends AbstractFirDiagnosticTest { + public class SecondaryConstructors { @Test public void testAllFilesPresentInSecondaryConstructors() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/secondaryConstructors"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -24822,7 +24834,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker") @TestDataPath("$PROJECT_ROOT") - public class HeaderCallChecker extends AbstractFirDiagnosticTest { + public class HeaderCallChecker { @Test @TestMetadata("accessBaseGenericFromInnerExtendingSameBase.kt") public void testAccessBaseGenericFromInnerExtendingSameBase() throws Exception { @@ -24947,7 +24959,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/senselessComparison") @TestDataPath("$PROJECT_ROOT") - public class SenselessComparison extends AbstractFirDiagnosticTest { + public class SenselessComparison { @Test public void testAllFilesPresentInSenselessComparison() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/senselessComparison"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -24969,7 +24981,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/shadowing") @TestDataPath("$PROJECT_ROOT") - public class Shadowing extends AbstractFirDiagnosticTest { + public class Shadowing { @Test public void testAllFilesPresentInShadowing() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/shadowing"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -25051,7 +25063,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/smartCasts") @TestDataPath("$PROJECT_ROOT") - public class SmartCasts extends AbstractFirDiagnosticTest { + public class SmartCasts { @Test @TestMetadata("afterBinaryExpr.kt") public void testAfterBinaryExpr() throws Exception { @@ -25792,7 +25804,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/smartCasts/castchecks") @TestDataPath("$PROJECT_ROOT") - public class Castchecks extends AbstractFirDiagnosticTest { + public class Castchecks { @Test public void testAllFilesPresentInCastchecks() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/smartCasts/castchecks"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -25850,7 +25862,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/smartCasts/elvis") @TestDataPath("$PROJECT_ROOT") - public class Elvis extends AbstractFirDiagnosticTest { + public class Elvis { @Test public void testAllFilesPresentInElvis() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/smartCasts/elvis"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -25878,7 +25890,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/smartCasts/inference") @TestDataPath("$PROJECT_ROOT") - public class Inference extends AbstractFirDiagnosticTest { + public class Inference { @Test public void testAllFilesPresentInInference() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/smartCasts/inference"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -25984,7 +25996,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/smartCasts/intersectionScope") @TestDataPath("$PROJECT_ROOT") - public class IntersectionScope extends AbstractFirDiagnosticTest { + public class IntersectionScope { @Test public void testAllFilesPresentInIntersectionScope() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/smartCasts/intersectionScope"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -26078,7 +26090,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/smartCasts/loops") @TestDataPath("$PROJECT_ROOT") - public class Loops extends AbstractFirDiagnosticTest { + public class Loops { @Test public void testAllFilesPresentInLoops() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/smartCasts/loops"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -26424,7 +26436,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/smartCasts/objectLiterals") @TestDataPath("$PROJECT_ROOT") - public class ObjectLiterals extends AbstractFirDiagnosticTest { + public class ObjectLiterals { @Test public void testAllFilesPresentInObjectLiterals() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/smartCasts/objectLiterals"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -26482,7 +26494,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/smartCasts/publicVals") @TestDataPath("$PROJECT_ROOT") - public class PublicVals extends AbstractFirDiagnosticTest { + public class PublicVals { @Test public void testAllFilesPresentInPublicVals() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/smartCasts/publicVals"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -26546,7 +26558,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/smartCasts/safecalls") @TestDataPath("$PROJECT_ROOT") - public class Safecalls extends AbstractFirDiagnosticTest { + public class Safecalls { @Test public void testAllFilesPresentInSafecalls() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/smartCasts/safecalls"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -26730,7 +26742,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/smartCasts/variables") @TestDataPath("$PROJECT_ROOT") - public class Variables extends AbstractFirDiagnosticTest { + public class Variables { @Test @TestMetadata("accessorAndFunction.kt") public void testAccessorAndFunction() throws Exception { @@ -26890,7 +26902,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/smartCasts/varnotnull") @TestDataPath("$PROJECT_ROOT") - public class Varnotnull extends AbstractFirDiagnosticTest { + public class Varnotnull { @Test public void testAllFilesPresentInVarnotnull() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/smartCasts/varnotnull"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -27213,7 +27225,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/sourceCompatibility") @TestDataPath("$PROJECT_ROOT") - public class SourceCompatibility extends AbstractFirDiagnosticTest { + public class SourceCompatibility { @Test public void testAllFilesPresentInSourceCompatibility() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/sourceCompatibility"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -27264,7 +27276,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/sourceCompatibility/apiVersion") @TestDataPath("$PROJECT_ROOT") - public class ApiVersion extends AbstractFirDiagnosticTest { + public class ApiVersion { @Test public void testAllFilesPresentInApiVersion() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/sourceCompatibility/apiVersion"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -27340,7 +27352,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/sourceCompatibility/noBoundCallableReferences") @TestDataPath("$PROJECT_ROOT") - public class NoBoundCallableReferences extends AbstractFirDiagnosticTest { + public class NoBoundCallableReferences { @Test public void testAllFilesPresentInNoBoundCallableReferences() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/sourceCompatibility/noBoundCallableReferences"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -27375,7 +27387,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/substitutions") @TestDataPath("$PROJECT_ROOT") - public class Substitutions extends AbstractFirDiagnosticTest { + public class Substitutions { @Test public void testAllFilesPresentInSubstitutions() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/substitutions"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -27415,7 +27427,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/subtyping") @TestDataPath("$PROJECT_ROOT") - public class Subtyping extends AbstractFirDiagnosticTest { + public class Subtyping { @Test public void testAllFilesPresentInSubtyping() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/subtyping"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -27527,7 +27539,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/suppress") @TestDataPath("$PROJECT_ROOT") - public class Suppress extends AbstractFirDiagnosticTest { + public class Suppress { @Test public void testAllFilesPresentInSuppress() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/suppress"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -27536,7 +27548,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/suppress/allWarnings") @TestDataPath("$PROJECT_ROOT") - public class AllWarnings extends AbstractFirDiagnosticTest { + public class AllWarnings { @Test public void testAllFilesPresentInAllWarnings() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/suppress/allWarnings"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -27606,7 +27618,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/suppress/manyWarnings") @TestDataPath("$PROJECT_ROOT") - public class ManyWarnings extends AbstractFirDiagnosticTest { + public class ManyWarnings { @Test public void testAllFilesPresentInManyWarnings() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/suppress/manyWarnings"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -27670,7 +27682,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/suppress/oneWarning") @TestDataPath("$PROJECT_ROOT") - public class OneWarning extends AbstractFirDiagnosticTest { + public class OneWarning { @Test public void testAllFilesPresentInOneWarning() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/suppress/oneWarning"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -27753,7 +27765,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/suspendConversion") @TestDataPath("$PROJECT_ROOT") - public class SuspendConversion extends AbstractFirDiagnosticTest { + public class SuspendConversion { @Test public void testAllFilesPresentInSuspendConversion() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/suspendConversion"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -27841,7 +27853,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/syntheticExtensions") @TestDataPath("$PROJECT_ROOT") - public class SyntheticExtensions extends AbstractFirDiagnosticTest { + public class SyntheticExtensions { @Test public void testAllFilesPresentInSyntheticExtensions() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/syntheticExtensions"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -27850,7 +27862,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties") @TestDataPath("$PROJECT_ROOT") - public class JavaProperties extends AbstractFirDiagnosticTest { + public class JavaProperties { @Test @TestMetadata("AbbreviationName.kt") public void testAbbreviationName() throws Exception { @@ -28040,7 +28052,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters") @TestDataPath("$PROJECT_ROOT") - public class SamAdapters extends AbstractFirDiagnosticTest { + public class SamAdapters { @Test public void testAllFilesPresentInSamAdapters() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -28153,7 +28165,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/targetedBuiltIns") @TestDataPath("$PROJECT_ROOT") - public class TargetedBuiltIns extends AbstractFirDiagnosticTest { + public class TargetedBuiltIns { @Test public void testAllFilesPresentInTargetedBuiltIns() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/targetedBuiltIns"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -28198,7 +28210,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/targetedBuiltIns/backwardCompatibility") @TestDataPath("$PROJECT_ROOT") - public class BackwardCompatibility extends AbstractFirDiagnosticTest { + public class BackwardCompatibility { @Test public void testAllFilesPresentInBackwardCompatibility() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/targetedBuiltIns/backwardCompatibility"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -28251,7 +28263,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/testWithModifiedMockJdk") @TestDataPath("$PROJECT_ROOT") - public class TestWithModifiedMockJdk extends AbstractFirDiagnosticTest { + public class TestWithModifiedMockJdk { @Test public void testAllFilesPresentInTestWithModifiedMockJdk() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/testWithModifiedMockJdk"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -28279,7 +28291,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/testsWithExplicitApi") @TestDataPath("$PROJECT_ROOT") - public class TestsWithExplicitApi extends AbstractFirDiagnosticTest { + public class TestsWithExplicitApi { @Test public void testAllFilesPresentInTestsWithExplicitApi() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/testsWithExplicitApi"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -28349,7 +28361,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/testsWithJava15") @TestDataPath("$PROJECT_ROOT") - public class TestsWithJava15 extends AbstractFirDiagnosticTest { + public class TestsWithJava15 { @Test public void testAllFilesPresentInTestsWithJava15() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/testsWithJava15"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -28358,7 +28370,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/testsWithJava15/jvmRecord") @TestDataPath("$PROJECT_ROOT") - public class JvmRecord extends AbstractFirDiagnosticTest { + public class JvmRecord { @Test public void testAllFilesPresentInJvmRecord() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/testsWithJava15/jvmRecord"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -28404,7 +28416,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/testsWithJava15/sealedClasses") @TestDataPath("$PROJECT_ROOT") - public class SealedClasses extends AbstractFirDiagnosticTest { + public class SealedClasses { @Test public void testAllFilesPresentInSealedClasses() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/testsWithJava15/sealedClasses"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -28439,7 +28451,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/thisAndSuper") @TestDataPath("$PROJECT_ROOT") - public class ThisAndSuper extends AbstractFirDiagnosticTest { + public class ThisAndSuper { @Test public void testAllFilesPresentInThisAndSuper() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/thisAndSuper"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -28544,7 +28556,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/thisAndSuper/unqualifiedSuper") @TestDataPath("$PROJECT_ROOT") - public class UnqualifiedSuper extends AbstractFirDiagnosticTest { + public class UnqualifiedSuper { @Test public void testAllFilesPresentInUnqualifiedSuper() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/thisAndSuper/unqualifiedSuper"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -28633,7 +28645,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/traitWithRequired") @TestDataPath("$PROJECT_ROOT") - public class TraitWithRequired extends AbstractFirDiagnosticTest { + public class TraitWithRequired { @Test public void testAllFilesPresentInTraitWithRequired() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/traitWithRequired"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -28655,7 +28667,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/typeParameters") @TestDataPath("$PROJECT_ROOT") - public class TypeParameters extends AbstractFirDiagnosticTest { + public class TypeParameters { @Test public void testAllFilesPresentInTypeParameters() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/typeParameters"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -28743,7 +28755,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/typealias") @TestDataPath("$PROJECT_ROOT") - public class Typealias extends AbstractFirDiagnosticTest { + public class Typealias { @Test @TestMetadata("aliasesOnly.kt") public void testAliasesOnly() throws Exception { @@ -29359,7 +29371,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/underscoresInNumericLiterals") @TestDataPath("$PROJECT_ROOT") - public class UnderscoresInNumericLiterals extends AbstractFirDiagnosticTest { + public class UnderscoresInNumericLiterals { @Test public void testAllFilesPresentInUnderscoresInNumericLiterals() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/underscoresInNumericLiterals"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -29381,7 +29393,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/unit") @TestDataPath("$PROJECT_ROOT") - public class Unit extends AbstractFirDiagnosticTest { + public class Unit { @Test public void testAllFilesPresentInUnit() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/unit"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -29397,7 +29409,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/unitConversion") @TestDataPath("$PROJECT_ROOT") - public class UnitConversion extends AbstractFirDiagnosticTest { + public class UnitConversion { @Test public void testAllFilesPresentInUnitConversion() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/unitConversion"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -29461,7 +29473,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/unsignedTypes") @TestDataPath("$PROJECT_ROOT") - public class UnsignedTypes extends AbstractFirDiagnosticTest { + public class UnsignedTypes { @Test public void testAllFilesPresentInUnsignedTypes() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/unsignedTypes"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -29542,7 +29554,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/unsignedTypes/conversions") @TestDataPath("$PROJECT_ROOT") - public class Conversions extends AbstractFirDiagnosticTest { + public class Conversions { @Test public void testAllFilesPresentInConversions() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/unsignedTypes/conversions"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -29583,7 +29595,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/valueClasses") @TestDataPath("$PROJECT_ROOT") - public class ValueClasses extends AbstractFirDiagnosticTest { + public class ValueClasses { @Test public void testAllFilesPresentInValueClasses() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/valueClasses"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -29731,7 +29743,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/varargs") @TestDataPath("$PROJECT_ROOT") - public class Varargs extends AbstractFirDiagnosticTest { + public class Varargs { @Test public void testAllFilesPresentInVarargs() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/varargs"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -29939,7 +29951,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/variance") @TestDataPath("$PROJECT_ROOT") - public class Variance extends AbstractFirDiagnosticTest { + public class Variance { @Test public void testAllFilesPresentInVariance() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/variance"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -30020,7 +30032,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/variance/privateToThis") @TestDataPath("$PROJECT_ROOT") - public class PrivateToThis extends AbstractFirDiagnosticTest { + public class PrivateToThis { @Test @TestMetadata("Abstract.kt") public void testAbstract() throws Exception { @@ -30061,7 +30073,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/visibility") @TestDataPath("$PROJECT_ROOT") - public class Visibility extends AbstractFirDiagnosticTest { + public class Visibility { @Test @TestMetadata("abstractInvisibleMemberFromJava.kt") public void testAbstractInvisibleMemberFromJava() throws Exception { @@ -30107,7 +30119,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/when") @TestDataPath("$PROJECT_ROOT") - public class When extends AbstractFirDiagnosticTest { + public class When { @Test public void testAllFilesPresentInWhen() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/when"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -30494,7 +30506,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/tests/when/withSubjectVariable") @TestDataPath("$PROJECT_ROOT") - public class WithSubjectVariable extends AbstractFirDiagnosticTest { + public class WithSubjectVariable { @Test public void testAllFilesPresentInWithSubjectVariable() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/when/withSubjectVariable"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -30602,7 +30614,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib") @TestDataPath("$PROJECT_ROOT") - public class TestsWithStdLib extends AbstractFirDiagnosticTest { + public class TestsWithStdLib { @Test @TestMetadata("addAllProjection.kt") public void testAddAllProjection() throws Exception { @@ -30773,7 +30785,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations") @TestDataPath("$PROJECT_ROOT") - public class Annotations extends AbstractFirDiagnosticTest { + public class Annotations { @Test public void testAllFilesPresentInAnnotations() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/annotations"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -30872,7 +30884,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationApplicability") @TestDataPath("$PROJECT_ROOT") - public class AnnotationApplicability extends AbstractFirDiagnosticTest { + public class AnnotationApplicability { @Test public void testAllFilesPresentInAnnotationApplicability() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationApplicability"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -30924,7 +30936,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameterMustBeConstant") @TestDataPath("$PROJECT_ROOT") - public class AnnotationParameterMustBeConstant extends AbstractFirDiagnosticTest { + public class AnnotationParameterMustBeConstant { @Test public void testAllFilesPresentInAnnotationParameterMustBeConstant() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameterMustBeConstant"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -30958,7 +30970,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameters") @TestDataPath("$PROJECT_ROOT") - public class AnnotationParameters extends AbstractFirDiagnosticTest { + public class AnnotationParameters { @Test public void testAllFilesPresentInAnnotationParameters() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameters"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -31016,7 +31028,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationWithVarargParameter") @TestDataPath("$PROJECT_ROOT") - public class AnnotationWithVarargParameter extends AbstractFirDiagnosticTest { + public class AnnotationWithVarargParameter { @Test public void testAllFilesPresentInAnnotationWithVarargParameter() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationWithVarargParameter"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -31038,7 +31050,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/javaAnnotationsWithKClassParameter") @TestDataPath("$PROJECT_ROOT") - public class JavaAnnotationsWithKClassParameter extends AbstractFirDiagnosticTest { + public class JavaAnnotationsWithKClassParameter { @Test public void testAllFilesPresentInJavaAnnotationsWithKClassParameter() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/annotations/javaAnnotationsWithKClassParameter"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -31120,7 +31132,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault") @TestDataPath("$PROJECT_ROOT") - public class JvmDefault extends AbstractFirDiagnosticTest { + public class JvmDefault { @Test public void testAllFilesPresentInJvmDefault() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -31231,7 +31243,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/allCompatibility") @TestDataPath("$PROJECT_ROOT") - public class AllCompatibility extends AbstractFirDiagnosticTest { + public class AllCompatibility { @Test public void testAllFilesPresentInAllCompatibility() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/allCompatibility"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -31247,7 +31259,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/jvmDefaultWithoutCompatibility") @TestDataPath("$PROJECT_ROOT") - public class JvmDefaultWithoutCompatibility extends AbstractFirDiagnosticTest { + public class JvmDefaultWithoutCompatibility { @Test public void testAllFilesPresentInJvmDefaultWithoutCompatibility() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/jvmDefaultWithoutCompatibility"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -31276,7 +31288,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmField") @TestDataPath("$PROJECT_ROOT") - public class JvmField extends AbstractFirDiagnosticTest { + public class JvmField { @Test public void testAllFilesPresentInJvmField() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmField"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -31316,7 +31328,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmOverloads") @TestDataPath("$PROJECT_ROOT") - public class JvmOverloads extends AbstractFirDiagnosticTest { + public class JvmOverloads { @Test public void testAllFilesPresentInJvmOverloads() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmOverloads"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -31362,7 +31374,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmPackageName") @TestDataPath("$PROJECT_ROOT") - public class JvmPackageName extends AbstractFirDiagnosticTest { + public class JvmPackageName { @Test public void testAllFilesPresentInJvmPackageName() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmPackageName"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -31378,7 +31390,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmSpecialFunctions") @TestDataPath("$PROJECT_ROOT") - public class JvmSpecialFunctions extends AbstractFirDiagnosticTest { + public class JvmSpecialFunctions { @Test public void testAllFilesPresentInJvmSpecialFunctions() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmSpecialFunctions"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -31394,7 +31406,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmStatic") @TestDataPath("$PROJECT_ROOT") - public class JvmStatic extends AbstractFirDiagnosticTest { + public class JvmStatic { @Test public void testAllFilesPresentInJvmStatic() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmStatic"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -31500,7 +31512,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/kClass") @TestDataPath("$PROJECT_ROOT") - public class KClass extends AbstractFirDiagnosticTest { + public class KClass { @Test public void testAllFilesPresentInKClass() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/annotations/kClass"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -31552,7 +31564,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/prohibitPositionedArgument") @TestDataPath("$PROJECT_ROOT") - public class ProhibitPositionedArgument extends AbstractFirDiagnosticTest { + public class ProhibitPositionedArgument { @Test public void testAllFilesPresentInProhibitPositionedArgument() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/annotations/prohibitPositionedArgument"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -31593,7 +31605,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/assert") @TestDataPath("$PROJECT_ROOT") - public class Assert extends AbstractFirDiagnosticTest { + public class Assert { @Test public void testAllFilesPresentInAssert() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/assert"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -31612,10 +31624,26 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti } } + @Nested + @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/builderInference") + @TestDataPath("$PROJECT_ROOT") + public class BuilderInference { + @Test + public void testAllFilesPresentInBuilderInference() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/builderInference"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + } + + @Test + @TestMetadata("completeIrrelevantCalls.kt") + public void testCompleteIrrelevantCalls() throws Exception { + runTest("compiler/testData/diagnostics/testsWithStdLib/builderInference/completeIrrelevantCalls.kt"); + } + } + @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/builtins") @TestDataPath("$PROJECT_ROOT") - public class Builtins extends AbstractFirDiagnosticTest { + public class Builtins { @Test public void testAllFilesPresentInBuiltins() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/builtins"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -31631,7 +31659,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/cast") @TestDataPath("$PROJECT_ROOT") - public class Cast extends AbstractFirDiagnosticTest { + public class Cast { @Test public void testAllFilesPresentInCast() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/cast"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -31659,7 +31687,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts") @TestDataPath("$PROJECT_ROOT") - public class Contracts extends AbstractFirDiagnosticTest { + public class Contracts { @Test public void testAllFilesPresentInContracts() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/contracts"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -31668,7 +31696,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow") @TestDataPath("$PROJECT_ROOT") - public class Controlflow extends AbstractFirDiagnosticTest { + public class Controlflow { @Test public void testAllFilesPresentInControlflow() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -31677,7 +31705,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/flowInlining") @TestDataPath("$PROJECT_ROOT") - public class FlowInlining extends AbstractFirDiagnosticTest { + public class FlowInlining { @Test public void testAllFilesPresentInFlowInlining() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/flowInlining"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -31789,7 +31817,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/initialization") @TestDataPath("$PROJECT_ROOT") - public class Initialization extends AbstractFirDiagnosticTest { + public class Initialization { @Test public void testAllFilesPresentInInitialization() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/initialization"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -31798,7 +31826,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/initialization/atLeastOnce") @TestDataPath("$PROJECT_ROOT") - public class AtLeastOnce extends AbstractFirDiagnosticTest { + public class AtLeastOnce { @Test public void testAllFilesPresentInAtLeastOnce() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/initialization/atLeastOnce"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -31826,7 +31854,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/initialization/exactlyOnce") @TestDataPath("$PROJECT_ROOT") - public class ExactlyOnce extends AbstractFirDiagnosticTest { + public class ExactlyOnce { @Test public void testAllFilesPresentInExactlyOnce() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/initialization/exactlyOnce"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -31872,7 +31900,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/initialization/unknown") @TestDataPath("$PROJECT_ROOT") - public class Unknown extends AbstractFirDiagnosticTest { + public class Unknown { @Test public void testAllFilesPresentInUnknown() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/initialization/unknown"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -31890,7 +31918,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/dsl") @TestDataPath("$PROJECT_ROOT") - public class Dsl extends AbstractFirDiagnosticTest { + public class Dsl { @Test public void testAllFilesPresentInDsl() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/contracts/dsl"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -31923,7 +31951,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/dsl/errors") @TestDataPath("$PROJECT_ROOT") - public class Errors extends AbstractFirDiagnosticTest { + public class Errors { @Test @TestMetadata("accessToOuterThis.kt") public void testAccessToOuterThis() throws Exception { @@ -32042,7 +32070,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/fromStdlib") @TestDataPath("$PROJECT_ROOT") - public class FromStdlib extends AbstractFirDiagnosticTest { + public class FromStdlib { @Test public void testAllFilesPresentInFromStdlib() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/contracts/fromStdlib"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -32088,7 +32116,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/newSyntax") @TestDataPath("$PROJECT_ROOT") - public class NewSyntax extends AbstractFirDiagnosticTest { + public class NewSyntax { @Test public void testAllFilesPresentInNewSyntax() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/contracts/newSyntax"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -32122,7 +32150,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts") @TestDataPath("$PROJECT_ROOT") - public class Smartcasts extends AbstractFirDiagnosticTest { + public class Smartcasts { @Test public void testAllFilesPresentInSmartcasts() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -32245,7 +32273,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/multieffect") @TestDataPath("$PROJECT_ROOT") - public class Multieffect extends AbstractFirDiagnosticTest { + public class Multieffect { @Test public void testAllFilesPresentInMultieffect() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/multieffect"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -32267,7 +32295,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/operatorsTests") @TestDataPath("$PROJECT_ROOT") - public class OperatorsTests extends AbstractFirDiagnosticTest { + public class OperatorsTests { @Test public void testAllFilesPresentInOperatorsTests() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/operatorsTests"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -32331,7 +32359,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/when") @TestDataPath("$PROJECT_ROOT") - public class When extends AbstractFirDiagnosticTest { + public class When { @Test public void testAllFilesPresentInWhen() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/when"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -32367,7 +32395,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines") @TestDataPath("$PROJECT_ROOT") - public class Coroutines extends AbstractFirDiagnosticTest { + public class Coroutines { @Test public void testAllFilesPresentInCoroutines() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/coroutines"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -32664,7 +32692,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/callableReference") @TestDataPath("$PROJECT_ROOT") - public class CallableReference extends AbstractFirDiagnosticTest { + public class CallableReference { @Test public void testAllFilesPresentInCallableReference() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/coroutines/callableReference"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -32698,7 +32726,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/inference") @TestDataPath("$PROJECT_ROOT") - public class Inference extends AbstractFirDiagnosticTest { + public class Inference { @Test public void testAllFilesPresentInInference() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/coroutines/inference"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -33032,7 +33060,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline") @TestDataPath("$PROJECT_ROOT") - public class InlineCrossinline extends AbstractFirDiagnosticTest { + public class InlineCrossinline { @Test public void testAllFilesPresentInInlineCrossinline() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -33114,7 +33142,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/release") @TestDataPath("$PROJECT_ROOT") - public class Release extends AbstractFirDiagnosticTest { + public class Release { @Test public void testAllFilesPresentInRelease() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/coroutines/release"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -33130,7 +33158,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension") @TestDataPath("$PROJECT_ROOT") - public class RestrictSuspension extends AbstractFirDiagnosticTest { + public class RestrictSuspension { @Test public void testAllFilesPresentInRestrictSuspension() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -33188,7 +33216,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendFunctionType") @TestDataPath("$PROJECT_ROOT") - public class SuspendFunctionType extends AbstractFirDiagnosticTest { + public class SuspendFunctionType { @Test public void testAllFilesPresentInSuspendFunctionType() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendFunctionType"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -33282,7 +33310,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls") @TestDataPath("$PROJECT_ROOT") - public class TailCalls extends AbstractFirDiagnosticTest { + public class TailCalls { @Test public void testAllFilesPresentInTailCalls() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -33329,7 +33357,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/deprecated") @TestDataPath("$PROJECT_ROOT") - public class Deprecated extends AbstractFirDiagnosticTest { + public class Deprecated { @Test public void testAllFilesPresentInDeprecated() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/deprecated"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -33351,7 +33379,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/duplicateJvmSignature") @TestDataPath("$PROJECT_ROOT") - public class DuplicateJvmSignature extends AbstractFirDiagnosticTest { + public class DuplicateJvmSignature { @Test public void testAllFilesPresentInDuplicateJvmSignature() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/duplicateJvmSignature"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -33396,7 +33424,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/duplicateJvmSignature/statics") @TestDataPath("$PROJECT_ROOT") - public class Statics extends AbstractFirDiagnosticTest { + public class Statics { @Test public void testAllFilesPresentInStatics() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/duplicateJvmSignature/statics"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -33431,7 +33459,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/experimental") @TestDataPath("$PROJECT_ROOT") - public class Experimental extends AbstractFirDiagnosticTest { + public class Experimental { @Test public void testAllFilesPresentInExperimental() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/experimental"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -33597,7 +33625,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/factoryPattern") @TestDataPath("$PROJECT_ROOT") - public class FactoryPattern extends AbstractFirDiagnosticTest { + public class FactoryPattern { @Test public void testAllFilesPresentInFactoryPattern() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/factoryPattern"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -33667,7 +33695,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/forInArrayLoop") @TestDataPath("$PROJECT_ROOT") - public class ForInArrayLoop extends AbstractFirDiagnosticTest { + public class ForInArrayLoop { @Test public void testAllFilesPresentInForInArrayLoop() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/forInArrayLoop"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -33707,7 +33735,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/functionLiterals") @TestDataPath("$PROJECT_ROOT") - public class FunctionLiterals extends AbstractFirDiagnosticTest { + public class FunctionLiterals { @Test public void testAllFilesPresentInFunctionLiterals() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/functionLiterals"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -33723,7 +33751,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/inference") @TestDataPath("$PROJECT_ROOT") - public class Inference extends AbstractFirDiagnosticTest { + public class Inference { @Test public void testAllFilesPresentInInference() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/inference"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -33864,7 +33892,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve") @TestDataPath("$PROJECT_ROOT") - public class AnnotationsForResolve extends AbstractFirDiagnosticTest { + public class AnnotationsForResolve { @Test public void testAllFilesPresentInAnnotationsForResolve() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -34018,7 +34046,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/inference/completion") @TestDataPath("$PROJECT_ROOT") - public class Completion extends AbstractFirDiagnosticTest { + public class Completion { @Test public void testAllFilesPresentInCompletion() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/inference/completion"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -34027,7 +34055,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/inference/completion/postponedArgumentsAnalysis") @TestDataPath("$PROJECT_ROOT") - public class PostponedArgumentsAnalysis extends AbstractFirDiagnosticTest { + public class PostponedArgumentsAnalysis { @Test public void testAllFilesPresentInPostponedArgumentsAnalysis() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/inference/completion/postponedArgumentsAnalysis"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -34108,7 +34136,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/inference/completion/postponedArgumentsAnalysis/performance") @TestDataPath("$PROJECT_ROOT") - public class Performance extends AbstractFirDiagnosticTest { + public class Performance { @Test public void testAllFilesPresentInPerformance() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/inference/completion/postponedArgumentsAnalysis/performance"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -34156,7 +34184,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/inference/delegates") @TestDataPath("$PROJECT_ROOT") - public class Delegates extends AbstractFirDiagnosticTest { + public class Delegates { @Test public void testAllFilesPresentInDelegates() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/inference/delegates"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -34184,7 +34212,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/inference/nothingType") @TestDataPath("$PROJECT_ROOT") - public class NothingType extends AbstractFirDiagnosticTest { + public class NothingType { @Test public void testAllFilesPresentInNothingType() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/inference/nothingType"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -34206,7 +34234,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/inference/performance") @TestDataPath("$PROJECT_ROOT") - public class Performance extends AbstractFirDiagnosticTest { + public class Performance { @Test public void testAllFilesPresentInPerformance() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/inference/performance"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -34235,7 +34263,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/inline") @TestDataPath("$PROJECT_ROOT") - public class Inline extends AbstractFirDiagnosticTest { + public class Inline { @Test public void testAllFilesPresentInInline() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/inline"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -34257,7 +34285,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/java") @TestDataPath("$PROJECT_ROOT") - public class Java extends AbstractFirDiagnosticTest { + public class Java { @Test public void testAllFilesPresentInJava() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/java"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -34297,7 +34325,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/kt7585") @TestDataPath("$PROJECT_ROOT") - public class Kt7585 extends AbstractFirDiagnosticTest { + public class Kt7585 { @Test public void testAllFilesPresentInKt7585() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/kt7585"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -34313,7 +34341,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/lateinit") @TestDataPath("$PROJECT_ROOT") - public class Lateinit extends AbstractFirDiagnosticTest { + public class Lateinit { @Test public void testAllFilesPresentInLateinit() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/lateinit"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -34329,7 +34357,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/multiplatform") @TestDataPath("$PROJECT_ROOT") - public class Multiplatform extends AbstractFirDiagnosticTest { + public class Multiplatform { @Test public void testAllFilesPresentInMultiplatform() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/multiplatform"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -34345,7 +34373,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/native") @TestDataPath("$PROJECT_ROOT") - public class Native extends AbstractFirDiagnosticTest { + public class Native { @Test @TestMetadata("abstract.kt") public void testAbstract() throws Exception { @@ -34409,7 +34437,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/purelyImplementedCollection") @TestDataPath("$PROJECT_ROOT") - public class PurelyImplementedCollection extends AbstractFirDiagnosticTest { + public class PurelyImplementedCollection { @Test public void testAllFilesPresentInPurelyImplementedCollection() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/purelyImplementedCollection"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -34479,12 +34507,18 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/reflection") @TestDataPath("$PROJECT_ROOT") - public class Reflection extends AbstractFirDiagnosticTest { + public class Reflection { @Test public void testAllFilesPresentInReflection() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/reflection"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } + @Test + @TestMetadata("classArrayInAnnotation.kt") + public void testClassArrayInAnnotation() throws Exception { + runTest("compiler/testData/diagnostics/testsWithStdLib/reflection/classArrayInAnnotation.kt"); + } + @Test @TestMetadata("noReflectionInClassPath.kt") public void testNoReflectionInClassPath() throws Exception { @@ -34495,7 +34529,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/regression") @TestDataPath("$PROJECT_ROOT") - public class Regression extends AbstractFirDiagnosticTest { + public class Regression { @Test public void testAllFilesPresentInRegression() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/regression"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -34595,7 +34629,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/reified") @TestDataPath("$PROJECT_ROOT") - public class Reified extends AbstractFirDiagnosticTest { + public class Reified { @Test public void testAllFilesPresentInReified() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/reified"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -34635,7 +34669,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/resolve") @TestDataPath("$PROJECT_ROOT") - public class Resolve extends AbstractFirDiagnosticTest { + public class Resolve { @Test public void testAllFilesPresentInResolve() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/resolve"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -34718,12 +34752,18 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti public void testSamOverloadsWithKtFunctionWithoutRefinedSams() throws Exception { runTest("compiler/testData/diagnostics/testsWithStdLib/resolve/samOverloadsWithKtFunctionWithoutRefinedSams.kt"); } + + @Test + @TestMetadata("sameNameClassesFromSupertypes.kt") + public void testSameNameClassesFromSupertypes() throws Exception { + runTest("compiler/testData/diagnostics/testsWithStdLib/resolve/sameNameClassesFromSupertypes.kt"); + } } @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/smartcasts") @TestDataPath("$PROJECT_ROOT") - public class Smartcasts extends AbstractFirDiagnosticTest { + public class Smartcasts { @Test public void testAllFilesPresentInSmartcasts() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/smartcasts"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -34811,7 +34851,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/sourceCompatibility") @TestDataPath("$PROJECT_ROOT") - public class SourceCompatibility extends AbstractFirDiagnosticTest { + public class SourceCompatibility { @Test public void testAllFilesPresentInSourceCompatibility() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/sourceCompatibility"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -34827,7 +34867,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/targetedBuiltIns") @TestDataPath("$PROJECT_ROOT") - public class TargetedBuiltIns extends AbstractFirDiagnosticTest { + public class TargetedBuiltIns { @Test public void testAllFilesPresentInTargetedBuiltIns() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/targetedBuiltIns"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -34849,7 +34889,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/trailingComma") @TestDataPath("$PROJECT_ROOT") - public class TrailingComma extends AbstractFirDiagnosticTest { + public class TrailingComma { @Test public void testAllFilesPresentInTrailingComma() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/trailingComma"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -34937,7 +34977,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/tryCatch") @TestDataPath("$PROJECT_ROOT") - public class TryCatch extends AbstractFirDiagnosticTest { + public class TryCatch { @Test public void testAllFilesPresentInTryCatch() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/tryCatch"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -35007,7 +35047,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/typealias") @TestDataPath("$PROJECT_ROOT") - public class Typealias extends AbstractFirDiagnosticTest { + public class Typealias { @Test public void testAllFilesPresentInTypealias() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/typealias"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -35053,7 +35093,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/varargs") @TestDataPath("$PROJECT_ROOT") - public class Varargs extends AbstractFirDiagnosticTest { + public class Varargs { @Test public void testAllFilesPresentInVarargs() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/varargs"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -35081,7 +35121,7 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/when") @TestDataPath("$PROJECT_ROOT") - public class When extends AbstractFirDiagnosticTest { + public class When { @Test public void testAllFilesPresentInWhen() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/when"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); diff --git a/compiler/fir/checkers/checkers-component-generator/src/org/jetbrains/kotlin/fir/checkers/generator/Main.kt b/compiler/fir/checkers/checkers-component-generator/src/org/jetbrains/kotlin/fir/checkers/generator/Main.kt index 41ec1d4a3a1..0088e1d7b9f 100644 --- a/compiler/fir/checkers/checkers-component-generator/src/org/jetbrains/kotlin/fir/checkers/generator/Main.kt +++ b/compiler/fir/checkers/checkers-component-generator/src/org/jetbrains/kotlin/fir/checkers/generator/Main.kt @@ -10,6 +10,7 @@ import org.jetbrains.kotlin.fir.expressions.FirFunctionCall import org.jetbrains.kotlin.fir.expressions.FirQualifiedAccessExpression import org.jetbrains.kotlin.fir.expressions.FirStatement import org.jetbrains.kotlin.fir.expressions.FirVariableAssignment +import org.jetbrains.kotlin.fir.expressions.FirTryExpression import java.io.File fun main(args: Array) { @@ -21,6 +22,7 @@ fun main(args: Array) { alias("QualifiedAccessChecker") alias("FunctionCallChecker") alias("VariableAssignmentChecker") + alias("TryExpressionChecker") } val declarationPackage = "org.jetbrains.kotlin.fir.analysis.checkers.declaration" @@ -29,6 +31,7 @@ fun main(args: Array) { alias("MemberDeclarationChecker") alias>("FunctionChecker") alias("PropertyChecker") + alias>("ClassChecker") alias("RegularClassChecker") alias("ConstructorChecker") alias("FileChecker") diff --git a/compiler/fir/checkers/gen/org/jetbrains/kotlin/fir/analysis/checkers/declaration/ComposedDeclarationCheckers.kt b/compiler/fir/checkers/gen/org/jetbrains/kotlin/fir/analysis/checkers/declaration/ComposedDeclarationCheckers.kt index 0298aabbea9..716247fd568 100644 --- a/compiler/fir/checkers/gen/org/jetbrains/kotlin/fir/analysis/checkers/declaration/ComposedDeclarationCheckers.kt +++ b/compiler/fir/checkers/gen/org/jetbrains/kotlin/fir/analysis/checkers/declaration/ComposedDeclarationCheckers.kt @@ -23,6 +23,8 @@ internal class ComposedDeclarationCheckers : DeclarationCheckers() { get() = _functionCheckers override val propertyCheckers: Set get() = _propertyCheckers + override val classCheckers: Set + get() = _classCheckers override val regularClassCheckers: Set get() = _regularClassCheckers override val constructorCheckers: Set @@ -38,6 +40,7 @@ internal class ComposedDeclarationCheckers : DeclarationCheckers() { private val _memberDeclarationCheckers: MutableSet = mutableSetOf() private val _functionCheckers: MutableSet = mutableSetOf() private val _propertyCheckers: MutableSet = mutableSetOf() + private val _classCheckers: MutableSet = mutableSetOf() private val _regularClassCheckers: MutableSet = mutableSetOf() private val _constructorCheckers: MutableSet = mutableSetOf() private val _fileCheckers: MutableSet = mutableSetOf() @@ -50,6 +53,7 @@ internal class ComposedDeclarationCheckers : DeclarationCheckers() { _memberDeclarationCheckers += checkers.allMemberDeclarationCheckers _functionCheckers += checkers.allFunctionCheckers _propertyCheckers += checkers.allPropertyCheckers + _classCheckers += checkers.allClassCheckers _regularClassCheckers += checkers.allRegularClassCheckers _constructorCheckers += checkers.allConstructorCheckers _fileCheckers += checkers.allFileCheckers diff --git a/compiler/fir/checkers/gen/org/jetbrains/kotlin/fir/analysis/checkers/declaration/DeclarationCheckers.kt b/compiler/fir/checkers/gen/org/jetbrains/kotlin/fir/analysis/checkers/declaration/DeclarationCheckers.kt index f96ece8dbe5..a479744b463 100644 --- a/compiler/fir/checkers/gen/org/jetbrains/kotlin/fir/analysis/checkers/declaration/DeclarationCheckers.kt +++ b/compiler/fir/checkers/gen/org/jetbrains/kotlin/fir/analysis/checkers/declaration/DeclarationCheckers.kt @@ -23,6 +23,7 @@ abstract class DeclarationCheckers { open val memberDeclarationCheckers: Set = emptySet() open val functionCheckers: Set = emptySet() open val propertyCheckers: Set = emptySet() + open val classCheckers: Set = emptySet() open val regularClassCheckers: Set = emptySet() open val constructorCheckers: Set = emptySet() open val fileCheckers: Set = emptySet() @@ -34,7 +35,8 @@ abstract class DeclarationCheckers { @CheckersComponentInternal internal val allMemberDeclarationCheckers: Set get() = memberDeclarationCheckers + allBasicDeclarationCheckers @CheckersComponentInternal internal val allFunctionCheckers: Set get() = functionCheckers + allBasicDeclarationCheckers @CheckersComponentInternal internal val allPropertyCheckers: Set get() = propertyCheckers + allMemberDeclarationCheckers - @CheckersComponentInternal internal val allRegularClassCheckers: Set get() = regularClassCheckers + allMemberDeclarationCheckers + @CheckersComponentInternal internal val allClassCheckers: Set get() = classCheckers + allBasicDeclarationCheckers + @CheckersComponentInternal internal val allRegularClassCheckers: Set get() = regularClassCheckers + allMemberDeclarationCheckers + allClassCheckers @CheckersComponentInternal internal val allConstructorCheckers: Set get() = constructorCheckers + allFunctionCheckers @CheckersComponentInternal internal val allFileCheckers: Set get() = fileCheckers + allBasicDeclarationCheckers } diff --git a/compiler/fir/checkers/gen/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirDeclarationCheckerAliases.kt b/compiler/fir/checkers/gen/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirDeclarationCheckerAliases.kt index ef4ca66ed49..23e8f7dda22 100644 --- a/compiler/fir/checkers/gen/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirDeclarationCheckerAliases.kt +++ b/compiler/fir/checkers/gen/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirDeclarationCheckerAliases.kt @@ -10,6 +10,7 @@ package org.jetbrains.kotlin.fir.analysis.checkers.declaration * DO NOT MODIFY IT MANUALLY */ +import org.jetbrains.kotlin.fir.declarations.FirClass import org.jetbrains.kotlin.fir.declarations.FirConstructor import org.jetbrains.kotlin.fir.declarations.FirDeclaration import org.jetbrains.kotlin.fir.declarations.FirFile @@ -22,6 +23,7 @@ typealias FirBasicDeclarationChecker = FirDeclarationChecker typealias FirMemberDeclarationChecker = FirDeclarationChecker typealias FirFunctionChecker = FirDeclarationChecker> typealias FirPropertyChecker = FirDeclarationChecker +typealias FirClassChecker = FirDeclarationChecker> typealias FirRegularClassChecker = FirDeclarationChecker typealias FirConstructorChecker = FirDeclarationChecker typealias FirFileChecker = FirDeclarationChecker diff --git a/compiler/fir/checkers/gen/org/jetbrains/kotlin/fir/analysis/checkers/expression/ComposedExpressionCheckers.kt b/compiler/fir/checkers/gen/org/jetbrains/kotlin/fir/analysis/checkers/expression/ComposedExpressionCheckers.kt index 842faa079dc..f4e8d19e20a 100644 --- a/compiler/fir/checkers/gen/org/jetbrains/kotlin/fir/analysis/checkers/expression/ComposedExpressionCheckers.kt +++ b/compiler/fir/checkers/gen/org/jetbrains/kotlin/fir/analysis/checkers/expression/ComposedExpressionCheckers.kt @@ -21,11 +21,14 @@ internal class ComposedExpressionCheckers : ExpressionCheckers() { get() = _functionCallCheckers override val variableAssignmentCheckers: Set get() = _variableAssignmentCheckers + override val tryExpressionCheckers: Set + get() = _tryExpressionCheckers private val _basicExpressionCheckers: MutableSet = mutableSetOf() private val _qualifiedAccessCheckers: MutableSet = mutableSetOf() private val _functionCallCheckers: MutableSet = mutableSetOf() private val _variableAssignmentCheckers: MutableSet = mutableSetOf() + private val _tryExpressionCheckers: MutableSet = mutableSetOf() @CheckersComponentInternal internal fun register(checkers: ExpressionCheckers) { @@ -33,5 +36,6 @@ internal class ComposedExpressionCheckers : ExpressionCheckers() { _qualifiedAccessCheckers += checkers.allQualifiedAccessCheckers _functionCallCheckers += checkers.allFunctionCallCheckers _variableAssignmentCheckers += checkers.allVariableAssignmentCheckers + _tryExpressionCheckers += checkers.allTryExpressionCheckers } } diff --git a/compiler/fir/checkers/gen/org/jetbrains/kotlin/fir/analysis/checkers/expression/ExpressionCheckers.kt b/compiler/fir/checkers/gen/org/jetbrains/kotlin/fir/analysis/checkers/expression/ExpressionCheckers.kt index 73101389aa4..72e167d29e2 100644 --- a/compiler/fir/checkers/gen/org/jetbrains/kotlin/fir/analysis/checkers/expression/ExpressionCheckers.kt +++ b/compiler/fir/checkers/gen/org/jetbrains/kotlin/fir/analysis/checkers/expression/ExpressionCheckers.kt @@ -21,9 +21,11 @@ abstract class ExpressionCheckers { open val qualifiedAccessCheckers: Set = emptySet() open val functionCallCheckers: Set = emptySet() open val variableAssignmentCheckers: Set = emptySet() + open val tryExpressionCheckers: Set = emptySet() @CheckersComponentInternal internal val allBasicExpressionCheckers: Set get() = basicExpressionCheckers @CheckersComponentInternal internal val allQualifiedAccessCheckers: Set get() = qualifiedAccessCheckers + allBasicExpressionCheckers @CheckersComponentInternal internal val allFunctionCallCheckers: Set get() = functionCallCheckers + allQualifiedAccessCheckers @CheckersComponentInternal internal val allVariableAssignmentCheckers: Set get() = variableAssignmentCheckers + allBasicExpressionCheckers + @CheckersComponentInternal internal val allTryExpressionCheckers: Set get() = tryExpressionCheckers + allBasicExpressionCheckers } diff --git a/compiler/fir/checkers/gen/org/jetbrains/kotlin/fir/analysis/checkers/expression/FirExpressionCheckerAliases.kt b/compiler/fir/checkers/gen/org/jetbrains/kotlin/fir/analysis/checkers/expression/FirExpressionCheckerAliases.kt index 5ff7f6070cd..3f7f70d9f3d 100644 --- a/compiler/fir/checkers/gen/org/jetbrains/kotlin/fir/analysis/checkers/expression/FirExpressionCheckerAliases.kt +++ b/compiler/fir/checkers/gen/org/jetbrains/kotlin/fir/analysis/checkers/expression/FirExpressionCheckerAliases.kt @@ -13,9 +13,11 @@ package org.jetbrains.kotlin.fir.analysis.checkers.expression import org.jetbrains.kotlin.fir.expressions.FirFunctionCall import org.jetbrains.kotlin.fir.expressions.FirQualifiedAccessExpression import org.jetbrains.kotlin.fir.expressions.FirStatement +import org.jetbrains.kotlin.fir.expressions.FirTryExpression import org.jetbrains.kotlin.fir.expressions.FirVariableAssignment typealias FirBasicExpressionChecker = FirExpressionChecker typealias FirQualifiedAccessChecker = FirExpressionChecker typealias FirFunctionCallChecker = FirExpressionChecker typealias FirVariableAssignmentChecker = FirExpressionChecker +typealias FirTryExpressionChecker = FirExpressionChecker diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/cfa/AbstractFirPropertyInitializationChecker.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/cfa/AbstractFirPropertyInitializationChecker.kt index 85ee137300e..768d3a3cb26 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/cfa/AbstractFirPropertyInitializationChecker.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/cfa/AbstractFirPropertyInitializationChecker.kt @@ -5,6 +5,7 @@ package org.jetbrains.kotlin.fir.analysis.cfa +import org.jetbrains.kotlin.fir.analysis.checkers.context.CheckerContext import org.jetbrains.kotlin.fir.analysis.diagnostics.DiagnosticReporter import org.jetbrains.kotlin.fir.resolve.dfa.cfg.CFGNode import org.jetbrains.kotlin.fir.resolve.dfa.cfg.ControlFlowGraph @@ -15,6 +16,7 @@ abstract class AbstractFirPropertyInitializationChecker { graph: ControlFlowGraph, reporter: DiagnosticReporter, data: Map, PathAwarePropertyInitializationInfo>, - properties: Set + properties: Set, + context: CheckerContext ) -} \ No newline at end of file +} diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/cfa/FirCallsEffectAnalyzer.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/cfa/FirCallsEffectAnalyzer.kt index f4b495535a9..a032d9da587 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/cfa/FirCallsEffectAnalyzer.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/cfa/FirCallsEffectAnalyzer.kt @@ -43,7 +43,7 @@ import kotlin.contracts.contract object FirCallsEffectAnalyzer : FirControlFlowChecker() { - override fun analyze(graph: ControlFlowGraph, reporter: DiagnosticReporter, checkerContext: CheckerContext) { + override fun analyze(graph: ControlFlowGraph, reporter: DiagnosticReporter, context: CheckerContext) { val function = (graph.declaration as? FirFunction<*>) ?: return if (function !is FirContractDescriptionOwner) return if (function.contractDescription.coneEffects?.any { it is ConeCallsEffectDeclaration } != true) return @@ -73,10 +73,10 @@ object FirCallsEffectAnalyzer : FirControlFlowChecker() { for ((symbol, leakedPlaces) in leakedSymbols) { function.contractDescription.source?.let { - reporter.report(FirErrors.LEAKED_IN_PLACE_LAMBDA.on(it, symbol)) + reporter.report(FirErrors.LEAKED_IN_PLACE_LAMBDA.on(it, symbol), context) } leakedPlaces.forEach { - reporter.report(FirErrors.LEAKED_IN_PLACE_LAMBDA.on(it, symbol)) + reporter.report(FirErrors.LEAKED_IN_PLACE_LAMBDA.on(it, symbol), context) } } @@ -91,7 +91,7 @@ object FirCallsEffectAnalyzer : FirControlFlowChecker() { val requiredRange = effectDeclaration.kind val pathAwareInfo = invocationData.getValue(node) for (info in pathAwareInfo.values) { - if (investigate(info, symbol, requiredRange, function, reporter)) { + if (investigate(info, symbol, requiredRange, function, reporter, context)) { // To avoid duplicate reports, stop investigating remaining paths once reported. break } @@ -105,12 +105,13 @@ object FirCallsEffectAnalyzer : FirControlFlowChecker() { symbol: AbstractFirBasedSymbol<*>, requiredRange: EventOccurrencesRange, function: FirContractDescriptionOwner, - reporter: DiagnosticReporter + reporter: DiagnosticReporter, + context: CheckerContext ): Boolean { val foundRange = info[symbol] ?: EventOccurrencesRange.ZERO if (foundRange !in requiredRange) { function.contractDescription.source?.let { - reporter.report(FirErrors.WRONG_INVOCATION_KIND.on(it, symbol, requiredRange, foundRange)) + reporter.report(FirErrors.WRONG_INVOCATION_KIND.on(it, symbol, requiredRange, foundRange), context) return true } } diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/cfa/FirControlFlowAnalyzer.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/cfa/FirControlFlowAnalyzer.kt index 23059a41cc8..15a55601371 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/cfa/FirControlFlowAnalyzer.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/cfa/FirControlFlowAnalyzer.kt @@ -29,27 +29,32 @@ class FirControlFlowAnalyzer(session: FirSession) { cfaCheckers.forEach { it.analyze(graph, reporter, context) } if (context.containingDeclarations.any { it is FirProperty || it is FirFunction<*> }) return - runAssignmentCfaCheckers(graph, reporter) + runAssignmentCfaCheckers(graph, reporter, context) } fun analyzePropertyInitializer(property: FirProperty, graph: ControlFlowGraph, context: CheckerContext, reporter: DiagnosticReporter) { if (graph.owner != null) return cfaCheckers.forEach { it.analyze(graph, reporter, context) } - runAssignmentCfaCheckers(graph, reporter) + runAssignmentCfaCheckers(graph, reporter, context) } - fun analyzePropertyAccessor(accessor: FirPropertyAccessor, graph: ControlFlowGraph, context: CheckerContext, reporter: DiagnosticReporter) { + fun analyzePropertyAccessor( + accessor: FirPropertyAccessor, + graph: ControlFlowGraph, + context: CheckerContext, + reporter: DiagnosticReporter + ) { if (graph.owner != null) return cfaCheckers.forEach { it.analyze(graph, reporter, context) } - runAssignmentCfaCheckers(graph, reporter) + runAssignmentCfaCheckers(graph, reporter, context) } - private fun runAssignmentCfaCheckers(graph: ControlFlowGraph, reporter: DiagnosticReporter) { + private fun runAssignmentCfaCheckers(graph: ControlFlowGraph, reporter: DiagnosticReporter, context: CheckerContext) { val properties = LocalPropertyCollector.collect(graph) if (properties.isEmpty()) return val data = PropertyInitializationInfoCollector(properties).getData(graph) - variableAssignmentCheckers.forEach { it.analyze(graph, reporter, data, properties) } + variableAssignmentCheckers.forEach { it.analyze(graph, reporter, data, properties, context) } } } diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/cfa/FirPropertyInitializationAnalyzer.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/cfa/FirPropertyInitializationAnalyzer.kt index 8a1fffdccf5..77f95118e22 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/cfa/FirPropertyInitializationAnalyzer.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/cfa/FirPropertyInitializationAnalyzer.kt @@ -7,6 +7,7 @@ package org.jetbrains.kotlin.fir.analysis.cfa import org.jetbrains.kotlin.contracts.description.EventOccurrencesRange import org.jetbrains.kotlin.contracts.description.isDefinitelyVisited +import org.jetbrains.kotlin.fir.analysis.checkers.context.CheckerContext import org.jetbrains.kotlin.fir.analysis.diagnostics.DiagnosticReporter import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors import org.jetbrains.kotlin.fir.declarations.isLateInit @@ -23,7 +24,8 @@ object FirPropertyInitializationAnalyzer : AbstractFirPropertyInitializationChec graph: ControlFlowGraph, reporter: DiagnosticReporter, data: Map, PathAwarePropertyInitializationInfo>, - properties: Set + properties: Set, + context: CheckerContext ) { val localData = data.filter { val symbolFir = (it.key.fir as? FirVariableSymbol<*>)?.fir @@ -32,14 +34,15 @@ object FirPropertyInitializationAnalyzer : AbstractFirPropertyInitializationChec val localProperties = properties.filter { it.fir.initializer == null && it.fir.delegate == null }.toSet() - val reporterVisitor = UninitializedPropertyReporter(localData, localProperties, reporter) + val reporterVisitor = UninitializedPropertyReporter(localData, localProperties, reporter, context) graph.traverse(TraverseDirection.Forward, reporterVisitor) } private class UninitializedPropertyReporter( val data: Map, PathAwarePropertyInitializationInfo>, val localProperties: Set, - val reporter: DiagnosticReporter + val reporter: DiagnosticReporter, + val context: CheckerContext ) : ControlFlowGraphVisitorVoid() { override fun visitNode(node: CFGNode<*>) {} @@ -61,7 +64,7 @@ object FirPropertyInitializationAnalyzer : AbstractFirPropertyInitializationChec val kind = info[symbol] ?: EventOccurrencesRange.ZERO if (!kind.isDefinitelyVisited()) { node.fir.source?.let { - reporter.report(FirErrors.UNINITIALIZED_VARIABLE.on(it, symbol)) + reporter.report(FirErrors.UNINITIALIZED_VARIABLE.on(it, symbol), context) return true } } diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/cfa/FirReturnsImpliesAnalyzer.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/cfa/FirReturnsImpliesAnalyzer.kt index 02b2df564e2..9be1c19f66a 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/cfa/FirReturnsImpliesAnalyzer.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/cfa/FirReturnsImpliesAnalyzer.kt @@ -36,7 +36,7 @@ import org.jetbrains.kotlin.utils.addIfNotNull object FirReturnsImpliesAnalyzer : FirControlFlowChecker() { - override fun analyze(graph: ControlFlowGraph, reporter: DiagnosticReporter, checkerContext: CheckerContext) { + override fun analyze(graph: ControlFlowGraph, reporter: DiagnosticReporter, context: CheckerContext) { val function = graph.declaration as? FirFunction<*> ?: return val graphRef = function.controlFlowGraphReference as FirControlFlowGraphReferenceImpl val dataFlowInfo = graphRef.dataFlowInfo @@ -62,7 +62,7 @@ object FirReturnsImpliesAnalyzer : FirControlFlowChecker() { if (wrongCondition) { function.contractDescription.source?.let { - reporter.report(FirErrors.WRONG_IMPLIES_CONDITION.on(it)) + reporter.report(FirErrors.WRONG_IMPLIES_CONDITION.on(it), context) } } } @@ -215,4 +215,4 @@ object FirReturnsImpliesAnalyzer : FirControlFlowChecker() { private fun FirFunction<*>.getParameterSymbol(index: Int): AbstractFirBasedSymbol<*> { return if (index == -1) this.symbol else this.valueParameters[index].symbol } -} \ No newline at end of file +} diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/FirHelpers.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/FirHelpers.kt index 2b5a7f6f0d4..ab254cab222 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/FirHelpers.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/FirHelpers.kt @@ -11,6 +11,7 @@ import org.jetbrains.kotlin.descriptors.Visibilities import org.jetbrains.kotlin.descriptors.Visibility import org.jetbrains.kotlin.fir.FirSession import org.jetbrains.kotlin.fir.FirSymbolOwner +import org.jetbrains.kotlin.fir.analysis.cfa.FirReturnsImpliesAnalyzer.isSupertypeOf import org.jetbrains.kotlin.fir.analysis.checkers.context.CheckerContext import org.jetbrains.kotlin.fir.analysis.diagnostics.modalityModifier import org.jetbrains.kotlin.fir.analysis.diagnostics.overrideModifier @@ -22,21 +23,22 @@ import org.jetbrains.kotlin.fir.expressions.FirQualifiedAccessExpression import org.jetbrains.kotlin.fir.expressions.impl.FirEmptyExpressionBlock import org.jetbrains.kotlin.fir.references.FirResolvedNamedReference import org.jetbrains.kotlin.fir.resolve.firSymbolProvider +import org.jetbrains.kotlin.fir.resolve.fullyExpandedType import org.jetbrains.kotlin.fir.resolve.toSymbol import org.jetbrains.kotlin.fir.resolve.transformers.firClassLike import org.jetbrains.kotlin.fir.scopes.ProcessorAction import org.jetbrains.kotlin.fir.scopes.processOverriddenFunctions import org.jetbrains.kotlin.fir.scopes.unsubstitutedScope +import org.jetbrains.kotlin.fir.symbols.StandardClassIds import org.jetbrains.kotlin.fir.symbols.impl.FirFunctionSymbol import org.jetbrains.kotlin.fir.symbols.impl.FirNamedFunctionSymbol import org.jetbrains.kotlin.fir.symbols.impl.FirRegularClassSymbol -import org.jetbrains.kotlin.fir.types.ConeClassLikeType -import org.jetbrains.kotlin.fir.types.ConeKotlinType -import org.jetbrains.kotlin.fir.types.FirResolvedTypeRef -import org.jetbrains.kotlin.fir.types.FirTypeRef +import org.jetbrains.kotlin.fir.typeCheckerContext +import org.jetbrains.kotlin.fir.types.* import org.jetbrains.kotlin.lexer.KtModifierKeywordToken import org.jetbrains.kotlin.lexer.KtTokens import org.jetbrains.kotlin.psi.KtModifierList +import org.jetbrains.kotlin.psi.KtObjectLiteralExpression import org.jetbrains.kotlin.psi.psiUtil.visibilityModifierType import org.jetbrains.kotlin.utils.addToStdlib.safeAs @@ -317,3 +319,8 @@ fun Modality.toToken(): KtModifierKeywordToken = when (this) { val FirFunctionCall.isIterator get() = this.calleeReference.name.asString() == "" + +internal fun throwableClassLikeType(session: FirSession) = session.builtinTypes.throwableType.type + +fun ConeKotlinType.isSubtypeOfThrowable(session: FirSession) = + throwableClassLikeType(session).isSupertypeOf(session.typeCheckerContext, this.fullyExpandedType(session)) \ No newline at end of file diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/cfa/FirControlFlowChecker.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/cfa/FirControlFlowChecker.kt index 2444159e918..08ac0130776 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/cfa/FirControlFlowChecker.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/cfa/FirControlFlowChecker.kt @@ -10,5 +10,5 @@ import org.jetbrains.kotlin.fir.analysis.diagnostics.DiagnosticReporter import org.jetbrains.kotlin.fir.resolve.dfa.cfg.ControlFlowGraph abstract class FirControlFlowChecker { - abstract fun analyze(graph: ControlFlowGraph, reporter: DiagnosticReporter, checkerContext: CheckerContext) -} \ No newline at end of file + abstract fun analyze(graph: ControlFlowGraph, reporter: DiagnosticReporter, context: CheckerContext) +} diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/context/CheckerContext.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/context/CheckerContext.kt index 4f67ab4df9b..50f8ae30f35 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/context/CheckerContext.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/context/CheckerContext.kt @@ -6,13 +6,16 @@ package org.jetbrains.kotlin.fir.analysis.checkers.context import kotlinx.collections.immutable.PersistentList +import kotlinx.collections.immutable.PersistentSet import kotlinx.collections.immutable.persistentListOf +import kotlinx.collections.immutable.persistentSetOf import org.jetbrains.kotlin.fir.FirSession import org.jetbrains.kotlin.fir.declarations.FirDeclaration import org.jetbrains.kotlin.fir.resolve.ImplicitReceiverStack import org.jetbrains.kotlin.fir.resolve.PersistentImplicitReceiverStack import org.jetbrains.kotlin.fir.resolve.SessionHolder import org.jetbrains.kotlin.fir.resolve.calls.ImplicitReceiverValue +import org.jetbrains.kotlin.fir.resolve.calls.InapplicableArgumentDiagnostic import org.jetbrains.kotlin.fir.resolve.transformers.ReturnTypeCalculator import org.jetbrains.kotlin.name.Name @@ -21,6 +24,10 @@ abstract class CheckerContext { abstract val containingDeclarations: List abstract val sessionHolder: SessionHolder abstract val returnTypeCalculator: ReturnTypeCalculator + abstract val suppressedDiagnostics: Set + abstract val allInfosSuppressed: Boolean + abstract val allWarningsSuppressed: Boolean + abstract val allErrorsSuppressed: Boolean val session: FirSession get() = sessionHolder.session @@ -38,17 +45,25 @@ abstract class CheckerContext { } } -class PersistentCheckerContext( - override val implicitReceiverStack: PersistentImplicitReceiverStack = PersistentImplicitReceiverStack(), - override val containingDeclarations: PersistentList = persistentListOf(), +class PersistentCheckerContext private constructor( + override val implicitReceiverStack: PersistentImplicitReceiverStack, + override val containingDeclarations: PersistentList, override val sessionHolder: SessionHolder, override val returnTypeCalculator: ReturnTypeCalculator, + override val suppressedDiagnostics: PersistentSet, + override val allInfosSuppressed: Boolean, + override val allWarningsSuppressed: Boolean, + override val allErrorsSuppressed: Boolean ) : CheckerContext() { constructor(sessionHolder: SessionHolder, returnTypeCalculator: ReturnTypeCalculator) : this( PersistentImplicitReceiverStack(), persistentListOf(), sessionHolder, - returnTypeCalculator + returnTypeCalculator, + persistentSetOf(), + allInfosSuppressed = false, + allWarningsSuppressed = false, + allErrorsSuppressed = false ) fun addImplicitReceiver(name: Name?, value: ImplicitReceiverValue<*>): PersistentCheckerContext { @@ -56,7 +71,11 @@ class PersistentCheckerContext( implicitReceiverStack.add(name, value), containingDeclarations, sessionHolder, - returnTypeCalculator + returnTypeCalculator, + suppressedDiagnostics, + allInfosSuppressed, + allWarningsSuppressed, + allErrorsSuppressed ) } @@ -65,7 +84,30 @@ class PersistentCheckerContext( implicitReceiverStack, containingDeclarations.add(declaration), sessionHolder, - returnTypeCalculator + returnTypeCalculator, + suppressedDiagnostics, + allInfosSuppressed, + allWarningsSuppressed, + allErrorsSuppressed + ) + } + + fun addSuppressedDiagnostics( + diagnosticNames: Collection, + allInfosSuppressed: Boolean, + allWarningsSuppressed: Boolean, + allErrorsSuppressed: Boolean + ): PersistentCheckerContext { + if (diagnosticNames.isEmpty()) return this + return PersistentCheckerContext( + implicitReceiverStack, + containingDeclarations, + sessionHolder, + returnTypeCalculator, + suppressedDiagnostics.addAll(diagnosticNames), + this.allInfosSuppressed || allInfosSuppressed, + this.allWarningsSuppressed || allWarningsSuppressed, + this.allErrorsSuppressed || allErrorsSuppressed ) } } diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirAnnotationArgumentChecker.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirAnnotationArgumentChecker.kt index 3c0f14fea44..c0465b574f3 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirAnnotationArgumentChecker.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirAnnotationArgumentChecker.kt @@ -5,21 +5,24 @@ package org.jetbrains.kotlin.fir.analysis.checkers.declaration -import com.intellij.psi.PsiElement import org.jetbrains.kotlin.descriptors.ClassKind import org.jetbrains.kotlin.descriptors.Modality +import org.jetbrains.kotlin.fir.FirAnnotationContainer +import org.jetbrains.kotlin.fir.FirSession +import org.jetbrains.kotlin.fir.FirSourceElement +import org.jetbrains.kotlin.fir.FirSymbolOwner import org.jetbrains.kotlin.fir.analysis.checkers.context.CheckerContext import org.jetbrains.kotlin.fir.analysis.diagnostics.DiagnosticReporter import org.jetbrains.kotlin.fir.analysis.diagnostics.FirDiagnosticFactory0 import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors +import org.jetbrains.kotlin.fir.analysis.diagnostics.reportOn +import org.jetbrains.kotlin.fir.declarations.* +import org.jetbrains.kotlin.fir.expressions.* import org.jetbrains.kotlin.fir.references.FirErrorNamedReference +import org.jetbrains.kotlin.fir.references.FirResolvedNamedReference import org.jetbrains.kotlin.fir.resolve.toSymbol import org.jetbrains.kotlin.fir.scopes.impl.FirIntegerOperatorCall import org.jetbrains.kotlin.fir.symbols.StandardClassIds -import org.jetbrains.kotlin.fir.* -import org.jetbrains.kotlin.fir.declarations.* -import org.jetbrains.kotlin.fir.expressions.* -import org.jetbrains.kotlin.fir.references.FirResolvedNamedReference import org.jetbrains.kotlin.fir.symbols.impl.FirCallableSymbol import org.jetbrains.kotlin.fir.types.* import org.jetbrains.kotlin.name.Name @@ -36,8 +39,8 @@ object FirAnnotationArgumentChecker : FirBasicDeclarationChecker() { for ((arg, _) in declarationOfAnnotation.argumentMapping ?: continue) { val expression = (arg as? FirNamedArgumentExpression)?.expression ?: arg - checkAnnotationArgumentWithSubElements(expression, context.session, reporter) - ?.let { reporter.report(expression.source, it) } + checkAnnotationArgumentWithSubElements(expression, context.session, reporter, context) + ?.let { reporter.reportOn(expression.source, it, context) } } } } @@ -45,7 +48,8 @@ object FirAnnotationArgumentChecker : FirBasicDeclarationChecker() { private fun checkAnnotationArgumentWithSubElements( expression: FirExpression, session: FirSession, - reporter: DiagnosticReporter + reporter: DiagnosticReporter, + context: CheckerContext ): FirDiagnosticFactory0? { when (expression) { is FirArrayOfCall -> { @@ -54,13 +58,13 @@ object FirAnnotationArgumentChecker : FirBasicDeclarationChecker() { for (arg in expression.argumentList.arguments) { val sourceForReport = arg.source - when (val err = checkAnnotationArgumentWithSubElements(arg, session, reporter)) { + when (val err = checkAnnotationArgumentWithSubElements(arg, session, reporter, context)) { null -> { //DO NOTHING } else -> { if (err != FirErrors.ANNOTATION_ARGUMENT_MUST_BE_KCLASS_LITERAL) usedNonConst = true - reporter.report(sourceForReport, err) + reporter.reportOn(sourceForReport, err, context) } } } @@ -69,8 +73,8 @@ object FirAnnotationArgumentChecker : FirBasicDeclarationChecker() { } is FirVarargArgumentsExpression -> { for (arg in expression.arguments) - checkAnnotationArgumentWithSubElements(arg, session, reporter) - ?.let { reporter.report(arg.source, it) } + checkAnnotationArgumentWithSubElements(arg, session, reporter, context) + ?.let { reporter.reportOn(arg.source, it, context) } } else -> return checkAnnotationArgument(expression, session) @@ -224,14 +228,7 @@ object FirAnnotationArgumentChecker : FirBasicDeclarationChecker() { ?.toSymbol(session) ?.fir - private inline fun DiagnosticReporter.report( - source: T?, - factory: FirDiagnosticFactory0 - ) { - source?.let { report(factory.on(it)) } - } - private val CONVERSION_NAMES = listOf( "toInt", "toLong", "toShort", "toByte", "toFloat", "toDouble", "toChar", "toBoolean" ).mapTo(hashSetOf()) { Name.identifier(it) } -} \ No newline at end of file +} diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirAnnotationClassDeclarationChecker.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirAnnotationClassDeclarationChecker.kt index d040ea5648d..62d53ae7478 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirAnnotationClassDeclarationChecker.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirAnnotationClassDeclarationChecker.kt @@ -5,28 +5,26 @@ package org.jetbrains.kotlin.fir.analysis.checkers.declaration -import com.intellij.psi.PsiElement +import org.jetbrains.kotlin.KtNodeTypes.FUN +import org.jetbrains.kotlin.KtNodeTypes.VALUE_PARAMETER import org.jetbrains.kotlin.descriptors.ClassKind.ANNOTATION_CLASS import org.jetbrains.kotlin.descriptors.ClassKind.ENUM_CLASS -import org.jetbrains.kotlin.fir.analysis.checkers.context.CheckerContext -import org.jetbrains.kotlin.fir.declarations.* import org.jetbrains.kotlin.fir.FirSession -import org.jetbrains.kotlin.fir.FirSourceElement +import org.jetbrains.kotlin.fir.analysis.checkers.context.CheckerContext +import org.jetbrains.kotlin.fir.analysis.diagnostics.* +import org.jetbrains.kotlin.fir.declarations.* import org.jetbrains.kotlin.fir.resolve.toSymbol import org.jetbrains.kotlin.fir.symbols.StandardClassIds import org.jetbrains.kotlin.fir.symbols.StandardClassIds.primitiveArrayTypeByElementType import org.jetbrains.kotlin.fir.symbols.StandardClassIds.primitiveTypes import org.jetbrains.kotlin.fir.symbols.StandardClassIds.unsignedTypes import org.jetbrains.kotlin.fir.types.* -import org.jetbrains.kotlin.KtNodeTypes.FUN -import org.jetbrains.kotlin.KtNodeTypes.VALUE_PARAMETER -import org.jetbrains.kotlin.fir.analysis.diagnostics.* import org.jetbrains.kotlin.name.ClassId object FirAnnotationClassDeclarationChecker : FirRegularClassChecker() { override fun check(declaration: FirRegularClass, context: CheckerContext, reporter: DiagnosticReporter) { if (declaration.classKind != ANNOTATION_CLASS) return - if (declaration.isLocal) reporter.report(declaration.source, FirErrors.LOCAL_ANNOTATION_CLASS_ERROR) + if (declaration.isLocal) reporter.reportOn(declaration.source, FirErrors.LOCAL_ANNOTATION_CLASS_ERROR, context) for (it in declaration.declarations) { when { @@ -34,9 +32,9 @@ object FirAnnotationClassDeclarationChecker : FirRegularClassChecker() { for (parameter in it.valueParameters) { val source = parameter.source ?: continue if (!source.hasValOrVar()) { - reporter.report(source, FirErrors.MISSING_VAL_ON_ANNOTATION_PARAMETER) + reporter.reportOn(source, FirErrors.MISSING_VAL_ON_ANNOTATION_PARAMETER, context) } else if (source.hasVar()) { - reporter.report(source, FirErrors.VAR_ANNOTATION_PARAMETER) + reporter.reportOn(source, FirErrors.VAR_ANNOTATION_PARAMETER, context) } val typeRef = parameter.returnTypeRef @@ -48,7 +46,7 @@ object FirAnnotationClassDeclarationChecker : FirRegularClassChecker() { // TODO: replace with UNRESOLVED_REFERENCE check } coneType.isNullable -> { - reporter.report(typeRef.source, FirErrors.NULLABLE_TYPE_OF_ANNOTATION_MEMBER) + reporter.reportOn(typeRef.source, FirErrors.NULLABLE_TYPE_OF_ANNOTATION_MEMBER, context) } classId in primitiveTypes -> { // DO NOTHING: primitives are allowed as annotation class parameter @@ -67,13 +65,13 @@ object FirAnnotationClassDeclarationChecker : FirRegularClassChecker() { } classId == StandardClassIds.Array -> { if (!isAllowedArray(typeRef, context.session)) - reporter.report(typeRef.source, FirErrors.INVALID_TYPE_OF_ANNOTATION_MEMBER) + reporter.reportOn(typeRef.source, FirErrors.INVALID_TYPE_OF_ANNOTATION_MEMBER, context) } isAllowedClassKind(coneType, context.session) -> { // DO NOTHING: annotation or enum classes are allowed } else -> { - reporter.report(typeRef.source, FirErrors.INVALID_TYPE_OF_ANNOTATION_MEMBER) + reporter.reportOn(typeRef.source, FirErrors.INVALID_TYPE_OF_ANNOTATION_MEMBER, context) } } } @@ -89,7 +87,7 @@ object FirAnnotationClassDeclarationChecker : FirRegularClassChecker() { // TODO: replace with origin check } else -> { - reporter.report(it.source, FirErrors.ANNOTATION_CLASS_MEMBER) + reporter.reportOn(it.source, FirErrors.ANNOTATION_CLASS_MEMBER, context) } } } @@ -134,11 +132,4 @@ object FirAnnotationClassDeclarationChecker : FirRegularClassChecker() { return false } - - private inline fun DiagnosticReporter.report( - source: T?, - factory: FirDiagnosticFactory0 - ) { - source?.let { report(factory.on(it)) } - } } diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirCommonConstructorDelegationIssuesChecker.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirCommonConstructorDelegationIssuesChecker.kt index f633f78c32c..29196d6b2d5 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirCommonConstructorDelegationIssuesChecker.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirCommonConstructorDelegationIssuesChecker.kt @@ -6,10 +6,10 @@ package org.jetbrains.kotlin.fir.analysis.checkers.declaration import org.jetbrains.kotlin.fir.FirFakeSourceElementKind -import org.jetbrains.kotlin.fir.FirSourceElement import org.jetbrains.kotlin.fir.analysis.checkers.context.CheckerContext import org.jetbrains.kotlin.fir.analysis.diagnostics.DiagnosticReporter import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors +import org.jetbrains.kotlin.fir.analysis.diagnostics.reportOn import org.jetbrains.kotlin.fir.declarations.FirConstructor import org.jetbrains.kotlin.fir.declarations.FirRegularClass import org.jetbrains.kotlin.fir.references.FirErrorNamedReference @@ -47,9 +47,9 @@ object FirCommonConstructorDelegationIssuesChecker : FirRegularClassChecker() { for (it in otherConstructors) { if (it.delegatedConstructor?.isThis != true) { if (it.delegatedConstructor?.source != null) { - reporter.reportPrimaryConstructorDelegationCallExpected(it.delegatedConstructor?.source) + reporter.reportOn(it.delegatedConstructor?.source, FirErrors.PRIMARY_CONSTRUCTOR_DELEGATION_CALL_EXPECTED, context) } else { - reporter.reportPrimaryConstructorDelegationCallExpected(it.source) + reporter.reportOn(it.source, FirErrors.PRIMARY_CONSTRUCTOR_DELEGATION_CALL_EXPECTED, context) } } } @@ -62,13 +62,13 @@ object FirCommonConstructorDelegationIssuesChecker : FirRegularClassChecker() { callee is FirErrorNamedReference && callee.diagnostic is ConeAmbiguityError && it.delegatedConstructor?.source?.kind is FirFakeSourceElementKind ) { - reporter.reportExplicitDelegationCallRequired(it.source) + reporter.reportOn(it.source, FirErrors.EXPLICIT_DELEGATION_CALL_REQUIRED, context) } } } cyclicConstructors.forEach { - reporter.reportCyclicConstructorDelegationCall(it.delegatedConstructor?.source) + reporter.reportOn(it.delegatedConstructor?.source, FirErrors.CYCLIC_CONSTRUCTOR_DELEGATION_CALL, context) } } @@ -95,16 +95,4 @@ object FirCommonConstructorDelegationIssuesChecker : FirRegularClassChecker() { ?.calleeReference.safeAs() ?.resolvedSymbol ?.fir.safeAs() - - private fun DiagnosticReporter.reportCyclicConstructorDelegationCall(source: FirSourceElement?) { - source?.let { report(FirErrors.CYCLIC_CONSTRUCTOR_DELEGATION_CALL.on(it)) } - } - - private fun DiagnosticReporter.reportPrimaryConstructorDelegationCallExpected(source: FirSourceElement?) { - source?.let { report(FirErrors.PRIMARY_CONSTRUCTOR_DELEGATION_CALL_EXPECTED.on(it)) } - } - - private fun DiagnosticReporter.reportExplicitDelegationCallRequired(source: FirSourceElement?) { - source?.let { report(FirErrors.EXPLICIT_DELEGATION_CALL_REQUIRED.on(it)) } - } -} \ No newline at end of file +} diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirConflictingProjectionChecker.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirConflictingProjectionChecker.kt index 39e73764caf..577a93cd63e 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirConflictingProjectionChecker.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirConflictingProjectionChecker.kt @@ -5,10 +5,10 @@ package org.jetbrains.kotlin.fir.analysis.checkers.declaration -import org.jetbrains.kotlin.fir.FirSourceElement import org.jetbrains.kotlin.fir.analysis.checkers.context.CheckerContext import org.jetbrains.kotlin.fir.analysis.diagnostics.DiagnosticReporter import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors +import org.jetbrains.kotlin.fir.analysis.diagnostics.reportOn import org.jetbrains.kotlin.fir.declarations.* import org.jetbrains.kotlin.fir.resolve.toSymbol import org.jetbrains.kotlin.fir.types.* @@ -35,7 +35,7 @@ object FirConflictingProjectionChecker : FirBasicDeclarationChecker() { is FirTypeAlias -> { for (it in declaration.typeParameters) { if (it.variance != Variance.INVARIANT) { - reporter.reportVarianceNotAllowed(it.source) + reporter.reportOn(it.source, FirErrors.VARIANCE_ON_TYPE_PARAMETER_NOT_ALLOWED, context) } } checkTypeRef(declaration.expandedTypeRef, context, reporter) @@ -70,17 +70,9 @@ object FirConflictingProjectionChecker : FirBasicDeclarationChecker() { actual is ConeKotlinTypeProjectionIn && protoVariance == Variance.OUT_VARIANCE || actual is ConeKotlinTypeProjectionOut && protoVariance == Variance.IN_VARIANCE ) { - reporter.reportConflictingProjections(typeRef.source, typeRef.coneType.toString()) + reporter.reportOn(typeRef.source, FirErrors.CONFLICTING_PROJECTION, typeRef.coneType.toString(), context) return } } } - - private fun DiagnosticReporter.reportConflictingProjections(source: FirSourceElement?, desiredProjection: String) { - source?.let { report(FirErrors.CONFLICTING_PROJECTION.on(it, desiredProjection)) } - } - - private fun DiagnosticReporter.reportVarianceNotAllowed(source: FirSourceElement?) { - source?.let { report(FirErrors.VARIANCE_ON_TYPE_PARAMETER_NOT_ALLOWED.on(it)) } - } -} \ No newline at end of file +} diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirConflictsChecker.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirConflictsChecker.kt index a235e4583c5..4613251a767 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirConflictsChecker.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirConflictsChecker.kt @@ -5,11 +5,11 @@ package org.jetbrains.kotlin.fir.analysis.checkers.declaration -import org.jetbrains.kotlin.fir.FirSourceElement import org.jetbrains.kotlin.fir.analysis.checkers.FirDeclarationInspector import org.jetbrains.kotlin.fir.analysis.checkers.context.CheckerContext import org.jetbrains.kotlin.fir.analysis.diagnostics.DiagnosticReporter import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors +import org.jetbrains.kotlin.fir.analysis.diagnostics.reportOn import org.jetbrains.kotlin.fir.declarations.FirDeclaration import org.jetbrains.kotlin.fir.declarations.FirFile import org.jetbrains.kotlin.fir.declarations.FirRegularClass @@ -25,11 +25,11 @@ object FirConflictsChecker : FirBasicDeclarationChecker() { } inspector.functionDeclarations.forEachNonSingle { it, hint -> - reporter.reportConflictingOverloads(it.source, hint) + reporter.reportOn(it.source, FirErrors.CONFLICTING_OVERLOADS, hint, context) } inspector.otherDeclarations.forEachNonSingle { it, hint -> - reporter.reportConflictingDeclarations(it.source, hint) + reporter.reportOn(it.source, FirErrors.REDECLARATION, hint, context) } } @@ -56,12 +56,4 @@ object FirConflictsChecker : FirBasicDeclarationChecker() { inspector.collect(it) } } - - private fun DiagnosticReporter.reportConflictingOverloads(source: FirSourceElement?, declarations: String) { - source?.let { report(FirErrors.CONFLICTING_OVERLOADS.on(it, declarations)) } - } - - private fun DiagnosticReporter.reportConflictingDeclarations(source: FirSourceElement?, declarations: String) { - source?.let { report(FirErrors.REDECLARATION.on(it, declarations)) } - } } diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirConstructorAllowedChecker.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirConstructorAllowedChecker.kt index aa758f87fe6..28532e3cc63 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirConstructorAllowedChecker.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirConstructorAllowedChecker.kt @@ -5,16 +5,14 @@ package org.jetbrains.kotlin.fir.analysis.checkers.declaration -import com.intellij.psi.PsiElement import org.jetbrains.kotlin.KtNodeTypes import org.jetbrains.kotlin.descriptors.ClassKind import org.jetbrains.kotlin.descriptors.Modality -import org.jetbrains.kotlin.fir.FirSourceElement import org.jetbrains.kotlin.descriptors.Visibilities import org.jetbrains.kotlin.fir.analysis.checkers.context.CheckerContext import org.jetbrains.kotlin.fir.analysis.diagnostics.DiagnosticReporter -import org.jetbrains.kotlin.fir.analysis.diagnostics.FirDiagnosticFactory0 import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors +import org.jetbrains.kotlin.fir.analysis.diagnostics.reportOn import org.jetbrains.kotlin.fir.declarations.* object FirConstructorAllowedChecker : FirConstructorChecker() { @@ -26,27 +24,20 @@ object FirConstructorAllowedChecker : FirConstructorChecker() { return } when (containingClass.classKind) { - ClassKind.OBJECT -> reporter.report(source, FirErrors.CONSTRUCTOR_IN_OBJECT) - ClassKind.INTERFACE -> reporter.report(source, FirErrors.CONSTRUCTOR_IN_INTERFACE) - ClassKind.ENUM_ENTRY -> reporter.report(source, FirErrors.CONSTRUCTOR_IN_OBJECT) + ClassKind.OBJECT -> reporter.reportOn(source, FirErrors.CONSTRUCTOR_IN_OBJECT, context) + ClassKind.INTERFACE -> reporter.reportOn(source, FirErrors.CONSTRUCTOR_IN_INTERFACE, context) + ClassKind.ENUM_ENTRY -> reporter.reportOn(source, FirErrors.CONSTRUCTOR_IN_OBJECT, context) ClassKind.ENUM_CLASS -> if (declaration.visibility != Visibilities.Private) { - reporter.report(source, FirErrors.NON_PRIVATE_CONSTRUCTOR_IN_ENUM) + reporter.reportOn(source, FirErrors.NON_PRIVATE_CONSTRUCTOR_IN_ENUM, context) } ClassKind.CLASS -> if (containingClass is FirRegularClass && containingClass.modality == Modality.SEALED && declaration.visibility != Visibilities.Private ) { - reporter.report(source, FirErrors.NON_PRIVATE_CONSTRUCTOR_IN_SEALED) + reporter.reportOn(source, FirErrors.NON_PRIVATE_CONSTRUCTOR_IN_SEALED, context) } ClassKind.ANNOTATION_CLASS -> { // DO NOTHING } } } - - private inline fun DiagnosticReporter.report( - source: T?, - factory: FirDiagnosticFactory0 - ) { - source?.let { report(factory.on(it)) } - } } diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirConstructorInInterfaceChecker.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirConstructorInInterfaceChecker.kt index 0014a41ff4a..ed2074a9df8 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirConstructorInInterfaceChecker.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirConstructorInInterfaceChecker.kt @@ -5,11 +5,11 @@ package org.jetbrains.kotlin.fir.analysis.checkers.declaration -import org.jetbrains.kotlin.fir.FirSourceElement import org.jetbrains.kotlin.fir.analysis.checkers.context.CheckerContext import org.jetbrains.kotlin.fir.analysis.diagnostics.DiagnosticReporter import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors import org.jetbrains.kotlin.fir.analysis.diagnostics.hasPrimaryConstructor +import org.jetbrains.kotlin.fir.analysis.diagnostics.reportOn import org.jetbrains.kotlin.fir.declarations.FirRegularClass import org.jetbrains.kotlin.fir.declarations.isInterface @@ -20,11 +20,7 @@ object FirConstructorInInterfaceChecker : FirRegularClassChecker() { } if (declaration.source?.hasPrimaryConstructor() == true) { - reporter.report(declaration.source) + reporter.reportOn(declaration.source, FirErrors.CONSTRUCTOR_IN_INTERFACE, context) } } - - private fun DiagnosticReporter.report(source: FirSourceElement?) { - source?.let { report(FirErrors.CONSTRUCTOR_IN_INTERFACE.on(it)) } - } -} \ No newline at end of file +} diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirDeclarationCheckerUtils.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirDeclarationCheckerUtils.kt index 79ca69ecef9..c2da3979e70 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirDeclarationCheckerUtils.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirDeclarationCheckerUtils.kt @@ -8,9 +8,9 @@ package org.jetbrains.kotlin.fir.analysis.checkers.declaration import org.jetbrains.kotlin.descriptors.Visibilities import org.jetbrains.kotlin.fir.FirSourceElement import org.jetbrains.kotlin.fir.analysis.checkers.context.CheckerContext -import org.jetbrains.kotlin.fir.analysis.checkers.extended.report import org.jetbrains.kotlin.fir.analysis.diagnostics.DiagnosticReporter import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors +import org.jetbrains.kotlin.fir.analysis.diagnostics.reportOn import org.jetbrains.kotlin.fir.declarations.* import org.jetbrains.kotlin.fir.declarations.impl.FirDefaultPropertyAccessor import org.jetbrains.kotlin.fir.types.FirImplicitTypeRef @@ -25,14 +25,15 @@ internal fun checkExpectDeclarationVisibilityAndBody( declaration: FirMemberDeclaration, source: FirSourceElement, modifierList: FirModifierList?, - reporter: DiagnosticReporter + reporter: DiagnosticReporter, + context: CheckerContext ) { if (declaration.isExpect || modifierList?.modifiers?.any { it.token == KtTokens.EXPECT_KEYWORD } == true) { if (Visibilities.isPrivate(declaration.visibility)) { - reporter.report(source, FirErrors.EXPECTED_PRIVATE_DECLARATION) + reporter.reportOn(source, FirErrors.EXPECTED_PRIVATE_DECLARATION, context) } if (declaration is FirSimpleFunction && declaration.hasBody) { - reporter.report(source, FirErrors.EXPECTED_DECLARATION_WITH_BODY) + reporter.reportOn(source, FirErrors.EXPECTED_DECLARATION_WITH_BODY, context) } } } @@ -40,7 +41,8 @@ internal fun checkExpectDeclarationVisibilityAndBody( internal fun checkPropertyInitializer( containingClass: FirRegularClass?, property: FirProperty, - reporter: DiagnosticReporter + reporter: DiagnosticReporter, + context: CheckerContext ) { val inInterface = containingClass?.isInterface == true // If multiple (potentially conflicting) modality modifiers are specified, not all modifiers are recorded at `status`. @@ -51,7 +53,7 @@ internal fun checkPropertyInitializer( if (isAbstract) { if (property.initializer == null && property.delegate == null && property.returnTypeRef is FirImplicitTypeRef) { property.source?.let { - reporter.report(it, FirErrors.PROPERTY_WITH_NO_TYPE_NO_INITIALIZER) + reporter.reportOn(it, FirErrors.PROPERTY_WITH_NO_TYPE_NO_INITIALIZER, context) } } return @@ -61,7 +63,7 @@ internal fun checkPropertyInitializer( val backingFieldRequired = property.hasBackingField if (inInterface && backingFieldRequired && property.hasAccessorImplementation) { property.source?.let { - // reporter.report(it, FirErrors.BACKING_FIELD_IN_INTERFACE) + // reporter.reportOn(it, FirErrors.BACKING_FIELD_IN_INTERFACE, context) } } @@ -72,16 +74,16 @@ internal fun checkPropertyInitializer( property.initializer?.source?.let { when { inInterface -> { - reporter.report(it, FirErrors.PROPERTY_INITIALIZER_IN_INTERFACE) + reporter.reportOn(it, FirErrors.PROPERTY_INITIALIZER_IN_INTERFACE, context) } isExpect -> { - reporter.report(it, FirErrors.EXPECTED_PROPERTY_INITIALIZER) + reporter.reportOn(it, FirErrors.EXPECTED_PROPERTY_INITIALIZER, context) } !backingFieldRequired -> { - // reporter.report(it, FirErrors.PROPERTY_INITIALIZER_NO_BACKING_FIELD) + // reporter.reportOn(it, FirErrors.PROPERTY_INITIALIZER_NO_BACKING_FIELD, context) } property.receiverTypeRef != null -> { - // reporter.report(it, FirErrors.EXTENSION_PROPERTY_WITH_BACKING_FIELD) + // reporter.reportOn(it, FirErrors.EXTENSION_PROPERTY_WITH_BACKING_FIELD, context) } } } @@ -90,10 +92,10 @@ internal fun checkPropertyInitializer( property.delegate?.source?.let { when { inInterface -> { - reporter.report(it, FirErrors.DELEGATED_PROPERTY_IN_INTERFACE) + reporter.reportOn(it, FirErrors.DELEGATED_PROPERTY_IN_INTERFACE, context) } isExpect -> { - reporter.report(it, FirErrors.EXPECTED_DELEGATED_PROPERTY) + reporter.reportOn(it, FirErrors.EXPECTED_DELEGATED_PROPERTY, context) } } } @@ -105,12 +107,12 @@ internal fun checkPropertyInitializer( if (backingFieldRequired && !inInterface && !property.isLateInit && !isExpect && isUninitialized && !isExternal) { property.source?.let { if (property.receiverTypeRef != null && !property.hasAccessorImplementation) { - // reporter.report(it, FirErrors.EXTENSION_PROPERTY_MUST_HAVE_ACCESSORS_OR_BE_ABSTRACT) + // reporter.reportOn(it, FirErrors.EXTENSION_PROPERTY_MUST_HAVE_ACCESSORS_OR_BE_ABSTRACT, context) } else { if (containingClass != null || property.hasAccessorImplementation) { - // reporter.report(it, FirErrors.MUST_BE_INITIALIZED) + // reporter.reportOn(it, FirErrors.MUST_BE_INITIALIZED, context) } else { - // reporter.report(it, FirErrors.MUST_BE_INITIALIZED_OR_BE_ABSTRACT) + // reporter.reportOn(it, FirErrors.MUST_BE_INITIALIZED_OR_BE_ABSTRACT, context) } } } diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirDelegationInInterfaceChecker.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirDelegationInInterfaceChecker.kt index a30619b0675..1c6e5c72da0 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirDelegationInInterfaceChecker.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirDelegationInInterfaceChecker.kt @@ -6,10 +6,10 @@ package org.jetbrains.kotlin.fir.analysis.checkers.declaration import org.jetbrains.kotlin.KtNodeTypes -import org.jetbrains.kotlin.fir.FirSourceElement import org.jetbrains.kotlin.fir.analysis.checkers.context.CheckerContext import org.jetbrains.kotlin.fir.analysis.diagnostics.DiagnosticReporter import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors +import org.jetbrains.kotlin.fir.analysis.diagnostics.reportOn import org.jetbrains.kotlin.fir.declarations.FirRegularClass import org.jetbrains.kotlin.fir.declarations.isInterface @@ -22,12 +22,8 @@ object FirDelegationInInterfaceChecker : FirRegularClassChecker() { for (superTypeRef in declaration.superTypeRefs) { val source = superTypeRef.source ?: continue if (source.treeStructure.getParent(source.lighterASTNode)?.tokenType == KtNodeTypes.DELEGATED_SUPER_TYPE_ENTRY) { - reporter.report(source) + reporter.reportOn(source, FirErrors.DELEGATION_IN_INTERFACE, context) } } } - - private fun DiagnosticReporter.report(source: FirSourceElement?) { - source?.let { report(FirErrors.DELEGATION_IN_INTERFACE.on(it)) } - } -} \ No newline at end of file +} diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirDelegationSuperCallInEnumConstructorChecker.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirDelegationSuperCallInEnumConstructorChecker.kt index c4bab19cbda..d2b0b206061 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirDelegationSuperCallInEnumConstructorChecker.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirDelegationSuperCallInEnumConstructorChecker.kt @@ -6,10 +6,10 @@ package org.jetbrains.kotlin.fir.analysis.checkers.declaration import org.jetbrains.kotlin.fir.FirFakeSourceElementKind -import org.jetbrains.kotlin.fir.FirSourceElement import org.jetbrains.kotlin.fir.analysis.checkers.context.CheckerContext import org.jetbrains.kotlin.fir.analysis.diagnostics.DiagnosticReporter import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors +import org.jetbrains.kotlin.fir.analysis.diagnostics.reportOn import org.jetbrains.kotlin.fir.declarations.FirConstructor import org.jetbrains.kotlin.fir.declarations.FirRegularClass import org.jetbrains.kotlin.fir.declarations.isEnumClass @@ -26,12 +26,8 @@ object FirDelegationSuperCallInEnumConstructorChecker : FirRegularClassChecker() it.delegatedConstructor?.isThis == false && it.delegatedConstructor?.source?.kind !is FirFakeSourceElementKind ) { - reporter.report(it.delegatedConstructor?.source) + reporter.reportOn(it.delegatedConstructor?.source, FirErrors.DELEGATION_SUPER_CALL_IN_ENUM_CONSTRUCTOR, context) } } } - - private fun DiagnosticReporter.report(source: FirSourceElement?) { - source?.let { report(FirErrors.DELEGATION_SUPER_CALL_IN_ENUM_CONSTRUCTOR.on(it)) } - } -} \ No newline at end of file +} diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirDestructuringDeclarationChecker.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirDestructuringDeclarationChecker.kt index 179cd7a2ff4..5dc5e0205eb 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirDestructuringDeclarationChecker.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirDestructuringDeclarationChecker.kt @@ -8,9 +8,9 @@ package org.jetbrains.kotlin.fir.analysis.checkers.declaration import org.jetbrains.kotlin.KtNodeTypes import org.jetbrains.kotlin.fir.FirSourceElement import org.jetbrains.kotlin.fir.analysis.checkers.context.CheckerContext -import org.jetbrains.kotlin.fir.analysis.checkers.extended.report import org.jetbrains.kotlin.fir.analysis.diagnostics.DiagnosticReporter import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors +import org.jetbrains.kotlin.fir.analysis.diagnostics.reportOn import org.jetbrains.kotlin.fir.declarations.FirProperty import org.jetbrains.kotlin.fir.declarations.FirSimpleFunction import org.jetbrains.kotlin.fir.declarations.FirValueParameter @@ -36,7 +36,7 @@ object FirDestructuringDeclarationChecker : FirPropertyChecker() { assert(declaration.name.isSpecial && declaration.name.asString() == "") { "Unexpected name: ${declaration.name.asString()} for destructuring declaration" } - checkInitializer(source, declaration.initializer, reporter) + checkInitializer(source, declaration.initializer, reporter, context) return } @@ -82,7 +82,8 @@ object FirDestructuringDeclarationChecker : FirPropertyChecker() { originalDestructuringDeclarationOrInitializerSource, diagnostic.name, originalDestructuringDeclarationType - ) + ), + context ) } is ConeAmbiguityError -> { @@ -91,7 +92,8 @@ object FirDestructuringDeclarationChecker : FirPropertyChecker() { originalDestructuringDeclarationOrInitializerSource, diagnostic.name, diagnostic.candidates - ) + ), + context ) } is ConeInapplicableCandidateError -> { @@ -100,7 +102,8 @@ object FirDestructuringDeclarationChecker : FirPropertyChecker() { FirErrors.COMPONENT_FUNCTION_ON_NULLABLE.on( originalDestructuringDeclarationOrInitializerSource, (diagnostic.candidateSymbol.fir as FirSimpleFunction).name - ) + ), + context ) } } @@ -108,7 +111,12 @@ object FirDestructuringDeclarationChecker : FirPropertyChecker() { } } - private fun checkInitializer(source: FirSourceElement, initializer: FirExpression?, reporter: DiagnosticReporter) { + private fun checkInitializer( + source: FirSourceElement, + initializer: FirExpression?, + reporter: DiagnosticReporter, + context: CheckerContext + ) { val needToReport = when (initializer) { null -> true @@ -116,7 +124,7 @@ object FirDestructuringDeclarationChecker : FirPropertyChecker() { else -> false } if (needToReport) { - reporter.report(source, FirErrors.INITIALIZER_REQUIRED_FOR_DESTRUCTURING_DECLARATION) + reporter.reportOn(source, FirErrors.INITIALIZER_REQUIRED_FOR_DESTRUCTURING_DECLARATION, context) } } diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirEnumClassSimpleChecker.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirEnumClassSimpleChecker.kt index 5670b872be6..cec0c77f1c9 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirEnumClassSimpleChecker.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirEnumClassSimpleChecker.kt @@ -5,11 +5,11 @@ package org.jetbrains.kotlin.fir.analysis.checkers.declaration -import org.jetbrains.kotlin.fir.FirSourceElement import org.jetbrains.kotlin.fir.analysis.checkers.context.CheckerContext import org.jetbrains.kotlin.fir.analysis.checkers.findNonInterfaceSupertype import org.jetbrains.kotlin.fir.analysis.diagnostics.DiagnosticReporter import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors +import org.jetbrains.kotlin.fir.analysis.diagnostics.reportOn import org.jetbrains.kotlin.fir.declarations.FirRegularClass import org.jetbrains.kotlin.fir.declarations.isEnumClass @@ -20,19 +20,11 @@ object FirEnumClassSimpleChecker : FirRegularClassChecker() { } declaration.findNonInterfaceSupertype(context)?.let { - reporter.reportClassInSupertypeForEnum(it.source) + reporter.reportOn(it.source, FirErrors.CLASS_IN_SUPERTYPE_FOR_ENUM, context) } if (declaration.typeParameters.isNotEmpty()) { - reporter.reportTypeParametersInEnum(declaration.typeParameters.firstOrNull()?.source) + reporter.reportOn(declaration.typeParameters.firstOrNull()?.source, FirErrors.TYPE_PARAMETERS_IN_ENUM, context) } } - - private fun DiagnosticReporter.reportClassInSupertypeForEnum(source: FirSourceElement?) { - source?.let { report(FirErrors.CLASS_IN_SUPERTYPE_FOR_ENUM.on(it)) } - } - - private fun DiagnosticReporter.reportTypeParametersInEnum(source: FirSourceElement?) { - source?.let { report(FirErrors.TYPE_PARAMETERS_IN_ENUM.on(it)) } - } -} \ No newline at end of file +} diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirExposedVisibilityDeclarationChecker.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirExposedVisibilityDeclarationChecker.kt index f30329addc2..de888202952 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirExposedVisibilityDeclarationChecker.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirExposedVisibilityDeclarationChecker.kt @@ -5,15 +5,16 @@ package org.jetbrains.kotlin.fir.analysis.checkers.declaration -import com.intellij.psi.PsiElement import org.jetbrains.kotlin.descriptors.ClassKind -import org.jetbrains.kotlin.fir.* +import org.jetbrains.kotlin.fir.FirEffectiveVisibility +import org.jetbrains.kotlin.fir.FirEffectiveVisibilityImpl import org.jetbrains.kotlin.fir.analysis.checkers.context.CheckerContext import org.jetbrains.kotlin.fir.analysis.checkers.toRegularClass import org.jetbrains.kotlin.fir.analysis.diagnostics.DiagnosticReporter -import org.jetbrains.kotlin.fir.analysis.diagnostics.FirDiagnosticFactory3 import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors +import org.jetbrains.kotlin.fir.analysis.diagnostics.reportOn import org.jetbrains.kotlin.fir.declarations.* +import org.jetbrains.kotlin.fir.getEffectiveVisibility import org.jetbrains.kotlin.fir.resolve.fullyExpandedType import org.jetbrains.kotlin.fir.resolve.toSymbol import org.jetbrains.kotlin.fir.resolve.transformers.ensureResolved @@ -51,12 +52,13 @@ object FirExposedVisibilityDeclarationChecker : FirMemberDeclarationChecker() { } val restricting = supertype.findVisibilityExposure(context, classVisibility) if (restricting != null) { - reporter.reportExposure( + reporter.reportOn( + supertypeRef.source ?: declaration.source, if (isInterface) FirErrors.EXPOSED_SUPER_INTERFACE else FirErrors.EXPOSED_SUPER_CLASS, - restricting, classVisibility, + restricting, restricting.getEffectiveVisibility(context), - supertypeRef.source ?: declaration.source + context ) } } @@ -70,12 +72,13 @@ object FirExposedVisibilityDeclarationChecker : FirMemberDeclarationChecker() { for (bound in parameter.symbol.fir.bounds) { val restricting = bound.coneType.findVisibilityExposure(context, classVisibility) if (restricting != null) { - reporter.reportExposure( + reporter.reportOn( + bound.source, FirErrors.EXPOSED_TYPE_PARAMETER_BOUND, - restricting, classVisibility, + restricting, restricting.getEffectiveVisibility(context), - bound.source + context ) } } @@ -89,12 +92,13 @@ object FirExposedVisibilityDeclarationChecker : FirMemberDeclarationChecker() { if (typeAliasVisibility == FirEffectiveVisibilityImpl.Local) return val restricting = expandedType?.findVisibilityExposure(context, typeAliasVisibility) if (restricting != null) { - reporter.reportExposure( + reporter.reportOn( + declaration.source, FirErrors.EXPOSED_TYPEALIAS_EXPANDED_TYPE, - restricting, typeAliasVisibility, + restricting, restricting.getEffectiveVisibility(context), - declaration.source + context ) } } @@ -107,12 +111,13 @@ object FirExposedVisibilityDeclarationChecker : FirMemberDeclarationChecker() { val restricting = declaration.returnTypeRef.coneTypeSafe() ?.findVisibilityExposure(context, functionVisibility) if (restricting != null) { - reporter.reportExposure( + reporter.reportOn( + declaration.source, FirErrors.EXPOSED_FUNCTION_RETURN_TYPE, - restricting, functionVisibility, + restricting, restricting.getEffectiveVisibility(context), - declaration.source + context ) } } @@ -122,12 +127,13 @@ object FirExposedVisibilityDeclarationChecker : FirMemberDeclarationChecker() { valueParameter.returnTypeRef.coneTypeSafe() ?.findVisibilityExposure(context, functionVisibility) if (restricting != null) { - reporter.reportExposure( + reporter.reportOn( + valueParameter.source, FirErrors.EXPOSED_PARAMETER_TYPE, - restricting, functionVisibility, + restricting, restricting.getEffectiveVisibility(context), - valueParameter.source + context ) } } @@ -143,12 +149,13 @@ object FirExposedVisibilityDeclarationChecker : FirMemberDeclarationChecker() { declaration.returnTypeRef.coneTypeSafe() ?.findVisibilityExposure(context, propertyVisibility) if (restricting != null) { - reporter.reportExposure( + reporter.reportOn( + declaration.source, FirErrors.EXPOSED_PROPERTY_TYPE, - restricting, propertyVisibility, + restricting, restricting.getEffectiveVisibility(context), - declaration.source + context ) } checkMemberReceiver(declaration.receiverTypeRef, declaration, reporter, context) @@ -167,12 +174,13 @@ object FirExposedVisibilityDeclarationChecker : FirMemberDeclarationChecker() { if (memberVisibility == FirEffectiveVisibilityImpl.Local) return val restricting = receiverParameterType.findVisibilityExposure(context, memberVisibility) if (restricting != null) { - reporter.reportExposure( + reporter.reportOn( + typeRef.source, FirErrors.EXPOSED_RECEIVER_TYPE, - restricting, memberVisibility, + restricting, restricting.getEffectiveVisibility(context), - typeRef.source + context ) } } @@ -207,25 +215,6 @@ object FirExposedVisibilityDeclarationChecker : FirMemberDeclarationChecker() { return null } - private inline fun DiagnosticReporter.reportExposure( - error: FirDiagnosticFactory3, - restrictingDeclaration: FirMemberDeclaration, - elementVisibility: FirEffectiveVisibility, - restrictingVisibility: FirEffectiveVisibility, - source: FirSourceElement? - ) { - source?.let { - report( - error.on( - it as E, - elementVisibility, - restrictingDeclaration, - restrictingVisibility - ) - ) - } - } - private fun FirMemberDeclaration.getEffectiveVisibility(context: CheckerContext) = getEffectiveVisibility(context.session, context.containingDeclarations, context.sessionHolder.scopeSession) } diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirFunctionNameChecker.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirFunctionNameChecker.kt index 63b7a9d3508..87d756fbd99 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirFunctionNameChecker.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirFunctionNameChecker.kt @@ -7,9 +7,9 @@ package org.jetbrains.kotlin.fir.analysis.checkers.declaration import org.jetbrains.kotlin.fir.FirFakeSourceElementKind import org.jetbrains.kotlin.fir.analysis.checkers.context.CheckerContext -import org.jetbrains.kotlin.fir.analysis.checkers.extended.report import org.jetbrains.kotlin.fir.analysis.diagnostics.DiagnosticReporter import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors +import org.jetbrains.kotlin.fir.analysis.diagnostics.reportOn import org.jetbrains.kotlin.fir.declarations.FirClass import org.jetbrains.kotlin.fir.declarations.FirFile import org.jetbrains.kotlin.fir.declarations.FirFunction @@ -23,7 +23,7 @@ object FirFunctionNameChecker : FirFunctionChecker() { val containingDeclaration = context.containingDeclarations.lastOrNull() val isNonLocal = containingDeclaration is FirFile || containingDeclaration is FirClass<*> if (declaration is FirSimpleFunction && declaration.name == SpecialNames.NO_NAME_PROVIDED && isNonLocal) { - reporter.report(source, FirErrors.FUNCTION_DECLARATION_WITH_NO_NAME) + reporter.reportOn(source, FirErrors.FUNCTION_DECLARATION_WITH_NO_NAME, context) } } } diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirInapplicableLateinitChecker.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirInapplicableLateinitChecker.kt index 722870933e3..a06ccdc442a 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirInapplicableLateinitChecker.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirInapplicableLateinitChecker.kt @@ -10,7 +10,8 @@ import org.jetbrains.kotlin.fir.FirSourceElement import org.jetbrains.kotlin.fir.analysis.checkers.context.CheckerContext import org.jetbrains.kotlin.fir.analysis.diagnostics.DiagnosticReporter import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors -import org.jetbrains.kotlin.fir.declarations.* +import org.jetbrains.kotlin.fir.declarations.FirProperty +import org.jetbrains.kotlin.fir.declarations.isLateInit import org.jetbrains.kotlin.fir.types.ConeKotlinType import org.jetbrains.kotlin.fir.types.ConeTypeParameterType import org.jetbrains.kotlin.fir.types.coneType @@ -40,28 +41,28 @@ object FirInapplicableLateinitChecker : FirPropertyChecker() { when { declaration.isVal -> - reporter.report(declaration.source, "is allowed only on mutable properties") + reporter.reportOn(declaration.source, "is allowed only on mutable properties", context) declaration.initializer != null -> if (declaration.isLocal) { - reporter.report(declaration.source, "is not allowed on local variables with initializer") + reporter.reportOn(declaration.source, "is not allowed on local variables with initializer", context) } else { - reporter.report(declaration.source, "is not allowed on properties with initializer") + reporter.reportOn(declaration.source, "is not allowed on properties with initializer", context) } declaration.delegate != null -> - reporter.report(declaration.source, "is not allowed on delegated properties") + reporter.reportOn(declaration.source, "is not allowed on delegated properties", context) declaration.isNullable() -> - reporter.report(declaration.source, "is not allowed on properties of a type with nullable upper bound") + reporter.reportOn(declaration.source, "is not allowed on properties of a type with nullable upper bound", context) declaration.returnTypeRef.coneType in getPrimitiveTypes(context) -> if (declaration.isLocal) { - reporter.report(declaration.source, "is not allowed on local variables of primitive types") + reporter.reportOn(declaration.source, "is not allowed on local variables of primitive types", context) } else { - reporter.report(declaration.source, "is not allowed on properties of primitive types") + reporter.reportOn(declaration.source, "is not allowed on properties of primitive types", context) } declaration.hasGetter() || declaration.hasSetter() -> - reporter.report(declaration.source, "is not allowed on properties with a custom getter or setter") + reporter.reportOn(declaration.source, "is not allowed on properties with a custom getter or setter", context) } } @@ -73,7 +74,7 @@ object FirInapplicableLateinitChecker : FirPropertyChecker() { private fun FirProperty.hasGetter() = getter != null && getter?.source != null && getter?.source?.kind !is FirFakeSourceElementKind private fun FirProperty.hasSetter() = setter != null && setter?.source != null && setter?.source?.kind !is FirFakeSourceElementKind - private fun DiagnosticReporter.report(source: FirSourceElement?, target: String) { - source?.let { report(FirErrors.INAPPLICABLE_LATEINIT_MODIFIER.on(it, target)) } + private fun DiagnosticReporter.reportOn(source: FirSourceElement?, target: String, context: CheckerContext) { + source?.let { report(FirErrors.INAPPLICABLE_LATEINIT_MODIFIER.on(it, target), context) } } -} \ No newline at end of file +} diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirInfixFunctionDeclarationChecker.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirInfixFunctionDeclarationChecker.kt index 4b643cb0ca2..d291b6d1494 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirInfixFunctionDeclarationChecker.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirInfixFunctionDeclarationChecker.kt @@ -5,10 +5,10 @@ package org.jetbrains.kotlin.fir.analysis.checkers.declaration -import org.jetbrains.kotlin.fir.FirSourceElement import org.jetbrains.kotlin.fir.analysis.checkers.context.CheckerContext import org.jetbrains.kotlin.fir.analysis.diagnostics.DiagnosticReporter import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors +import org.jetbrains.kotlin.fir.analysis.diagnostics.reportOn import org.jetbrains.kotlin.fir.declarations.FirClass import org.jetbrains.kotlin.fir.declarations.FirMemberDeclaration import org.jetbrains.kotlin.fir.declarations.FirSimpleFunction @@ -18,12 +18,12 @@ object FirInfixFunctionDeclarationChecker : FirMemberDeclarationChecker() { override fun check(declaration: FirMemberDeclaration, context: CheckerContext, reporter: DiagnosticReporter) { if (declaration is FirSimpleFunction && declaration.isInfix) { if (declaration.valueParameters.size != 1 || !hasExtensionOrDispatchReceiver(declaration, context)) { - reporter.report(declaration.source) + reporter.reportOn(declaration.source, FirErrors.INAPPLICABLE_INFIX_MODIFIER, context) } return } if (declaration.isInfix) { - reporter.report(declaration.source) + reporter.reportOn(declaration.source, FirErrors.INAPPLICABLE_INFIX_MODIFIER, context) } } @@ -34,8 +34,4 @@ object FirInfixFunctionDeclarationChecker : FirMemberDeclarationChecker() { if (function.receiverTypeRef != null) return true return context.containingDeclarations.lastOrNull() is FirClass<*> } - - private fun DiagnosticReporter.report(source: FirSourceElement?) { - source?.let { report(FirErrors.INAPPLICABLE_INFIX_MODIFIER.on(it, "Inapplicable infix modifier")) } - } } diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirInterfaceWithSuperclassChecker.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirInterfaceWithSuperclassChecker.kt index 24e69261a20..a062081d76f 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirInterfaceWithSuperclassChecker.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirInterfaceWithSuperclassChecker.kt @@ -5,11 +5,11 @@ package org.jetbrains.kotlin.fir.analysis.checkers.declaration -import org.jetbrains.kotlin.fir.FirSourceElement import org.jetbrains.kotlin.fir.analysis.checkers.context.CheckerContext import org.jetbrains.kotlin.fir.analysis.checkers.findNonInterfaceSupertype import org.jetbrains.kotlin.fir.analysis.diagnostics.DiagnosticReporter import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors +import org.jetbrains.kotlin.fir.analysis.diagnostics.reportOn import org.jetbrains.kotlin.fir.declarations.FirRegularClass import org.jetbrains.kotlin.fir.declarations.isInterface @@ -20,11 +20,7 @@ object FirInterfaceWithSuperclassChecker : FirRegularClassChecker() { } declaration.findNonInterfaceSupertype(context)?.let { - reporter.report(it.source) + reporter.reportOn(it.source, FirErrors.INTERFACE_WITH_SUPERCLASS, context) } } - - private fun DiagnosticReporter.report(source: FirSourceElement?) { - source?.let { report(FirErrors.INTERFACE_WITH_SUPERCLASS.on(it)) } - } -} \ No newline at end of file +} diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirLocalEntityNotAllowedChecker.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirLocalEntityNotAllowedChecker.kt index babb18bdbe3..dffc6a52bcb 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirLocalEntityNotAllowedChecker.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirLocalEntityNotAllowedChecker.kt @@ -6,15 +6,14 @@ package org.jetbrains.kotlin.fir.analysis.checkers.declaration import org.jetbrains.kotlin.descriptors.ClassKind -import org.jetbrains.kotlin.fir.FirSourceElement import org.jetbrains.kotlin.descriptors.Visibilities import org.jetbrains.kotlin.fir.analysis.checkers.context.CheckerContext import org.jetbrains.kotlin.fir.analysis.diagnostics.DiagnosticReporter import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors +import org.jetbrains.kotlin.fir.analysis.diagnostics.reportOn import org.jetbrains.kotlin.fir.declarations.FirRegularClass import org.jetbrains.kotlin.fir.declarations.isCompanion import org.jetbrains.kotlin.fir.declarations.visibility -import org.jetbrains.kotlin.name.Name object FirLocalEntityNotAllowedChecker : FirRegularClassChecker() { override fun check(declaration: FirRegularClass, context: CheckerContext, reporter: DiagnosticReporter) { @@ -24,19 +23,11 @@ object FirLocalEntityNotAllowedChecker : FirRegularClassChecker() { when { declaration.classKind == ClassKind.OBJECT && !declaration.isCompanion -> - reporter.reportLocalObjectNotAllowed(declaration.source, declaration.name) + reporter.reportOn(declaration.source, FirErrors.LOCAL_OBJECT_NOT_ALLOWED, declaration.name, context) declaration.classKind == ClassKind.INTERFACE -> - reporter.reportLocalInterfaceNotAllowed(declaration.source, declaration.name) + reporter.reportOn(declaration.source, FirErrors.LOCAL_INTERFACE_NOT_ALLOWED, declaration.name, context) else -> { } } } - - private fun DiagnosticReporter.reportLocalObjectNotAllowed(source: FirSourceElement?, name: Name) { - source?.let { report(FirErrors.LOCAL_OBJECT_NOT_ALLOWED.on(it, name)) } - } - - private fun DiagnosticReporter.reportLocalInterfaceNotAllowed(source: FirSourceElement?, name: Name) { - source?.let { report(FirErrors.LOCAL_INTERFACE_NOT_ALLOWED.on(it, name)) } - } } diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirManyCompanionObjectsChecker.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirManyCompanionObjectsChecker.kt index 4ed2484a370..c68305b3d11 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirManyCompanionObjectsChecker.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirManyCompanionObjectsChecker.kt @@ -5,10 +5,10 @@ package org.jetbrains.kotlin.fir.analysis.checkers.declaration -import org.jetbrains.kotlin.fir.FirSourceElement import org.jetbrains.kotlin.fir.analysis.checkers.context.CheckerContext import org.jetbrains.kotlin.fir.analysis.diagnostics.DiagnosticReporter import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors +import org.jetbrains.kotlin.fir.analysis.diagnostics.reportOn import org.jetbrains.kotlin.fir.declarations.FirRegularClass import org.jetbrains.kotlin.fir.declarations.isCompanion @@ -19,14 +19,10 @@ object FirManyCompanionObjectsChecker : FirRegularClassChecker() { for (it in declaration.declarations) { if (it is FirRegularClass && it.isCompanion) { if (hasCompanion) { - reporter.report(it.source) + reporter.reportOn(it.source, FirErrors.MANY_COMPANION_OBJECTS, context) } hasCompanion = true } } } - - private fun DiagnosticReporter.report(source: FirSourceElement?) { - source?.let { report(FirErrors.MANY_COMPANION_OBJECTS.on(it)) } - } -} \ No newline at end of file +} diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirMemberFunctionChecker.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirMemberFunctionChecker.kt index abf01537ef5..901f4f9ce3c 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirMemberFunctionChecker.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirMemberFunctionChecker.kt @@ -8,9 +8,9 @@ package org.jetbrains.kotlin.fir.analysis.checkers.declaration import org.jetbrains.kotlin.descriptors.Visibilities import org.jetbrains.kotlin.fir.FirFakeSourceElementKind import org.jetbrains.kotlin.fir.analysis.checkers.context.CheckerContext -import org.jetbrains.kotlin.fir.analysis.checkers.extended.report import org.jetbrains.kotlin.fir.analysis.diagnostics.DiagnosticReporter import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors +import org.jetbrains.kotlin.fir.analysis.diagnostics.reportOn import org.jetbrains.kotlin.fir.declarations.* import org.jetbrains.kotlin.lexer.KtTokens @@ -39,10 +39,13 @@ object FirMemberFunctionChecker : FirRegularClassChecker() { val isAbstract = function.isAbstract || hasAbstractModifier if (isAbstract) { if (!containingDeclaration.canHaveAbstractDeclaration) { - reporter.report(FirErrors.ABSTRACT_FUNCTION_IN_NON_ABSTRACT_CLASS.on(source, function, containingDeclaration)) + reporter.report( + FirErrors.ABSTRACT_FUNCTION_IN_NON_ABSTRACT_CLASS.on(source, function, containingDeclaration), + context + ) } if (function.hasBody) { - reporter.report(FirErrors.ABSTRACT_FUNCTION_WITH_BODY.on(source, function)) + reporter.report(FirErrors.ABSTRACT_FUNCTION_WITH_BODY.on(source, function), context) } } val isInsideExpectClass = isInsideExpectClass(containingDeclaration, context) @@ -51,17 +54,16 @@ object FirMemberFunctionChecker : FirRegularClassChecker() { if (!function.hasBody) { if (containingDeclaration.isInterface) { if (Visibilities.isPrivate(function.visibility)) { - reporter.report(FirErrors.PRIVATE_FUNCTION_WITH_NO_BODY.on(source, function)) + reporter.reportOn(source, FirErrors.PRIVATE_FUNCTION_WITH_NO_BODY, function, context) } if (!isInsideExpectClass && !hasAbstractModifier && hasOpenModifier) { - reporter.report(source, FirErrors.REDUNDANT_OPEN_IN_INTERFACE) + reporter.reportOn(source, FirErrors.REDUNDANT_OPEN_IN_INTERFACE, context) } } else if (!isInsideExpectClass && !hasAbstractModifier && !isExternal) { - reporter.report(FirErrors.NON_ABSTRACT_FUNCTION_WITH_NO_BODY.on(source, function)) + reporter.reportOn(source, FirErrors.NON_ABSTRACT_FUNCTION_WITH_NO_BODY, function, context) } } - checkExpectDeclarationVisibilityAndBody(function, source, modifierList, reporter) + checkExpectDeclarationVisibilityAndBody(function, source, modifierList, reporter, context) } - } diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirMemberPropertyChecker.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirMemberPropertyChecker.kt index bf3db33af6c..33bfa76a7c3 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirMemberPropertyChecker.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirMemberPropertyChecker.kt @@ -9,9 +9,9 @@ import org.jetbrains.kotlin.descriptors.Visibilities import org.jetbrains.kotlin.fir.FirFakeSourceElementKind import org.jetbrains.kotlin.fir.FirSourceElement import org.jetbrains.kotlin.fir.analysis.checkers.context.CheckerContext -import org.jetbrains.kotlin.fir.analysis.checkers.extended.report import org.jetbrains.kotlin.fir.analysis.diagnostics.DiagnosticReporter import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors +import org.jetbrains.kotlin.fir.analysis.diagnostics.reportOn import org.jetbrains.kotlin.fir.declarations.* import org.jetbrains.kotlin.fir.declarations.impl.FirDefaultPropertyAccessor import org.jetbrains.kotlin.fir.expressions.FirExpression @@ -47,37 +47,43 @@ object FirMemberPropertyChecker : FirRegularClassChecker() { (property.getter == null || property.getter is FirDefaultPropertyAccessor) ) { property.source?.let { - reporter.report(it, FirErrors.PRIVATE_PROPERTY_IN_INTERFACE) + reporter.reportOn(it, FirErrors.PRIVATE_PROPERTY_IN_INTERFACE, context) } } if (isAbstract) { if (!containingDeclaration.canHaveAbstractDeclaration) { property.source?.let { - reporter.report(FirErrors.ABSTRACT_PROPERTY_IN_NON_ABSTRACT_CLASS.on(it, property, containingDeclaration)) + reporter.reportOn( + it, + FirErrors.ABSTRACT_PROPERTY_IN_NON_ABSTRACT_CLASS, + property, + containingDeclaration, + context + ) return } } property.initializer?.source?.let { - reporter.report(it, FirErrors.ABSTRACT_PROPERTY_WITH_INITIALIZER) + reporter.reportOn(it, FirErrors.ABSTRACT_PROPERTY_WITH_INITIALIZER, context) } property.delegate?.source?.let { - reporter.report(it, FirErrors.ABSTRACT_DELEGATED_PROPERTY) + reporter.reportOn(it, FirErrors.ABSTRACT_DELEGATED_PROPERTY, context) } checkAccessor(property.getter, property.delegate) { src, _ -> - reporter.report(src, FirErrors.ABSTRACT_PROPERTY_WITH_GETTER) + reporter.reportOn(src, FirErrors.ABSTRACT_PROPERTY_WITH_GETTER, context) } checkAccessor(property.setter, property.delegate) { src, symbol -> if (symbol.fir.visibility == Visibilities.Private && property.visibility != Visibilities.Private) { - reporter.report(src, FirErrors.PRIVATE_SETTER_FOR_ABSTRACT_PROPERTY) + reporter.reportOn(src, FirErrors.PRIVATE_SETTER_FOR_ABSTRACT_PROPERTY, context) } else { - reporter.report(src, FirErrors.ABSTRACT_PROPERTY_WITH_SETTER) + reporter.reportOn(src, FirErrors.ABSTRACT_PROPERTY_WITH_SETTER, context) } } } - checkPropertyInitializer(containingDeclaration, property, reporter) + checkPropertyInitializer(containingDeclaration, property, reporter, context) val hasOpenModifier = modifierList?.modifiers?.any { it.token == KtTokens.OPEN_KEYWORD } == true if (hasOpenModifier && @@ -87,19 +93,19 @@ object FirMemberPropertyChecker : FirRegularClassChecker() { !isInsideExpectClass(containingDeclaration, context) ) { property.source?.let { - reporter.report(it, FirErrors.REDUNDANT_OPEN_IN_INTERFACE) + reporter.reportOn(it, FirErrors.REDUNDANT_OPEN_IN_INTERFACE, context) } } val isOpen = property.isOpen || hasOpenModifier if (isOpen) { checkAccessor(property.setter, property.delegate) { src, symbol -> if (symbol.fir.visibility == Visibilities.Private && property.visibility != Visibilities.Private) { - reporter.report(src, FirErrors.PRIVATE_SETTER_FOR_OPEN_PROPERTY) + reporter.reportOn(src, FirErrors.PRIVATE_SETTER_FOR_OPEN_PROPERTY, context) } } } - checkExpectDeclarationVisibilityAndBody(property, source, modifierList, reporter) + checkExpectDeclarationVisibilityAndBody(property, source, modifierList, reporter, context) } private fun checkAccessor( diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirMethodOfAnyImplementedInInterfaceChecker.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirMethodOfAnyImplementedInInterfaceChecker.kt index fcc41268fb6..e36393679ea 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirMethodOfAnyImplementedInInterfaceChecker.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirMethodOfAnyImplementedInInterfaceChecker.kt @@ -5,12 +5,12 @@ package org.jetbrains.kotlin.fir.analysis.checkers.declaration -import org.jetbrains.kotlin.fir.FirSourceElement import org.jetbrains.kotlin.fir.analysis.checkers.FirDeclarationInspector import org.jetbrains.kotlin.fir.analysis.checkers.FirDeclarationPresenter import org.jetbrains.kotlin.fir.analysis.checkers.context.CheckerContext import org.jetbrains.kotlin.fir.analysis.diagnostics.DiagnosticReporter import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors +import org.jetbrains.kotlin.fir.analysis.diagnostics.reportOn import org.jetbrains.kotlin.fir.declarations.* import org.jetbrains.kotlin.fir.resolve.firSymbolProvider import org.jetbrains.kotlin.utils.addToStdlib.safeAs @@ -64,12 +64,8 @@ object FirMethodOfAnyImplementedInInterfaceChecker : FirRegularClassChecker(), F val inspector = getInspector(context) if (it is FirSimpleFunction && inspector.contains(it) && it.body != null && it.isOverride) { - reporter.report(it.source) + reporter.reportOn(it.source, FirErrors.ANY_METHOD_IMPLEMENTED_IN_INTERFACE, context) } } } - - private fun DiagnosticReporter.report(source: FirSourceElement?) { - source?.let { report(FirErrors.ANY_METHOD_IMPLEMENTED_IN_INTERFACE.on(it)) } - } -} \ No newline at end of file +} diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirModifierChecker.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirModifierChecker.kt index 9612745ddc6..95140abcea0 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirModifierChecker.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirModifierChecker.kt @@ -6,7 +6,7 @@ package org.jetbrains.kotlin.fir.analysis.checkers.declaration import org.jetbrains.kotlin.KtNodeTypes -import org.jetbrains.kotlin.fir.* +import org.jetbrains.kotlin.fir.FirSourceElement import org.jetbrains.kotlin.fir.analysis.checkers.context.CheckerContext import org.jetbrains.kotlin.fir.analysis.diagnostics.DiagnosticReporter import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors @@ -103,7 +103,8 @@ object FirModifierChecker : FirBasicDeclarationChecker() { secondModifier: FirModifier<*>, reporter: DiagnosticReporter, reportedNodes: MutableSet>, - owner: FirDeclaration? + owner: FirDeclaration?, + context: CheckerContext ) { val firstToken = firstModifier.token val secondToken = secondModifier.token @@ -111,21 +112,21 @@ object FirModifierChecker : FirBasicDeclarationChecker() { CompatibilityType.COMPATIBLE -> { } CompatibilityType.REPEATED -> - if (reportedNodes.add(secondModifier)) reporter.reportRepeatedModifier(secondModifier, secondToken) + if (reportedNodes.add(secondModifier)) reporter.reportRepeatedModifier(secondModifier, secondToken, context) CompatibilityType.REDUNDANT_2_TO_1 -> - reporter.reportRedundantModifier(secondModifier, secondToken, firstToken) + reporter.reportRedundantModifier(secondModifier, secondToken, firstToken, context) CompatibilityType.REDUNDANT_1_TO_2 -> - reporter.reportRedundantModifier(firstModifier, firstToken, secondToken) + reporter.reportRedundantModifier(firstModifier, firstToken, secondToken, context) CompatibilityType.DEPRECATED -> { - reporter.reportDeprecatedModifierPair(firstModifier, firstToken, secondToken) - reporter.reportDeprecatedModifierPair(secondModifier, secondToken, firstToken) + reporter.reportDeprecatedModifierPair(firstModifier, firstToken, secondToken, context) + reporter.reportDeprecatedModifierPair(secondModifier, secondToken, firstToken, context) } CompatibilityType.INCOMPATIBLE, CompatibilityType.COMPATIBLE_FOR_CLASSES -> { if (compatibilityType == CompatibilityType.COMPATIBLE_FOR_CLASSES && owner is FirClass<*>) { return } - if (reportedNodes.add(firstModifier)) reporter.reportIncompatibleModifiers(firstModifier, firstToken, secondToken) - if (reportedNodes.add(secondModifier)) reporter.reportIncompatibleModifiers(secondModifier, secondToken, firstToken) + if (reportedNodes.add(firstModifier)) reporter.reportIncompatibleModifiers(firstModifier, firstToken, secondToken, context) + if (reportedNodes.add(secondModifier)) reporter.reportIncompatibleModifiers(secondModifier, secondToken, firstToken, context) } } } @@ -133,7 +134,8 @@ object FirModifierChecker : FirBasicDeclarationChecker() { private fun checkModifiers( list: FirModifierList, owner: FirDeclaration, - reporter: DiagnosticReporter + reporter: DiagnosticReporter, + context: CheckerContext ) { // general strategy: report no more than one error and any number of warnings // therefore, a track of nodes with already reported errors should be kept @@ -145,7 +147,7 @@ object FirModifierChecker : FirBasicDeclarationChecker() { if (firstModifier == secondModifier) { break } - checkCompatibilityType(firstModifier, secondModifier, reporter, reportedNodes, owner) + checkCompatibilityType(firstModifier, secondModifier, reporter, reportedNodes, owner, context) } } } @@ -168,30 +170,30 @@ object FirModifierChecker : FirBasicDeclarationChecker() { if (context.containingDeclarations.last() is FirDefaultPropertyAccessor) return val modifierList = with(FirModifierList) { source.getModifierList() } - modifierList?.let { checkModifiers(it, declaration, reporter) } + modifierList?.let { checkModifiers(it, declaration, reporter, context) } } private fun DiagnosticReporter.reportRepeatedModifier( - modifier: FirModifier<*>, keyword: KtModifierKeywordToken + modifier: FirModifier<*>, keyword: KtModifierKeywordToken, context: CheckerContext ) { - report(FirErrors.REPEATED_MODIFIER.on(modifier.source, keyword)) + report(FirErrors.REPEATED_MODIFIER.on(modifier.source, keyword), context) } private fun DiagnosticReporter.reportRedundantModifier( - modifier: FirModifier<*>, firstKeyword: KtModifierKeywordToken, secondKeyword: KtModifierKeywordToken + modifier: FirModifier<*>, firstKeyword: KtModifierKeywordToken, secondKeyword: KtModifierKeywordToken, context: CheckerContext ) { - report(FirErrors.REDUNDANT_MODIFIER.on(modifier.source, firstKeyword, secondKeyword)) + report(FirErrors.REDUNDANT_MODIFIER.on(modifier.source, firstKeyword, secondKeyword), context) } private fun DiagnosticReporter.reportDeprecatedModifierPair( - modifier: FirModifier<*>, firstKeyword: KtModifierKeywordToken, secondKeyword: KtModifierKeywordToken + modifier: FirModifier<*>, firstKeyword: KtModifierKeywordToken, secondKeyword: KtModifierKeywordToken, context: CheckerContext ) { - report(FirErrors.DEPRECATED_MODIFIER_PAIR.on(modifier.source, firstKeyword, secondKeyword)) + report(FirErrors.DEPRECATED_MODIFIER_PAIR.on(modifier.source, firstKeyword, secondKeyword), context) } private fun DiagnosticReporter.reportIncompatibleModifiers( - modifier: FirModifier<*>, firstKeyword: KtModifierKeywordToken, secondKeyword: KtModifierKeywordToken + modifier: FirModifier<*>, firstKeyword: KtModifierKeywordToken, secondKeyword: KtModifierKeywordToken, context: CheckerContext ) { - report(FirErrors.INCOMPATIBLE_MODIFIERS.on(modifier.source, firstKeyword, secondKeyword)) + report(FirErrors.INCOMPATIBLE_MODIFIERS.on(modifier.source, firstKeyword, secondKeyword), context) } } diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirOverrideChecker.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirOverrideChecker.kt new file mode 100644 index 00000000000..c059eb565ec --- /dev/null +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirOverrideChecker.kt @@ -0,0 +1,318 @@ +/* + * Copyright 2010-2020 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. + */ + +package org.jetbrains.kotlin.fir.analysis.checkers.declaration + +import org.jetbrains.kotlin.descriptors.Modality +import org.jetbrains.kotlin.fir.analysis.checkers.context.CheckerContext +import org.jetbrains.kotlin.fir.analysis.diagnostics.DiagnosticReporter +import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors +import org.jetbrains.kotlin.fir.analysis.diagnostics.reportOn +import org.jetbrains.kotlin.fir.containingClass +import org.jetbrains.kotlin.fir.declarations.* +import org.jetbrains.kotlin.fir.resolve.substitution.substitutorByMap +import org.jetbrains.kotlin.fir.scopes.FirTypeScope +import org.jetbrains.kotlin.fir.scopes.getDirectOverriddenFunctions +import org.jetbrains.kotlin.fir.scopes.getDirectOverriddenProperties +import org.jetbrains.kotlin.fir.scopes.impl.toConeType +import org.jetbrains.kotlin.fir.scopes.unsubstitutedScope +import org.jetbrains.kotlin.fir.symbols.impl.* +import org.jetbrains.kotlin.fir.typeContext +import org.jetbrains.kotlin.fir.types.* +import org.jetbrains.kotlin.types.AbstractTypeChecker +import org.jetbrains.kotlin.types.AbstractTypeCheckerContext +import org.jetbrains.kotlin.utils.addToStdlib.min +import org.jetbrains.kotlin.utils.addToStdlib.safeAs + +object FirOverrideChecker : FirRegularClassChecker() { + override fun check(declaration: FirRegularClass, context: CheckerContext, reporter: DiagnosticReporter) { + val typeCheckerContext = context.session.typeContext.newBaseTypeCheckerContext( + errorTypesEqualToAnything = false, + stubTypesEqualToAnything = false + ) + + val firTypeScope = declaration.unsubstitutedScope( + context.sessionHolder.session, + context.sessionHolder.scopeSession, + withForcedTypeCalculator = true + ) + + for (it in declaration.declarations) { + when (it) { + is FirSimpleFunction -> checkFunction(it, reporter, typeCheckerContext, firTypeScope, context) + is FirProperty -> checkProperty(it, reporter, typeCheckerContext, firTypeScope, context) + } + } + } + + private fun FirTypeScope.retrieveDirectOverriddenOf(function: FirSimpleFunction): List> { + processFunctionsByName(function.name) {} + + return getDirectOverriddenFunctions(function.symbol) + } + + private fun FirTypeScope.retrieveDirectOverriddenOf(property: FirProperty): List { + processPropertiesByName(property.name) {} + + return getDirectOverriddenProperties(property.symbol) + } + + private fun ConeKotlinType.substituteAllTypeParameters( + overrideDeclaration: FirCallableMemberDeclaration<*>, + baseDeclarationSymbol: FirCallableSymbol<*>, + ): ConeKotlinType { + if (overrideDeclaration.typeParameters.isEmpty()) { + return this + } + + val parametersOwner = baseDeclarationSymbol.fir.safeAs() + ?: return this + + val map = mutableMapOf() + val size = min(overrideDeclaration.typeParameters.size, parametersOwner.typeParameters.size) + + for (it in 0 until size) { + val to = overrideDeclaration.typeParameters[it] + val from = parametersOwner.typeParameters[it] + + map[from.symbol] = to.toConeType() + } + + return substitutorByMap(map).substituteOrSelf(this) + } + + private fun checkModality( + overriddenSymbols: List>, + ): FirCallableDeclaration<*>? { + for (overridden in overriddenSymbols) { + if (overridden.fir !is FirMemberDeclaration) continue + val modality = (overridden.fir as FirMemberDeclaration).status.modality + val isEffectivelyFinal = modality == null || modality == Modality.FINAL + if (isEffectivelyFinal) { + return overridden.fir + } + } + return null + } + + private fun FirProperty.checkMutability( + overriddenSymbols: List>, + ): FirMemberDeclaration? { + if (isVar) return null + return overriddenSymbols.find { (it.fir as? FirProperty)?.isVar == true }?.fir?.safeAs() + } + + private fun FirCallableMemberDeclaration<*>.checkVisibility( + reporter: DiagnosticReporter, + overriddenSymbols: List>, + context: CheckerContext + ) { + val visibilities = overriddenSymbols.mapNotNull { + if (it.fir !is FirMemberDeclaration) return@mapNotNull null + it to (it.fir as FirMemberDeclaration).visibility + }.sortedBy { pair -> + // Regard `null` compare as Int.MIN so that we can report CANNOT_CHANGE_... first deterministically + visibility.compareTo(pair.second) ?: Int.MIN_VALUE + } + + for ((overridden, overriddenVisibility) in visibilities) { + val compare = visibility.compareTo(overriddenVisibility) + if (compare == null) { + // TODO: not ready yet (even after determinism massage), e.g., a Kotlin class that extends a Java class + // reporter.reportCannotChangeAccessPrivilege(this, overridden.fir) + return + } else if (compare < 0) { + reporter.reportCannotWeakenAccessPrivilege(this, overridden.fir, context) + return + } + } + } + + private fun FirCallableMemberDeclaration<*>.checkReturnType( + overriddenSymbols: List>, + typeCheckerContext: AbstractTypeCheckerContext, + context: CheckerContext, + ): FirMemberDeclaration? { + val returnType = returnTypeRef.safeAs()?.type + ?: return null + + // Don't report *_ON_OVERRIDE diagnostics according to an error return type. That should be reported separately. + if (returnType is ConeKotlinErrorType) { + return null + } + + val bounds = overriddenSymbols.map { context.returnTypeCalculator.tryCalculateReturnType(it.fir).coneType.upperBoundIfFlexible() } + + for (it in bounds.indices) { + val restriction = bounds[it] + .substituteAllTypeParameters(this, overriddenSymbols[it]) + + if (!AbstractTypeChecker.isSubtypeOf(typeCheckerContext, returnType, restriction)) { + return overriddenSymbols[it].fir.safeAs() + } + } + + return null + } + + private fun checkFunction( + function: FirSimpleFunction, + reporter: DiagnosticReporter, + typeCheckerContext: AbstractTypeCheckerContext, + firTypeScope: FirTypeScope, + context: CheckerContext, + ) { + if (!function.isOverride) { + return + } + + val overriddenFunctionSymbols = firTypeScope.retrieveDirectOverriddenOf(function) + + if (overriddenFunctionSymbols.isEmpty()) { + reporter.reportNothingToOverride(function, context) + return + } + + checkModality(overriddenFunctionSymbols)?.let { + reporter.reportOverridingFinalMember(function, it, context) + } + + function.checkVisibility(reporter, overriddenFunctionSymbols, context) + + val restriction = function.checkReturnType( + overriddenSymbols = overriddenFunctionSymbols, + typeCheckerContext = typeCheckerContext, + context = context, + ) + + restriction?.let { + reporter.reportReturnTypeMismatchOnFunction(function, it, context) + } + } + + private fun checkProperty( + property: FirProperty, + reporter: DiagnosticReporter, + typeCheckerContext: AbstractTypeCheckerContext, + firTypeScope: FirTypeScope, + context: CheckerContext, + ) { + if (!property.isOverride) { + return + } + + val overriddenPropertySymbols = firTypeScope.retrieveDirectOverriddenOf(property) + + if (overriddenPropertySymbols.isEmpty()) { + reporter.reportNothingToOverride(property, context) + return + } + + checkModality(overriddenPropertySymbols)?.let { + reporter.reportOverridingFinalMember(property, it, context) + } + + property.checkMutability(overriddenPropertySymbols)?.let { + reporter.reportVarOverriddenByVal(property, it, context) + } + + property.checkVisibility(reporter, overriddenPropertySymbols, context) + + val restriction = property.checkReturnType( + overriddenSymbols = overriddenPropertySymbols, + typeCheckerContext = typeCheckerContext, + context = context, + ) + + restriction?.let { + if (property.isVar) { + reporter.reportTypeMismatchOnVariable(property, it, context) + } else { + reporter.reportTypeMismatchOnProperty(property, it, context) + } + } + } + + private fun DiagnosticReporter.reportNothingToOverride(declaration: FirMemberDeclaration, context: CheckerContext) { + // TODO: not ready yet, e.g., Collections + // reportOn(declaration.source, FirErrors.NOTHING_TO_OVERRIDE, declaration, context) + } + + private fun DiagnosticReporter.reportOverridingFinalMember( + overriding: FirMemberDeclaration, + overridden: FirCallableDeclaration<*>, + context: CheckerContext + ) { + overriding.source?.let { source -> + overridden.containingClass()?.let { containingClass -> + report(FirErrors.OVERRIDING_FINAL_MEMBER.on(source, overridden, containingClass.name), context) + } + } + } + + private fun DiagnosticReporter.reportVarOverriddenByVal( + overriding: FirMemberDeclaration, + overridden: FirMemberDeclaration, + context: CheckerContext + ) { + overriding.source?.let { report(FirErrors.VAR_OVERRIDDEN_BY_VAL.on(it, overriding, overridden), context) } + } + + private fun DiagnosticReporter.reportCannotWeakenAccessPrivilege( + overriding: FirMemberDeclaration, + overridden: FirCallableDeclaration<*>, + context: CheckerContext + ) { + val containingClass = overridden.containingClass() ?: return + reportOn( + overriding.source, + FirErrors.CANNOT_WEAKEN_ACCESS_PRIVILEGE, + overriding.visibility, + overridden, + containingClass.name, + context + ) + } + + private fun DiagnosticReporter.reportCannotChangeAccessPrivilege( + overriding: FirMemberDeclaration, + overridden: FirCallableDeclaration<*>, + context: CheckerContext + ) { + val containingClass = overridden.containingClass() ?: return + reportOn( + overriding.source, + FirErrors.CANNOT_CHANGE_ACCESS_PRIVILEGE, + overriding.visibility, + overridden, + containingClass.name, + context + ) + } + + private fun DiagnosticReporter.reportReturnTypeMismatchOnFunction( + overriding: FirMemberDeclaration, + overridden: FirMemberDeclaration, + context: CheckerContext + ) { + reportOn(overriding.source, FirErrors.RETURN_TYPE_MISMATCH_ON_OVERRIDE, overriding, overridden, context) + } + + private fun DiagnosticReporter.reportTypeMismatchOnProperty( + overriding: FirMemberDeclaration, + overridden: FirMemberDeclaration, + context: CheckerContext + ) { + reportOn(overriding.source, FirErrors.PROPERTY_TYPE_MISMATCH_ON_OVERRIDE, overriding, overridden, context) + } + + private fun DiagnosticReporter.reportTypeMismatchOnVariable( + overriding: FirMemberDeclaration, + overridden: FirMemberDeclaration, + context: CheckerContext + ) { + reportOn(overriding.source, FirErrors.VAR_TYPE_MISMATCH_ON_OVERRIDE, overriding, overridden, context) + } +} diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirPrimaryConstructorRequiredForDataClassChecker.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirPrimaryConstructorRequiredForDataClassChecker.kt index 13a6f08b72b..df961f6f436 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirPrimaryConstructorRequiredForDataClassChecker.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirPrimaryConstructorRequiredForDataClassChecker.kt @@ -6,10 +6,10 @@ package org.jetbrains.kotlin.fir.analysis.checkers.declaration import org.jetbrains.kotlin.descriptors.ClassKind -import org.jetbrains.kotlin.fir.FirSourceElement import org.jetbrains.kotlin.fir.analysis.checkers.context.CheckerContext import org.jetbrains.kotlin.fir.analysis.diagnostics.DiagnosticReporter import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors +import org.jetbrains.kotlin.fir.analysis.diagnostics.reportOn import org.jetbrains.kotlin.fir.declarations.FirConstructor import org.jetbrains.kotlin.fir.declarations.FirRegularClass import org.jetbrains.kotlin.fir.declarations.isData @@ -23,11 +23,7 @@ object FirPrimaryConstructorRequiredForDataClassChecker : FirRegularClassChecker val hasPrimaryConstructor = declaration.declarations.any { it is FirConstructor && it.isPrimary } if (!hasPrimaryConstructor) { - reporter.report(declaration.source) + reporter.reportOn(declaration.source, FirErrors.PRIMARY_CONSTRUCTOR_REQUIRED_FOR_DATA_CLASS, context) } } - - private fun DiagnosticReporter.report(source: FirSourceElement?) { - source?.let { report(FirErrors.PRIMARY_CONSTRUCTOR_REQUIRED_FOR_DATA_CLASS.on(it)) } - } -} \ No newline at end of file +} diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirSealedSupertypeChecker.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirSealedSupertypeChecker.kt index 426eb1c460b..73151cf1fc2 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirSealedSupertypeChecker.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirSealedSupertypeChecker.kt @@ -6,10 +6,10 @@ package org.jetbrains.kotlin.fir.analysis.checkers.declaration import org.jetbrains.kotlin.descriptors.Modality -import org.jetbrains.kotlin.fir.FirSourceElement import org.jetbrains.kotlin.fir.analysis.checkers.context.CheckerContext import org.jetbrains.kotlin.fir.analysis.diagnostics.DiagnosticReporter import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors +import org.jetbrains.kotlin.fir.analysis.diagnostics.reportOn import org.jetbrains.kotlin.fir.declarations.* import org.jetbrains.kotlin.fir.resolve.firSymbolProvider import org.jetbrains.kotlin.fir.types.ConeClassLikeType @@ -55,7 +55,7 @@ object FirSealedSupertypeChecker : FirMemberDeclarationChecker() { ?: continue if (fir.status.modality == Modality.SEALED && classId.outerClassId != null) { - reporter.report(it.source) + reporter.reportOn(it.source, FirErrors.SEALED_SUPERTYPE, context) return } } @@ -77,7 +77,7 @@ object FirSealedSupertypeChecker : FirMemberDeclarationChecker() { ?: continue if (fir.status.modality == Modality.SEALED) { - reporter.reportInLocal(it.source) + reporter.reportOn(it.source, FirErrors.SEALED_SUPERTYPE_IN_LOCAL_CLASS, context) return } } @@ -99,17 +99,9 @@ object FirSealedSupertypeChecker : FirMemberDeclarationChecker() { ?: continue if (fir.status.modality == Modality.SEALED && !context.containingDeclarations.contains(fir)) { - reporter.report(it.source) + reporter.reportOn(it.source, FirErrors.SEALED_SUPERTYPE, context) return } } } - - private fun DiagnosticReporter.report(source: FirSourceElement?) { - source?.let { report(FirErrors.SEALED_SUPERTYPE.on(it)) } - } - - private fun DiagnosticReporter.reportInLocal(source: FirSourceElement?) { - source?.let { report(FirErrors.SEALED_SUPERTYPE_IN_LOCAL_CLASS.on(it)) } - } -} \ No newline at end of file +} diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirSupertypeInitializedInInterfaceChecker.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirSupertypeInitializedInInterfaceChecker.kt index 3e4c655da9e..a09f7132e4a 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirSupertypeInitializedInInterfaceChecker.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirSupertypeInitializedInInterfaceChecker.kt @@ -6,10 +6,10 @@ package org.jetbrains.kotlin.fir.analysis.checkers.declaration import org.jetbrains.kotlin.KtNodeTypes -import org.jetbrains.kotlin.fir.FirSourceElement import org.jetbrains.kotlin.fir.analysis.checkers.context.CheckerContext import org.jetbrains.kotlin.fir.analysis.diagnostics.DiagnosticReporter import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors +import org.jetbrains.kotlin.fir.analysis.diagnostics.reportOn import org.jetbrains.kotlin.fir.declarations.FirRegularClass import org.jetbrains.kotlin.fir.declarations.isInterface @@ -22,12 +22,8 @@ object FirSupertypeInitializedInInterfaceChecker : FirRegularClassChecker() { for (superTypeRef in declaration.superTypeRefs) { val source = superTypeRef.source ?: continue if (source.treeStructure.getParent(source.lighterASTNode)?.tokenType == KtNodeTypes.CONSTRUCTOR_CALLEE) { - reporter.report(source) + reporter.reportOn(source, FirErrors.SUPERTYPE_INITIALIZED_IN_INTERFACE, context) } } } - - private fun DiagnosticReporter.report(source: FirSourceElement?) { - source?.let { report(FirErrors.SUPERTYPE_INITIALIZED_IN_INTERFACE.on(it)) } - } -} \ No newline at end of file +} diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirSupertypeInitializedWithoutPrimaryConstructor.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirSupertypeInitializedWithoutPrimaryConstructor.kt index fa9782af05e..f350c6d450c 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirSupertypeInitializedWithoutPrimaryConstructor.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirSupertypeInitializedWithoutPrimaryConstructor.kt @@ -6,10 +6,10 @@ package org.jetbrains.kotlin.fir.analysis.checkers.declaration import org.jetbrains.kotlin.KtNodeTypes -import org.jetbrains.kotlin.fir.FirSourceElement import org.jetbrains.kotlin.fir.analysis.checkers.context.CheckerContext import org.jetbrains.kotlin.fir.analysis.diagnostics.DiagnosticReporter import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors +import org.jetbrains.kotlin.fir.analysis.diagnostics.reportOn import org.jetbrains.kotlin.fir.declarations.FirConstructor import org.jetbrains.kotlin.fir.declarations.FirRegularClass import org.jetbrains.kotlin.fir.declarations.isInterface @@ -27,12 +27,8 @@ object FirSupertypeInitializedWithoutPrimaryConstructor : FirRegularClassChecker for (superTypeRef in declaration.superTypeRefs) { val source = superTypeRef.source ?: continue if (source.treeStructure.getParent(source.lighterASTNode)?.tokenType == KtNodeTypes.CONSTRUCTOR_CALLEE) { - reporter.report(declaration.source) + reporter.reportOn(declaration.source, FirErrors.SUPERTYPE_INITIALIZED_WITHOUT_PRIMARY_CONSTRUCTOR, context) } } } - - private fun DiagnosticReporter.report(source: FirSourceElement?) { - source?.let { report(FirErrors.SUPERTYPE_INITIALIZED_WITHOUT_PRIMARY_CONSTRUCTOR.on(it)) } - } } diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirThrowableSubclassChecker.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirThrowableSubclassChecker.kt new file mode 100644 index 00000000000..00f10c89a30 --- /dev/null +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirThrowableSubclassChecker.kt @@ -0,0 +1,43 @@ +/* + * Copyright 2010-2021 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. + */ + +package org.jetbrains.kotlin.fir.analysis.checkers.declaration + +import org.jetbrains.kotlin.fir.analysis.checkers.context.CheckerContext +import org.jetbrains.kotlin.fir.analysis.checkers.isSubtypeOfThrowable +import org.jetbrains.kotlin.fir.analysis.diagnostics.DiagnosticReporter +import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors +import org.jetbrains.kotlin.fir.analysis.diagnostics.reportOn +import org.jetbrains.kotlin.fir.declarations.* +import org.jetbrains.kotlin.fir.types.ConeClassErrorType + +object FirThrowableSubclassChecker : FirClassChecker() { + override fun check(declaration: FirClass<*>, context: CheckerContext, reporter: DiagnosticReporter) { + if (!declaration.hasThrowableSupertype(context)) + return + + if (declaration.typeParameters.isNotEmpty()) { + reporter.reportOn(declaration.typeParameters.firstOrNull()?.source, FirErrors.GENERIC_THROWABLE_SUBCLASS, context) + + val source = when { + (declaration as? FirRegularClass)?.isInner == true -> declaration.source + declaration is FirAnonymousObject -> (declaration.declarations.firstOrNull())?.source + else -> null + } + reporter.reportOn(source, FirErrors.INNER_CLASS_OF_GENERIC_THROWABLE_SUBCLASS, context) + } else if (declaration.hasGenericOuterDeclaration(context)) { + reporter.reportOn(declaration.source, FirErrors.INNER_CLASS_OF_GENERIC_THROWABLE_SUBCLASS, context) + } + } + + private fun FirClass<*>.hasThrowableSupertype(context: CheckerContext) = + superConeTypes.any { it !is ConeClassErrorType && it.isSubtypeOfThrowable(context.session) } + + private fun FirClass<*>.hasGenericOuterDeclaration(context: CheckerContext) = + classId.isLocal && context.containingDeclarations.anyIsGeneric() + + private fun Collection.anyIsGeneric() = + any { it is FirTypeParameterRefsOwner && it.typeParameters.isNotEmpty() } +} \ No newline at end of file diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirTopLevelFunctionChecker.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirTopLevelFunctionChecker.kt index 67be9cc6bed..f2645db7b6a 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirTopLevelFunctionChecker.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirTopLevelFunctionChecker.kt @@ -9,6 +9,7 @@ import org.jetbrains.kotlin.fir.FirFakeSourceElementKind import org.jetbrains.kotlin.fir.analysis.checkers.context.CheckerContext import org.jetbrains.kotlin.fir.analysis.diagnostics.DiagnosticReporter import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors +import org.jetbrains.kotlin.fir.analysis.diagnostics.reportOn import org.jetbrains.kotlin.fir.declarations.* import org.jetbrains.kotlin.lexer.KtTokens @@ -17,12 +18,12 @@ object FirTopLevelFunctionChecker : FirFileChecker() { override fun check(declaration: FirFile, context: CheckerContext, reporter: DiagnosticReporter) { for (topLevelDeclaration in declaration.declarations) { if (topLevelDeclaration is FirSimpleFunction) { - checkFunction(topLevelDeclaration, reporter) + checkFunction(topLevelDeclaration, reporter, context) } } } - private fun checkFunction(function: FirSimpleFunction, reporter: DiagnosticReporter) { + private fun checkFunction(function: FirSimpleFunction, reporter: DiagnosticReporter, context: CheckerContext) { val source = function.source ?: return if (source.kind is FirFakeSourceElementKind) return // If multiple (potentially conflicting) modality modifiers are specified, not all modifiers are recorded at `status`. @@ -32,9 +33,9 @@ object FirTopLevelFunctionChecker : FirFileChecker() { if (function.isExternal || modifierList?.modifiers?.any { it.token == KtTokens.EXTERNAL_KEYWORD } == true) return val isExpect = function.isExpect || modifierList?.modifiers?.any { it.token == KtTokens.EXPECT_KEYWORD } == true if (!function.hasBody && !isExpect) { - reporter.report(FirErrors.NON_MEMBER_FUNCTION_NO_BODY.on(source, function)) + reporter.reportOn(source, FirErrors.NON_MEMBER_FUNCTION_NO_BODY, function, context) } - checkExpectDeclarationVisibilityAndBody(function, source, modifierList, reporter) + checkExpectDeclarationVisibilityAndBody(function, source, modifierList, reporter, context) } } diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirTopLevelPropertyChecker.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirTopLevelPropertyChecker.kt index 1e3d5d99ee1..5457d3ea13f 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirTopLevelPropertyChecker.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirTopLevelPropertyChecker.kt @@ -16,17 +16,17 @@ object FirTopLevelPropertyChecker : FirFileChecker() { override fun check(declaration: FirFile, context: CheckerContext, reporter: DiagnosticReporter) { for (topLevelDeclaration in declaration.declarations) { if (topLevelDeclaration is FirProperty) { - checkProperty(topLevelDeclaration, reporter) + checkProperty(topLevelDeclaration, reporter, context) } } } - private fun checkProperty(property: FirProperty, reporter: DiagnosticReporter) { + private fun checkProperty(property: FirProperty, reporter: DiagnosticReporter, context: CheckerContext) { val source = property.source ?: return if (source.kind is FirFakeSourceElementKind) return val modifierList = with(FirModifierList) { source.getModifierList() } - checkPropertyInitializer(null, property, reporter) - checkExpectDeclarationVisibilityAndBody(property, source, modifierList, reporter) + checkPropertyInitializer(null, property, reporter, context) + checkExpectDeclarationVisibilityAndBody(property, source, modifierList, reporter, context) } } diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirTypeMismatchOnOverrideChecker.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirTypeMismatchOnOverrideChecker.kt deleted file mode 100644 index cb87609960d..00000000000 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirTypeMismatchOnOverrideChecker.kt +++ /dev/null @@ -1,192 +0,0 @@ -/* - * Copyright 2010-2020 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. - */ - -package org.jetbrains.kotlin.fir.analysis.checkers.declaration - -import org.jetbrains.kotlin.fir.FirSourceElement -import org.jetbrains.kotlin.fir.analysis.checkers.context.CheckerContext -import org.jetbrains.kotlin.fir.analysis.diagnostics.DiagnosticReporter -import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors -import org.jetbrains.kotlin.fir.declarations.* -import org.jetbrains.kotlin.fir.resolve.substitution.substitutorByMap -import org.jetbrains.kotlin.fir.scopes.FirTypeScope -import org.jetbrains.kotlin.fir.scopes.getDirectOverriddenFunctions -import org.jetbrains.kotlin.fir.scopes.getDirectOverriddenProperties -import org.jetbrains.kotlin.fir.scopes.impl.toConeType -import org.jetbrains.kotlin.fir.scopes.unsubstitutedScope -import org.jetbrains.kotlin.fir.symbols.impl.* -import org.jetbrains.kotlin.fir.typeContext -import org.jetbrains.kotlin.fir.types.ConeKotlinType -import org.jetbrains.kotlin.fir.types.FirResolvedTypeRef -import org.jetbrains.kotlin.fir.types.coneType -import org.jetbrains.kotlin.fir.types.upperBoundIfFlexible -import org.jetbrains.kotlin.types.AbstractTypeChecker -import org.jetbrains.kotlin.types.AbstractTypeCheckerContext -import org.jetbrains.kotlin.utils.addToStdlib.min -import org.jetbrains.kotlin.utils.addToStdlib.safeAs - -object FirTypeMismatchOnOverrideChecker : FirRegularClassChecker() { - override fun check(declaration: FirRegularClass, context: CheckerContext, reporter: DiagnosticReporter) { - val typeCheckerContext = context.session.typeContext.newBaseTypeCheckerContext( - errorTypesEqualToAnything = false, - stubTypesEqualToAnything = false - ) - - val firTypeScope = declaration.unsubstitutedScope( - context.sessionHolder.session, - context.sessionHolder.scopeSession, - withForcedTypeCalculator = true - ) - - for (it in declaration.declarations) { - when (it) { - is FirSimpleFunction -> checkFunction(it, reporter, typeCheckerContext, firTypeScope, context) - is FirProperty -> checkProperty(it, reporter, typeCheckerContext, firTypeScope, context) - } - } - } - - private fun FirTypeScope.retrieveDirectOverriddenOf(function: FirSimpleFunction): List> { - processFunctionsByName(function.name) {} - - return getDirectOverriddenFunctions(function.symbol) - } - - private fun FirTypeScope.retrieveDirectOverriddenOf(property: FirProperty): List { - processPropertiesByName(property.name) {} - - return getDirectOverriddenProperties(property.symbol) - } - - private fun ConeKotlinType.substituteAllTypeParameters( - overrideDeclaration: FirCallableMemberDeclaration<*>, - baseDeclarationSymbol: FirCallableSymbol<*>, - ): ConeKotlinType { - if (overrideDeclaration.typeParameters.isEmpty()) { - return this - } - - val parametersOwner = baseDeclarationSymbol.fir.safeAs() - ?: return this - - val map = mutableMapOf() - val size = min(overrideDeclaration.typeParameters.size, parametersOwner.typeParameters.size) - - for (it in 0 until size) { - val to = overrideDeclaration.typeParameters[it] - val from = parametersOwner.typeParameters[it] - - map[from.symbol] = to.toConeType() - } - - return substitutorByMap(map).substituteOrSelf(this) - } - - private fun FirCallableMemberDeclaration<*>.checkReturnType( - overriddenSymbols: List>, - typeCheckerContext: AbstractTypeCheckerContext, - context: CheckerContext, - ): FirMemberDeclaration? { - val returnType = returnTypeRef.safeAs()?.type - ?: return null - - val bounds = overriddenSymbols.map { context.returnTypeCalculator.tryCalculateReturnType(it.fir).coneType.upperBoundIfFlexible() } - - for (it in bounds.indices) { - val restriction = bounds[it] - .substituteAllTypeParameters(this, overriddenSymbols[it]) - - if (!AbstractTypeChecker.isSubtypeOf(typeCheckerContext, returnType, restriction)) { - return overriddenSymbols[it].fir.safeAs() - } - } - - return null - } - - private fun checkFunction( - function: FirSimpleFunction, - reporter: DiagnosticReporter, - typeCheckerContext: AbstractTypeCheckerContext, - firTypeScope: FirTypeScope, - context: CheckerContext, - ) { - if (!function.isOverride) { - return - } - - val overriddenFunctionSymbols = firTypeScope.retrieveDirectOverriddenOf(function) - - if (overriddenFunctionSymbols.isEmpty()) { - return - } - - val restriction = function.checkReturnType( - overriddenSymbols = overriddenFunctionSymbols, - typeCheckerContext = typeCheckerContext, - context = context, - ) - - restriction?.let { - reporter.reportMismatchOnFunction( - function.returnTypeRef.source, - function.returnTypeRef.coneType.toString(), - it - ) - } - } - - private fun checkProperty( - property: FirProperty, - reporter: DiagnosticReporter, - typeCheckerContext: AbstractTypeCheckerContext, - firTypeScope: FirTypeScope, - context: CheckerContext, - ) { - if (!property.isOverride) { - return - } - - val overriddenPropertySymbols = firTypeScope.retrieveDirectOverriddenOf(property) - - if (overriddenPropertySymbols.isEmpty()) { - return - } - - val restriction = property.checkReturnType( - overriddenSymbols = overriddenPropertySymbols, - typeCheckerContext = typeCheckerContext, - context = context, - ) - - restriction?.let { - if (property.isVar) { - reporter.reportMismatchOnVariable( - property.returnTypeRef.source, - property.returnTypeRef.coneType.toString(), - it - ) - } else { - reporter.reportMismatchOnProperty( - property.returnTypeRef.source, - property.returnTypeRef.coneType.toString(), - it - ) - } - } - } - - private fun DiagnosticReporter.reportMismatchOnFunction(source: FirSourceElement?, type: String, declaration: FirMemberDeclaration) { - source?.let { report(FirErrors.RETURN_TYPE_MISMATCH_ON_OVERRIDE.on(it, type, declaration)) } - } - - private fun DiagnosticReporter.reportMismatchOnProperty(source: FirSourceElement?, type: String, declaration: FirMemberDeclaration) { - source?.let { report(FirErrors.PROPERTY_TYPE_MISMATCH_ON_OVERRIDE.on(it, type, declaration)) } - } - - private fun DiagnosticReporter.reportMismatchOnVariable(source: FirSourceElement?, type: String, declaration: FirMemberDeclaration) { - source?.let { report(FirErrors.VAR_TYPE_MISMATCH_ON_OVERRIDE.on(it, type, declaration)) } - } -} diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirTypeParametersInObjectChecker.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirTypeParametersInObjectChecker.kt index 33404a70708..a0fa3fe7bb4 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirTypeParametersInObjectChecker.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirTypeParametersInObjectChecker.kt @@ -6,10 +6,10 @@ package org.jetbrains.kotlin.fir.analysis.checkers.declaration import org.jetbrains.kotlin.descriptors.ClassKind -import org.jetbrains.kotlin.fir.FirSourceElement import org.jetbrains.kotlin.fir.analysis.checkers.context.CheckerContext import org.jetbrains.kotlin.fir.analysis.diagnostics.DiagnosticReporter import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors +import org.jetbrains.kotlin.fir.analysis.diagnostics.reportOn import org.jetbrains.kotlin.fir.declarations.FirRegularClass object FirTypeParametersInObjectChecker : FirRegularClassChecker() { @@ -19,11 +19,7 @@ object FirTypeParametersInObjectChecker : FirRegularClassChecker() { } if (declaration.typeParameters.isNotEmpty()) { - reporter.report(declaration.source) + reporter.reportOn(declaration.source, FirErrors.TYPE_PARAMETERS_IN_OBJECT, context) } } - - private fun DiagnosticReporter.report(source: FirSourceElement?) { - source?.let { report(FirErrors.TYPE_PARAMETERS_IN_OBJECT.on(it)) } - } -} \ No newline at end of file +} diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/expression/FirAbstractSuperCallChecker.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/expression/FirAbstractSuperCallChecker.kt index 1b028fc90b7..c92c6c9ff00 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/expression/FirAbstractSuperCallChecker.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/expression/FirAbstractSuperCallChecker.kt @@ -7,12 +7,12 @@ package org.jetbrains.kotlin.fir.analysis.checkers.expression import org.jetbrains.kotlin.descriptors.ClassKind import org.jetbrains.kotlin.descriptors.Modality -import org.jetbrains.kotlin.fir.FirSourceElement import org.jetbrains.kotlin.fir.analysis.checkers.context.CheckerContext import org.jetbrains.kotlin.fir.analysis.checkers.getContainingClass import org.jetbrains.kotlin.fir.analysis.checkers.getDeclaration import org.jetbrains.kotlin.fir.analysis.diagnostics.DiagnosticReporter import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors +import org.jetbrains.kotlin.fir.analysis.diagnostics.reportOn import org.jetbrains.kotlin.fir.declarations.FirCallableMemberDeclaration import org.jetbrains.kotlin.fir.declarations.FirRegularClass import org.jetbrains.kotlin.fir.declarations.modality @@ -42,14 +42,8 @@ object FirAbstractSuperCallChecker : FirQualifiedAccessChecker() { declaration.modality == Modality.ABSTRACT && item.modality == Modality.ABSTRACT ) { - reporter.report(expression.calleeReference.source) + reporter.reportOn(expression.calleeReference.source, FirErrors.ABSTRACT_SUPER_CALL, context) } } } - - private fun DiagnosticReporter.report(source: FirSourceElement?) { - source?.let { - report(FirErrors.ABSTRACT_SUPER_CALL.on(it)) - } - } -} \ No newline at end of file +} diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/expression/FirAnonymousFunctionChecker.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/expression/FirAnonymousFunctionChecker.kt index 6b78f913121..e054e461d9e 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/expression/FirAnonymousFunctionChecker.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/expression/FirAnonymousFunctionChecker.kt @@ -6,9 +6,9 @@ package org.jetbrains.kotlin.fir.analysis.checkers.expression import org.jetbrains.kotlin.fir.analysis.checkers.context.CheckerContext -import org.jetbrains.kotlin.fir.analysis.checkers.extended.report import org.jetbrains.kotlin.fir.analysis.diagnostics.DiagnosticReporter import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors +import org.jetbrains.kotlin.fir.analysis.diagnostics.reportOn import org.jetbrains.kotlin.fir.declarations.FirAnonymousFunction import org.jetbrains.kotlin.fir.expressions.FirStatement @@ -20,10 +20,10 @@ object FirAnonymousFunctionChecker : FirExpressionChecker() { for (valueParameter in expression.valueParameters) { val source = valueParameter.source ?: continue if (valueParameter.defaultValue != null) { - reporter.report(source, FirErrors.ANONYMOUS_FUNCTION_PARAMETER_WITH_DEFAULT_VALUE) + reporter.reportOn(source, FirErrors.ANONYMOUS_FUNCTION_PARAMETER_WITH_DEFAULT_VALUE, context) } if (valueParameter.isVararg) { - reporter.report(source, FirErrors.USELESS_VARARG_ON_PARAMETER) + reporter.reportOn(source, FirErrors.USELESS_VARARG_ON_PARAMETER, context) } } } diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/expression/FirCatchParameterChecker.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/expression/FirCatchParameterChecker.kt new file mode 100644 index 00000000000..b4899e2394b --- /dev/null +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/expression/FirCatchParameterChecker.kt @@ -0,0 +1,47 @@ +/* + * Copyright 2010-2021 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. + */ + +package org.jetbrains.kotlin.fir.analysis.checkers.expression + +import org.jetbrains.kotlin.fir.analysis.checkers.context.CheckerContext +import org.jetbrains.kotlin.fir.analysis.checkers.isSubtypeOfThrowable +import org.jetbrains.kotlin.fir.analysis.checkers.throwableClassLikeType +import org.jetbrains.kotlin.fir.analysis.diagnostics.DiagnosticReporter +import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors +import org.jetbrains.kotlin.fir.analysis.diagnostics.reportOn +import org.jetbrains.kotlin.fir.expressions.FirTryExpression +import org.jetbrains.kotlin.fir.types.ConeTypeParameterType +import org.jetbrains.kotlin.fir.types.FirResolvedTypeRef + +object FirCatchParameterChecker : FirTryExpressionChecker() { + override fun check(expression: FirTryExpression, context: CheckerContext, reporter: DiagnosticReporter) { + for (catchEntry in expression.catches) { + val catchParameter = catchEntry.parameter + + if (catchParameter.defaultValue != null) { + reporter.reportOn(catchParameter.source, FirErrors.CATCH_PARAMETER_WITH_DEFAULT_VALUE, context) + } + + val typeRef = catchParameter.returnTypeRef + if (typeRef !is FirResolvedTypeRef) return + + val coneType = typeRef.type + if (coneType is ConeTypeParameterType) { + val isReified = coneType.lookupTag.typeParameterSymbol.fir.isReified + + if (isReified) { + reporter.reportOn(catchParameter.source, FirErrors.REIFIED_TYPE_IN_CATCH_CLAUSE, context) + } else { + reporter.reportOn(catchParameter.source, FirErrors.TYPE_PARAMETER_IN_CATCH_CLAUSE, context) + } + } + + val session = context.session + if (!coneType.isSubtypeOfThrowable(session)) { + reporter.reportOn(catchParameter.source, FirErrors.TYPE_MISMATCH, throwableClassLikeType(session), coneType, context) + } + } + } +} diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/expression/FirNotASupertypeChecker.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/expression/FirNotASupertypeChecker.kt index 9a06d7e999a..32a239cbcd2 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/expression/FirNotASupertypeChecker.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/expression/FirNotASupertypeChecker.kt @@ -5,12 +5,12 @@ package org.jetbrains.kotlin.fir.analysis.checkers.expression -import org.jetbrains.kotlin.fir.FirSourceElement import org.jetbrains.kotlin.fir.analysis.checkers.context.CheckerContext import org.jetbrains.kotlin.fir.analysis.checkers.isSupertypeOf import org.jetbrains.kotlin.fir.analysis.checkers.toRegularClass import org.jetbrains.kotlin.fir.analysis.diagnostics.DiagnosticReporter import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors +import org.jetbrains.kotlin.fir.analysis.diagnostics.reportOn import org.jetbrains.kotlin.fir.declarations.FirAnonymousObject import org.jetbrains.kotlin.fir.declarations.FirClass import org.jetbrains.kotlin.fir.declarations.FirRegularClass @@ -29,7 +29,7 @@ object FirNotASupertypeChecker : FirQualifiedAccessChecker() { val surrounding = context.findClosestClass(superReference.labelName) ?: return if (!targetClass.isSupertypeOf(surrounding)) { - reporter.report(expression.source) + reporter.reportOn(expression.source, FirErrors.NOT_A_SUPERTYPE, context) } } @@ -51,10 +51,4 @@ object FirNotASupertypeChecker : FirQualifiedAccessChecker() { return null } - - private fun DiagnosticReporter.report(source: FirSourceElement?) { - source?.let { - report(FirErrors.NOT_A_SUPERTYPE.on(it)) - } - } } diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/expression/FirProjectionsOnNonClassTypeArgumentChecker.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/expression/FirProjectionsOnNonClassTypeArgumentChecker.kt index 3c227fc60dd..4ece80f39e1 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/expression/FirProjectionsOnNonClassTypeArgumentChecker.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/expression/FirProjectionsOnNonClassTypeArgumentChecker.kt @@ -5,10 +5,10 @@ package org.jetbrains.kotlin.fir.analysis.checkers.expression -import org.jetbrains.kotlin.fir.FirSourceElement import org.jetbrains.kotlin.fir.analysis.checkers.context.CheckerContext import org.jetbrains.kotlin.fir.analysis.diagnostics.DiagnosticReporter import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors +import org.jetbrains.kotlin.fir.analysis.diagnostics.reportOn import org.jetbrains.kotlin.fir.expressions.FirQualifiedAccessExpression import org.jetbrains.kotlin.fir.types.FirStarProjection import org.jetbrains.kotlin.fir.types.FirTypeProjectionWithVariance @@ -18,19 +18,13 @@ object FirProjectionsOnNonClassTypeArgumentChecker : FirQualifiedAccessChecker() override fun check(expression: FirQualifiedAccessExpression, context: CheckerContext, reporter: DiagnosticReporter) { for (it in expression.typeArguments) { when (it) { - is FirStarProjection -> reporter.report(it.source) + is FirStarProjection -> reporter.reportOn(it.source, FirErrors.PROJECTION_ON_NON_CLASS_TYPE_ARGUMENT, context) is FirTypeProjectionWithVariance -> { if (it.variance != Variance.INVARIANT) { - reporter.report(it.source) + reporter.reportOn(it.source, FirErrors.PROJECTION_ON_NON_CLASS_TYPE_ARGUMENT, context) } } } } } - - private fun DiagnosticReporter.report(source: FirSourceElement?) { - source?.let { - report(FirErrors.PROJECTION_ON_NON_CLASS_TYPE_ARGUMENT.on(it)) - } - } -} \ No newline at end of file +} diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/expression/FirQualifiedSupertypeExtendedByOtherSupertypeChecker.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/expression/FirQualifiedSupertypeExtendedByOtherSupertypeChecker.kt index 13c2a5110ec..6dd050ad8d1 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/expression/FirQualifiedSupertypeExtendedByOtherSupertypeChecker.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/expression/FirQualifiedSupertypeExtendedByOtherSupertypeChecker.kt @@ -5,13 +5,13 @@ package org.jetbrains.kotlin.fir.analysis.checkers.expression -import org.jetbrains.kotlin.fir.FirSourceElement import org.jetbrains.kotlin.fir.analysis.checkers.context.CheckerContext import org.jetbrains.kotlin.fir.analysis.checkers.findClosestClassOrObject import org.jetbrains.kotlin.fir.analysis.checkers.followAllAlias import org.jetbrains.kotlin.fir.analysis.checkers.isSupertypeOf import org.jetbrains.kotlin.fir.analysis.diagnostics.DiagnosticReporter import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors +import org.jetbrains.kotlin.fir.analysis.diagnostics.reportOn import org.jetbrains.kotlin.fir.declarations.FirClass import org.jetbrains.kotlin.fir.expressions.FirQualifiedAccessExpression import org.jetbrains.kotlin.fir.references.FirSuperReference @@ -61,13 +61,12 @@ object FirQualifiedSupertypeExtendedByOtherSupertypeChecker : FirQualifiedAccess } if (count >= 2 && candidate != null) { - reporter.report(superReference.superTypeRef.source, candidate) - } - } - - private fun DiagnosticReporter.report(source: FirSourceElement?, candidate: FirClass<*>) { - source?.let { - report(FirErrors.QUALIFIED_SUPERTYPE_EXTENDED_BY_OTHER_SUPERTYPE.on(it, candidate)) + reporter.reportOn( + superReference.superTypeRef.source, + FirErrors.QUALIFIED_SUPERTYPE_EXTENDED_BY_OTHER_SUPERTYPE, + candidate, + context + ) } } } diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/expression/FirSealedClassConstructorCallChecker.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/expression/FirSealedClassConstructorCallChecker.kt index f05dcfc06b5..3eaf87d9cd9 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/expression/FirSealedClassConstructorCallChecker.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/expression/FirSealedClassConstructorCallChecker.kt @@ -6,10 +6,10 @@ package org.jetbrains.kotlin.fir.analysis.checkers.expression import org.jetbrains.kotlin.descriptors.Modality -import org.jetbrains.kotlin.fir.FirSourceElement import org.jetbrains.kotlin.fir.analysis.checkers.context.CheckerContext import org.jetbrains.kotlin.fir.analysis.diagnostics.DiagnosticReporter import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors +import org.jetbrains.kotlin.fir.analysis.diagnostics.reportOn import org.jetbrains.kotlin.fir.declarations.FirConstructor import org.jetbrains.kotlin.fir.declarations.FirRegularClass import org.jetbrains.kotlin.fir.expressions.FirQualifiedAccessExpression @@ -33,11 +33,7 @@ object FirSealedClassConstructorCallChecker : FirQualifiedAccessChecker() { ?: return if (typeFir.status.modality == Modality.SEALED) { - reporter.report(expression.calleeReference.source) + reporter.reportOn(expression.calleeReference.source, FirErrors.SEALED_CLASS_CONSTRUCTOR_CALL, context) } } - - private fun DiagnosticReporter.report(source: FirSourceElement?) { - source?.let { report(FirErrors.SEALED_CLASS_CONSTRUCTOR_CALL.on(it)) } - } -} \ No newline at end of file +} diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/expression/FirSuperNotAvailableChecker.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/expression/FirSuperNotAvailableChecker.kt index e73be836a31..f75b0b73426 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/expression/FirSuperNotAvailableChecker.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/expression/FirSuperNotAvailableChecker.kt @@ -5,10 +5,10 @@ package org.jetbrains.kotlin.fir.analysis.checkers.expression -import org.jetbrains.kotlin.fir.FirSourceElement import org.jetbrains.kotlin.fir.analysis.checkers.context.CheckerContext import org.jetbrains.kotlin.fir.analysis.diagnostics.DiagnosticReporter import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors +import org.jetbrains.kotlin.fir.analysis.diagnostics.reportOn import org.jetbrains.kotlin.fir.declarations.FirClass import org.jetbrains.kotlin.fir.expressions.FirQualifiedAccessExpression import org.jetbrains.kotlin.fir.references.FirSuperReference @@ -23,13 +23,7 @@ object FirSuperNotAvailableChecker : FirQualifiedAccessChecker() { } if (!isInsideClass) { - reporter.report(expression.source) - } - } - - private fun DiagnosticReporter.report(source: FirSourceElement?) { - source?.let { - report(FirErrors.SUPER_NOT_AVAILABLE.on(it)) + reporter.reportOn(expression.source, FirErrors.SUPER_NOT_AVAILABLE, context) } } } diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/expression/FirSuperclassNotAccessibleFromInterfaceChecker.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/expression/FirSuperclassNotAccessibleFromInterfaceChecker.kt index 5cbdc7c00a5..0bab6e13a60 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/expression/FirSuperclassNotAccessibleFromInterfaceChecker.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/expression/FirSuperclassNotAccessibleFromInterfaceChecker.kt @@ -6,11 +6,11 @@ package org.jetbrains.kotlin.fir.analysis.checkers.expression import org.jetbrains.kotlin.descriptors.ClassKind -import org.jetbrains.kotlin.fir.FirSourceElement import org.jetbrains.kotlin.fir.analysis.checkers.context.CheckerContext import org.jetbrains.kotlin.fir.analysis.checkers.getContainingClass import org.jetbrains.kotlin.fir.analysis.diagnostics.DiagnosticReporter import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors +import org.jetbrains.kotlin.fir.analysis.diagnostics.reportOn import org.jetbrains.kotlin.fir.declarations.FirClassLikeDeclaration import org.jetbrains.kotlin.fir.declarations.FirRegularClass import org.jetbrains.kotlin.fir.expressions.FirQualifiedAccessExpression @@ -34,7 +34,7 @@ object FirSuperclassNotAccessibleFromInterfaceChecker : FirQualifiedAccessChecke ?: return if (origin.source != null && origin.classKind == ClassKind.CLASS) { - reporter.report(expression.explicitReceiver?.source) + reporter.reportOn(expression.explicitReceiver?.source, FirErrors.SUPERCLASS_NOT_ACCESSIBLE_FROM_INTERFACE, context) } } } @@ -46,10 +46,4 @@ object FirSuperclassNotAccessibleFromInterfaceChecker : FirQualifiedAccessChecke private fun getClassLikeDeclaration(functionCall: FirQualifiedAccessExpression, context: CheckerContext): FirClassLikeDeclaration<*>? { return functionCall.calleeReference.safeAs()?.resolvedSymbol?.fir?.getContainingClass(context) } - - private fun DiagnosticReporter.report(source: FirSourceElement?) { - source?.let { - report(FirErrors.SUPERCLASS_NOT_ACCESSIBLE_FROM_INTERFACE.on(it)) - } - } } diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/expression/FirTypeArgumentsNotAllowedExpressionChecker.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/expression/FirTypeArgumentsNotAllowedExpressionChecker.kt index 2f8762e32d4..23a80d4f8f4 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/expression/FirTypeArgumentsNotAllowedExpressionChecker.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/expression/FirTypeArgumentsNotAllowedExpressionChecker.kt @@ -5,10 +5,10 @@ package org.jetbrains.kotlin.fir.analysis.checkers.expression -import org.jetbrains.kotlin.fir.FirSourceElement import org.jetbrains.kotlin.fir.analysis.checkers.context.CheckerContext import org.jetbrains.kotlin.fir.analysis.diagnostics.DiagnosticReporter import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors +import org.jetbrains.kotlin.fir.analysis.diagnostics.reportOn import org.jetbrains.kotlin.fir.expressions.FirQualifiedAccessExpression import org.jetbrains.kotlin.fir.expressions.FirResolvedQualifier @@ -20,15 +20,9 @@ object FirTypeArgumentsNotAllowedExpressionChecker : FirQualifiedAccessChecker() if (explicitReceiver is FirResolvedQualifier && explicitReceiver.symbol == null) { if (explicitReceiver.typeArguments.isNotEmpty()) { - reporter.report(explicitReceiver.source) + reporter.reportOn(explicitReceiver.source, FirErrors.TYPE_ARGUMENTS_NOT_ALLOWED, context) return } } } - - private fun DiagnosticReporter.report(source: FirSourceElement?) { - source?.let { - report(FirErrors.TYPE_ARGUMENTS_NOT_ALLOWED.on(it)) - } - } -} \ No newline at end of file +} diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/expression/FirUpperBoundViolatedChecker.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/expression/FirUpperBoundViolatedChecker.kt index 341ef0dff58..1b326fa99da 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/expression/FirUpperBoundViolatedChecker.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/expression/FirUpperBoundViolatedChecker.kt @@ -9,6 +9,7 @@ import org.jetbrains.kotlin.fir.FirSourceElement import org.jetbrains.kotlin.fir.analysis.checkers.context.CheckerContext import org.jetbrains.kotlin.fir.analysis.diagnostics.DiagnosticReporter import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors +import org.jetbrains.kotlin.fir.analysis.diagnostics.reportOn import org.jetbrains.kotlin.fir.declarations.* import org.jetbrains.kotlin.fir.expressions.FirQualifiedAccessExpression import org.jetbrains.kotlin.fir.originalForSubstitutionOverride @@ -74,7 +75,7 @@ object FirUpperBoundViolatedChecker : FirQualifiedAccessChecker() { } if (!satisfiesBounds(proto, actual.type, substitutor, typeCheckerContext)) { - reporter.report(actual.source, proto, actual.type) + reporter.reportOn(actual.source, proto, actual.type, context) return } @@ -98,7 +99,7 @@ object FirUpperBoundViolatedChecker : FirQualifiedAccessChecker() { // typealias A = B> // val a = A() when (calleeFir) { - is FirConstructor -> analyzeConstructorCall(expression, substitutor, typeCheckerContext, reporter) + is FirConstructor -> analyzeConstructorCall(expression, substitutor, typeCheckerContext, reporter, context) } } @@ -106,7 +107,8 @@ object FirUpperBoundViolatedChecker : FirQualifiedAccessChecker() { functionCall: FirQualifiedAccessExpression, callSiteSubstitutor: ConeSubstitutor, typeCheckerContext: AbstractTypeCheckerContext, - reporter: DiagnosticReporter + reporter: DiagnosticReporter, + context: CheckerContext ) { // holds Collection bound. // note that if B used another type parameter here, @@ -168,7 +170,7 @@ object FirUpperBoundViolatedChecker : FirQualifiedAccessChecker() { val satisfiesBounds = AbstractTypeChecker.isSubtypeOf(typeCheckerContext, target, intersection) if (!satisfiesBounds) { - reporter.report(functionCall.source, proto, actual) + reporter.reportOn(functionCall.source, proto, actual, context) return } } @@ -218,7 +220,7 @@ object FirUpperBoundViolatedChecker : FirQualifiedAccessChecker() { parameterPairs.forEach { (proto, actual) -> if (!satisfiesBounds(proto, actual.type, substitutor, typeCheckerContext)) { // should report on the parameter instead! - reporter.report(reportTarget, proto, actual) + reporter.reportOn(reportTarget, proto, actual, context) return true } @@ -250,9 +252,12 @@ object FirUpperBoundViolatedChecker : FirQualifiedAccessChecker() { return AbstractTypeChecker.isSubtypeOf(typeCheckerContext, target, intersection) } - private fun DiagnosticReporter.report(source: FirSourceElement?, proto: FirTypeParameterSymbol, actual: ConeKotlinType) { - source?.let { - report(FirErrors.UPPER_BOUND_VIOLATED.on(it, proto, actual)) - } + private fun DiagnosticReporter.reportOn( + source: FirSourceElement?, + proto: FirTypeParameterSymbol, + actual: ConeKotlinType, + context: CheckerContext + ) { + reportOn(source, FirErrors.UPPER_BOUND_VIOLATED, proto, actual, context) } } diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/extended/ArrayEqualityCanBeReplacedWithEquals.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/extended/ArrayEqualityCanBeReplacedWithEquals.kt index b42e7616fc2..5e38795e233 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/extended/ArrayEqualityCanBeReplacedWithEquals.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/extended/ArrayEqualityCanBeReplacedWithEquals.kt @@ -9,6 +9,7 @@ import org.jetbrains.kotlin.fir.analysis.checkers.context.CheckerContext import org.jetbrains.kotlin.fir.analysis.checkers.expression.FirBasicExpressionChecker import org.jetbrains.kotlin.fir.analysis.diagnostics.DiagnosticReporter import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.ARRAY_EQUALITY_OPERATOR_CAN_BE_REPLACED_WITH_EQUALS +import org.jetbrains.kotlin.fir.analysis.diagnostics.reportOn import org.jetbrains.kotlin.fir.expressions.FirEqualityOperatorCall import org.jetbrains.kotlin.fir.expressions.FirOperation import org.jetbrains.kotlin.fir.expressions.FirStatement @@ -27,6 +28,6 @@ object ArrayEqualityCanBeReplacedWithEquals : FirBasicExpressionChecker() { if (left.typeRef.coneType.classId != StandardClassIds.Array) return if (right.typeRef.coneType.classId != StandardClassIds.Array) return - reporter.report(expression.source, ARRAY_EQUALITY_OPERATOR_CAN_BE_REPLACED_WITH_EQUALS) + reporter.reportOn(expression.source, ARRAY_EQUALITY_OPERATOR_CAN_BE_REPLACED_WITH_EQUALS, context) } } diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/extended/CanBeReplacedWithOperatorAssignmentChecker.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/extended/CanBeReplacedWithOperatorAssignmentChecker.kt index cdea09b2fe8..acc76ba1185 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/extended/CanBeReplacedWithOperatorAssignmentChecker.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/extended/CanBeReplacedWithOperatorAssignmentChecker.kt @@ -14,6 +14,7 @@ import org.jetbrains.kotlin.fir.analysis.checkers.expression.FirVariableAssignme import org.jetbrains.kotlin.fir.analysis.checkers.getChildren import org.jetbrains.kotlin.fir.analysis.diagnostics.DiagnosticReporter import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors +import org.jetbrains.kotlin.fir.analysis.diagnostics.reportOn import org.jetbrains.kotlin.fir.expressions.FirFunctionCall import org.jetbrains.kotlin.fir.expressions.FirVariableAssignment import org.jetbrains.kotlin.fir.expressions.toResolvedCallableSymbol @@ -58,7 +59,7 @@ object CanBeReplacedWithOperatorAssignmentChecker : FirVariableAssignmentChecker } if (needToReport) { - reporter.report(expression.source, FirErrors.CAN_BE_REPLACED_WITH_OPERATOR_ASSIGNMENT) + reporter.reportOn(expression.source, FirErrors.CAN_BE_REPLACED_WITH_OPERATOR_ASSIGNMENT, context) } } diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/extended/CanBeValChecker.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/extended/CanBeValChecker.kt index 389c6fd59d3..4edc9b8d3ec 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/extended/CanBeValChecker.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/extended/CanBeValChecker.kt @@ -7,11 +7,17 @@ package org.jetbrains.kotlin.fir.analysis.checkers.extended import org.jetbrains.kotlin.KtNodeTypes import org.jetbrains.kotlin.contracts.description.EventOccurrencesRange -import org.jetbrains.kotlin.fir.* -import org.jetbrains.kotlin.fir.analysis.cfa.* +import org.jetbrains.kotlin.fir.FirFakeSourceElement +import org.jetbrains.kotlin.fir.FirSourceElement +import org.jetbrains.kotlin.fir.analysis.cfa.AbstractFirPropertyInitializationChecker +import org.jetbrains.kotlin.fir.analysis.cfa.PathAwarePropertyInitializationInfo +import org.jetbrains.kotlin.fir.analysis.cfa.TraverseDirection +import org.jetbrains.kotlin.fir.analysis.cfa.traverse +import org.jetbrains.kotlin.fir.analysis.checkers.context.CheckerContext import org.jetbrains.kotlin.fir.analysis.checkers.getChildren import org.jetbrains.kotlin.fir.analysis.diagnostics.DiagnosticReporter import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors +import org.jetbrains.kotlin.fir.analysis.diagnostics.reportOn import org.jetbrains.kotlin.fir.references.FirResolvedNamedReference import org.jetbrains.kotlin.fir.resolve.dfa.cfg.* import org.jetbrains.kotlin.fir.symbols.impl.FirPropertySymbol @@ -21,7 +27,8 @@ object CanBeValChecker : AbstractFirPropertyInitializationChecker() { graph: ControlFlowGraph, reporter: DiagnosticReporter, data: Map, PathAwarePropertyInitializationInfo>, - properties: Set + properties: Set, + context: CheckerContext ) { val unprocessedProperties = mutableSetOf() val propertiesCharacteristics = mutableMapOf() @@ -51,14 +58,14 @@ object CanBeValChecker : AbstractFirPropertyInitializationChecker() { if (lastDestructuringSource != null) { // if this is the last variable in destructuring declaration and destructuringCanBeVal == true and it can be val if (lastDestructuredVariables == 1 && destructuringCanBeVal && canBeVal(symbol, value)) { - reporter.report(lastDestructuringSource, FirErrors.CAN_BE_VAL) + reporter.reportOn(lastDestructuringSource, FirErrors.CAN_BE_VAL, context) lastDestructuringSource = null } else if (!canBeVal(symbol, value)) { destructuringCanBeVal = false } lastDestructuredVariables-- } else if (canBeVal(symbol, value) && symbol.fir.delegate == null) { - reporter.report(source, FirErrors.CAN_BE_VAL) + reporter.reportOn(source, FirErrors.CAN_BE_VAL, context) } } } @@ -110,4 +117,4 @@ object CanBeValChecker : AbstractFirPropertyInitializationChecker() { EventOccurrencesRange.AT_MOST_ONCE, EventOccurrencesRange.ZERO ) -} \ No newline at end of file +} diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/extended/EmptyRangeChecker.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/extended/EmptyRangeChecker.kt index 5b91cad921a..16b2894d716 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/extended/EmptyRangeChecker.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/extended/EmptyRangeChecker.kt @@ -10,6 +10,7 @@ import org.jetbrains.kotlin.fir.analysis.checkers.context.CheckerContext import org.jetbrains.kotlin.fir.analysis.checkers.expression.FirBasicExpressionChecker import org.jetbrains.kotlin.fir.analysis.diagnostics.DiagnosticReporter import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors +import org.jetbrains.kotlin.fir.analysis.diagnostics.reportOn import org.jetbrains.kotlin.fir.expressions.FirConstExpression import org.jetbrains.kotlin.fir.expressions.FirFunctionCall import org.jetbrains.kotlin.fir.expressions.FirStatement @@ -36,8 +37,7 @@ object EmptyRangeChecker : FirBasicExpressionChecker() { } if (needReport) { - reporter.report(expression.source, FirErrors.EMPTY_RANGE) - + reporter.reportOn(expression.source, FirErrors.EMPTY_RANGE, context) } } diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/extended/RedundantCallOfConversionMethod.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/extended/RedundantCallOfConversionMethod.kt index e67cc357168..87555e52263 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/extended/RedundantCallOfConversionMethod.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/extended/RedundantCallOfConversionMethod.kt @@ -10,6 +10,7 @@ import org.jetbrains.kotlin.fir.analysis.checkers.context.CheckerContext import org.jetbrains.kotlin.fir.analysis.checkers.expression.FirQualifiedAccessChecker import org.jetbrains.kotlin.fir.analysis.diagnostics.DiagnosticReporter import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors +import org.jetbrains.kotlin.fir.analysis.diagnostics.reportOn import org.jetbrains.kotlin.fir.expressions.FirConstExpression import org.jetbrains.kotlin.fir.expressions.FirExpression import org.jetbrains.kotlin.fir.expressions.FirFunctionCall @@ -31,7 +32,7 @@ object RedundantCallOfConversionMethod : FirQualifiedAccessChecker() { val qualifiedType = targetClassMap[functionName] ?: return if (expression.explicitReceiver?.isRedundant(qualifiedType) == true) { - reporter.report(expression.source, FirErrors.REDUNDANT_CALL_OF_CONVERSION_METHOD) + reporter.reportOn(expression.source, FirErrors.REDUNDANT_CALL_OF_CONVERSION_METHOD, context) } } @@ -64,4 +65,4 @@ object RedundantCallOfConversionMethod : FirQualifiedAccessChecker() { "toUShort" to StandardClassIds.UShort, "toUByte" to StandardClassIds.UByte ) -} \ No newline at end of file +} diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/extended/RedundantExplicitTypeChecker.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/extended/RedundantExplicitTypeChecker.kt index 924e5e7095c..fbae9f885a3 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/extended/RedundantExplicitTypeChecker.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/extended/RedundantExplicitTypeChecker.kt @@ -11,6 +11,7 @@ import org.jetbrains.kotlin.fir.analysis.checkers.context.CheckerContext import org.jetbrains.kotlin.fir.analysis.checkers.declaration.FirMemberDeclarationChecker import org.jetbrains.kotlin.fir.analysis.diagnostics.DiagnosticReporter import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors +import org.jetbrains.kotlin.fir.analysis.diagnostics.reportOn import org.jetbrains.kotlin.fir.declarations.FirMemberDeclaration import org.jetbrains.kotlin.fir.declarations.FirProperty import org.jetbrains.kotlin.fir.declarations.FirTypeAlias @@ -84,7 +85,7 @@ object RedundantExplicitTypeChecker : FirMemberDeclarationChecker() { else -> return } - reporter.report(declaration.returnTypeRef.source, FirErrors.REDUNDANT_EXPLICIT_TYPE) + reporter.reportOn(declaration.returnTypeRef.source, FirErrors.REDUNDANT_EXPLICIT_TYPE, context) } private fun ConeKotlinType.isSame(other: ClassId?): Boolean { @@ -95,4 +96,4 @@ object RedundantExplicitTypeChecker : FirMemberDeclarationChecker() { private fun ConeKotlinType.hasSameNameWithoutModifiers(name: Name): Boolean = this is ConeClassLikeType && lookupTag.name == name && typeArguments.isEmpty() && !isMarkedNullable -} \ No newline at end of file +} diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/extended/RedundantModalityModifierChecker.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/extended/RedundantModalityModifierChecker.kt index deaaf10ead8..57b8c51196b 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/extended/RedundantModalityModifierChecker.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/extended/RedundantModalityModifierChecker.kt @@ -14,6 +14,7 @@ import org.jetbrains.kotlin.fir.analysis.checkers.implicitModality import org.jetbrains.kotlin.fir.analysis.diagnostics.DiagnosticReporter import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.REDUNDANT_MODALITY_MODIFIER import org.jetbrains.kotlin.fir.analysis.diagnostics.modalityModifier +import org.jetbrains.kotlin.fir.analysis.diagnostics.reportOn import org.jetbrains.kotlin.fir.declarations.FirClass import org.jetbrains.kotlin.fir.declarations.FirMemberDeclaration import org.jetbrains.kotlin.fir.declarations.modality @@ -33,6 +34,6 @@ object RedundantModalityModifierChecker : FirMemberDeclarationChecker() { val implicitModality = declaration.implicitModality(context) if (modality != implicitModality) return - reporter.report(source, REDUNDANT_MODALITY_MODIFIER) + reporter.reportOn(source, REDUNDANT_MODALITY_MODIFIER, context) } } diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/extended/RedundantReturnUnitTypeChecker.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/extended/RedundantReturnUnitTypeChecker.kt index c1207f16dd4..3590da3ef4c 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/extended/RedundantReturnUnitTypeChecker.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/extended/RedundantReturnUnitTypeChecker.kt @@ -10,6 +10,7 @@ import org.jetbrains.kotlin.fir.analysis.checkers.context.CheckerContext import org.jetbrains.kotlin.fir.analysis.checkers.declaration.FirBasicDeclarationChecker import org.jetbrains.kotlin.fir.analysis.diagnostics.DiagnosticReporter import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors +import org.jetbrains.kotlin.fir.analysis.diagnostics.reportOn import org.jetbrains.kotlin.fir.declarations.FirDeclaration import org.jetbrains.kotlin.fir.declarations.FirSimpleFunction import org.jetbrains.kotlin.fir.expressions.impl.FirSingleExpressionBlock @@ -25,8 +26,8 @@ object RedundantReturnUnitType : FirBasicDeclarationChecker() { if (returnType.annotations.isNotEmpty()) return if (returnType.isUnit) { - reporter.report(declaration.returnTypeRef.source, FirErrors.REDUNDANT_RETURN_UNIT_TYPE) + reporter.reportOn(declaration.returnTypeRef.source, FirErrors.REDUNDANT_RETURN_UNIT_TYPE, context) } } -} \ No newline at end of file +} diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/extended/RedundantSetterParameterTypeChecker.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/extended/RedundantSetterParameterTypeChecker.kt index 90d49246675..deacaeaec26 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/extended/RedundantSetterParameterTypeChecker.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/extended/RedundantSetterParameterTypeChecker.kt @@ -9,6 +9,7 @@ import org.jetbrains.kotlin.fir.analysis.checkers.context.CheckerContext import org.jetbrains.kotlin.fir.analysis.checkers.declaration.FirMemberDeclarationChecker import org.jetbrains.kotlin.fir.analysis.diagnostics.DiagnosticReporter import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.REDUNDANT_SETTER_PARAMETER_TYPE +import org.jetbrains.kotlin.fir.analysis.diagnostics.reportOn import org.jetbrains.kotlin.fir.declarations.FirMemberDeclaration import org.jetbrains.kotlin.fir.declarations.FirProperty import org.jetbrains.kotlin.fir.declarations.impl.FirDefaultPropertyAccessor @@ -23,7 +24,7 @@ object RedundantSetterParameterTypeChecker : FirMemberDeclarationChecker() { val setterParameterTypeSource = valueParameter.returnTypeRef.source ?: return if (setterParameterTypeSource != propertyTypeSource) { - reporter.report(setterParameterTypeSource, REDUNDANT_SETTER_PARAMETER_TYPE) + reporter.reportOn(setterParameterTypeSource, REDUNDANT_SETTER_PARAMETER_TYPE, context) } } -} \ No newline at end of file +} diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/extended/RedundantSingleExpressionStringTemplateChecker.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/extended/RedundantSingleExpressionStringTemplateChecker.kt index a2282d4b3e9..7ac980a7445 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/extended/RedundantSingleExpressionStringTemplateChecker.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/extended/RedundantSingleExpressionStringTemplateChecker.kt @@ -17,6 +17,7 @@ import org.jetbrains.kotlin.fir.analysis.checkers.expression.FirBasicExpressionC import org.jetbrains.kotlin.fir.analysis.checkers.getChildren import org.jetbrains.kotlin.fir.analysis.diagnostics.DiagnosticReporter import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.REDUNDANT_SINGLE_EXPRESSION_STRING_TEMPLATE +import org.jetbrains.kotlin.fir.analysis.diagnostics.reportOn import org.jetbrains.kotlin.fir.expressions.FirFunctionCall import org.jetbrains.kotlin.fir.expressions.FirStatement import org.jetbrains.kotlin.fir.symbols.StandardClassIds @@ -32,7 +33,7 @@ object RedundantSingleExpressionStringTemplateChecker : FirBasicExpressionChecke expression.explicitReceiver?.typeRef?.coneType?.classId == StandardClassIds.String && expression.stringParentChildrenCount() == 1 // there is no more children in original string template ) { - reporter.report(expression.source, REDUNDANT_SINGLE_EXPRESSION_STRING_TEMPLATE) + reporter.reportOn(expression.source, REDUNDANT_SINGLE_EXPRESSION_STRING_TEMPLATE, context) } } diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/extended/RedundantVisibilityModifierChecker.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/extended/RedundantVisibilityModifierChecker.kt index 94030703087..8318c2101d6 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/extended/RedundantVisibilityModifierChecker.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/extended/RedundantVisibilityModifierChecker.kt @@ -7,17 +7,14 @@ package org.jetbrains.kotlin.fir.analysis.checkers.extended import org.jetbrains.kotlin.descriptors.ClassKind import org.jetbrains.kotlin.descriptors.Modality -import org.jetbrains.kotlin.fir.FirFakeSourceElement -import org.jetbrains.kotlin.fir.FirFakeSourceElementKind import org.jetbrains.kotlin.descriptors.Visibilities import org.jetbrains.kotlin.descriptors.Visibility +import org.jetbrains.kotlin.fir.FirFakeSourceElement +import org.jetbrains.kotlin.fir.FirFakeSourceElementKind import org.jetbrains.kotlin.fir.analysis.checkers.* import org.jetbrains.kotlin.fir.analysis.checkers.context.CheckerContext import org.jetbrains.kotlin.fir.analysis.checkers.declaration.FirBasicDeclarationChecker -import org.jetbrains.kotlin.fir.analysis.diagnostics.DiagnosticReporter -import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors -import org.jetbrains.kotlin.fir.analysis.diagnostics.overrideModifier -import org.jetbrains.kotlin.fir.analysis.diagnostics.visibilityModifier +import org.jetbrains.kotlin.fir.analysis.diagnostics.* import org.jetbrains.kotlin.fir.declarations.* import org.jetbrains.kotlin.lexer.KtModifierKeywordToken @@ -53,7 +50,7 @@ object RedundantVisibilityModifierChecker : FirBasicDeclarationChecker() { && declaration.setter?.visibility == Visibilities.Public ) return - reporter.report(source, FirErrors.REDUNDANT_VISIBILITY_MODIFIER) + reporter.reportOn(source, FirErrors.REDUNDANT_VISIBILITY_MODIFIER, context) } private fun FirDeclaration.implicitVisibility(context: CheckerContext): Visibility { diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/extended/ReportHelper.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/extended/ReportHelper.kt deleted file mode 100644 index c5d248cd440..00000000000 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/extended/ReportHelper.kt +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Copyright 2010-2020 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. - */ - -package org.jetbrains.kotlin.fir.analysis.checkers.extended - -import com.intellij.psi.PsiElement -import org.jetbrains.kotlin.fir.FirSourceElement -import org.jetbrains.kotlin.fir.analysis.diagnostics.DiagnosticReporter -import org.jetbrains.kotlin.fir.analysis.diagnostics.FirDiagnosticFactory0 - -inline fun DiagnosticReporter.report( - source: T?, - factory: FirDiagnosticFactory0 -) { - source?.let { report(factory.on(it)) } -} \ No newline at end of file diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/extended/UnusedChecker.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/extended/UnusedChecker.kt index 75c004f1f87..03b5fb9b7ca 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/extended/UnusedChecker.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/extended/UnusedChecker.kt @@ -19,6 +19,7 @@ import org.jetbrains.kotlin.fir.analysis.checkers.getContainingClass import org.jetbrains.kotlin.fir.analysis.checkers.isIterator import org.jetbrains.kotlin.fir.analysis.diagnostics.DiagnosticReporter import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors +import org.jetbrains.kotlin.fir.analysis.diagnostics.reportOn import org.jetbrains.kotlin.fir.expressions.FirAnnotationCall import org.jetbrains.kotlin.fir.expressions.FirFunctionCall import org.jetbrains.kotlin.fir.expressions.FirQualifiedAccess @@ -30,21 +31,22 @@ import org.jetbrains.kotlin.fir.symbols.impl.FirPropertySymbol import org.jetbrains.kotlin.fir.types.coneType object UnusedChecker : FirControlFlowChecker() { - override fun analyze(graph: ControlFlowGraph, reporter: DiagnosticReporter, checkerContext: CheckerContext) { - if ((graph.declaration as? FirSymbolOwner<*>)?.getContainingClass(checkerContext)?.takeIf { + override fun analyze(graph: ControlFlowGraph, reporter: DiagnosticReporter, context: CheckerContext) { + if ((graph.declaration as? FirSymbolOwner<*>)?.getContainingClass(context)?.takeIf { !it.symbol.classId.isLocal } != null ) return val properties = LocalPropertyCollector.collect(graph) if (properties.isEmpty()) return - val data = ValueWritesWithoutReading(checkerContext.session, properties).getData(graph) - graph.traverse(TraverseDirection.Backward, CfaVisitor(data, reporter)) + val data = ValueWritesWithoutReading(context.session, properties).getData(graph) + graph.traverse(TraverseDirection.Backward, CfaVisitor(data, reporter, context)) } class CfaVisitor( val data: Map, PathAwareVariableStatusInfo>, - val reporter: DiagnosticReporter + val reporter: DiagnosticReporter, + val context: CheckerContext ) : ControlFlowGraphVisitorVoid() { override fun visitNode(node: CFGNode<*>) {} @@ -56,7 +58,7 @@ object UnusedChecker : FirControlFlowChecker() { if (data == VariableStatus.ONLY_WRITTEN_NEVER_READ) { // todo: report case like "a += 1" where `a` `doesn't writes` different way (special for Idea) val source = node.fir.lValue.source - reporter.report(source, FirErrors.ASSIGNED_VALUE_IS_NEVER_READ) + reporter.reportOn(source, FirErrors.ASSIGNED_VALUE_IS_NEVER_READ, context) // To avoid duplicate reports, stop investigating remaining paths once reported. break } @@ -74,17 +76,17 @@ object UnusedChecker : FirControlFlowChecker() { when { data == VariableStatus.UNUSED -> { if ((node.fir.initializer as? FirFunctionCall)?.isIterator != true) { - reporter.report(variableSource, FirErrors.UNUSED_VARIABLE) + reporter.reportOn(variableSource, FirErrors.UNUSED_VARIABLE, context) break } } data.isRedundantInit -> { val source = variableSymbol.fir.initializer?.source - reporter.report(source, FirErrors.VARIABLE_INITIALIZER_IS_REDUNDANT) + reporter.reportOn(source, FirErrors.VARIABLE_INITIALIZER_IS_REDUNDANT, context) break } data == VariableStatus.ONLY_WRITTEN_NEVER_READ -> { - reporter.report(variableSource, FirErrors.VARIABLE_NEVER_READ) + reporter.reportOn(variableSource, FirErrors.VARIABLE_NEVER_READ, context) break } else -> { diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/extended/UselessCallOnNotNullChecker.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/extended/UselessCallOnNotNullChecker.kt index 826de86a6ba..8faa654deff 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/extended/UselessCallOnNotNullChecker.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/extended/UselessCallOnNotNullChecker.kt @@ -9,6 +9,7 @@ import org.jetbrains.kotlin.fir.analysis.checkers.context.CheckerContext import org.jetbrains.kotlin.fir.analysis.checkers.expression.FirQualifiedAccessChecker import org.jetbrains.kotlin.fir.analysis.diagnostics.DiagnosticReporter import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors +import org.jetbrains.kotlin.fir.analysis.diagnostics.reportOn import org.jetbrains.kotlin.fir.expressions.FirExpression import org.jetbrains.kotlin.fir.expressions.FirQualifiedAccessExpression import org.jetbrains.kotlin.fir.references.FirResolvedNamedReference @@ -28,7 +29,7 @@ object UselessCallOnNotNullChecker : FirQualifiedAccessChecker() { if ("$calleePackageName.$calleeName" !in triggerOn) return if (calleeOn.getNullability() == ConeNullability.NOT_NULL) { - reporter.report(expression.source, FirErrors.USELESS_CALL_ON_NOT_NULL) + reporter.reportOn(expression.source, FirErrors.USELESS_CALL_ON_NOT_NULL, context) } } @@ -53,4 +54,4 @@ object UselessCallOnNotNullChecker : FirQualifiedAccessChecker() { "kotlin.orEmpty" ) -} \ No newline at end of file +} diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/collectors/AbstractDiagnosticCollector.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/collectors/AbstractDiagnosticCollector.kt index 79cbafe8f2d..8591c9865dd 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/collectors/AbstractDiagnosticCollector.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/collectors/AbstractDiagnosticCollector.kt @@ -5,6 +5,7 @@ package org.jetbrains.kotlin.fir.analysis.collectors +import org.jetbrains.kotlin.fir.FirAnnotationContainer import org.jetbrains.kotlin.fir.FirElement import org.jetbrains.kotlin.fir.FirFakeSourceElementKind import org.jetbrains.kotlin.fir.FirSession @@ -21,11 +22,9 @@ import org.jetbrains.kotlin.fir.resolve.collectImplicitReceivers import org.jetbrains.kotlin.fir.resolve.defaultType import org.jetbrains.kotlin.fir.resolve.transformers.ReturnTypeCalculator import org.jetbrains.kotlin.fir.resolve.transformers.ReturnTypeCalculatorForFullBodyResolve -import org.jetbrains.kotlin.fir.types.ConeKotlinType -import org.jetbrains.kotlin.fir.types.FirResolvedTypeRef -import org.jetbrains.kotlin.fir.types.FirTypeRef +import org.jetbrains.kotlin.fir.symbols.StandardClassIds +import org.jetbrains.kotlin.fir.types.* import org.jetbrains.kotlin.fir.types.builder.buildResolvedTypeRef -import org.jetbrains.kotlin.fir.types.coneTypeSafe import org.jetbrains.kotlin.fir.visitors.FirDefaultVisitor import org.jetbrains.kotlin.name.Name @@ -34,6 +33,12 @@ abstract class AbstractDiagnosticCollector( override val scopeSession: ScopeSession = ScopeSession(), returnTypeCalculator: ReturnTypeCalculator = ReturnTypeCalculatorForFullBodyResolve() ) : SessionHolder { + companion object { + private const val SUPPRESS_ALL_INFOS = "infos" + private const val SUPPRESS_ALL_WARNINGS = "warnings" + private const val SUPPRESS_ALL_ERRORS = "errors" + } + fun collectDiagnostics(firFile: FirFile): List> { if (!componentsInitialized) { throw IllegalStateException("Components are not initialized") @@ -74,13 +79,26 @@ abstract class AbstractDiagnosticCollector( } override fun visitElement(element: FirElement, data: Nothing?) { + if (element is FirAnnotationContainer) { + visitAnnotationContainer(element, data) + return + } element.runComponents() element.acceptChildren(this, null) } + override fun visitAnnotationContainer(annotationContainer: FirAnnotationContainer, data: Nothing?) { + withSuppressedDiagnostics(annotationContainer) { + annotationContainer.runComponents() + annotationContainer.acceptChildren(this, null) + } + } + private fun visitJump(loopJump: FirLoopJump) { - loopJump.runComponents() - loopJump.target.labeledElement.takeIf { it is FirErrorLoop }?.accept(this, null) + withSuppressedDiagnostics(loopJump) { + loopJump.runComponents() + loopJump.target.labeledElement.takeIf { it is FirErrorLoop }?.accept(this, null) + } } override fun visitBreakExpression(breakExpression: FirBreakExpression, data: Nothing?) { @@ -96,55 +114,74 @@ abstract class AbstractDiagnosticCollector( this.type = type } visitWithDeclarationAndReceiver(klass, (klass as? FirRegularClass)?.name, typeRef) - } override fun visitRegularClass(regularClass: FirRegularClass, data: Nothing?) { - visitClassAndChildren(regularClass, regularClass.defaultType()) + withSuppressedDiagnostics(regularClass) { + visitClassAndChildren(regularClass, regularClass.defaultType()) + } } override fun visitAnonymousObject(anonymousObject: FirAnonymousObject, data: Nothing?) { - visitClassAndChildren(anonymousObject, anonymousObject.defaultType()) + withSuppressedDiagnostics(anonymousObject) { + visitClassAndChildren(anonymousObject, anonymousObject.defaultType()) + } } override fun visitSimpleFunction(simpleFunction: FirSimpleFunction, data: Nothing?) { - visitWithDeclarationAndReceiver(simpleFunction, simpleFunction.name, simpleFunction.receiverTypeRef) + withSuppressedDiagnostics(simpleFunction) { + visitWithDeclarationAndReceiver(simpleFunction, simpleFunction.name, simpleFunction.receiverTypeRef) + } } override fun visitConstructor(constructor: FirConstructor, data: Nothing?) { - visitWithDeclaration(constructor) + withSuppressedDiagnostics(constructor) { + visitWithDeclaration(constructor) + } } override fun visitAnonymousFunction(anonymousFunction: FirAnonymousFunction, data: Nothing?) { - val labelName = anonymousFunction.label?.name?.let { Name.identifier(it) } - visitWithDeclarationAndReceiver( - anonymousFunction, - labelName, - anonymousFunction.receiverTypeRef - ) + withSuppressedDiagnostics(anonymousFunction) { + val labelName = anonymousFunction.label?.name?.let { Name.identifier(it) } + visitWithDeclarationAndReceiver( + anonymousFunction, + labelName, + anonymousFunction.receiverTypeRef + ) + } } override fun visitProperty(property: FirProperty, data: Nothing?) { - visitWithDeclaration(property) + withSuppressedDiagnostics(property) { + visitWithDeclaration(property) + } } override fun visitPropertyAccessor(propertyAccessor: FirPropertyAccessor, data: Nothing?) { if (propertyAccessor !is FirDefaultPropertyAccessor) { val property = context.containingDeclarations.last() as FirProperty - visitWithDeclarationAndReceiver(propertyAccessor, property.name, property.receiverTypeRef) + withSuppressedDiagnostics(propertyAccessor) { + visitWithDeclarationAndReceiver(propertyAccessor, property.name, property.receiverTypeRef) + } } } override fun visitValueParameter(valueParameter: FirValueParameter, data: Nothing?) { - visitWithDeclaration(valueParameter) + withSuppressedDiagnostics(valueParameter) { + visitWithDeclaration(valueParameter) + } } override fun visitEnumEntry(enumEntry: FirEnumEntry, data: Nothing?) { - visitWithDeclaration(enumEntry) + withSuppressedDiagnostics(enumEntry) { + visitWithDeclaration(enumEntry) + } } override fun visitFile(file: FirFile, data: Nothing?) { - visitWithDeclaration(file) + withSuppressedDiagnostics(file) { + visitWithDeclaration(file) + } } override fun visitAnonymousInitializer(anonymousInitializer: FirAnonymousInitializer, data: Nothing?) { @@ -152,12 +189,17 @@ abstract class AbstractDiagnosticCollector( } override fun visitBlock(block: FirBlock, data: Nothing?) { - visitExpression(block, data) + withSuppressedDiagnostics(block) { + visitExpression(block, data) + } } override fun visitTypeRef(typeRef: FirTypeRef, data: Nothing?) { if (typeRef.source != null && typeRef.source?.kind !is FirFakeSourceElementKind) { - super.visitTypeRef(typeRef, null) + withSuppressedDiagnostics(typeRef) { + typeRef.runComponents() + typeRef.acceptChildren(this, data) + } } } @@ -233,6 +275,35 @@ abstract class AbstractDiagnosticCollector( } } + private inline fun withSuppressedDiagnostics(annotationContainer: FirAnnotationContainer, block: () -> R): R { + val existingContext = context + addSuppressedDiagnosticsToContext(annotationContainer) + return try { + block() + } finally { + context = existingContext + } + } + + private fun addSuppressedDiagnosticsToContext(annotationContainer: FirAnnotationContainer) { + val annotations = annotationContainer.annotations.filter { + val type = it.annotationTypeRef.coneType as? ConeClassLikeType ?: return@filter false + type.lookupTag.classId == StandardClassIds.Suppress + } + if (annotations.isEmpty()) return + val arguments = annotations.flatMap { annotationCall -> + annotationCall.arguments.filterIsInstance().flatMap { varargArgument -> + varargArgument.arguments.mapNotNull { (it as? FirConstExpression<*>)?.value as? String? } + } + } + context = context.addSuppressedDiagnostics( + arguments, + allInfosSuppressed = SUPPRESS_ALL_INFOS in arguments, + allWarningsSuppressed = SUPPRESS_ALL_WARNINGS in arguments, + allErrorsSuppressed = SUPPRESS_ALL_ERRORS in arguments + ) + } + private inline fun withDiagnosticsAction(action: DiagnosticCollectorDeclarationAction, block: () -> R): R { val oldAction = currentAction currentAction = action diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/collectors/SimpleDiagnosticsCollector.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/collectors/SimpleDiagnosticsCollector.kt index 0f5e62de345..d71e63942ba 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/collectors/SimpleDiagnosticsCollector.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/collectors/SimpleDiagnosticsCollector.kt @@ -7,14 +7,24 @@ package org.jetbrains.kotlin.fir.analysis.collectors import org.jetbrains.kotlin.fir.FirSession import org.jetbrains.kotlin.fir.analysis.diagnostics.FirDiagnostic -import org.jetbrains.kotlin.fir.analysis.diagnostics.SimpleDiagnosticReporter +import org.jetbrains.kotlin.fir.analysis.diagnostics.impl.BaseDiagnosticReporter +import org.jetbrains.kotlin.fir.analysis.diagnostics.impl.DiagnosticReporterWithSuppress +import org.jetbrains.kotlin.fir.analysis.diagnostics.impl.SimpleDiagnosticReporter -class SimpleDiagnosticsCollector(session: FirSession) : AbstractDiagnosticCollector(session) { - override var reporter = SimpleDiagnosticReporter() +class SimpleDiagnosticsCollector(session: FirSession, private val disableSuppress: Boolean = false) : AbstractDiagnosticCollector(session) { + override var reporter = createDiagnosticReporter() private set + private fun createDiagnosticReporter(): BaseDiagnosticReporter { + return if (disableSuppress) { + SimpleDiagnosticReporter() + } else { + DiagnosticReporterWithSuppress() + } + } + override fun initializeCollector() { - reporter = SimpleDiagnosticReporter() + reporter = createDiagnosticReporter() } override fun getCollectedDiagnostics(): List> { diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/collectors/components/DeclarationCheckersDiagnosticComponent.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/collectors/components/DeclarationCheckersDiagnosticComponent.kt index a89ec402aa4..68d8ef88dee 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/collectors/components/DeclarationCheckersDiagnosticComponent.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/collectors/components/DeclarationCheckersDiagnosticComponent.kt @@ -25,6 +25,10 @@ class DeclarationCheckersDiagnosticComponent( (checkers.memberDeclarationCheckers + checkers.propertyCheckers).check(property, data, reporter) } + override fun > visitClass(klass: FirClass, data: CheckerContext) { + checkers.classCheckers.check(klass, data, reporter) + } + override fun visitRegularClass(regularClass: FirRegularClass, data: CheckerContext) { checkers.regularClassCheckers.check(regularClass, data, reporter) } @@ -62,7 +66,7 @@ class DeclarationCheckersDiagnosticComponent( } override fun visitAnonymousObject(anonymousObject: FirAnonymousObject, data: CheckerContext) { - checkers.basicDeclarationCheckers.check(anonymousObject, data, reporter) + (checkers.classCheckers + checkers.basicDeclarationCheckers).check(anonymousObject, data, reporter) } override fun visitAnonymousInitializer(anonymousInitializer: FirAnonymousInitializer, data: CheckerContext) { diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/collectors/components/ErrorNodeDiagnosticCollectorComponent.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/collectors/components/ErrorNodeDiagnosticCollectorComponent.kt index 6a2e10ea473..67af299d2ff 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/collectors/components/ErrorNodeDiagnosticCollectorComponent.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/collectors/components/ErrorNodeDiagnosticCollectorComponent.kt @@ -10,7 +10,10 @@ import org.jetbrains.kotlin.fir.FirFakeSourceElementKind import org.jetbrains.kotlin.fir.FirSourceElement import org.jetbrains.kotlin.fir.analysis.checkers.context.CheckerContext import org.jetbrains.kotlin.fir.analysis.collectors.AbstractDiagnosticCollector -import org.jetbrains.kotlin.fir.analysis.diagnostics.* +import org.jetbrains.kotlin.fir.analysis.diagnostics.DiagnosticReporter +import org.jetbrains.kotlin.fir.analysis.diagnostics.FirDiagnostic +import org.jetbrains.kotlin.fir.analysis.diagnostics.FirDiagnosticFactory0 +import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors import org.jetbrains.kotlin.fir.declarations.FirErrorFunction import org.jetbrains.kotlin.fir.diagnostics.* import org.jetbrains.kotlin.fir.diagnostics.DiagnosticKind.* @@ -27,37 +30,42 @@ import org.jetbrains.kotlin.utils.addToStdlib.safeAs class ErrorNodeDiagnosticCollectorComponent(collector: AbstractDiagnosticCollector) : AbstractDiagnosticCollectorComponent(collector) { override fun visitErrorLoop(errorLoop: FirErrorLoop, data: CheckerContext) { val source = errorLoop.source ?: return - reportFirDiagnostic(errorLoop.diagnostic, source, reporter) + reportFirDiagnostic(errorLoop.diagnostic, source, reporter, data) } override fun visitErrorTypeRef(errorTypeRef: FirErrorTypeRef, data: CheckerContext) { val source = errorTypeRef.source ?: return - reportFirDiagnostic(errorTypeRef.diagnostic, source, reporter) + reportFirDiagnostic(errorTypeRef.diagnostic, source, reporter, data) } override fun visitErrorNamedReference(errorNamedReference: FirErrorNamedReference, data: CheckerContext) { val source = errorNamedReference.source ?: return // Don't report duplicated unresolved reference on annotation entry (already reported on its type) if (source.elementType == KtNodeTypes.ANNOTATION_ENTRY && errorNamedReference.diagnostic is ConeUnresolvedNameError) return - reportFirDiagnostic(errorNamedReference.diagnostic, source, reporter) + reportFirDiagnostic(errorNamedReference.diagnostic, source, reporter, data) } override fun visitErrorExpression(errorExpression: FirErrorExpression, data: CheckerContext) { val source = errorExpression.source ?: return - reportFirDiagnostic(errorExpression.diagnostic, source, reporter) + reportFirDiagnostic(errorExpression.diagnostic, source, reporter, data) } override fun visitErrorFunction(errorFunction: FirErrorFunction, data: CheckerContext) { val source = errorFunction.source ?: return - reportFirDiagnostic(errorFunction.diagnostic, source, reporter) + reportFirDiagnostic(errorFunction.diagnostic, source, reporter, data) } override fun visitErrorResolvedQualifier(errorResolvedQualifier: FirErrorResolvedQualifier, data: CheckerContext) { val source = errorResolvedQualifier.source ?: return - reportFirDiagnostic(errorResolvedQualifier.diagnostic, source, reporter) + reportFirDiagnostic(errorResolvedQualifier.diagnostic, source, reporter, data) } - private fun reportFirDiagnostic(diagnostic: ConeDiagnostic, source: FirSourceElement, reporter: DiagnosticReporter) { + private fun reportFirDiagnostic( + diagnostic: ConeDiagnostic, + source: FirSourceElement, + reporter: DiagnosticReporter, + context: CheckerContext + ) { // Will be handled by [FirDestructuringDeclarationChecker] if (source.elementType == KtNodeTypes.DESTRUCTURING_DECLARATION_ENTRY) { // TODO: if all diagnostics are supported, we don't need the following check, and will bail out based on element type. @@ -97,7 +105,7 @@ class ErrorNodeDiagnosticCollectorComponent(collector: AbstractDiagnosticCollect is ConeIntermediateDiagnostic -> null else -> throw IllegalArgumentException("Unsupported diagnostic type: ${diagnostic.javaClass}") } - reporter.report(coneDiagnostic) + reporter.report(coneDiagnostic, context) } private fun ConeKotlinType.isEffectivelyNotNull(): Boolean { diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/collectors/components/ExpressionCheckersDiagnosticComponent.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/collectors/components/ExpressionCheckersDiagnosticComponent.kt index 8f737d23862..ba5376b9c2a 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/collectors/components/ExpressionCheckersDiagnosticComponent.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/collectors/components/ExpressionCheckersDiagnosticComponent.kt @@ -73,7 +73,7 @@ class ExpressionCheckersDiagnosticComponent(collector: AbstractDiagnosticCollect } override fun visitTryExpression(tryExpression: FirTryExpression, data: CheckerContext) { - checkers.basicExpressionCheckers.check(tryExpression, data, reporter) + checkers.tryExpressionCheckers.check(tryExpression, data, reporter) } override fun visitClassReferenceExpression(classReferenceExpression: FirClassReferenceExpression, data: CheckerContext) { diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/diagnostics/DiagnosticReporter.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/diagnostics/DiagnosticReporter.kt index 1fd260cf5f0..f52c0b4b5a0 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/diagnostics/DiagnosticReporter.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/diagnostics/DiagnosticReporter.kt @@ -5,15 +5,49 @@ package org.jetbrains.kotlin.fir.analysis.diagnostics +import com.intellij.psi.PsiElement +import org.jetbrains.kotlin.fir.FirSourceElement +import org.jetbrains.kotlin.fir.analysis.checkers.context.CheckerContext + abstract class DiagnosticReporter { - abstract fun report(diagnostic: FirDiagnostic<*>?) + abstract fun report(diagnostic: FirDiagnostic<*>?, context: CheckerContext) } -class SimpleDiagnosticReporter : DiagnosticReporter() { - val diagnostics: MutableList> = mutableListOf() +inline fun DiagnosticReporter.reportOn( + source: T?, + factory: FirDiagnosticFactory0, + context: CheckerContext +) { + source?.let { report(factory.on(it), context) } +} + +inline fun DiagnosticReporter.reportOn( + source: T?, + factory: FirDiagnosticFactory1, + a: A, + context: CheckerContext +) { + source?.let { report(factory.on(it, a), context) } +} + +inline fun DiagnosticReporter.reportOn( + source: T?, + factory: FirDiagnosticFactory2, + a: A, + b: B, + context: CheckerContext +) { + source?.let { report(factory.on(it, a, b), context) } +} + +inline fun DiagnosticReporter.reportOn( + source: T?, + factory: FirDiagnosticFactory3, + a: A, + b: B, + c: C, + context: CheckerContext +) { + source?.let { report(factory.on(it, a, b, c), context) } +} - override fun report(diagnostic: FirDiagnostic<*>?) { - if (diagnostic == null) return - diagnostics += diagnostic - } -} \ No newline at end of file diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/diagnostics/FirDefaultErrorMessages.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/diagnostics/FirDefaultErrorMessages.kt index 4da06ddfe13..d62a2cd707d 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/diagnostics/FirDefaultErrorMessages.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/diagnostics/FirDefaultErrorMessages.kt @@ -9,12 +9,15 @@ import org.jetbrains.kotlin.diagnostics.rendering.DefaultErrorMessages import org.jetbrains.kotlin.diagnostics.rendering.DiagnosticFactoryToRendererMap import org.jetbrains.kotlin.fir.analysis.diagnostics.FirDiagnosticRenderers.AMBIGUOUS_CALLS import org.jetbrains.kotlin.fir.analysis.diagnostics.FirDiagnosticRenderers.DECLARATION_NAME +import org.jetbrains.kotlin.fir.analysis.diagnostics.FirDiagnosticRenderers.FQ_NAMES_IN_TYPES +import org.jetbrains.kotlin.fir.analysis.diagnostics.FirDiagnosticRenderers.NAME import org.jetbrains.kotlin.fir.analysis.diagnostics.FirDiagnosticRenderers.NULLABLE_STRING import org.jetbrains.kotlin.fir.analysis.diagnostics.FirDiagnosticRenderers.PROPERTY_NAME import org.jetbrains.kotlin.fir.analysis.diagnostics.FirDiagnosticRenderers.RENDER_TYPE import org.jetbrains.kotlin.fir.analysis.diagnostics.FirDiagnosticRenderers.SYMBOL import org.jetbrains.kotlin.fir.analysis.diagnostics.FirDiagnosticRenderers.SYMBOLS import org.jetbrains.kotlin.fir.analysis.diagnostics.FirDiagnosticRenderers.TO_STRING +import org.jetbrains.kotlin.fir.analysis.diagnostics.FirDiagnosticRenderers.VISIBILITY import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.ABSTRACT_DELEGATED_PROPERTY import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.ABSTRACT_FUNCTION_IN_NON_ABSTRACT_CLASS import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.ABSTRACT_FUNCTION_WITH_BODY @@ -32,8 +35,11 @@ import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.ARRAY_EQUALITY_OP import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.ASSIGNED_VALUE_IS_NEVER_READ import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.ASSIGN_OPERATOR_AMBIGUITY import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.BREAK_OR_CONTINUE_OUTSIDE_A_LOOP +import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.CANNOT_CHANGE_ACCESS_PRIVILEGE +import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.CANNOT_WEAKEN_ACCESS_PRIVILEGE import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.CAN_BE_REPLACED_WITH_OPERATOR_ASSIGNMENT import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.CAN_BE_VAL +import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.CATCH_PARAMETER_WITH_DEFAULT_VALUE import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.CLASS_IN_SUPERTYPE_FOR_ENUM import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.COMPONENT_FUNCTION_AMBIGUITY import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.COMPONENT_FUNCTION_MISSING @@ -65,6 +71,7 @@ import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.EXPOSED_SUPER_INT import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.EXPOSED_TYPEALIAS_EXPANDED_TYPE import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.EXPOSED_TYPE_PARAMETER_BOUND import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.FUNCTION_DECLARATION_WITH_NO_NAME +import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.GENERIC_THROWABLE_SUBCLASS import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.HIDDEN import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.ILLEGAL_CONST_EXPRESSION import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.ILLEGAL_UNDERSCORE @@ -74,6 +81,7 @@ import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.INAPPLICABLE_LATE import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.INCOMPATIBLE_MODIFIERS import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.INFERENCE_ERROR import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.INITIALIZER_REQUIRED_FOR_DESTRUCTURING_DECLARATION +import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.INNER_CLASS_OF_GENERIC_THROWABLE_SUBCLASS import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.INSTANCE_ACCESS_BEFORE_SUPER_CALL import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.INTERFACE_WITH_SUPERCLASS import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.INVALID_TYPE_OF_ANNOTATION_MEMBER @@ -88,6 +96,7 @@ import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.NON_ABSTRACT_FUNC import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.NON_MEMBER_FUNCTION_NO_BODY import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.NON_PRIVATE_CONSTRUCTOR_IN_ENUM import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.NON_PRIVATE_CONSTRUCTOR_IN_SEALED +import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.NOTHING_TO_OVERRIDE import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.NOT_AN_ANNOTATION_CLASS import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.NOT_A_LOOP_LABEL import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.NOT_A_SUPERTYPE @@ -95,6 +104,7 @@ import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.NO_THIS import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.NO_TYPE_FOR_TYPE_PARAMETER import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.NULLABLE_TYPE_OF_ANNOTATION_MEMBER import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.OTHER_ERROR +import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.OVERRIDING_FINAL_MEMBER import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.PRIMARY_CONSTRUCTOR_DELEGATION_CALL_EXPECTED import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.PRIMARY_CONSTRUCTOR_REQUIRED_FOR_DATA_CLASS import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.PRIVATE_FUNCTION_WITH_NO_BODY @@ -118,6 +128,7 @@ import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.REDUNDANT_RETURN_ import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.REDUNDANT_SETTER_PARAMETER_TYPE import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.REDUNDANT_SINGLE_EXPRESSION_STRING_TEMPLATE import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.REDUNDANT_VISIBILITY_MODIFIER +import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.REIFIED_TYPE_IN_CATCH_CLAUSE import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.REPEATED_MODIFIER import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.RETURN_NOT_ALLOWED import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.RETURN_TYPE_MISMATCH_ON_OVERRIDE @@ -135,6 +146,7 @@ import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.TYPE_MISMATCH import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.TYPE_PARAMETERS_IN_ENUM import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.TYPE_PARAMETERS_IN_OBJECT import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.TYPE_PARAMETER_AS_SUPERTYPE +import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.TYPE_PARAMETER_IN_CATCH_CLAUSE import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.UNINITIALIZED_VARIABLE import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.UNRESOLVED_LABEL import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.UNRESOLVED_REFERENCE @@ -147,6 +159,7 @@ import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.VARIABLE_INITIALI import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.VARIABLE_NEVER_READ import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.VARIANCE_ON_TYPE_PARAMETER_NOT_ALLOWED import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.VAR_ANNOTATION_PARAMETER +import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.VAR_OVERRIDDEN_BY_VAL import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.VAR_TYPE_MISMATCH_ON_OVERRIDE import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.WRONG_INVOCATION_KIND import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.WRONG_NUMBER_OF_TYPE_ARGUMENTS @@ -277,7 +290,7 @@ class FirDefaultErrorMessages : DefaultErrorMessages.Extension { ) // Modifiers - map.put(INAPPLICABLE_INFIX_MODIFIER, "''infix'' modifier is inapplicable on this function: {0}", TO_STRING) + map.put(INAPPLICABLE_INFIX_MODIFIER, "''infix'' modifier is inapplicable on this function") map.put(REPEATED_MODIFIER, "Repeated ''{0}''", TO_STRING) map.put(REDUNDANT_MODIFIER, "Modifier ''{0}'' is redundant because ''{1}'' is present", TO_STRING, TO_STRING) map.put(DEPRECATED_MODIFIER_PAIR, "Modifier ''{0}'' is deprecated in presence of ''{1}''", TO_STRING, TO_STRING) @@ -319,24 +332,62 @@ class FirDefaultErrorMessages : DefaultErrorMessages.Extension { VARIANCE_ON_TYPE_PARAMETER_NOT_ALLOWED, "Variance annotations are only allowed for type parameters of classes and interfaces" ) + map.put(CATCH_PARAMETER_WITH_DEFAULT_VALUE, "Catch clause parameter may not have a default value") + map.put(REIFIED_TYPE_IN_CATCH_CLAUSE, "Reified type is forbidden for catch parameter") + map.put(TYPE_PARAMETER_IN_CATCH_CLAUSE, "Type parameter is forbidden for catch parameter") + + // Overrides + map.put(NOTHING_TO_OVERRIDE, "''{0}'' overrides nothing", DECLARATION_NAME) + map.put(OVERRIDING_FINAL_MEMBER, "''{0}'' in ''{1}'' is final and cannot be overridden", NAME, TO_STRING) + + map.put( + CANNOT_WEAKEN_ACCESS_PRIVILEGE, + "Cannot weaken access privilege ''{0}'' for ''{1}'' in ''{2}''", + VISIBILITY, + NAME, + TO_STRING + ) + map.put( + CANNOT_CHANGE_ACCESS_PRIVILEGE, + "Cannot change access privilege ''{0}'' for ''{1}'' in ''{2}''", + VISIBILITY, + NAME, + TO_STRING + ) + map.put( RETURN_TYPE_MISMATCH_ON_OVERRIDE, "Return type of ''{0}'' is not a subtype of the return type of the overridden member ''{1}''", - TO_STRING, - DECLARATION_NAME - ) // # + DECLARATION_NAME, + FQ_NAMES_IN_TYPES + ) map.put( PROPERTY_TYPE_MISMATCH_ON_OVERRIDE, "Type of ''{0}'' is not a subtype of the overridden property ''{1}''", - TO_STRING, - DECLARATION_NAME - ) // # + DECLARATION_NAME, + FQ_NAMES_IN_TYPES + ) map.put( VAR_TYPE_MISMATCH_ON_OVERRIDE, "Type of ''{0}'' doesn''t match the type of the overridden var-property ''{1}''", - TO_STRING, - DECLARATION_NAME - ) // # + DECLARATION_NAME, + FQ_NAMES_IN_TYPES + ) + + map.put( + VAR_OVERRIDDEN_BY_VAL, + "Var-property {0} cannot be overridden by val-property {1}", + FQ_NAMES_IN_TYPES, + FQ_NAMES_IN_TYPES + ) + map.put( + GENERIC_THROWABLE_SUBCLASS, + "Subclass of 'Throwable' may not have type parameters" + ) + map.put( + INNER_CLASS_OF_GENERIC_THROWABLE_SUBCLASS, + "Inner class of generic class extending 'Throwable' is prohibited" + ) // Redeclarations map.put(MANY_COMPANION_OBJECTS, "Only one companion object is allowed per class") diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/diagnostics/FirDiagnosticRenderers.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/diagnostics/FirDiagnosticRenderers.kt index 483a5c42c7e..3e35205c1a9 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/diagnostics/FirDiagnosticRenderers.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/diagnostics/FirDiagnosticRenderers.kt @@ -5,10 +5,13 @@ package org.jetbrains.kotlin.fir.analysis.diagnostics +import org.jetbrains.kotlin.descriptors.Visibility import org.jetbrains.kotlin.diagnostics.rendering.Renderer import org.jetbrains.kotlin.fir.FirElement +import org.jetbrains.kotlin.fir.FirRenderer import org.jetbrains.kotlin.fir.declarations.* import org.jetbrains.kotlin.fir.render +import org.jetbrains.kotlin.fir.renderWithType import org.jetbrains.kotlin.fir.symbols.AbstractFirBasedSymbol import org.jetbrains.kotlin.fir.symbols.impl.FirCallableSymbol import org.jetbrains.kotlin.fir.symbols.impl.FirClassLikeSymbol @@ -45,6 +48,18 @@ object FirDiagnosticRenderers { element.render() } + val NAME = Renderer { element: FirElement -> + when (element) { + is FirMemberDeclaration -> DECLARATION_NAME.render(element) + is FirCallableDeclaration<*> -> element.symbol.callableId.callableName.asString() + else -> "???" + } + } + + val VISIBILITY = Renderer { visibility: Visibility -> + visibility.externalDisplayName + } + val DECLARATION_NAME = Renderer { declaration: FirMemberDeclaration -> val name = when (declaration) { is FirProperty -> declaration.name @@ -64,6 +79,10 @@ object FirDiagnosticRenderers { t.render() } + val FQ_NAMES_IN_TYPES = Renderer { element: FirElement -> + element.renderWithType(mode = FirRenderer.RenderMode.WithFqNamesExceptAnnotation) + } + val AMBIGUOUS_CALLS = Renderer { candidates: Collection> -> candidates.joinToString(separator = "\n", prefix = "\n") { symbol -> SYMBOL.render(symbol) diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/diagnostics/FirErrors.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/diagnostics/FirErrors.kt index 83ee92ce381..0ac8ab7e8c9 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/diagnostics/FirErrors.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/diagnostics/FirErrors.kt @@ -8,20 +8,20 @@ package org.jetbrains.kotlin.fir.analysis.diagnostics import com.intellij.psi.PsiElement import com.intellij.psi.PsiTypeElement import org.jetbrains.kotlin.contracts.description.EventOccurrencesRange +import org.jetbrains.kotlin.descriptors.Visibility import org.jetbrains.kotlin.fir.FirEffectiveVisibility import org.jetbrains.kotlin.fir.FirSourceElement +import org.jetbrains.kotlin.fir.declarations.FirCallableDeclaration import org.jetbrains.kotlin.fir.declarations.FirClass import org.jetbrains.kotlin.fir.declarations.FirMemberDeclaration -import org.jetbrains.kotlin.fir.expressions.FirExpression -import org.jetbrains.kotlin.fir.expressions.FirStatement import org.jetbrains.kotlin.fir.symbols.AbstractFirBasedSymbol -import org.jetbrains.kotlin.fir.symbols.impl.* +import org.jetbrains.kotlin.fir.symbols.impl.FirClassLikeSymbol +import org.jetbrains.kotlin.fir.symbols.impl.FirPropertySymbol +import org.jetbrains.kotlin.fir.symbols.impl.FirTypeParameterSymbol import org.jetbrains.kotlin.fir.types.ConeKotlinType -import org.jetbrains.kotlin.fir.types.FirTypeRef import org.jetbrains.kotlin.lexer.KtModifierKeywordToken import org.jetbrains.kotlin.name.Name import org.jetbrains.kotlin.psi.* -import org.jetbrains.kotlin.types.KotlinType object FirErrors { // Miscellaneous @@ -106,12 +106,12 @@ object FirErrors { val EXPOSED_TYPE_PARAMETER_BOUND by error3() // Modifiers - val INAPPLICABLE_INFIX_MODIFIER by existing1() + val INAPPLICABLE_INFIX_MODIFIER by error0() val REPEATED_MODIFIER by error1() val REDUNDANT_MODIFIER by error2() val DEPRECATED_MODIFIER_PAIR by error2() val INCOMPATIBLE_MODIFIERS by error2() - val REDUNDANT_OPEN_IN_INTERFACE by warning0(SourceElementPositioningStrategies.MODALITY_MODIFIER) + val REDUNDANT_OPEN_IN_INTERFACE by warning0(SourceElementPositioningStrategies.OPEN_MODIFIER) // Applicability val NONE_APPLICABLE by error1>>() @@ -135,10 +135,25 @@ object FirErrors { val ILLEGAL_PROJECTION_USAGE by error0() val TYPE_PARAMETERS_IN_ENUM by error0() val CONFLICTING_PROJECTION by error1() - val VARIANCE_ON_TYPE_PARAMETER_NOT_ALLOWED by error0() - val RETURN_TYPE_MISMATCH_ON_OVERRIDE by error2() - val PROPERTY_TYPE_MISMATCH_ON_OVERRIDE by error2() - val VAR_TYPE_MISMATCH_ON_OVERRIDE by error2() + val VARIANCE_ON_TYPE_PARAMETER_NOT_ALLOWED by error0(SourceElementPositioningStrategies.VARIANCE_MODIFIER) + val CATCH_PARAMETER_WITH_DEFAULT_VALUE by error0() + val REIFIED_TYPE_IN_CATCH_CLAUSE by error0() + val TYPE_PARAMETER_IN_CATCH_CLAUSE by error0() + val GENERIC_THROWABLE_SUBCLASS by error0() + val INNER_CLASS_OF_GENERIC_THROWABLE_SUBCLASS by error0(SourceElementPositioningStrategies.DECLARATION_NAME) + + // Overrides + val NOTHING_TO_OVERRIDE by error1(SourceElementPositioningStrategies.OVERRIDE_MODIFIER) + val OVERRIDING_FINAL_MEMBER by error2, Name>(SourceElementPositioningStrategies.OVERRIDE_MODIFIER) + + val CANNOT_WEAKEN_ACCESS_PRIVILEGE by error3, Name>(SourceElementPositioningStrategies.VISIBILITY_MODIFIER) + val CANNOT_CHANGE_ACCESS_PRIVILEGE by error3, Name>(SourceElementPositioningStrategies.VISIBILITY_MODIFIER) + + val RETURN_TYPE_MISMATCH_ON_OVERRIDE by error2(SourceElementPositioningStrategies.DECLARATION_RETURN_TYPE) + val PROPERTY_TYPE_MISMATCH_ON_OVERRIDE by error2(SourceElementPositioningStrategies.DECLARATION_RETURN_TYPE) + val VAR_TYPE_MISMATCH_ON_OVERRIDE by error2(SourceElementPositioningStrategies.DECLARATION_RETURN_TYPE) + + val VAR_OVERRIDDEN_BY_VAL by error2(SourceElementPositioningStrategies.VAL_OR_VAR_NODE) // Redeclarations val MANY_COMPANION_OBJECTS by error0() @@ -151,10 +166,10 @@ object FirErrors { val LOCAL_INTERFACE_NOT_ALLOWED by error1(SourceElementPositioningStrategies.DECLARATION_NAME) // Functions - val ABSTRACT_FUNCTION_IN_NON_ABSTRACT_CLASS by error2(SourceElementPositioningStrategies.MODALITY_MODIFIER) - val ABSTRACT_FUNCTION_WITH_BODY by error1(SourceElementPositioningStrategies.MODALITY_MODIFIER) + val ABSTRACT_FUNCTION_IN_NON_ABSTRACT_CLASS by error2(SourceElementPositioningStrategies.ABSTRACT_MODIFIER) + val ABSTRACT_FUNCTION_WITH_BODY by error1(SourceElementPositioningStrategies.ABSTRACT_MODIFIER) val NON_ABSTRACT_FUNCTION_WITH_NO_BODY by error1(SourceElementPositioningStrategies.DECLARATION_SIGNATURE) - val PRIVATE_FUNCTION_WITH_NO_BODY by error1(SourceElementPositioningStrategies.VISIBILITY_MODIFIER) + val PRIVATE_FUNCTION_WITH_NO_BODY by error1(SourceElementPositioningStrategies.PRIVATE_MODIFIER) val NON_MEMBER_FUNCTION_NO_BODY by error1(SourceElementPositioningStrategies.DECLARATION_SIGNATURE) val FUNCTION_DECLARATION_WITH_NO_NAME by error0(SourceElementPositioningStrategies.DECLARATION_SIGNATURE) @@ -164,8 +179,8 @@ object FirErrors { val USELESS_VARARG_ON_PARAMETER by warning0() // Properties & accessors - val ABSTRACT_PROPERTY_IN_NON_ABSTRACT_CLASS by error2(SourceElementPositioningStrategies.MODALITY_MODIFIER) - val PRIVATE_PROPERTY_IN_INTERFACE by error0(SourceElementPositioningStrategies.VISIBILITY_MODIFIER) + val ABSTRACT_PROPERTY_IN_NON_ABSTRACT_CLASS by error2(SourceElementPositioningStrategies.ABSTRACT_MODIFIER) + val PRIVATE_PROPERTY_IN_INTERFACE by error0(SourceElementPositioningStrategies.PRIVATE_MODIFIER) val ABSTRACT_PROPERTY_WITH_INITIALIZER by error0() // TODO: val MUST_BE_INITIALIZED by error0(SourceElementPositioningStrategies.DECLARATION_SIGNATURE) diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/diagnostics/LightTreePositioningStrategies.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/diagnostics/LightTreePositioningStrategies.kt index 676434586c3..dd80267b25a 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/diagnostics/LightTreePositioningStrategies.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/diagnostics/LightTreePositioningStrategies.kt @@ -91,6 +91,31 @@ object LightTreePositioningStrategies { } } + val DECLARATION_RETURN_TYPE: LightTreePositioningStrategy = object : LightTreePositioningStrategy() { + override fun mark( + node: LighterASTNode, + startOffset: Int, + endOffset: Int, + tree: FlyweightCapableTreeStructure + ): List { + val (returnTypeRef, nameIdentifierOrPlaceHolder) = when { + node.tokenType == KtNodeTypes.PROPERTY_ACCESSOR -> + tree.typeReference(node) to tree.accessorNamePlaceholder(node) + node.isDeclaration -> + tree.typeReference(node) to tree.nameIdentifier(node) + else -> + null to null + } + if (returnTypeRef != null) { + return markElement(returnTypeRef, startOffset, endOffset, tree, node) + } + if (nameIdentifierOrPlaceHolder != null) { + return markElement(nameIdentifierOrPlaceHolder, startOffset, endOffset, tree, node) + } + return DEFAULT.mark(node, startOffset, endOffset, tree) + } + } + val DECLARATION_NAME: LightTreePositioningStrategy = object : LightTreePositioningStrategy() { override fun mark( node: LighterASTNode, @@ -188,23 +213,23 @@ object LightTreePositioningStrategies { } else { DEFAULT.mark(node, startOffset, endOffset, tree) } - - private val LighterASTNode.isDeclaration: Boolean - get() = - when (tokenType) { - KtNodeTypes.PRIMARY_CONSTRUCTOR, KtNodeTypes.SECONDARY_CONSTRUCTOR, - KtNodeTypes.FUN, KtNodeTypes.FUNCTION_LITERAL, - KtNodeTypes.PROPERTY, - KtNodeTypes.PROPERTY_ACCESSOR, - KtNodeTypes.CLASS, - KtNodeTypes.OBJECT_DECLARATION, - KtNodeTypes.CLASS_INITIALIZER -> - true - else -> - false - } } + private val LighterASTNode.isDeclaration: Boolean + get() = + when (tokenType) { + KtNodeTypes.PRIMARY_CONSTRUCTOR, KtNodeTypes.SECONDARY_CONSTRUCTOR, + KtNodeTypes.FUN, KtNodeTypes.FUNCTION_LITERAL, + KtNodeTypes.PROPERTY, + KtNodeTypes.PROPERTY_ACCESSOR, + KtNodeTypes.CLASS, + KtNodeTypes.OBJECT_DECLARATION, + KtNodeTypes.CLASS_INITIALIZER -> + true + else -> + false + } + private class ModifierSetBasedLightTreePositioningStrategy(private val modifierSet: TokenSet) : LightTreePositioningStrategy() { override fun mark( node: LighterASTNode, @@ -237,6 +262,24 @@ object LightTreePositioningStrategies { val MODALITY_MODIFIER: LightTreePositioningStrategy = ModifierSetBasedLightTreePositioningStrategy(MODALITY_MODIFIERS) + val ABSTRACT_MODIFIER: LightTreePositioningStrategy = + ModifierSetBasedLightTreePositioningStrategy(TokenSet.create(KtTokens.ABSTRACT_KEYWORD)) + + val OPEN_MODIFIER: LightTreePositioningStrategy = + ModifierSetBasedLightTreePositioningStrategy(TokenSet.create(KtTokens.OPEN_KEYWORD)) + + val OVERRIDE_MODIFIER: LightTreePositioningStrategy = + ModifierSetBasedLightTreePositioningStrategy(TokenSet.create(KtTokens.OVERRIDE_KEYWORD)) + + val PRIVATE_MODIFIER: LightTreePositioningStrategy = + ModifierSetBasedLightTreePositioningStrategy(TokenSet.create(KtTokens.PRIVATE_KEYWORD)) + + val LATEINIT_MODIFIER: LightTreePositioningStrategy = + ModifierSetBasedLightTreePositioningStrategy(TokenSet.create(KtTokens.LATEINIT_KEYWORD)) + + val VARIANCE_MODIFIER: LightTreePositioningStrategy = + ModifierSetBasedLightTreePositioningStrategy(TokenSet.create(KtTokens.IN_KEYWORD, KtTokens.OUT_KEYWORD)) + val OPERATOR: LightTreePositioningStrategy = object : LightTreePositioningStrategy() { override fun mark( node: LighterASTNode, diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/diagnostics/SourceElementPositioningStrategies.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/diagnostics/SourceElementPositioningStrategies.kt index 3ba463eeb9b..86c42f79947 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/diagnostics/SourceElementPositioningStrategies.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/diagnostics/SourceElementPositioningStrategies.kt @@ -23,6 +23,11 @@ object SourceElementPositioningStrategies { PositioningStrategies.SECONDARY_CONSTRUCTOR_DELEGATION_CALL ) + val DECLARATION_RETURN_TYPE = SourceElementPositioningStrategy( + LightTreePositioningStrategies.DECLARATION_RETURN_TYPE, + PositioningStrategies.DECLARATION_RETURN_TYPE + ) + val DECLARATION_NAME = SourceElementPositioningStrategy( LightTreePositioningStrategies.DECLARATION_NAME, PositioningStrategies.DECLARATION_NAME @@ -48,6 +53,36 @@ object SourceElementPositioningStrategies { PositioningStrategies.MODALITY_MODIFIER ) + val ABSTRACT_MODIFIER = SourceElementPositioningStrategy( + LightTreePositioningStrategies.ABSTRACT_MODIFIER, + PositioningStrategies.ABSTRACT_MODIFIER + ) + + val OPEN_MODIFIER = SourceElementPositioningStrategy( + LightTreePositioningStrategies.OPEN_MODIFIER, + PositioningStrategies.OPEN_MODIFIER + ) + + val OVERRIDE_MODIFIER = SourceElementPositioningStrategy( + LightTreePositioningStrategies.OVERRIDE_MODIFIER, + PositioningStrategies.OVERRIDE_MODIFIER + ) + + val PRIVATE_MODIFIER = SourceElementPositioningStrategy( + LightTreePositioningStrategies.PRIVATE_MODIFIER, + PositioningStrategies.PRIVATE_MODIFIER + ) + + val LATEINIT_MODIFIER = SourceElementPositioningStrategy( + LightTreePositioningStrategies.LATEINIT_MODIFIER, + PositioningStrategies.LATEINIT_MODIFIER + ) + + val VARIANCE_MODIFIER = SourceElementPositioningStrategy( + LightTreePositioningStrategies.VARIANCE_MODIFIER, + PositioningStrategies.VARIANCE_MODIFIER + ) + val OPERATOR = SourceElementPositioningStrategy( LightTreePositioningStrategies.OPERATOR, PositioningStrategies.OPERATOR diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/diagnostics/impl/BaseDiagnosticReporter.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/diagnostics/impl/BaseDiagnosticReporter.kt new file mode 100644 index 00000000000..63ceeb2da50 --- /dev/null +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/diagnostics/impl/BaseDiagnosticReporter.kt @@ -0,0 +1,13 @@ +/* + * Copyright 2010-2021 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. + */ + +package org.jetbrains.kotlin.fir.analysis.diagnostics.impl + +import org.jetbrains.kotlin.fir.analysis.diagnostics.DiagnosticReporter +import org.jetbrains.kotlin.fir.analysis.diagnostics.FirDiagnostic + +abstract class BaseDiagnosticReporter : DiagnosticReporter() { + abstract val diagnostics: List> +} diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/diagnostics/impl/DiagnosticReporterWithSuppress.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/diagnostics/impl/DiagnosticReporterWithSuppress.kt new file mode 100644 index 00000000000..fde5767a9b2 --- /dev/null +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/diagnostics/impl/DiagnosticReporterWithSuppress.kt @@ -0,0 +1,30 @@ +/* + * Copyright 2010-2021 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. + */ + +package org.jetbrains.kotlin.fir.analysis.diagnostics.impl + +import org.jetbrains.kotlin.diagnostics.Severity +import org.jetbrains.kotlin.fir.analysis.checkers.context.CheckerContext +import org.jetbrains.kotlin.fir.analysis.diagnostics.FirDiagnostic + +class DiagnosticReporterWithSuppress : BaseDiagnosticReporter() { + private val _diagnostics: MutableList> = mutableListOf() + override val diagnostics: List> + get() = _diagnostics + + override fun report(diagnostic: FirDiagnostic<*>?, context: CheckerContext) { + if (diagnostic == null) return + val factory = diagnostic.factory + val name = factory.name + val suppressedByAll = when (factory.severity) { + Severity.INFO -> context.allInfosSuppressed + Severity.WARNING -> context.allWarningsSuppressed + Severity.ERROR -> context.allErrorsSuppressed + } + + if (suppressedByAll || name in context.suppressedDiagnostics) return + _diagnostics += diagnostic + } +} diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/diagnostics/impl/SimpleDiagnosticReporter.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/diagnostics/impl/SimpleDiagnosticReporter.kt new file mode 100644 index 00000000000..eb7af3a7aa6 --- /dev/null +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/diagnostics/impl/SimpleDiagnosticReporter.kt @@ -0,0 +1,20 @@ +/* + * Copyright 2010-2021 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. + */ + +package org.jetbrains.kotlin.fir.analysis.diagnostics.impl + +import org.jetbrains.kotlin.fir.analysis.checkers.context.CheckerContext +import org.jetbrains.kotlin.fir.analysis.diagnostics.FirDiagnostic + +class SimpleDiagnosticReporter : BaseDiagnosticReporter() { + private val _diagnostics: MutableList> = mutableListOf() + override val diagnostics: List> + get() = _diagnostics + + override fun report(diagnostic: FirDiagnostic<*>?, context: CheckerContext) { + if (diagnostic == null) return + _diagnostics += diagnostic + } +} diff --git a/compiler/fir/cones/src/org/jetbrains/kotlin/fir/symbols/StandardClassIds.kt b/compiler/fir/cones/src/org/jetbrains/kotlin/fir/symbols/StandardClassIds.kt index bc5d111157c..3e6a7f66f4c 100644 --- a/compiler/fir/cones/src/org/jetbrains/kotlin/fir/symbols/StandardClassIds.kt +++ b/compiler/fir/cones/src/org/jetbrains/kotlin/fir/symbols/StandardClassIds.kt @@ -41,6 +41,7 @@ object StandardClassIds { val ULong = Long.unsignedId() val String = "String".baseId() + val Throwable = "Throwable".baseId() val KProperty = "KProperty".reflectId() val KMutableProperty = "KMutableProperty".reflectId() @@ -83,6 +84,8 @@ object StandardClassIds { fun FunctionN(n: Int): ClassId { return "Function$n".baseId() } + + val Suppress = "Suppress".baseId() } private fun Map.inverseMap() = entries.associate { (k, v) -> v to k } diff --git a/compiler/fir/entrypoint/src/org/jetbrains/kotlin/fir/checkers/CommonDeclarationCheckers.kt b/compiler/fir/entrypoint/src/org/jetbrains/kotlin/fir/checkers/CommonDeclarationCheckers.kt index e02afe01990..d2ea9f0135d 100644 --- a/compiler/fir/entrypoint/src/org/jetbrains/kotlin/fir/checkers/CommonDeclarationCheckers.kt +++ b/compiler/fir/entrypoint/src/org/jetbrains/kotlin/fir/checkers/CommonDeclarationCheckers.kt @@ -35,6 +35,10 @@ object CommonDeclarationCheckers : DeclarationCheckers() { FirDestructuringDeclarationChecker, ) + override val classCheckers: Set = setOf( + FirThrowableSubclassChecker, + ) + override val regularClassCheckers: Set = setOf( FirAnnotationClassDeclarationChecker, FirCommonConstructorDelegationIssuesChecker, @@ -46,11 +50,11 @@ object CommonDeclarationCheckers : DeclarationCheckers() { FirLocalEntityNotAllowedChecker, FirManyCompanionObjectsChecker, FirMethodOfAnyImplementedInInterfaceChecker, + FirOverrideChecker, FirPrimaryConstructorRequiredForDataClassChecker, FirSupertypeInitializedInInterfaceChecker, FirSupertypeInitializedWithoutPrimaryConstructor, FirTypeParametersInObjectChecker, - FirTypeMismatchOnOverrideChecker, FirMemberFunctionChecker, FirMemberPropertyChecker, ) diff --git a/compiler/fir/entrypoint/src/org/jetbrains/kotlin/fir/checkers/CommonExpressionCheckers.kt b/compiler/fir/entrypoint/src/org/jetbrains/kotlin/fir/checkers/CommonExpressionCheckers.kt index f93b89239f3..4ffda04a3ec 100644 --- a/compiler/fir/entrypoint/src/org/jetbrains/kotlin/fir/checkers/CommonExpressionCheckers.kt +++ b/compiler/fir/entrypoint/src/org/jetbrains/kotlin/fir/checkers/CommonExpressionCheckers.kt @@ -24,4 +24,8 @@ object CommonExpressionCheckers : ExpressionCheckers() { FirSealedClassConstructorCallChecker, ) override val functionCallCheckers: Set = setOf() + + override val tryExpressionCheckers: Set = setOf( + FirCatchParameterChecker + ) } diff --git a/compiler/fir/fir2ir/build.gradle.kts b/compiler/fir/fir2ir/build.gradle.kts index df30ec3e8b2..46b790ffc90 100644 --- a/compiler/fir/fir2ir/build.gradle.kts +++ b/compiler/fir/fir2ir/build.gradle.kts @@ -21,16 +21,21 @@ dependencies { testRuntimeOnly(intellijDep()) - testApi(commonDep("junit:junit")) testCompileOnly(project(":kotlin-test:kotlin-test-jvm")) testCompileOnly(project(":kotlin-test:kotlin-test-junit")) - testApi(projectTests(":compiler:tests-common")) - testApi(projectTests(":compiler:fir:analysis-tests:legacy-fir-tests")) - testApi(project(":compiler:resolution.common")) + testApi(projectTests(":compiler:test-infrastructure")) + testApi(projectTests(":compiler:test-infrastructure-utils")) + testApi(projectTests(":compiler:tests-compiler-utils")) + testApi(projectTests(":compiler:tests-common-new")) + testApi(projectTests(":compiler:fir:analysis-tests")) + testApi(project(":compiler:fir:fir-serialization")) + + testApiJUnit5() testCompileOnly(project(":kotlin-reflect-api")) testRuntimeOnly(project(":kotlin-reflect")) testRuntimeOnly(project(":core:descriptors.runtime")) + testRuntimeOnly(project(":compiler:fir:fir2ir:jvm-backend")) testCompileOnly(intellijCoreDep()) { includeJars("intellij-core") } testRuntimeOnly(intellijCoreDep()) { includeJars("intellij-core") } @@ -53,8 +58,9 @@ if (kotlinBuildProperties.isInJpsBuildIdeaSync) { } } -projectTest(parallel = true) { +projectTest(parallel = true, jUnit5Enabled = true) { workingDir = rootDir + useJUnitPlatform() } testsJar() diff --git a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrConverter.kt b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrConverter.kt index 58134b80893..a07d8e84ec4 100644 --- a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrConverter.kt +++ b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrConverter.kt @@ -293,8 +293,7 @@ class Fir2IrConverter( generateTypicalIrProviderList(irModuleFragment.descriptor, irBuiltIns, symbolTable, extensions = generatorExtensions) val externalDependenciesGenerator = ExternalDependenciesGenerator( symbolTable, - irProviders, - languageVersionSettings + irProviders ) // Necessary call to generate built-in IR classes externalDependenciesGenerator.generateUnboundSymbolsAsDependencies() diff --git a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/lazy/AbstractFir2IrLazyFunction.kt b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/lazy/AbstractFir2IrLazyFunction.kt index a0dd5de0bde..c2d9b9e09bf 100644 --- a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/lazy/AbstractFir2IrLazyFunction.kt +++ b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/lazy/AbstractFir2IrLazyFunction.kt @@ -53,8 +53,9 @@ abstract class AbstractFir2IrLazyFunction( override val isInline: Boolean get() = fir.isInline - override val isExternal: Boolean - get() = fir.isExternal + override var isExternal: Boolean by lazyVar { + fir.isExternal + } override val isExpect: Boolean get() = fir.isExpect diff --git a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/lazy/Fir2IrLazyClass.kt b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/lazy/Fir2IrLazyClass.kt index 8e88c2b00f1..69c05d294c3 100644 --- a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/lazy/Fir2IrLazyClass.kt +++ b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/lazy/Fir2IrLazyClass.kt @@ -84,8 +84,11 @@ class Fir2IrLazyClass( override val isData: Boolean get() = fir.isData - override val isExternal: Boolean + override var isExternal: Boolean get() = fir.isExternal + set(_) { + error("Mutating Fir2Ir lazy elements is not possible") + } override val isInline: Boolean get() = fir.isInline diff --git a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/lazy/Fir2IrLazyConstructor.kt b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/lazy/Fir2IrLazyConstructor.kt index 54e3ae91eb2..12ec673b12e 100644 --- a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/lazy/Fir2IrLazyConstructor.kt +++ b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/lazy/Fir2IrLazyConstructor.kt @@ -50,8 +50,11 @@ class Fir2IrLazyConstructor( override val isInline: Boolean get() = fir.isInline - override val isExternal: Boolean + override var isExternal: Boolean get() = fir.isExternal + set(_) { + error("Mutating Fir2Ir lazy elements is not possible") + } override val isExpect: Boolean get() = fir.isExpect diff --git a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/lazy/Fir2IrLazyProperty.kt b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/lazy/Fir2IrLazyProperty.kt index 8dc975fe056..5873eec2843 100644 --- a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/lazy/Fir2IrLazyProperty.kt +++ b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/lazy/Fir2IrLazyProperty.kt @@ -63,8 +63,11 @@ class Fir2IrLazyProperty( override val isDelegated: Boolean get() = fir.delegate != null - override val isExternal: Boolean + override var isExternal: Boolean get() = fir.isExternal + set(_) { + error("Mutating Fir2Ir lazy elements is not possible") + } override val isExpect: Boolean get() = fir.isExpect diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/codegen/FirCompileKotlinAgainstKotlinTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/codegen/FirCompileKotlinAgainstKotlinTestGenerated.java deleted file mode 100644 index 78cb73d344c..00000000000 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/codegen/FirCompileKotlinAgainstKotlinTestGenerated.java +++ /dev/null @@ -1,794 +0,0 @@ -/* - * Copyright 2010-2021 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. - */ - -package org.jetbrains.kotlin.codegen; - -import com.intellij.testFramework.TestDataPath; -import org.jetbrains.kotlin.test.JUnit3RunnerWithInners; -import org.jetbrains.kotlin.test.KotlinTestUtils; -import org.jetbrains.kotlin.test.util.KtTestUtil; -import org.jetbrains.kotlin.test.TargetBackend; -import org.jetbrains.kotlin.test.TestMetadata; -import org.junit.runner.RunWith; - -import java.io.File; -import java.util.regex.Pattern; - -/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */ -@SuppressWarnings("all") -@TestMetadata("compiler/testData/compileKotlinAgainstKotlin") -@TestDataPath("$PROJECT_ROOT") -@RunWith(JUnit3RunnerWithInners.class) -public class FirCompileKotlinAgainstKotlinTestGenerated extends AbstractFirCompileKotlinAgainstKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - - public void testAllFilesPresentInCompileKotlinAgainstKotlin() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/compileKotlinAgainstKotlin"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); - } - - @TestMetadata("annotationInInterface.kt") - public void testAnnotationInInterface() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/annotationInInterface.kt"); - } - - @TestMetadata("annotationOnTypeUseInTypeAlias.kt") - public void testAnnotationOnTypeUseInTypeAlias() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/annotationOnTypeUseInTypeAlias.kt"); - } - - @TestMetadata("annotationsOnTypeAliases.kt") - public void testAnnotationsOnTypeAliases() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/annotationsOnTypeAliases.kt"); - } - - @TestMetadata("callDeserializedPropertyOnInlineClassType.kt") - public void testCallDeserializedPropertyOnInlineClassType() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/callDeserializedPropertyOnInlineClassType.kt"); - } - - @TestMetadata("callDeserializedPropertyOnInlineClassTypeOldMangling.kt") - public void testCallDeserializedPropertyOnInlineClassTypeOldMangling() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/callDeserializedPropertyOnInlineClassTypeOldMangling.kt"); - } - - @TestMetadata("callsToMultifileClassFromOtherPackage.kt") - public void testCallsToMultifileClassFromOtherPackage() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/callsToMultifileClassFromOtherPackage.kt"); - } - - @TestMetadata("clashingFakeOverrideSignatures.kt") - public void testClashingFakeOverrideSignatures() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/clashingFakeOverrideSignatures.kt"); - } - - @TestMetadata("classInObject.kt") - public void testClassInObject() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/classInObject.kt"); - } - - @TestMetadata("companionObjectInEnum.kt") - public void testCompanionObjectInEnum() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/companionObjectInEnum.kt"); - } - - @TestMetadata("companionObjectMember.kt") - public void testCompanionObjectMember() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/companionObjectMember.kt"); - } - - @TestMetadata("constPropertyReferenceFromMultifileClass.kt") - public void testConstPropertyReferenceFromMultifileClass() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/constPropertyReferenceFromMultifileClass.kt"); - } - - @TestMetadata("constructorVararg.kt") - public void testConstructorVararg() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/constructorVararg.kt"); - } - - @TestMetadata("constructorWithInlineClassParametersInBinaryDependencies.kt") - public void testConstructorWithInlineClassParametersInBinaryDependencies() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/constructorWithInlineClassParametersInBinaryDependencies.kt"); - } - - @TestMetadata("constructorWithInlineClassParametersInBinaryDependenciesOldMangling.kt") - public void testConstructorWithInlineClassParametersInBinaryDependenciesOldMangling() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/constructorWithInlineClassParametersInBinaryDependenciesOldMangling.kt"); - } - - @TestMetadata("copySamOnInline.kt") - public void testCopySamOnInline() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/copySamOnInline.kt"); - } - - @TestMetadata("copySamOnInline2.kt") - public void testCopySamOnInline2() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/copySamOnInline2.kt"); - } - - @TestMetadata("coroutinesBinary.kt") - public void testCoroutinesBinary() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/coroutinesBinary.kt"); - } - - @TestMetadata("defaultConstructor.kt") - public void testDefaultConstructor() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/defaultConstructor.kt"); - } - - @TestMetadata("defaultLambdaRegeneration.kt") - public void testDefaultLambdaRegeneration() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/defaultLambdaRegeneration.kt"); - } - - @TestMetadata("defaultLambdaRegeneration2.kt") - public void testDefaultLambdaRegeneration2() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/defaultLambdaRegeneration2.kt"); - } - - @TestMetadata("defaultWithInlineClassAndReceivers.kt") - public void testDefaultWithInlineClassAndReceivers() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/defaultWithInlineClassAndReceivers.kt"); - } - - @TestMetadata("defaultWithInlineClassAndReceiversOldMangling.kt") - public void testDefaultWithInlineClassAndReceiversOldMangling() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/defaultWithInlineClassAndReceiversOldMangling.kt"); - } - - @TestMetadata("delegatedDefault.kt") - public void testDelegatedDefault() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/delegatedDefault.kt"); - } - - @TestMetadata("delegationAndAnnotations.kt") - public void testDelegationAndAnnotations() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/delegationAndAnnotations.kt"); - } - - @TestMetadata("doublyNestedClass.kt") - public void testDoublyNestedClass() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/doublyNestedClass.kt"); - } - - @TestMetadata("enum.kt") - public void testEnum() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/enum.kt"); - } - - @TestMetadata("expectClassActualTypeAlias.kt") - public void testExpectClassActualTypeAlias() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/expectClassActualTypeAlias.kt"); - } - - @TestMetadata("fakeOverridesForIntersectionTypes.kt") - public void testFakeOverridesForIntersectionTypes() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/fakeOverridesForIntersectionTypes.kt"); - } - - @TestMetadata("importCompanion.kt") - public void testImportCompanion() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/importCompanion.kt"); - } - - @TestMetadata("inlineClassFakeOverrideMangling.kt") - public void testInlineClassFakeOverrideMangling() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/inlineClassFakeOverrideMangling.kt"); - } - - @TestMetadata("inlineClassFakeOverrideManglingOldMangling.kt") - public void testInlineClassFakeOverrideManglingOldMangling() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/inlineClassFakeOverrideManglingOldMangling.kt"); - } - - @TestMetadata("inlineClassFromBinaryDependencies.kt") - public void testInlineClassFromBinaryDependencies() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/inlineClassFromBinaryDependencies.kt"); - } - - @TestMetadata("inlineClassFromBinaryDependenciesOldMangling.kt") - public void testInlineClassFromBinaryDependenciesOldMangling() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/inlineClassFromBinaryDependenciesOldMangling.kt"); - } - - @TestMetadata("inlineClassInlineFunctionCall.kt") - public void testInlineClassInlineFunctionCall() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/inlineClassInlineFunctionCall.kt"); - } - - @TestMetadata("inlineClassInlineFunctionCallOldMangling.kt") - public void testInlineClassInlineFunctionCallOldMangling() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/inlineClassInlineFunctionCallOldMangling.kt"); - } - - @TestMetadata("inlineClassInlineProperty.kt") - public void testInlineClassInlineProperty() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/inlineClassInlineProperty.kt"); - } - - @TestMetadata("inlineClassInlinePropertyOldMangling.kt") - public void testInlineClassInlinePropertyOldMangling() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/inlineClassInlinePropertyOldMangling.kt"); - } - - @TestMetadata("inlineClassesOldMangling.kt") - public void testInlineClassesOldMangling() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/inlineClassesOldMangling.kt"); - } - - @TestMetadata("inlinedConstants.kt") - public void testInlinedConstants() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/inlinedConstants.kt"); - } - - @TestMetadata("innerClassConstructor.kt") - public void testInnerClassConstructor() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/innerClassConstructor.kt"); - } - - @TestMetadata("interfaceDelegationAndBridgesProcessing.kt") - public void testInterfaceDelegationAndBridgesProcessing() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/interfaceDelegationAndBridgesProcessing.kt"); - } - - @TestMetadata("internalSetterOverridden.kt") - public void testInternalSetterOverridden() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/internalSetterOverridden.kt"); - } - - @TestMetadata("internalWithDefaultArgs.kt") - public void testInternalWithDefaultArgs() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/internalWithDefaultArgs.kt"); - } - - @TestMetadata("internalWithInlineClass.kt") - public void testInternalWithInlineClass() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/internalWithInlineClass.kt"); - } - - @TestMetadata("internalWithOtherModuleName.kt") - public void testInternalWithOtherModuleName() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/internalWithOtherModuleName.kt"); - } - - @TestMetadata("intersectionOverrideProperies.kt") - public void testIntersectionOverrideProperies() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/intersectionOverrideProperies.kt"); - } - - @TestMetadata("jvmField.kt") - public void testJvmField() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvmField.kt"); - } - - @TestMetadata("jvmFieldInAnnotationCompanion.kt") - public void testJvmFieldInAnnotationCompanion() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvmFieldInAnnotationCompanion.kt"); - } - - @TestMetadata("jvmFieldInConstructor.kt") - public void testJvmFieldInConstructor() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvmFieldInConstructor.kt"); - } - - @TestMetadata("jvmFieldInInterfaceCompanion.kt") - public void testJvmFieldInInterfaceCompanion() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvmFieldInInterfaceCompanion.kt"); - } - - @TestMetadata("jvmNames.kt") - public void testJvmNames() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvmNames.kt"); - } - - @TestMetadata("jvmPackageName.kt") - public void testJvmPackageName() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvmPackageName.kt"); - } - - @TestMetadata("jvmPackageNameInRootPackage.kt") - public void testJvmPackageNameInRootPackage() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvmPackageNameInRootPackage.kt"); - } - - @TestMetadata("jvmPackageNameMultifileClass.kt") - public void testJvmPackageNameMultifileClass() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvmPackageNameMultifileClass.kt"); - } - - @TestMetadata("jvmPackageNameWithJvmName.kt") - public void testJvmPackageNameWithJvmName() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvmPackageNameWithJvmName.kt"); - } - - @TestMetadata("jvmStaticInObject.kt") - public void testJvmStaticInObject() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvmStaticInObject.kt"); - } - - @TestMetadata("jvmStaticInObjectPropertyReference.kt") - public void testJvmStaticInObjectPropertyReference() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvmStaticInObjectPropertyReference.kt"); - } - - @TestMetadata("kotlinPropertyAsAnnotationParameter.kt") - public void testKotlinPropertyAsAnnotationParameter() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/kotlinPropertyAsAnnotationParameter.kt"); - } - - @TestMetadata("kt14012.kt") - public void testKt14012() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/kt14012.kt"); - } - - @TestMetadata("kt14012_multi.kt") - public void testKt14012_multi() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/kt14012_multi.kt"); - } - - @TestMetadata("kt21775.kt") - public void testKt21775() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/kt21775.kt"); - } - - @TestMetadata("metadataForMembersInLocalClassInInitializer.kt") - public void testMetadataForMembersInLocalClassInInitializer() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/metadataForMembersInLocalClassInInitializer.kt"); - } - - @TestMetadata("multifileClassInlineFunctionAccessingProperty.kt") - public void testMultifileClassInlineFunctionAccessingProperty() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/multifileClassInlineFunctionAccessingProperty.kt"); - } - - @TestMetadata("multifileClassWithTypealias.kt") - public void testMultifileClassWithTypealias() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/multifileClassWithTypealias.kt"); - } - - @TestMetadata("nestedClass.kt") - public void testNestedClass() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/nestedClass.kt"); - } - - @TestMetadata("nestedClassInAnnotationArgument.kt") - public void testNestedClassInAnnotationArgument() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/nestedClassInAnnotationArgument.kt"); - } - - @TestMetadata("nestedEnum.kt") - public void testNestedEnum() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/nestedEnum.kt"); - } - - @TestMetadata("nestedFunctionTypeAliasExpansion.kt") - public void testNestedFunctionTypeAliasExpansion() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/nestedFunctionTypeAliasExpansion.kt"); - } - - @TestMetadata("nestedObject.kt") - public void testNestedObject() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/nestedObject.kt"); - } - - @TestMetadata("nestedTypeAliasExpansion.kt") - public void testNestedTypeAliasExpansion() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/nestedTypeAliasExpansion.kt"); - } - - @TestMetadata("noExplicitOverrideForDelegatedFromSupertype.kt") - public void testNoExplicitOverrideForDelegatedFromSupertype() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/noExplicitOverrideForDelegatedFromSupertype.kt"); - } - - @TestMetadata("optionalAnnotation.kt") - public void testOptionalAnnotation() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/optionalAnnotation.kt"); - } - - @TestMetadata("platformTypes.kt") - public void testPlatformTypes() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/platformTypes.kt"); - } - - @TestMetadata("privateCompanionObjectValInDifferentModule.kt") - public void testPrivateCompanionObjectValInDifferentModule() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/privateCompanionObjectValInDifferentModule.kt"); - } - - @TestMetadata("privateCompanionObjectValInDifferentModuleOldMangling.kt") - public void testPrivateCompanionObjectValInDifferentModuleOldMangling() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/privateCompanionObjectValInDifferentModuleOldMangling.kt"); - } - - @TestMetadata("privateTopLevelValInDifferentModule.kt") - public void testPrivateTopLevelValInDifferentModule() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/privateTopLevelValInDifferentModule.kt"); - } - - @TestMetadata("privateTopLevelValInDifferentModuleOldMangling.kt") - public void testPrivateTopLevelValInDifferentModuleOldMangling() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/privateTopLevelValInDifferentModuleOldMangling.kt"); - } - - @TestMetadata("propertyReference.kt") - public void testPropertyReference() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/propertyReference.kt"); - } - - @TestMetadata("recursiveGeneric.kt") - public void testRecursiveGeneric() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/recursiveGeneric.kt"); - } - - @TestMetadata("reflectTopLevelFunctionOtherFile.kt") - public void testReflectTopLevelFunctionOtherFile() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/reflectTopLevelFunctionOtherFile.kt"); - } - - @TestMetadata("sealedClass.kt") - public void testSealedClass() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/sealedClass.kt"); - } - - @TestMetadata("secondaryConstructors.kt") - public void testSecondaryConstructors() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/secondaryConstructors.kt"); - } - - @TestMetadata("simple.kt") - public void testSimple() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/simple.kt"); - } - - @TestMetadata("simpleValAnonymousObject.kt") - public void testSimpleValAnonymousObject() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/simpleValAnonymousObject.kt"); - } - - @TestMetadata("specialBridgesInDependencies.kt") - public void testSpecialBridgesInDependencies() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/specialBridgesInDependencies.kt"); - } - - @TestMetadata("starImportEnum.kt") - public void testStarImportEnum() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/starImportEnum.kt"); - } - - @TestMetadata("suspendFunWithDefaultMangling.kt") - public void testSuspendFunWithDefaultMangling() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/suspendFunWithDefaultMangling.kt"); - } - - @TestMetadata("suspendFunWithDefaultOldMangling.kt") - public void testSuspendFunWithDefaultOldMangling() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/suspendFunWithDefaultOldMangling.kt"); - } - - @TestMetadata("targetedJvmName.kt") - public void testTargetedJvmName() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/targetedJvmName.kt"); - } - - @TestMetadata("typeAliasesKt13181.kt") - public void testTypeAliasesKt13181() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/typeAliasesKt13181.kt"); - } - - @TestMetadata("unsignedTypesInAnnotations.kt") - public void testUnsignedTypesInAnnotations() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/unsignedTypesInAnnotations.kt"); - } - - @TestMetadata("useDeserializedFunInterface.kt") - public void testUseDeserializedFunInterface() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/useDeserializedFunInterface.kt"); - } - - @TestMetadata("compiler/testData/compileKotlinAgainstKotlin/fir") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Fir extends AbstractFirCompileKotlinAgainstKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - - public void testAllFilesPresentInFir() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/compileKotlinAgainstKotlin/fir"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); - } - - @TestMetadata("AnonymousObjectInProperty.kt") - public void testAnonymousObjectInProperty() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/fir/AnonymousObjectInProperty.kt"); - } - - @TestMetadata("ExistingSymbolInFakeOverride.kt") - public void testExistingSymbolInFakeOverride() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/fir/ExistingSymbolInFakeOverride.kt"); - } - - @TestMetadata("IncrementalCompilerRunner.kt") - public void testIncrementalCompilerRunner() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/fir/IncrementalCompilerRunner.kt"); - } - - @TestMetadata("IrConstAcceptMultiModule.kt") - public void testIrConstAcceptMultiModule() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/fir/IrConstAcceptMultiModule.kt"); - } - - @TestMetadata("LibraryProperty.kt") - public void testLibraryProperty() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/fir/LibraryProperty.kt"); - } - } - - @TestMetadata("compiler/testData/compileKotlinAgainstKotlin/jvm8") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Jvm8 extends AbstractFirCompileKotlinAgainstKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - - public void testAllFilesPresentInJvm8() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/compileKotlinAgainstKotlin/jvm8"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); - } - - @TestMetadata("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Defaults extends AbstractFirCompileKotlinAgainstKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - - public void testAllFilesPresentInDefaults() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); - } - - @TestMetadata("superCall.kt") - public void testSuperCall() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/superCall.kt"); - } - - @TestMetadata("superCallFromInterface.kt") - public void testSuperCallFromInterface() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/superCallFromInterface.kt"); - } - - @TestMetadata("superCallFromInterface2.kt") - public void testSuperCallFromInterface2() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/superCallFromInterface2.kt"); - } - - @TestMetadata("superPropAccess.kt") - public void testSuperPropAccess() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/superPropAccess.kt"); - } - - @TestMetadata("superPropAccessFromInterface.kt") - public void testSuperPropAccessFromInterface() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/superPropAccessFromInterface.kt"); - } - - @TestMetadata("superPropAccessFromInterface2.kt") - public void testSuperPropAccessFromInterface2() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/superPropAccessFromInterface2.kt"); - } - - @TestMetadata("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class AllCompatibility extends AbstractFirCompileKotlinAgainstKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - - public void testAllFilesPresentInAllCompatibility() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); - } - - @TestMetadata("callStackTrace.kt") - public void testCallStackTrace() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/callStackTrace.kt"); - } - - @TestMetadata("superCall.kt") - public void testSuperCall() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superCall.kt"); - } - - @TestMetadata("superCallFromInterface.kt") - public void testSuperCallFromInterface() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superCallFromInterface.kt"); - } - - @TestMetadata("superCallFromInterface2.kt") - public void testSuperCallFromInterface2() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superCallFromInterface2.kt"); - } - - @TestMetadata("superPropAccess.kt") - public void testSuperPropAccess() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superPropAccess.kt"); - } - - @TestMetadata("superPropAccessFromInterface.kt") - public void testSuperPropAccessFromInterface() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superPropAccessFromInterface.kt"); - } - - @TestMetadata("superPropAccessFromInterface2.kt") - public void testSuperPropAccessFromInterface2() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superPropAccessFromInterface2.kt"); - } - - @TestMetadata("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/delegationBy") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class DelegationBy extends AbstractFirCompileKotlinAgainstKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - - public void testAllFilesPresentInDelegationBy() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/delegationBy"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); - } - - @TestMetadata("simple.kt") - public void testSimple() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/delegationBy/simple.kt"); - } - - @TestMetadata("simpleProperty.kt") - public void testSimpleProperty() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/delegationBy/simpleProperty.kt"); - } - } - } - - @TestMetadata("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Interop extends AbstractFirCompileKotlinAgainstKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - - public void testAllFilesPresentInInterop() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); - } - - @TestMetadata("likeMemberClash.kt") - public void testLikeMemberClash() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop/likeMemberClash.kt"); - } - - @TestMetadata("likeSpecialization.kt") - public void testLikeSpecialization() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop/likeSpecialization.kt"); - } - - @TestMetadata("newAndOldSchemes.kt") - public void testNewAndOldSchemes() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop/newAndOldSchemes.kt"); - } - - @TestMetadata("newAndOldSchemes2.kt") - public void testNewAndOldSchemes2() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop/newAndOldSchemes2.kt"); - } - - @TestMetadata("newAndOldSchemes2Compatibility.kt") - public void testNewAndOldSchemes2Compatibility() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop/newAndOldSchemes2Compatibility.kt"); - } - - @TestMetadata("newAndOldSchemes3.kt") - public void testNewAndOldSchemes3() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop/newAndOldSchemes3.kt"); - } - - @TestMetadata("newSchemeWithJvmDefault.kt") - public void testNewSchemeWithJvmDefault() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop/newSchemeWithJvmDefault.kt"); - } - } - } - - @TestMetadata("compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Jvm8against6 extends AbstractFirCompileKotlinAgainstKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - - public void testAllFilesPresentInJvm8against6() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); - } - - @TestMetadata("jdk8Against6.kt") - public void testJdk8Against6() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/jdk8Against6.kt"); - } - - @TestMetadata("simpleCall.kt") - public void testSimpleCall() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/simpleCall.kt"); - } - - @TestMetadata("simpleCallWithBigHierarchy.kt") - public void testSimpleCallWithBigHierarchy() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/simpleCallWithBigHierarchy.kt"); - } - - @TestMetadata("simpleCallWithHierarchy.kt") - public void testSimpleCallWithHierarchy() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/simpleCallWithHierarchy.kt"); - } - - @TestMetadata("simpleProp.kt") - public void testSimpleProp() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/simpleProp.kt"); - } - - @TestMetadata("simplePropWithHierarchy.kt") - public void testSimplePropWithHierarchy() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/simplePropWithHierarchy.kt"); - } - - @TestMetadata("compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/delegation") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Delegation extends AbstractFirCompileKotlinAgainstKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - - public void testAllFilesPresentInDelegation() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/delegation"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); - } - - @TestMetadata("diamond.kt") - public void testDiamond() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/delegation/diamond.kt"); - } - - @TestMetadata("diamond2.kt") - public void testDiamond2() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/delegation/diamond2.kt"); - } - - @TestMetadata("diamond3.kt") - public void testDiamond3() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/delegation/diamond3.kt"); - } - } - } - } - - @TestMetadata("compiler/testData/compileKotlinAgainstKotlin/typeAnnotations") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class TypeAnnotations extends AbstractFirCompileKotlinAgainstKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - - public void testAllFilesPresentInTypeAnnotations() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/compileKotlinAgainstKotlin/typeAnnotations"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); - } - - @TestMetadata("implicitReturn.kt") - public void testImplicitReturn() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/typeAnnotations/implicitReturn.kt"); - } - } -} diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/codegen/ir/FirBlackBoxAgainstJavaCodegenTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/codegen/ir/FirBlackBoxAgainstJavaCodegenTestGenerated.java deleted file mode 100644 index 784f8b3cdcb..00000000000 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/codegen/ir/FirBlackBoxAgainstJavaCodegenTestGenerated.java +++ /dev/null @@ -1,1279 +0,0 @@ -/* - * Copyright 2010-2021 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. - */ - -package org.jetbrains.kotlin.codegen.ir; - -import com.intellij.testFramework.TestDataPath; -import org.jetbrains.kotlin.test.JUnit3RunnerWithInners; -import org.jetbrains.kotlin.test.KotlinTestUtils; -import org.jetbrains.kotlin.test.util.KtTestUtil; -import org.jetbrains.kotlin.test.TargetBackend; -import org.jetbrains.kotlin.test.TestMetadata; -import org.junit.runner.RunWith; - -import java.io.File; -import java.util.regex.Pattern; - -/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */ -@SuppressWarnings("all") -@TestMetadata("compiler/testData/codegen/boxAgainstJava") -@TestDataPath("$PROJECT_ROOT") -@RunWith(JUnit3RunnerWithInners.class) -public class FirBlackBoxAgainstJavaCodegenTestGenerated extends AbstractFirBlackBoxAgainstJavaCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - - public void testAllFilesPresentInBoxAgainstJava() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true, "oldLanguageVersions"); - } - - @TestMetadata("compiler/testData/codegen/boxAgainstJava/annotations") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Annotations extends AbstractFirBlackBoxAgainstJavaCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - - public void testAllFilesPresentInAnnotations() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/annotations"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); - } - - @TestMetadata("divisionByZeroInJava.kt") - public void testDivisionByZeroInJava() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/annotations/divisionByZeroInJava.kt"); - } - - @TestMetadata("javaAnnotationArrayValueDefault.kt") - public void testJavaAnnotationArrayValueDefault() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/annotations/javaAnnotationArrayValueDefault.kt"); - } - - @TestMetadata("javaAnnotationArrayValueNoDefault.kt") - public void testJavaAnnotationArrayValueNoDefault() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/annotations/javaAnnotationArrayValueNoDefault.kt"); - } - - @TestMetadata("javaAnnotationCall.kt") - public void testJavaAnnotationCall() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/annotations/javaAnnotationCall.kt"); - } - - @TestMetadata("javaAnnotationDefault.kt") - public void testJavaAnnotationDefault() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/annotations/javaAnnotationDefault.kt"); - } - - @TestMetadata("javaNegativePropertyAsAnnotationParameter.kt") - public void testJavaNegativePropertyAsAnnotationParameter() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/annotations/javaNegativePropertyAsAnnotationParameter.kt"); - } - - @TestMetadata("javaPropertyAsAnnotationParameter.kt") - public void testJavaPropertyAsAnnotationParameter() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/annotations/javaPropertyAsAnnotationParameter.kt"); - } - - @TestMetadata("javaPropertyWithIntInitializer.kt") - public void testJavaPropertyWithIntInitializer() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/annotations/javaPropertyWithIntInitializer.kt"); - } - - @TestMetadata("retentionInJava.kt") - public void testRetentionInJava() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/annotations/retentionInJava.kt"); - } - - @TestMetadata("compiler/testData/codegen/boxAgainstJava/annotations/kClassMapping") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class KClassMapping extends AbstractFirBlackBoxAgainstJavaCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - - public void testAllFilesPresentInKClassMapping() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/annotations/kClassMapping"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); - } - - @TestMetadata("arrayClassParameter.kt") - public void testArrayClassParameter() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/annotations/kClassMapping/arrayClassParameter.kt"); - } - - @TestMetadata("arrayClassParameterOnJavaClass.kt") - public void testArrayClassParameterOnJavaClass() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/annotations/kClassMapping/arrayClassParameterOnJavaClass.kt"); - } - - @TestMetadata("classParameter.kt") - public void testClassParameter() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/annotations/kClassMapping/classParameter.kt"); - } - - @TestMetadata("classParameterOnJavaClass.kt") - public void testClassParameterOnJavaClass() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/annotations/kClassMapping/classParameterOnJavaClass.kt"); - } - - @TestMetadata("varargClassParameter.kt") - public void testVarargClassParameter() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/annotations/kClassMapping/varargClassParameter.kt"); - } - - @TestMetadata("varargClassParameterOnJavaClass.kt") - public void testVarargClassParameterOnJavaClass() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/annotations/kClassMapping/varargClassParameterOnJavaClass.kt"); - } - } - - @TestMetadata("compiler/testData/codegen/boxAgainstJava/annotations/typeAnnotations") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class TypeAnnotations extends AbstractFirBlackBoxAgainstJavaCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - - public void testAllFilesPresentInTypeAnnotations() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/annotations/typeAnnotations"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); - } - - @TestMetadata("implicitReturn.kt") - public void testImplicitReturn() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/annotations/typeAnnotations/implicitReturn.kt"); - } - } - } - - @TestMetadata("compiler/testData/codegen/boxAgainstJava/callableReference") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class CallableReference extends AbstractFirBlackBoxAgainstJavaCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - - public void testAllFilesPresentInCallableReference() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/callableReference"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); - } - - @TestMetadata("constructor.kt") - public void testConstructor() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/callableReference/constructor.kt"); - } - - @TestMetadata("kt16412.kt") - public void testKt16412() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/callableReference/kt16412.kt"); - } - - @TestMetadata("publicFinalField.kt") - public void testPublicFinalField() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/callableReference/publicFinalField.kt"); - } - - @TestMetadata("publicMutableField.kt") - public void testPublicMutableField() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/callableReference/publicMutableField.kt"); - } - - @TestMetadata("staticMethod.kt") - public void testStaticMethod() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/callableReference/staticMethod.kt"); - } - } - - @TestMetadata("compiler/testData/codegen/boxAgainstJava/constructor") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Constructor extends AbstractFirBlackBoxAgainstJavaCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - - public void testAllFilesPresentInConstructor() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/constructor"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); - } - - @TestMetadata("genericConstructor.kt") - public void testGenericConstructor() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/constructor/genericConstructor.kt"); - } - - @TestMetadata("secondaryConstructor.kt") - public void testSecondaryConstructor() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/constructor/secondaryConstructor.kt"); - } - } - - @TestMetadata("compiler/testData/codegen/boxAgainstJava/delegation") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Delegation extends AbstractFirBlackBoxAgainstJavaCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - - public void testAllFilesPresentInDelegation() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/delegation"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); - } - - @TestMetadata("delegationAndInheritanceFromJava.kt") - public void testDelegationAndInheritanceFromJava() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/delegation/delegationAndInheritanceFromJava.kt"); - } - } - - @TestMetadata("compiler/testData/codegen/boxAgainstJava/enum") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Enum extends AbstractFirBlackBoxAgainstJavaCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - - public void testAllFilesPresentInEnum() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/enum"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); - } - - @TestMetadata("nameConflict.kt") - public void testNameConflict() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/enum/nameConflict.kt"); - } - - @TestMetadata("simpleJavaEnum.kt") - public void testSimpleJavaEnum() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/enum/simpleJavaEnum.kt"); - } - - @TestMetadata("simpleJavaEnumWithFunction.kt") - public void testSimpleJavaEnumWithFunction() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/enum/simpleJavaEnumWithFunction.kt"); - } - - @TestMetadata("simpleJavaEnumWithStaticImport.kt") - public void testSimpleJavaEnumWithStaticImport() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/enum/simpleJavaEnumWithStaticImport.kt"); - } - - @TestMetadata("simpleJavaInnerEnum.kt") - public void testSimpleJavaInnerEnum() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/enum/simpleJavaInnerEnum.kt"); - } - - @TestMetadata("staticField.kt") - public void testStaticField() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/enum/staticField.kt"); - } - - @TestMetadata("staticMethod.kt") - public void testStaticMethod() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/enum/staticMethod.kt"); - } - } - - @TestMetadata("compiler/testData/codegen/boxAgainstJava/functions") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Functions extends AbstractFirBlackBoxAgainstJavaCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - - public void testAllFilesPresentInFunctions() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/functions"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); - } - - @TestMetadata("constructor.kt") - public void testConstructor() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/functions/constructor.kt"); - } - - @TestMetadata("max.kt") - public void testMax() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/functions/max.kt"); - } - - @TestMetadata("referencesStaticInnerClassMethod.kt") - public void testReferencesStaticInnerClassMethod() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/functions/referencesStaticInnerClassMethod.kt"); - } - - @TestMetadata("referencesStaticInnerClassMethodL2.kt") - public void testReferencesStaticInnerClassMethodL2() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/functions/referencesStaticInnerClassMethodL2.kt"); - } - - @TestMetadata("unrelatedUpperBounds.kt") - public void testUnrelatedUpperBounds() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/functions/unrelatedUpperBounds.kt"); - } - } - - @TestMetadata("compiler/testData/codegen/boxAgainstJava/ieee754") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Ieee754 extends AbstractFirBlackBoxAgainstJavaCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - - public void testAllFilesPresentInIeee754() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/ieee754"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); - } - - @TestMetadata("anyToReal.kt") - public void testAnyToReal() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/ieee754/anyToReal.kt"); - } - - @TestMetadata("comparableTypeCast.kt") - public void testComparableTypeCast() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/ieee754/comparableTypeCast.kt"); - } - - @TestMetadata("double.kt") - public void testDouble() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/ieee754/double.kt"); - } - - @TestMetadata("explicitCompareCall.kt") - public void testExplicitCompareCall() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/ieee754/explicitCompareCall.kt"); - } - - @TestMetadata("explicitEqualsCall.kt") - public void testExplicitEqualsCall() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/ieee754/explicitEqualsCall.kt"); - } - - @TestMetadata("float.kt") - public void testFloat() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/ieee754/float.kt"); - } - - @TestMetadata("generic.kt") - public void testGeneric() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/ieee754/generic.kt"); - } - - @TestMetadata("nullableAnyToReal.kt") - public void testNullableAnyToReal() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/ieee754/nullableAnyToReal.kt"); - } - } - - @TestMetadata("compiler/testData/codegen/boxAgainstJava/inline") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Inline extends AbstractFirBlackBoxAgainstJavaCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - - public void testAllFilesPresentInInline() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/inline"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); - } - - @TestMetadata("kt19910.kt") - public void testKt19910() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/inline/kt19910.kt"); - } - } - - @TestMetadata("compiler/testData/codegen/boxAgainstJava/innerClass") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class InnerClass extends AbstractFirBlackBoxAgainstJavaCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - - public void testAllFilesPresentInInnerClass() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/innerClass"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); - } - - @TestMetadata("kt3532.kt") - public void testKt3532() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/innerClass/kt3532.kt"); - } - - @TestMetadata("kt3812.kt") - public void testKt3812() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/innerClass/kt3812.kt"); - } - - @TestMetadata("kt4036.kt") - public void testKt4036() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/innerClass/kt4036.kt"); - } - } - - @TestMetadata("compiler/testData/codegen/boxAgainstJava/interfaces") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Interfaces extends AbstractFirBlackBoxAgainstJavaCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - - public void testAllFilesPresentInInterfaces() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/interfaces"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); - } - - @TestMetadata("defaultMethod.kt") - public void testDefaultMethod() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/interfaces/defaultMethod.kt"); - } - - @TestMetadata("inheritJavaInterface.kt") - public void testInheritJavaInterface() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/interfaces/inheritJavaInterface.kt"); - } - } - - @TestMetadata("compiler/testData/codegen/boxAgainstJava/multiplatform") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Multiplatform extends AbstractFirBlackBoxAgainstJavaCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - - public void testAllFilesPresentInMultiplatform() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/multiplatform"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); - } - - @TestMetadata("annotationsViaActualTypeAliasFromBinary.kt") - public void testAnnotationsViaActualTypeAliasFromBinary() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/multiplatform/annotationsViaActualTypeAliasFromBinary.kt"); - } - } - - @TestMetadata("compiler/testData/codegen/boxAgainstJava/notNullAssertions") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class NotNullAssertions extends AbstractFirBlackBoxAgainstJavaCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - - public void testAllFilesPresentInNotNullAssertions() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/notNullAssertions"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); - } - - @TestMetadata("callAssertions.kt") - public void testCallAssertions() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/notNullAssertions/callAssertions.kt"); - } - - @TestMetadata("delegation.kt") - public void testDelegation() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/notNullAssertions/delegation.kt"); - } - - @TestMetadata("doGenerateParamAssertions.kt") - public void testDoGenerateParamAssertions() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/notNullAssertions/doGenerateParamAssertions.kt"); - } - - @TestMetadata("noCallAssertions.kt") - public void testNoCallAssertions() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/notNullAssertions/noCallAssertions.kt"); - } - - @TestMetadata("rightElvisOperand.kt") - public void testRightElvisOperand() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/notNullAssertions/rightElvisOperand.kt"); - } - } - - @TestMetadata("compiler/testData/codegen/boxAgainstJava/platformTypes") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class PlatformTypes extends AbstractFirBlackBoxAgainstJavaCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - - public void testAllFilesPresentInPlatformTypes() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/platformTypes"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); - } - - @TestMetadata("genericUnit.kt") - public void testGenericUnit() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/platformTypes/genericUnit.kt"); - } - - @TestMetadata("kt14989.kt") - public void testKt14989() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/platformTypes/kt14989.kt"); - } - - @TestMetadata("specializedMapFull.kt") - public void testSpecializedMapFull() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/platformTypes/specializedMapFull.kt"); - } - - @TestMetadata("specializedMapPut.kt") - public void testSpecializedMapPut() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/platformTypes/specializedMapPut.kt"); - } - } - - @TestMetadata("compiler/testData/codegen/boxAgainstJava/property") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Property extends AbstractFirBlackBoxAgainstJavaCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - - public void testAllFilesPresentInProperty() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/property"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); - } - - @TestMetadata("fieldAccessFromExtensionInTraitImpl.kt") - public void testFieldAccessFromExtensionInTraitImpl() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/property/fieldAccessFromExtensionInTraitImpl.kt"); - } - - @TestMetadata("fieldAccessViaSubclass.kt") - public void testFieldAccessViaSubclass() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/property/fieldAccessViaSubclass.kt"); - } - - @TestMetadata("referenceToJavaFieldViaBridge.kt") - public void testReferenceToJavaFieldViaBridge() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/property/referenceToJavaFieldViaBridge.kt"); - } - } - - @TestMetadata("compiler/testData/codegen/boxAgainstJava/recursiveRawTypes") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class RecursiveRawTypes extends AbstractFirBlackBoxAgainstJavaCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - - public void testAllFilesPresentInRecursiveRawTypes() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/recursiveRawTypes"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); - } - - @TestMetadata("kt16528.kt") - public void testKt16528() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/recursiveRawTypes/kt16528.kt"); - } - - @TestMetadata("kt16639.kt") - public void testKt16639() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/recursiveRawTypes/kt16639.kt"); - } - } - - @TestMetadata("compiler/testData/codegen/boxAgainstJava/reflection") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Reflection extends AbstractFirBlackBoxAgainstJavaCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - - public void testAllFilesPresentInReflection() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/reflection"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); - } - - @TestMetadata("compiler/testData/codegen/boxAgainstJava/reflection/classLiterals") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class ClassLiterals extends AbstractFirBlackBoxAgainstJavaCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - - public void testAllFilesPresentInClassLiterals() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/reflection/classLiterals"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); - } - - @TestMetadata("javaClassLiteral.kt") - public void testJavaClassLiteral() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/reflection/classLiterals/javaClassLiteral.kt"); - } - } - - @TestMetadata("compiler/testData/codegen/boxAgainstJava/reflection/mapping") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Mapping extends AbstractFirBlackBoxAgainstJavaCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - - public void testAllFilesPresentInMapping() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/reflection/mapping"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); - } - - @TestMetadata("jClass2kClass.kt") - public void testJClass2kClass() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/reflection/mapping/jClass2kClass.kt"); - } - - @TestMetadata("javaConstructor.kt") - public void testJavaConstructor() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/reflection/mapping/javaConstructor.kt"); - } - - @TestMetadata("javaFields.kt") - public void testJavaFields() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/reflection/mapping/javaFields.kt"); - } - - @TestMetadata("javaMethods.kt") - public void testJavaMethods() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/reflection/mapping/javaMethods.kt"); - } - } - - @TestMetadata("compiler/testData/codegen/boxAgainstJava/reflection/properties") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Properties extends AbstractFirBlackBoxAgainstJavaCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - - public void testAllFilesPresentInProperties() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/reflection/properties"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); - } - - @TestMetadata("equalsHashCodeToString.kt") - public void testEqualsHashCodeToString() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/reflection/properties/equalsHashCodeToString.kt"); - } - } - } - - @TestMetadata("compiler/testData/codegen/boxAgainstJava/sam") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Sam extends AbstractFirBlackBoxAgainstJavaCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - - public void testAllFilesPresentInSam() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/sam"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); - } - - @TestMetadata("differentFqNames.kt") - public void testDifferentFqNames() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/differentFqNames.kt"); - } - - @TestMetadata("kt11519.kt") - public void testKt11519() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/kt11519.kt"); - } - - @TestMetadata("kt11519Constructor.kt") - public void testKt11519Constructor() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/kt11519Constructor.kt"); - } - - @TestMetadata("kt11696.kt") - public void testKt11696() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/kt11696.kt"); - } - - @TestMetadata("kt4753.kt") - public void testKt4753() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/kt4753.kt"); - } - - @TestMetadata("kt4753_2.kt") - public void testKt4753_2() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/kt4753_2.kt"); - } - - @TestMetadata("propertyReference.kt") - public void testPropertyReference() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/propertyReference.kt"); - } - - @TestMetadata("samConstructorGenericSignature.kt") - public void testSamConstructorGenericSignature() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/samConstructorGenericSignature.kt"); - } - - @TestMetadata("smartCastSamConversion.kt") - public void testSmartCastSamConversion() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/smartCastSamConversion.kt"); - } - - @TestMetadata("compiler/testData/codegen/boxAgainstJava/sam/adapters") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Adapters extends AbstractFirBlackBoxAgainstJavaCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - - public void testAllFilesPresentInAdapters() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/sam/adapters"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); - } - - @TestMetadata("bridgesForOverridden.kt") - public void testBridgesForOverridden() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/bridgesForOverridden.kt"); - } - - @TestMetadata("bridgesForOverriddenComplex.kt") - public void testBridgesForOverriddenComplex() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/bridgesForOverriddenComplex.kt"); - } - - @TestMetadata("callAbstractAdapter.kt") - public void testCallAbstractAdapter() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/callAbstractAdapter.kt"); - } - - @TestMetadata("comparator.kt") - public void testComparator() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/comparator.kt"); - } - - @TestMetadata("constructor.kt") - public void testConstructor() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/constructor.kt"); - } - - @TestMetadata("doubleLongParameters.kt") - public void testDoubleLongParameters() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/doubleLongParameters.kt"); - } - - @TestMetadata("fileFilter.kt") - public void testFileFilter() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/fileFilter.kt"); - } - - @TestMetadata("genericSignature.kt") - public void testGenericSignature() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/genericSignature.kt"); - } - - @TestMetadata("implementAdapter.kt") - public void testImplementAdapter() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/implementAdapter.kt"); - } - - @TestMetadata("inheritedInKotlin.kt") - public void testInheritedInKotlin() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/inheritedInKotlin.kt"); - } - - @TestMetadata("inheritedOverriddenAdapter.kt") - public void testInheritedOverriddenAdapter() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/inheritedOverriddenAdapter.kt"); - } - - @TestMetadata("inheritedSimple.kt") - public void testInheritedSimple() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/inheritedSimple.kt"); - } - - @TestMetadata("localClass.kt") - public void testLocalClass() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/localClass.kt"); - } - - @TestMetadata("localObjectConstructor.kt") - public void testLocalObjectConstructor() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/localObjectConstructor.kt"); - } - - @TestMetadata("localObjectConstructorWithFnValue.kt") - public void testLocalObjectConstructorWithFnValue() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/localObjectConstructorWithFnValue.kt"); - } - - @TestMetadata("nonLiteralAndLiteralRunnable.kt") - public void testNonLiteralAndLiteralRunnable() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/nonLiteralAndLiteralRunnable.kt"); - } - - @TestMetadata("nonLiteralComparator.kt") - public void testNonLiteralComparator() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/nonLiteralComparator.kt"); - } - - @TestMetadata("nonLiteralInConstructor.kt") - public void testNonLiteralInConstructor() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/nonLiteralInConstructor.kt"); - } - - @TestMetadata("nonLiteralNull.kt") - public void testNonLiteralNull() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/nonLiteralNull.kt"); - } - - @TestMetadata("nonLiteralRunnable.kt") - public void testNonLiteralRunnable() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/nonLiteralRunnable.kt"); - } - - @TestMetadata("protectedFromBase.kt") - public void testProtectedFromBase() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/protectedFromBase.kt"); - } - - @TestMetadata("severalSamParameters.kt") - public void testSeveralSamParameters() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/severalSamParameters.kt"); - } - - @TestMetadata("simplest.kt") - public void testSimplest() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/simplest.kt"); - } - - @TestMetadata("superInSecondaryConstructor.kt") - public void testSuperInSecondaryConstructor() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/superInSecondaryConstructor.kt"); - } - - @TestMetadata("superconstructor.kt") - public void testSuperconstructor() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/superconstructor.kt"); - } - - @TestMetadata("superconstructorWithClosure.kt") - public void testSuperconstructorWithClosure() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/superconstructorWithClosure.kt"); - } - - @TestMetadata("typeParameterOfClass.kt") - public void testTypeParameterOfClass() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/typeParameterOfClass.kt"); - } - - @TestMetadata("typeParameterOfMethod.kt") - public void testTypeParameterOfMethod() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/typeParameterOfMethod.kt"); - } - - @TestMetadata("typeParameterOfOuterClass.kt") - public void testTypeParameterOfOuterClass() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/typeParameterOfOuterClass.kt"); - } - - @TestMetadata("compiler/testData/codegen/boxAgainstJava/sam/adapters/operators") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Operators extends AbstractFirBlackBoxAgainstJavaCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - - public void testAllFilesPresentInOperators() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/sam/adapters/operators"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); - } - - @TestMetadata("augmentedAssignmentPure.kt") - public void testAugmentedAssignmentPure() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/operators/augmentedAssignmentPure.kt"); - } - - @TestMetadata("augmentedAssignmentViaSimpleBinary.kt") - public void testAugmentedAssignmentViaSimpleBinary() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/operators/augmentedAssignmentViaSimpleBinary.kt"); - } - - @TestMetadata("binary.kt") - public void testBinary() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/operators/binary.kt"); - } - - @TestMetadata("compareTo.kt") - public void testCompareTo() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/operators/compareTo.kt"); - } - - @TestMetadata("contains.kt") - public void testContains() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/operators/contains.kt"); - } - - @TestMetadata("get.kt") - public void testGet() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/operators/get.kt"); - } - - @TestMetadata("invoke.kt") - public void testInvoke() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/operators/invoke.kt"); - } - - @TestMetadata("legacyModOperator.kt") - public void testLegacyModOperator() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/operators/legacyModOperator.kt"); - } - - @TestMetadata("multiGetSet.kt") - public void testMultiGetSet() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/operators/multiGetSet.kt"); - } - - @TestMetadata("multiInvoke.kt") - public void testMultiInvoke() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/operators/multiInvoke.kt"); - } - - @TestMetadata("set.kt") - public void testSet() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/operators/set.kt"); - } - } - } - } - - @TestMetadata("compiler/testData/codegen/boxAgainstJava/specialBuiltins") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class SpecialBuiltins extends AbstractFirBlackBoxAgainstJavaCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - - public void testAllFilesPresentInSpecialBuiltins() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/specialBuiltins"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); - } - - @TestMetadata("charBuffer.kt") - public void testCharBuffer() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/specialBuiltins/charBuffer.kt"); - } - } - - @TestMetadata("compiler/testData/codegen/boxAgainstJava/staticFun") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class StaticFun extends AbstractFirBlackBoxAgainstJavaCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - - public void testAllFilesPresentInStaticFun() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/staticFun"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); - } - - @TestMetadata("classWithNestedEnum.kt") - public void testClassWithNestedEnum() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/staticFun/classWithNestedEnum.kt"); - } - } - - @TestMetadata("compiler/testData/codegen/boxAgainstJava/syntheticExtensions") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class SyntheticExtensions extends AbstractFirBlackBoxAgainstJavaCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - - public void testAllFilesPresentInSyntheticExtensions() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/syntheticExtensions"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); - } - - @TestMetadata("fromTwoBases.kt") - public void testFromTwoBases() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/syntheticExtensions/fromTwoBases.kt"); - } - - @TestMetadata("getter.kt") - public void testGetter() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/syntheticExtensions/getter.kt"); - } - - @TestMetadata("implicitReceiver.kt") - public void testImplicitReceiver() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/syntheticExtensions/implicitReceiver.kt"); - } - - @TestMetadata("overrideOnlyGetter.kt") - public void testOverrideOnlyGetter() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/syntheticExtensions/overrideOnlyGetter.kt"); - } - - @TestMetadata("plusPlus.kt") - public void testPlusPlus() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/syntheticExtensions/plusPlus.kt"); - } - - @TestMetadata("protected.kt") - public void testProtected() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/syntheticExtensions/protected.kt"); - } - - @TestMetadata("protectedSetter.kt") - public void testProtectedSetter() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/syntheticExtensions/protectedSetter.kt"); - } - - @TestMetadata("setter.kt") - public void testSetter() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/syntheticExtensions/setter.kt"); - } - - @TestMetadata("setterNonVoid1.kt") - public void testSetterNonVoid1() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/syntheticExtensions/setterNonVoid1.kt"); - } - - @TestMetadata("setterNonVoid2.kt") - public void testSetterNonVoid2() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/syntheticExtensions/setterNonVoid2.kt"); - } - } - - @TestMetadata("compiler/testData/codegen/boxAgainstJava/throws") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Throws extends AbstractFirBlackBoxAgainstJavaCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - - public void testAllFilesPresentInThrows() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/throws"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); - } - - @TestMetadata("delegationAndThrows.kt") - public void testDelegationAndThrows() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/throws/delegationAndThrows.kt"); - } - } - - @TestMetadata("compiler/testData/codegen/boxAgainstJava/typealias") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Typealias extends AbstractFirBlackBoxAgainstJavaCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - - public void testAllFilesPresentInTypealias() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/typealias"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); - } - - @TestMetadata("javaStaticMembersViaTypeAlias.kt") - public void testJavaStaticMembersViaTypeAlias() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/typealias/javaStaticMembersViaTypeAlias.kt"); - } - } - - @TestMetadata("compiler/testData/codegen/boxAgainstJava/varargs") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Varargs extends AbstractFirBlackBoxAgainstJavaCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - - public void testAllFilesPresentInVarargs() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/varargs"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); - } - - @TestMetadata("varargsOverride.kt") - public void testVarargsOverride() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/varargs/varargsOverride.kt"); - } - - @TestMetadata("varargsOverride2.kt") - public void testVarargsOverride2() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/varargs/varargsOverride2.kt"); - } - - @TestMetadata("varargsOverride3.kt") - public void testVarargsOverride3() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/varargs/varargsOverride3.kt"); - } - } - - @TestMetadata("compiler/testData/codegen/boxAgainstJava/visibility") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Visibility extends AbstractFirBlackBoxAgainstJavaCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - - public void testAllFilesPresentInVisibility() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/visibility"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); - } - - @TestMetadata("compiler/testData/codegen/boxAgainstJava/visibility/package") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Package extends AbstractFirBlackBoxAgainstJavaCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - - public void testAllFilesPresentInPackage() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/visibility/package"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); - } - - @TestMetadata("kt2781.kt") - public void testKt2781() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/visibility/package/kt2781.kt"); - } - - @TestMetadata("packageClass.kt") - public void testPackageClass() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/visibility/package/packageClass.kt"); - } - - @TestMetadata("packageFun.kt") - public void testPackageFun() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/visibility/package/packageFun.kt"); - } - - @TestMetadata("packageProperty.kt") - public void testPackageProperty() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/visibility/package/packageProperty.kt"); - } - } - - @TestMetadata("compiler/testData/codegen/boxAgainstJava/visibility/protectedAndPackage") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class ProtectedAndPackage extends AbstractFirBlackBoxAgainstJavaCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - - public void testAllFilesPresentInProtectedAndPackage() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/visibility/protectedAndPackage"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); - } - - @TestMetadata("overrideProtectedFunInPackage.kt") - public void testOverrideProtectedFunInPackage() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/visibility/protectedAndPackage/overrideProtectedFunInPackage.kt"); - } - - @TestMetadata("protectedAccessor.kt") - public void testProtectedAccessor() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/visibility/protectedAndPackage/protectedAccessor.kt"); - } - - @TestMetadata("protectedFunInPackage.kt") - public void testProtectedFunInPackage() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/visibility/protectedAndPackage/protectedFunInPackage.kt"); - } - - @TestMetadata("protectedPropertyInPackage.kt") - public void testProtectedPropertyInPackage() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/visibility/protectedAndPackage/protectedPropertyInPackage.kt"); - } - - @TestMetadata("protectedPropertyInPackageFromCrossinline.kt") - public void testProtectedPropertyInPackageFromCrossinline() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/visibility/protectedAndPackage/protectedPropertyInPackageFromCrossinline.kt"); - } - - @TestMetadata("protectedStaticClass.kt") - public void testProtectedStaticClass() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/visibility/protectedAndPackage/protectedStaticClass.kt"); - } - - @TestMetadata("protectedSuperField.kt") - public void testProtectedSuperField() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/visibility/protectedAndPackage/protectedSuperField.kt"); - } - - @TestMetadata("protectedSuperMethod.kt") - public void testProtectedSuperMethod() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/visibility/protectedAndPackage/protectedSuperMethod.kt"); - } - } - - @TestMetadata("compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class ProtectedStatic extends AbstractFirBlackBoxAgainstJavaCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - - public void testAllFilesPresentInProtectedStatic() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); - } - - @TestMetadata("funCallInConstructor.kt") - public void testFunCallInConstructor() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/funCallInConstructor.kt"); - } - - @TestMetadata("funClassObject.kt") - public void testFunClassObject() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/funClassObject.kt"); - } - - @TestMetadata("funGenericClass.kt") - public void testFunGenericClass() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/funGenericClass.kt"); - } - - @TestMetadata("funNestedStaticClass.kt") - public void testFunNestedStaticClass() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/funNestedStaticClass.kt"); - } - - @TestMetadata("funNestedStaticClass2.kt") - public void testFunNestedStaticClass2() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/funNestedStaticClass2.kt"); - } - - @TestMetadata("funNestedStaticGenericClass.kt") - public void testFunNestedStaticGenericClass() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/funNestedStaticGenericClass.kt"); - } - - @TestMetadata("funNotDirectSuperClass.kt") - public void testFunNotDirectSuperClass() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/funNotDirectSuperClass.kt"); - } - - @TestMetadata("funObject.kt") - public void testFunObject() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/funObject.kt"); - } - - @TestMetadata("simpleClass.kt") - public void testSimpleClass() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/simpleClass.kt"); - } - - @TestMetadata("simpleClass2.kt") - public void testSimpleClass2() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/simpleClass2.kt"); - } - - @TestMetadata("simpleFun.kt") - public void testSimpleFun() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/simpleFun.kt"); - } - - @TestMetadata("simpleProperty.kt") - public void testSimpleProperty() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/simpleProperty.kt"); - } - } - } -} diff --git a/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirBlackBoxCodegenTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirBlackBoxCodegenTestGenerated.java similarity index 93% rename from compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirBlackBoxCodegenTestGenerated.java rename to compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirBlackBoxCodegenTestGenerated.java index 6441ede6b42..eb521be52a6 100644 --- a/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirBlackBoxCodegenTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirBlackBoxCodegenTestGenerated.java @@ -28,7 +28,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/annotations") @TestDataPath("$PROJECT_ROOT") - public class Annotations extends AbstractFirBlackBoxCodegenTest { + public class Annotations { @Test public void testAllFilesPresentInAnnotations() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/annotations"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -124,18 +124,66 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT runTest("compiler/testData/codegen/box/annotations/delegatedPropertySetter.kt"); } + @Test + @TestMetadata("divisionByZeroInJava.kt") + public void testDivisionByZeroInJava() throws Exception { + runTest("compiler/testData/codegen/box/annotations/divisionByZeroInJava.kt"); + } + @Test @TestMetadata("fileClassWithFileAnnotation.kt") public void testFileClassWithFileAnnotation() throws Exception { runTest("compiler/testData/codegen/box/annotations/fileClassWithFileAnnotation.kt"); } + @Test + @TestMetadata("javaAnnotationArrayValueDefault.kt") + public void testJavaAnnotationArrayValueDefault() throws Exception { + runTest("compiler/testData/codegen/box/annotations/javaAnnotationArrayValueDefault.kt"); + } + + @Test + @TestMetadata("javaAnnotationArrayValueNoDefault.kt") + public void testJavaAnnotationArrayValueNoDefault() throws Exception { + runTest("compiler/testData/codegen/box/annotations/javaAnnotationArrayValueNoDefault.kt"); + } + + @Test + @TestMetadata("javaAnnotationCall.kt") + public void testJavaAnnotationCall() throws Exception { + runTest("compiler/testData/codegen/box/annotations/javaAnnotationCall.kt"); + } + + @Test + @TestMetadata("javaAnnotationDefault.kt") + public void testJavaAnnotationDefault() throws Exception { + runTest("compiler/testData/codegen/box/annotations/javaAnnotationDefault.kt"); + } + @Test @TestMetadata("javaAnnotationOnProperty.kt") public void testJavaAnnotationOnProperty() throws Exception { runTest("compiler/testData/codegen/box/annotations/javaAnnotationOnProperty.kt"); } + @Test + @TestMetadata("javaNegativePropertyAsAnnotationParameter.kt") + public void testJavaNegativePropertyAsAnnotationParameter() throws Exception { + runTest("compiler/testData/codegen/box/annotations/javaNegativePropertyAsAnnotationParameter.kt"); + } + + @Test + @TestMetadata("javaPropertyAsAnnotationParameter.kt") + public void testJavaPropertyAsAnnotationParameter() throws Exception { + runTest("compiler/testData/codegen/box/annotations/javaPropertyAsAnnotationParameter.kt"); + } + + @Test + @TestMetadata("javaPropertyWithIntInitializer.kt") + public void testJavaPropertyWithIntInitializer() throws Exception { + runTest("compiler/testData/codegen/box/annotations/javaPropertyWithIntInitializer.kt"); + } + @Test @TestMetadata("jvmAnnotationFlags.kt") public void testJvmAnnotationFlags() throws Exception { @@ -220,6 +268,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT runTest("compiler/testData/codegen/box/annotations/resolveWithLowPriorityAnnotation.kt"); } + @Test + @TestMetadata("retentionInJava.kt") + public void testRetentionInJava() throws Exception { + runTest("compiler/testData/codegen/box/annotations/retentionInJava.kt"); + } + @Test @TestMetadata("singleAssignmentToVarargInAnnotation.kt") public void testSingleAssignmentToVarargInAnnotation() throws Exception { @@ -265,7 +319,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/annotations/annotatedLambda") @TestDataPath("$PROJECT_ROOT") - public class AnnotatedLambda extends AbstractFirBlackBoxCodegenTest { + public class AnnotatedLambda { @Test public void testAllFilesPresentInAnnotatedLambda() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/annotations/annotatedLambda"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -302,10 +356,56 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT } } + @Nested + @TestMetadata("compiler/testData/codegen/box/annotations/kClassMapping") + @TestDataPath("$PROJECT_ROOT") + public class KClassMapping { + @Test + public void testAllFilesPresentInKClassMapping() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/annotations/kClassMapping"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @Test + @TestMetadata("arrayClassParameter.kt") + public void testArrayClassParameter() throws Exception { + runTest("compiler/testData/codegen/box/annotations/kClassMapping/arrayClassParameter.kt"); + } + + @Test + @TestMetadata("arrayClassParameterOnJavaClass.kt") + public void testArrayClassParameterOnJavaClass() throws Exception { + runTest("compiler/testData/codegen/box/annotations/kClassMapping/arrayClassParameterOnJavaClass.kt"); + } + + @Test + @TestMetadata("classParameter.kt") + public void testClassParameter() throws Exception { + runTest("compiler/testData/codegen/box/annotations/kClassMapping/classParameter.kt"); + } + + @Test + @TestMetadata("classParameterOnJavaClass.kt") + public void testClassParameterOnJavaClass() throws Exception { + runTest("compiler/testData/codegen/box/annotations/kClassMapping/classParameterOnJavaClass.kt"); + } + + @Test + @TestMetadata("varargClassParameter.kt") + public void testVarargClassParameter() throws Exception { + runTest("compiler/testData/codegen/box/annotations/kClassMapping/varargClassParameter.kt"); + } + + @Test + @TestMetadata("varargClassParameterOnJavaClass.kt") + public void testVarargClassParameterOnJavaClass() throws Exception { + runTest("compiler/testData/codegen/box/annotations/kClassMapping/varargClassParameterOnJavaClass.kt"); + } + } + @Nested @TestMetadata("compiler/testData/codegen/box/annotations/typeAnnotations") @TestDataPath("$PROJECT_ROOT") - public class TypeAnnotations extends AbstractFirBlackBoxCodegenTest { + public class TypeAnnotations { @Test public void testAllFilesPresentInTypeAnnotations() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/annotations/typeAnnotations"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -323,6 +423,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT runTest("compiler/testData/codegen/box/annotations/typeAnnotations/implicitReturn.kt"); } + @Test + @TestMetadata("implicitReturnAgainstCompiled.kt") + public void testImplicitReturnAgainstCompiled() throws Exception { + runTest("compiler/testData/codegen/box/annotations/typeAnnotations/implicitReturnAgainstCompiled.kt"); + } + @Test @TestMetadata("kt41484.kt") public void testKt41484() throws Exception { @@ -352,7 +458,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/argumentOrder") @TestDataPath("$PROJECT_ROOT") - public class ArgumentOrder extends AbstractFirBlackBoxCodegenTest { + public class ArgumentOrder { @Test public void testAllFilesPresentInArgumentOrder() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/argumentOrder"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -458,7 +564,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/arrays") @TestDataPath("$PROJECT_ROOT") - public class Arrays extends AbstractFirBlackBoxCodegenTest { + public class Arrays { @Test public void testAllFilesPresentInArrays() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/arrays"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -845,7 +951,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/arrays/arraysOfInlineClass") @TestDataPath("$PROJECT_ROOT") - public class ArraysOfInlineClass extends AbstractFirBlackBoxCodegenTest { + public class ArraysOfInlineClass { @Test @TestMetadata("accessArrayOfInlineClass.kt") public void testAccessArrayOfInlineClass() throws Exception { @@ -873,7 +979,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/arrays/forInReversed") @TestDataPath("$PROJECT_ROOT") - public class ForInReversed extends AbstractFirBlackBoxCodegenTest { + public class ForInReversed { @Test public void testAllFilesPresentInForInReversed() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/arrays/forInReversed"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -907,7 +1013,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/arrays/multiDecl") @TestDataPath("$PROJECT_ROOT") - public class MultiDecl extends AbstractFirBlackBoxCodegenTest { + public class MultiDecl { @Test public void testAllFilesPresentInMultiDecl() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/arrays/multiDecl"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -964,7 +1070,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/arrays/multiDecl/int") @TestDataPath("$PROJECT_ROOT") - public class Int extends AbstractFirBlackBoxCodegenTest { + public class Int { @Test public void testAllFilesPresentInInt() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/arrays/multiDecl/int"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -998,7 +1104,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/arrays/multiDecl/long") @TestDataPath("$PROJECT_ROOT") - public class Long extends AbstractFirBlackBoxCodegenTest { + public class Long { @Test public void testAllFilesPresentInLong() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/arrays/multiDecl/long"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -1034,7 +1140,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/assert") @TestDataPath("$PROJECT_ROOT") - public class Assert extends AbstractFirBlackBoxCodegenTest { + public class Assert { @Test public void testAllFilesPresentInAssert() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/assert"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -1055,7 +1161,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/assert/jvm") @TestDataPath("$PROJECT_ROOT") - public class Jvm extends AbstractFirBlackBoxCodegenTest { + public class Jvm { @Test public void testAllFilesPresentInJvm() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/assert/jvm"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -1198,7 +1304,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/binaryOp") @TestDataPath("$PROJECT_ROOT") - public class BinaryOp extends AbstractFirBlackBoxCodegenTest { + public class BinaryOp { @Test public void testAllFilesPresentInBinaryOp() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/binaryOp"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -1364,7 +1470,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/boxingOptimization") @TestDataPath("$PROJECT_ROOT") - public class BoxingOptimization extends AbstractFirBlackBoxCodegenTest { + public class BoxingOptimization { @Test public void testAllFilesPresentInBoxingOptimization() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/boxingOptimization"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -1560,7 +1666,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/bridges") @TestDataPath("$PROJECT_ROOT") - public class Bridges extends AbstractFirBlackBoxCodegenTest { + public class Bridges { @Test @TestMetadata("abstractOverrideBridge.kt") public void testAbstractOverrideBridge() throws Exception { @@ -1917,7 +2023,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/bridges/substitutionInSuperClass") @TestDataPath("$PROJECT_ROOT") - public class SubstitutionInSuperClass extends AbstractFirBlackBoxCodegenTest { + public class SubstitutionInSuperClass { @Test @TestMetadata("abstractFun.kt") public void testAbstractFun() throws Exception { @@ -1994,7 +2100,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/builtinStubMethods") @TestDataPath("$PROJECT_ROOT") - public class BuiltinStubMethods extends AbstractFirBlackBoxCodegenTest { + public class BuiltinStubMethods { @Test @TestMetadata("abstractMember.kt") public void testAbstractMember() throws Exception { @@ -2141,7 +2247,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/builtinStubMethods/extendJavaCollections") @TestDataPath("$PROJECT_ROOT") - public class ExtendJavaCollections extends AbstractFirBlackBoxCodegenTest { + public class ExtendJavaCollections { @Test @TestMetadata("abstractList.kt") public void testAbstractList() throws Exception { @@ -2193,7 +2299,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/builtinStubMethods/mapGetOrDefault") @TestDataPath("$PROJECT_ROOT") - public class MapGetOrDefault extends AbstractFirBlackBoxCodegenTest { + public class MapGetOrDefault { @Test public void testAllFilesPresentInMapGetOrDefault() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builtinStubMethods/mapGetOrDefault"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -2221,7 +2327,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/builtinStubMethods/mapRemove") @TestDataPath("$PROJECT_ROOT") - public class MapRemove extends AbstractFirBlackBoxCodegenTest { + public class MapRemove { @Test public void testAllFilesPresentInMapRemove() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builtinStubMethods/mapRemove"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -2256,7 +2362,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/callableReference") @TestDataPath("$PROJECT_ROOT") - public class CallableReference extends AbstractFirBlackBoxCodegenTest { + public class CallableReference { @Test public void testAllFilesPresentInCallableReference() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/callableReference"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -2274,6 +2380,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT runTest("compiler/testData/codegen/box/callableReference/classesAreSynthetic.kt"); } + @Test + @TestMetadata("constructor.kt") + public void testConstructor() throws Exception { + runTest("compiler/testData/codegen/box/callableReference/constructor.kt"); + } + @Test @TestMetadata("genericConstructorReference.kt") public void testGenericConstructorReference() throws Exception { @@ -2292,6 +2404,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT runTest("compiler/testData/codegen/box/callableReference/javaField.kt"); } + @Test + @TestMetadata("kt16412.kt") + public void testKt16412() throws Exception { + runTest("compiler/testData/codegen/box/callableReference/kt16412.kt"); + } + @Test @TestMetadata("kt16752.kt") public void testKt16752() throws Exception { @@ -2340,10 +2458,28 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT runTest("compiler/testData/codegen/box/callableReference/optimizedSuperclasses_before.kt"); } + @Test + @TestMetadata("publicFinalField.kt") + public void testPublicFinalField() throws Exception { + runTest("compiler/testData/codegen/box/callableReference/publicFinalField.kt"); + } + + @Test + @TestMetadata("publicMutableField.kt") + public void testPublicMutableField() throws Exception { + runTest("compiler/testData/codegen/box/callableReference/publicMutableField.kt"); + } + + @Test + @TestMetadata("staticMethod.kt") + public void testStaticMethod() throws Exception { + runTest("compiler/testData/codegen/box/callableReference/staticMethod.kt"); + } + @Nested @TestMetadata("compiler/testData/codegen/box/callableReference/adaptedReferences") @TestDataPath("$PROJECT_ROOT") - public class AdaptedReferences extends AbstractFirBlackBoxCodegenTest { + public class AdaptedReferences { @Test public void testAllFilesPresentInAdaptedReferences() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/callableReference/adaptedReferences"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -2514,7 +2650,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/callableReference/adaptedReferences/suspendConversion") @TestDataPath("$PROJECT_ROOT") - public class SuspendConversion extends AbstractFirBlackBoxCodegenTest { + public class SuspendConversion { @Test @TestMetadata("adaptedWithCoercionToUnit.kt") public void testAdaptedWithCoercionToUnit() throws Exception { @@ -2615,7 +2751,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/callableReference/bound") @TestDataPath("$PROJECT_ROOT") - public class Bound extends AbstractFirBlackBoxCodegenTest { + public class Bound { @Test @TestMetadata("adapted.kt") public void testAdapted() throws Exception { @@ -2792,7 +2928,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/callableReference/bound/equals") @TestDataPath("$PROJECT_ROOT") - public class Equals extends AbstractFirBlackBoxCodegenTest { + public class Equals { @Test public void testAllFilesPresentInEquals() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/callableReference/bound/equals"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -2827,7 +2963,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/callableReference/equality") @TestDataPath("$PROJECT_ROOT") - public class Equality extends AbstractFirBlackBoxCodegenTest { + public class Equality { @Test public void testAllFilesPresentInEquality() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/callableReference/equality"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -2909,7 +3045,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/callableReference/function") @TestDataPath("$PROJECT_ROOT") - public class Function extends AbstractFirBlackBoxCodegenTest { + public class Function { @Test @TestMetadata("abstractClassMember.kt") public void testAbstractClassMember() throws Exception { @@ -3248,7 +3384,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/callableReference/function/local") @TestDataPath("$PROJECT_ROOT") - public class Local extends AbstractFirBlackBoxCodegenTest { + public class Local { @Test public void testAllFilesPresentInLocal() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/callableReference/function/local"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -3379,7 +3515,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/callableReference/property") @TestDataPath("$PROJECT_ROOT") - public class Property extends AbstractFirBlackBoxCodegenTest { + public class Property { @Test @TestMetadata("accessViaSubclass.kt") public void testAccessViaSubclass() throws Exception { @@ -3569,7 +3705,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/callableReference/serializability") @TestDataPath("$PROJECT_ROOT") - public class Serializability extends AbstractFirBlackBoxCodegenTest { + public class Serializability { @Test @TestMetadata("adaptedReferences.kt") public void testAdaptedReferences() throws Exception { @@ -3616,7 +3752,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/casts") @TestDataPath("$PROJECT_ROOT") - public class Casts extends AbstractFirBlackBoxCodegenTest { + public class Casts { @Test public void testAllFilesPresentInCasts() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/casts"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -3775,7 +3911,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/casts/functions") @TestDataPath("$PROJECT_ROOT") - public class Functions extends AbstractFirBlackBoxCodegenTest { + public class Functions { @Test public void testAllFilesPresentInFunctions() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/casts/functions"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -3863,7 +3999,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/casts/javaInterop") @TestDataPath("$PROJECT_ROOT") - public class JavaInterop extends AbstractFirBlackBoxCodegenTest { + public class JavaInterop { @Test public void testAllFilesPresentInJavaInterop() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/casts/javaInterop"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -3957,7 +4093,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/casts/literalExpressionAsGenericArgument") @TestDataPath("$PROJECT_ROOT") - public class LiteralExpressionAsGenericArgument extends AbstractFirBlackBoxCodegenTest { + public class LiteralExpressionAsGenericArgument { @Test public void testAllFilesPresentInLiteralExpressionAsGenericArgument() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/casts/literalExpressionAsGenericArgument"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -4009,7 +4145,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/casts/mutableCollections") @TestDataPath("$PROJECT_ROOT") - public class MutableCollections extends AbstractFirBlackBoxCodegenTest { + public class MutableCollections { @Test public void testAllFilesPresentInMutableCollections() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/casts/mutableCollections"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -4068,7 +4204,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/checkcastOptimization") @TestDataPath("$PROJECT_ROOT") - public class CheckcastOptimization extends AbstractFirBlackBoxCodegenTest { + public class CheckcastOptimization { @Test public void testAllFilesPresentInCheckcastOptimization() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/checkcastOptimization"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -4090,7 +4226,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/classLiteral") @TestDataPath("$PROJECT_ROOT") - public class ClassLiteral extends AbstractFirBlackBoxCodegenTest { + public class ClassLiteral { @Test public void testAllFilesPresentInClassLiteral() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/classLiteral"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -4111,7 +4247,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/classLiteral/bound") @TestDataPath("$PROJECT_ROOT") - public class Bound extends AbstractFirBlackBoxCodegenTest { + public class Bound { @Test public void testAllFilesPresentInBound() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/classLiteral/bound"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -4151,7 +4287,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/classLiteral/java") @TestDataPath("$PROJECT_ROOT") - public class Java extends AbstractFirBlackBoxCodegenTest { + public class Java { @Test public void testAllFilesPresentInJava() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/classLiteral/java"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -4210,7 +4346,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/classes") @TestDataPath("$PROJECT_ROOT") - public class Classes extends AbstractFirBlackBoxCodegenTest { + public class Classes { @Test public void testAllFilesPresentInClasses() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/classes"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -4933,7 +5069,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/classes/inner") @TestDataPath("$PROJECT_ROOT") - public class Inner extends AbstractFirBlackBoxCodegenTest { + public class Inner { @Test public void testAllFilesPresentInInner() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/classes/inner"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -4986,7 +5122,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/closures") @TestDataPath("$PROJECT_ROOT") - public class Closures extends AbstractFirBlackBoxCodegenTest { + public class Closures { @Test public void testAllFilesPresentInClosures() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/closures"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -5124,6 +5260,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT runTest("compiler/testData/codegen/box/closures/kt2151.kt"); } + @Test + @TestMetadata("kt23881.kt") + public void testKt23881() throws Exception { + runTest("compiler/testData/codegen/box/closures/kt23881.kt"); + } + @Test @TestMetadata("kt3152.kt") public void testKt3152() throws Exception { @@ -5271,7 +5413,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall") @TestDataPath("$PROJECT_ROOT") - public class CaptureInSuperConstructorCall extends AbstractFirBlackBoxCodegenTest { + public class CaptureInSuperConstructorCall { @Test public void testAllFilesPresentInCaptureInSuperConstructorCall() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/closures/captureInSuperConstructorCall"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -5473,7 +5615,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/closures/captureOuterProperty") @TestDataPath("$PROJECT_ROOT") - public class CaptureOuterProperty extends AbstractFirBlackBoxCodegenTest { + public class CaptureOuterProperty { @Test public void testAllFilesPresentInCaptureOuterProperty() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/closures/captureOuterProperty"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -5531,7 +5673,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/closures/capturedVarsOptimization") @TestDataPath("$PROJECT_ROOT") - public class CapturedVarsOptimization extends AbstractFirBlackBoxCodegenTest { + public class CapturedVarsOptimization { @Test public void testAllFilesPresentInCapturedVarsOptimization() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/closures/capturedVarsOptimization"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -5613,7 +5755,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/closures/closureInsideClosure") @TestDataPath("$PROJECT_ROOT") - public class ClosureInsideClosure extends AbstractFirBlackBoxCodegenTest { + public class ClosureInsideClosure { @Test public void testAllFilesPresentInClosureInsideClosure() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/closures/closureInsideClosure"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -5660,7 +5802,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/collectionLiterals") @TestDataPath("$PROJECT_ROOT") - public class CollectionLiterals extends AbstractFirBlackBoxCodegenTest { + public class CollectionLiterals { @Test public void testAllFilesPresentInCollectionLiterals() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/collectionLiterals"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -5694,7 +5836,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/collections") @TestDataPath("$PROJECT_ROOT") - public class Collections extends AbstractFirBlackBoxCodegenTest { + public class Collections { @Test @TestMetadata("addCollectionStubWithCovariantOverride.kt") public void testAddCollectionStubWithCovariantOverride() throws Exception { @@ -5908,7 +6050,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/companion") @TestDataPath("$PROJECT_ROOT") - public class Companion extends AbstractFirBlackBoxCodegenTest { + public class Companion { @Test public void testAllFilesPresentInCompanion() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/companion"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -5930,7 +6072,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/compatibility") @TestDataPath("$PROJECT_ROOT") - public class Compatibility extends AbstractFirBlackBoxCodegenTest { + public class Compatibility { @Test public void testAllFilesPresentInCompatibility() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/compatibility"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -5943,10 +6085,884 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT } } + @Nested + @TestMetadata("compiler/testData/codegen/box/compileKotlinAgainstKotlin") + @TestDataPath("$PROJECT_ROOT") + public class CompileKotlinAgainstKotlin { + @Test + public void testAllFilesPresentInCompileKotlinAgainstKotlin() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/compileKotlinAgainstKotlin"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @Test + @TestMetadata("annotationInInterface.kt") + public void testAnnotationInInterface() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/annotationInInterface.kt"); + } + + @Test + @TestMetadata("annotationOnTypeUseInTypeAlias.kt") + public void testAnnotationOnTypeUseInTypeAlias() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/annotationOnTypeUseInTypeAlias.kt"); + } + + @Test + @TestMetadata("annotationsOnTypeAliases.kt") + public void testAnnotationsOnTypeAliases() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/annotationsOnTypeAliases.kt"); + } + + @Test + @TestMetadata("callDeserializedPropertyOnInlineClassType.kt") + public void testCallDeserializedPropertyOnInlineClassType() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/callDeserializedPropertyOnInlineClassType.kt"); + } + + @Test + @TestMetadata("callDeserializedPropertyOnInlineClassTypeOldMangling.kt") + public void testCallDeserializedPropertyOnInlineClassTypeOldMangling() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/callDeserializedPropertyOnInlineClassTypeOldMangling.kt"); + } + + @Test + @TestMetadata("callsToMultifileClassFromOtherPackage.kt") + public void testCallsToMultifileClassFromOtherPackage() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/callsToMultifileClassFromOtherPackage.kt"); + } + + @Test + @TestMetadata("clashingFakeOverrideSignatures.kt") + public void testClashingFakeOverrideSignatures() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/clashingFakeOverrideSignatures.kt"); + } + + @Test + @TestMetadata("classInObject.kt") + public void testClassInObject() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/classInObject.kt"); + } + + @Test + @TestMetadata("companionObjectInEnum.kt") + public void testCompanionObjectInEnum() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/companionObjectInEnum.kt"); + } + + @Test + @TestMetadata("companionObjectMember.kt") + public void testCompanionObjectMember() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/companionObjectMember.kt"); + } + + @Test + @TestMetadata("constPropertyReferenceFromMultifileClass.kt") + public void testConstPropertyReferenceFromMultifileClass() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/constPropertyReferenceFromMultifileClass.kt"); + } + + @Test + @TestMetadata("constructorVararg.kt") + public void testConstructorVararg() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/constructorVararg.kt"); + } + + @Test + @TestMetadata("constructorWithInlineClassParametersInBinaryDependencies.kt") + public void testConstructorWithInlineClassParametersInBinaryDependencies() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/constructorWithInlineClassParametersInBinaryDependencies.kt"); + } + + @Test + @TestMetadata("constructorWithInlineClassParametersInBinaryDependenciesOldMangling.kt") + public void testConstructorWithInlineClassParametersInBinaryDependenciesOldMangling() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/constructorWithInlineClassParametersInBinaryDependenciesOldMangling.kt"); + } + + @Test + @TestMetadata("copySamOnInline.kt") + public void testCopySamOnInline() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/copySamOnInline.kt"); + } + + @Test + @TestMetadata("copySamOnInline2.kt") + public void testCopySamOnInline2() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/copySamOnInline2.kt"); + } + + @Test + @TestMetadata("coroutinesBinary.kt") + public void testCoroutinesBinary() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/coroutinesBinary.kt"); + } + + @Test + @TestMetadata("defaultConstructor.kt") + public void testDefaultConstructor() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/defaultConstructor.kt"); + } + + @Test + @TestMetadata("defaultLambdaRegeneration.kt") + public void testDefaultLambdaRegeneration() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/defaultLambdaRegeneration.kt"); + } + + @Test + @TestMetadata("defaultLambdaRegeneration2.kt") + public void testDefaultLambdaRegeneration2() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/defaultLambdaRegeneration2.kt"); + } + + @Test + @TestMetadata("defaultWithInlineClassAndReceivers.kt") + public void testDefaultWithInlineClassAndReceivers() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/defaultWithInlineClassAndReceivers.kt"); + } + + @Test + @TestMetadata("defaultWithInlineClassAndReceiversOldMangling.kt") + public void testDefaultWithInlineClassAndReceiversOldMangling() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/defaultWithInlineClassAndReceiversOldMangling.kt"); + } + + @Test + @TestMetadata("delegatedDefault.kt") + public void testDelegatedDefault() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/delegatedDefault.kt"); + } + + @Test + @TestMetadata("delegationAndAnnotations.kt") + public void testDelegationAndAnnotations() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/delegationAndAnnotations.kt"); + } + + @Test + @TestMetadata("doublyNestedClass.kt") + public void testDoublyNestedClass() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/doublyNestedClass.kt"); + } + + @Test + @TestMetadata("enum.kt") + public void testEnum() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/enum.kt"); + } + + @Test + @TestMetadata("expectClassActualTypeAlias.kt") + public void testExpectClassActualTypeAlias() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/expectClassActualTypeAlias.kt"); + } + + @Test + @TestMetadata("fakeOverridesForIntersectionTypes.kt") + public void testFakeOverridesForIntersectionTypes() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/fakeOverridesForIntersectionTypes.kt"); + } + + @Test + @TestMetadata("importCompanion.kt") + public void testImportCompanion() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/importCompanion.kt"); + } + + @Test + @TestMetadata("inlineClassFakeOverrideMangling.kt") + public void testInlineClassFakeOverrideMangling() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/inlineClassFakeOverrideMangling.kt"); + } + + @Test + @TestMetadata("inlineClassFakeOverrideManglingOldMangling.kt") + public void testInlineClassFakeOverrideManglingOldMangling() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/inlineClassFakeOverrideManglingOldMangling.kt"); + } + + @Test + @TestMetadata("inlineClassFromBinaryDependencies.kt") + public void testInlineClassFromBinaryDependencies() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/inlineClassFromBinaryDependencies.kt"); + } + + @Test + @TestMetadata("inlineClassFromBinaryDependenciesOldMangling.kt") + public void testInlineClassFromBinaryDependenciesOldMangling() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/inlineClassFromBinaryDependenciesOldMangling.kt"); + } + + @Test + @TestMetadata("inlineClassInlineFunctionCall.kt") + public void testInlineClassInlineFunctionCall() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/inlineClassInlineFunctionCall.kt"); + } + + @Test + @TestMetadata("inlineClassInlineFunctionCallOldMangling.kt") + public void testInlineClassInlineFunctionCallOldMangling() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/inlineClassInlineFunctionCallOldMangling.kt"); + } + + @Test + @TestMetadata("inlineClassInlineProperty.kt") + public void testInlineClassInlineProperty() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/inlineClassInlineProperty.kt"); + } + + @Test + @TestMetadata("inlineClassInlinePropertyOldMangling.kt") + public void testInlineClassInlinePropertyOldMangling() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/inlineClassInlinePropertyOldMangling.kt"); + } + + @Test + @TestMetadata("inlineClassesOldMangling.kt") + public void testInlineClassesOldMangling() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/inlineClassesOldMangling.kt"); + } + + @Test + @TestMetadata("inlinedConstants.kt") + public void testInlinedConstants() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/inlinedConstants.kt"); + } + + @Test + @TestMetadata("innerClassConstructor.kt") + public void testInnerClassConstructor() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/innerClassConstructor.kt"); + } + + @Test + @TestMetadata("interfaceDelegationAndBridgesProcessing.kt") + public void testInterfaceDelegationAndBridgesProcessing() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/interfaceDelegationAndBridgesProcessing.kt"); + } + + @Test + @TestMetadata("internalSetterOverridden.kt") + public void testInternalSetterOverridden() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/internalSetterOverridden.kt"); + } + + @Test + @TestMetadata("internalWithDefaultArgs.kt") + public void testInternalWithDefaultArgs() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/internalWithDefaultArgs.kt"); + } + + @Test + @TestMetadata("internalWithInlineClass.kt") + public void testInternalWithInlineClass() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/internalWithInlineClass.kt"); + } + + @Test + @TestMetadata("internalWithOtherModuleName.kt") + public void testInternalWithOtherModuleName() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/internalWithOtherModuleName.kt"); + } + + @Test + @TestMetadata("intersectionOverrideProperies.kt") + public void testIntersectionOverrideProperies() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/intersectionOverrideProperies.kt"); + } + + @Test + @TestMetadata("jvmField.kt") + public void testJvmField() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvmField.kt"); + } + + @Test + @TestMetadata("jvmFieldInAnnotationCompanion.kt") + public void testJvmFieldInAnnotationCompanion() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvmFieldInAnnotationCompanion.kt"); + } + + @Test + @TestMetadata("jvmFieldInConstructor.kt") + public void testJvmFieldInConstructor() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvmFieldInConstructor.kt"); + } + + @Test + @TestMetadata("jvmFieldInInterfaceCompanion.kt") + public void testJvmFieldInInterfaceCompanion() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvmFieldInInterfaceCompanion.kt"); + } + + @Test + @TestMetadata("jvmNames.kt") + public void testJvmNames() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvmNames.kt"); + } + + @Test + @TestMetadata("jvmPackageName.kt") + public void testJvmPackageName() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvmPackageName.kt"); + } + + @Test + @TestMetadata("jvmPackageNameInRootPackage.kt") + public void testJvmPackageNameInRootPackage() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvmPackageNameInRootPackage.kt"); + } + + @Test + @TestMetadata("jvmPackageNameMultifileClass.kt") + public void testJvmPackageNameMultifileClass() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvmPackageNameMultifileClass.kt"); + } + + @Test + @TestMetadata("jvmPackageNameWithJvmName.kt") + public void testJvmPackageNameWithJvmName() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvmPackageNameWithJvmName.kt"); + } + + @Test + @TestMetadata("jvmStaticInObject.kt") + public void testJvmStaticInObject() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvmStaticInObject.kt"); + } + + @Test + @TestMetadata("jvmStaticInObjectPropertyReference.kt") + public void testJvmStaticInObjectPropertyReference() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvmStaticInObjectPropertyReference.kt"); + } + + @Test + @TestMetadata("kotlinPropertyAsAnnotationParameter.kt") + public void testKotlinPropertyAsAnnotationParameter() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/kotlinPropertyAsAnnotationParameter.kt"); + } + + @Test + @TestMetadata("kt14012.kt") + public void testKt14012() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/kt14012.kt"); + } + + @Test + @TestMetadata("kt14012_multi.kt") + public void testKt14012_multi() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/kt14012_multi.kt"); + } + + @Test + @TestMetadata("kt21775.kt") + public void testKt21775() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/kt21775.kt"); + } + + @Test + @TestMetadata("metadataForMembersInLocalClassInInitializer.kt") + public void testMetadataForMembersInLocalClassInInitializer() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/metadataForMembersInLocalClassInInitializer.kt"); + } + + @Test + @TestMetadata("multifileClassInlineFunctionAccessingProperty.kt") + public void testMultifileClassInlineFunctionAccessingProperty() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/multifileClassInlineFunctionAccessingProperty.kt"); + } + + @Test + @TestMetadata("multifileClassWithTypealias.kt") + public void testMultifileClassWithTypealias() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/multifileClassWithTypealias.kt"); + } + + @Test + @TestMetadata("nestedClass.kt") + public void testNestedClass() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/nestedClass.kt"); + } + + @Test + @TestMetadata("nestedClassInAnnotationArgument.kt") + public void testNestedClassInAnnotationArgument() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/nestedClassInAnnotationArgument.kt"); + } + + @Test + @TestMetadata("nestedEnum.kt") + public void testNestedEnum() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/nestedEnum.kt"); + } + + @Test + @TestMetadata("nestedFunctionTypeAliasExpansion.kt") + public void testNestedFunctionTypeAliasExpansion() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/nestedFunctionTypeAliasExpansion.kt"); + } + + @Test + @TestMetadata("nestedObject.kt") + public void testNestedObject() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/nestedObject.kt"); + } + + @Test + @TestMetadata("nestedTypeAliasExpansion.kt") + public void testNestedTypeAliasExpansion() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/nestedTypeAliasExpansion.kt"); + } + + @Test + @TestMetadata("noExplicitOverrideForDelegatedFromSupertype.kt") + public void testNoExplicitOverrideForDelegatedFromSupertype() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/noExplicitOverrideForDelegatedFromSupertype.kt"); + } + + @Test + @TestMetadata("optionalAnnotation.kt") + public void testOptionalAnnotation() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/optionalAnnotation.kt"); + } + + @Test + @TestMetadata("platformTypes.kt") + public void testPlatformTypes() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/platformTypes.kt"); + } + + @Test + @TestMetadata("privateCompanionObjectValInDifferentModule.kt") + public void testPrivateCompanionObjectValInDifferentModule() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/privateCompanionObjectValInDifferentModule.kt"); + } + + @Test + @TestMetadata("privateCompanionObjectValInDifferentModuleOldMangling.kt") + public void testPrivateCompanionObjectValInDifferentModuleOldMangling() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/privateCompanionObjectValInDifferentModuleOldMangling.kt"); + } + + @Test + @TestMetadata("privateTopLevelValInDifferentModule.kt") + public void testPrivateTopLevelValInDifferentModule() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/privateTopLevelValInDifferentModule.kt"); + } + + @Test + @TestMetadata("privateTopLevelValInDifferentModuleOldMangling.kt") + public void testPrivateTopLevelValInDifferentModuleOldMangling() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/privateTopLevelValInDifferentModuleOldMangling.kt"); + } + + @Test + @TestMetadata("propertyReference.kt") + public void testPropertyReference() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/propertyReference.kt"); + } + + @Test + @TestMetadata("recursiveGeneric.kt") + public void testRecursiveGeneric() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/recursiveGeneric.kt"); + } + + @Test + @TestMetadata("reflectTopLevelFunctionOtherFile.kt") + public void testReflectTopLevelFunctionOtherFile() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/reflectTopLevelFunctionOtherFile.kt"); + } + + @Test + @TestMetadata("sealedClass.kt") + public void testSealedClass() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/sealedClass.kt"); + } + + @Test + @TestMetadata("secondaryConstructors.kt") + public void testSecondaryConstructors() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/secondaryConstructors.kt"); + } + + @Test + @TestMetadata("simple.kt") + public void testSimple() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/simple.kt"); + } + + @Test + @TestMetadata("simpleValAnonymousObject.kt") + public void testSimpleValAnonymousObject() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/simpleValAnonymousObject.kt"); + } + + @Test + @TestMetadata("specialBridgesInDependencies.kt") + public void testSpecialBridgesInDependencies() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/specialBridgesInDependencies.kt"); + } + + @Test + @TestMetadata("starImportEnum.kt") + public void testStarImportEnum() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/starImportEnum.kt"); + } + + @Test + @TestMetadata("suspendFunWithDefaultMangling.kt") + public void testSuspendFunWithDefaultMangling() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/suspendFunWithDefaultMangling.kt"); + } + + @Test + @TestMetadata("suspendFunWithDefaultOldMangling.kt") + public void testSuspendFunWithDefaultOldMangling() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/suspendFunWithDefaultOldMangling.kt"); + } + + @Test + @TestMetadata("targetedJvmName.kt") + public void testTargetedJvmName() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/targetedJvmName.kt"); + } + + @Test + @TestMetadata("typeAliasesKt13181.kt") + public void testTypeAliasesKt13181() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/typeAliasesKt13181.kt"); + } + + @Test + @TestMetadata("unsignedTypesInAnnotations.kt") + public void testUnsignedTypesInAnnotations() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/unsignedTypesInAnnotations.kt"); + } + + @Test + @TestMetadata("useDeserializedFunInterface.kt") + public void testUseDeserializedFunInterface() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/useDeserializedFunInterface.kt"); + } + + @Nested + @TestMetadata("compiler/testData/codegen/box/compileKotlinAgainstKotlin/fir") + @TestDataPath("$PROJECT_ROOT") + public class Fir { + @Test + public void testAllFilesPresentInFir() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/compileKotlinAgainstKotlin/fir"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @Test + @TestMetadata("AnonymousObjectInProperty.kt") + public void testAnonymousObjectInProperty() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/fir/AnonymousObjectInProperty.kt"); + } + + @Test + @TestMetadata("ExistingSymbolInFakeOverride.kt") + public void testExistingSymbolInFakeOverride() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/fir/ExistingSymbolInFakeOverride.kt"); + } + + @Test + @TestMetadata("IncrementalCompilerRunner.kt") + public void testIncrementalCompilerRunner() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/fir/IncrementalCompilerRunner.kt"); + } + + @Test + @TestMetadata("IrConstAcceptMultiModule.kt") + public void testIrConstAcceptMultiModule() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/fir/IrConstAcceptMultiModule.kt"); + } + + @Test + @TestMetadata("LibraryProperty.kt") + public void testLibraryProperty() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/fir/LibraryProperty.kt"); + } + } + + @Nested + @TestMetadata("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8") + @TestDataPath("$PROJECT_ROOT") + public class Jvm8 { + @Test + public void testAllFilesPresentInJvm8() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @Nested + @TestMetadata("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults") + @TestDataPath("$PROJECT_ROOT") + public class Defaults { + @Test + public void testAllFilesPresentInDefaults() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @Test + @TestMetadata("superCall.kt") + public void testSuperCall() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/superCall.kt"); + } + + @Test + @TestMetadata("superCallFromInterface.kt") + public void testSuperCallFromInterface() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/superCallFromInterface.kt"); + } + + @Test + @TestMetadata("superCallFromInterface2.kt") + public void testSuperCallFromInterface2() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/superCallFromInterface2.kt"); + } + + @Test + @TestMetadata("superPropAccess.kt") + public void testSuperPropAccess() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/superPropAccess.kt"); + } + + @Test + @TestMetadata("superPropAccessFromInterface.kt") + public void testSuperPropAccessFromInterface() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/superPropAccessFromInterface.kt"); + } + + @Test + @TestMetadata("superPropAccessFromInterface2.kt") + public void testSuperPropAccessFromInterface2() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/superPropAccessFromInterface2.kt"); + } + + @Nested + @TestMetadata("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility") + @TestDataPath("$PROJECT_ROOT") + public class AllCompatibility { + @Test + public void testAllFilesPresentInAllCompatibility() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @Test + @TestMetadata("callStackTrace.kt") + public void testCallStackTrace() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/callStackTrace.kt"); + } + + @Test + @TestMetadata("superCall.kt") + public void testSuperCall() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superCall.kt"); + } + + @Test + @TestMetadata("superCallFromInterface.kt") + public void testSuperCallFromInterface() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superCallFromInterface.kt"); + } + + @Test + @TestMetadata("superCallFromInterface2.kt") + public void testSuperCallFromInterface2() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superCallFromInterface2.kt"); + } + + @Test + @TestMetadata("superPropAccess.kt") + public void testSuperPropAccess() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superPropAccess.kt"); + } + + @Test + @TestMetadata("superPropAccessFromInterface.kt") + public void testSuperPropAccessFromInterface() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superPropAccessFromInterface.kt"); + } + + @Test + @TestMetadata("superPropAccessFromInterface2.kt") + public void testSuperPropAccessFromInterface2() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superPropAccessFromInterface2.kt"); + } + + @Nested + @TestMetadata("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/delegationBy") + @TestDataPath("$PROJECT_ROOT") + public class DelegationBy { + @Test + public void testAllFilesPresentInDelegationBy() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/delegationBy"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @Test + @TestMetadata("simple.kt") + public void testSimple() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/delegationBy/simple.kt"); + } + + @Test + @TestMetadata("simpleProperty.kt") + public void testSimpleProperty() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/delegationBy/simpleProperty.kt"); + } + } + } + + @Nested + @TestMetadata("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/interop") + @TestDataPath("$PROJECT_ROOT") + public class Interop { + @Test + public void testAllFilesPresentInInterop() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/interop"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @Test + @TestMetadata("likeMemberClash.kt") + public void testLikeMemberClash() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/interop/likeMemberClash.kt"); + } + + @Test + @TestMetadata("likeSpecialization.kt") + public void testLikeSpecialization() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/interop/likeSpecialization.kt"); + } + + @Test + @TestMetadata("newAndOldSchemes.kt") + public void testNewAndOldSchemes() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/interop/newAndOldSchemes.kt"); + } + + @Test + @TestMetadata("newAndOldSchemes2.kt") + public void testNewAndOldSchemes2() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/interop/newAndOldSchemes2.kt"); + } + + @Test + @TestMetadata("newAndOldSchemes2Compatibility.kt") + public void testNewAndOldSchemes2Compatibility() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/interop/newAndOldSchemes2Compatibility.kt"); + } + + @Test + @TestMetadata("newAndOldSchemes3.kt") + public void testNewAndOldSchemes3() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/interop/newAndOldSchemes3.kt"); + } + + @Test + @TestMetadata("newSchemeWithJvmDefault.kt") + public void testNewSchemeWithJvmDefault() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/interop/newSchemeWithJvmDefault.kt"); + } + } + } + + @Nested + @TestMetadata("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/jvm8against6") + @TestDataPath("$PROJECT_ROOT") + public class Jvm8against6 { + @Test + public void testAllFilesPresentInJvm8against6() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/jvm8against6"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @Test + @TestMetadata("jdk8Against6.kt") + public void testJdk8Against6() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/jvm8against6/jdk8Against6.kt"); + } + + @Test + @TestMetadata("simpleCall.kt") + public void testSimpleCall() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/jvm8against6/simpleCall.kt"); + } + + @Test + @TestMetadata("simpleCallWithBigHierarchy.kt") + public void testSimpleCallWithBigHierarchy() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/jvm8against6/simpleCallWithBigHierarchy.kt"); + } + + @Test + @TestMetadata("simpleCallWithHierarchy.kt") + public void testSimpleCallWithHierarchy() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/jvm8against6/simpleCallWithHierarchy.kt"); + } + + @Test + @TestMetadata("simpleProp.kt") + public void testSimpleProp() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/jvm8against6/simpleProp.kt"); + } + + @Test + @TestMetadata("simplePropWithHierarchy.kt") + public void testSimplePropWithHierarchy() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/jvm8against6/simplePropWithHierarchy.kt"); + } + + @Nested + @TestMetadata("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/jvm8against6/delegation") + @TestDataPath("$PROJECT_ROOT") + public class Delegation { + @Test + public void testAllFilesPresentInDelegation() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/jvm8against6/delegation"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @Test + @TestMetadata("diamond.kt") + public void testDiamond() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/jvm8against6/delegation/diamond.kt"); + } + + @Test + @TestMetadata("diamond2.kt") + public void testDiamond2() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/jvm8against6/delegation/diamond2.kt"); + } + + @Test + @TestMetadata("diamond3.kt") + public void testDiamond3() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/jvm8against6/delegation/diamond3.kt"); + } + } + } + } + + @Nested + @TestMetadata("compiler/testData/codegen/box/compileKotlinAgainstKotlin/typeAnnotations") + @TestDataPath("$PROJECT_ROOT") + public class TypeAnnotations { + @Test + public void testAllFilesPresentInTypeAnnotations() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/compileKotlinAgainstKotlin/typeAnnotations"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @Test + @TestMetadata("implicitReturn.kt") + public void testImplicitReturn() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/typeAnnotations/implicitReturn.kt"); + } + } + } + @Nested @TestMetadata("compiler/testData/codegen/box/constants") @TestDataPath("$PROJECT_ROOT") - public class Constants extends AbstractFirBlackBoxCodegenTest { + public class Constants { @Test public void testAllFilesPresentInConstants() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/constants"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -6013,10 +7029,32 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT } } + @Nested + @TestMetadata("compiler/testData/codegen/box/constructor") + @TestDataPath("$PROJECT_ROOT") + public class Constructor { + @Test + public void testAllFilesPresentInConstructor() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/constructor"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @Test + @TestMetadata("genericConstructor.kt") + public void testGenericConstructor() throws Exception { + runTest("compiler/testData/codegen/box/constructor/genericConstructor.kt"); + } + + @Test + @TestMetadata("secondaryConstructor.kt") + public void testSecondaryConstructor() throws Exception { + runTest("compiler/testData/codegen/box/constructor/secondaryConstructor.kt"); + } + } + @Nested @TestMetadata("compiler/testData/codegen/box/constructorCall") @TestDataPath("$PROJECT_ROOT") - public class ConstructorCall extends AbstractFirBlackBoxCodegenTest { + public class ConstructorCall { @Test public void testAllFilesPresentInConstructorCall() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/constructorCall"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -6128,7 +7166,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/contracts") @TestDataPath("$PROJECT_ROOT") - public class Contracts extends AbstractFirBlackBoxCodegenTest { + public class Contracts { @Test public void testAllFilesPresentInContracts() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/contracts"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -6210,7 +7248,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/controlStructures") @TestDataPath("$PROJECT_ROOT") - public class ControlStructures extends AbstractFirBlackBoxCodegenTest { + public class ControlStructures { @Test public void testAllFilesPresentInControlStructures() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/controlStructures"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -6693,7 +7731,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions") @TestDataPath("$PROJECT_ROOT") - public class BreakContinueInExpressions extends AbstractFirBlackBoxCodegenTest { + public class BreakContinueInExpressions { @Test public void testAllFilesPresentInBreakContinueInExpressions() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -6811,7 +7849,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/controlStructures/forInArray") @TestDataPath("$PROJECT_ROOT") - public class ForInArray extends AbstractFirBlackBoxCodegenTest { + public class ForInArray { @Test public void testAllFilesPresentInForInArray() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/controlStructures/forInArray"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -6881,7 +7919,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex") @TestDataPath("$PROJECT_ROOT") - public class ForInArrayWithIndex extends AbstractFirBlackBoxCodegenTest { + public class ForInArrayWithIndex { @Test public void testAllFilesPresentInForInArrayWithIndex() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -7011,7 +8049,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/controlStructures/forInCharSequenceWithIndex") @TestDataPath("$PROJECT_ROOT") - public class ForInCharSequenceWithIndex extends AbstractFirBlackBoxCodegenTest { + public class ForInCharSequenceWithIndex { @Test public void testAllFilesPresentInForInCharSequenceWithIndex() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/controlStructures/forInCharSequenceWithIndex"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -7105,7 +8143,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/controlStructures/forInIterableWithIndex") @TestDataPath("$PROJECT_ROOT") - public class ForInIterableWithIndex extends AbstractFirBlackBoxCodegenTest { + public class ForInIterableWithIndex { @Test public void testAllFilesPresentInForInIterableWithIndex() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/controlStructures/forInIterableWithIndex"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -7181,7 +8219,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/controlStructures/forInSequenceWithIndex") @TestDataPath("$PROJECT_ROOT") - public class ForInSequenceWithIndex extends AbstractFirBlackBoxCodegenTest { + public class ForInSequenceWithIndex { @Test public void testAllFilesPresentInForInSequenceWithIndex() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/controlStructures/forInSequenceWithIndex"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -7257,7 +8295,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/controlStructures/returnsNothing") @TestDataPath("$PROJECT_ROOT") - public class ReturnsNothing extends AbstractFirBlackBoxCodegenTest { + public class ReturnsNothing { @Test public void testAllFilesPresentInReturnsNothing() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/controlStructures/returnsNothing"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -7297,7 +8335,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions") @TestDataPath("$PROJECT_ROOT") - public class TryCatchInExpressions extends AbstractFirBlackBoxCodegenTest { + public class TryCatchInExpressions { @Test public void testAllFilesPresentInTryCatchInExpressions() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -7488,7 +8526,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/coroutines") @TestDataPath("$PROJECT_ROOT") - public class Coroutines extends AbstractFirBlackBoxCodegenTest { + public class Coroutines { @Test @TestMetadata("32defaultParametersInSuspend.kt") public void test32defaultParametersInSuspend() throws Exception { @@ -7818,6 +8856,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT runTest("compiler/testData/codegen/box/coroutines/kt21605.kt"); } + @Test + @TestMetadata("kt24135.kt") + public void testKt24135() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/kt24135.kt"); + } + @Test @TestMetadata("kt25912.kt") public void testKt25912() throws Exception { @@ -8199,7 +9243,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/coroutines/bridges") @TestDataPath("$PROJECT_ROOT") - public class Bridges extends AbstractFirBlackBoxCodegenTest { + public class Bridges { @Test public void testAllFilesPresentInBridges() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/bridges"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -8227,7 +9271,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/coroutines/controlFlow") @TestDataPath("$PROJECT_ROOT") - public class ControlFlow extends AbstractFirBlackBoxCodegenTest { + public class ControlFlow { @Test public void testAllFilesPresentInControlFlow() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/controlFlow"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -8257,6 +9301,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT runTest("compiler/testData/codegen/box/coroutines/controlFlow/doWhileStatement.kt"); } + @Test + @TestMetadata("doWhileWithInline.kt") + public void testDoWhileWithInline() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/controlFlow/doWhileWithInline.kt"); + } + @Test @TestMetadata("doubleBreak.kt") public void testDoubleBreak() throws Exception { @@ -8369,7 +9419,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/coroutines/debug") @TestDataPath("$PROJECT_ROOT") - public class Debug extends AbstractFirBlackBoxCodegenTest { + public class Debug { @Test public void testAllFilesPresentInDebug() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/debug"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -8427,7 +9477,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/coroutines/featureIntersection") @TestDataPath("$PROJECT_ROOT") - public class FeatureIntersection extends AbstractFirBlackBoxCodegenTest { + public class FeatureIntersection { @Test public void testAllFilesPresentInFeatureIntersection() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/featureIntersection"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -8538,7 +9588,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference") @TestDataPath("$PROJECT_ROOT") - public class CallableReference extends AbstractFirBlackBoxCodegenTest { + public class CallableReference { @Test public void testAllFilesPresentInCallableReference() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -8571,7 +9621,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound") @TestDataPath("$PROJECT_ROOT") - public class Bound extends AbstractFirBlackBoxCodegenTest { + public class Bound { @Test public void testAllFilesPresentInBound() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -8587,7 +9637,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function") @TestDataPath("$PROJECT_ROOT") - public class Function extends AbstractFirBlackBoxCodegenTest { + public class Function { @Test public void testAllFilesPresentInFunction() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -8614,7 +9664,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local") @TestDataPath("$PROJECT_ROOT") - public class Local extends AbstractFirBlackBoxCodegenTest { + public class Local { @Test public void testAllFilesPresentInLocal() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -8632,7 +9682,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec") @TestDataPath("$PROJECT_ROOT") - public class Tailrec extends AbstractFirBlackBoxCodegenTest { + public class Tailrec { @Test public void testAllFilesPresentInTailrec() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -8721,12 +9771,18 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/coroutines/inlineClasses") @TestDataPath("$PROJECT_ROOT") - public class InlineClasses extends AbstractFirBlackBoxCodegenTest { + public class InlineClasses { @Test public void testAllFilesPresentInInlineClasses() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/inlineClasses"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test + @TestMetadata("genericParameterResult.kt") + public void testGenericParameterResult() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/genericParameterResult.kt"); + } + @Test @TestMetadata("nonLocalReturn.kt") public void testNonLocalReturn() throws Exception { @@ -8736,7 +9792,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/coroutines/inlineClasses/direct") @TestDataPath("$PROJECT_ROOT") - public class Direct extends AbstractFirBlackBoxCodegenTest { + public class Direct { @Test public void testAllFilesPresentInDirect() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/inlineClasses/direct"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -9004,7 +10060,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/coroutines/inlineClasses/resume") @TestDataPath("$PROJECT_ROOT") - public class Resume extends AbstractFirBlackBoxCodegenTest { + public class Resume { @Test public void testAllFilesPresentInResume() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/inlineClasses/resume"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -9272,7 +10328,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException") @TestDataPath("$PROJECT_ROOT") - public class ResumeWithException extends AbstractFirBlackBoxCodegenTest { + public class ResumeWithException { @Test public void testAllFilesPresentInResumeWithException() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -9523,7 +10579,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/coroutines/intLikeVarSpilling") @TestDataPath("$PROJECT_ROOT") - public class IntLikeVarSpilling extends AbstractFirBlackBoxCodegenTest { + public class IntLikeVarSpilling { @Test public void testAllFilesPresentInIntLikeVarSpilling() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/intLikeVarSpilling"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -9599,7 +10655,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/coroutines/intrinsicSemantics") @TestDataPath("$PROJECT_ROOT") - public class IntrinsicSemantics extends AbstractFirBlackBoxCodegenTest { + public class IntrinsicSemantics { @Test public void testAllFilesPresentInIntrinsicSemantics() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/intrinsicSemantics"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -9629,6 +10685,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT runTest("compiler/testData/codegen/box/coroutines/intrinsicSemantics/intercepted.kt"); } + @Test + @TestMetadata("resultExceptionOrNullInLambda.kt") + public void testResultExceptionOrNullInLambda() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/intrinsicSemantics/resultExceptionOrNullInLambda.kt"); + } + @Test @TestMetadata("startCoroutine.kt") public void testStartCoroutine() throws Exception { @@ -9657,7 +10719,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/coroutines/javaInterop") @TestDataPath("$PROJECT_ROOT") - public class JavaInterop extends AbstractFirBlackBoxCodegenTest { + public class JavaInterop { @Test public void testAllFilesPresentInJavaInterop() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/javaInterop"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -9697,7 +10759,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/coroutines/localFunctions") @TestDataPath("$PROJECT_ROOT") - public class LocalFunctions extends AbstractFirBlackBoxCodegenTest { + public class LocalFunctions { @Test public void testAllFilesPresentInLocalFunctions() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/localFunctions"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -9706,7 +10768,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/coroutines/localFunctions/anonymous") @TestDataPath("$PROJECT_ROOT") - public class Anonymous extends AbstractFirBlackBoxCodegenTest { + public class Anonymous { @Test public void testAllFilesPresentInAnonymous() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/localFunctions/anonymous"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -9722,7 +10784,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/coroutines/localFunctions/named") @TestDataPath("$PROJECT_ROOT") - public class Named extends AbstractFirBlackBoxCodegenTest { + public class Named { @Test public void testAllFilesPresentInNamed() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/localFunctions/named"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -9740,6 +10802,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT runTest("compiler/testData/codegen/box/coroutines/localFunctions/named/capturedVariables.kt"); } + @Test + @TestMetadata("defaultArgument.kt") + public void testDefaultArgument() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/localFunctions/named/defaultArgument.kt"); + } + @Test @TestMetadata("extension.kt") public void testExtension() throws Exception { @@ -9799,7 +10867,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/coroutines/multiModule") @TestDataPath("$PROJECT_ROOT") - public class MultiModule extends AbstractFirBlackBoxCodegenTest { + public class MultiModule { @Test public void testAllFilesPresentInMultiModule() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/multiModule"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -9863,7 +10931,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/coroutines/redundantLocalsElimination") @TestDataPath("$PROJECT_ROOT") - public class RedundantLocalsElimination extends AbstractFirBlackBoxCodegenTest { + public class RedundantLocalsElimination { @Test public void testAllFilesPresentInRedundantLocalsElimination() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/redundantLocalsElimination"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -9879,7 +10947,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/coroutines/reflect") @TestDataPath("$PROJECT_ROOT") - public class Reflect extends AbstractFirBlackBoxCodegenTest { + public class Reflect { @Test public void testAllFilesPresentInReflect() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/reflect"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -9907,7 +10975,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/coroutines/stackUnwinding") @TestDataPath("$PROJECT_ROOT") - public class StackUnwinding extends AbstractFirBlackBoxCodegenTest { + public class StackUnwinding { @Test public void testAllFilesPresentInStackUnwinding() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/stackUnwinding"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -9953,7 +11021,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/coroutines/suspendConversion") @TestDataPath("$PROJECT_ROOT") - public class SuspendConversion extends AbstractFirBlackBoxCodegenTest { + public class SuspendConversion { @Test public void testAllFilesPresentInSuspendConversion() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/suspendConversion"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -9987,7 +11055,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine") @TestDataPath("$PROJECT_ROOT") - public class SuspendFunctionAsCoroutine extends AbstractFirBlackBoxCodegenTest { + public class SuspendFunctionAsCoroutine { @Test public void testAllFilesPresentInSuspendFunctionAsCoroutine() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -10105,7 +11173,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/coroutines/suspendFunctionTypeCall") @TestDataPath("$PROJECT_ROOT") - public class SuspendFunctionTypeCall extends AbstractFirBlackBoxCodegenTest { + public class SuspendFunctionTypeCall { @Test public void testAllFilesPresentInSuspendFunctionTypeCall() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/suspendFunctionTypeCall"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -10145,7 +11213,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/coroutines/tailCallOptimizations") @TestDataPath("$PROJECT_ROOT") - public class TailCallOptimizations extends AbstractFirBlackBoxCodegenTest { + public class TailCallOptimizations { @Test public void testAllFilesPresentInTailCallOptimizations() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/tailCallOptimizations"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -10244,7 +11312,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/coroutines/tailCallOptimizations/unit") @TestDataPath("$PROJECT_ROOT") - public class Unit extends AbstractFirBlackBoxCodegenTest { + public class Unit { @Test public void testAllFilesPresentInUnit() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/tailCallOptimizations/unit"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -10321,7 +11389,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/coroutines/tailOperations") @TestDataPath("$PROJECT_ROOT") - public class TailOperations extends AbstractFirBlackBoxCodegenTest { + public class TailOperations { @Test public void testAllFilesPresentInTailOperations() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/tailOperations"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -10355,7 +11423,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/coroutines/unitTypeReturn") @TestDataPath("$PROJECT_ROOT") - public class UnitTypeReturn extends AbstractFirBlackBoxCodegenTest { + public class UnitTypeReturn { @Test public void testAllFilesPresentInUnitTypeReturn() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/unitTypeReturn"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -10407,7 +11475,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/coroutines/varSpilling") @TestDataPath("$PROJECT_ROOT") - public class VarSpilling extends AbstractFirBlackBoxCodegenTest { + public class VarSpilling { @Test public void testAllFilesPresentInVarSpilling() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/varSpilling"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -10454,7 +11522,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/dataClasses") @TestDataPath("$PROJECT_ROOT") - public class DataClasses extends AbstractFirBlackBoxCodegenTest { + public class DataClasses { @Test public void testAllFilesPresentInDataClasses() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/dataClasses"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -10559,7 +11627,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/dataClasses/copy") @TestDataPath("$PROJECT_ROOT") - public class Copy extends AbstractFirBlackBoxCodegenTest { + public class Copy { @Test public void testAllFilesPresentInCopy() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/dataClasses/copy"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -10617,7 +11685,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/dataClasses/equals") @TestDataPath("$PROJECT_ROOT") - public class Equals extends AbstractFirBlackBoxCodegenTest { + public class Equals { @Test public void testAllFilesPresentInEquals() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/dataClasses/equals"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -10669,7 +11737,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/dataClasses/hashCode") @TestDataPath("$PROJECT_ROOT") - public class HashCode extends AbstractFirBlackBoxCodegenTest { + public class HashCode { @Test public void testAllFilesPresentInHashCode() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/dataClasses/hashCode"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -10757,7 +11825,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/dataClasses/toString") @TestDataPath("$PROJECT_ROOT") - public class ToString extends AbstractFirBlackBoxCodegenTest { + public class ToString { @Test public void testAllFilesPresentInToString() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/dataClasses/toString"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -10810,7 +11878,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/deadCodeElimination") @TestDataPath("$PROJECT_ROOT") - public class DeadCodeElimination extends AbstractFirBlackBoxCodegenTest { + public class DeadCodeElimination { @Test public void testAllFilesPresentInDeadCodeElimination() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/deadCodeElimination"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -10844,7 +11912,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/defaultArguments") @TestDataPath("$PROJECT_ROOT") - public class DefaultArguments extends AbstractFirBlackBoxCodegenTest { + public class DefaultArguments { @Test public void testAllFilesPresentInDefaultArguments() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/defaultArguments"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -10955,7 +12023,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/defaultArguments/constructor") @TestDataPath("$PROJECT_ROOT") - public class Constructor extends AbstractFirBlackBoxCodegenTest { + public class Constructor { @Test public void testAllFilesPresentInConstructor() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/defaultArguments/constructor"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -11067,7 +12135,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/defaultArguments/convention") @TestDataPath("$PROJECT_ROOT") - public class Convention extends AbstractFirBlackBoxCodegenTest { + public class Convention { @Test public void testAllFilesPresentInConvention() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/defaultArguments/convention"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -11119,7 +12187,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/defaultArguments/function") @TestDataPath("$PROJECT_ROOT") - public class Function extends AbstractFirBlackBoxCodegenTest { + public class Function { @Test @TestMetadata("abstractClass.kt") public void testAbstractClass() throws Exception { @@ -11297,7 +12365,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/defaultArguments/private") @TestDataPath("$PROJECT_ROOT") - public class Private extends AbstractFirBlackBoxCodegenTest { + public class Private { @Test public void testAllFilesPresentInPrivate() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/defaultArguments/private"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -11331,7 +12399,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/defaultArguments/signature") @TestDataPath("$PROJECT_ROOT") - public class Signature extends AbstractFirBlackBoxCodegenTest { + public class Signature { @Test public void testAllFilesPresentInSignature() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/defaultArguments/signature"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -11360,7 +12428,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/delegatedProperty") @TestDataPath("$PROJECT_ROOT") - public class DelegatedProperty extends AbstractFirBlackBoxCodegenTest { + public class DelegatedProperty { @Test @TestMetadata("accessTopLevelDelegatedPropertyInClinit.kt") public void testAccessTopLevelDelegatedPropertyInClinit() throws Exception { @@ -11663,7 +12731,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/delegatedProperty/local") @TestDataPath("$PROJECT_ROOT") - public class Local extends AbstractFirBlackBoxCodegenTest { + public class Local { @Test public void testAllFilesPresentInLocal() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/delegatedProperty/local"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -11775,7 +12843,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/delegatedProperty/optimizedDelegatedProperties") @TestDataPath("$PROJECT_ROOT") - public class OptimizedDelegatedProperties extends AbstractFirBlackBoxCodegenTest { + public class OptimizedDelegatedProperties { @Test public void testAllFilesPresentInOptimizedDelegatedProperties() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/delegatedProperty/optimizedDelegatedProperties"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -11845,7 +12913,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/delegatedProperty/provideDelegate") @TestDataPath("$PROJECT_ROOT") - public class ProvideDelegate extends AbstractFirBlackBoxCodegenTest { + public class ProvideDelegate { @Test public void testAllFilesPresentInProvideDelegate() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/delegatedProperty/provideDelegate"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -11988,7 +13056,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/delegation") @TestDataPath("$PROJECT_ROOT") - public class Delegation extends AbstractFirBlackBoxCodegenTest { + public class Delegation { @Test public void testAllFilesPresentInDelegation() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/delegation"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -12006,6 +13074,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT runTest("compiler/testData/codegen/box/delegation/defaultOverride.kt"); } + @Test + @TestMetadata("delegationAndInheritanceFromJava.kt") + public void testDelegationAndInheritanceFromJava() throws Exception { + runTest("compiler/testData/codegen/box/delegation/delegationAndInheritanceFromJava.kt"); + } + @Test @TestMetadata("delegationToMap.kt") public void testDelegationToMap() throws Exception { @@ -12088,7 +13162,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/destructuringDeclInLambdaParam") @TestDataPath("$PROJECT_ROOT") - public class DestructuringDeclInLambdaParam extends AbstractFirBlackBoxCodegenTest { + public class DestructuringDeclInLambdaParam { @Test public void testAllFilesPresentInDestructuringDeclInLambdaParam() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/destructuringDeclInLambdaParam"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -12146,7 +13220,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/diagnostics") @TestDataPath("$PROJECT_ROOT") - public class Diagnostics extends AbstractFirBlackBoxCodegenTest { + public class Diagnostics { @Test public void testAllFilesPresentInDiagnostics() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/diagnostics"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -12155,7 +13229,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/diagnostics/functions") @TestDataPath("$PROJECT_ROOT") - public class Functions extends AbstractFirBlackBoxCodegenTest { + public class Functions { @Test public void testAllFilesPresentInFunctions() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/diagnostics/functions"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -12164,7 +13238,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/diagnostics/functions/inference") @TestDataPath("$PROJECT_ROOT") - public class Inference extends AbstractFirBlackBoxCodegenTest { + public class Inference { @Test public void testAllFilesPresentInInference() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/diagnostics/functions/inference"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -12180,7 +13254,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/diagnostics/functions/invoke") @TestDataPath("$PROJECT_ROOT") - public class Invoke extends AbstractFirBlackBoxCodegenTest { + public class Invoke { @Test public void testAllFilesPresentInInvoke() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/diagnostics/functions/invoke"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -12189,7 +13263,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects") @TestDataPath("$PROJECT_ROOT") - public class OnObjects extends AbstractFirBlackBoxCodegenTest { + public class OnObjects { @Test public void testAllFilesPresentInOnObjects() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -12260,7 +13334,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion") @TestDataPath("$PROJECT_ROOT") - public class TailRecursion extends AbstractFirBlackBoxCodegenTest { + public class TailRecursion { @Test public void testAllFilesPresentInTailRecursion() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/diagnostics/functions/tailRecursion"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -12517,7 +13591,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/diagnostics/vararg") @TestDataPath("$PROJECT_ROOT") - public class Vararg extends AbstractFirBlackBoxCodegenTest { + public class Vararg { @Test public void testAllFilesPresentInVararg() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/diagnostics/vararg"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -12534,7 +13608,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/elvis") @TestDataPath("$PROJECT_ROOT") - public class Elvis extends AbstractFirBlackBoxCodegenTest { + public class Elvis { @Test public void testAllFilesPresentInElvis() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/elvis"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -12586,7 +13660,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/enum") @TestDataPath("$PROJECT_ROOT") - public class Enum extends AbstractFirBlackBoxCodegenTest { + public class Enum { @Test @TestMetadata("abstractMethodInEnum.kt") public void testAbstractMethodInEnum() throws Exception { @@ -12940,6 +14014,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT runTest("compiler/testData/codegen/box/enum/modifierFlags.kt"); } + @Test + @TestMetadata("nameConflict.kt") + public void testNameConflict() throws Exception { + runTest("compiler/testData/codegen/box/enum/nameConflict.kt"); + } + @Test @TestMetadata("noClassForSimpleEnum.kt") public void testNoClassForSimpleEnum() throws Exception { @@ -12970,12 +14050,48 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT runTest("compiler/testData/codegen/box/enum/simple.kt"); } + @Test + @TestMetadata("simpleJavaEnum.kt") + public void testSimpleJavaEnum() throws Exception { + runTest("compiler/testData/codegen/box/enum/simpleJavaEnum.kt"); + } + + @Test + @TestMetadata("simpleJavaEnumWithFunction.kt") + public void testSimpleJavaEnumWithFunction() throws Exception { + runTest("compiler/testData/codegen/box/enum/simpleJavaEnumWithFunction.kt"); + } + + @Test + @TestMetadata("simpleJavaEnumWithStaticImport.kt") + public void testSimpleJavaEnumWithStaticImport() throws Exception { + runTest("compiler/testData/codegen/box/enum/simpleJavaEnumWithStaticImport.kt"); + } + + @Test + @TestMetadata("simpleJavaInnerEnum.kt") + public void testSimpleJavaInnerEnum() throws Exception { + runTest("compiler/testData/codegen/box/enum/simpleJavaInnerEnum.kt"); + } + @Test @TestMetadata("sortEnumEntries.kt") public void testSortEnumEntries() throws Exception { runTest("compiler/testData/codegen/box/enum/sortEnumEntries.kt"); } + @Test + @TestMetadata("staticField.kt") + public void testStaticField() throws Exception { + runTest("compiler/testData/codegen/box/enum/staticField.kt"); + } + + @Test + @TestMetadata("staticMethod.kt") + public void testStaticMethod() throws Exception { + runTest("compiler/testData/codegen/box/enum/staticMethod.kt"); + } + @Test @TestMetadata("superCallInEnumLiteral.kt") public void testSuperCallInEnumLiteral() throws Exception { @@ -13003,7 +14119,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/enum/defaultCtor") @TestDataPath("$PROJECT_ROOT") - public class DefaultCtor extends AbstractFirBlackBoxCodegenTest { + public class DefaultCtor { @Test public void testAllFilesPresentInDefaultCtor() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/enum/defaultCtor"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -13050,7 +14166,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/evaluate") @TestDataPath("$PROJECT_ROOT") - public class Evaluate extends AbstractFirBlackBoxCodegenTest { + public class Evaluate { @Test public void testAllFilesPresentInEvaluate() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/evaluate"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -13150,7 +14266,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/exclExcl") @TestDataPath("$PROJECT_ROOT") - public class ExclExcl extends AbstractFirBlackBoxCodegenTest { + public class ExclExcl { @Test public void testAllFilesPresentInExclExcl() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/exclExcl"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -13172,7 +14288,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/extensionFunctions") @TestDataPath("$PROJECT_ROOT") - public class ExtensionFunctions extends AbstractFirBlackBoxCodegenTest { + public class ExtensionFunctions { @Test public void testAllFilesPresentInExtensionFunctions() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/extensionFunctions"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -13338,7 +14454,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/extensionProperties") @TestDataPath("$PROJECT_ROOT") - public class ExtensionProperties extends AbstractFirBlackBoxCodegenTest { + public class ExtensionProperties { @Test @TestMetadata("accessorForPrivateSetter.kt") public void testAccessorForPrivateSetter() throws Exception { @@ -13438,7 +14554,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/external") @TestDataPath("$PROJECT_ROOT") - public class External extends AbstractFirBlackBoxCodegenTest { + public class External { @Test public void testAllFilesPresentInExternal() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/external"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -13466,7 +14582,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/fakeOverride") @TestDataPath("$PROJECT_ROOT") - public class FakeOverride extends AbstractFirBlackBoxCodegenTest { + public class FakeOverride { @Test public void testAllFilesPresentInFakeOverride() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/fakeOverride"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -13512,7 +14628,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/fieldRename") @TestDataPath("$PROJECT_ROOT") - public class FieldRename extends AbstractFirBlackBoxCodegenTest { + public class FieldRename { @Test public void testAllFilesPresentInFieldRename() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/fieldRename"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -13552,7 +14668,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/finally") @TestDataPath("$PROJECT_ROOT") - public class Finally extends AbstractFirBlackBoxCodegenTest { + public class Finally { @Test public void testAllFilesPresentInFinally() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/finally"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -13694,7 +14810,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/fir") @TestDataPath("$PROJECT_ROOT") - public class Fir extends AbstractFirBlackBoxCodegenTest { + public class Fir { @Test public void testAllFilesPresentInFir() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/fir"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -13740,7 +14856,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/fullJdk") @TestDataPath("$PROJECT_ROOT") - public class FullJdk extends AbstractFirBlackBoxCodegenTest { + public class FullJdk { @Test public void testAllFilesPresentInFullJdk() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/fullJdk"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -13785,7 +14901,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/fullJdk/native") @TestDataPath("$PROJECT_ROOT") - public class Native extends AbstractFirBlackBoxCodegenTest { + public class Native { @Test public void testAllFilesPresentInNative() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/fullJdk/native"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -13813,7 +14929,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/fullJdk/regressions") @TestDataPath("$PROJECT_ROOT") - public class Regressions extends AbstractFirBlackBoxCodegenTest { + public class Regressions { @Test public void testAllFilesPresentInRegressions() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/fullJdk/regressions"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -13836,7 +14952,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/funInterface") @TestDataPath("$PROJECT_ROOT") - public class FunInterface extends AbstractFirBlackBoxCodegenTest { + public class FunInterface { @Test public void testAllFilesPresentInFunInterface() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/funInterface"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -13872,6 +14988,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT runTest("compiler/testData/codegen/box/funInterface/funConversionInVararg.kt"); } + @Test + @TestMetadata("funInterfaceCallInLambda.kt") + public void testFunInterfaceCallInLambda() throws Exception { + runTest("compiler/testData/codegen/box/funInterface/funInterfaceCallInLambda.kt"); + } + @Test @TestMetadata("funInterfaceInheritance.kt") public void testFunInterfaceInheritance() throws Exception { @@ -13971,7 +15093,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/funInterface/equality") @TestDataPath("$PROJECT_ROOT") - public class Equality extends AbstractFirBlackBoxCodegenTest { + public class Equality { @Test public void testAllFilesPresentInEquality() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/funInterface/equality"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -14012,7 +15134,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/functions") @TestDataPath("$PROJECT_ROOT") - public class Functions extends AbstractFirBlackBoxCodegenTest { + public class Functions { @Test public void testAllFilesPresentInFunctions() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/functions"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -14030,6 +15152,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT runTest("compiler/testData/codegen/box/functions/coerceVoidToObject.kt"); } + @Test + @TestMetadata("constructor.kt") + public void testConstructor() throws Exception { + runTest("compiler/testData/codegen/box/functions/constructor.kt"); + } + @Test @TestMetadata("dataLocalVariable.kt") public void testDataLocalVariable() throws Exception { @@ -14252,6 +15380,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT runTest("compiler/testData/codegen/box/functions/localReturnInsideFunctionExpression.kt"); } + @Test + @TestMetadata("max.kt") + public void testMax() throws Exception { + runTest("compiler/testData/codegen/box/functions/max.kt"); + } + @Test @TestMetadata("nothisnoclosure.kt") public void testNothisnoclosure() throws Exception { @@ -14276,6 +15410,18 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT runTest("compiler/testData/codegen/box/functions/recursiveIncrementCall.kt"); } + @Test + @TestMetadata("referencesStaticInnerClassMethod.kt") + public void testReferencesStaticInnerClassMethod() throws Exception { + runTest("compiler/testData/codegen/box/functions/referencesStaticInnerClassMethod.kt"); + } + + @Test + @TestMetadata("referencesStaticInnerClassMethodL2.kt") + public void testReferencesStaticInnerClassMethodL2() throws Exception { + runTest("compiler/testData/codegen/box/functions/referencesStaticInnerClassMethodL2.kt"); + } + @Test @TestMetadata("typeParameterAsUpperBound.kt") public void testTypeParameterAsUpperBound() throws Exception { @@ -14288,10 +15434,16 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT runTest("compiler/testData/codegen/box/functions/typeParametersInLocalFunction.kt"); } + @Test + @TestMetadata("unrelatedUpperBounds.kt") + public void testUnrelatedUpperBounds() throws Exception { + runTest("compiler/testData/codegen/box/functions/unrelatedUpperBounds.kt"); + } + @Nested @TestMetadata("compiler/testData/codegen/box/functions/bigArity") @TestDataPath("$PROJECT_ROOT") - public class BigArity extends AbstractFirBlackBoxCodegenTest { + public class BigArity { @Test public void testAllFilesPresentInBigArity() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/functions/bigArity"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -14367,7 +15519,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/functions/functionExpression") @TestDataPath("$PROJECT_ROOT") - public class FunctionExpression extends AbstractFirBlackBoxCodegenTest { + public class FunctionExpression { @Test public void testAllFilesPresentInFunctionExpression() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/functions/functionExpression"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -14413,7 +15565,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/functions/invoke") @TestDataPath("$PROJECT_ROOT") - public class Invoke extends AbstractFirBlackBoxCodegenTest { + public class Invoke { @Test public void testAllFilesPresentInInvoke() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/functions/invoke"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -14513,7 +15665,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/functions/localFunctions") @TestDataPath("$PROJECT_ROOT") - public class LocalFunctions extends AbstractFirBlackBoxCodegenTest { + public class LocalFunctions { @Test public void testAllFilesPresentInLocalFunctions() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/functions/localFunctions"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -14704,7 +15856,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/hashPMap") @TestDataPath("$PROJECT_ROOT") - public class HashPMap extends AbstractFirBlackBoxCodegenTest { + public class HashPMap { @Test public void testAllFilesPresentInHashPMap() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/hashPMap"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -14750,7 +15902,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/ieee754") @TestDataPath("$PROJECT_ROOT") - public class Ieee754 extends AbstractFirBlackBoxCodegenTest { + public class Ieee754 { @Test public void testAllFilesPresentInIeee754() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ieee754"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -14762,6 +15914,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT runTest("compiler/testData/codegen/box/ieee754/anyToReal.kt"); } + @Test + @TestMetadata("anyToReal_AgainstCompiled.kt") + public void testAnyToReal_AgainstCompiled() throws Exception { + runTest("compiler/testData/codegen/box/ieee754/anyToReal_AgainstCompiled.kt"); + } + @Test @TestMetadata("asComparableToDouble.kt") public void testAsComparableToDouble() throws Exception { @@ -14786,6 +15944,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT runTest("compiler/testData/codegen/box/ieee754/comparableTypeCast.kt"); } + @Test + @TestMetadata("comparableTypeCast_AgainstCompiled.kt") + public void testComparableTypeCast_AgainstCompiled() throws Exception { + runTest("compiler/testData/codegen/box/ieee754/comparableTypeCast_AgainstCompiled.kt"); + } + @Test @TestMetadata("dataClass.kt") public void testDataClass() throws Exception { @@ -14798,6 +15962,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT runTest("compiler/testData/codegen/box/ieee754/differentTypesComparison.kt"); } + @Test + @TestMetadata("double.kt") + public void testDouble() throws Exception { + runTest("compiler/testData/codegen/box/ieee754/double.kt"); + } + @Test @TestMetadata("equalsDouble.kt") public void testEqualsDouble() throws Exception { @@ -14864,18 +16034,42 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT runTest("compiler/testData/codegen/box/ieee754/explicitCompareCall.kt"); } + @Test + @TestMetadata("explicitCompareCall_AgainstCompiled.kt") + public void testExplicitCompareCall_AgainstCompiled() throws Exception { + runTest("compiler/testData/codegen/box/ieee754/explicitCompareCall_AgainstCompiled.kt"); + } + @Test @TestMetadata("explicitEqualsCall.kt") public void testExplicitEqualsCall() throws Exception { runTest("compiler/testData/codegen/box/ieee754/explicitEqualsCall.kt"); } + @Test + @TestMetadata("explicitEqualsCall_AgainstCompiled.kt") + public void testExplicitEqualsCall_AgainstCompiled() throws Exception { + runTest("compiler/testData/codegen/box/ieee754/explicitEqualsCall_AgainstCompiled.kt"); + } + + @Test + @TestMetadata("float.kt") + public void testFloat() throws Exception { + runTest("compiler/testData/codegen/box/ieee754/float.kt"); + } + @Test @TestMetadata("generic.kt") public void testGeneric() throws Exception { runTest("compiler/testData/codegen/box/ieee754/generic.kt"); } + @Test + @TestMetadata("generic_AgainstCompiled.kt") + public void testGeneric_AgainstCompiled() throws Exception { + runTest("compiler/testData/codegen/box/ieee754/generic_AgainstCompiled.kt"); + } + @Test @TestMetadata("greaterDouble.kt") public void testGreaterDouble() throws Exception { @@ -14942,6 +16136,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT runTest("compiler/testData/codegen/box/ieee754/nullableAnyToReal.kt"); } + @Test + @TestMetadata("nullableAnyToReal_AgainstCompiled.kt") + public void testNullableAnyToReal_AgainstCompiled() throws Exception { + runTest("compiler/testData/codegen/box/ieee754/nullableAnyToReal_AgainstCompiled.kt"); + } + @Test @TestMetadata("nullableDoubleEquals.kt") public void testNullableDoubleEquals() throws Exception { @@ -15060,7 +16260,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/increment") @TestDataPath("$PROJECT_ROOT") - public class Increment extends AbstractFirBlackBoxCodegenTest { + public class Increment { @Test public void testAllFilesPresentInIncrement() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/increment"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -15226,7 +16426,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/inference") @TestDataPath("$PROJECT_ROOT") - public class Inference extends AbstractFirBlackBoxCodegenTest { + public class Inference { @Test public void testAllFilesPresentInInference() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inference"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -15433,7 +16633,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/inference/builderInference") @TestDataPath("$PROJECT_ROOT") - public class BuilderInference extends AbstractFirBlackBoxCodegenTest { + public class BuilderInference { @Test public void testAllFilesPresentInBuilderInference() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inference/builderInference"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -15513,10 +16713,26 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT } } + @Nested + @TestMetadata("compiler/testData/codegen/box/inline") + @TestDataPath("$PROJECT_ROOT") + public class Inline { + @Test + public void testAllFilesPresentInInline() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inline"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @Test + @TestMetadata("kt19910.kt") + public void testKt19910() throws Exception { + runTest("compiler/testData/codegen/box/inline/kt19910.kt"); + } + } + @Nested @TestMetadata("compiler/testData/codegen/box/inlineClasses") @TestDataPath("$PROJECT_ROOT") - public class InlineClasses extends AbstractFirBlackBoxCodegenTest { + public class InlineClasses { @Test public void testAllFilesPresentInInlineClasses() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -16230,6 +17446,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT runTest("compiler/testData/codegen/box/inlineClasses/kt28920_javaPrimitiveType.kt"); } + @Test + @TestMetadata("kt32793.kt") + public void testKt32793() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/kt32793.kt"); + } + @Test @TestMetadata("kt33119.kt") public void testKt33119() throws Exception { @@ -16545,7 +17767,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda") @TestDataPath("$PROJECT_ROOT") - public class BoxReturnValueInLambda extends AbstractFirBlackBoxCodegenTest { + public class BoxReturnValueInLambda { @Test public void testAllFilesPresentInBoxReturnValueInLambda() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -16627,7 +17849,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride") @TestDataPath("$PROJECT_ROOT") - public class BoxReturnValueOnOverride extends AbstractFirBlackBoxCodegenTest { + public class BoxReturnValueOnOverride { @Test public void testAllFilesPresentInBoxReturnValueOnOverride() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -16793,7 +18015,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/inlineClasses/callableReferences") @TestDataPath("$PROJECT_ROOT") - public class CallableReferences extends AbstractFirBlackBoxCodegenTest { + public class CallableReferences { @Test public void testAllFilesPresentInCallableReferences() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/callableReferences"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -16923,7 +18145,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/inlineClasses/contextsAndAccessors") @TestDataPath("$PROJECT_ROOT") - public class ContextsAndAccessors extends AbstractFirBlackBoxCodegenTest { + public class ContextsAndAccessors { @Test @TestMetadata("accessPrivateInlineClassCompanionMethod.kt") public void testAccessPrivateInlineClassCompanionMethod() throws Exception { @@ -17065,7 +18287,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/inlineClasses/defaultParameterValues") @TestDataPath("$PROJECT_ROOT") - public class DefaultParameterValues extends AbstractFirBlackBoxCodegenTest { + public class DefaultParameterValues { @Test public void testAllFilesPresentInDefaultParameterValues() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/defaultParameterValues"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -17147,7 +18369,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/inlineClasses/functionNameMangling") @TestDataPath("$PROJECT_ROOT") - public class FunctionNameMangling extends AbstractFirBlackBoxCodegenTest { + public class FunctionNameMangling { @Test public void testAllFilesPresentInFunctionNameMangling() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/functionNameMangling"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -17265,7 +18487,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/inlineClasses/hiddenConstructor") @TestDataPath("$PROJECT_ROOT") - public class HiddenConstructor extends AbstractFirBlackBoxCodegenTest { + public class HiddenConstructor { @Test public void testAllFilesPresentInHiddenConstructor() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/hiddenConstructor"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -17350,10 +18572,38 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT } } + @Nested + @TestMetadata("compiler/testData/codegen/box/inlineClasses/inlineClassCollection") + @TestDataPath("$PROJECT_ROOT") + public class InlineClassCollection { + @Test + public void testAllFilesPresentInInlineClassCollection() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/inlineClassCollection"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @Test + @TestMetadata("inlineCollectionOfInlineClass.kt") + public void testInlineCollectionOfInlineClass() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/inlineClassCollection/inlineCollectionOfInlineClass.kt"); + } + + @Test + @TestMetadata("inlineListOfInlineClass.kt") + public void testInlineListOfInlineClass() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/inlineClassCollection/inlineListOfInlineClass.kt"); + } + + @Test + @TestMetadata("inlineMapOfInlineClass.kt") + public void testInlineMapOfInlineClass() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/inlineClassCollection/inlineMapOfInlineClass.kt"); + } + } + @Nested @TestMetadata("compiler/testData/codegen/box/inlineClasses/interfaceDelegation") @TestDataPath("$PROJECT_ROOT") - public class InterfaceDelegation extends AbstractFirBlackBoxCodegenTest { + public class InterfaceDelegation { @Test public void testAllFilesPresentInInterfaceDelegation() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/interfaceDelegation"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -17411,7 +18661,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/inlineClasses/interfaceMethodCalls") @TestDataPath("$PROJECT_ROOT") - public class InterfaceMethodCalls extends AbstractFirBlackBoxCodegenTest { + public class InterfaceMethodCalls { @Test public void testAllFilesPresentInInterfaceMethodCalls() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/interfaceMethodCalls"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -17487,7 +18737,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/inlineClasses/javaInterop") @TestDataPath("$PROJECT_ROOT") - public class JavaInterop extends AbstractFirBlackBoxCodegenTest { + public class JavaInterop { @Test public void testAllFilesPresentInJavaInterop() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/javaInterop"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -17515,7 +18765,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/inlineClasses/jvm8DefaultInterfaceMethods") @TestDataPath("$PROJECT_ROOT") - public class Jvm8DefaultInterfaceMethods extends AbstractFirBlackBoxCodegenTest { + public class Jvm8DefaultInterfaceMethods { @Test public void testAllFilesPresentInJvm8DefaultInterfaceMethods() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/jvm8DefaultInterfaceMethods"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -17597,7 +18847,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/inlineClasses/propertyDelegation") @TestDataPath("$PROJECT_ROOT") - public class PropertyDelegation extends AbstractFirBlackBoxCodegenTest { + public class PropertyDelegation { @Test public void testAllFilesPresentInPropertyDelegation() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/propertyDelegation"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -17679,7 +18929,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter") @TestDataPath("$PROJECT_ROOT") - public class UnboxGenericParameter extends AbstractFirBlackBoxCodegenTest { + public class UnboxGenericParameter { @Test public void testAllFilesPresentInUnboxGenericParameter() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -17688,7 +18938,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/funInterface") @TestDataPath("$PROJECT_ROOT") - public class FunInterface extends AbstractFirBlackBoxCodegenTest { + public class FunInterface { @Test public void testAllFilesPresentInFunInterface() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/funInterface"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -17746,7 +18996,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/lambda") @TestDataPath("$PROJECT_ROOT") - public class Lambda extends AbstractFirBlackBoxCodegenTest { + public class Lambda { @Test public void testAllFilesPresentInLambda() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/lambda"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -17804,7 +19054,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/objectLiteral") @TestDataPath("$PROJECT_ROOT") - public class ObjectLiteral extends AbstractFirBlackBoxCodegenTest { + public class ObjectLiteral { @Test public void testAllFilesPresentInObjectLiteral() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/objectLiteral"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -17861,10 +19111,38 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT } } + @Nested + @TestMetadata("compiler/testData/codegen/box/innerClass") + @TestDataPath("$PROJECT_ROOT") + public class InnerClass { + @Test + public void testAllFilesPresentInInnerClass() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/innerClass"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @Test + @TestMetadata("kt3532.kt") + public void testKt3532() throws Exception { + runTest("compiler/testData/codegen/box/innerClass/kt3532.kt"); + } + + @Test + @TestMetadata("kt3812.kt") + public void testKt3812() throws Exception { + runTest("compiler/testData/codegen/box/innerClass/kt3812.kt"); + } + + @Test + @TestMetadata("kt4036.kt") + public void testKt4036() throws Exception { + runTest("compiler/testData/codegen/box/innerClass/kt4036.kt"); + } + } + @Nested @TestMetadata("compiler/testData/codegen/box/innerNested") @TestDataPath("$PROJECT_ROOT") - public class InnerNested extends AbstractFirBlackBoxCodegenTest { + public class InnerNested { @Test public void testAllFilesPresentInInnerNested() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/innerNested"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -18041,7 +19319,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall") @TestDataPath("$PROJECT_ROOT") - public class SuperConstructorCall extends AbstractFirBlackBoxCodegenTest { + public class SuperConstructorCall { @Test public void testAllFilesPresentInSuperConstructorCall() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/innerNested/superConstructorCall"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -18178,7 +19456,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/instructions") @TestDataPath("$PROJECT_ROOT") - public class Instructions extends AbstractFirBlackBoxCodegenTest { + public class Instructions { @Test public void testAllFilesPresentInInstructions() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/instructions"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -18187,7 +19465,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/instructions/swap") @TestDataPath("$PROJECT_ROOT") - public class Swap extends AbstractFirBlackBoxCodegenTest { + public class Swap { @Test public void testAllFilesPresentInSwap() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/instructions/swap"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -18207,10 +19485,32 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT } } + @Nested + @TestMetadata("compiler/testData/codegen/box/interfaces") + @TestDataPath("$PROJECT_ROOT") + public class Interfaces { + @Test + public void testAllFilesPresentInInterfaces() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/interfaces"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @Test + @TestMetadata("defaultMethod.kt") + public void testDefaultMethod() throws Exception { + runTest("compiler/testData/codegen/box/interfaces/defaultMethod.kt"); + } + + @Test + @TestMetadata("inheritJavaInterface.kt") + public void testInheritJavaInterface() throws Exception { + runTest("compiler/testData/codegen/box/interfaces/inheritJavaInterface.kt"); + } + } + @Nested @TestMetadata("compiler/testData/codegen/box/intrinsics") @TestDataPath("$PROJECT_ROOT") - public class Intrinsics extends AbstractFirBlackBoxCodegenTest { + public class Intrinsics { @Test public void testAllFilesPresentInIntrinsics() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/intrinsics"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -18382,16 +19682,156 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/invokedynamic") @TestDataPath("$PROJECT_ROOT") - public class Invokedynamic extends AbstractFirBlackBoxCodegenTest { + public class Invokedynamic { @Test public void testAllFilesPresentInInvokedynamic() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/invokedynamic"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Nested + @TestMetadata("compiler/testData/codegen/box/invokedynamic/lambdas") + @TestDataPath("$PROJECT_ROOT") + public class Lambdas { + @Test + public void testAllFilesPresentInLambdas() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/invokedynamic/lambdas"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @Test + @TestMetadata("bigArityExtLambda.kt") + public void testBigArityExtLambda() throws Exception { + runTest("compiler/testData/codegen/box/invokedynamic/lambdas/bigArityExtLambda.kt"); + } + + @Test + @TestMetadata("bigArityLambda.kt") + public void testBigArityLambda() throws Exception { + runTest("compiler/testData/codegen/box/invokedynamic/lambdas/bigArityLambda.kt"); + } + + @Test + @TestMetadata("capturedDispatchReceiver.kt") + public void testCapturedDispatchReceiver() throws Exception { + runTest("compiler/testData/codegen/box/invokedynamic/lambdas/capturedDispatchReceiver.kt"); + } + + @Test + @TestMetadata("capturedExtensionReceiver.kt") + public void testCapturedExtensionReceiver() throws Exception { + runTest("compiler/testData/codegen/box/invokedynamic/lambdas/capturedExtensionReceiver.kt"); + } + + @Test + @TestMetadata("capturingValue.kt") + public void testCapturingValue() throws Exception { + runTest("compiler/testData/codegen/box/invokedynamic/lambdas/capturingValue.kt"); + } + + @Test + @TestMetadata("capturingVar.kt") + public void testCapturingVar() throws Exception { + runTest("compiler/testData/codegen/box/invokedynamic/lambdas/capturingVar.kt"); + } + + @Test + @TestMetadata("extensionLambda.kt") + public void testExtensionLambda() throws Exception { + runTest("compiler/testData/codegen/box/invokedynamic/lambdas/extensionLambda.kt"); + } + + @Test + @TestMetadata("lambdaSerializable.kt") + public void testLambdaSerializable() throws Exception { + runTest("compiler/testData/codegen/box/invokedynamic/lambdas/lambdaSerializable.kt"); + } + + @Test + @TestMetadata("lambdaToSting.kt") + public void testLambdaToSting() throws Exception { + runTest("compiler/testData/codegen/box/invokedynamic/lambdas/lambdaToSting.kt"); + } + + @Test + @TestMetadata("nestedIndyLambdas.kt") + public void testNestedIndyLambdas() throws Exception { + runTest("compiler/testData/codegen/box/invokedynamic/lambdas/nestedIndyLambdas.kt"); + } + + @Test + @TestMetadata("primitiveValueParameters.kt") + public void testPrimitiveValueParameters() throws Exception { + runTest("compiler/testData/codegen/box/invokedynamic/lambdas/primitiveValueParameters.kt"); + } + + @Test + @TestMetadata("simpleIndyLambda.kt") + public void testSimpleIndyLambda() throws Exception { + runTest("compiler/testData/codegen/box/invokedynamic/lambdas/simpleIndyLambda.kt"); + } + + @Test + @TestMetadata("suspendLambda.kt") + public void testSuspendLambda() throws Exception { + runTest("compiler/testData/codegen/box/invokedynamic/lambdas/suspendLambda.kt"); + } + + @Test + @TestMetadata("voidReturnType.kt") + public void testVoidReturnType() throws Exception { + runTest("compiler/testData/codegen/box/invokedynamic/lambdas/voidReturnType.kt"); + } + + @Nested + @TestMetadata("compiler/testData/codegen/box/invokedynamic/lambdas/inlineClassInSignature") + @TestDataPath("$PROJECT_ROOT") + public class InlineClassInSignature { + @Test + public void testAllFilesPresentInInlineClassInSignature() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/invokedynamic/lambdas/inlineClassInSignature"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @Test + @TestMetadata("lambdaWithInlineAny.kt") + public void testLambdaWithInlineAny() throws Exception { + runTest("compiler/testData/codegen/box/invokedynamic/lambdas/inlineClassInSignature/lambdaWithInlineAny.kt"); + } + + @Test + @TestMetadata("lambdaWithInlineInt.kt") + public void testLambdaWithInlineInt() throws Exception { + runTest("compiler/testData/codegen/box/invokedynamic/lambdas/inlineClassInSignature/lambdaWithInlineInt.kt"); + } + + @Test + @TestMetadata("lambdaWithInlineNAny.kt") + public void testLambdaWithInlineNAny() throws Exception { + runTest("compiler/testData/codegen/box/invokedynamic/lambdas/inlineClassInSignature/lambdaWithInlineNAny.kt"); + } + + @Test + @TestMetadata("lambdaWithInlineNInt.kt") + public void testLambdaWithInlineNInt() throws Exception { + runTest("compiler/testData/codegen/box/invokedynamic/lambdas/inlineClassInSignature/lambdaWithInlineNInt.kt"); + } + + @Test + @TestMetadata("lambdaWithInlineNString.kt") + public void testLambdaWithInlineNString() throws Exception { + runTest("compiler/testData/codegen/box/invokedynamic/lambdas/inlineClassInSignature/lambdaWithInlineNString.kt"); + } + + @Test + @TestMetadata("lambdaWithInlineString.kt") + public void testLambdaWithInlineString() throws Exception { + runTest("compiler/testData/codegen/box/invokedynamic/lambdas/inlineClassInSignature/lambdaWithInlineString.kt"); + } + } + } + @Nested @TestMetadata("compiler/testData/codegen/box/invokedynamic/sam") @TestDataPath("$PROJECT_ROOT") - public class Sam extends AbstractFirBlackBoxCodegenTest { + public class Sam { @Test public void testAllFilesPresentInSam() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/invokedynamic/sam"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -18523,44 +19963,16 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT runTest("compiler/testData/codegen/box/invokedynamic/sam/unboundFunctionReferenceEquality.kt"); } - @Nested - @TestMetadata("compiler/testData/codegen/box/invokedynamic/sam/inline") - @TestDataPath("$PROJECT_ROOT") - public class Inline extends AbstractFirBlackBoxCodegenTest { - @Test - public void testAllFilesPresentInInline() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/invokedynamic/sam/inline"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); - } - - @Test - @TestMetadata("crossinlineLambda1.kt") - public void testCrossinlineLambda1() throws Exception { - runTest("compiler/testData/codegen/box/invokedynamic/sam/inline/crossinlineLambda1.kt"); - } - - @Test - @TestMetadata("crossinlineLambda2.kt") - public void testCrossinlineLambda2() throws Exception { - runTest("compiler/testData/codegen/box/invokedynamic/sam/inline/crossinlineLambda2.kt"); - } - - @Test - @TestMetadata("inlineFunInDifferentPackage.kt") - public void testInlineFunInDifferentPackage() throws Exception { - runTest("compiler/testData/codegen/box/invokedynamic/sam/inline/inlineFunInDifferentPackage.kt"); - } - - @Test - @TestMetadata("inlineLambda1.kt") - public void testInlineLambda1() throws Exception { - runTest("compiler/testData/codegen/box/invokedynamic/sam/inline/inlineLambda1.kt"); - } + @Test + @TestMetadata("voidReturnTypeAsGeneric.kt") + public void testVoidReturnTypeAsGeneric() throws Exception { + runTest("compiler/testData/codegen/box/invokedynamic/sam/voidReturnTypeAsGeneric.kt"); } @Nested @TestMetadata("compiler/testData/codegen/box/invokedynamic/sam/inlineClassInSignature") @TestDataPath("$PROJECT_ROOT") - public class InlineClassInSignature extends AbstractFirBlackBoxCodegenTest { + public class InlineClassInSignature { @Test public void testAllFilesPresentInInlineClassInSignature() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/invokedynamic/sam/inlineClassInSignature"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -18644,7 +20056,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/ir") @TestDataPath("$PROJECT_ROOT") - public class Ir extends AbstractFirBlackBoxCodegenTest { + public class Ir { @Test public void testAllFilesPresentInIr() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ir"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -18767,7 +20179,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/ir/closureConversion") @TestDataPath("$PROJECT_ROOT") - public class ClosureConversion extends AbstractFirBlackBoxCodegenTest { + public class ClosureConversion { @Test public void testAllFilesPresentInClosureConversion() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ir/closureConversion"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -18825,7 +20237,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/ir/primitiveNumberComparisons") @TestDataPath("$PROJECT_ROOT") - public class PrimitiveNumberComparisons extends AbstractFirBlackBoxCodegenTest { + public class PrimitiveNumberComparisons { @Test public void testAllFilesPresentInPrimitiveNumberComparisons() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ir/primitiveNumberComparisons"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -18859,7 +20271,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/ir/serializationRegressions") @TestDataPath("$PROJECT_ROOT") - public class SerializationRegressions extends AbstractFirBlackBoxCodegenTest { + public class SerializationRegressions { @Test public void testAllFilesPresentInSerializationRegressions() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ir/serializationRegressions"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -18918,7 +20330,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/javaInterop") @TestDataPath("$PROJECT_ROOT") - public class JavaInterop extends AbstractFirBlackBoxCodegenTest { + public class JavaInterop { @Test public void testAllFilesPresentInJavaInterop() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/javaInterop"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -18981,7 +20393,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/javaInterop/generics") @TestDataPath("$PROJECT_ROOT") - public class Generics extends AbstractFirBlackBoxCodegenTest { + public class Generics { @Test public void testAllFilesPresentInGenerics() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/javaInterop/generics"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -19033,7 +20445,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions") @TestDataPath("$PROJECT_ROOT") - public class NotNullAssertions extends AbstractFirBlackBoxCodegenTest { + public class NotNullAssertions { @Test public void testAllFilesPresentInNotNullAssertions() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/javaInterop/notNullAssertions"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -19168,7 +20580,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability") @TestDataPath("$PROJECT_ROOT") - public class EnhancedNullability extends AbstractFirBlackBoxCodegenTest { + public class EnhancedNullability { @Test public void testAllFilesPresentInEnhancedNullability() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -19226,7 +20638,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullCheckOnLambdaReturnValue") @TestDataPath("$PROJECT_ROOT") - public class NullCheckOnLambdaReturnValue extends AbstractFirBlackBoxCodegenTest { + public class NullCheckOnLambdaReturnValue { @Test public void testAllFilesPresentInNullCheckOnLambdaReturnValue() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullCheckOnLambdaReturnValue"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -19297,7 +20709,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/javaInterop/objectMethods") @TestDataPath("$PROJECT_ROOT") - public class ObjectMethods extends AbstractFirBlackBoxCodegenTest { + public class ObjectMethods { @Test public void testAllFilesPresentInObjectMethods() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/javaInterop/objectMethods"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -19344,7 +20756,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/jdk") @TestDataPath("$PROJECT_ROOT") - public class Jdk extends AbstractFirBlackBoxCodegenTest { + public class Jdk { @Test public void testAllFilesPresentInJdk() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/jdk"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -19402,7 +20814,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/jvm8") @TestDataPath("$PROJECT_ROOT") - public class Jvm8 extends AbstractFirBlackBoxCodegenTest { + public class Jvm8 { @Test public void testAllFilesPresentInJvm8() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/jvm8"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -19543,7 +20955,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/jvm8/defaults") @TestDataPath("$PROJECT_ROOT") - public class Defaults extends AbstractFirBlackBoxCodegenTest { + public class Defaults { @Test @TestMetadata("26360.kt") public void test26360() throws Exception { @@ -19735,10 +21147,16 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT runTest("compiler/testData/codegen/box/jvm8/defaults/superCall.kt"); } + @Test + @TestMetadata("suspendFunction.kt") + public void testSuspendFunction() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/suspendFunction.kt"); + } + @Nested @TestMetadata("compiler/testData/codegen/box/jvm8/defaults/allCompatibility") @TestDataPath("$PROJECT_ROOT") - public class AllCompatibility extends AbstractFirBlackBoxCodegenTest { + public class AllCompatibility { @Test @TestMetadata("accessor.kt") public void testAccessor() throws Exception { @@ -19912,10 +21330,16 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT runTest("compiler/testData/codegen/box/jvm8/defaults/allCompatibility/simpleFunction.kt"); } + @Test + @TestMetadata("suspendFunction.kt") + public void testSuspendFunction() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/allCompatibility/suspendFunction.kt"); + } + @Nested @TestMetadata("compiler/testData/codegen/box/jvm8/defaults/allCompatibility/delegationBy") @TestDataPath("$PROJECT_ROOT") - public class DelegationBy extends AbstractFirBlackBoxCodegenTest { + public class DelegationBy { @Test public void testAllFilesPresentInDelegationBy() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/jvm8/defaults/allCompatibility/delegationBy"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -19938,7 +21362,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/jvm8/defaults/compatibility") @TestDataPath("$PROJECT_ROOT") - public class Compatibility extends AbstractFirBlackBoxCodegenTest { + public class Compatibility { @Test public void testAllFilesPresentInCompatibility() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/jvm8/defaults/compatibility"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -20044,7 +21468,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/jvm8/defaults/delegationBy") @TestDataPath("$PROJECT_ROOT") - public class DelegationBy extends AbstractFirBlackBoxCodegenTest { + public class DelegationBy { @Test public void testAllFilesPresentInDelegationBy() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/jvm8/defaults/delegationBy"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -20066,7 +21490,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls") @TestDataPath("$PROJECT_ROOT") - public class NoDefaultImpls extends AbstractFirBlackBoxCodegenTest { + public class NoDefaultImpls { @Test @TestMetadata("accessor.kt") public void testAccessor() throws Exception { @@ -20234,10 +21658,16 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT runTest("compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/simpleFunction.kt"); } + @Test + @TestMetadata("suspendFunction.kt") + public void testSuspendFunction() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/suspendFunction.kt"); + } + @Nested @TestMetadata("compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/delegationBy") @TestDataPath("$PROJECT_ROOT") - public class DelegationBy extends AbstractFirBlackBoxCodegenTest { + public class DelegationBy { @Test public void testAllFilesPresentInDelegationBy() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/delegationBy"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -20259,7 +21689,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/specialization") @TestDataPath("$PROJECT_ROOT") - public class Specialization extends AbstractFirBlackBoxCodegenTest { + public class Specialization { @Test public void testAllFilesPresentInSpecialization() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/specialization"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -20276,7 +21706,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/jvm8/defaults/noDelegation") @TestDataPath("$PROJECT_ROOT") - public class NoDelegation extends AbstractFirBlackBoxCodegenTest { + public class NoDelegation { @Test public void testAllFilesPresentInNoDelegation() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/jvm8/defaults/noDelegation"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -20304,7 +21734,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/jvm8/defaults/reflection") @TestDataPath("$PROJECT_ROOT") - public class Reflection extends AbstractFirBlackBoxCodegenTest { + public class Reflection { @Test public void testAllFilesPresentInReflection() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/jvm8/defaults/reflection"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -20321,7 +21751,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/jvm8/interfaceFlag") @TestDataPath("$PROJECT_ROOT") - public class InterfaceFlag extends AbstractFirBlackBoxCodegenTest { + public class InterfaceFlag { @Test public void testAllFilesPresentInInterfaceFlag() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/jvm8/interfaceFlag"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -20343,7 +21773,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/jvm8/javaDefaults") @TestDataPath("$PROJECT_ROOT") - public class JavaDefaults extends AbstractFirBlackBoxCodegenTest { + public class JavaDefaults { @Test public void testAllFilesPresentInJavaDefaults() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/jvm8/javaDefaults"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -20438,7 +21868,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/jvmField") @TestDataPath("$PROJECT_ROOT") - public class JvmField extends AbstractFirBlackBoxCodegenTest { + public class JvmField { @Test public void testAllFilesPresentInJvmField() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/jvmField"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -20598,7 +22028,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/jvmName") @TestDataPath("$PROJECT_ROOT") - public class JvmName extends AbstractFirBlackBoxCodegenTest { + public class JvmName { @Test public void testAllFilesPresentInJvmName() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/jvmName"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -20703,7 +22133,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/jvmName/fileFacades") @TestDataPath("$PROJECT_ROOT") - public class FileFacades extends AbstractFirBlackBoxCodegenTest { + public class FileFacades { @Test public void testAllFilesPresentInFileFacades() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/jvmName/fileFacades"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -20732,7 +22162,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/jvmOverloads") @TestDataPath("$PROJECT_ROOT") - public class JvmOverloads extends AbstractFirBlackBoxCodegenTest { + public class JvmOverloads { @Test public void testAllFilesPresentInJvmOverloads() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/jvmOverloads"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -20862,7 +22292,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/jvmPackageName") @TestDataPath("$PROJECT_ROOT") - public class JvmPackageName extends AbstractFirBlackBoxCodegenTest { + public class JvmPackageName { @Test public void testAllFilesPresentInJvmPackageName() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/jvmPackageName"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -20902,7 +22332,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/jvmStatic") @TestDataPath("$PROJECT_ROOT") - public class JvmStatic extends AbstractFirBlackBoxCodegenTest { + public class JvmStatic { @Test public void testAllFilesPresentInJvmStatic() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/jvmStatic"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -21110,7 +22540,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/labels") @TestDataPath("$PROJECT_ROOT") - public class Labels extends AbstractFirBlackBoxCodegenTest { + public class Labels { @Test public void testAllFilesPresentInLabels() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/labels"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -21168,7 +22598,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/lazyCodegen") @TestDataPath("$PROJECT_ROOT") - public class LazyCodegen extends AbstractFirBlackBoxCodegenTest { + public class LazyCodegen { @Test public void testAllFilesPresentInLazyCodegen() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/lazyCodegen"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -21231,7 +22661,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/lazyCodegen/optimizations") @TestDataPath("$PROJECT_ROOT") - public class Optimizations extends AbstractFirBlackBoxCodegenTest { + public class Optimizations { @Test public void testAllFilesPresentInOptimizations() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/lazyCodegen/optimizations"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -21296,7 +22726,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/localClasses") @TestDataPath("$PROJECT_ROOT") - public class LocalClasses extends AbstractFirBlackBoxCodegenTest { + public class LocalClasses { @Test public void testAllFilesPresentInLocalClasses() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/localClasses"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -21528,7 +22958,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/mangling") @TestDataPath("$PROJECT_ROOT") - public class Mangling extends AbstractFirBlackBoxCodegenTest { + public class Mangling { @Test public void testAllFilesPresentInMangling() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/mangling"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -21592,7 +23022,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/mixedNamedPosition") @TestDataPath("$PROJECT_ROOT") - public class MixedNamedPosition extends AbstractFirBlackBoxCodegenTest { + public class MixedNamedPosition { @Test public void testAllFilesPresentInMixedNamedPosition() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/mixedNamedPosition"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -21626,7 +23056,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/multiDecl") @TestDataPath("$PROJECT_ROOT") - public class MultiDecl extends AbstractFirBlackBoxCodegenTest { + public class MultiDecl { @Test public void testAllFilesPresentInMultiDecl() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiDecl"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -21719,7 +23149,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/multiDecl/forIterator") @TestDataPath("$PROJECT_ROOT") - public class ForIterator extends AbstractFirBlackBoxCodegenTest { + public class ForIterator { @Test public void testAllFilesPresentInForIterator() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiDecl/forIterator"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -21758,7 +23188,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/multiDecl/forIterator/longIterator") @TestDataPath("$PROJECT_ROOT") - public class LongIterator extends AbstractFirBlackBoxCodegenTest { + public class LongIterator { @Test public void testAllFilesPresentInLongIterator() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiDecl/forIterator/longIterator"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -21793,7 +23223,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/multiDecl/forRange") @TestDataPath("$PROJECT_ROOT") - public class ForRange extends AbstractFirBlackBoxCodegenTest { + public class ForRange { @Test public void testAllFilesPresentInForRange() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiDecl/forRange"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -21844,7 +23274,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo") @TestDataPath("$PROJECT_ROOT") - public class ExplicitRangeTo extends AbstractFirBlackBoxCodegenTest { + public class ExplicitRangeTo { @Test public void testAllFilesPresentInExplicitRangeTo() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -21883,7 +23313,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/int") @TestDataPath("$PROJECT_ROOT") - public class Int extends AbstractFirBlackBoxCodegenTest { + public class Int { @Test public void testAllFilesPresentInInt() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/int"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -21917,7 +23347,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/long") @TestDataPath("$PROJECT_ROOT") - public class Long extends AbstractFirBlackBoxCodegenTest { + public class Long { @Test public void testAllFilesPresentInLong() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/long"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -21952,7 +23382,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot") @TestDataPath("$PROJECT_ROOT") - public class ExplicitRangeToWithDot extends AbstractFirBlackBoxCodegenTest { + public class ExplicitRangeToWithDot { @Test public void testAllFilesPresentInExplicitRangeToWithDot() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -21991,7 +23421,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/int") @TestDataPath("$PROJECT_ROOT") - public class Int extends AbstractFirBlackBoxCodegenTest { + public class Int { @Test public void testAllFilesPresentInInt() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/int"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -22025,7 +23455,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/long") @TestDataPath("$PROJECT_ROOT") - public class Long extends AbstractFirBlackBoxCodegenTest { + public class Long { @Test public void testAllFilesPresentInLong() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/long"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -22060,7 +23490,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/multiDecl/forRange/int") @TestDataPath("$PROJECT_ROOT") - public class Int extends AbstractFirBlackBoxCodegenTest { + public class Int { @Test public void testAllFilesPresentInInt() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiDecl/forRange/int"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -22094,7 +23524,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/multiDecl/forRange/long") @TestDataPath("$PROJECT_ROOT") - public class Long extends AbstractFirBlackBoxCodegenTest { + public class Long { @Test public void testAllFilesPresentInLong() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiDecl/forRange/long"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -22130,7 +23560,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/multifileClasses") @TestDataPath("$PROJECT_ROOT") - public class MultifileClasses extends AbstractFirBlackBoxCodegenTest { + public class MultifileClasses { @Test public void testAllFilesPresentInMultifileClasses() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multifileClasses"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -22223,7 +23653,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/multifileClasses/optimized") @TestDataPath("$PROJECT_ROOT") - public class Optimized extends AbstractFirBlackBoxCodegenTest { + public class Optimized { @Test public void testAllFilesPresentInOptimized() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multifileClasses/optimized"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -22300,12 +23730,18 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/multiplatform") @TestDataPath("$PROJECT_ROOT") - public class Multiplatform extends AbstractFirBlackBoxCodegenTest { + public class Multiplatform { @Test public void testAllFilesPresentInMultiplatform() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test + @TestMetadata("annotationsViaActualTypeAliasFromBinary.kt") + public void testAnnotationsViaActualTypeAliasFromBinary() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/annotationsViaActualTypeAliasFromBinary.kt"); + } + @Test @TestMetadata("expectClassInJvmMultifileFacade.kt") public void testExpectClassInJvmMultifileFacade() throws Exception { @@ -22339,7 +23775,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/multiplatform/defaultArguments") @TestDataPath("$PROJECT_ROOT") - public class DefaultArguments extends AbstractFirBlackBoxCodegenTest { + public class DefaultArguments { @Test public void testAllFilesPresentInDefaultArguments() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/defaultArguments"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -22487,7 +23923,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/multiplatform/multiModule") @TestDataPath("$PROJECT_ROOT") - public class MultiModule extends AbstractFirBlackBoxCodegenTest { + public class MultiModule { @Test public void testAllFilesPresentInMultiModule() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/multiModule"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -22498,7 +23934,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/nonLocalReturns") @TestDataPath("$PROJECT_ROOT") - public class NonLocalReturns extends AbstractFirBlackBoxCodegenTest { + public class NonLocalReturns { @Test public void testAllFilesPresentInNonLocalReturns() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/nonLocalReturns"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -22541,10 +23977,50 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT } } + @Nested + @TestMetadata("compiler/testData/codegen/box/notNullAssertions") + @TestDataPath("$PROJECT_ROOT") + public class NotNullAssertions { + @Test + public void testAllFilesPresentInNotNullAssertions() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/notNullAssertions"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @Test + @TestMetadata("callAssertions.kt") + public void testCallAssertions() throws Exception { + runTest("compiler/testData/codegen/box/notNullAssertions/callAssertions.kt"); + } + + @Test + @TestMetadata("delegation.kt") + public void testDelegation() throws Exception { + runTest("compiler/testData/codegen/box/notNullAssertions/delegation.kt"); + } + + @Test + @TestMetadata("doGenerateParamAssertions.kt") + public void testDoGenerateParamAssertions() throws Exception { + runTest("compiler/testData/codegen/box/notNullAssertions/doGenerateParamAssertions.kt"); + } + + @Test + @TestMetadata("noCallAssertions.kt") + public void testNoCallAssertions() throws Exception { + runTest("compiler/testData/codegen/box/notNullAssertions/noCallAssertions.kt"); + } + + @Test + @TestMetadata("rightElvisOperand.kt") + public void testRightElvisOperand() throws Exception { + runTest("compiler/testData/codegen/box/notNullAssertions/rightElvisOperand.kt"); + } + } + @Nested @TestMetadata("compiler/testData/codegen/box/nothingValue") @TestDataPath("$PROJECT_ROOT") - public class NothingValue extends AbstractFirBlackBoxCodegenTest { + public class NothingValue { @Test public void testAllFilesPresentInNothingValue() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/nothingValue"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -22566,7 +24042,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/nullCheckOptimization") @TestDataPath("$PROJECT_ROOT") - public class NullCheckOptimization extends AbstractFirBlackBoxCodegenTest { + public class NullCheckOptimization { @Test public void testAllFilesPresentInNullCheckOptimization() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/nullCheckOptimization"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -22648,7 +24124,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/objectIntrinsics") @TestDataPath("$PROJECT_ROOT") - public class ObjectIntrinsics extends AbstractFirBlackBoxCodegenTest { + public class ObjectIntrinsics { @Test public void testAllFilesPresentInObjectIntrinsics() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/objectIntrinsics"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -22664,7 +24140,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/objects") @TestDataPath("$PROJECT_ROOT") - public class Objects extends AbstractFirBlackBoxCodegenTest { + public class Objects { @Test public void testAllFilesPresentInObjects() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/objects"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -23117,7 +24593,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/objects/companionObjectAccess") @TestDataPath("$PROJECT_ROOT") - public class CompanionObjectAccess extends AbstractFirBlackBoxCodegenTest { + public class CompanionObjectAccess { @Test public void testAllFilesPresentInCompanionObjectAccess() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/objects/companionObjectAccess"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -23222,7 +24698,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/objects/companionObjectAccess/multipleCompanionsWithAccessors") @TestDataPath("$PROJECT_ROOT") - public class MultipleCompanionsWithAccessors extends AbstractFirBlackBoxCodegenTest { + public class MultipleCompanionsWithAccessors { @Test @TestMetadata("accessFromInlineLambda.kt") public void testAccessFromInlineLambda() throws Exception { @@ -23304,7 +24780,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/objects/companionObjectAccess/primitiveCompanion") @TestDataPath("$PROJECT_ROOT") - public class PrimitiveCompanion extends AbstractFirBlackBoxCodegenTest { + public class PrimitiveCompanion { @Test public void testAllFilesPresentInPrimitiveCompanion() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/objects/companionObjectAccess/primitiveCompanion"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -23358,7 +24834,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/operatorConventions") @TestDataPath("$PROJECT_ROOT") - public class OperatorConventions extends AbstractFirBlackBoxCodegenTest { + public class OperatorConventions { @Test public void testAllFilesPresentInOperatorConventions() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/operatorConventions"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -23487,7 +24963,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/operatorConventions/compareTo") @TestDataPath("$PROJECT_ROOT") - public class CompareTo extends AbstractFirBlackBoxCodegenTest { + public class CompareTo { @Test public void testAllFilesPresentInCompareTo() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/operatorConventions/compareTo"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -23564,7 +25040,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/optimizations") @TestDataPath("$PROJECT_ROOT") - public class Optimizations extends AbstractFirBlackBoxCodegenTest { + public class Optimizations { @Test public void testAllFilesPresentInOptimizations() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/optimizations"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -23586,7 +25062,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/package") @TestDataPath("$PROJECT_ROOT") - public class Package extends AbstractFirBlackBoxCodegenTest { + public class Package { @Test public void testAllFilesPresentInPackage() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/package"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -23668,7 +25144,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/parametersMetadata") @TestDataPath("$PROJECT_ROOT") - public class ParametersMetadata extends AbstractFirBlackBoxCodegenTest { + public class ParametersMetadata { @Test public void testAllFilesPresentInParametersMetadata() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/parametersMetadata"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -23738,18 +25214,42 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/platformTypes") @TestDataPath("$PROJECT_ROOT") - public class PlatformTypes extends AbstractFirBlackBoxCodegenTest { + public class PlatformTypes { @Test public void testAllFilesPresentInPlatformTypes() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/platformTypes"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test + @TestMetadata("genericUnit.kt") + public void testGenericUnit() throws Exception { + runTest("compiler/testData/codegen/box/platformTypes/genericUnit.kt"); + } + @Test @TestMetadata("inferenceFlexibleTToNullable.kt") public void testInferenceFlexibleTToNullable() throws Exception { runTest("compiler/testData/codegen/box/platformTypes/inferenceFlexibleTToNullable.kt"); } + @Test + @TestMetadata("kt14989.kt") + public void testKt14989() throws Exception { + runTest("compiler/testData/codegen/box/platformTypes/kt14989.kt"); + } + + @Test + @TestMetadata("specializedMapFull.kt") + public void testSpecializedMapFull() throws Exception { + runTest("compiler/testData/codegen/box/platformTypes/specializedMapFull.kt"); + } + + @Test + @TestMetadata("specializedMapPut.kt") + public void testSpecializedMapPut() throws Exception { + runTest("compiler/testData/codegen/box/platformTypes/specializedMapPut.kt"); + } + @Test @TestMetadata("unsafeNullCheck.kt") public void testUnsafeNullCheck() throws Exception { @@ -23765,7 +25265,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/platformTypes/primitives") @TestDataPath("$PROJECT_ROOT") - public class Primitives extends AbstractFirBlackBoxCodegenTest { + public class Primitives { @Test public void testAllFilesPresentInPrimitives() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/platformTypes/primitives"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -23902,7 +25402,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/polymorphicSignature") @TestDataPath("$PROJECT_ROOT") - public class PolymorphicSignature extends AbstractFirBlackBoxCodegenTest { + public class PolymorphicSignature { @Test public void testAllFilesPresentInPolymorphicSignature() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/polymorphicSignature"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -23960,7 +25460,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/primitiveTypes") @TestDataPath("$PROJECT_ROOT") - public class PrimitiveTypes extends AbstractFirBlackBoxCodegenTest { + public class PrimitiveTypes { @Test public void testAllFilesPresentInPrimitiveTypes() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/primitiveTypes"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -24323,7 +25823,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/primitiveTypes/equalityWithObject") @TestDataPath("$PROJECT_ROOT") - public class EqualityWithObject extends AbstractFirBlackBoxCodegenTest { + public class EqualityWithObject { @Test public void testAllFilesPresentInEqualityWithObject() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/primitiveTypes/equalityWithObject"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -24386,7 +25886,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated") @TestDataPath("$PROJECT_ROOT") - public class Generated extends AbstractFirBlackBoxCodegenTest { + public class Generated { @Test public void testAllFilesPresentInGenerated() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -24506,7 +26006,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/private") @TestDataPath("$PROJECT_ROOT") - public class Private extends AbstractFirBlackBoxCodegenTest { + public class Private { @Test public void testAllFilesPresentInPrivate() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/private"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -24528,7 +26028,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/privateConstructors") @TestDataPath("$PROJECT_ROOT") - public class PrivateConstructors extends AbstractFirBlackBoxCodegenTest { + public class PrivateConstructors { @Test public void testAllFilesPresentInPrivateConstructors() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/privateConstructors"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -24616,7 +26116,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/properties") @TestDataPath("$PROJECT_ROOT") - public class Properties extends AbstractFirBlackBoxCodegenTest { + public class Properties { @Test @TestMetadata("accessToPrivateProperty.kt") public void testAccessToPrivateProperty() throws Exception { @@ -25135,7 +26635,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/properties/const") @TestDataPath("$PROJECT_ROOT") - public class Const extends AbstractFirBlackBoxCodegenTest { + public class Const { @Test public void testAllFilesPresentInConst() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/properties/const"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -25193,7 +26693,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/properties/lateinit") @TestDataPath("$PROJECT_ROOT") - public class Lateinit extends AbstractFirBlackBoxCodegenTest { + public class Lateinit { @Test @TestMetadata("accessor.kt") public void testAccessor() throws Exception { @@ -25292,7 +26792,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize") @TestDataPath("$PROJECT_ROOT") - public class IsInitializedAndDeinitialize extends AbstractFirBlackBoxCodegenTest { + public class IsInitializedAndDeinitialize { @Test public void testAllFilesPresentInIsInitializedAndDeinitialize() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -25356,7 +26856,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/properties/lateinit/local") @TestDataPath("$PROJECT_ROOT") - public class Local extends AbstractFirBlackBoxCodegenTest { + public class Local { @Test public void testAllFilesPresentInLocal() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/properties/lateinit/local"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -25408,7 +26908,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/properties/lateinit/topLevel") @TestDataPath("$PROJECT_ROOT") - public class TopLevel extends AbstractFirBlackBoxCodegenTest { + public class TopLevel { @Test @TestMetadata("accessorException.kt") public void testAccessorException() throws Exception { @@ -25447,10 +26947,38 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT } } + @Nested + @TestMetadata("compiler/testData/codegen/box/property") + @TestDataPath("$PROJECT_ROOT") + public class Property { + @Test + public void testAllFilesPresentInProperty() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/property"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @Test + @TestMetadata("fieldAccessFromExtensionInTraitImpl.kt") + public void testFieldAccessFromExtensionInTraitImpl() throws Exception { + runTest("compiler/testData/codegen/box/property/fieldAccessFromExtensionInTraitImpl.kt"); + } + + @Test + @TestMetadata("fieldAccessViaSubclass.kt") + public void testFieldAccessViaSubclass() throws Exception { + runTest("compiler/testData/codegen/box/property/fieldAccessViaSubclass.kt"); + } + + @Test + @TestMetadata("referenceToJavaFieldViaBridge.kt") + public void testReferenceToJavaFieldViaBridge() throws Exception { + runTest("compiler/testData/codegen/box/property/referenceToJavaFieldViaBridge.kt"); + } + } + @Nested @TestMetadata("compiler/testData/codegen/box/publishedApi") @TestDataPath("$PROJECT_ROOT") - public class PublishedApi extends AbstractFirBlackBoxCodegenTest { + public class PublishedApi { @Test public void testAllFilesPresentInPublishedApi() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/publishedApi"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -25478,7 +27006,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/ranges") @TestDataPath("$PROJECT_ROOT") - public class Ranges extends AbstractFirBlackBoxCodegenTest { + public class Ranges { @Test public void testAllFilesPresentInRanges() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -25589,7 +27117,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/ranges/contains") @TestDataPath("$PROJECT_ROOT") - public class Contains extends AbstractFirBlackBoxCodegenTest { + public class Contains { @Test public void testAllFilesPresentInContains() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/contains"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -25838,7 +27366,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/ranges/contains/generated") @TestDataPath("$PROJECT_ROOT") - public class Generated extends AbstractFirBlackBoxCodegenTest { + public class Generated { @Test public void testAllFilesPresentInGenerated() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/contains/generated"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -25933,7 +27461,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/ranges/evaluationOrder") @TestDataPath("$PROJECT_ROOT") - public class EvaluationOrder extends AbstractFirBlackBoxCodegenTest { + public class EvaluationOrder { @Test public void testAllFilesPresentInEvaluationOrder() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/evaluationOrder"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -25996,7 +27524,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/ranges/evaluationOrder/stepped") @TestDataPath("$PROJECT_ROOT") - public class Stepped extends AbstractFirBlackBoxCodegenTest { + public class Stepped { @Test public void testAllFilesPresentInStepped() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/evaluationOrder/stepped"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -26005,7 +27533,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/ranges/evaluationOrder/stepped/forInDownTo") @TestDataPath("$PROJECT_ROOT") - public class ForInDownTo extends AbstractFirBlackBoxCodegenTest { + public class ForInDownTo { @Test public void testAllFilesPresentInForInDownTo() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/evaluationOrder/stepped/forInDownTo"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -26063,7 +27591,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/ranges/evaluationOrder/stepped/forInRangeLiteral") @TestDataPath("$PROJECT_ROOT") - public class ForInRangeLiteral extends AbstractFirBlackBoxCodegenTest { + public class ForInRangeLiteral { @Test public void testAllFilesPresentInForInRangeLiteral() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/evaluationOrder/stepped/forInRangeLiteral"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -26121,7 +27649,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/ranges/evaluationOrder/stepped/forInUntil") @TestDataPath("$PROJECT_ROOT") - public class ForInUntil extends AbstractFirBlackBoxCodegenTest { + public class ForInUntil { @Test public void testAllFilesPresentInForInUntil() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/evaluationOrder/stepped/forInUntil"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -26181,7 +27709,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/ranges/expression") @TestDataPath("$PROJECT_ROOT") - public class Expression extends AbstractFirBlackBoxCodegenTest { + public class Expression { @Test public void testAllFilesPresentInExpression() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/expression"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -26371,7 +27899,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/ranges/forInDownTo") @TestDataPath("$PROJECT_ROOT") - public class ForInDownTo extends AbstractFirBlackBoxCodegenTest { + public class ForInDownTo { @Test public void testAllFilesPresentInForInDownTo() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/forInDownTo"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -26411,7 +27939,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/ranges/forInIndices") @TestDataPath("$PROJECT_ROOT") - public class ForInIndices extends AbstractFirBlackBoxCodegenTest { + public class ForInIndices { @Test public void testAllFilesPresentInForInIndices() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/forInIndices"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -26547,7 +28075,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/ranges/forInProgressionWithIndex") @TestDataPath("$PROJECT_ROOT") - public class ForInProgressionWithIndex extends AbstractFirBlackBoxCodegenTest { + public class ForInProgressionWithIndex { @Test public void testAllFilesPresentInForInProgressionWithIndex() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/forInProgressionWithIndex"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -26647,7 +28175,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/ranges/forInReversed") @TestDataPath("$PROJECT_ROOT") - public class ForInReversed extends AbstractFirBlackBoxCodegenTest { + public class ForInReversed { @Test public void testAllFilesPresentInForInReversed() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/forInReversed"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -26765,7 +28293,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/ranges/forInUntil") @TestDataPath("$PROJECT_ROOT") - public class ForInUntil extends AbstractFirBlackBoxCodegenTest { + public class ForInUntil { @Test public void testAllFilesPresentInForInUntil() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/forInUntil"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -26865,7 +28393,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/ranges/forWithPossibleOverflow") @TestDataPath("$PROJECT_ROOT") - public class ForWithPossibleOverflow extends AbstractFirBlackBoxCodegenTest { + public class ForWithPossibleOverflow { @Test public void testAllFilesPresentInForWithPossibleOverflow() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/forWithPossibleOverflow"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -26953,7 +28481,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/ranges/javaInterop") @TestDataPath("$PROJECT_ROOT") - public class JavaInterop extends AbstractFirBlackBoxCodegenTest { + public class JavaInterop { @Test public void testAllFilesPresentInJavaInterop() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/javaInterop"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -27076,7 +28604,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/ranges/javaInterop/withIndex") @TestDataPath("$PROJECT_ROOT") - public class WithIndex extends AbstractFirBlackBoxCodegenTest { + public class WithIndex { @Test public void testAllFilesPresentInWithIndex() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/javaInterop/withIndex"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -27165,7 +28693,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/ranges/literal") @TestDataPath("$PROJECT_ROOT") - public class Literal extends AbstractFirBlackBoxCodegenTest { + public class Literal { @Test public void testAllFilesPresentInLiteral() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/literal"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -27355,7 +28883,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/ranges/nullableLoopParameter") @TestDataPath("$PROJECT_ROOT") - public class NullableLoopParameter extends AbstractFirBlackBoxCodegenTest { + public class NullableLoopParameter { @Test public void testAllFilesPresentInNullableLoopParameter() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/nullableLoopParameter"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -27383,7 +28911,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped") @TestDataPath("$PROJECT_ROOT") - public class Stepped extends AbstractFirBlackBoxCodegenTest { + public class Stepped { @Test public void testAllFilesPresentInStepped() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -27392,7 +28920,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/expression") @TestDataPath("$PROJECT_ROOT") - public class Expression extends AbstractFirBlackBoxCodegenTest { + public class Expression { @Test public void testAllFilesPresentInExpression() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/expression"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -27401,7 +28929,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/expression/downTo") @TestDataPath("$PROJECT_ROOT") - public class DownTo extends AbstractFirBlackBoxCodegenTest { + public class DownTo { @Test public void testAllFilesPresentInDownTo() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/expression/downTo"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -27506,7 +29034,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/expression/downTo/nestedStep") @TestDataPath("$PROJECT_ROOT") - public class NestedStep extends AbstractFirBlackBoxCodegenTest { + public class NestedStep { @Test public void testAllFilesPresentInNestedStep() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/expression/downTo/nestedStep"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -27564,7 +29092,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/expression/downTo/reversed") @TestDataPath("$PROJECT_ROOT") - public class Reversed extends AbstractFirBlackBoxCodegenTest { + public class Reversed { @Test public void testAllFilesPresentInReversed() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/expression/downTo/reversed"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -27611,7 +29139,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/expression/rangeTo") @TestDataPath("$PROJECT_ROOT") - public class RangeTo extends AbstractFirBlackBoxCodegenTest { + public class RangeTo { @Test public void testAllFilesPresentInRangeTo() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/expression/rangeTo"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -27716,7 +29244,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/nestedStep") @TestDataPath("$PROJECT_ROOT") - public class NestedStep extends AbstractFirBlackBoxCodegenTest { + public class NestedStep { @Test public void testAllFilesPresentInNestedStep() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/nestedStep"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -27774,7 +29302,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/reversed") @TestDataPath("$PROJECT_ROOT") - public class Reversed extends AbstractFirBlackBoxCodegenTest { + public class Reversed { @Test public void testAllFilesPresentInReversed() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/reversed"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -27821,7 +29349,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/expression/until") @TestDataPath("$PROJECT_ROOT") - public class Until extends AbstractFirBlackBoxCodegenTest { + public class Until { @Test public void testAllFilesPresentInUntil() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/expression/until"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -27932,7 +29460,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/expression/until/nestedStep") @TestDataPath("$PROJECT_ROOT") - public class NestedStep extends AbstractFirBlackBoxCodegenTest { + public class NestedStep { @Test public void testAllFilesPresentInNestedStep() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/expression/until/nestedStep"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -27990,7 +29518,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/expression/until/reversed") @TestDataPath("$PROJECT_ROOT") - public class Reversed extends AbstractFirBlackBoxCodegenTest { + public class Reversed { @Test public void testAllFilesPresentInReversed() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/expression/until/reversed"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -28038,7 +29566,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/literal") @TestDataPath("$PROJECT_ROOT") - public class Literal extends AbstractFirBlackBoxCodegenTest { + public class Literal { @Test public void testAllFilesPresentInLiteral() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/literal"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -28047,7 +29575,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/literal/downTo") @TestDataPath("$PROJECT_ROOT") - public class DownTo extends AbstractFirBlackBoxCodegenTest { + public class DownTo { @Test public void testAllFilesPresentInDownTo() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/literal/downTo"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -28152,7 +29680,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/literal/downTo/nestedStep") @TestDataPath("$PROJECT_ROOT") - public class NestedStep extends AbstractFirBlackBoxCodegenTest { + public class NestedStep { @Test public void testAllFilesPresentInNestedStep() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/literal/downTo/nestedStep"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -28210,7 +29738,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/literal/downTo/reversed") @TestDataPath("$PROJECT_ROOT") - public class Reversed extends AbstractFirBlackBoxCodegenTest { + public class Reversed { @Test public void testAllFilesPresentInReversed() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/literal/downTo/reversed"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -28257,7 +29785,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/literal/rangeTo") @TestDataPath("$PROJECT_ROOT") - public class RangeTo extends AbstractFirBlackBoxCodegenTest { + public class RangeTo { @Test public void testAllFilesPresentInRangeTo() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/literal/rangeTo"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -28362,7 +29890,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/nestedStep") @TestDataPath("$PROJECT_ROOT") - public class NestedStep extends AbstractFirBlackBoxCodegenTest { + public class NestedStep { @Test public void testAllFilesPresentInNestedStep() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/nestedStep"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -28420,7 +29948,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/reversed") @TestDataPath("$PROJECT_ROOT") - public class Reversed extends AbstractFirBlackBoxCodegenTest { + public class Reversed { @Test public void testAllFilesPresentInReversed() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/reversed"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -28467,7 +29995,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/literal/until") @TestDataPath("$PROJECT_ROOT") - public class Until extends AbstractFirBlackBoxCodegenTest { + public class Until { @Test public void testAllFilesPresentInUntil() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/literal/until"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -28578,7 +30106,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/literal/until/nestedStep") @TestDataPath("$PROJECT_ROOT") - public class NestedStep extends AbstractFirBlackBoxCodegenTest { + public class NestedStep { @Test public void testAllFilesPresentInNestedStep() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/literal/until/nestedStep"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -28636,7 +30164,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/literal/until/reversed") @TestDataPath("$PROJECT_ROOT") - public class Reversed extends AbstractFirBlackBoxCodegenTest { + public class Reversed { @Test public void testAllFilesPresentInReversed() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/literal/until/reversed"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -28684,7 +30212,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned") @TestDataPath("$PROJECT_ROOT") - public class Unsigned extends AbstractFirBlackBoxCodegenTest { + public class Unsigned { @Test public void testAllFilesPresentInUnsigned() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -28693,7 +30221,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/expression") @TestDataPath("$PROJECT_ROOT") - public class Expression extends AbstractFirBlackBoxCodegenTest { + public class Expression { @Test public void testAllFilesPresentInExpression() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/expression"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -28702,7 +30230,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo") @TestDataPath("$PROJECT_ROOT") - public class DownTo extends AbstractFirBlackBoxCodegenTest { + public class DownTo { @Test public void testAllFilesPresentInDownTo() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -28807,7 +30335,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/nestedStep") @TestDataPath("$PROJECT_ROOT") - public class NestedStep extends AbstractFirBlackBoxCodegenTest { + public class NestedStep { @Test public void testAllFilesPresentInNestedStep() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/nestedStep"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -28865,7 +30393,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/reversed") @TestDataPath("$PROJECT_ROOT") - public class Reversed extends AbstractFirBlackBoxCodegenTest { + public class Reversed { @Test public void testAllFilesPresentInReversed() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/reversed"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -28912,7 +30440,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo") @TestDataPath("$PROJECT_ROOT") - public class RangeTo extends AbstractFirBlackBoxCodegenTest { + public class RangeTo { @Test public void testAllFilesPresentInRangeTo() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -29017,7 +30545,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/nestedStep") @TestDataPath("$PROJECT_ROOT") - public class NestedStep extends AbstractFirBlackBoxCodegenTest { + public class NestedStep { @Test public void testAllFilesPresentInNestedStep() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/nestedStep"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -29075,7 +30603,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/reversed") @TestDataPath("$PROJECT_ROOT") - public class Reversed extends AbstractFirBlackBoxCodegenTest { + public class Reversed { @Test public void testAllFilesPresentInReversed() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/reversed"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -29122,7 +30650,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until") @TestDataPath("$PROJECT_ROOT") - public class Until extends AbstractFirBlackBoxCodegenTest { + public class Until { @Test public void testAllFilesPresentInUntil() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -29233,7 +30761,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/nestedStep") @TestDataPath("$PROJECT_ROOT") - public class NestedStep extends AbstractFirBlackBoxCodegenTest { + public class NestedStep { @Test public void testAllFilesPresentInNestedStep() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/nestedStep"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -29291,7 +30819,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/reversed") @TestDataPath("$PROJECT_ROOT") - public class Reversed extends AbstractFirBlackBoxCodegenTest { + public class Reversed { @Test public void testAllFilesPresentInReversed() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/reversed"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -29339,7 +30867,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/literal") @TestDataPath("$PROJECT_ROOT") - public class Literal extends AbstractFirBlackBoxCodegenTest { + public class Literal { @Test public void testAllFilesPresentInLiteral() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/literal"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -29348,7 +30876,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo") @TestDataPath("$PROJECT_ROOT") - public class DownTo extends AbstractFirBlackBoxCodegenTest { + public class DownTo { @Test public void testAllFilesPresentInDownTo() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -29453,7 +30981,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/nestedStep") @TestDataPath("$PROJECT_ROOT") - public class NestedStep extends AbstractFirBlackBoxCodegenTest { + public class NestedStep { @Test public void testAllFilesPresentInNestedStep() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/nestedStep"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -29511,7 +31039,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/reversed") @TestDataPath("$PROJECT_ROOT") - public class Reversed extends AbstractFirBlackBoxCodegenTest { + public class Reversed { @Test public void testAllFilesPresentInReversed() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/reversed"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -29558,7 +31086,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo") @TestDataPath("$PROJECT_ROOT") - public class RangeTo extends AbstractFirBlackBoxCodegenTest { + public class RangeTo { @Test public void testAllFilesPresentInRangeTo() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -29663,7 +31191,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/nestedStep") @TestDataPath("$PROJECT_ROOT") - public class NestedStep extends AbstractFirBlackBoxCodegenTest { + public class NestedStep { @Test public void testAllFilesPresentInNestedStep() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/nestedStep"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -29721,7 +31249,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/reversed") @TestDataPath("$PROJECT_ROOT") - public class Reversed extends AbstractFirBlackBoxCodegenTest { + public class Reversed { @Test public void testAllFilesPresentInReversed() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/reversed"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -29768,7 +31296,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until") @TestDataPath("$PROJECT_ROOT") - public class Until extends AbstractFirBlackBoxCodegenTest { + public class Until { @Test public void testAllFilesPresentInUntil() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -29879,7 +31407,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/nestedStep") @TestDataPath("$PROJECT_ROOT") - public class NestedStep extends AbstractFirBlackBoxCodegenTest { + public class NestedStep { @Test public void testAllFilesPresentInNestedStep() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/nestedStep"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -29937,7 +31465,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/reversed") @TestDataPath("$PROJECT_ROOT") - public class Reversed extends AbstractFirBlackBoxCodegenTest { + public class Reversed { @Test public void testAllFilesPresentInReversed() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/reversed"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -29987,7 +31515,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/ranges/unsigned") @TestDataPath("$PROJECT_ROOT") - public class Unsigned extends AbstractFirBlackBoxCodegenTest { + public class Unsigned { @Test public void testAllFilesPresentInUnsigned() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/unsigned"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -30026,7 +31554,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/ranges/unsigned/expression") @TestDataPath("$PROJECT_ROOT") - public class Expression extends AbstractFirBlackBoxCodegenTest { + public class Expression { @Test public void testAllFilesPresentInExpression() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/unsigned/expression"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -30216,7 +31744,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/ranges/unsigned/literal") @TestDataPath("$PROJECT_ROOT") - public class Literal extends AbstractFirBlackBoxCodegenTest { + public class Literal { @Test public void testAllFilesPresentInLiteral() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/unsigned/literal"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -30406,7 +31934,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/ranges/unsigned/nullableLoopParameter") @TestDataPath("$PROJECT_ROOT") - public class NullableLoopParameter extends AbstractFirBlackBoxCodegenTest { + public class NullableLoopParameter { @Test public void testAllFilesPresentInNullableLoopParameter() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/unsigned/nullableLoopParameter"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -30433,10 +31961,32 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT } } + @Nested + @TestMetadata("compiler/testData/codegen/box/recursiveRawTypes") + @TestDataPath("$PROJECT_ROOT") + public class RecursiveRawTypes { + @Test + public void testAllFilesPresentInRecursiveRawTypes() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/recursiveRawTypes"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @Test + @TestMetadata("kt16528.kt") + public void testKt16528() throws Exception { + runTest("compiler/testData/codegen/box/recursiveRawTypes/kt16528.kt"); + } + + @Test + @TestMetadata("kt16639.kt") + public void testKt16639() throws Exception { + runTest("compiler/testData/codegen/box/recursiveRawTypes/kt16639.kt"); + } + } + @Nested @TestMetadata("compiler/testData/codegen/box/reflection") @TestDataPath("$PROJECT_ROOT") - public class Reflection extends AbstractFirBlackBoxCodegenTest { + public class Reflection { @Test public void testAllFilesPresentInReflection() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -30445,7 +31995,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/reflection/annotations") @TestDataPath("$PROJECT_ROOT") - public class Annotations extends AbstractFirBlackBoxCodegenTest { + public class Annotations { @Test public void testAllFilesPresentInAnnotations() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/annotations"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -30568,7 +32118,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/reflection/annotations/onTypes") @TestDataPath("$PROJECT_ROOT") - public class OnTypes extends AbstractFirBlackBoxCodegenTest { + public class OnTypes { @Test public void testAllFilesPresentInOnTypes() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/annotations/onTypes"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -30603,7 +32153,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/reflection/builtins") @TestDataPath("$PROJECT_ROOT") - public class Builtins extends AbstractFirBlackBoxCodegenTest { + public class Builtins { @Test public void testAllFilesPresentInBuiltins() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/builtins"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -30631,7 +32181,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/reflection/call") @TestDataPath("$PROJECT_ROOT") - public class Call extends AbstractFirBlackBoxCodegenTest { + public class Call { @Test public void testAllFilesPresentInCall() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/call"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -30784,7 +32334,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/reflection/call/bound") @TestDataPath("$PROJECT_ROOT") - public class Bound extends AbstractFirBlackBoxCodegenTest { + public class Bound { @Test public void testAllFilesPresentInBound() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/call/bound"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -30872,7 +32422,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/reflection/call/inlineClasses") @TestDataPath("$PROJECT_ROOT") - public class InlineClasses extends AbstractFirBlackBoxCodegenTest { + public class InlineClasses { @Test public void testAllFilesPresentInInlineClasses() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/call/inlineClasses"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -30967,7 +32517,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/reflection/callBy") @TestDataPath("$PROJECT_ROOT") - public class CallBy extends AbstractFirBlackBoxCodegenTest { + public class CallBy { @Test public void testAllFilesPresentInCallBy() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/callBy"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -31133,7 +32683,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/reflection/classLiterals") @TestDataPath("$PROJECT_ROOT") - public class ClassLiterals extends AbstractFirBlackBoxCodegenTest { + public class ClassLiterals { @Test public void testAllFilesPresentInClassLiterals() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/classLiterals"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -31175,6 +32725,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT runTest("compiler/testData/codegen/box/reflection/classLiterals/genericClass.kt"); } + @Test + @TestMetadata("javaClassLiteral.kt") + public void testJavaClassLiteral() throws Exception { + runTest("compiler/testData/codegen/box/reflection/classLiterals/javaClassLiteral.kt"); + } + @Test @TestMetadata("lambdaClass.kt") public void testLambdaClass() throws Exception { @@ -31197,7 +32753,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/reflection/classes") @TestDataPath("$PROJECT_ROOT") - public class Classes extends AbstractFirBlackBoxCodegenTest { + public class Classes { @Test public void testAllFilesPresentInClasses() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/classes"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -31303,7 +32859,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/reflection/constructors") @TestDataPath("$PROJECT_ROOT") - public class Constructors extends AbstractFirBlackBoxCodegenTest { + public class Constructors { @Test public void testAllFilesPresentInConstructors() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/constructors"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -31349,7 +32905,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/reflection/createAnnotation") @TestDataPath("$PROJECT_ROOT") - public class CreateAnnotation extends AbstractFirBlackBoxCodegenTest { + public class CreateAnnotation { @Test public void testAllFilesPresentInCreateAnnotation() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/createAnnotation"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -31437,7 +32993,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/reflection/enclosing") @TestDataPath("$PROJECT_ROOT") - public class Enclosing extends AbstractFirBlackBoxCodegenTest { + public class Enclosing { @Test public void testAllFilesPresentInEnclosing() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/enclosing"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -31597,7 +33153,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/reflection/functions") @TestDataPath("$PROJECT_ROOT") - public class Functions extends AbstractFirBlackBoxCodegenTest { + public class Functions { @Test public void testAllFilesPresentInFunctions() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/functions"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -31685,7 +33241,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/reflection/genericSignature") @TestDataPath("$PROJECT_ROOT") - public class GenericSignature extends AbstractFirBlackBoxCodegenTest { + public class GenericSignature { @Test public void testAllFilesPresentInGenericSignature() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/genericSignature"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -31797,7 +33353,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/reflection/isInstance") @TestDataPath("$PROJECT_ROOT") - public class IsInstance extends AbstractFirBlackBoxCodegenTest { + public class IsInstance { @Test public void testAllFilesPresentInIsInstance() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/isInstance"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -31813,7 +33369,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/reflection/kClassInAnnotation") @TestDataPath("$PROJECT_ROOT") - public class KClassInAnnotation extends AbstractFirBlackBoxCodegenTest { + public class KClassInAnnotation { @Test public void testAllFilesPresentInKClassInAnnotation() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/kClassInAnnotation"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -31877,7 +33433,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/reflection/lambdaClasses") @TestDataPath("$PROJECT_ROOT") - public class LambdaClasses extends AbstractFirBlackBoxCodegenTest { + public class LambdaClasses { @Test public void testAllFilesPresentInLambdaClasses() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/lambdaClasses"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -31941,7 +33497,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/reflection/mapping") @TestDataPath("$PROJECT_ROOT") - public class Mapping extends AbstractFirBlackBoxCodegenTest { + public class Mapping { @Test public void testAllFilesPresentInMapping() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/mapping"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -31983,6 +33539,30 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT runTest("compiler/testData/codegen/box/reflection/mapping/interfaceCompanionPropertyWithJvmField.kt"); } + @Test + @TestMetadata("jClass2kClass.kt") + public void testJClass2kClass() throws Exception { + runTest("compiler/testData/codegen/box/reflection/mapping/jClass2kClass.kt"); + } + + @Test + @TestMetadata("javaConstructor.kt") + public void testJavaConstructor() throws Exception { + runTest("compiler/testData/codegen/box/reflection/mapping/javaConstructor.kt"); + } + + @Test + @TestMetadata("javaFields.kt") + public void testJavaFields() throws Exception { + runTest("compiler/testData/codegen/box/reflection/mapping/javaFields.kt"); + } + + @Test + @TestMetadata("javaMethods.kt") + public void testJavaMethods() throws Exception { + runTest("compiler/testData/codegen/box/reflection/mapping/javaMethods.kt"); + } + @Test @TestMetadata("lateinitProperty.kt") public void testLateinitProperty() throws Exception { @@ -32052,7 +33632,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/reflection/mapping/fakeOverrides") @TestDataPath("$PROJECT_ROOT") - public class FakeOverrides extends AbstractFirBlackBoxCodegenTest { + public class FakeOverrides { @Test public void testAllFilesPresentInFakeOverrides() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/mapping/fakeOverrides"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -32074,7 +33654,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/reflection/mapping/inlineClasses") @TestDataPath("$PROJECT_ROOT") - public class InlineClasses extends AbstractFirBlackBoxCodegenTest { + public class InlineClasses { @Test public void testAllFilesPresentInInlineClasses() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/mapping/inlineClasses"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -32096,7 +33676,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/reflection/mapping/jvmStatic") @TestDataPath("$PROJECT_ROOT") - public class JvmStatic extends AbstractFirBlackBoxCodegenTest { + public class JvmStatic { @Test public void testAllFilesPresentInJvmStatic() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/mapping/jvmStatic"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -32118,7 +33698,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/reflection/mapping/types") @TestDataPath("$PROJECT_ROOT") - public class Types extends AbstractFirBlackBoxCodegenTest { + public class Types { @Test public void testAllFilesPresentInTypes() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/mapping/types"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -32255,7 +33835,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/reflection/methodsFromAny") @TestDataPath("$PROJECT_ROOT") - public class MethodsFromAny extends AbstractFirBlackBoxCodegenTest { + public class MethodsFromAny { @Test @TestMetadata("adaptedCallableReferencesNotEqualToCallablesFromAPI.kt") public void testAdaptedCallableReferencesNotEqualToCallablesFromAPI() throws Exception { @@ -32409,7 +33989,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/reflection/modifiers") @TestDataPath("$PROJECT_ROOT") - public class Modifiers extends AbstractFirBlackBoxCodegenTest { + public class Modifiers { @Test public void testAllFilesPresentInModifiers() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/modifiers"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -32473,7 +34053,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/reflection/multifileClasses") @TestDataPath("$PROJECT_ROOT") - public class MultifileClasses extends AbstractFirBlackBoxCodegenTest { + public class MultifileClasses { @Test public void testAllFilesPresentInMultifileClasses() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/multifileClasses"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -32501,7 +34081,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/reflection/noReflectAtRuntime") @TestDataPath("$PROJECT_ROOT") - public class NoReflectAtRuntime extends AbstractFirBlackBoxCodegenTest { + public class NoReflectAtRuntime { @Test public void testAllFilesPresentInNoReflectAtRuntime() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/noReflectAtRuntime"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -32552,7 +34132,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/reflection/noReflectAtRuntime/methodsFromAny") @TestDataPath("$PROJECT_ROOT") - public class MethodsFromAny extends AbstractFirBlackBoxCodegenTest { + public class MethodsFromAny { @Test public void testAllFilesPresentInMethodsFromAny() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/noReflectAtRuntime/methodsFromAny"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -32581,7 +34161,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/reflection/parameters") @TestDataPath("$PROJECT_ROOT") - public class Parameters extends AbstractFirBlackBoxCodegenTest { + public class Parameters { @Test public void testAllFilesPresentInParameters() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/parameters"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -32681,7 +34261,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/reflection/properties") @TestDataPath("$PROJECT_ROOT") - public class Properties extends AbstractFirBlackBoxCodegenTest { + public class Properties { @Test public void testAllFilesPresentInProperties() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/properties"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -32705,6 +34285,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT runTest("compiler/testData/codegen/box/reflection/properties/declaredVsInheritedProperties.kt"); } + @Test + @TestMetadata("equalsHashCodeToString.kt") + public void testEqualsHashCodeToString() throws Exception { + runTest("compiler/testData/codegen/box/reflection/properties/equalsHashCodeToString.kt"); + } + @Test @TestMetadata("fakeOverridesInSubclass.kt") public void testFakeOverridesInSubclass() throws Exception { @@ -32870,7 +34456,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/reflection/properties/accessors") @TestDataPath("$PROJECT_ROOT") - public class Accessors extends AbstractFirBlackBoxCodegenTest { + public class Accessors { @Test @TestMetadata("accessorNames.kt") public void testAccessorNames() throws Exception { @@ -32910,7 +34496,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/reflection/properties/getDelegate") @TestDataPath("$PROJECT_ROOT") - public class GetDelegate extends AbstractFirBlackBoxCodegenTest { + public class GetDelegate { @Test public void testAllFilesPresentInGetDelegate() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/properties/getDelegate"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -33010,7 +34596,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/reflection/properties/jvmField") @TestDataPath("$PROJECT_ROOT") - public class JvmField extends AbstractFirBlackBoxCodegenTest { + public class JvmField { @Test public void testAllFilesPresentInJvmField() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/properties/jvmField"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -33038,7 +34624,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/reflection/properties/localDelegated") @TestDataPath("$PROJECT_ROOT") - public class LocalDelegated extends AbstractFirBlackBoxCodegenTest { + public class LocalDelegated { @Test public void testAllFilesPresentInLocalDelegated() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/properties/localDelegated"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -33097,7 +34683,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/reflection/supertypes") @TestDataPath("$PROJECT_ROOT") - public class Supertypes extends AbstractFirBlackBoxCodegenTest { + public class Supertypes { @Test public void testAllFilesPresentInSupertypes() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/supertypes"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -33137,7 +34723,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/reflection/typeOf") @TestDataPath("$PROJECT_ROOT") - public class TypeOf extends AbstractFirBlackBoxCodegenTest { + public class TypeOf { @Test public void testAllFilesPresentInTypeOf() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/typeOf"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -33176,7 +34762,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/reflection/typeOf/js") @TestDataPath("$PROJECT_ROOT") - public class Js extends AbstractFirBlackBoxCodegenTest { + public class Js { @Test public void testAllFilesPresentInJs() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/typeOf/js"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -33186,7 +34772,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/reflection/typeOf/noReflect") @TestDataPath("$PROJECT_ROOT") - public class NoReflect extends AbstractFirBlackBoxCodegenTest { + public class NoReflect { @Test public void testAllFilesPresentInNoReflect() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/typeOf/noReflect"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -33213,7 +34799,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/reflection/typeOf/noReflect/nonReifiedTypeParameters") @TestDataPath("$PROJECT_ROOT") - public class NonReifiedTypeParameters extends AbstractFirBlackBoxCodegenTest { + public class NonReifiedTypeParameters { @Test public void testAllFilesPresentInNonReifiedTypeParameters() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/typeOf/noReflect/nonReifiedTypeParameters"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -33284,7 +34870,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/reflection/typeOf/nonReifiedTypeParameters") @TestDataPath("$PROJECT_ROOT") - public class NonReifiedTypeParameters extends AbstractFirBlackBoxCodegenTest { + public class NonReifiedTypeParameters { @Test public void testAllFilesPresentInNonReifiedTypeParameters() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/typeOf/nonReifiedTypeParameters"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -33367,7 +34953,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/reflection/typeParameters") @TestDataPath("$PROJECT_ROOT") - public class TypeParameters extends AbstractFirBlackBoxCodegenTest { + public class TypeParameters { @Test public void testAllFilesPresentInTypeParameters() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/typeParameters"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -33407,7 +34993,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/reflection/types") @TestDataPath("$PROJECT_ROOT") - public class Types extends AbstractFirBlackBoxCodegenTest { + public class Types { @Test public void testAllFilesPresentInTypes() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/types"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -33488,7 +35074,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/reflection/types/createType") @TestDataPath("$PROJECT_ROOT") - public class CreateType extends AbstractFirBlackBoxCodegenTest { + public class CreateType { @Test public void testAllFilesPresentInCreateType() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/types/createType"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -33528,7 +35114,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/reflection/types/subtyping") @TestDataPath("$PROJECT_ROOT") - public class Subtyping extends AbstractFirBlackBoxCodegenTest { + public class Subtyping { @Test public void testAllFilesPresentInSubtyping() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/types/subtyping"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -33564,7 +35150,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/regressions") @TestDataPath("$PROJECT_ROOT") - public class Regressions extends AbstractFirBlackBoxCodegenTest { + public class Regressions { @Test public void testAllFilesPresentInRegressions() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/regressions"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -34150,7 +35736,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/reified") @TestDataPath("$PROJECT_ROOT") - public class Reified extends AbstractFirBlackBoxCodegenTest { + public class Reified { @Test public void testAllFilesPresentInReified() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reified"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -34246,6 +35832,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT runTest("compiler/testData/codegen/box/reified/javaClass.kt"); } + @Test + @TestMetadata("kt16445.kt") + public void testKt16445() throws Exception { + runTest("compiler/testData/codegen/box/reified/kt16445.kt"); + } + @Test @TestMetadata("nestedReified.kt") public void testNestedReified() throws Exception { @@ -34369,7 +35961,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/reified/arraysReification") @TestDataPath("$PROJECT_ROOT") - public class ArraysReification extends AbstractFirBlackBoxCodegenTest { + public class ArraysReification { @Test public void testAllFilesPresentInArraysReification() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reified/arraysReification"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -34416,7 +36008,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/safeCall") @TestDataPath("$PROJECT_ROOT") - public class SafeCall extends AbstractFirBlackBoxCodegenTest { + public class SafeCall { @Test public void testAllFilesPresentInSafeCall() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/safeCall"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -34504,7 +36096,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/sam") @TestDataPath("$PROJECT_ROOT") - public class Sam extends AbstractFirBlackBoxCodegenTest { + public class Sam { @Test public void testAllFilesPresentInSam() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/sam"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -34522,6 +36114,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT runTest("compiler/testData/codegen/box/sam/castFromAny.kt"); } + @Test + @TestMetadata("differentFqNames.kt") + public void testDifferentFqNames() throws Exception { + runTest("compiler/testData/codegen/box/sam/differentFqNames.kt"); + } + @Test @TestMetadata("inlinedSamWrapper.kt") public void testInlinedSamWrapper() throws Exception { @@ -34534,6 +36132,24 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT runTest("compiler/testData/codegen/box/sam/irrelevantStaticProperty.kt"); } + @Test + @TestMetadata("kt11519.kt") + public void testKt11519() throws Exception { + runTest("compiler/testData/codegen/box/sam/kt11519.kt"); + } + + @Test + @TestMetadata("kt11519Constructor.kt") + public void testKt11519Constructor() throws Exception { + runTest("compiler/testData/codegen/box/sam/kt11519Constructor.kt"); + } + + @Test + @TestMetadata("kt11696.kt") + public void testKt11696() throws Exception { + runTest("compiler/testData/codegen/box/sam/kt11696.kt"); + } + @Test @TestMetadata("kt17091.kt") public void testKt17091() throws Exception { @@ -34582,6 +36198,18 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT runTest("compiler/testData/codegen/box/sam/kt31908.kt"); } + @Test + @TestMetadata("kt4753.kt") + public void testKt4753() throws Exception { + runTest("compiler/testData/codegen/box/sam/kt4753.kt"); + } + + @Test + @TestMetadata("kt4753_2.kt") + public void testKt4753_2() throws Exception { + runTest("compiler/testData/codegen/box/sam/kt4753_2.kt"); + } + @Test @TestMetadata("nonInlinedSamWrapper.kt") public void testNonInlinedSamWrapper() throws Exception { @@ -34618,6 +36246,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT runTest("compiler/testData/codegen/box/sam/predicateSamWrapper.kt"); } + @Test + @TestMetadata("propertyReference.kt") + public void testPropertyReference() throws Exception { + runTest("compiler/testData/codegen/box/sam/propertyReference.kt"); + } + @Test @TestMetadata("receiverEvaluatedOnce.kt") public void testReceiverEvaluatedOnce() throws Exception { @@ -34630,10 +36264,282 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT runTest("compiler/testData/codegen/box/sam/recordSubstitutedTypeForCallableSamParameter.kt"); } + @Test + @TestMetadata("samConstructorGenericSignature.kt") + public void testSamConstructorGenericSignature() throws Exception { + runTest("compiler/testData/codegen/box/sam/samConstructorGenericSignature.kt"); + } + + @Test + @TestMetadata("smartCastSamConversion.kt") + public void testSmartCastSamConversion() throws Exception { + runTest("compiler/testData/codegen/box/sam/smartCastSamConversion.kt"); + } + + @Nested + @TestMetadata("compiler/testData/codegen/box/sam/adapters") + @TestDataPath("$PROJECT_ROOT") + public class Adapters { + @Test + public void testAllFilesPresentInAdapters() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/sam/adapters"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @Test + @TestMetadata("bridgesForOverridden.kt") + public void testBridgesForOverridden() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/bridgesForOverridden.kt"); + } + + @Test + @TestMetadata("bridgesForOverriddenComplex.kt") + public void testBridgesForOverriddenComplex() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/bridgesForOverriddenComplex.kt"); + } + + @Test + @TestMetadata("callAbstractAdapter.kt") + public void testCallAbstractAdapter() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/callAbstractAdapter.kt"); + } + + @Test + @TestMetadata("comparator.kt") + public void testComparator() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/comparator.kt"); + } + + @Test + @TestMetadata("constructor.kt") + public void testConstructor() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/constructor.kt"); + } + + @Test + @TestMetadata("doubleLongParameters.kt") + public void testDoubleLongParameters() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/doubleLongParameters.kt"); + } + + @Test + @TestMetadata("fileFilter.kt") + public void testFileFilter() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/fileFilter.kt"); + } + + @Test + @TestMetadata("genericSignature.kt") + public void testGenericSignature() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/genericSignature.kt"); + } + + @Test + @TestMetadata("implementAdapter.kt") + public void testImplementAdapter() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/implementAdapter.kt"); + } + + @Test + @TestMetadata("inheritedInKotlin.kt") + public void testInheritedInKotlin() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/inheritedInKotlin.kt"); + } + + @Test + @TestMetadata("inheritedOverriddenAdapter.kt") + public void testInheritedOverriddenAdapter() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/inheritedOverriddenAdapter.kt"); + } + + @Test + @TestMetadata("inheritedSimple.kt") + public void testInheritedSimple() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/inheritedSimple.kt"); + } + + @Test + @TestMetadata("localClass.kt") + public void testLocalClass() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/localClass.kt"); + } + + @Test + @TestMetadata("localObjectConstructor.kt") + public void testLocalObjectConstructor() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/localObjectConstructor.kt"); + } + + @Test + @TestMetadata("localObjectConstructorWithFnValue.kt") + public void testLocalObjectConstructorWithFnValue() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/localObjectConstructorWithFnValue.kt"); + } + + @Test + @TestMetadata("nonLiteralAndLiteralRunnable.kt") + public void testNonLiteralAndLiteralRunnable() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/nonLiteralAndLiteralRunnable.kt"); + } + + @Test + @TestMetadata("nonLiteralComparator.kt") + public void testNonLiteralComparator() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/nonLiteralComparator.kt"); + } + + @Test + @TestMetadata("nonLiteralInConstructor.kt") + public void testNonLiteralInConstructor() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/nonLiteralInConstructor.kt"); + } + + @Test + @TestMetadata("nonLiteralNull.kt") + public void testNonLiteralNull() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/nonLiteralNull.kt"); + } + + @Test + @TestMetadata("nonLiteralRunnable.kt") + public void testNonLiteralRunnable() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/nonLiteralRunnable.kt"); + } + + @Test + @TestMetadata("protectedFromBase.kt") + public void testProtectedFromBase() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/protectedFromBase.kt"); + } + + @Test + @TestMetadata("severalSamParameters.kt") + public void testSeveralSamParameters() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/severalSamParameters.kt"); + } + + @Test + @TestMetadata("simplest.kt") + public void testSimplest() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/simplest.kt"); + } + + @Test + @TestMetadata("superInSecondaryConstructor.kt") + public void testSuperInSecondaryConstructor() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/superInSecondaryConstructor.kt"); + } + + @Test + @TestMetadata("superconstructor.kt") + public void testSuperconstructor() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/superconstructor.kt"); + } + + @Test + @TestMetadata("superconstructorWithClosure.kt") + public void testSuperconstructorWithClosure() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/superconstructorWithClosure.kt"); + } + + @Test + @TestMetadata("typeParameterOfClass.kt") + public void testTypeParameterOfClass() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/typeParameterOfClass.kt"); + } + + @Test + @TestMetadata("typeParameterOfMethod.kt") + public void testTypeParameterOfMethod() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/typeParameterOfMethod.kt"); + } + + @Test + @TestMetadata("typeParameterOfOuterClass.kt") + public void testTypeParameterOfOuterClass() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/typeParameterOfOuterClass.kt"); + } + + @Nested + @TestMetadata("compiler/testData/codegen/box/sam/adapters/operators") + @TestDataPath("$PROJECT_ROOT") + public class Operators { + @Test + public void testAllFilesPresentInOperators() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/sam/adapters/operators"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @Test + @TestMetadata("augmentedAssignmentPure.kt") + public void testAugmentedAssignmentPure() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/operators/augmentedAssignmentPure.kt"); + } + + @Test + @TestMetadata("augmentedAssignmentViaSimpleBinary.kt") + public void testAugmentedAssignmentViaSimpleBinary() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/operators/augmentedAssignmentViaSimpleBinary.kt"); + } + + @Test + @TestMetadata("binary.kt") + public void testBinary() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/operators/binary.kt"); + } + + @Test + @TestMetadata("compareTo.kt") + public void testCompareTo() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/operators/compareTo.kt"); + } + + @Test + @TestMetadata("contains.kt") + public void testContains() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/operators/contains.kt"); + } + + @Test + @TestMetadata("get.kt") + public void testGet() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/operators/get.kt"); + } + + @Test + @TestMetadata("invoke.kt") + public void testInvoke() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/operators/invoke.kt"); + } + + @Test + @TestMetadata("legacyModOperator.kt") + public void testLegacyModOperator() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/operators/legacyModOperator.kt"); + } + + @Test + @TestMetadata("multiGetSet.kt") + public void testMultiGetSet() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/operators/multiGetSet.kt"); + } + + @Test + @TestMetadata("multiInvoke.kt") + public void testMultiInvoke() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/operators/multiInvoke.kt"); + } + + @Test + @TestMetadata("set.kt") + public void testSet() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/operators/set.kt"); + } + } + } + @Nested @TestMetadata("compiler/testData/codegen/box/sam/constructors") @TestDataPath("$PROJECT_ROOT") - public class Constructors extends AbstractFirBlackBoxCodegenTest { + public class Constructors { @Test public void testAllFilesPresentInConstructors() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/sam/constructors"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -34733,7 +36639,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/sam/equality") @TestDataPath("$PROJECT_ROOT") - public class Equality extends AbstractFirBlackBoxCodegenTest { + public class Equality { @Test public void testAllFilesPresentInEquality() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/sam/equality"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -34774,7 +36680,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/sealed") @TestDataPath("$PROJECT_ROOT") - public class Sealed extends AbstractFirBlackBoxCodegenTest { + public class Sealed { @Test public void testAllFilesPresentInSealed() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/sealed"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -34820,7 +36726,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/secondaryConstructors") @TestDataPath("$PROJECT_ROOT") - public class SecondaryConstructors extends AbstractFirBlackBoxCodegenTest { + public class SecondaryConstructors { @Test @TestMetadata("accessToCompanion.kt") public void testAccessToCompanion() throws Exception { @@ -35040,7 +36946,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/signatureAnnotations") @TestDataPath("$PROJECT_ROOT") - public class SignatureAnnotations extends AbstractFirBlackBoxCodegenTest { + public class SignatureAnnotations { @Test public void testAllFilesPresentInSignatureAnnotations() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/signatureAnnotations"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -35128,7 +37034,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/smap") @TestDataPath("$PROJECT_ROOT") - public class Smap extends AbstractFirBlackBoxCodegenTest { + public class Smap { @Test public void testAllFilesPresentInSmap() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/smap"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -35156,7 +37062,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/smartCasts") @TestDataPath("$PROJECT_ROOT") - public class SmartCasts extends AbstractFirBlackBoxCodegenTest { + public class SmartCasts { @Test public void testAllFilesPresentInSmartCasts() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/smartCasts"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -35280,7 +37186,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/specialBuiltins") @TestDataPath("$PROJECT_ROOT") - public class SpecialBuiltins extends AbstractFirBlackBoxCodegenTest { + public class SpecialBuiltins { @Test public void testAllFilesPresentInSpecialBuiltins() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/specialBuiltins"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -35298,6 +37204,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT runTest("compiler/testData/codegen/box/specialBuiltins/bridges.kt"); } + @Test + @TestMetadata("charBuffer.kt") + public void testCharBuffer() throws Exception { + runTest("compiler/testData/codegen/box/specialBuiltins/charBuffer.kt"); + } + @Test @TestMetadata("collectionImpl.kt") public void testCollectionImpl() throws Exception { @@ -35449,10 +37361,26 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT } } + @Nested + @TestMetadata("compiler/testData/codegen/box/staticFun") + @TestDataPath("$PROJECT_ROOT") + public class StaticFun { + @Test + public void testAllFilesPresentInStaticFun() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/staticFun"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @Test + @TestMetadata("classWithNestedEnum.kt") + public void testClassWithNestedEnum() throws Exception { + runTest("compiler/testData/codegen/box/staticFun/classWithNestedEnum.kt"); + } + } + @Nested @TestMetadata("compiler/testData/codegen/box/statics") @TestDataPath("$PROJECT_ROOT") - public class Statics extends AbstractFirBlackBoxCodegenTest { + public class Statics { @Test public void testAllFilesPresentInStatics() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/statics"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -35554,6 +37482,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT runTest("compiler/testData/codegen/box/statics/protectedStaticAndInline.kt"); } + @Test + @TestMetadata("simpleStaticInJavaSuperChain.kt") + public void testSimpleStaticInJavaSuperChain() throws Exception { + runTest("compiler/testData/codegen/box/statics/simpleStaticInJavaSuperChain.kt"); + } + @Test @TestMetadata("syntheticAccessor.kt") public void testSyntheticAccessor() throws Exception { @@ -35564,7 +37498,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/storeStackBeforeInline") @TestDataPath("$PROJECT_ROOT") - public class StoreStackBeforeInline extends AbstractFirBlackBoxCodegenTest { + public class StoreStackBeforeInline { @Test public void testAllFilesPresentInStoreStackBeforeInline() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/storeStackBeforeInline"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -35604,7 +37538,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/strings") @TestDataPath("$PROJECT_ROOT") - public class Strings extends AbstractFirBlackBoxCodegenTest { + public class Strings { @Test public void testAllFilesPresentInStrings() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/strings"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -35770,7 +37704,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/super") @TestDataPath("$PROJECT_ROOT") - public class Super extends AbstractFirBlackBoxCodegenTest { + public class Super { @Test public void testAllFilesPresentInSuper() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/super"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -35959,7 +37893,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/super/superConstructor") @TestDataPath("$PROJECT_ROOT") - public class SuperConstructor extends AbstractFirBlackBoxCodegenTest { + public class SuperConstructor { @Test public void testAllFilesPresentInSuperConstructor() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/super/superConstructor"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -36012,7 +37946,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/synchronized") @TestDataPath("$PROJECT_ROOT") - public class Synchronized extends AbstractFirBlackBoxCodegenTest { + public class Synchronized { @Test public void testAllFilesPresentInSynchronized() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/synchronized"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -36088,7 +38022,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/syntheticAccessors") @TestDataPath("$PROJECT_ROOT") - public class SyntheticAccessors extends AbstractFirBlackBoxCodegenTest { + public class SyntheticAccessors { @Test @TestMetadata("accessorForAbstractProtected.kt") public void testAccessorForAbstractProtected() throws Exception { @@ -36215,10 +38149,80 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT } } + @Nested + @TestMetadata("compiler/testData/codegen/box/syntheticExtensions") + @TestDataPath("$PROJECT_ROOT") + public class SyntheticExtensions { + @Test + public void testAllFilesPresentInSyntheticExtensions() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/syntheticExtensions"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @Test + @TestMetadata("fromTwoBases.kt") + public void testFromTwoBases() throws Exception { + runTest("compiler/testData/codegen/box/syntheticExtensions/fromTwoBases.kt"); + } + + @Test + @TestMetadata("getter.kt") + public void testGetter() throws Exception { + runTest("compiler/testData/codegen/box/syntheticExtensions/getter.kt"); + } + + @Test + @TestMetadata("implicitReceiver.kt") + public void testImplicitReceiver() throws Exception { + runTest("compiler/testData/codegen/box/syntheticExtensions/implicitReceiver.kt"); + } + + @Test + @TestMetadata("overrideOnlyGetter.kt") + public void testOverrideOnlyGetter() throws Exception { + runTest("compiler/testData/codegen/box/syntheticExtensions/overrideOnlyGetter.kt"); + } + + @Test + @TestMetadata("plusPlus.kt") + public void testPlusPlus() throws Exception { + runTest("compiler/testData/codegen/box/syntheticExtensions/plusPlus.kt"); + } + + @Test + @TestMetadata("protected.kt") + public void testProtected() throws Exception { + runTest("compiler/testData/codegen/box/syntheticExtensions/protected.kt"); + } + + @Test + @TestMetadata("protectedSetter.kt") + public void testProtectedSetter() throws Exception { + runTest("compiler/testData/codegen/box/syntheticExtensions/protectedSetter.kt"); + } + + @Test + @TestMetadata("setter.kt") + public void testSetter() throws Exception { + runTest("compiler/testData/codegen/box/syntheticExtensions/setter.kt"); + } + + @Test + @TestMetadata("setterNonVoid1.kt") + public void testSetterNonVoid1() throws Exception { + runTest("compiler/testData/codegen/box/syntheticExtensions/setterNonVoid1.kt"); + } + + @Test + @TestMetadata("setterNonVoid2.kt") + public void testSetterNonVoid2() throws Exception { + runTest("compiler/testData/codegen/box/syntheticExtensions/setterNonVoid2.kt"); + } + } + @Nested @TestMetadata("compiler/testData/codegen/box/throws") @TestDataPath("$PROJECT_ROOT") - public class Throws extends AbstractFirBlackBoxCodegenTest { + public class Throws { @Test public void testAllFilesPresentInThrows() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/throws"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -36235,12 +38239,18 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT public void testDelegationAndThrows_1_3() throws Exception { runTest("compiler/testData/codegen/box/throws/delegationAndThrows_1_3.kt"); } + + @Test + @TestMetadata("delegationAndThrows_AgainstCompiled.kt") + public void testDelegationAndThrows_AgainstCompiled() throws Exception { + runTest("compiler/testData/codegen/box/throws/delegationAndThrows_AgainstCompiled.kt"); + } } @Nested @TestMetadata("compiler/testData/codegen/box/toArray") @TestDataPath("$PROJECT_ROOT") - public class ToArray extends AbstractFirBlackBoxCodegenTest { + public class ToArray { @Test public void testAllFilesPresentInToArray() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/toArray"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -36304,7 +38314,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/topLevelPrivate") @TestDataPath("$PROJECT_ROOT") - public class TopLevelPrivate extends AbstractFirBlackBoxCodegenTest { + public class TopLevelPrivate { @Test public void testAllFilesPresentInTopLevelPrivate() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/topLevelPrivate"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -36350,7 +38360,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/trailingComma") @TestDataPath("$PROJECT_ROOT") - public class TrailingComma extends AbstractFirBlackBoxCodegenTest { + public class TrailingComma { @Test public void testAllFilesPresentInTrailingComma() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/trailingComma"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -36366,7 +38376,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/traits") @TestDataPath("$PROJECT_ROOT") - public class Traits extends AbstractFirBlackBoxCodegenTest { + public class Traits { @Test @TestMetadata("abstractClassInheritsFromInterface.kt") public void testAbstractClassInheritsFromInterface() throws Exception { @@ -36604,7 +38614,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/typeInfo") @TestDataPath("$PROJECT_ROOT") - public class TypeInfo extends AbstractFirBlackBoxCodegenTest { + public class TypeInfo { @Test public void testAllFilesPresentInTypeInfo() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/typeInfo"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -36656,7 +38666,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/typeMapping") @TestDataPath("$PROJECT_ROOT") - public class TypeMapping extends AbstractFirBlackBoxCodegenTest { + public class TypeMapping { @Test public void testAllFilesPresentInTypeMapping() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/typeMapping"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -36738,7 +38748,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/typealias") @TestDataPath("$PROJECT_ROOT") - public class Typealias extends AbstractFirBlackBoxCodegenTest { + public class Typealias { @Test public void testAllFilesPresentInTypealias() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/typealias"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -36774,6 +38784,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT runTest("compiler/testData/codegen/box/typealias/innerClassTypeAliasConstructorInSupertypes.kt"); } + @Test + @TestMetadata("javaStaticMembersViaTypeAlias.kt") + public void testJavaStaticMembersViaTypeAlias() throws Exception { + runTest("compiler/testData/codegen/box/typealias/javaStaticMembersViaTypeAlias.kt"); + } + @Test @TestMetadata("kt15109.kt") public void testKt15109() throws Exception { @@ -36834,6 +38850,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT runTest("compiler/testData/codegen/box/typealias/typeAliasConstructorInSuperCall.kt"); } + @Test + @TestMetadata("typeAliasFunction.kt") + public void testTypeAliasFunction() throws Exception { + runTest("compiler/testData/codegen/box/typealias/typeAliasFunction.kt"); + } + @Test @TestMetadata("typeAliasInAnonymousObjectType.kt") public void testTypeAliasInAnonymousObjectType() throws Exception { @@ -36862,7 +38884,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/unaryOp") @TestDataPath("$PROJECT_ROOT") - public class UnaryOp extends AbstractFirBlackBoxCodegenTest { + public class UnaryOp { @Test public void testAllFilesPresentInUnaryOp() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/unaryOp"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -36908,7 +38930,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/unit") @TestDataPath("$PROJECT_ROOT") - public class Unit extends AbstractFirBlackBoxCodegenTest { + public class Unit { @Test public void testAllFilesPresentInUnit() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/unit"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -36984,7 +39006,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/unsignedTypes") @TestDataPath("$PROJECT_ROOT") - public class UnsignedTypes extends AbstractFirBlackBoxCodegenTest { + public class UnsignedTypes { @Test public void testAllFilesPresentInUnsignedTypes() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/unsignedTypes"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -37251,7 +39273,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/unsignedTypes/jvm8Intrinsics") @TestDataPath("$PROJECT_ROOT") - public class Jvm8Intrinsics extends AbstractFirBlackBoxCodegenTest { + public class Jvm8Intrinsics { @Test public void testAllFilesPresentInJvm8Intrinsics() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/unsignedTypes/jvm8Intrinsics"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -37310,7 +39332,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/valueClasses") @TestDataPath("$PROJECT_ROOT") - public class ValueClasses extends AbstractFirBlackBoxCodegenTest { + public class ValueClasses { @Test public void testAllFilesPresentInValueClasses() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/valueClasses"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -37326,7 +39348,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/vararg") @TestDataPath("$PROJECT_ROOT") - public class Vararg extends AbstractFirBlackBoxCodegenTest { + public class Vararg { @Test public void testAllFilesPresentInVararg() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/vararg"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -37435,10 +39457,222 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT } } + @Nested + @TestMetadata("compiler/testData/codegen/box/varargs") + @TestDataPath("$PROJECT_ROOT") + public class Varargs { + @Test + public void testAllFilesPresentInVarargs() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/varargs"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @Test + @TestMetadata("varargsOverride.kt") + public void testVarargsOverride() throws Exception { + runTest("compiler/testData/codegen/box/varargs/varargsOverride.kt"); + } + + @Test + @TestMetadata("varargsOverride2.kt") + public void testVarargsOverride2() throws Exception { + runTest("compiler/testData/codegen/box/varargs/varargsOverride2.kt"); + } + + @Test + @TestMetadata("varargsOverride3.kt") + public void testVarargsOverride3() throws Exception { + runTest("compiler/testData/codegen/box/varargs/varargsOverride3.kt"); + } + } + + @Nested + @TestMetadata("compiler/testData/codegen/box/visibility") + @TestDataPath("$PROJECT_ROOT") + public class Visibility { + @Test + public void testAllFilesPresentInVisibility() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/visibility"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @Nested + @TestMetadata("compiler/testData/codegen/box/visibility/package") + @TestDataPath("$PROJECT_ROOT") + public class Package { + @Test + public void testAllFilesPresentInPackage() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/visibility/package"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @Test + @TestMetadata("kt2781.kt") + public void testKt2781() throws Exception { + runTest("compiler/testData/codegen/box/visibility/package/kt2781.kt"); + } + + @Test + @TestMetadata("packageClass.kt") + public void testPackageClass() throws Exception { + runTest("compiler/testData/codegen/box/visibility/package/packageClass.kt"); + } + + @Test + @TestMetadata("packageFun.kt") + public void testPackageFun() throws Exception { + runTest("compiler/testData/codegen/box/visibility/package/packageFun.kt"); + } + + @Test + @TestMetadata("packageProperty.kt") + public void testPackageProperty() throws Exception { + runTest("compiler/testData/codegen/box/visibility/package/packageProperty.kt"); + } + } + + @Nested + @TestMetadata("compiler/testData/codegen/box/visibility/protectedAndPackage") + @TestDataPath("$PROJECT_ROOT") + public class ProtectedAndPackage { + @Test + public void testAllFilesPresentInProtectedAndPackage() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/visibility/protectedAndPackage"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @Test + @TestMetadata("overrideProtectedFunInPackage.kt") + public void testOverrideProtectedFunInPackage() throws Exception { + runTest("compiler/testData/codegen/box/visibility/protectedAndPackage/overrideProtectedFunInPackage.kt"); + } + + @Test + @TestMetadata("protectedAccessor.kt") + public void testProtectedAccessor() throws Exception { + runTest("compiler/testData/codegen/box/visibility/protectedAndPackage/protectedAccessor.kt"); + } + + @Test + @TestMetadata("protectedFunInPackage.kt") + public void testProtectedFunInPackage() throws Exception { + runTest("compiler/testData/codegen/box/visibility/protectedAndPackage/protectedFunInPackage.kt"); + } + + @Test + @TestMetadata("protectedPropertyInPackage.kt") + public void testProtectedPropertyInPackage() throws Exception { + runTest("compiler/testData/codegen/box/visibility/protectedAndPackage/protectedPropertyInPackage.kt"); + } + + @Test + @TestMetadata("protectedPropertyInPackageFromCrossinline.kt") + public void testProtectedPropertyInPackageFromCrossinline() throws Exception { + runTest("compiler/testData/codegen/box/visibility/protectedAndPackage/protectedPropertyInPackageFromCrossinline.kt"); + } + + @Test + @TestMetadata("protectedStaticClass.kt") + public void testProtectedStaticClass() throws Exception { + runTest("compiler/testData/codegen/box/visibility/protectedAndPackage/protectedStaticClass.kt"); + } + + @Test + @TestMetadata("protectedSuperField.kt") + public void testProtectedSuperField() throws Exception { + runTest("compiler/testData/codegen/box/visibility/protectedAndPackage/protectedSuperField.kt"); + } + + @Test + @TestMetadata("protectedSuperMethod.kt") + public void testProtectedSuperMethod() throws Exception { + runTest("compiler/testData/codegen/box/visibility/protectedAndPackage/protectedSuperMethod.kt"); + } + } + + @Nested + @TestMetadata("compiler/testData/codegen/box/visibility/protectedStatic") + @TestDataPath("$PROJECT_ROOT") + public class ProtectedStatic { + @Test + public void testAllFilesPresentInProtectedStatic() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/visibility/protectedStatic"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @Test + @TestMetadata("funCallInConstructor.kt") + public void testFunCallInConstructor() throws Exception { + runTest("compiler/testData/codegen/box/visibility/protectedStatic/funCallInConstructor.kt"); + } + + @Test + @TestMetadata("funClassObject.kt") + public void testFunClassObject() throws Exception { + runTest("compiler/testData/codegen/box/visibility/protectedStatic/funClassObject.kt"); + } + + @Test + @TestMetadata("funGenericClass.kt") + public void testFunGenericClass() throws Exception { + runTest("compiler/testData/codegen/box/visibility/protectedStatic/funGenericClass.kt"); + } + + @Test + @TestMetadata("funNestedStaticClass.kt") + public void testFunNestedStaticClass() throws Exception { + runTest("compiler/testData/codegen/box/visibility/protectedStatic/funNestedStaticClass.kt"); + } + + @Test + @TestMetadata("funNestedStaticClass2.kt") + public void testFunNestedStaticClass2() throws Exception { + runTest("compiler/testData/codegen/box/visibility/protectedStatic/funNestedStaticClass2.kt"); + } + + @Test + @TestMetadata("funNestedStaticGenericClass.kt") + public void testFunNestedStaticGenericClass() throws Exception { + runTest("compiler/testData/codegen/box/visibility/protectedStatic/funNestedStaticGenericClass.kt"); + } + + @Test + @TestMetadata("funNotDirectSuperClass.kt") + public void testFunNotDirectSuperClass() throws Exception { + runTest("compiler/testData/codegen/box/visibility/protectedStatic/funNotDirectSuperClass.kt"); + } + + @Test + @TestMetadata("funObject.kt") + public void testFunObject() throws Exception { + runTest("compiler/testData/codegen/box/visibility/protectedStatic/funObject.kt"); + } + + @Test + @TestMetadata("simpleClass.kt") + public void testSimpleClass() throws Exception { + runTest("compiler/testData/codegen/box/visibility/protectedStatic/simpleClass.kt"); + } + + @Test + @TestMetadata("simpleClass2.kt") + public void testSimpleClass2() throws Exception { + runTest("compiler/testData/codegen/box/visibility/protectedStatic/simpleClass2.kt"); + } + + @Test + @TestMetadata("simpleFun.kt") + public void testSimpleFun() throws Exception { + runTest("compiler/testData/codegen/box/visibility/protectedStatic/simpleFun.kt"); + } + + @Test + @TestMetadata("simpleProperty.kt") + public void testSimpleProperty() throws Exception { + runTest("compiler/testData/codegen/box/visibility/protectedStatic/simpleProperty.kt"); + } + } + } + @Nested @TestMetadata("compiler/testData/codegen/box/when") @TestDataPath("$PROJECT_ROOT") - public class When extends AbstractFirBlackBoxCodegenTest { + public class When { @Test public void testAllFilesPresentInWhen() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/when"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -37699,7 +39933,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/when/enumOptimization") @TestDataPath("$PROJECT_ROOT") - public class EnumOptimization extends AbstractFirBlackBoxCodegenTest { + public class EnumOptimization { @Test public void testAllFilesPresentInEnumOptimization() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/when/enumOptimization"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -37817,7 +40051,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/when/stringOptimization") @TestDataPath("$PROJECT_ROOT") - public class StringOptimization extends AbstractFirBlackBoxCodegenTest { + public class StringOptimization { @Test public void testAllFilesPresentInStringOptimization() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/when/stringOptimization"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -37881,7 +40115,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT @Nested @TestMetadata("compiler/testData/codegen/box/when/whenSubjectVariable") @TestDataPath("$PROJECT_ROOT") - public class WhenSubjectVariable extends AbstractFirBlackBoxCodegenTest { + public class WhenSubjectVariable { @Test public void testAllFilesPresentInWhenSubjectVariable() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/when/whenSubjectVariable"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/codegen/ir/FirBlackBoxInlineCodegenTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirBlackBoxInlineCodegenTestGenerated.java similarity index 87% rename from compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/codegen/ir/FirBlackBoxInlineCodegenTestGenerated.java rename to compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirBlackBoxInlineCodegenTestGenerated.java index 83d79e91a01..78cc475b292 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/codegen/ir/FirBlackBoxInlineCodegenTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirBlackBoxInlineCodegenTestGenerated.java @@ -3,569 +3,651 @@ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. */ -package org.jetbrains.kotlin.codegen.ir; +package org.jetbrains.kotlin.test.runners.codegen; import com.intellij.testFramework.TestDataPath; -import org.jetbrains.kotlin.test.JUnit3RunnerWithInners; -import org.jetbrains.kotlin.test.KotlinTestUtils; import org.jetbrains.kotlin.test.util.KtTestUtil; import org.jetbrains.kotlin.test.TargetBackend; import org.jetbrains.kotlin.test.TestMetadata; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.Nested; +import org.junit.jupiter.api.Test; import java.io.File; import java.util.regex.Pattern; -/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */ +/** This class is generated by {@link GenerateNewCompilerTests.kt}. DO NOT MODIFY MANUALLY */ @SuppressWarnings("all") @TestMetadata("compiler/testData/codegen/boxInline") @TestDataPath("$PROJECT_ROOT") -@RunWith(JUnit3RunnerWithInners.class) public class FirBlackBoxInlineCodegenTestGenerated extends AbstractFirBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - + @Test public void testAllFilesPresentInBoxInline() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true, "oldLanguageVersions"); } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/anonymousObject") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class AnonymousObject extends AbstractFirBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - + public class AnonymousObject { + @Test public void testAllFilesPresentInAnonymousObject() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/anonymousObject"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("anonymousObjectInDefault.kt") public void testAnonymousObjectInDefault() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectInDefault.kt"); } + @Test @TestMetadata("anonymousObjectOnCallSite.kt") public void testAnonymousObjectOnCallSite() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnCallSite.kt"); } + @Test @TestMetadata("anonymousObjectOnCallSiteSuperParams.kt") public void testAnonymousObjectOnCallSiteSuperParams() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnCallSiteSuperParams.kt"); } + @Test @TestMetadata("anonymousObjectOnDeclarationSite.kt") public void testAnonymousObjectOnDeclarationSite() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnDeclarationSite.kt"); } + @Test @TestMetadata("anonymousObjectOnDeclarationSiteSuperParams.kt") public void testAnonymousObjectOnDeclarationSiteSuperParams() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnDeclarationSiteSuperParams.kt"); } + @Test @TestMetadata("capturedLambdaInInline.kt") public void testCapturedLambdaInInline() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInline.kt"); } + @Test @TestMetadata("capturedLambdaInInline2.kt") public void testCapturedLambdaInInline2() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInline2.kt"); } + @Test @TestMetadata("capturedLambdaInInline3.kt") public void testCapturedLambdaInInline3() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInline3.kt"); } + @Test @TestMetadata("capturedLambdaInInlineObject.kt") public void testCapturedLambdaInInlineObject() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInlineObject.kt"); } + @Test @TestMetadata("capturedLocalFun.kt") public void testCapturedLocalFun() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/capturedLocalFun.kt"); } + @Test @TestMetadata("capturedLocalFunRef.kt") public void testCapturedLocalFunRef() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/capturedLocalFunRef.kt"); } + @Test @TestMetadata("changingReturnType.kt") public void testChangingReturnType() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/changingReturnType.kt"); } + @Test @TestMetadata("constructOriginalInRegenerated.kt") public void testConstructOriginalInRegenerated() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/constructOriginalInRegenerated.kt"); } + @Test @TestMetadata("constructorVisibility.kt") public void testConstructorVisibility() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/constructorVisibility.kt"); } + @Test @TestMetadata("constructorVisibilityInConstLambda.kt") public void testConstructorVisibilityInConstLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/constructorVisibilityInConstLambda.kt"); } + @Test @TestMetadata("constructorVisibilityInLambda.kt") public void testConstructorVisibilityInLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/constructorVisibilityInLambda.kt"); } + @Test @TestMetadata("defineClass.kt") public void testDefineClass() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/defineClass.kt"); } + @Test @TestMetadata("functionExpression.kt") public void testFunctionExpression() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/functionExpression.kt"); } + @Test @TestMetadata("inlineCallInsideInlineLambda.kt") public void testInlineCallInsideInlineLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/inlineCallInsideInlineLambda.kt"); } + @Test @TestMetadata("kt13133.kt") public void testKt13133() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt13133.kt"); } + @Test @TestMetadata("kt13182.kt") public void testKt13182() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt13182.kt"); } + @Test @TestMetadata("kt13374.kt") public void testKt13374() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt13374.kt"); } + @Test @TestMetadata("kt14011.kt") public void testKt14011() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt14011.kt"); } + @Test @TestMetadata("kt14011_2.kt") public void testKt14011_2() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt14011_2.kt"); } + @Test @TestMetadata("kt14011_3.kt") public void testKt14011_3() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt14011_3.kt"); } + @Test @TestMetadata("kt15751.kt") public void testKt15751() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt15751.kt"); } + @Test @TestMetadata("kt16193.kt") public void testKt16193() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt16193.kt"); } + @Test @TestMetadata("kt17972.kt") public void testKt17972() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt17972.kt"); } + @Test @TestMetadata("kt17972_2.kt") public void testKt17972_2() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt17972_2.kt"); } + @Test @TestMetadata("kt17972_3.kt") public void testKt17972_3() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt17972_3.kt"); } + @Test @TestMetadata("kt17972_4.kt") public void testKt17972_4() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt17972_4.kt"); } + @Test @TestMetadata("kt17972_5.kt") public void testKt17972_5() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt17972_5.kt"); } + @Test @TestMetadata("kt17972_super.kt") public void testKt17972_super() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt17972_super.kt"); } + @Test @TestMetadata("kt17972_super2.kt") public void testKt17972_super2() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt17972_super2.kt"); } + @Test @TestMetadata("kt17972_super3.kt") public void testKt17972_super3() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt17972_super3.kt"); } + @Test @TestMetadata("kt19389.kt") public void testKt19389() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt19389.kt"); } + @Test @TestMetadata("kt19399.kt") public void testKt19399() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt19399.kt"); } + @Test @TestMetadata("kt19434.kt") public void testKt19434() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt19434.kt"); } + @Test @TestMetadata("kt19434_2.kt") public void testKt19434_2() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt19434_2.kt"); } + @Test @TestMetadata("kt19723.kt") public void testKt19723() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt19723.kt"); } + @Test + @TestMetadata("kt29595.kt") + public void testKt29595() throws Exception { + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt29595.kt"); + } + + @Test @TestMetadata("kt34656.kt") public void testKt34656() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt34656.kt"); } + @Test @TestMetadata("kt38197.kt") public void testKt38197() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt38197.kt"); } + @Test @TestMetadata("kt42815.kt") public void testKt42815() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt42815.kt"); } + @Test @TestMetadata("kt42815_delegated.kt") public void testKt42815_delegated() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt42815_delegated.kt"); } + @Test + @TestMetadata("kt6007.kt") + public void testKt6007() throws Exception { + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt6007.kt"); + } + + @Test @TestMetadata("kt6552.kt") public void testKt6552() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt6552.kt"); } + @Test @TestMetadata("kt8133.kt") public void testKt8133() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt8133.kt"); } + @Test @TestMetadata("kt9064.kt") public void testKt9064() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt9064.kt"); } + @Test @TestMetadata("kt9064v2.kt") public void testKt9064v2() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt9064v2.kt"); } + @Test @TestMetadata("kt9591.kt") public void testKt9591() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt9591.kt"); } + @Test @TestMetadata("kt9877.kt") public void testKt9877() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt9877.kt"); } + @Test @TestMetadata("kt9877_2.kt") public void testKt9877_2() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt9877_2.kt"); } + @Test @TestMetadata("objectInLambdaCapturesAnotherObject.kt") public void testObjectInLambdaCapturesAnotherObject() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/objectInLambdaCapturesAnotherObject.kt"); } + @Test @TestMetadata("safeCall.kt") public void testSafeCall() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/safeCall.kt"); } + @Test @TestMetadata("safeCall_2.kt") public void testSafeCall_2() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/safeCall_2.kt"); } + @Test @TestMetadata("sam.kt") public void testSam() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/sam.kt"); } + @Test @TestMetadata("sharedFromCrossinline.kt") public void testSharedFromCrossinline() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/sharedFromCrossinline.kt"); } + @Test @TestMetadata("superConstructorWithObjectParameter.kt") public void testSuperConstructorWithObjectParameter() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/superConstructorWithObjectParameter.kt"); } + @Test @TestMetadata("typeInfo.kt") public void testTypeInfo() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/typeInfo.kt"); } + @Test @TestMetadata("withInlineMethod.kt") public void testWithInlineMethod() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/withInlineMethod.kt"); } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/anonymousObject/enumWhen") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class EnumWhen extends AbstractFirBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - + public class EnumWhen { + @Test public void testAllFilesPresentInEnumWhen() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/anonymousObject/enumWhen"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("callSite.kt") public void testCallSite() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/enumWhen/callSite.kt"); } + @Test @TestMetadata("declSite.kt") public void testDeclSite() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/enumWhen/declSite.kt"); } + @Test @TestMetadata("declSiteSeveralMappings.kt") public void testDeclSiteSeveralMappings() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/enumWhen/declSiteSeveralMappings.kt"); } + @Test @TestMetadata("declSiteSeveralMappingsDifOrder.kt") public void testDeclSiteSeveralMappingsDifOrder() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/enumWhen/declSiteSeveralMappingsDifOrder.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class ProperRecapturing extends AbstractFirBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - + public class ProperRecapturing { + @Test public void testAllFilesPresentInProperRecapturing() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("inlineChain.kt") public void testInlineChain() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/inlineChain.kt"); } + @Test @TestMetadata("lambdaChain.kt") public void testLambdaChain() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChain.kt"); } + @Test @TestMetadata("lambdaChainSimple.kt") public void testLambdaChainSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChainSimple.kt"); } + @Test @TestMetadata("lambdaChain_2.kt") public void testLambdaChain_2() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChain_2.kt"); } + @Test @TestMetadata("lambdaChain_3.kt") public void testLambdaChain_3() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChain_3.kt"); } + @Test @TestMetadata("noInlineLambda.kt") public void testNoInlineLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/noInlineLambda.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class ProperRecapturingInClass extends AbstractFirBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - + public class ProperRecapturingInClass { + @Test public void testAllFilesPresentInProperRecapturingInClass() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("inlineChain.kt") public void testInlineChain() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/inlineChain.kt"); } + @Test @TestMetadata("inlinelambdaChain.kt") public void testInlinelambdaChain() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/inlinelambdaChain.kt"); } + @Test @TestMetadata("lambdaChain.kt") public void testLambdaChain() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChain.kt"); } + @Test @TestMetadata("lambdaChainSimple.kt") public void testLambdaChainSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChainSimple.kt"); } + @Test @TestMetadata("lambdaChainSimple_2.kt") public void testLambdaChainSimple_2() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChainSimple_2.kt"); } + @Test @TestMetadata("lambdaChain_2.kt") public void testLambdaChain_2() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChain_2.kt"); } + @Test @TestMetadata("lambdaChain_3.kt") public void testLambdaChain_3() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChain_3.kt"); } + @Test @TestMetadata("noCapturedThisOnCallSite.kt") public void testNoCapturedThisOnCallSite() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/noCapturedThisOnCallSite.kt"); } + @Test @TestMetadata("noInlineLambda.kt") public void testNoInlineLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/noInlineLambda.kt"); } + @Test @TestMetadata("twoInlineLambda.kt") public void testTwoInlineLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/twoInlineLambda.kt"); } + @Test @TestMetadata("twoInlineLambdaComplex.kt") public void testTwoInlineLambdaComplex() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/twoInlineLambdaComplex.kt"); } + @Test @TestMetadata("twoInlineLambdaComplex_2.kt") public void testTwoInlineLambdaComplex_2() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/twoInlineLambdaComplex_2.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/anonymousObject/sam") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Sam extends AbstractFirBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - + public class Sam { + @Test public void testAllFilesPresentInSam() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/anonymousObject/sam"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("anonymousObjectToSam.kt") public void testAnonymousObjectToSam() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/sam/anonymousObjectToSam.kt"); } + @Test @TestMetadata("kt17091.kt") public void testKt17091() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/sam/kt17091.kt"); } + @Test @TestMetadata("kt21671.kt") public void testKt21671() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/sam/kt21671.kt"); } + @Test @TestMetadata("kt21671_2.kt") public void testKt21671_2() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/sam/kt21671_2.kt"); } + @Test @TestMetadata("kt21671_3.kt") public void testKt21671_3() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/sam/kt21671_3.kt"); } + @Test @TestMetadata("kt22304.kt") public void testKt22304() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/sam/kt22304.kt"); } + @Test @TestMetadata("samOnCallSite.kt") public void testSamOnCallSite() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/sam/samOnCallSite.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class TwoCapturedReceivers extends AbstractFirBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - + public class TwoCapturedReceivers { + @Test public void testAllFilesPresentInTwoCapturedReceivers() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("kt8668.kt") public void testKt8668() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668.kt"); } + @Test @TestMetadata("kt8668_2.kt") public void testKt8668_2() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668_2.kt"); } + @Test @TestMetadata("kt8668_3.kt") public void testKt8668_3() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668_3.kt"); } + @Test @TestMetadata("twoDifferentDispatchReceivers.kt") public void testTwoDifferentDispatchReceivers() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/twoDifferentDispatchReceivers.kt"); } + @Test @TestMetadata("twoExtensionReceivers.kt") public void testTwoExtensionReceivers() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/twoExtensionReceivers.kt"); @@ -573,465 +655,525 @@ public class FirBlackBoxInlineCodegenTestGenerated extends AbstractFirBlackBoxIn } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/argumentOrder") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class ArgumentOrder extends AbstractFirBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - + public class ArgumentOrder { + @Test public void testAllFilesPresentInArgumentOrder() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/argumentOrder"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("boundFunctionReference.kt") public void testBoundFunctionReference() throws Exception { runTest("compiler/testData/codegen/boxInline/argumentOrder/boundFunctionReference.kt"); } + @Test @TestMetadata("boundFunctionReference2.kt") public void testBoundFunctionReference2() throws Exception { runTest("compiler/testData/codegen/boxInline/argumentOrder/boundFunctionReference2.kt"); } + @Test @TestMetadata("captured.kt") public void testCaptured() throws Exception { runTest("compiler/testData/codegen/boxInline/argumentOrder/captured.kt"); } + @Test @TestMetadata("capturedInExtension.kt") public void testCapturedInExtension() throws Exception { runTest("compiler/testData/codegen/boxInline/argumentOrder/capturedInExtension.kt"); } + @Test @TestMetadata("defaultParametersAndLastVararg.kt") public void testDefaultParametersAndLastVararg() throws Exception { runTest("compiler/testData/codegen/boxInline/argumentOrder/defaultParametersAndLastVararg.kt"); } + @Test @TestMetadata("defaultParametersAndLastVarargWithCorrectOrder.kt") public void testDefaultParametersAndLastVarargWithCorrectOrder() throws Exception { runTest("compiler/testData/codegen/boxInline/argumentOrder/defaultParametersAndLastVarargWithCorrectOrder.kt"); } + @Test @TestMetadata("extension.kt") public void testExtension() throws Exception { runTest("compiler/testData/codegen/boxInline/argumentOrder/extension.kt"); } + @Test @TestMetadata("extensionInClass.kt") public void testExtensionInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/argumentOrder/extensionInClass.kt"); } + @Test @TestMetadata("lambdaMigration.kt") public void testLambdaMigration() throws Exception { runTest("compiler/testData/codegen/boxInline/argumentOrder/lambdaMigration.kt"); } + @Test @TestMetadata("lambdaMigrationInClass.kt") public void testLambdaMigrationInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/argumentOrder/lambdaMigrationInClass.kt"); } + @Test @TestMetadata("simple.kt") public void testSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/argumentOrder/simple.kt"); } + @Test @TestMetadata("simpleInClass.kt") public void testSimpleInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/argumentOrder/simpleInClass.kt"); } + @Test @TestMetadata("varargAndDefaultParameters.kt") public void testVarargAndDefaultParameters() throws Exception { runTest("compiler/testData/codegen/boxInline/argumentOrder/varargAndDefaultParameters.kt"); } + @Test @TestMetadata("varargAndDefaultParametersWithCorrectOrder.kt") public void testVarargAndDefaultParametersWithCorrectOrder() throws Exception { runTest("compiler/testData/codegen/boxInline/argumentOrder/varargAndDefaultParametersWithCorrectOrder.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/arrayConvention") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class ArrayConvention extends AbstractFirBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - + public class ArrayConvention { + @Test public void testAllFilesPresentInArrayConvention() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/arrayConvention"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("simpleAccess.kt") public void testSimpleAccess() throws Exception { runTest("compiler/testData/codegen/boxInline/arrayConvention/simpleAccess.kt"); } + @Test @TestMetadata("simpleAccessInClass.kt") public void testSimpleAccessInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/arrayConvention/simpleAccessInClass.kt"); } + @Test @TestMetadata("simpleAccessWithDefault.kt") public void testSimpleAccessWithDefault() throws Exception { runTest("compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithDefault.kt"); } + @Test @TestMetadata("simpleAccessWithDefaultInClass.kt") public void testSimpleAccessWithDefaultInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithDefaultInClass.kt"); } + @Test @TestMetadata("simpleAccessWithLambda.kt") public void testSimpleAccessWithLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithLambda.kt"); } + @Test @TestMetadata("simpleAccessWithLambdaInClass.kt") public void testSimpleAccessWithLambdaInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithLambdaInClass.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/assert") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Assert extends AbstractFirBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - + public class Assert { + @Test public void testAllFilesPresentInAssert() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/assert"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("jvmAssertInlineFunctionAssertionsDisabled.kt") public void testJvmAssertInlineFunctionAssertionsDisabled() throws Exception { runTest("compiler/testData/codegen/boxInline/assert/jvmAssertInlineFunctionAssertionsDisabled.kt"); } + @Test @TestMetadata("jvmAssertInlineFunctionAssertionsEnabled.kt") public void testJvmAssertInlineFunctionAssertionsEnabled() throws Exception { runTest("compiler/testData/codegen/boxInline/assert/jvmAssertInlineFunctionAssertionsEnabled.kt"); } + @Test @TestMetadata("jvmAssertInlineLambda.kt") public void testJvmAssertInlineLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/assert/jvmAssertInlineLambda.kt"); } + @Test @TestMetadata("jvmClassInitializer.kt") public void testJvmClassInitializer() throws Exception { runTest("compiler/testData/codegen/boxInline/assert/jvmClassInitializer.kt"); } + @Test @TestMetadata("jvmCompanion.kt") public void testJvmCompanion() throws Exception { runTest("compiler/testData/codegen/boxInline/assert/jvmCompanion.kt"); } + @Test @TestMetadata("jvmCrossinlineLambda.kt") public void testJvmCrossinlineLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/assert/jvmCrossinlineLambda.kt"); } + @Test @TestMetadata("jvmCrossinlineLambda2.kt") public void testJvmCrossinlineLambda2() throws Exception { runTest("compiler/testData/codegen/boxInline/assert/jvmCrossinlineLambda2.kt"); } + @Test @TestMetadata("jvmCrossinlineLambdaDeclarationSite.kt") public void testJvmCrossinlineLambdaDeclarationSite() throws Exception { runTest("compiler/testData/codegen/boxInline/assert/jvmCrossinlineLambdaDeclarationSite.kt"); } + @Test @TestMetadata("jvmCrossinlineLambdaDeclarationSiteOnly.kt") public void testJvmCrossinlineLambdaDeclarationSiteOnly() throws Exception { runTest("compiler/testData/codegen/boxInline/assert/jvmCrossinlineLambdaDeclarationSiteOnly.kt"); } + @Test @TestMetadata("jvmCrossinlineSAMDeclarationSite.kt") public void testJvmCrossinlineSAMDeclarationSite() throws Exception { runTest("compiler/testData/codegen/boxInline/assert/jvmCrossinlineSAMDeclarationSite.kt"); } + @Test @TestMetadata("jvmDoubleInline.kt") public void testJvmDoubleInline() throws Exception { runTest("compiler/testData/codegen/boxInline/assert/jvmDoubleInline.kt"); } + @Test @TestMetadata("jvmInlineUsedAsNoinline.kt") public void testJvmInlineUsedAsNoinline() throws Exception { runTest("compiler/testData/codegen/boxInline/assert/jvmInlineUsedAsNoinline.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/builders") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Builders extends AbstractFirBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - + public class Builders { + @Test public void testAllFilesPresentInBuilders() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/builders"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("builders.kt") public void testBuilders() throws Exception { runTest("compiler/testData/codegen/boxInline/builders/builders.kt"); } + @Test @TestMetadata("buildersAndLambdaCapturing.kt") public void testBuildersAndLambdaCapturing() throws Exception { runTest("compiler/testData/codegen/boxInline/builders/buildersAndLambdaCapturing.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/bytecodePreprocessing") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class BytecodePreprocessing extends AbstractFirBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - + public class BytecodePreprocessing { + @Test public void testAllFilesPresentInBytecodePreprocessing() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/bytecodePreprocessing"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("apiVersionAtLeast1.kt") public void testApiVersionAtLeast1() throws Exception { runTest("compiler/testData/codegen/boxInline/bytecodePreprocessing/apiVersionAtLeast1.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/callableReference") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class CallableReference extends AbstractFirBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - + public class CallableReference { + @Test @TestMetadata("adapted.kt") public void testAdapted() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/adapted.kt"); } + @Test public void testAllFilesPresentInCallableReference() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/callableReference"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("classLevel.kt") public void testClassLevel() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/classLevel.kt"); } + @Test @TestMetadata("classLevel2.kt") public void testClassLevel2() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/classLevel2.kt"); } + @Test @TestMetadata("constructor.kt") public void testConstructor() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/constructor.kt"); } + @Test @TestMetadata("innerGenericConstuctor.kt") public void testInnerGenericConstuctor() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/innerGenericConstuctor.kt"); } + @Test @TestMetadata("intrinsic.kt") public void testIntrinsic() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/intrinsic.kt"); } + @Test @TestMetadata("jvmFieldProperty.kt") public void testJvmFieldProperty() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/jvmFieldProperty.kt"); } + @Test @TestMetadata("kt15449.kt") public void testKt15449() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/kt15449.kt"); } + @Test @TestMetadata("kt15751_2.kt") public void testKt15751_2() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/kt15751_2.kt"); } + @Test @TestMetadata("kt16411.kt") public void testKt16411() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/kt16411.kt"); } + @Test @TestMetadata("kt35101.kt") public void testKt35101() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/kt35101.kt"); } + @Test @TestMetadata("propertyIntrinsic.kt") public void testPropertyIntrinsic() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/propertyIntrinsic.kt"); } + @Test @TestMetadata("propertyReference.kt") public void testPropertyReference() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/propertyReference.kt"); } + @Test @TestMetadata("topLevel.kt") public void testTopLevel() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/topLevel.kt"); } + @Test @TestMetadata("topLevelExtension.kt") public void testTopLevelExtension() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/topLevelExtension.kt"); } + @Test @TestMetadata("topLevelProperty.kt") public void testTopLevelProperty() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/topLevelProperty.kt"); } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/callableReference/bound") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Bound extends AbstractFirBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - + public class Bound { + @Test public void testAllFilesPresentInBound() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/callableReference/bound"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("classProperty.kt") public void testClassProperty() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/classProperty.kt"); } + @Test @TestMetadata("emptyLhsFunction.kt") public void testEmptyLhsFunction() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/emptyLhsFunction.kt"); } + @Test @TestMetadata("emptyLhsOnInlineProperty.kt") public void testEmptyLhsOnInlineProperty() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/emptyLhsOnInlineProperty.kt"); } + @Test @TestMetadata("emptyLhsProperty.kt") public void testEmptyLhsProperty() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/emptyLhsProperty.kt"); } + @Test @TestMetadata("expression.kt") public void testExpression() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/expression.kt"); } + @Test @TestMetadata("extensionReceiver.kt") public void testExtensionReceiver() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/extensionReceiver.kt"); } + @Test @TestMetadata("filter.kt") public void testFilter() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/filter.kt"); } + @Test @TestMetadata("inlineValueParameterInsteadOfReceiver.kt") public void testInlineValueParameterInsteadOfReceiver() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/inlineValueParameterInsteadOfReceiver.kt"); } + @Test @TestMetadata("innerGenericConstuctor.kt") public void testInnerGenericConstuctor() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/innerGenericConstuctor.kt"); } + @Test @TestMetadata("intrinsic.kt") public void testIntrinsic() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/intrinsic.kt"); } + @Test @TestMetadata("jvmFieldProperty.kt") public void testJvmFieldProperty() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/jvmFieldProperty.kt"); } + @Test @TestMetadata("kt18728.kt") public void testKt18728() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/kt18728.kt"); } + @Test @TestMetadata("kt18728_2.kt") public void testKt18728_2() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/kt18728_2.kt"); } + @Test @TestMetadata("kt18728_3.kt") public void testKt18728_3() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/kt18728_3.kt"); } + @Test @TestMetadata("kt18728_4.kt") public void testKt18728_4() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/kt18728_4.kt"); } + @Test + @TestMetadata("lambdaOnLhs.kt") + public void testLambdaOnLhs() throws Exception { + runTest("compiler/testData/codegen/boxInline/callableReference/bound/lambdaOnLhs.kt"); + } + + @Test @TestMetadata("map.kt") public void testMap() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/map.kt"); } + @Test @TestMetadata("mixed.kt") public void testMixed() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/mixed.kt"); } + @Test @TestMetadata("objectProperty.kt") public void testObjectProperty() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/objectProperty.kt"); } + @Test @TestMetadata("propertyImportedFromObject.kt") public void testPropertyImportedFromObject() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/propertyImportedFromObject.kt"); } + @Test @TestMetadata("sideEffect.kt") public void testSideEffect() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/sideEffect.kt"); } + @Test @TestMetadata("simple.kt") public void testSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/simple.kt"); } + @Test @TestMetadata("simpleVal.kt") public void testSimpleVal() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/simpleVal.kt"); } + @Test @TestMetadata("simpleVal2.kt") public void testSimpleVal2() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/simpleVal2.kt"); } + @Test @TestMetadata("topLevelExtensionProperty.kt") public void testTopLevelExtensionProperty() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/topLevelExtensionProperty.kt"); @@ -1039,649 +1181,740 @@ public class FirBlackBoxInlineCodegenTestGenerated extends AbstractFirBlackBoxIn } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/capture") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Capture extends AbstractFirBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - + public class Capture { + @Test public void testAllFilesPresentInCapture() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/capture"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("captureInlinable.kt") public void testCaptureInlinable() throws Exception { runTest("compiler/testData/codegen/boxInline/capture/captureInlinable.kt"); } + @Test @TestMetadata("captureInlinableAndOther.kt") public void testCaptureInlinableAndOther() throws Exception { runTest("compiler/testData/codegen/boxInline/capture/captureInlinableAndOther.kt"); } + @Test @TestMetadata("captureThisAndReceiver.kt") public void testCaptureThisAndReceiver() throws Exception { runTest("compiler/testData/codegen/boxInline/capture/captureThisAndReceiver.kt"); } + @Test @TestMetadata("generics.kt") public void testGenerics() throws Exception { runTest("compiler/testData/codegen/boxInline/capture/generics.kt"); } + @Test @TestMetadata("simpleCapturingInClass.kt") public void testSimpleCapturingInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/capture/simpleCapturingInClass.kt"); } + @Test @TestMetadata("simpleCapturingInPackage.kt") public void testSimpleCapturingInPackage() throws Exception { runTest("compiler/testData/codegen/boxInline/capture/simpleCapturingInPackage.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/complex") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Complex extends AbstractFirBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - + public class Complex { + @Test public void testAllFilesPresentInComplex() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/complex"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("closureChain.kt") public void testClosureChain() throws Exception { runTest("compiler/testData/codegen/boxInline/complex/closureChain.kt"); } + @Test @TestMetadata("forEachLine.kt") public void testForEachLine() throws Exception { runTest("compiler/testData/codegen/boxInline/complex/forEachLine.kt"); } + @Test @TestMetadata("kt44429.kt") public void testKt44429() throws Exception { runTest("compiler/testData/codegen/boxInline/complex/kt44429.kt"); } + @Test @TestMetadata("lambdaInLambda.kt") public void testLambdaInLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/complex/lambdaInLambda.kt"); } + @Test @TestMetadata("swapAndWith.kt") public void testSwapAndWith() throws Exception { runTest("compiler/testData/codegen/boxInline/complex/swapAndWith.kt"); } + @Test @TestMetadata("swapAndWith2.kt") public void testSwapAndWith2() throws Exception { runTest("compiler/testData/codegen/boxInline/complex/swapAndWith2.kt"); } + @Test @TestMetadata("use.kt") public void testUse() throws Exception { runTest("compiler/testData/codegen/boxInline/complex/use.kt"); } + @Test @TestMetadata("with.kt") public void testWith() throws Exception { runTest("compiler/testData/codegen/boxInline/complex/with.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/complexStack") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class ComplexStack extends AbstractFirBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - + public class ComplexStack { + @Test public void testAllFilesPresentInComplexStack() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/complexStack"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("asCheck.kt") public void testAsCheck() throws Exception { runTest("compiler/testData/codegen/boxInline/complexStack/asCheck.kt"); } + @Test @TestMetadata("asCheck2.kt") public void testAsCheck2() throws Exception { runTest("compiler/testData/codegen/boxInline/complexStack/asCheck2.kt"); } + @Test @TestMetadata("breakContinueInInlineLambdaArgument.kt") public void testBreakContinueInInlineLambdaArgument() throws Exception { runTest("compiler/testData/codegen/boxInline/complexStack/breakContinueInInlineLambdaArgument.kt"); } + @Test @TestMetadata("simple.kt") public void testSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/complexStack/simple.kt"); } + @Test @TestMetadata("simple2.kt") public void testSimple2() throws Exception { runTest("compiler/testData/codegen/boxInline/complexStack/simple2.kt"); } + @Test @TestMetadata("simple3.kt") public void testSimple3() throws Exception { runTest("compiler/testData/codegen/boxInline/complexStack/simple3.kt"); } + @Test @TestMetadata("simple4.kt") public void testSimple4() throws Exception { runTest("compiler/testData/codegen/boxInline/complexStack/simple4.kt"); } + @Test @TestMetadata("simpleExtension.kt") public void testSimpleExtension() throws Exception { runTest("compiler/testData/codegen/boxInline/complexStack/simpleExtension.kt"); } + @Test @TestMetadata("spillConstructorArgumentsAndInlineLambdaParameter.kt") public void testSpillConstructorArgumentsAndInlineLambdaParameter() throws Exception { runTest("compiler/testData/codegen/boxInline/complexStack/spillConstructorArgumentsAndInlineLambdaParameter.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/contracts") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Contracts extends AbstractFirBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - + public class Contracts { + @Test public void testAllFilesPresentInContracts() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/contracts"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("cfgDependendValInitialization.kt") public void testCfgDependendValInitialization() throws Exception { runTest("compiler/testData/codegen/boxInline/contracts/cfgDependendValInitialization.kt"); } + @Test @TestMetadata("complexInitializer.kt") public void testComplexInitializer() throws Exception { runTest("compiler/testData/codegen/boxInline/contracts/complexInitializer.kt"); } + @Test @TestMetadata("complexInitializerWithStackTransformation.kt") public void testComplexInitializerWithStackTransformation() throws Exception { runTest("compiler/testData/codegen/boxInline/contracts/complexInitializerWithStackTransformation.kt"); } + @Test @TestMetadata("crossinlineCallableReference.kt") public void testCrossinlineCallableReference() throws Exception { runTest("compiler/testData/codegen/boxInline/contracts/crossinlineCallableReference.kt"); } + @Test @TestMetadata("definiteLongValInitialization.kt") public void testDefiniteLongValInitialization() throws Exception { runTest("compiler/testData/codegen/boxInline/contracts/definiteLongValInitialization.kt"); } + @Test @TestMetadata("definiteNestedValInitialization.kt") public void testDefiniteNestedValInitialization() throws Exception { runTest("compiler/testData/codegen/boxInline/contracts/definiteNestedValInitialization.kt"); } + @Test @TestMetadata("definiteValInitInInitializer.kt") public void testDefiniteValInitInInitializer() throws Exception { runTest("compiler/testData/codegen/boxInline/contracts/definiteValInitInInitializer.kt"); } + @Test @TestMetadata("definiteValInitialization.kt") public void testDefiniteValInitialization() throws Exception { runTest("compiler/testData/codegen/boxInline/contracts/definiteValInitialization.kt"); } + @Test @TestMetadata("exactlyOnceCrossinline.kt") public void testExactlyOnceCrossinline() throws Exception { runTest("compiler/testData/codegen/boxInline/contracts/exactlyOnceCrossinline.kt"); } + @Test @TestMetadata("exactlyOnceCrossinline2.kt") public void testExactlyOnceCrossinline2() throws Exception { runTest("compiler/testData/codegen/boxInline/contracts/exactlyOnceCrossinline2.kt"); } + @Test @TestMetadata("exactlyOnceNoinline.kt") public void testExactlyOnceNoinline() throws Exception { runTest("compiler/testData/codegen/boxInline/contracts/exactlyOnceNoinline.kt"); } + @Test @TestMetadata("nonLocalReturn.kt") public void testNonLocalReturn() throws Exception { runTest("compiler/testData/codegen/boxInline/contracts/nonLocalReturn.kt"); } + @Test @TestMetadata("nonLocalReturnWithCycle.kt") public void testNonLocalReturnWithCycle() throws Exception { runTest("compiler/testData/codegen/boxInline/contracts/nonLocalReturnWithCycle.kt"); } + @Test @TestMetadata("propertyInitialization.kt") public void testPropertyInitialization() throws Exception { runTest("compiler/testData/codegen/boxInline/contracts/propertyInitialization.kt"); } + @Test @TestMetadata("valInitializationAndUsageInNestedLambda.kt") public void testValInitializationAndUsageInNestedLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/contracts/valInitializationAndUsageInNestedLambda.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/defaultValues") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class DefaultValues extends AbstractFirBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - + public class DefaultValues { + @Test @TestMetadata("33Parameters.kt") public void test33Parameters() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/33Parameters.kt"); } + @Test @TestMetadata("33ParametersInConstructor.kt") public void test33ParametersInConstructor() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/33ParametersInConstructor.kt"); } + @Test public void testAllFilesPresentInDefaultValues() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/defaultValues"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("defaultInExtension.kt") public void testDefaultInExtension() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/defaultInExtension.kt"); } + @Test @TestMetadata("defaultMethod.kt") public void testDefaultMethod() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/defaultMethod.kt"); } + @Test @TestMetadata("defaultMethodInClass.kt") public void testDefaultMethodInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/defaultMethodInClass.kt"); } + @Test @TestMetadata("defaultParamRemapping.kt") public void testDefaultParamRemapping() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/defaultParamRemapping.kt"); } + @Test @TestMetadata("inlineInDefaultParameter.kt") public void testInlineInDefaultParameter() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/inlineInDefaultParameter.kt"); } + @Test @TestMetadata("inlineLambdaInNoInlineDefault.kt") public void testInlineLambdaInNoInlineDefault() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/inlineLambdaInNoInlineDefault.kt"); } + @Test @TestMetadata("kt11479.kt") public void testKt11479() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/kt11479.kt"); } + @Test @TestMetadata("kt11479InlinedDefaultParameter.kt") public void testKt11479InlinedDefaultParameter() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/kt11479InlinedDefaultParameter.kt"); } + @Test @TestMetadata("kt14564.kt") public void testKt14564() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/kt14564.kt"); } + @Test @TestMetadata("kt14564_2.kt") public void testKt14564_2() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/kt14564_2.kt"); } + @Test @TestMetadata("kt16496.kt") public void testKt16496() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/kt16496.kt"); } + @Test @TestMetadata("kt18689.kt") public void testKt18689() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/kt18689.kt"); } + @Test @TestMetadata("kt18689_2.kt") public void testKt18689_2() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/kt18689_2.kt"); } + @Test @TestMetadata("kt18689_3.kt") public void testKt18689_3() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/kt18689_3.kt"); } + @Test @TestMetadata("kt18689_4.kt") public void testKt18689_4() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/kt18689_4.kt"); } + @Test @TestMetadata("kt5685.kt") public void testKt5685() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/kt5685.kt"); } + @Test @TestMetadata("simpleDefaultMethod.kt") public void testSimpleDefaultMethod() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/simpleDefaultMethod.kt"); } + @Test @TestMetadata("varArgNoInline.kt") public void testVarArgNoInline() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/varArgNoInline.kt"); } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class LambdaInlining extends AbstractFirBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - + public class LambdaInlining { + @Test public void testAllFilesPresentInLambdaInlining() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("checkLambdaClassIsPresent.kt") public void testCheckLambdaClassIsPresent() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/checkLambdaClassIsPresent.kt"); } + @Test @TestMetadata("checkLambdaClassesArePresent.kt") public void testCheckLambdaClassesArePresent() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/checkLambdaClassesArePresent.kt"); } + @Test @TestMetadata("checkObjectClassIsPresent.kt") public void testCheckObjectClassIsPresent() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/checkObjectClassIsPresent.kt"); } + @Test @TestMetadata("checkStaticLambdaClassIsPresent.kt") public void testCheckStaticLambdaClassIsPresent() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/checkStaticLambdaClassIsPresent.kt"); } + @Test @TestMetadata("checkStaticLambdaClassesArePresent.kt") public void testCheckStaticLambdaClassesArePresent() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/checkStaticLambdaClassesArePresent.kt"); } + @Test @TestMetadata("checkStaticObjectClassIsPresent.kt") public void testCheckStaticObjectClassIsPresent() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/checkStaticObjectClassIsPresent.kt"); } + @Test @TestMetadata("defaultCallInDefaultLambda.kt") public void testDefaultCallInDefaultLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/defaultCallInDefaultLambda.kt"); } + @Test @TestMetadata("defaultLambdaInNoInline.kt") public void testDefaultLambdaInNoInline() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/defaultLambdaInNoInline.kt"); } + @Test @TestMetadata("differentInvokeSignature.kt") public void testDifferentInvokeSignature() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/differentInvokeSignature.kt"); } + @Test @TestMetadata("genericLambda.kt") public void testGenericLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/genericLambda.kt"); } + @Test @TestMetadata("instanceCapturedInClass.kt") public void testInstanceCapturedInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/instanceCapturedInClass.kt"); } + @Test @TestMetadata("instanceCapturedInInterface.kt") public void testInstanceCapturedInInterface() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/instanceCapturedInInterface.kt"); } + @Test @TestMetadata("jvmStaticDefault.kt") public void testJvmStaticDefault() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/jvmStaticDefault.kt"); } + @Test @TestMetadata("kt21827.kt") public void testKt21827() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/kt21827.kt"); } + @Test @TestMetadata("kt21946.kt") public void testKt21946() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/kt21946.kt"); } + @Test @TestMetadata("kt24477.kt") public void testKt24477() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/kt24477.kt"); } + @Test @TestMetadata("kt25106.kt") public void testKt25106() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/kt25106.kt"); } + @Test @TestMetadata("kt26636.kt") public void testKt26636() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/kt26636.kt"); } + @Test @TestMetadata("noInline.kt") public void testNoInline() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/noInline.kt"); } + @Test @TestMetadata("nonDefaultInlineInNoInline.kt") public void testNonDefaultInlineInNoInline() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/nonDefaultInlineInNoInline.kt"); } + @Test @TestMetadata("receiverClash.kt") public void testReceiverClash() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/receiverClash.kt"); } + @Test @TestMetadata("receiverClash2.kt") public void testReceiverClash2() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/receiverClash2.kt"); } + @Test @TestMetadata("receiverClashInClass.kt") public void testReceiverClashInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/receiverClashInClass.kt"); } + @Test @TestMetadata("receiverClashInClass2.kt") public void testReceiverClashInClass2() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/receiverClashInClass2.kt"); } + @Test @TestMetadata("simple.kt") public void testSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simple.kt"); } + @Test @TestMetadata("simpleErased.kt") public void testSimpleErased() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simpleErased.kt"); } + @Test @TestMetadata("simpleErasedStaticInstance.kt") public void testSimpleErasedStaticInstance() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simpleErasedStaticInstance.kt"); } + @Test @TestMetadata("simpleExtension.kt") public void testSimpleExtension() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simpleExtension.kt"); } + @Test @TestMetadata("simpleGeneric.kt") public void testSimpleGeneric() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simpleGeneric.kt"); } + @Test @TestMetadata("simpleStaticInstance.kt") public void testSimpleStaticInstance() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simpleStaticInstance.kt"); } + @Test @TestMetadata("thisClash.kt") public void testThisClash() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/thisClash.kt"); } + @Test @TestMetadata("thisClashInClass.kt") public void testThisClashInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/thisClashInClass.kt"); } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class CallableReferences extends AbstractFirBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - + public class CallableReferences { + @Test public void testAllFilesPresentInCallableReferences() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("boundFunctionReference.kt") public void testBoundFunctionReference() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundFunctionReference.kt"); } + @Test @TestMetadata("boundFunctionReferenceOnInt.kt") public void testBoundFunctionReferenceOnInt() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundFunctionReferenceOnInt.kt"); } + @Test @TestMetadata("boundFunctionReferenceOnLong.kt") public void testBoundFunctionReferenceOnLong() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundFunctionReferenceOnLong.kt"); } + @Test @TestMetadata("boundPropertyReference.kt") public void testBoundPropertyReference() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundPropertyReference.kt"); } + @Test @TestMetadata("boundPropertyReferenceOnInt.kt") public void testBoundPropertyReferenceOnInt() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundPropertyReferenceOnInt.kt"); } + @Test @TestMetadata("boundPropertyReferenceOnLong.kt") public void testBoundPropertyReferenceOnLong() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundPropertyReferenceOnLong.kt"); } + @Test @TestMetadata("constuctorReference.kt") public void testConstuctorReference() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/constuctorReference.kt"); } + @Test @TestMetadata("differentInvokeSignature.kt") public void testDifferentInvokeSignature() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/differentInvokeSignature.kt"); } + @Test @TestMetadata("differentInvokeSignature2.kt") public void testDifferentInvokeSignature2() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/differentInvokeSignature2.kt"); } + @Test @TestMetadata("functionImportedFromObject.kt") public void testFunctionImportedFromObject() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/functionImportedFromObject.kt"); } + @Test @TestMetadata("functionReference.kt") public void testFunctionReference() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/functionReference.kt"); } + @Test @TestMetadata("functionReferenceFromClass.kt") public void testFunctionReferenceFromClass() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/functionReferenceFromClass.kt"); } + @Test @TestMetadata("functionReferenceFromObject.kt") public void testFunctionReferenceFromObject() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/functionReferenceFromObject.kt"); } + @Test @TestMetadata("innerClassConstuctorReference.kt") public void testInnerClassConstuctorReference() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/innerClassConstuctorReference.kt"); } + @Test @TestMetadata("mutableBoundPropertyReferenceFromClass.kt") public void testMutableBoundPropertyReferenceFromClass() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/mutableBoundPropertyReferenceFromClass.kt"); } + @Test @TestMetadata("mutablePropertyReferenceFromClass.kt") public void testMutablePropertyReferenceFromClass() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/mutablePropertyReferenceFromClass.kt"); } + @Test @TestMetadata("privateFunctionReference.kt") public void testPrivateFunctionReference() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/privateFunctionReference.kt"); } + @Test @TestMetadata("privatePropertyReference.kt") public void testPrivatePropertyReference() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/privatePropertyReference.kt"); } + @Test @TestMetadata("propertyImportedFromObject.kt") public void testPropertyImportedFromObject() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/propertyImportedFromObject.kt"); } + @Test @TestMetadata("propertyReference.kt") public void testPropertyReference() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/propertyReference.kt"); } + @Test @TestMetadata("propertyReferenceFromClass.kt") public void testPropertyReferenceFromClass() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/propertyReferenceFromClass.kt"); } + @Test @TestMetadata("propertyReferenceFromObject.kt") public void testPropertyReferenceFromObject() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/propertyReferenceFromObject.kt"); @@ -1689,48 +1922,52 @@ public class FirBlackBoxInlineCodegenTestGenerated extends AbstractFirBlackBoxIn } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/defaultValues/maskElimination") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class MaskElimination extends AbstractFirBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - + public class MaskElimination { + @Test @TestMetadata("32Parameters.kt") public void test32Parameters() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/maskElimination/32Parameters.kt"); } + @Test @TestMetadata("33Parameters.kt") public void test33Parameters() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/maskElimination/33Parameters.kt"); } + @Test public void testAllFilesPresentInMaskElimination() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/defaultValues/maskElimination"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("kt18792.kt") public void testKt18792() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/maskElimination/kt18792.kt"); } + @Test @TestMetadata("kt19679.kt") public void testKt19679() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/maskElimination/kt19679.kt"); } + @Test @TestMetadata("kt19679_2.kt") public void testKt19679_2() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/maskElimination/kt19679_2.kt"); } + @Test @TestMetadata("kt19679_3.kt") public void testKt19679_3() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/maskElimination/kt19679_3.kt"); } + @Test @TestMetadata("simple.kt") public void testSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/maskElimination/simple.kt"); @@ -1738,375 +1975,400 @@ public class FirBlackBoxInlineCodegenTestGenerated extends AbstractFirBlackBoxIn } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/delegatedProperty") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class DelegatedProperty extends AbstractFirBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - + public class DelegatedProperty { + @Test public void testAllFilesPresentInDelegatedProperty() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/delegatedProperty"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("kt16864.kt") public void testKt16864() throws Exception { runTest("compiler/testData/codegen/boxInline/delegatedProperty/kt16864.kt"); } + @Test @TestMetadata("local.kt") public void testLocal() throws Exception { runTest("compiler/testData/codegen/boxInline/delegatedProperty/local.kt"); } + @Test @TestMetadata("localDeclaredInLambda.kt") public void testLocalDeclaredInLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/delegatedProperty/localDeclaredInLambda.kt"); } + @Test @TestMetadata("localInAnonymousObject.kt") public void testLocalInAnonymousObject() throws Exception { runTest("compiler/testData/codegen/boxInline/delegatedProperty/localInAnonymousObject.kt"); } + @Test @TestMetadata("localInLambda.kt") public void testLocalInLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/delegatedProperty/localInLambda.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/enclosingInfo") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class EnclosingInfo extends AbstractFirBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - + public class EnclosingInfo { + @Test public void testAllFilesPresentInEnclosingInfo() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/enclosingInfo"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("anonymousInLambda.kt") public void testAnonymousInLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/enclosingInfo/anonymousInLambda.kt"); } + @Test @TestMetadata("inlineChain.kt") public void testInlineChain() throws Exception { runTest("compiler/testData/codegen/boxInline/enclosingInfo/inlineChain.kt"); } + @Test @TestMetadata("inlineChain2.kt") public void testInlineChain2() throws Exception { runTest("compiler/testData/codegen/boxInline/enclosingInfo/inlineChain2.kt"); } + @Test @TestMetadata("objectInInlineFun.kt") public void testObjectInInlineFun() throws Exception { runTest("compiler/testData/codegen/boxInline/enclosingInfo/objectInInlineFun.kt"); } + @Test @TestMetadata("transformedConstructor.kt") public void testTransformedConstructor() throws Exception { runTest("compiler/testData/codegen/boxInline/enclosingInfo/transformedConstructor.kt"); } + @Test @TestMetadata("transformedConstructorWithAdditionalObject.kt") public void testTransformedConstructorWithAdditionalObject() throws Exception { runTest("compiler/testData/codegen/boxInline/enclosingInfo/transformedConstructorWithAdditionalObject.kt"); } + @Test @TestMetadata("transformedConstructorWithNestedInline.kt") public void testTransformedConstructorWithNestedInline() throws Exception { runTest("compiler/testData/codegen/boxInline/enclosingInfo/transformedConstructorWithNestedInline.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/enum") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Enum extends AbstractFirBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - + public class Enum { + @Test public void testAllFilesPresentInEnum() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/enum"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("kt10569.kt") public void testKt10569() throws Exception { runTest("compiler/testData/codegen/boxInline/enum/kt10569.kt"); } + @Test @TestMetadata("kt18254.kt") public void testKt18254() throws Exception { runTest("compiler/testData/codegen/boxInline/enum/kt18254.kt"); } + @Test @TestMetadata("valueOf.kt") public void testValueOf() throws Exception { runTest("compiler/testData/codegen/boxInline/enum/valueOf.kt"); } + @Test @TestMetadata("valueOfCapturedType.kt") public void testValueOfCapturedType() throws Exception { runTest("compiler/testData/codegen/boxInline/enum/valueOfCapturedType.kt"); } + @Test @TestMetadata("valueOfChain.kt") public void testValueOfChain() throws Exception { runTest("compiler/testData/codegen/boxInline/enum/valueOfChain.kt"); } + @Test @TestMetadata("valueOfChainCapturedType.kt") public void testValueOfChainCapturedType() throws Exception { runTest("compiler/testData/codegen/boxInline/enum/valueOfChainCapturedType.kt"); } + @Test @TestMetadata("valueOfNonReified.kt") public void testValueOfNonReified() throws Exception { runTest("compiler/testData/codegen/boxInline/enum/valueOfNonReified.kt"); } + @Test @TestMetadata("values.kt") public void testValues() throws Exception { runTest("compiler/testData/codegen/boxInline/enum/values.kt"); } + @Test @TestMetadata("valuesAsArray.kt") public void testValuesAsArray() throws Exception { runTest("compiler/testData/codegen/boxInline/enum/valuesAsArray.kt"); } + @Test @TestMetadata("valuesCapturedType.kt") public void testValuesCapturedType() throws Exception { runTest("compiler/testData/codegen/boxInline/enum/valuesCapturedType.kt"); } + @Test @TestMetadata("valuesChain.kt") public void testValuesChain() throws Exception { runTest("compiler/testData/codegen/boxInline/enum/valuesChain.kt"); } + @Test @TestMetadata("valuesChainCapturedType.kt") public void testValuesChainCapturedType() throws Exception { runTest("compiler/testData/codegen/boxInline/enum/valuesChainCapturedType.kt"); } + @Test @TestMetadata("valuesNonReified.kt") public void testValuesNonReified() throws Exception { runTest("compiler/testData/codegen/boxInline/enum/valuesNonReified.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/functionExpression") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class FunctionExpression extends AbstractFirBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - + public class FunctionExpression { + @Test public void testAllFilesPresentInFunctionExpression() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/functionExpression"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("extension.kt") public void testExtension() throws Exception { runTest("compiler/testData/codegen/boxInline/functionExpression/extension.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/inlineClasses") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class InlineClasses extends AbstractFirBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - + public class InlineClasses { + @Test public void testAllFilesPresentInInlineClasses() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/inlineClasses"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("inlineClassWithInlineValReturningInlineClass.kt") public void testInlineClassWithInlineValReturningInlineClass() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/inlineClassWithInlineValReturningInlineClass.kt"); } + @Test @TestMetadata("inlineFunctionInsideInlineClassesBox.kt") public void testInlineFunctionInsideInlineClassesBox() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/inlineFunctionInsideInlineClassesBox.kt"); } + @Test @TestMetadata("noReturnTypeManglingFun.kt") public void testNoReturnTypeManglingFun() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/noReturnTypeManglingFun.kt"); } + @Test @TestMetadata("noReturnTypeManglingFunJvmName.kt") public void testNoReturnTypeManglingFunJvmName() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/noReturnTypeManglingFunJvmName.kt"); } + @Test @TestMetadata("noReturnTypeManglingVal.kt") public void testNoReturnTypeManglingVal() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/noReturnTypeManglingVal.kt"); } + @Test @TestMetadata("withReturnTypeManglingFun.kt") public void testWithReturnTypeManglingFun() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/withReturnTypeManglingFun.kt"); } + @Test @TestMetadata("withReturnTypeManglingFunJvmName.kt") public void testWithReturnTypeManglingFunJvmName() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/withReturnTypeManglingFunJvmName.kt"); } + @Test @TestMetadata("withReturnTypeManglingVal.kt") public void testWithReturnTypeManglingVal() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/withReturnTypeManglingVal.kt"); } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class UnboxGenericParameter extends AbstractFirBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - + public class UnboxGenericParameter { + @Test public void testAllFilesPresentInUnboxGenericParameter() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class FunInterface extends AbstractFirBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - + public class FunInterface { + @Test public void testAllFilesPresentInFunInterface() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("any.kt") public void testAny() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/any.kt"); } + @Test @TestMetadata("anyN.kt") public void testAnyN() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/anyN.kt"); } + @Test @TestMetadata("iface.kt") public void testIface() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/iface.kt"); } + @Test @TestMetadata("ifaceChild.kt") public void testIfaceChild() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/ifaceChild.kt"); } + @Test @TestMetadata("primitive.kt") public void testPrimitive() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/primitive.kt"); } + @Test @TestMetadata("string.kt") public void testString() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/string.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Lambda extends AbstractFirBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - + public class Lambda { + @Test public void testAllFilesPresentInLambda() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("any.kt") public void testAny() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/any.kt"); } + @Test @TestMetadata("anyN.kt") public void testAnyN() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/anyN.kt"); } + @Test @TestMetadata("iface.kt") public void testIface() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/iface.kt"); } + @Test @TestMetadata("ifaceChild.kt") public void testIfaceChild() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/ifaceChild.kt"); } + @Test @TestMetadata("primitive.kt") public void testPrimitive() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/primitive.kt"); } + @Test @TestMetadata("string.kt") public void testString() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/string.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class ObjectLiteral extends AbstractFirBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - + public class ObjectLiteral { + @Test public void testAllFilesPresentInObjectLiteral() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("any.kt") public void testAny() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/any.kt"); } + @Test @TestMetadata("anyN.kt") public void testAnyN() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/anyN.kt"); } + @Test @TestMetadata("iface.kt") public void testIface() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/iface.kt"); } + @Test @TestMetadata("ifaceChild.kt") public void testIfaceChild() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/ifaceChild.kt"); } + @Test @TestMetadata("primitive.kt") public void testPrimitive() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/primitive.kt"); } + @Test @TestMetadata("string.kt") public void testString() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/string.kt"); @@ -2115,239 +2377,309 @@ public class FirBlackBoxInlineCodegenTestGenerated extends AbstractFirBlackBoxIn } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/innerClasses") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class InnerClasses extends AbstractFirBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - + public class InnerClasses { + @Test public void testAllFilesPresentInInnerClasses() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/innerClasses"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("captureThisAndOuter.kt") public void testCaptureThisAndOuter() throws Exception { runTest("compiler/testData/codegen/boxInline/innerClasses/captureThisAndOuter.kt"); } + @Test @TestMetadata("innerLambda.kt") public void testInnerLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/innerClasses/innerLambda.kt"); } + @Test @TestMetadata("kt10259.kt") public void testKt10259() throws Exception { runTest("compiler/testData/codegen/boxInline/innerClasses/kt10259.kt"); } } - @TestMetadata("compiler/testData/codegen/boxInline/jvmName") + @Nested + @TestMetadata("compiler/testData/codegen/boxInline/invokedynamic") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class JvmName extends AbstractFirBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); + public class Invokedynamic { + @Test + public void testAllFilesPresentInInvokedynamic() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/invokedynamic"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Nested + @TestMetadata("compiler/testData/codegen/boxInline/invokedynamic/lambdas") + @TestDataPath("$PROJECT_ROOT") + public class Lambdas { + @Test + public void testAllFilesPresentInLambdas() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/invokedynamic/lambdas"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @Test + @TestMetadata("crossinlineLambda1.kt") + public void testCrossinlineLambda1() throws Exception { + runTest("compiler/testData/codegen/boxInline/invokedynamic/lambdas/crossinlineLambda1.kt"); + } + + @Test + @TestMetadata("crossinlineLambda2.kt") + public void testCrossinlineLambda2() throws Exception { + runTest("compiler/testData/codegen/boxInline/invokedynamic/lambdas/crossinlineLambda2.kt"); + } + + @Test + @TestMetadata("inlineFunInDifferentPackage.kt") + public void testInlineFunInDifferentPackage() throws Exception { + runTest("compiler/testData/codegen/boxInline/invokedynamic/lambdas/inlineFunInDifferentPackage.kt"); + } + + @Test + @TestMetadata("inlineLambda1.kt") + public void testInlineLambda1() throws Exception { + runTest("compiler/testData/codegen/boxInline/invokedynamic/lambdas/inlineLambda1.kt"); + } + } + + @Nested + @TestMetadata("compiler/testData/codegen/boxInline/invokedynamic/sam") + @TestDataPath("$PROJECT_ROOT") + public class Sam { + @Test + public void testAllFilesPresentInSam() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/invokedynamic/sam"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @Test + @TestMetadata("crossinlineLambda1.kt") + public void testCrossinlineLambda1() throws Exception { + runTest("compiler/testData/codegen/boxInline/invokedynamic/sam/crossinlineLambda1.kt"); + } + + @Test + @TestMetadata("crossinlineLambda2.kt") + public void testCrossinlineLambda2() throws Exception { + runTest("compiler/testData/codegen/boxInline/invokedynamic/sam/crossinlineLambda2.kt"); + } + + @Test + @TestMetadata("inlineFunInDifferentPackage.kt") + public void testInlineFunInDifferentPackage() throws Exception { + runTest("compiler/testData/codegen/boxInline/invokedynamic/sam/inlineFunInDifferentPackage.kt"); + } + + @Test + @TestMetadata("inlineLambda1.kt") + public void testInlineLambda1() throws Exception { + runTest("compiler/testData/codegen/boxInline/invokedynamic/sam/inlineLambda1.kt"); + } + } + } + + @Nested + @TestMetadata("compiler/testData/codegen/boxInline/jvmName") + @TestDataPath("$PROJECT_ROOT") + public class JvmName { + @Test public void testAllFilesPresentInJvmName() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/jvmName"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("simple.kt") public void testSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/jvmName/simple.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/jvmPackageName") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class JvmPackageName extends AbstractFirBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - + public class JvmPackageName { + @Test public void testAllFilesPresentInJvmPackageName() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/jvmPackageName"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("simple.kt") public void testSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/jvmPackageName/simple.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/lambdaClassClash") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class LambdaClassClash extends AbstractFirBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - + public class LambdaClassClash { + @Test public void testAllFilesPresentInLambdaClassClash() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/lambdaClassClash"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("lambdaClassClash.kt") public void testLambdaClassClash() throws Exception { runTest("compiler/testData/codegen/boxInline/lambdaClassClash/lambdaClassClash.kt"); } + @Test @TestMetadata("noInlineLambdaX2.kt") public void testNoInlineLambdaX2() throws Exception { runTest("compiler/testData/codegen/boxInline/lambdaClassClash/noInlineLambdaX2.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/lambdaTransformation") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class LambdaTransformation extends AbstractFirBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - + public class LambdaTransformation { + @Test public void testAllFilesPresentInLambdaTransformation() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/lambdaTransformation"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("lambdaCloning.kt") public void testLambdaCloning() throws Exception { runTest("compiler/testData/codegen/boxInline/lambdaTransformation/lambdaCloning.kt"); } + @Test @TestMetadata("lambdaInLambda2.kt") public void testLambdaInLambda2() throws Exception { runTest("compiler/testData/codegen/boxInline/lambdaTransformation/lambdaInLambda2.kt"); } + @Test @TestMetadata("lambdaInLambdaNoInline.kt") public void testLambdaInLambdaNoInline() throws Exception { runTest("compiler/testData/codegen/boxInline/lambdaTransformation/lambdaInLambdaNoInline.kt"); } + @Test @TestMetadata("regeneratedLambdaName.kt") public void testRegeneratedLambdaName() throws Exception { runTest("compiler/testData/codegen/boxInline/lambdaTransformation/regeneratedLambdaName.kt"); } + @Test @TestMetadata("regeneratedLambdaName2.kt") public void testRegeneratedLambdaName2() throws Exception { runTest("compiler/testData/codegen/boxInline/lambdaTransformation/regeneratedLambdaName2.kt"); } + @Test @TestMetadata("sameCaptured.kt") public void testSameCaptured() throws Exception { runTest("compiler/testData/codegen/boxInline/lambdaTransformation/sameCaptured.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/localFunInLambda") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class LocalFunInLambda extends AbstractFirBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - + public class LocalFunInLambda { + @Test public void testAllFilesPresentInLocalFunInLambda() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/localFunInLambda"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("defaultParam.kt") public void testDefaultParam() throws Exception { runTest("compiler/testData/codegen/boxInline/localFunInLambda/defaultParam.kt"); } + @Test @TestMetadata("lambdaInLambdaCapturesAnotherFun.kt") public void testLambdaInLambdaCapturesAnotherFun() throws Exception { runTest("compiler/testData/codegen/boxInline/localFunInLambda/lambdaInLambdaCapturesAnotherFun.kt"); } + @Test @TestMetadata("localFunInLambda.kt") public void testLocalFunInLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/localFunInLambda/localFunInLambda.kt"); } + @Test @TestMetadata("localFunInLambdaCapturesAnotherFun.kt") public void testLocalFunInLambdaCapturesAnotherFun() throws Exception { runTest("compiler/testData/codegen/boxInline/localFunInLambda/localFunInLambdaCapturesAnotherFun.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/multiModule") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class MultiModule extends AbstractFirBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - + public class MultiModule { + @Test public void testAllFilesPresentInMultiModule() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/multiModule"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("tryCatchWithRecursiveInline.kt") public void testTryCatchWithRecursiveInline() throws Exception { runTest("compiler/testData/codegen/boxInline/multiModule/tryCatchWithRecursiveInline.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/multifileClasses") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class MultifileClasses extends AbstractFirBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - + public class MultifileClasses { + @Test public void testAllFilesPresentInMultifileClasses() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/multifileClasses"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("defaultArguments.kt") public void testDefaultArguments() throws Exception { runTest("compiler/testData/codegen/boxInline/multifileClasses/defaultArguments.kt"); } + @Test @TestMetadata("inlineFromOptimizedMultifileClass.kt") public void testInlineFromOptimizedMultifileClass() throws Exception { runTest("compiler/testData/codegen/boxInline/multifileClasses/inlineFromOptimizedMultifileClass.kt"); } + @Test @TestMetadata("inlineFromOtherPackage.kt") public void testInlineFromOtherPackage() throws Exception { runTest("compiler/testData/codegen/boxInline/multifileClasses/inlineFromOtherPackage.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/multiplatform") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Multiplatform extends AbstractFirBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - + public class Multiplatform { + @Test public void testAllFilesPresentInMultiplatform() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/multiplatform"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/multiplatform/defaultArguments") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class DefaultArguments extends AbstractFirBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - + public class DefaultArguments { + @Test public void testAllFilesPresentInDefaultArguments() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/multiplatform/defaultArguments"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("receiversAndParametersInLambda.kt") public void testReceiversAndParametersInLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/multiplatform/defaultArguments/receiversAndParametersInLambda.kt"); @@ -2355,535 +2687,640 @@ public class FirBlackBoxInlineCodegenTestGenerated extends AbstractFirBlackBoxIn } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/noInline") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class NoInline extends AbstractFirBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - + public class NoInline { + @Test public void testAllFilesPresentInNoInline() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/noInline"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("extensionReceiver.kt") public void testExtensionReceiver() throws Exception { runTest("compiler/testData/codegen/boxInline/noInline/extensionReceiver.kt"); } + @Test @TestMetadata("lambdaAsGeneric.kt") public void testLambdaAsGeneric() throws Exception { runTest("compiler/testData/codegen/boxInline/noInline/lambdaAsGeneric.kt"); } + @Test @TestMetadata("lambdaAsNonFunction.kt") public void testLambdaAsNonFunction() throws Exception { runTest("compiler/testData/codegen/boxInline/noInline/lambdaAsNonFunction.kt"); } + @Test @TestMetadata("noInline.kt") public void testNoInline() throws Exception { runTest("compiler/testData/codegen/boxInline/noInline/noInline.kt"); } + @Test @TestMetadata("noInlineLambdaChain.kt") public void testNoInlineLambdaChain() throws Exception { runTest("compiler/testData/codegen/boxInline/noInline/noInlineLambdaChain.kt"); } + @Test @TestMetadata("noInlineLambdaChainWithCapturedInline.kt") public void testNoInlineLambdaChainWithCapturedInline() throws Exception { runTest("compiler/testData/codegen/boxInline/noInline/noInlineLambdaChainWithCapturedInline.kt"); } + @Test @TestMetadata("withoutInline.kt") public void testWithoutInline() throws Exception { runTest("compiler/testData/codegen/boxInline/noInline/withoutInline.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/nonLocalReturns") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class NonLocalReturns extends AbstractFirBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - + public class NonLocalReturns { + @Test public void testAllFilesPresentInNonLocalReturns() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("explicitLocalReturn.kt") public void testExplicitLocalReturn() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/explicitLocalReturn.kt"); } + @Test + @TestMetadata("fromArrayGenerator.kt") + public void testFromArrayGenerator() throws Exception { + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/fromArrayGenerator.kt"); + } + + @Test + @TestMetadata("fromArrayGeneratorCatch.kt") + public void testFromArrayGeneratorCatch() throws Exception { + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/fromArrayGeneratorCatch.kt"); + } + + @Test + @TestMetadata("fromArrayGeneratorNested.kt") + public void testFromArrayGeneratorNested() throws Exception { + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/fromArrayGeneratorNested.kt"); + } + + @Test + @TestMetadata("fromArrayGeneratorWithCapture.kt") + public void testFromArrayGeneratorWithCapture() throws Exception { + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/fromArrayGeneratorWithCapture.kt"); + } + + @Test + @TestMetadata("fromArrayGeneratorWithCatch.kt") + public void testFromArrayGeneratorWithCatch() throws Exception { + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/fromArrayGeneratorWithCatch.kt"); + } + + @Test + @TestMetadata("fromArrayGeneratorWithFinally.kt") + public void testFromArrayGeneratorWithFinally() throws Exception { + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/fromArrayGeneratorWithFinally.kt"); + } + + @Test + @TestMetadata("fromArrayGeneratorWithFinallyX2.kt") + public void testFromArrayGeneratorWithFinallyX2() throws Exception { + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/fromArrayGeneratorWithFinallyX2.kt"); + } + + @Test + @TestMetadata("fromArrayGeneratorWithFinallyX2_2.kt") + public void testFromArrayGeneratorWithFinallyX2_2() throws Exception { + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/fromArrayGeneratorWithFinallyX2_2.kt"); + } + + @Test @TestMetadata("fromInterfaceDefaultGetter.kt") public void testFromInterfaceDefaultGetter() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/fromInterfaceDefaultGetter.kt"); } + @Test @TestMetadata("justReturnInLambda.kt") public void testJustReturnInLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/justReturnInLambda.kt"); } + @Test @TestMetadata("kt5199.kt") public void testKt5199() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/kt5199.kt"); } + @Test @TestMetadata("kt8948.kt") public void testKt8948() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/kt8948.kt"); } + @Test @TestMetadata("kt8948v2.kt") public void testKt8948v2() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/kt8948v2.kt"); } + @Test @TestMetadata("nestedNonLocals.kt") public void testNestedNonLocals() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/nestedNonLocals.kt"); } + @Test @TestMetadata("noInlineLocalReturn.kt") public void testNoInlineLocalReturn() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/noInlineLocalReturn.kt"); } + @Test @TestMetadata("nonLocalReturnFromOuterLambda.kt") public void testNonLocalReturnFromOuterLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/nonLocalReturnFromOuterLambda.kt"); } + @Test @TestMetadata("propertyAccessors.kt") public void testPropertyAccessors() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/propertyAccessors.kt"); } + @Test @TestMetadata("returnFromFunctionExpr.kt") public void testReturnFromFunctionExpr() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/returnFromFunctionExpr.kt"); } + @Test @TestMetadata("simple.kt") public void testSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/simple.kt"); } + @Test @TestMetadata("simpleFunctional.kt") public void testSimpleFunctional() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/simpleFunctional.kt"); } + @Test @TestMetadata("simpleVoid.kt") public void testSimpleVoid() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/simpleVoid.kt"); } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/deparenthesize") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Deparenthesize extends AbstractFirBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - + public class Deparenthesize { + @Test public void testAllFilesPresentInDeparenthesize() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/deparenthesize"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("bracket.kt") public void testBracket() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/deparenthesize/bracket.kt"); } + @Test @TestMetadata("labeled.kt") public void testLabeled() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/deparenthesize/labeled.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class TryFinally extends AbstractFirBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - + public class TryFinally { + @Test public void testAllFilesPresentInTryFinally() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("kt16417.kt") public void testKt16417() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt16417.kt"); } + @Test @TestMetadata("kt20433.kt") public void testKt20433() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt20433.kt"); } + @Test @TestMetadata("kt20433_2.kt") public void testKt20433_2() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt20433_2.kt"); } + @Test @TestMetadata("kt20433_2_void.kt") public void testKt20433_2_void() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt20433_2_void.kt"); } + @Test @TestMetadata("kt20433_void.kt") public void testKt20433_void() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt20433_void.kt"); } + @Test @TestMetadata("kt26384.kt") public void testKt26384() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt26384.kt"); } + @Test @TestMetadata("kt26384_2.kt") public void testKt26384_2() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt26384_2.kt"); } + @Test @TestMetadata("kt28546.kt") public void testKt28546() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt28546.kt"); } + @Test @TestMetadata("kt6956.kt") public void testKt6956() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt6956.kt"); } + @Test @TestMetadata("kt7273.kt") public void testKt7273() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt7273.kt"); } + @Test @TestMetadata("nonLocalReturnFromCatchBlock.kt") public void testNonLocalReturnFromCatchBlock() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/nonLocalReturnFromCatchBlock.kt"); } + @Test @TestMetadata("nonLocalReturnFromOuterLambda.kt") public void testNonLocalReturnFromOuterLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/nonLocalReturnFromOuterLambda.kt"); } + @Test @TestMetadata("nonLocalReturnToCatchBlock.kt") public void testNonLocalReturnToCatchBlock() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/nonLocalReturnToCatchBlock.kt"); } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class CallSite extends AbstractFirBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - + public class CallSite { + @Test public void testAllFilesPresentInCallSite() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("callSite.kt") public void testCallSite() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/callSite.kt"); } + @Test @TestMetadata("callSiteComplex.kt") public void testCallSiteComplex() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/callSiteComplex.kt"); } + @Test @TestMetadata("exceptionTableSplit.kt") public void testExceptionTableSplit() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/exceptionTableSplit.kt"); } + @Test @TestMetadata("exceptionTableSplitNoReturn.kt") public void testExceptionTableSplitNoReturn() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/exceptionTableSplitNoReturn.kt"); } + @Test @TestMetadata("finallyInFinally.kt") public void testFinallyInFinally() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/finallyInFinally.kt"); } + @Test @TestMetadata("wrongVarInterval.kt") public void testWrongVarInterval() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/wrongVarInterval.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Chained extends AbstractFirBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - + public class Chained { + @Test public void testAllFilesPresentInChained() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("finallyInFinally.kt") public void testFinallyInFinally() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/finallyInFinally.kt"); } + @Test @TestMetadata("finallyInFinally2.kt") public void testFinallyInFinally2() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/finallyInFinally2.kt"); } + @Test @TestMetadata("intReturn.kt") public void testIntReturn() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturn.kt"); } + @Test @TestMetadata("intReturnComplex.kt") public void testIntReturnComplex() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex.kt"); } + @Test @TestMetadata("intReturnComplex2.kt") public void testIntReturnComplex2() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex2.kt"); } + @Test @TestMetadata("intReturnComplex3.kt") public void testIntReturnComplex3() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex3.kt"); } + @Test @TestMetadata("intReturnComplex4.kt") public void testIntReturnComplex4() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex4.kt"); } + @Test @TestMetadata("nestedLambda.kt") public void testNestedLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/nestedLambda.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class DeclSite extends AbstractFirBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - + public class DeclSite { + @Test public void testAllFilesPresentInDeclSite() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("complex.kt") public void testComplex() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/complex.kt"); } + @Test @TestMetadata("intReturn.kt") public void testIntReturn() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/intReturn.kt"); } + @Test @TestMetadata("intReturnComplex.kt") public void testIntReturnComplex() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/intReturnComplex.kt"); } + @Test @TestMetadata("longReturn.kt") public void testLongReturn() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/longReturn.kt"); } + @Test @TestMetadata("nested.kt") public void testNested() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/nested.kt"); } + @Test @TestMetadata("returnInFinally.kt") public void testReturnInFinally() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/returnInFinally.kt"); } + @Test @TestMetadata("returnInTry.kt") public void testReturnInTry() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/returnInTry.kt"); } + @Test @TestMetadata("returnInTryAndFinally.kt") public void testReturnInTryAndFinally() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/returnInTryAndFinally.kt"); } + @Test @TestMetadata("severalInTry.kt") public void testSeveralInTry() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/severalInTry.kt"); } + @Test @TestMetadata("severalInTryComplex.kt") public void testSeveralInTryComplex() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/severalInTryComplex.kt"); } + @Test @TestMetadata("voidInlineFun.kt") public void testVoidInlineFun() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/voidInlineFun.kt"); } + @Test @TestMetadata("voidNonLocal.kt") public void testVoidNonLocal() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/voidNonLocal.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class ExceptionTable extends AbstractFirBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - + public class ExceptionTable { + @Test public void testAllFilesPresentInExceptionTable() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("break.kt") public void testBreak() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/break.kt"); } + @Test @TestMetadata("continue.kt") public void testContinue() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/continue.kt"); } + @Test @TestMetadata("exceptionInFinally.kt") public void testExceptionInFinally() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/exceptionInFinally.kt"); } + @Test @TestMetadata("forInFinally.kt") public void testForInFinally() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/forInFinally.kt"); } + @Test @TestMetadata("innerAndExternal.kt") public void testInnerAndExternal() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/innerAndExternal.kt"); } + @Test @TestMetadata("innerAndExternalNested.kt") public void testInnerAndExternalNested() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/innerAndExternalNested.kt"); } + @Test @TestMetadata("innerAndExternalSimple.kt") public void testInnerAndExternalSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/innerAndExternalSimple.kt"); } + @Test @TestMetadata("kt31653.kt") public void testKt31653() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/kt31653.kt"); } + @Test @TestMetadata("kt31653_2.kt") public void testKt31653_2() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/kt31653_2.kt"); } + @Test @TestMetadata("kt31923.kt") public void testKt31923() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/kt31923.kt"); } + @Test @TestMetadata("kt31923_2.kt") public void testKt31923_2() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/kt31923_2.kt"); } + @Test @TestMetadata("kt31923_wrong.kt") public void testKt31923_wrong() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/kt31923_wrong.kt"); } + @Test @TestMetadata("nested.kt") public void testNested() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/nested.kt"); } + @Test @TestMetadata("nestedWithReturns.kt") public void testNestedWithReturns() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/nestedWithReturns.kt"); } + @Test @TestMetadata("nestedWithReturnsSimple.kt") public void testNestedWithReturnsSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/nestedWithReturnsSimple.kt"); } + @Test @TestMetadata("noFinally.kt") public void testNoFinally() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/noFinally.kt"); } + @Test @TestMetadata("severalCatchClause.kt") public void testSeveralCatchClause() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/severalCatchClause.kt"); } + @Test @TestMetadata("simpleThrow.kt") public void testSimpleThrow() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/simpleThrow.kt"); } + @Test @TestMetadata("synchonized.kt") public void testSynchonized() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/synchonized.kt"); } + @Test @TestMetadata("throwInFinally.kt") public void testThrowInFinally() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/throwInFinally.kt"); } + @Test @TestMetadata("tryCatchInFinally.kt") public void testTryCatchInFinally() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/tryCatchInFinally.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/variables") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Variables extends AbstractFirBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - + public class Variables { + @Test public void testAllFilesPresentInVariables() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/variables"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("kt7792.kt") public void testKt7792() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/variables/kt7792.kt"); @@ -2892,430 +3329,501 @@ public class FirBlackBoxInlineCodegenTestGenerated extends AbstractFirBlackBoxIn } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/optimizations") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Optimizations extends AbstractFirBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - + public class Optimizations { + @Test public void testAllFilesPresentInOptimizations() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/optimizations"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("kt20844.kt") public void testKt20844() throws Exception { runTest("compiler/testData/codegen/boxInline/optimizations/kt20844.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/private") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Private extends AbstractFirBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - + public class Private { + @Test @TestMetadata("accessorForConst.kt") public void testAccessorForConst() throws Exception { runTest("compiler/testData/codegen/boxInline/private/accessorForConst.kt"); } + @Test @TestMetadata("accessorStability.kt") public void testAccessorStability() throws Exception { runTest("compiler/testData/codegen/boxInline/private/accessorStability.kt"); } + @Test @TestMetadata("accessorStabilityInClass.kt") public void testAccessorStabilityInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/private/accessorStabilityInClass.kt"); } + @Test public void testAllFilesPresentInPrivate() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/private"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("effectivePrivate.kt") public void testEffectivePrivate() throws Exception { runTest("compiler/testData/codegen/boxInline/private/effectivePrivate.kt"); } + @Test @TestMetadata("kt6453.kt") public void testKt6453() throws Exception { runTest("compiler/testData/codegen/boxInline/private/kt6453.kt"); } + @Test @TestMetadata("kt8094.kt") public void testKt8094() throws Exception { runTest("compiler/testData/codegen/boxInline/private/kt8094.kt"); } + @Test @TestMetadata("kt8095.kt") public void testKt8095() throws Exception { runTest("compiler/testData/codegen/boxInline/private/kt8095.kt"); } + @Test @TestMetadata("nestedInPrivateClass.kt") public void testNestedInPrivateClass() throws Exception { runTest("compiler/testData/codegen/boxInline/private/nestedInPrivateClass.kt"); } + @Test @TestMetadata("privateClass.kt") public void testPrivateClass() throws Exception { runTest("compiler/testData/codegen/boxInline/private/privateClass.kt"); } + @Test @TestMetadata("privateClassExtensionLambda.kt") public void testPrivateClassExtensionLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/private/privateClassExtensionLambda.kt"); } + @Test @TestMetadata("privateInInlineInMultiFileFacade.kt") public void testPrivateInInlineInMultiFileFacade() throws Exception { runTest("compiler/testData/codegen/boxInline/private/privateInInlineInMultiFileFacade.kt"); } + @Test @TestMetadata("privateInline.kt") public void testPrivateInline() throws Exception { runTest("compiler/testData/codegen/boxInline/private/privateInline.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/property") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Property extends AbstractFirBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - + public class Property { + @Test public void testAllFilesPresentInProperty() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/property"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("augAssignmentAndInc.kt") public void testAugAssignmentAndInc() throws Exception { runTest("compiler/testData/codegen/boxInline/property/augAssignmentAndInc.kt"); } + @Test @TestMetadata("augAssignmentAndIncInClass.kt") public void testAugAssignmentAndIncInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/property/augAssignmentAndIncInClass.kt"); } + @Test @TestMetadata("augAssignmentAndIncInClassViaConvention.kt") public void testAugAssignmentAndIncInClassViaConvention() throws Exception { runTest("compiler/testData/codegen/boxInline/property/augAssignmentAndIncInClassViaConvention.kt"); } + @Test @TestMetadata("augAssignmentAndIncOnExtension.kt") public void testAugAssignmentAndIncOnExtension() throws Exception { runTest("compiler/testData/codegen/boxInline/property/augAssignmentAndIncOnExtension.kt"); } + @Test @TestMetadata("augAssignmentAndIncOnExtensionInClass.kt") public void testAugAssignmentAndIncOnExtensionInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/property/augAssignmentAndIncOnExtensionInClass.kt"); } + @Test @TestMetadata("augAssignmentAndIncViaConvention.kt") public void testAugAssignmentAndIncViaConvention() throws Exception { runTest("compiler/testData/codegen/boxInline/property/augAssignmentAndIncViaConvention.kt"); } + @Test @TestMetadata("fromObject.kt") public void testFromObject() throws Exception { runTest("compiler/testData/codegen/boxInline/property/fromObject.kt"); } + @Test @TestMetadata("kt22649.kt") public void testKt22649() throws Exception { runTest("compiler/testData/codegen/boxInline/property/kt22649.kt"); } + @Test @TestMetadata("property.kt") public void testProperty() throws Exception { runTest("compiler/testData/codegen/boxInline/property/property.kt"); } + @Test @TestMetadata("reifiedVal.kt") public void testReifiedVal() throws Exception { runTest("compiler/testData/codegen/boxInline/property/reifiedVal.kt"); } + @Test @TestMetadata("reifiedVar.kt") public void testReifiedVar() throws Exception { runTest("compiler/testData/codegen/boxInline/property/reifiedVar.kt"); } + @Test @TestMetadata("simple.kt") public void testSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/property/simple.kt"); } + @Test @TestMetadata("simpleExtension.kt") public void testSimpleExtension() throws Exception { runTest("compiler/testData/codegen/boxInline/property/simpleExtension.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/reified") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Reified extends AbstractFirBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - + public class Reified { + @Test public void testAllFilesPresentInReified() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/reified"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("arrayConstructor.kt") public void testArrayConstructor() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/arrayConstructor.kt"); } + @Test @TestMetadata("arrayOf.kt") public void testArrayOf() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/arrayOf.kt"); } + @Test @TestMetadata("capturedLambda.kt") public void testCapturedLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/capturedLambda.kt"); } + @Test @TestMetadata("capturedLambda2.kt") public void testCapturedLambda2() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/capturedLambda2.kt"); } + @Test @TestMetadata("dontSubstituteNonReified.kt") public void testDontSubstituteNonReified() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/dontSubstituteNonReified.kt"); } + @Test @TestMetadata("kt11081.kt") public void testKt11081() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/kt11081.kt"); } + @Test @TestMetadata("kt11677.kt") public void testKt11677() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/kt11677.kt"); } + @Test @TestMetadata("kt15956.kt") public void testKt15956() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/kt15956.kt"); } + @Test @TestMetadata("kt15997.kt") public void testKt15997() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/kt15997.kt"); } + @Test @TestMetadata("kt15997_2.kt") public void testKt15997_2() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/kt15997_2.kt"); } + @Test @TestMetadata("kt18977.kt") public void testKt18977() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/kt18977.kt"); } + @Test + @TestMetadata("kt35511.kt") + public void testKt35511() throws Exception { + runTest("compiler/testData/codegen/boxInline/reified/kt35511.kt"); + } + + @Test + @TestMetadata("kt35511_try.kt") + public void testKt35511_try() throws Exception { + runTest("compiler/testData/codegen/boxInline/reified/kt35511_try.kt"); + } + + @Test + @TestMetadata("kt35511_try_valueOf.kt") + public void testKt35511_try_valueOf() throws Exception { + runTest("compiler/testData/codegen/boxInline/reified/kt35511_try_valueOf.kt"); + } + + @Test + @TestMetadata("kt35511_try_values.kt") + public void testKt35511_try_values() throws Exception { + runTest("compiler/testData/codegen/boxInline/reified/kt35511_try_values.kt"); + } + + @Test @TestMetadata("kt6988.kt") public void testKt6988() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/kt6988.kt"); } + @Test @TestMetadata("kt6988_2.kt") public void testKt6988_2() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/kt6988_2.kt"); } + @Test @TestMetadata("kt6990.kt") public void testKt6990() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/kt6990.kt"); } + @Test @TestMetadata("kt7017.kt") public void testKt7017() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/kt7017.kt"); } + @Test @TestMetadata("kt8047.kt") public void testKt8047() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/kt8047.kt"); } + @Test @TestMetadata("kt8047_2.kt") public void testKt8047_2() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/kt8047_2.kt"); } + @Test @TestMetadata("kt9637.kt") public void testKt9637() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/kt9637.kt"); } + @Test @TestMetadata("kt9637_2.kt") public void testKt9637_2() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/kt9637_2.kt"); } + @Test @TestMetadata("nonCapturingObjectInLambda.kt") public void testNonCapturingObjectInLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/nonCapturingObjectInLambda.kt"); } + @Test @TestMetadata("packages.kt") public void testPackages() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/packages.kt"); } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/reified/checkCast") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class CheckCast extends AbstractFirBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - + public class CheckCast { + @Test public void testAllFilesPresentInCheckCast() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/reified/checkCast"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("chain.kt") public void testChain() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/checkCast/chain.kt"); } + @Test @TestMetadata("kt26435.kt") public void testKt26435() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/checkCast/kt26435.kt"); } + @Test @TestMetadata("kt26435_2.kt") public void testKt26435_2() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/checkCast/kt26435_2.kt"); } + @Test @TestMetadata("kt26435_3.kt") public void testKt26435_3() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/checkCast/kt26435_3.kt"); } + @Test @TestMetadata("kt8043.kt") public void testKt8043() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/checkCast/kt8043.kt"); } + @Test @TestMetadata("maxStack.kt") public void testMaxStack() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/checkCast/maxStack.kt"); } + @Test @TestMetadata("nullable.kt") public void testNullable() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/checkCast/nullable.kt"); } + @Test @TestMetadata("simple.kt") public void testSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/checkCast/simple.kt"); } + @Test @TestMetadata("simpleSafe.kt") public void testSimpleSafe() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/checkCast/simpleSafe.kt"); } + @Test @TestMetadata("simple_1_3.kt") public void testSimple_1_3() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/checkCast/simple_1_3.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/reified/defaultLambda") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class DefaultLambda extends AbstractFirBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - + public class DefaultLambda { + @Test public void testAllFilesPresentInDefaultLambda() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/reified/defaultLambda"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("chain.kt") public void testChain() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/defaultLambda/chain.kt"); } + @Test @TestMetadata("nested.kt") public void testNested() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/defaultLambda/nested.kt"); } + @Test @TestMetadata("nested2.kt") public void testNested2() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/defaultLambda/nested2.kt"); } + @Test @TestMetadata("nested2Static.kt") public void testNested2Static() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/defaultLambda/nested2Static.kt"); } + @Test @TestMetadata("nestedStatic.kt") public void testNestedStatic() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/defaultLambda/nestedStatic.kt"); } + @Test @TestMetadata("simple.kt") public void testSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/defaultLambda/simple.kt"); } + @Test @TestMetadata("transitiveChain.kt") public void testTransitiveChain() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/defaultLambda/transitiveChain.kt"); } + @Test @TestMetadata("transitiveChainStatic.kt") public void testTransitiveChainStatic() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/defaultLambda/transitiveChainStatic.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/reified/isCheck") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class IsCheck extends AbstractFirBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - + public class IsCheck { + @Test public void testAllFilesPresentInIsCheck() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/reified/isCheck"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("chain.kt") public void testChain() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/isCheck/chain.kt"); } + @Test @TestMetadata("nullable.kt") public void testNullable() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/isCheck/nullable.kt"); } + @Test @TestMetadata("simple.kt") public void testSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/isCheck/simple.kt"); @@ -3323,518 +3831,577 @@ public class FirBlackBoxInlineCodegenTestGenerated extends AbstractFirBlackBoxIn } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/signature") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Signature extends AbstractFirBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - + public class Signature { + @Test public void testAllFilesPresentInSignature() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/signature"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("inProjectionSubstitution.kt") public void testInProjectionSubstitution() throws Exception { runTest("compiler/testData/codegen/boxInline/signature/inProjectionSubstitution.kt"); } + @Test @TestMetadata("outProjectionSubstitution.kt") public void testOutProjectionSubstitution() throws Exception { runTest("compiler/testData/codegen/boxInline/signature/outProjectionSubstitution.kt"); } + @Test @TestMetadata("recursion.kt") public void testRecursion() throws Exception { runTest("compiler/testData/codegen/boxInline/signature/recursion.kt"); } + @Test @TestMetadata("sameFormalParameterName.kt") public void testSameFormalParameterName() throws Exception { runTest("compiler/testData/codegen/boxInline/signature/sameFormalParameterName.kt"); } + @Test @TestMetadata("sameReifiedFormalParameterName.kt") public void testSameReifiedFormalParameterName() throws Exception { runTest("compiler/testData/codegen/boxInline/signature/sameReifiedFormalParameterName.kt"); } + @Test @TestMetadata("starProjectionSubstitution.kt") public void testStarProjectionSubstitution() throws Exception { runTest("compiler/testData/codegen/boxInline/signature/starProjectionSubstitution.kt"); } + @Test @TestMetadata("typeParameterInLambda.kt") public void testTypeParameterInLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/signature/typeParameterInLambda.kt"); } + @Test @TestMetadata("typeParametersSubstitution.kt") public void testTypeParametersSubstitution() throws Exception { runTest("compiler/testData/codegen/boxInline/signature/typeParametersSubstitution.kt"); } + @Test @TestMetadata("typeParametersSubstitution2.kt") public void testTypeParametersSubstitution2() throws Exception { runTest("compiler/testData/codegen/boxInline/signature/typeParametersSubstitution2.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/simple") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Simple extends AbstractFirBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - + public class Simple { + @Test public void testAllFilesPresentInSimple() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/simple"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("captureAndArgumentIncompatibleTypes.kt") public void testCaptureAndArgumentIncompatibleTypes() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/captureAndArgumentIncompatibleTypes.kt"); } + @Test @TestMetadata("classObject.kt") public void testClassObject() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/classObject.kt"); } + @Test @TestMetadata("destructuring.kt") public void testDestructuring() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/destructuring.kt"); } + @Test @TestMetadata("destructuringIndexClash.kt") public void testDestructuringIndexClash() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/destructuringIndexClash.kt"); } + @Test @TestMetadata("extension.kt") public void testExtension() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/extension.kt"); } + @Test @TestMetadata("extensionLambda.kt") public void testExtensionLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/extensionLambda.kt"); } + @Test @TestMetadata("funImportedFromObject.kt") public void testFunImportedFromObject() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/funImportedFromObject.kt"); } + @Test @TestMetadata("inlineCallInInlineLambda.kt") public void testInlineCallInInlineLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/inlineCallInInlineLambda.kt"); } + @Test @TestMetadata("kt17431.kt") public void testKt17431() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/kt17431.kt"); } + @Test @TestMetadata("kt28547.kt") public void testKt28547() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/kt28547.kt"); } + @Test @TestMetadata("kt28547_2.kt") public void testKt28547_2() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/kt28547_2.kt"); } + @Test @TestMetadata("params.kt") public void testParams() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/params.kt"); } + @Test @TestMetadata("propImportedFromObject.kt") public void testPropImportedFromObject() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/propImportedFromObject.kt"); } + @Test @TestMetadata("rootConstructor.kt") public void testRootConstructor() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/rootConstructor.kt"); } + @Test @TestMetadata("safeCall.kt") public void testSafeCall() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/safeCall.kt"); } + @Test @TestMetadata("severalClosures.kt") public void testSeveralClosures() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/severalClosures.kt"); } + @Test @TestMetadata("severalUsage.kt") public void testSeveralUsage() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/severalUsage.kt"); } + @Test @TestMetadata("simpleDouble.kt") public void testSimpleDouble() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/simpleDouble.kt"); } + @Test @TestMetadata("simpleEnum.kt") public void testSimpleEnum() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/simpleEnum.kt"); } + @Test @TestMetadata("simpleGenerics.kt") public void testSimpleGenerics() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/simpleGenerics.kt"); } + @Test @TestMetadata("simpleInt.kt") public void testSimpleInt() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/simpleInt.kt"); } + @Test @TestMetadata("simpleLambda.kt") public void testSimpleLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/simpleLambda.kt"); } + @Test @TestMetadata("simpleObject.kt") public void testSimpleObject() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/simpleObject.kt"); } + @Test @TestMetadata("vararg.kt") public void testVararg() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/vararg.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/smap") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Smap extends AbstractFirBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - + public class Smap { + @Test public void testAllFilesPresentInSmap() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/smap"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("assertion.kt") public void testAssertion() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/assertion.kt"); } + @Test @TestMetadata("classCycle.kt") public void testClassCycle() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/classCycle.kt"); } + @Test @TestMetadata("classFromDefaultPackage.kt") public void testClassFromDefaultPackage() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/classFromDefaultPackage.kt"); } + @Test @TestMetadata("crossroutines.kt") public void testCrossroutines() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/crossroutines.kt"); } + @Test @TestMetadata("defaultFunction.kt") public void testDefaultFunction() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/defaultFunction.kt"); } + @Test @TestMetadata("defaultFunctionWithInlineCall.kt") public void testDefaultFunctionWithInlineCall() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/defaultFunctionWithInlineCall.kt"); } + @Test @TestMetadata("forInline.kt") public void testForInline() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/forInline.kt"); } + @Test @TestMetadata("interleavedFiles.kt") public void testInterleavedFiles() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/interleavedFiles.kt"); } + @Test @TestMetadata("kt23369.kt") public void testKt23369() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/kt23369.kt"); } + @Test @TestMetadata("kt23369_2.kt") public void testKt23369_2() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/kt23369_2.kt"); } + @Test @TestMetadata("kt23369_3.kt") public void testKt23369_3() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/kt23369_3.kt"); } + @Test @TestMetadata("kt35006.kt") public void testKt35006() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/kt35006.kt"); } + @Test @TestMetadata("multiFileFacade.kt") public void testMultiFileFacade() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/multiFileFacade.kt"); } + @Test @TestMetadata("oneFile.kt") public void testOneFile() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/oneFile.kt"); } + @Test @TestMetadata("rangeFolding.kt") public void testRangeFolding() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/rangeFolding.kt"); } + @Test @TestMetadata("rangeFoldingInClass.kt") public void testRangeFoldingInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/rangeFoldingInClass.kt"); } + @Test @TestMetadata("smap.kt") public void testSmap() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/smap.kt"); } + @Test @TestMetadata("smapWithNewSyntax.kt") public void testSmapWithNewSyntax() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/smapWithNewSyntax.kt"); } + @Test @TestMetadata("smapWithOldSyntax.kt") public void testSmapWithOldSyntax() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/smapWithOldSyntax.kt"); } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/smap/anonymous") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Anonymous extends AbstractFirBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - + public class Anonymous { + @Test public void testAllFilesPresentInAnonymous() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/smap/anonymous"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("kt19175.kt") public void testKt19175() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/anonymous/kt19175.kt"); } + @Test @TestMetadata("lambda.kt") public void testLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/anonymous/lambda.kt"); } + @Test @TestMetadata("lambdaOnCallSite.kt") public void testLambdaOnCallSite() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/anonymous/lambdaOnCallSite.kt"); } + @Test @TestMetadata("lambdaOnInlineCallSite.kt") public void testLambdaOnInlineCallSite() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/anonymous/lambdaOnInlineCallSite.kt"); } + @Test @TestMetadata("object.kt") public void testObject() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/anonymous/object.kt"); } + @Test @TestMetadata("objectOnCallSite.kt") public void testObjectOnCallSite() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/anonymous/objectOnCallSite.kt"); } + @Test @TestMetadata("objectOnInlineCallSite.kt") public void testObjectOnInlineCallSite() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/anonymous/objectOnInlineCallSite.kt"); } + @Test @TestMetadata("objectOnInlineCallSite2.kt") public void testObjectOnInlineCallSite2() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/anonymous/objectOnInlineCallSite2.kt"); } + @Test @TestMetadata("objectOnInlineCallSiteWithCapture.kt") public void testObjectOnInlineCallSiteWithCapture() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/anonymous/objectOnInlineCallSiteWithCapture.kt"); } + @Test @TestMetadata("severalMappingsForDefaultFile.kt") public void testSeveralMappingsForDefaultFile() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/anonymous/severalMappingsForDefaultFile.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/smap/defaultLambda") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class DefaultLambda extends AbstractFirBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - + public class DefaultLambda { + @Test public void testAllFilesPresentInDefaultLambda() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/smap/defaultLambda"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("defaultLambdaInAnonymous.kt") public void testDefaultLambdaInAnonymous() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/defaultLambda/defaultLambdaInAnonymous.kt"); } + @Test @TestMetadata("inlinInDefault.kt") public void testInlinInDefault() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/defaultLambda/inlinInDefault.kt"); } + @Test @TestMetadata("inlinInDefault2.kt") public void testInlinInDefault2() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/defaultLambda/inlinInDefault2.kt"); } + @Test @TestMetadata("inlineAnonymousInDefault.kt") public void testInlineAnonymousInDefault() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/defaultLambda/inlineAnonymousInDefault.kt"); } + @Test @TestMetadata("inlineAnonymousInDefault2.kt") public void testInlineAnonymousInDefault2() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/defaultLambda/inlineAnonymousInDefault2.kt"); } + @Test @TestMetadata("kt21827.kt") public void testKt21827() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/defaultLambda/kt21827.kt"); } + @Test @TestMetadata("nested.kt") public void testNested() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/defaultLambda/nested.kt"); } + @Test @TestMetadata("simple.kt") public void testSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/defaultLambda/simple.kt"); } + @Test @TestMetadata("simple2.kt") public void testSimple2() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/defaultLambda/simple2.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/smap/inlineOnly") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class InlineOnly extends AbstractFirBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - + public class InlineOnly { + @Test public void testAllFilesPresentInInlineOnly() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/smap/inlineOnly"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("noSmap.kt") public void testNoSmap() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/inlineOnly/noSmap.kt"); } + @Test @TestMetadata("noSmapWithProperty.kt") public void testNoSmapWithProperty() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/inlineOnly/noSmapWithProperty.kt"); } + @Test @TestMetadata("reified.kt") public void testReified() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/inlineOnly/reified.kt"); } + @Test @TestMetadata("reifiedProperty.kt") public void testReifiedProperty() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/inlineOnly/reifiedProperty.kt"); } + @Test @TestMetadata("stdlibInlineOnly.kt") public void testStdlibInlineOnly() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/inlineOnly/stdlibInlineOnly.kt"); } + @Test @TestMetadata("stdlibInlineOnlyOneLine.kt") public void testStdlibInlineOnlyOneLine() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/inlineOnly/stdlibInlineOnlyOneLine.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/smap/newsmap") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Newsmap extends AbstractFirBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - + public class Newsmap { + @Test public void testAllFilesPresentInNewsmap() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/smap/newsmap"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("differentMapping.kt") public void testDifferentMapping() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/newsmap/differentMapping.kt"); } + @Test @TestMetadata("mappingInInlineFunLambda.kt") public void testMappingInInlineFunLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/newsmap/mappingInInlineFunLambda.kt"); } + @Test @TestMetadata("mappingInSubInlineLambda.kt") public void testMappingInSubInlineLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/newsmap/mappingInSubInlineLambda.kt"); } + @Test @TestMetadata("mappingInSubInlineLambdaSameFileInline.kt") public void testMappingInSubInlineLambdaSameFileInline() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/newsmap/mappingInSubInlineLambdaSameFileInline.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/smap/resolve") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Resolve extends AbstractFirBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - + public class Resolve { + @Test public void testAllFilesPresentInResolve() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/smap/resolve"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("inlineComponent.kt") public void testInlineComponent() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/resolve/inlineComponent.kt"); } + @Test @TestMetadata("inlineIterator.kt") public void testInlineIterator() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/resolve/inlineIterator.kt"); @@ -3842,616 +4409,695 @@ public class FirBlackBoxInlineCodegenTestGenerated extends AbstractFirBlackBoxIn } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/special") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Special extends AbstractFirBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - + public class Special { + @Test public void testAllFilesPresentInSpecial() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/special"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("identityCheck.kt") public void testIdentityCheck() throws Exception { runTest("compiler/testData/codegen/boxInline/special/identityCheck.kt"); } + @Test @TestMetadata("ifBranches.kt") public void testIfBranches() throws Exception { runTest("compiler/testData/codegen/boxInline/special/ifBranches.kt"); } + @Test @TestMetadata("iinc.kt") public void testIinc() throws Exception { runTest("compiler/testData/codegen/boxInline/special/iinc.kt"); } + @Test @TestMetadata("inlineChain.kt") public void testInlineChain() throws Exception { runTest("compiler/testData/codegen/boxInline/special/inlineChain.kt"); } + @Test @TestMetadata("loopInStoreLoadChains.kt") public void testLoopInStoreLoadChains() throws Exception { runTest("compiler/testData/codegen/boxInline/special/loopInStoreLoadChains.kt"); } + @Test @TestMetadata("loopInStoreLoadChains2.kt") public void testLoopInStoreLoadChains2() throws Exception { runTest("compiler/testData/codegen/boxInline/special/loopInStoreLoadChains2.kt"); } + @Test @TestMetadata("plusAssign.kt") public void testPlusAssign() throws Exception { runTest("compiler/testData/codegen/boxInline/special/plusAssign.kt"); } + @Test @TestMetadata("stackHeightBug.kt") public void testStackHeightBug() throws Exception { runTest("compiler/testData/codegen/boxInline/special/stackHeightBug.kt"); } + @Test @TestMetadata("unusedInlineLambda.kt") public void testUnusedInlineLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/special/unusedInlineLambda.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/stackOnReturn") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class StackOnReturn extends AbstractFirBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - + public class StackOnReturn { + @Test public void testAllFilesPresentInStackOnReturn() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/stackOnReturn"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("elvis.kt") public void testElvis() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/elvis.kt"); } + @Test @TestMetadata("ifThenElse.kt") public void testIfThenElse() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/ifThenElse.kt"); } + @Test @TestMetadata("kt11499.kt") public void testKt11499() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/kt11499.kt"); } + @Test @TestMetadata("kt17591.kt") public void testKt17591() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/kt17591.kt"); } + @Test @TestMetadata("kt17591a.kt") public void testKt17591a() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/kt17591a.kt"); } + @Test @TestMetadata("kt17591b.kt") public void testKt17591b() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/kt17591b.kt"); } + @Test @TestMetadata("mixedTypesOnStack1.kt") public void testMixedTypesOnStack1() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/mixedTypesOnStack1.kt"); } + @Test @TestMetadata("mixedTypesOnStack2.kt") public void testMixedTypesOnStack2() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/mixedTypesOnStack2.kt"); } + @Test @TestMetadata("mixedTypesOnStack3.kt") public void testMixedTypesOnStack3() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/mixedTypesOnStack3.kt"); } + @Test @TestMetadata("nonLocalReturn1.kt") public void testNonLocalReturn1() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/nonLocalReturn1.kt"); } + @Test @TestMetadata("nonLocalReturn2.kt") public void testNonLocalReturn2() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/nonLocalReturn2.kt"); } + @Test @TestMetadata("nonLocalReturn3.kt") public void testNonLocalReturn3() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/nonLocalReturn3.kt"); } + @Test @TestMetadata("poppedLocalReturn.kt") public void testPoppedLocalReturn() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/poppedLocalReturn.kt"); } + @Test @TestMetadata("poppedLocalReturn2.kt") public void testPoppedLocalReturn2() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/poppedLocalReturn2.kt"); } + @Test @TestMetadata("returnLong.kt") public void testReturnLong() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/returnLong.kt"); } + @Test @TestMetadata("tryFinally.kt") public void testTryFinally() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/tryFinally.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/suspend") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Suspend extends AbstractFirBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - + public class Suspend { + @Test public void testAllFilesPresentInSuspend() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("capturedVariables.kt") public void testCapturedVariables() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/capturedVariables.kt"); } + @Test @TestMetadata("crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt") public void testCrossinlineSuspendLambdaInsideCrossinlineSuspendLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt"); } + @Test @TestMetadata("debugMetadataCrossinline.kt") public void testDebugMetadataCrossinline() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/debugMetadataCrossinline.kt"); } + @Test @TestMetadata("delegatedProperties.kt") public void testDelegatedProperties() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/delegatedProperties.kt"); } + @Test @TestMetadata("doubleRegenerationWithNonSuspendingLambda.kt") public void testDoubleRegenerationWithNonSuspendingLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/doubleRegenerationWithNonSuspendingLambda.kt"); } + @Test @TestMetadata("enclodingMethod.kt") public void testEnclodingMethod() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/enclodingMethod.kt"); } + @Test @TestMetadata("fileNameInMetadata.kt") public void testFileNameInMetadata() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/fileNameInMetadata.kt"); } + @Test @TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt") public void testInlineOrdinaryOfCrossinlineSuspend() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfCrossinlineSuspend.kt"); } + @Test @TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt") public void testInlineOrdinaryOfNoinlineSuspend() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfNoinlineSuspend.kt"); } + @Test @TestMetadata("inlineSuspendContinuation.kt") public void testInlineSuspendContinuation() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendContinuation.kt"); } + @Test @TestMetadata("inlineSuspendInMultifileClass.kt") public void testInlineSuspendInMultifileClass() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendInMultifileClass.kt"); } + @Test @TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt") public void testInlineSuspendOfCrossinlineOrdinary() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineOrdinary.kt"); } + @Test @TestMetadata("inlineSuspendOfCrossinlineSuspend.kt") public void testInlineSuspendOfCrossinlineSuspend() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineSuspend.kt"); } + @Test @TestMetadata("inlineSuspendOfNoinlineOrdinary.kt") public void testInlineSuspendOfNoinlineOrdinary() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineOrdinary.kt"); } + @Test @TestMetadata("inlineSuspendOfNoinlineSuspend.kt") public void testInlineSuspendOfNoinlineSuspend() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineSuspend.kt"); } + @Test @TestMetadata("inlineSuspendOfOrdinary.kt") public void testInlineSuspendOfOrdinary() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfOrdinary.kt"); } + @Test @TestMetadata("inlineSuspendOfSuspend.kt") public void testInlineSuspendOfSuspend() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfSuspend.kt"); } + @Test @TestMetadata("jvmName.kt") public void testJvmName() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/jvmName.kt"); } + @Test @TestMetadata("kt26658.kt") public void testKt26658() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/kt26658.kt"); } + @Test @TestMetadata("maxStackWithCrossinline.kt") public void testMaxStackWithCrossinline() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/maxStackWithCrossinline.kt"); } + @Test @TestMetadata("multipleLocals.kt") public void testMultipleLocals() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/multipleLocals.kt"); } + @Test @TestMetadata("multipleSuspensionPoints.kt") public void testMultipleSuspensionPoints() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/multipleSuspensionPoints.kt"); } + @Test @TestMetadata("nestedMethodWith2XParameter.kt") public void testNestedMethodWith2XParameter() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/nestedMethodWith2XParameter.kt"); } + @Test @TestMetadata("nonLocalReturn.kt") public void testNonLocalReturn() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/nonLocalReturn.kt"); } + @Test @TestMetadata("nonSuspendCrossinline.kt") public void testNonSuspendCrossinline() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/nonSuspendCrossinline.kt"); } + @Test @TestMetadata("returnValue.kt") public void testReturnValue() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/returnValue.kt"); } + @Test @TestMetadata("tryCatchReceiver.kt") public void testTryCatchReceiver() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/tryCatchReceiver.kt"); } + @Test @TestMetadata("tryCatchStackTransform.kt") public void testTryCatchStackTransform() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/tryCatchStackTransform.kt"); } + @Test @TestMetadata("twiceRegeneratedAnonymousObject.kt") public void testTwiceRegeneratedAnonymousObject() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/twiceRegeneratedAnonymousObject.kt"); } + @Test @TestMetadata("twiceRegeneratedSuspendLambda.kt") public void testTwiceRegeneratedSuspendLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/twiceRegeneratedSuspendLambda.kt"); } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/suspend/callableReference") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class CallableReference extends AbstractFirBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - + public class CallableReference { + @Test public void testAllFilesPresentInCallableReference() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/callableReference"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("isAsReified.kt") public void testIsAsReified() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/callableReference/isAsReified.kt"); } + @Test @TestMetadata("isAsReified2.kt") public void testIsAsReified2() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/callableReference/isAsReified2.kt"); } + @Test @TestMetadata("nonTailCall.kt") public void testNonTailCall() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/callableReference/nonTailCall.kt"); } + @Test @TestMetadata("simple.kt") public void testSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/callableReference/simple.kt"); } + @Test @TestMetadata("unitReturn.kt") public void testUnitReturn() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/callableReference/unitReturn.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/suspend/defaultParameter") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class DefaultParameter extends AbstractFirBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - + public class DefaultParameter { + @Test public void testAllFilesPresentInDefaultParameter() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/defaultParameter"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("defaultValueCrossinline.kt") public void testDefaultValueCrossinline() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueCrossinline.kt"); } + @Test @TestMetadata("defaultValueInClass.kt") public void testDefaultValueInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInClass.kt"); } + @Test @TestMetadata("defaultValueInline.kt") public void testDefaultValueInline() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInline.kt"); } + @Test @TestMetadata("defaultValueInlineFromMultiFileFacade.kt") public void testDefaultValueInlineFromMultiFileFacade() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInlineFromMultiFileFacade.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/suspend/inlineClass") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class InlineClass extends AbstractFirBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - + public class InlineClass { + @Test public void testAllFilesPresentInInlineClass() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/inlineClass"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("returnUnboxedDirect.kt") public void testReturnUnboxedDirect() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineClass/returnUnboxedDirect.kt"); } + @Test @TestMetadata("returnUnboxedResume.kt") public void testReturnUnboxedResume() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineClass/returnUnboxedResume.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/suspend/inlineUsedAsNoinline") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class InlineUsedAsNoinline extends AbstractFirBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - + public class InlineUsedAsNoinline { + @Test public void testAllFilesPresentInInlineUsedAsNoinline() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/inlineUsedAsNoinline"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("inlineOnly.kt") public void testInlineOnly() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineUsedAsNoinline/inlineOnly.kt"); } + @Test @TestMetadata("simpleNamed.kt") public void testSimpleNamed() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineUsedAsNoinline/simpleNamed.kt"); } + @Test @TestMetadata("withCapturedInlineLambda.kt") public void testWithCapturedInlineLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineUsedAsNoinline/withCapturedInlineLambda.kt"); } + @Test @TestMetadata("withCapturedInlineLambda2.kt") public void testWithCapturedInlineLambda2() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineUsedAsNoinline/withCapturedInlineLambda2.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/suspend/receiver") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Receiver extends AbstractFirBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - + public class Receiver { + @Test public void testAllFilesPresentInReceiver() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/receiver"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt") public void testInlineOrdinaryOfCrossinlineSuspend() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfCrossinlineSuspend.kt"); } + @Test @TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt") public void testInlineOrdinaryOfNoinlineSuspend() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfNoinlineSuspend.kt"); } + @Test @TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt") public void testInlineSuspendOfCrossinlineOrdinary() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineOrdinary.kt"); } + @Test @TestMetadata("inlineSuspendOfCrossinlineSuspend.kt") public void testInlineSuspendOfCrossinlineSuspend() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineSuspend.kt"); } + @Test @TestMetadata("inlineSuspendOfNoinlineOrdinary.kt") public void testInlineSuspendOfNoinlineOrdinary() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineOrdinary.kt"); } + @Test @TestMetadata("inlineSuspendOfNoinlineSuspend.kt") public void testInlineSuspendOfNoinlineSuspend() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineSuspend.kt"); } + @Test @TestMetadata("inlineSuspendOfOrdinary.kt") public void testInlineSuspendOfOrdinary() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfOrdinary.kt"); } + @Test @TestMetadata("inlineSuspendOfSuspend.kt") public void testInlineSuspendOfSuspend() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfSuspend.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class StateMachine extends AbstractFirBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - + public class StateMachine { + @Test public void testAllFilesPresentInStateMachine() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/stateMachine"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("crossingCoroutineBoundaries.kt") public void testCrossingCoroutineBoundaries() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/crossingCoroutineBoundaries.kt"); } + @Test @TestMetadata("independentInline.kt") public void testIndependentInline() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/independentInline.kt"); } + @Test @TestMetadata("innerLambda.kt") public void testInnerLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambda.kt"); } + @Test @TestMetadata("innerLambdaInsideLambda.kt") public void testInnerLambdaInsideLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaInsideLambda.kt"); } + @Test @TestMetadata("innerLambdaWithoutCrossinline.kt") public void testInnerLambdaWithoutCrossinline() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaWithoutCrossinline.kt"); } + @Test @TestMetadata("innerMadness.kt") public void testInnerMadness() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadness.kt"); } + @Test @TestMetadata("innerMadnessCallSite.kt") public void testInnerMadnessCallSite() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadnessCallSite.kt"); } + @Test @TestMetadata("innerObject.kt") public void testInnerObject() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObject.kt"); } + @Test @TestMetadata("innerObjectInsideInnerObject.kt") public void testInnerObjectInsideInnerObject() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectInsideInnerObject.kt"); } + @Test @TestMetadata("innerObjectRetransformation.kt") public void testInnerObjectRetransformation() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectRetransformation.kt"); } + @Test @TestMetadata("innerObjectSeveralFunctions.kt") public void testInnerObjectSeveralFunctions() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectSeveralFunctions.kt"); } + @Test @TestMetadata("innerObjectWithoutCapturingCrossinline.kt") public void testInnerObjectWithoutCapturingCrossinline() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectWithoutCapturingCrossinline.kt"); } + @Test @TestMetadata("insideObject.kt") public void testInsideObject() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/insideObject.kt"); } + @Test + @TestMetadata("kt30708.kt") + public void testKt30708() throws Exception { + runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/kt30708.kt"); + } + + @Test @TestMetadata("lambdaTransformation.kt") public void testLambdaTransformation() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/lambdaTransformation.kt"); } + @Test @TestMetadata("normalInline.kt") public void testNormalInline() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/normalInline.kt"); } + @Test @TestMetadata("numberOfSuspentions.kt") public void testNumberOfSuspentions() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/numberOfSuspentions.kt"); } + @Test @TestMetadata("objectInsideLambdas.kt") public void testObjectInsideLambdas() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/objectInsideLambdas.kt"); } + @Test @TestMetadata("oneInlineTwoCaptures.kt") public void testOneInlineTwoCaptures() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/oneInlineTwoCaptures.kt"); } + @Test @TestMetadata("passLambda.kt") public void testPassLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/passLambda.kt"); } + @Test @TestMetadata("passParameter.kt") public void testPassParameter() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/passParameter.kt"); } + @Test @TestMetadata("passParameterLambda.kt") public void testPassParameterLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/passParameterLambda.kt"); } + @Test @TestMetadata("unreachableSuspendMarker.kt") public void testUnreachableSuspendMarker() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/unreachableSuspendMarker.kt"); @@ -4459,110 +5105,121 @@ public class FirBlackBoxInlineCodegenTestGenerated extends AbstractFirBlackBoxIn } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/syntheticAccessors") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class SyntheticAccessors extends AbstractFirBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - + public class SyntheticAccessors { + @Test public void testAllFilesPresentInSyntheticAccessors() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/syntheticAccessors"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("constField.kt") public void testConstField() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/constField.kt"); } + @Test @TestMetadata("packagePrivateMembers.kt") public void testPackagePrivateMembers() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/packagePrivateMembers.kt"); } + @Test @TestMetadata("propertyModifiers.kt") public void testPropertyModifiers() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/propertyModifiers.kt"); } + @Test @TestMetadata("protectedMembers.kt") public void testProtectedMembers() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/protectedMembers.kt"); } + @Test @TestMetadata("protectedMembersFromSuper.kt") public void testProtectedMembersFromSuper() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/protectedMembersFromSuper.kt"); } + @Test @TestMetadata("superCall.kt") public void testSuperCall() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/superCall.kt"); } + @Test @TestMetadata("superCallFromMultipleSubclasses.kt") public void testSuperCallFromMultipleSubclasses() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/superCallFromMultipleSubclasses.kt"); } + @Test @TestMetadata("superProperty.kt") public void testSuperProperty() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/superProperty.kt"); } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class WithinInlineLambda extends AbstractFirBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - + public class WithinInlineLambda { + @Test public void testAllFilesPresentInWithinInlineLambda() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("directFieldAccess.kt") public void testDirectFieldAccess() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/directFieldAccess.kt"); } + @Test @TestMetadata("directFieldAccessInCrossInline.kt") public void testDirectFieldAccessInCrossInline() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/directFieldAccessInCrossInline.kt"); } + @Test @TestMetadata("privateCall.kt") public void testPrivateCall() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/privateCall.kt"); } + @Test @TestMetadata("privateInCrossInline.kt") public void testPrivateInCrossInline() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/privateInCrossInline.kt"); } + @Test @TestMetadata("privateInDefaultStubArgument.kt") public void testPrivateInDefaultStubArgument() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/privateInDefaultStubArgument.kt"); } + @Test @TestMetadata("protectedInCrossinline.kt") public void testProtectedInCrossinline() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/protectedInCrossinline.kt"); } + @Test @TestMetadata("protectedMembersFromSuper.kt") public void testProtectedMembersFromSuper() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/protectedMembersFromSuper.kt"); } + @Test @TestMetadata("superCall.kt") public void testSuperCall() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/superCall.kt"); } + @Test @TestMetadata("superInCrossInline.kt") public void testSuperInCrossInline() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/superInCrossInline.kt"); @@ -4570,79 +5227,78 @@ public class FirBlackBoxInlineCodegenTestGenerated extends AbstractFirBlackBoxIn } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/trait") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Trait extends AbstractFirBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - + public class Trait { + @Test public void testAllFilesPresentInTrait() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/trait"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("trait.kt") public void testTrait() throws Exception { runTest("compiler/testData/codegen/boxInline/trait/trait.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/tryCatchFinally") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class TryCatchFinally extends AbstractFirBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - + public class TryCatchFinally { + @Test public void testAllFilesPresentInTryCatchFinally() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/tryCatchFinally"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("kt5863.kt") public void testKt5863() throws Exception { runTest("compiler/testData/codegen/boxInline/tryCatchFinally/kt5863.kt"); } + @Test @TestMetadata("tryCatch.kt") public void testTryCatch() throws Exception { runTest("compiler/testData/codegen/boxInline/tryCatchFinally/tryCatch.kt"); } + @Test @TestMetadata("tryCatch2.kt") public void testTryCatch2() throws Exception { runTest("compiler/testData/codegen/boxInline/tryCatchFinally/tryCatch2.kt"); } + @Test @TestMetadata("tryCatchFinally.kt") public void testTryCatchFinally() throws Exception { runTest("compiler/testData/codegen/boxInline/tryCatchFinally/tryCatchFinally.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/varargs") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Varargs extends AbstractFirBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); - } - + public class Varargs { + @Test public void testAllFilesPresentInVarargs() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/varargs"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("kt17653.kt") public void testKt17653() throws Exception { runTest("compiler/testData/codegen/boxInline/varargs/kt17653.kt"); } + @Test @TestMetadata("varargAndDefaultParameters.kt") public void testVarargAndDefaultParameters() throws Exception { runTest("compiler/testData/codegen/boxInline/varargs/varargAndDefaultParameters.kt"); } + @Test @TestMetadata("varargAndDefaultParameters2.kt") public void testVarargAndDefaultParameters2() throws Exception { runTest("compiler/testData/codegen/boxInline/varargs/varargAndDefaultParameters2.kt"); diff --git a/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirBytecodeTextTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirBytecodeTextTestGenerated.java similarity index 97% rename from compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirBytecodeTextTestGenerated.java rename to compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirBytecodeTextTestGenerated.java index 115fc4cd7da..57a684cefb8 100644 --- a/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirBytecodeTextTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirBytecodeTextTestGenerated.java @@ -520,7 +520,7 @@ public class FirBytecodeTextTestGenerated extends AbstractFirBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/argumentOrder") @TestDataPath("$PROJECT_ROOT") - public class ArgumentOrder extends AbstractFirBytecodeTextTest { + public class ArgumentOrder { @Test public void testAllFilesPresentInArgumentOrder() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/argumentOrder"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -542,7 +542,7 @@ public class FirBytecodeTextTestGenerated extends AbstractFirBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/assert") @TestDataPath("$PROJECT_ROOT") - public class Assert extends AbstractFirBytecodeTextTest { + public class Assert { @Test public void testAllFilesPresentInAssert() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/assert"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -582,7 +582,7 @@ public class FirBytecodeTextTestGenerated extends AbstractFirBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/boxing") @TestDataPath("$PROJECT_ROOT") - public class Boxing extends AbstractFirBytecodeTextTest { + public class Boxing { @Test public void testAllFilesPresentInBoxing() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/boxing"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -610,7 +610,7 @@ public class FirBytecodeTextTestGenerated extends AbstractFirBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/boxingOptimization") @TestDataPath("$PROJECT_ROOT") - public class BoxingOptimization extends AbstractFirBytecodeTextTest { + public class BoxingOptimization { @Test public void testAllFilesPresentInBoxingOptimization() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/boxingOptimization"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -640,6 +640,12 @@ public class FirBytecodeTextTestGenerated extends AbstractFirBytecodeTextTest { runTest("compiler/testData/codegen/bytecodeText/boxingOptimization/fold.kt"); } + @Test + @TestMetadata("hashCodeOnNonNull.kt") + public void testHashCodeOnNonNull() throws Exception { + runTest("compiler/testData/codegen/bytecodeText/boxingOptimization/hashCodeOnNonNull.kt"); + } + @Test @TestMetadata("inlineClassesAndInlinedLambda.kt") public void testInlineClassesAndInlinedLambda() throws Exception { @@ -764,7 +770,7 @@ public class FirBytecodeTextTestGenerated extends AbstractFirBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/builtinFunctions") @TestDataPath("$PROJECT_ROOT") - public class BuiltinFunctions extends AbstractFirBytecodeTextTest { + public class BuiltinFunctions { @Test public void testAllFilesPresentInBuiltinFunctions() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/builtinFunctions"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -797,7 +803,7 @@ public class FirBytecodeTextTestGenerated extends AbstractFirBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/builtinFunctions/genericParameterBridge") @TestDataPath("$PROJECT_ROOT") - public class GenericParameterBridge extends AbstractFirBytecodeTextTest { + public class GenericParameterBridge { @Test @TestMetadata("abstractList.kt") public void testAbstractList() throws Exception { @@ -850,7 +856,7 @@ public class FirBytecodeTextTestGenerated extends AbstractFirBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/callableReference") @TestDataPath("$PROJECT_ROOT") - public class CallableReference extends AbstractFirBytecodeTextTest { + public class CallableReference { @Test public void testAllFilesPresentInCallableReference() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/callableReference"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -914,7 +920,7 @@ public class FirBytecodeTextTestGenerated extends AbstractFirBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/capturedVarsOptimization") @TestDataPath("$PROJECT_ROOT") - public class CapturedVarsOptimization extends AbstractFirBytecodeTextTest { + public class CapturedVarsOptimization { @Test public void testAllFilesPresentInCapturedVarsOptimization() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/capturedVarsOptimization"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -968,6 +974,12 @@ public class FirBytecodeTextTestGenerated extends AbstractFirBytecodeTextTest { runTest("compiler/testData/codegen/bytecodeText/capturedVarsOptimization/capturedVarsOfSize2.kt"); } + @Test + @TestMetadata("returnValueOfArrayConstructor.kt") + public void testReturnValueOfArrayConstructor() throws Exception { + runTest("compiler/testData/codegen/bytecodeText/capturedVarsOptimization/returnValueOfArrayConstructor.kt"); + } + @Test @TestMetadata("sharedSlotsWithCapturedVars.kt") public void testSharedSlotsWithCapturedVars() throws Exception { @@ -984,7 +996,7 @@ public class FirBytecodeTextTestGenerated extends AbstractFirBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/checkcast") @TestDataPath("$PROJECT_ROOT") - public class Checkcast extends AbstractFirBytecodeTextTest { + public class Checkcast { @Test public void testAllFilesPresentInCheckcast() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/checkcast"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -1018,7 +1030,7 @@ public class FirBytecodeTextTestGenerated extends AbstractFirBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/coercionToUnitOptimization") @TestDataPath("$PROJECT_ROOT") - public class CoercionToUnitOptimization extends AbstractFirBytecodeTextTest { + public class CoercionToUnitOptimization { @Test public void testAllFilesPresentInCoercionToUnitOptimization() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/coercionToUnitOptimization"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -1082,7 +1094,7 @@ public class FirBytecodeTextTestGenerated extends AbstractFirBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/companion") @TestDataPath("$PROJECT_ROOT") - public class Companion extends AbstractFirBytecodeTextTest { + public class Companion { @Test public void testAllFilesPresentInCompanion() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/companion"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -1176,7 +1188,7 @@ public class FirBytecodeTextTestGenerated extends AbstractFirBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/conditions") @TestDataPath("$PROJECT_ROOT") - public class Conditions extends AbstractFirBytecodeTextTest { + public class Conditions { @Test public void testAllFilesPresentInConditions() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/conditions"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -1354,7 +1366,7 @@ public class FirBytecodeTextTestGenerated extends AbstractFirBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/constProperty") @TestDataPath("$PROJECT_ROOT") - public class ConstProperty extends AbstractFirBytecodeTextTest { + public class ConstProperty { @Test public void testAllFilesPresentInConstProperty() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/constProperty"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -1394,7 +1406,7 @@ public class FirBytecodeTextTestGenerated extends AbstractFirBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/constantConditions") @TestDataPath("$PROJECT_ROOT") - public class ConstantConditions extends AbstractFirBytecodeTextTest { + public class ConstantConditions { @Test public void testAllFilesPresentInConstantConditions() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/constantConditions"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -1434,7 +1446,7 @@ public class FirBytecodeTextTestGenerated extends AbstractFirBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/constants") @TestDataPath("$PROJECT_ROOT") - public class Constants extends AbstractFirBytecodeTextTest { + public class Constants { @Test public void testAllFilesPresentInConstants() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/constants"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -1522,7 +1534,7 @@ public class FirBytecodeTextTestGenerated extends AbstractFirBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/constructors") @TestDataPath("$PROJECT_ROOT") - public class Constructors extends AbstractFirBytecodeTextTest { + public class Constructors { @Test public void testAllFilesPresentInConstructors() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/constructors"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -1586,7 +1598,7 @@ public class FirBytecodeTextTestGenerated extends AbstractFirBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/controlStructures") @TestDataPath("$PROJECT_ROOT") - public class ControlStructures extends AbstractFirBytecodeTextTest { + public class ControlStructures { @Test public void testAllFilesPresentInControlStructures() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/controlStructures"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -1608,7 +1620,7 @@ public class FirBytecodeTextTestGenerated extends AbstractFirBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/coroutines") @TestDataPath("$PROJECT_ROOT") - public class Coroutines extends AbstractFirBytecodeTextTest { + public class Coroutines { @Test public void testAllFilesPresentInCoroutines() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/coroutines"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -1683,7 +1695,7 @@ public class FirBytecodeTextTestGenerated extends AbstractFirBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/coroutines/cleanup") @TestDataPath("$PROJECT_ROOT") - public class Cleanup extends AbstractFirBytecodeTextTest { + public class Cleanup { @Test public void testAllFilesPresentInCleanup() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/coroutines/cleanup"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -1741,7 +1753,7 @@ public class FirBytecodeTextTestGenerated extends AbstractFirBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/coroutines/debug") @TestDataPath("$PROJECT_ROOT") - public class Debug extends AbstractFirBytecodeTextTest { + public class Debug { @Test public void testAllFilesPresentInDebug() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/coroutines/debug"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -1781,7 +1793,7 @@ public class FirBytecodeTextTestGenerated extends AbstractFirBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/coroutines/destructuringInLambda") @TestDataPath("$PROJECT_ROOT") - public class DestructuringInLambda extends AbstractFirBytecodeTextTest { + public class DestructuringInLambda { @Test public void testAllFilesPresentInDestructuringInLambda() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/coroutines/destructuringInLambda"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -1797,7 +1809,7 @@ public class FirBytecodeTextTestGenerated extends AbstractFirBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/coroutines/inlineClasses") @TestDataPath("$PROJECT_ROOT") - public class InlineClasses extends AbstractFirBytecodeTextTest { + public class InlineClasses { @Test public void testAllFilesPresentInInlineClasses() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/coroutines/inlineClasses"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -1849,7 +1861,7 @@ public class FirBytecodeTextTestGenerated extends AbstractFirBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling") @TestDataPath("$PROJECT_ROOT") - public class IntLikeVarSpilling extends AbstractFirBytecodeTextTest { + public class IntLikeVarSpilling { @Test public void testAllFilesPresentInIntLikeVarSpilling() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -1919,7 +1931,7 @@ public class FirBytecodeTextTestGenerated extends AbstractFirBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/coroutines/stateMachine") @TestDataPath("$PROJECT_ROOT") - public class StateMachine extends AbstractFirBytecodeTextTest { + public class StateMachine { @Test public void testAllFilesPresentInStateMachine() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/coroutines/stateMachine"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -1942,7 +1954,7 @@ public class FirBytecodeTextTestGenerated extends AbstractFirBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/deadCodeElimination") @TestDataPath("$PROJECT_ROOT") - public class DeadCodeElimination extends AbstractFirBytecodeTextTest { + public class DeadCodeElimination { @Test public void testAllFilesPresentInDeadCodeElimination() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/deadCodeElimination"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -2018,7 +2030,7 @@ public class FirBytecodeTextTestGenerated extends AbstractFirBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/defaultArguments") @TestDataPath("$PROJECT_ROOT") - public class DefaultArguments extends AbstractFirBytecodeTextTest { + public class DefaultArguments { @Test public void testAllFilesPresentInDefaultArguments() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/defaultArguments"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -2088,7 +2100,7 @@ public class FirBytecodeTextTestGenerated extends AbstractFirBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/directInvoke") @TestDataPath("$PROJECT_ROOT") - public class DirectInvoke extends AbstractFirBytecodeTextTest { + public class DirectInvoke { @Test public void testAllFilesPresentInDirectInvoke() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/directInvoke"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -2116,7 +2128,7 @@ public class FirBytecodeTextTestGenerated extends AbstractFirBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/disabledOptimizations") @TestDataPath("$PROJECT_ROOT") - public class DisabledOptimizations extends AbstractFirBytecodeTextTest { + public class DisabledOptimizations { @Test public void testAllFilesPresentInDisabledOptimizations() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/disabledOptimizations"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -2162,7 +2174,7 @@ public class FirBytecodeTextTestGenerated extends AbstractFirBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/enum") @TestDataPath("$PROJECT_ROOT") - public class Enum extends AbstractFirBytecodeTextTest { + public class Enum { @Test public void testAllFilesPresentInEnum() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/enum"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -2196,7 +2208,7 @@ public class FirBytecodeTextTestGenerated extends AbstractFirBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/exclExcl") @TestDataPath("$PROJECT_ROOT") - public class ExclExcl extends AbstractFirBytecodeTextTest { + public class ExclExcl { @Test public void testAllFilesPresentInExclExcl() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/exclExcl"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -2212,7 +2224,7 @@ public class FirBytecodeTextTestGenerated extends AbstractFirBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/fieldsForCapturedValues") @TestDataPath("$PROJECT_ROOT") - public class FieldsForCapturedValues extends AbstractFirBytecodeTextTest { + public class FieldsForCapturedValues { @Test public void testAllFilesPresentInFieldsForCapturedValues() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/fieldsForCapturedValues"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -2276,7 +2288,7 @@ public class FirBytecodeTextTestGenerated extends AbstractFirBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/forLoop") @TestDataPath("$PROJECT_ROOT") - public class ForLoop extends AbstractFirBytecodeTextTest { + public class ForLoop { @Test public void testAllFilesPresentInForLoop() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/forLoop"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -2435,7 +2447,7 @@ public class FirBytecodeTextTestGenerated extends AbstractFirBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/forLoop/forInArrayWithIndex") @TestDataPath("$PROJECT_ROOT") - public class ForInArrayWithIndex extends AbstractFirBytecodeTextTest { + public class ForInArrayWithIndex { @Test public void testAllFilesPresentInForInArrayWithIndex() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/forLoop/forInArrayWithIndex"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -2475,7 +2487,7 @@ public class FirBytecodeTextTestGenerated extends AbstractFirBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/forLoop/forInCharSequenceWithIndex") @TestDataPath("$PROJECT_ROOT") - public class ForInCharSequenceWithIndex extends AbstractFirBytecodeTextTest { + public class ForInCharSequenceWithIndex { @Test public void testAllFilesPresentInForInCharSequenceWithIndex() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/forLoop/forInCharSequenceWithIndex"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -2521,7 +2533,7 @@ public class FirBytecodeTextTestGenerated extends AbstractFirBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/forLoop/forInIndices") @TestDataPath("$PROJECT_ROOT") - public class ForInIndices extends AbstractFirBytecodeTextTest { + public class ForInIndices { @Test public void testAllFilesPresentInForInIndices() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/forLoop/forInIndices"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -2585,7 +2597,7 @@ public class FirBytecodeTextTestGenerated extends AbstractFirBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/forLoop/forInIterableWithIndex") @TestDataPath("$PROJECT_ROOT") - public class ForInIterableWithIndex extends AbstractFirBytecodeTextTest { + public class ForInIterableWithIndex { @Test public void testAllFilesPresentInForInIterableWithIndex() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/forLoop/forInIterableWithIndex"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -2631,7 +2643,7 @@ public class FirBytecodeTextTestGenerated extends AbstractFirBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/forLoop/forInProgressionWithIndex") @TestDataPath("$PROJECT_ROOT") - public class ForInProgressionWithIndex extends AbstractFirBytecodeTextTest { + public class ForInProgressionWithIndex { @Test public void testAllFilesPresentInForInProgressionWithIndex() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/forLoop/forInProgressionWithIndex"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -2713,7 +2725,7 @@ public class FirBytecodeTextTestGenerated extends AbstractFirBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/forLoop/forInReversed") @TestDataPath("$PROJECT_ROOT") - public class ForInReversed extends AbstractFirBytecodeTextTest { + public class ForInReversed { @Test public void testAllFilesPresentInForInReversed() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/forLoop/forInReversed"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -2801,7 +2813,7 @@ public class FirBytecodeTextTestGenerated extends AbstractFirBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/forLoop/forInSequenceWithIndex") @TestDataPath("$PROJECT_ROOT") - public class ForInSequenceWithIndex extends AbstractFirBytecodeTextTest { + public class ForInSequenceWithIndex { @Test public void testAllFilesPresentInForInSequenceWithIndex() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/forLoop/forInSequenceWithIndex"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -2853,7 +2865,7 @@ public class FirBytecodeTextTestGenerated extends AbstractFirBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/forLoop/forInUntil") @TestDataPath("$PROJECT_ROOT") - public class ForInUntil extends AbstractFirBytecodeTextTest { + public class ForInUntil { @Test public void testAllFilesPresentInForInUntil() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/forLoop/forInUntil"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -2917,7 +2929,7 @@ public class FirBytecodeTextTestGenerated extends AbstractFirBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/forLoop/stepped") @TestDataPath("$PROJECT_ROOT") - public class Stepped extends AbstractFirBytecodeTextTest { + public class Stepped { @Test public void testAllFilesPresentInStepped() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/forLoop/stepped"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -3011,7 +3023,7 @@ public class FirBytecodeTextTestGenerated extends AbstractFirBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/forLoop/unsigned") @TestDataPath("$PROJECT_ROOT") - public class Unsigned extends AbstractFirBytecodeTextTest { + public class Unsigned { @Test public void testAllFilesPresentInUnsigned() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/forLoop/unsigned"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -3112,16 +3124,16 @@ public class FirBytecodeTextTestGenerated extends AbstractFirBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/hashCode") @TestDataPath("$PROJECT_ROOT") - public class HashCode extends AbstractFirBytecodeTextTest { + public class HashCode { @Test public void testAllFilesPresentInHashCode() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/hashCode"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } @Test - @TestMetadata("hashCode.kt") - public void testHashCode() throws Exception { - runTest("compiler/testData/codegen/bytecodeText/hashCode/hashCode.kt"); + @TestMetadata("hashCode_1_6.kt") + public void testHashCode_1_6() throws Exception { + runTest("compiler/testData/codegen/bytecodeText/hashCode/hashCode_1_6.kt"); } @Test @@ -3134,7 +3146,7 @@ public class FirBytecodeTextTestGenerated extends AbstractFirBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/ieee754") @TestDataPath("$PROJECT_ROOT") - public class Ieee754 extends AbstractFirBytecodeTextTest { + public class Ieee754 { @Test public void testAllFilesPresentInIeee754() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/ieee754"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -3192,7 +3204,7 @@ public class FirBytecodeTextTestGenerated extends AbstractFirBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/inline") @TestDataPath("$PROJECT_ROOT") - public class Inline extends AbstractFirBytecodeTextTest { + public class Inline { @Test public void testAllFilesPresentInInline() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/inline"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -3315,7 +3327,7 @@ public class FirBytecodeTextTestGenerated extends AbstractFirBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/inline/property") @TestDataPath("$PROJECT_ROOT") - public class Property extends AbstractFirBytecodeTextTest { + public class Property { @Test public void testAllFilesPresentInProperty() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/inline/property"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -3332,7 +3344,7 @@ public class FirBytecodeTextTestGenerated extends AbstractFirBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/inlineClasses") @TestDataPath("$PROJECT_ROOT") - public class InlineClasses extends AbstractFirBytecodeTextTest { + public class InlineClasses { @Test public void testAllFilesPresentInInlineClasses() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/inlineClasses"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -3744,7 +3756,7 @@ public class FirBytecodeTextTestGenerated extends AbstractFirBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/innerClasses") @TestDataPath("$PROJECT_ROOT") - public class InnerClasses extends AbstractFirBytecodeTextTest { + public class InnerClasses { @Test public void testAllFilesPresentInInnerClasses() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/innerClasses"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -3760,7 +3772,7 @@ public class FirBytecodeTextTestGenerated extends AbstractFirBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/interfaces") @TestDataPath("$PROJECT_ROOT") - public class Interfaces extends AbstractFirBytecodeTextTest { + public class Interfaces { @Test @TestMetadata("addedInterfaceBridge.kt") public void testAddedInterfaceBridge() throws Exception { @@ -3800,7 +3812,7 @@ public class FirBytecodeTextTestGenerated extends AbstractFirBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/intrinsics") @TestDataPath("$PROJECT_ROOT") - public class Intrinsics extends AbstractFirBytecodeTextTest { + public class Intrinsics { @Test public void testAllFilesPresentInIntrinsics() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/intrinsics"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -3822,7 +3834,7 @@ public class FirBytecodeTextTestGenerated extends AbstractFirBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/intrinsicsCompare") @TestDataPath("$PROJECT_ROOT") - public class IntrinsicsCompare extends AbstractFirBytecodeTextTest { + public class IntrinsicsCompare { @Test public void testAllFilesPresentInIntrinsicsCompare() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/intrinsicsCompare"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -3892,7 +3904,7 @@ public class FirBytecodeTextTestGenerated extends AbstractFirBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/intrinsicsTrim") @TestDataPath("$PROJECT_ROOT") - public class IntrinsicsTrim extends AbstractFirBytecodeTextTest { + public class IntrinsicsTrim { @Test public void testAllFilesPresentInIntrinsicsTrim() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/intrinsicsTrim"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -3926,12 +3938,18 @@ public class FirBytecodeTextTestGenerated extends AbstractFirBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/invokedynamic") @TestDataPath("$PROJECT_ROOT") - public class Invokedynamic extends AbstractFirBytecodeTextTest { + public class Invokedynamic { @Test public void testAllFilesPresentInInvokedynamic() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/invokedynamic"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test + @TestMetadata("lambdas.kt") + public void testLambdas() throws Exception { + runTest("compiler/testData/codegen/bytecodeText/invokedynamic/lambdas.kt"); + } + @Test @TestMetadata("streamApi.kt") public void testStreamApi() throws Exception { @@ -3942,7 +3960,7 @@ public class FirBytecodeTextTestGenerated extends AbstractFirBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/jvm8") @TestDataPath("$PROJECT_ROOT") - public class Jvm8 extends AbstractFirBytecodeTextTest { + public class Jvm8 { @Test public void testAllFilesPresentInJvm8() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/jvm8"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -3951,7 +3969,7 @@ public class FirBytecodeTextTestGenerated extends AbstractFirBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/jvm8/hashCode") @TestDataPath("$PROJECT_ROOT") - public class HashCode extends AbstractFirBytecodeTextTest { + public class HashCode { @Test public void testAllFilesPresentInHashCode() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/jvm8/hashCode"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -3973,7 +3991,7 @@ public class FirBytecodeTextTestGenerated extends AbstractFirBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/jvm8/jvmDefault") @TestDataPath("$PROJECT_ROOT") - public class JvmDefault extends AbstractFirBytecodeTextTest { + public class JvmDefault { @Test public void testAllFilesPresentInJvmDefault() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/jvm8/jvmDefault"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -3982,7 +4000,7 @@ public class FirBytecodeTextTestGenerated extends AbstractFirBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/jvm8/jvmDefault/allCompatibility") @TestDataPath("$PROJECT_ROOT") - public class AllCompatibility extends AbstractFirBytecodeTextTest { + public class AllCompatibility { @Test public void testAllFilesPresentInAllCompatibility() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/jvm8/jvmDefault/allCompatibility"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -4022,7 +4040,7 @@ public class FirBytecodeTextTestGenerated extends AbstractFirBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/jvm8/jvmDefault/compatibility") @TestDataPath("$PROJECT_ROOT") - public class Compatibility extends AbstractFirBytecodeTextTest { + public class Compatibility { @Test public void testAllFilesPresentInCompatibility() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/jvm8/jvmDefault/compatibility"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -4064,7 +4082,7 @@ public class FirBytecodeTextTestGenerated extends AbstractFirBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/lazyCodegen") @TestDataPath("$PROJECT_ROOT") - public class LazyCodegen extends AbstractFirBytecodeTextTest { + public class LazyCodegen { @Test public void testAllFilesPresentInLazyCodegen() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/lazyCodegen"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -4116,7 +4134,7 @@ public class FirBytecodeTextTestGenerated extends AbstractFirBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/lineNumbers") @TestDataPath("$PROJECT_ROOT") - public class LineNumbers extends AbstractFirBytecodeTextTest { + public class LineNumbers { @Test public void testAllFilesPresentInLineNumbers() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/lineNumbers"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -4198,7 +4216,7 @@ public class FirBytecodeTextTestGenerated extends AbstractFirBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/localInitializationLVT") @TestDataPath("$PROJECT_ROOT") - public class LocalInitializationLVT extends AbstractFirBytecodeTextTest { + public class LocalInitializationLVT { @Test public void testAllFilesPresentInLocalInitializationLVT() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/localInitializationLVT"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -4322,7 +4340,7 @@ public class FirBytecodeTextTestGenerated extends AbstractFirBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/mangling") @TestDataPath("$PROJECT_ROOT") - public class Mangling extends AbstractFirBytecodeTextTest { + public class Mangling { @Test public void testAllFilesPresentInMangling() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/mangling"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -4344,7 +4362,7 @@ public class FirBytecodeTextTestGenerated extends AbstractFirBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/multifileClasses") @TestDataPath("$PROJECT_ROOT") - public class MultifileClasses extends AbstractFirBytecodeTextTest { + public class MultifileClasses { @Test public void testAllFilesPresentInMultifileClasses() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/multifileClasses"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -4372,7 +4390,7 @@ public class FirBytecodeTextTestGenerated extends AbstractFirBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/notNullAssertions") @TestDataPath("$PROJECT_ROOT") - public class NotNullAssertions extends AbstractFirBytecodeTextTest { + public class NotNullAssertions { @Test public void testAllFilesPresentInNotNullAssertions() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/notNullAssertions"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -4448,7 +4466,7 @@ public class FirBytecodeTextTestGenerated extends AbstractFirBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/nullCheckOptimization") @TestDataPath("$PROJECT_ROOT") - public class NullCheckOptimization extends AbstractFirBytecodeTextTest { + public class NullCheckOptimization { @Test public void testAllFilesPresentInNullCheckOptimization() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/nullCheckOptimization"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -4526,6 +4544,12 @@ public class FirBytecodeTextTestGenerated extends AbstractFirBytecodeTextTest { runTest("compiler/testData/codegen/bytecodeText/nullCheckOptimization/multipleExclExcl_1_4.kt"); } + @Test + @TestMetadata("noNullCheckAfterCast.kt") + public void testNoNullCheckAfterCast() throws Exception { + runTest("compiler/testData/codegen/bytecodeText/nullCheckOptimization/noNullCheckAfterCast.kt"); + } + @Test @TestMetadata("notNullAsNotNullable.kt") public void testNotNullAsNotNullable() throws Exception { @@ -4589,7 +4613,7 @@ public class FirBytecodeTextTestGenerated extends AbstractFirBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/nullCheckOptimization/localLateinit") @TestDataPath("$PROJECT_ROOT") - public class LocalLateinit extends AbstractFirBytecodeTextTest { + public class LocalLateinit { @Test public void testAllFilesPresentInLocalLateinit() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/nullCheckOptimization/localLateinit"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -4618,7 +4642,7 @@ public class FirBytecodeTextTestGenerated extends AbstractFirBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/optimizedDelegatedProperties") @TestDataPath("$PROJECT_ROOT") - public class OptimizedDelegatedProperties extends AbstractFirBytecodeTextTest { + public class OptimizedDelegatedProperties { @Test public void testAllFilesPresentInOptimizedDelegatedProperties() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/optimizedDelegatedProperties"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -4652,7 +4676,7 @@ public class FirBytecodeTextTestGenerated extends AbstractFirBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/parameterlessMain") @TestDataPath("$PROJECT_ROOT") - public class ParameterlessMain extends AbstractFirBytecodeTextTest { + public class ParameterlessMain { @Test public void testAllFilesPresentInParameterlessMain() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/parameterlessMain"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -4704,7 +4728,7 @@ public class FirBytecodeTextTestGenerated extends AbstractFirBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/properties") @TestDataPath("$PROJECT_ROOT") - public class Properties extends AbstractFirBytecodeTextTest { + public class Properties { @Test public void testAllFilesPresentInProperties() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/properties"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -4725,7 +4749,7 @@ public class FirBytecodeTextTestGenerated extends AbstractFirBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/properties/lateinit") @TestDataPath("$PROJECT_ROOT") - public class Lateinit extends AbstractFirBytecodeTextTest { + public class Lateinit { @Test public void testAllFilesPresentInLateinit() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/properties/lateinit"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -4748,7 +4772,7 @@ public class FirBytecodeTextTestGenerated extends AbstractFirBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/ranges") @TestDataPath("$PROJECT_ROOT") - public class Ranges extends AbstractFirBytecodeTextTest { + public class Ranges { @Test public void testAllFilesPresentInRanges() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/ranges"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -4830,7 +4854,7 @@ public class FirBytecodeTextTestGenerated extends AbstractFirBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/sam") @TestDataPath("$PROJECT_ROOT") - public class Sam extends AbstractFirBytecodeTextTest { + public class Sam { @Test public void testAllFilesPresentInSam() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/sam"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -4876,7 +4900,7 @@ public class FirBytecodeTextTestGenerated extends AbstractFirBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/statements") @TestDataPath("$PROJECT_ROOT") - public class Statements extends AbstractFirBytecodeTextTest { + public class Statements { @Test public void testAllFilesPresentInStatements() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/statements"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -4934,7 +4958,7 @@ public class FirBytecodeTextTestGenerated extends AbstractFirBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/staticFields") @TestDataPath("$PROJECT_ROOT") - public class StaticFields extends AbstractFirBytecodeTextTest { + public class StaticFields { @Test public void testAllFilesPresentInStaticFields() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/staticFields"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -4956,7 +4980,7 @@ public class FirBytecodeTextTestGenerated extends AbstractFirBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/storeStackBeforeInline") @TestDataPath("$PROJECT_ROOT") - public class StoreStackBeforeInline extends AbstractFirBytecodeTextTest { + public class StoreStackBeforeInline { @Test public void testAllFilesPresentInStoreStackBeforeInline() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/storeStackBeforeInline"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -4996,7 +5020,7 @@ public class FirBytecodeTextTestGenerated extends AbstractFirBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/stringOperations") @TestDataPath("$PROJECT_ROOT") - public class StringOperations extends AbstractFirBytecodeTextTest { + public class StringOperations { @Test public void testAllFilesPresentInStringOperations() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/stringOperations"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -5198,7 +5222,7 @@ public class FirBytecodeTextTestGenerated extends AbstractFirBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/toArray") @TestDataPath("$PROJECT_ROOT") - public class ToArray extends AbstractFirBytecodeTextTest { + public class ToArray { @Test public void testAllFilesPresentInToArray() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/toArray"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -5214,7 +5238,7 @@ public class FirBytecodeTextTestGenerated extends AbstractFirBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/unsignedTypes") @TestDataPath("$PROJECT_ROOT") - public class UnsignedTypes extends AbstractFirBytecodeTextTest { + public class UnsignedTypes { @Test public void testAllFilesPresentInUnsignedTypes() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/unsignedTypes"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -5290,7 +5314,7 @@ public class FirBytecodeTextTestGenerated extends AbstractFirBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/varargs") @TestDataPath("$PROJECT_ROOT") - public class Varargs extends AbstractFirBytecodeTextTest { + public class Varargs { @Test public void testAllFilesPresentInVarargs() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/varargs"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -5306,7 +5330,7 @@ public class FirBytecodeTextTestGenerated extends AbstractFirBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/when") @TestDataPath("$PROJECT_ROOT") - public class When extends AbstractFirBytecodeTextTest { + public class When { @Test public void testAllFilesPresentInWhen() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/when"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -5466,7 +5490,7 @@ public class FirBytecodeTextTestGenerated extends AbstractFirBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/whenEnumOptimization") @TestDataPath("$PROJECT_ROOT") - public class WhenEnumOptimization extends AbstractFirBytecodeTextTest { + public class WhenEnumOptimization { @Test public void testAllFilesPresentInWhenEnumOptimization() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/whenEnumOptimization"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -5560,7 +5584,7 @@ public class FirBytecodeTextTestGenerated extends AbstractFirBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/whenStringOptimization") @TestDataPath("$PROJECT_ROOT") - public class WhenStringOptimization extends AbstractFirBytecodeTextTest { + public class WhenStringOptimization { @Test public void testAllFilesPresentInWhenStringOptimization() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/whenStringOptimization"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); diff --git a/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/ir/Fir2IrTextTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/ir/Fir2IrTextTestGenerated.java similarity index 98% rename from compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/ir/Fir2IrTextTestGenerated.java rename to compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/ir/Fir2IrTextTestGenerated.java index dbaaff4546e..03704c65aac 100644 --- a/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/ir/Fir2IrTextTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/ir/Fir2IrTextTestGenerated.java @@ -28,7 +28,7 @@ public class Fir2IrTextTestGenerated extends AbstractFir2IrTextTest { @Nested @TestMetadata("compiler/testData/ir/irText/classes") @TestDataPath("$PROJECT_ROOT") - public class Classes extends AbstractFir2IrTextTest { + public class Classes { @Test @TestMetadata("abstractMembers.kt") public void testAbstractMembers() throws Exception { @@ -326,7 +326,7 @@ public class Fir2IrTextTestGenerated extends AbstractFir2IrTextTest { @Nested @TestMetadata("compiler/testData/ir/irText/declarations") @TestDataPath("$PROJECT_ROOT") - public class Declarations extends AbstractFir2IrTextTest { + public class Declarations { @Test public void testAllFilesPresentInDeclarations() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/declarations"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -473,7 +473,7 @@ public class Fir2IrTextTestGenerated extends AbstractFir2IrTextTest { @Nested @TestMetadata("compiler/testData/ir/irText/declarations/annotations") @TestDataPath("$PROJECT_ROOT") - public class Annotations extends AbstractFir2IrTextTest { + public class Annotations { @Test public void testAllFilesPresentInAnnotations() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/declarations/annotations"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -675,7 +675,7 @@ public class Fir2IrTextTestGenerated extends AbstractFir2IrTextTest { @Nested @TestMetadata("compiler/testData/ir/irText/declarations/multiplatform") @TestDataPath("$PROJECT_ROOT") - public class Multiplatform extends AbstractFir2IrTextTest { + public class Multiplatform { @Test public void testAllFilesPresentInMultiplatform() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/declarations/multiplatform"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -703,7 +703,7 @@ public class Fir2IrTextTestGenerated extends AbstractFir2IrTextTest { @Nested @TestMetadata("compiler/testData/ir/irText/declarations/parameters") @TestDataPath("$PROJECT_ROOT") - public class Parameters extends AbstractFir2IrTextTest { + public class Parameters { @Test public void testAllFilesPresentInParameters() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/declarations/parameters"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -791,7 +791,7 @@ public class Fir2IrTextTestGenerated extends AbstractFir2IrTextTest { @Nested @TestMetadata("compiler/testData/ir/irText/declarations/provideDelegate") @TestDataPath("$PROJECT_ROOT") - public class ProvideDelegate extends AbstractFir2IrTextTest { + public class ProvideDelegate { @Test public void testAllFilesPresentInProvideDelegate() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/declarations/provideDelegate"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -838,7 +838,7 @@ public class Fir2IrTextTestGenerated extends AbstractFir2IrTextTest { @Nested @TestMetadata("compiler/testData/ir/irText/errors") @TestDataPath("$PROJECT_ROOT") - public class Errors extends AbstractFir2IrTextTest { + public class Errors { @Test public void testAllFilesPresentInErrors() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/errors"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -860,7 +860,7 @@ public class Fir2IrTextTestGenerated extends AbstractFir2IrTextTest { @Nested @TestMetadata("compiler/testData/ir/irText/expressions") @TestDataPath("$PROJECT_ROOT") - public class Expressions extends AbstractFir2IrTextTest { + public class Expressions { @Test public void testAllFilesPresentInExpressions() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/expressions"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -1721,7 +1721,7 @@ public class Fir2IrTextTestGenerated extends AbstractFir2IrTextTest { @Nested @TestMetadata("compiler/testData/ir/irText/expressions/callableReferences") @TestDataPath("$PROJECT_ROOT") - public class CallableReferences extends AbstractFir2IrTextTest { + public class CallableReferences { @Test @TestMetadata("adaptedExtensionFunctions.kt") public void testAdaptedExtensionFunctions() throws Exception { @@ -1839,7 +1839,7 @@ public class Fir2IrTextTestGenerated extends AbstractFir2IrTextTest { @Nested @TestMetadata("compiler/testData/ir/irText/expressions/floatingPointComparisons") @TestDataPath("$PROJECT_ROOT") - public class FloatingPointComparisons extends AbstractFir2IrTextTest { + public class FloatingPointComparisons { @Test public void testAllFilesPresentInFloatingPointComparisons() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/expressions/floatingPointComparisons"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -1915,7 +1915,7 @@ public class Fir2IrTextTestGenerated extends AbstractFir2IrTextTest { @Nested @TestMetadata("compiler/testData/ir/irText/expressions/funInterface") @TestDataPath("$PROJECT_ROOT") - public class FunInterface extends AbstractFir2IrTextTest { + public class FunInterface { @Test public void testAllFilesPresentInFunInterface() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/expressions/funInterface"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -1973,7 +1973,7 @@ public class Fir2IrTextTestGenerated extends AbstractFir2IrTextTest { @Nested @TestMetadata("compiler/testData/ir/irText/expressions/sam") @TestDataPath("$PROJECT_ROOT") - public class Sam extends AbstractFir2IrTextTest { + public class Sam { @Test public void testAllFilesPresentInSam() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/expressions/sam"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -2050,7 +2050,7 @@ public class Fir2IrTextTestGenerated extends AbstractFir2IrTextTest { @Nested @TestMetadata("compiler/testData/ir/irText/firProblems") @TestDataPath("$PROJECT_ROOT") - public class FirProblems extends AbstractFir2IrTextTest { + public class FirProblems { @Test @TestMetadata("AbstractMutableMap.kt") public void testAbstractMutableMap() throws Exception { @@ -2240,7 +2240,7 @@ public class Fir2IrTextTestGenerated extends AbstractFir2IrTextTest { @Nested @TestMetadata("compiler/testData/ir/irText/lambdas") @TestDataPath("$PROJECT_ROOT") - public class Lambdas extends AbstractFir2IrTextTest { + public class Lambdas { @Test public void testAllFilesPresentInLambdas() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/lambdas"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -2298,7 +2298,7 @@ public class Fir2IrTextTestGenerated extends AbstractFir2IrTextTest { @Nested @TestMetadata("compiler/testData/ir/irText/regressions") @TestDataPath("$PROJECT_ROOT") - public class Regressions extends AbstractFir2IrTextTest { + public class Regressions { @Test public void testAllFilesPresentInRegressions() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/regressions"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -2337,7 +2337,7 @@ public class Fir2IrTextTestGenerated extends AbstractFir2IrTextTest { @Nested @TestMetadata("compiler/testData/ir/irText/regressions/newInference") @TestDataPath("$PROJECT_ROOT") - public class NewInference extends AbstractFir2IrTextTest { + public class NewInference { @Test public void testAllFilesPresentInNewInference() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/regressions/newInference"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -2354,7 +2354,7 @@ public class Fir2IrTextTestGenerated extends AbstractFir2IrTextTest { @Nested @TestMetadata("compiler/testData/ir/irText/singletons") @TestDataPath("$PROJECT_ROOT") - public class Singletons extends AbstractFir2IrTextTest { + public class Singletons { @Test public void testAllFilesPresentInSingletons() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/singletons"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -2382,7 +2382,7 @@ public class Fir2IrTextTestGenerated extends AbstractFir2IrTextTest { @Nested @TestMetadata("compiler/testData/ir/irText/stubs") @TestDataPath("$PROJECT_ROOT") - public class Stubs extends AbstractFir2IrTextTest { + public class Stubs { @Test public void testAllFilesPresentInStubs() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/stubs"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -2470,7 +2470,7 @@ public class Fir2IrTextTestGenerated extends AbstractFir2IrTextTest { @Nested @TestMetadata("compiler/testData/ir/irText/types") @TestDataPath("$PROJECT_ROOT") - public class Types extends AbstractFir2IrTextTest { + public class Types { @Test @TestMetadata("abbreviatedTypes.kt") public void testAbbreviatedTypes() throws Exception { @@ -2623,7 +2623,7 @@ public class Fir2IrTextTestGenerated extends AbstractFir2IrTextTest { @Nested @TestMetadata("compiler/testData/ir/irText/types/nullChecks") @TestDataPath("$PROJECT_ROOT") - public class NullChecks extends AbstractFir2IrTextTest { + public class NullChecks { @Test public void testAllFilesPresentInNullChecks() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/types/nullChecks"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -2674,7 +2674,7 @@ public class Fir2IrTextTestGenerated extends AbstractFir2IrTextTest { @Nested @TestMetadata("compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult") @TestDataPath("$PROJECT_ROOT") - public class NullCheckOnLambdaResult extends AbstractFir2IrTextTest { + public class NullCheckOnLambdaResult { @Test public void testAllFilesPresentInNullCheckOnLambdaResult() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); diff --git a/compiler/fir/java/src/org/jetbrains/kotlin/fir/java/JavaSymbolProvider.kt b/compiler/fir/java/src/org/jetbrains/kotlin/fir/java/JavaSymbolProvider.kt index cbeb0969e5a..8251fc7d84b 100644 --- a/compiler/fir/java/src/org/jetbrains/kotlin/fir/java/JavaSymbolProvider.kt +++ b/compiler/fir/java/src/org/jetbrains/kotlin/fir/java/JavaSymbolProvider.kt @@ -309,7 +309,12 @@ class JavaSymbolProvider( } if (classIsAnnotation) { declarations += - buildConstructorForAnnotationClass(constructorId, this, valueParametersForAnnotationConstructor) + buildConstructorForAnnotationClass( + classSource = (javaClass as? JavaElementImpl<*>)?.psi?.toFirPsiSourceElement(FirFakeSourceElementKind.ImplicitConstructor) as? FirFakeSourceElement, + constructorId = constructorId, + ownerClassBuilder = this, + valueParametersForAnnotationConstructor = valueParametersForAnnotationConstructor + ) } } @@ -438,6 +443,7 @@ class JavaSymbolProvider( } if (classIsAnnotation) { val parameterForAnnotationConstructor = buildJavaValueParameter { + source = (javaMethod as? JavaElementImpl<*>)?.psi?.toFirPsiSourceElement(FirFakeSourceElementKind.ImplicitJavaAnnotationConstructor) session = this@JavaSymbolProvider.session returnTypeRef = firJavaMethod.returnTypeRef name = methodName @@ -505,11 +511,13 @@ class JavaSymbolProvider( } private fun buildConstructorForAnnotationClass( + classSource: FirFakeSourceElement<*>?, constructorId: CallableId, ownerClassBuilder: FirJavaClassBuilder, valueParametersForAnnotationConstructor: ValueParametersForAnnotationConstructor ): FirJavaConstructor { return buildJavaConstructor { + source = classSource session = this@JavaSymbolProvider.session symbol = FirConstructorSymbol(constructorId) status = FirResolvedDeclarationStatusImpl(Visibilities.Public, Modality.FINAL) diff --git a/compiler/fir/java/src/org/jetbrains/kotlin/fir/java/JavaUtils.kt b/compiler/fir/java/src/org/jetbrains/kotlin/fir/java/JavaUtils.kt index f61df5dda07..79f82b3c134 100644 --- a/compiler/fir/java/src/org/jetbrains/kotlin/fir/java/JavaUtils.kt +++ b/compiler/fir/java/src/org/jetbrains/kotlin/fir/java/JavaUtils.kt @@ -125,7 +125,7 @@ internal fun JavaClassifierType.toFirResolvedTypeRef( internal fun JavaType?.toConeKotlinTypeWithoutEnhancement( session: FirSession, javaTypeParameterStack: JavaTypeParameterStack, - forAnnotationValueParameter: Boolean = false, + forAnnotationMember: Boolean = false, isForSupertypes: Boolean = false, attributes: ConeAttributes = ConeAttributes.Empty ): ConeKotlinType { @@ -134,7 +134,7 @@ internal fun JavaType?.toConeKotlinTypeWithoutEnhancement( toConeKotlinTypeWithoutEnhancement( session, javaTypeParameterStack, - forAnnotationValueParameter = forAnnotationValueParameter, + forAnnotationMember = forAnnotationMember, attributes = attributes ) } @@ -152,7 +152,7 @@ internal fun JavaType?.toConeKotlinTypeWithoutEnhancement( toConeKotlinTypeWithoutEnhancement( session, javaTypeParameterStack, - forAnnotationValueParameter, + forAnnotationMember, isForSupertypes, attributes = attributes ) @@ -225,7 +225,7 @@ private fun JavaClassifierType.toConeKotlinTypeWithoutEnhancement( javaTypeParameterStack: JavaTypeParameterStack, forTypeParameterBounds: Boolean = false, isForSupertypes: Boolean = false, - forAnnotationValueParameter: Boolean = false, + forAnnotationMember: Boolean = false, attributes: ConeAttributes = ConeAttributes.Empty ): ConeKotlinType { val lowerBound = toConeKotlinTypeForFlexibleBound( @@ -234,10 +234,10 @@ private fun JavaClassifierType.toConeKotlinTypeWithoutEnhancement( isLowerBound = true, forTypeParameterBounds, isForSupertypes, - forAnnotationValueParameter = forAnnotationValueParameter, + forAnnotationMember = forAnnotationMember, attributes = attributes ) - if (forAnnotationValueParameter) { + if (forAnnotationMember) { return lowerBound } val upperBound = @@ -248,7 +248,7 @@ private fun JavaClassifierType.toConeKotlinTypeWithoutEnhancement( forTypeParameterBounds, isForSupertypes, lowerBound, - forAnnotationValueParameter = forAnnotationValueParameter, + forAnnotationMember = forAnnotationMember, attributes = attributes ) @@ -362,13 +362,13 @@ private fun JavaClassifierType.toConeKotlinTypeForFlexibleBound( forTypeParameterBounds: Boolean, isForSupertypes: Boolean, lowerBound: ConeLookupTagBasedType? = null, - forAnnotationValueParameter: Boolean = false, + forAnnotationMember: Boolean = false, attributes: ConeAttributes = ConeAttributes.Empty ): ConeLookupTagBasedType { return when (val classifier = classifier) { is JavaClass -> { //val classId = classifier.classId!! - var classId = if (forAnnotationValueParameter) { + var classId = if (forAnnotationMember) { JavaToKotlinClassMap.mapJavaToKotlinIncludingClassMapping(classifier.fqName!!) } else { JavaToKotlinClassMap.mapJavaToKotlin(classifier.fqName!!) @@ -610,7 +610,7 @@ private fun JavaType?.toConeProjectionWithoutEnhancement( } } } - is JavaClassifierType -> toConeKotlinTypeWithoutEnhancement(session, javaTypeParameterStack, isForSupertypes) + is JavaClassifierType -> toConeKotlinTypeWithoutEnhancement(session, javaTypeParameterStack, isForSupertypes = isForSupertypes) is JavaArrayType -> toConeKotlinTypeWithoutEnhancement(session, javaTypeParameterStack, isForSupertypes = isForSupertypes) else -> ConeClassErrorType(ConeSimpleDiagnostic("Unexpected type argument: $this", DiagnosticKind.Java)) } diff --git a/compiler/fir/java/src/org/jetbrains/kotlin/fir/java/enhancement/EnhancementSignatureParts.kt b/compiler/fir/java/src/org/jetbrains/kotlin/fir/java/enhancement/EnhancementSignatureParts.kt index cf0c7b726aa..9493af4e75f 100644 --- a/compiler/fir/java/src/org/jetbrains/kotlin/fir/java/enhancement/EnhancementSignatureParts.kt +++ b/compiler/fir/java/src/org/jetbrains/kotlin/fir/java/enhancement/EnhancementSignatureParts.kt @@ -51,7 +51,7 @@ internal class EnhancementSignatureParts( session: FirSession, javaTypeEnhancementState: JavaTypeEnhancementState, predefined: TypeEnhancementInfo? = null, - forAnnotationValueParameter: Boolean = false + forAnnotationMember: Boolean = false ): PartEnhancementResult { val qualifiers = computeIndexedQualifiersForOverride(session, javaTypeEnhancementState) @@ -64,7 +64,7 @@ internal class EnhancementSignatureParts( val typeWithoutEnhancement = current.type.toConeKotlinTypeWithoutEnhancement( session, javaTypeParameterStack, - forAnnotationValueParameter, + forAnnotationMember, attributes = attributesCache.getValue(current) ) val containsFunctionN = typeWithoutEnhancement.contains { diff --git a/compiler/fir/java/src/org/jetbrains/kotlin/fir/java/enhancement/SignatureEnhancement.kt b/compiler/fir/java/src/org/jetbrains/kotlin/fir/java/enhancement/SignatureEnhancement.kt index 492cdf6937c..f139b9ab77b 100644 --- a/compiler/fir/java/src/org/jetbrains/kotlin/fir/java/enhancement/SignatureEnhancement.kt +++ b/compiler/fir/java/src/org/jetbrains/kotlin/fir/java/enhancement/SignatureEnhancement.kt @@ -319,7 +319,7 @@ class FirSignatureEnhancement( session, jsr305State, predefinedEnhancementInfo?.parametersInfo?.getOrNull(index), - forAnnotationValueParameter = owner.classKind == ClassKind.ANNOTATION_CLASS + forAnnotationMember = owner.classKind == ClassKind.ANNOTATION_CLASS ) val firResolvedTypeRef = signatureParts.type val defaultValueExpression = when (val defaultValue = ownerParameter.getDefaultValueFromAnnotation()) { @@ -345,7 +345,10 @@ class FirSignatureEnhancement( if (owner is FirJavaField) AnnotationQualifierApplicabilityType.FIELD else AnnotationQualifierApplicabilityType.METHOD_RETURN_TYPE, typeInSignature = TypeInSignature.Return - ).enhance(session, jsr305State, predefinedEnhancementInfo?.returnTypeInfo) + ).enhance( + session, jsr305State, predefinedEnhancementInfo?.returnTypeInfo, + forAnnotationMember = this.owner.classKind == ClassKind.ANNOTATION_CLASS + ) return signatureParts.type } diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/BodyResolveComponents.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/BodyResolveComponents.kt index 38c4a2d54a9..27af854fac4 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/BodyResolveComponents.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/BodyResolveComponents.kt @@ -180,7 +180,7 @@ fun SessionHolder.collectImplicitReceivers( throw IllegalArgumentException("Incorrect label & receiver owner: ${owner.javaClass}") } } - return ImplicitReceivers(implicitReceiverValue, implicitCompanionValues.asReversed()) + return ImplicitReceivers(implicitReceiverValue, implicitCompanionValues) } fun SessionHolder.collectTowerDataElementsForClass(owner: FirClass<*>, defaultType: ConeKotlinType): TowerElementsForClass { @@ -221,8 +221,8 @@ fun SessionHolder.collectTowerDataElementsForClass(owner: FirClass<*>, defaultTy owner.staticScope(this), companionReceiver, companionObject?.staticScope(this), - superClassesStaticsAndCompanionReceivers, - allImplicitCompanionValues + superClassesStaticsAndCompanionReceivers.asReversed(), + allImplicitCompanionValues.asReversed() ) } @@ -234,6 +234,8 @@ class TowerElementsForClass( val staticScope: FirScope?, val companionReceiver: ImplicitReceiverValue<*>?, val companionStaticScope: FirScope?, + // Ordered from inner scopes to outer scopes. val superClassesStaticsAndCompanionReceivers: List, + // Ordered from inner scopes to outer scopes. val implicitCompanionValues: List> ) diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/TypeExpansionUtils.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/TypeExpansionUtils.kt index 2dcf6d80e52..d80ee74cb54 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/TypeExpansionUtils.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/TypeExpansionUtils.kt @@ -85,11 +85,10 @@ private fun mapTypeAliasArguments( val type = (projection as? ConeKotlinTypeProjection)?.type ?: return null val symbol = (type as? ConeTypeParameterType)?.lookupTag?.symbol ?: return super.substituteArgument(projection) val mappedProjection = typeAliasMap[symbol] ?: return super.substituteArgument(projection) - val mappedType = (mappedProjection as? ConeKotlinTypeProjection)?.type ?: return mappedProjection + val mappedType = (mappedProjection as? ConeKotlinTypeProjection)?.type.updateNullabilityIfNeeded(type) + ?: return mappedProjection - @Suppress("MoveVariableDeclarationIntoWhen") - val resultingKind = mappedProjection.kind + projection.kind - return when (resultingKind) { + return when (mappedProjection.kind + projection.kind) { ProjectionKind.STAR -> ConeStarProjection ProjectionKind.IN -> ConeKotlinTypeProjectionIn(mappedType) ProjectionKind.OUT -> ConeKotlinTypeProjectionOut(mappedType) diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/calls/ResolutionStages.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/calls/ResolutionStages.kt index bb3b6eb744b..25753813f69 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/calls/ResolutionStages.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/calls/ResolutionStages.kt @@ -239,14 +239,13 @@ internal object CheckLowPriorityInOverloadResolution : CheckerStage() { } internal object PostponedVariablesInitializerResolutionStage : ResolutionStage() { - private val BUILDER_INFERENCE_CLASS_ID: ClassId = ClassId.fromString("kotlin/BuilderInference") override suspend fun check(candidate: Candidate, callInfo: CallInfo, sink: CheckerSink, context: ResolutionContext) { val argumentMapping = candidate.argumentMapping ?: return // TODO: convert type argument mapping to map [FirTypeParameterSymbol, FirTypedProjection?] if (candidate.typeArgumentMapping is TypeArgumentMapping.Mapped) return for (parameter in argumentMapping.values) { - if (!parameter.hasBuilderInferenceMarker()) continue + if (!parameter.hasBuilderInferenceAnnotation()) continue val type = parameter.returnTypeRef.coneType val receiverType = type.receiverType(callInfo.session) ?: continue @@ -263,8 +262,4 @@ internal object PostponedVariablesInitializerResolutionStage : ResolutionStage() } } } - - private fun FirValueParameter.hasBuilderInferenceMarker(): Boolean { - return this.hasAnnotation(BUILDER_INFERENCE_CLASS_ID) - } } diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/dfa/cfg/CFGNodeRenderer.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/dfa/cfg/CFGNodeRenderer.kt index 7caba7c1e9d..9dd65782c22 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/dfa/cfg/CFGNodeRenderer.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/dfa/cfg/CFGNodeRenderer.kt @@ -127,7 +127,8 @@ private object CfgRenderMode : FirRenderer.RenderMode( renderLambdaBodies = false, renderCallArguments = false, renderCallableFqNames = false, - renderDeclarationResolvePhase = false + renderDeclarationResolvePhase = false, + renderAnnotation = false, ) private fun FirFunction<*>.name(): String = when (this) { diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/inference/ConeConstraintSystemUtilContext.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/inference/ConeConstraintSystemUtilContext.kt index 5a12718b312..ae9f03b853f 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/inference/ConeConstraintSystemUtilContext.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/inference/ConeConstraintSystemUtilContext.kt @@ -38,8 +38,7 @@ object ConeConstraintSystemUtilContext : ConstraintSystemUtilContext { } override fun TypeVariableMarker.isReified(): Boolean { - // TODO - return false + return this is TypeParameterBasedTypeVariable && typeParameterSymbol.fir.isReified } override fun KotlinTypeMarker.refineType(): KotlinTypeMarker { diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/inference/FirBuilderInferenceSession.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/inference/FirBuilderInferenceSession.kt index 1a923125c2d..2ac113e844a 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/inference/FirBuilderInferenceSession.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/inference/FirBuilderInferenceSession.kt @@ -6,6 +6,8 @@ package org.jetbrains.kotlin.fir.resolve.inference import org.jetbrains.kotlin.fir.FirElement +import org.jetbrains.kotlin.fir.declarations.FirAnnotatedDeclaration +import org.jetbrains.kotlin.fir.declarations.hasAnnotation import org.jetbrains.kotlin.fir.expressions.FirArgumentList import org.jetbrains.kotlin.fir.expressions.FirResolvable import org.jetbrains.kotlin.fir.expressions.FirStatement @@ -13,13 +15,18 @@ import org.jetbrains.kotlin.fir.resolve.calls.Candidate import org.jetbrains.kotlin.fir.resolve.calls.ResolutionContext import org.jetbrains.kotlin.fir.resolve.substitution.ConeSubstitutor import org.jetbrains.kotlin.fir.types.* -import org.jetbrains.kotlin.fir.visitors.* +import org.jetbrains.kotlin.fir.visitors.CompositeTransformResult +import org.jetbrains.kotlin.fir.visitors.FirDefaultTransformer +import org.jetbrains.kotlin.fir.visitors.compose +import org.jetbrains.kotlin.fir.visitors.transformSingle +import org.jetbrains.kotlin.name.ClassId import org.jetbrains.kotlin.resolve.calls.inference.buildAbstractResultingSubstitutor import org.jetbrains.kotlin.resolve.calls.inference.components.ConstraintSystemCompletionMode import org.jetbrains.kotlin.resolve.calls.inference.model.ConstraintKind import org.jetbrains.kotlin.resolve.calls.inference.model.ConstraintStorage import org.jetbrains.kotlin.resolve.calls.inference.model.CoroutinePosition import org.jetbrains.kotlin.resolve.calls.inference.model.NewConstraintSystemImpl +import org.jetbrains.kotlin.resolve.descriptorUtil.BUILDER_INFERENCE_ANNOTATION_FQ_NAME import org.jetbrains.kotlin.types.model.TypeConstructorMarker class FirBuilderInferenceSession( @@ -33,14 +40,35 @@ class FirBuilderInferenceSession( val system = candidate.system if (system.hasContradiction) return true + if (!candidate.isSuitableForBuilderInference()) return true + val storage = system.getBuilder().currentStorage() - return !storage.notFixedTypeVariables.keys.any { + if (call.hasPostponed()) return true + + return storage.notFixedTypeVariables.keys.all { val variable = storage.allTypeVariables[it] val isPostponed = variable != null && variable in storage.postponedTypeVariables - !isPostponed && !components.callCompleter.completer.variableFixationFinder.isTypeVariableHasProperConstraint(system, it) - } || call.hasPostponed() + isPostponed || components.callCompleter.completer.variableFixationFinder.isTypeVariableHasProperConstraint(system, it) + } + } + + private fun Candidate.isSuitableForBuilderInference(): Boolean { + val extensionReceiver = extensionReceiverValue + val dispatchReceiver = dispatchReceiverValue + return when { + extensionReceiver == null && dispatchReceiver == null -> false + dispatchReceiver?.type?.containsStubType() == true -> true + extensionReceiver?.type?.containsStubType() == true -> symbol.fir.hasBuilderInferenceAnnotation() + else -> false + } + } + + private fun ConeKotlinType.containsStubType(): Boolean { + return this.contains { + it is ConeStubType + } } private fun FirStatement.hasPostponed(): Boolean { @@ -241,3 +269,8 @@ class FirStubTypeTransformer( override fun transformArgumentList(argumentList: FirArgumentList, data: Nothing?): CompositeTransformResult = argumentList.transformArguments(this, data).compose() } + +private val BUILDER_INFERENCE_ANNOTATION_CLASS_ID = ClassId.topLevel(BUILDER_INFERENCE_ANNOTATION_FQ_NAME) + +fun FirElement.hasBuilderInferenceAnnotation(): Boolean = + (this as? FirAnnotatedDeclaration)?.hasAnnotation(BUILDER_INFERENCE_ANNOTATION_CLASS_ID) == true diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/FirCallCompletionResultsWriterTransformer.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/FirCallCompletionResultsWriterTransformer.kt index 4ecdeb9444f..f1d4ede334e 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/FirCallCompletionResultsWriterTransformer.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/FirCallCompletionResultsWriterTransformer.kt @@ -108,7 +108,9 @@ class FirCallCompletionResultsWriterTransformer( .transformDispatchReceiver(StoreReceiver, subCandidate.dispatchReceiverExpression()) .transformExtensionReceiver(StoreReceiver, subCandidate.extensionReceiverExpression()) as T result.replaceTypeRef(typeRef) - result.replaceTypeArguments(typeArguments) + if (declaration !is FirErrorFunction) { + result.replaceTypeArguments(typeArguments) + } return result } diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/scopes/impl/FirTypeIntersectionScope.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/scopes/impl/FirTypeIntersectionScope.kt index c8be97684ea..675553f33ce 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/scopes/impl/FirTypeIntersectionScope.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/scopes/impl/FirTypeIntersectionScope.kt @@ -89,7 +89,7 @@ class FirTypeIntersectionScope private constructor( return false } - val allMembersWithScope = membersByScope.flatMapTo(mutableListOf()) { (scope, members) -> + val allMembersWithScope = membersByScope.flatMapTo(linkedSetOf()) { (scope, members) -> members.map { MemberWithBaseScope(it, scope) } } @@ -508,6 +508,14 @@ class FirTypeIntersectionScope private constructor( private class MemberWithBaseScope>(val member: D, val baseScope: FirTypeScope) { operator fun component1() = member operator fun component2() = baseScope + + override fun equals(other: Any?): Boolean { + return other is MemberWithBaseScope<*> && member == other.member + } + + override fun hashCode(): Int { + return member.hashCode() + } } private fun > D.withScope(baseScope: FirTypeScope) = MemberWithBaseScope(this, baseScope) diff --git a/compiler/fir/tree/build.gradle.kts b/compiler/fir/tree/build.gradle.kts index f2a608fb727..8a6b4d3d1e1 100644 --- a/compiler/fir/tree/build.gradle.kts +++ b/compiler/fir/tree/build.gradle.kts @@ -56,9 +56,3 @@ if (kotlinBuildProperties.isInJpsBuildIdeaSync) { this.module.generatedSourceDirs.add(generationRoot) } } - -kotlin { - sourceSets.all { - languageSettings.enableLanguageFeature("InlineClasses") - } -} \ No newline at end of file diff --git a/compiler/fir/tree/src/org/jetbrains/kotlin/fir/FirRenderer.kt b/compiler/fir/tree/src/org/jetbrains/kotlin/fir/FirRenderer.kt index 587da9cc36c..3d189b571e4 100644 --- a/compiler/fir/tree/src/org/jetbrains/kotlin/fir/FirRenderer.kt +++ b/compiler/fir/tree/src/org/jetbrains/kotlin/fir/FirRenderer.kt @@ -52,27 +52,39 @@ class FirRenderer(builder: StringBuilder, private val mode: RenderMode = RenderM val renderLambdaBodies: Boolean, val renderCallArguments: Boolean, val renderCallableFqNames: Boolean, - val renderDeclarationResolvePhase: Boolean + val renderDeclarationResolvePhase: Boolean, + val renderAnnotation: Boolean, ) { object Normal : RenderMode( renderLambdaBodies = true, renderCallArguments = true, renderCallableFqNames = false, - renderDeclarationResolvePhase = false + renderDeclarationResolvePhase = false, + renderAnnotation = true, ) object WithFqNames : RenderMode( renderLambdaBodies = true, renderCallArguments = true, renderCallableFqNames = true, - renderDeclarationResolvePhase = false + renderDeclarationResolvePhase = false, + renderAnnotation = true, + ) + + object WithFqNamesExceptAnnotation : RenderMode( + renderLambdaBodies = true, + renderCallArguments = true, + renderCallableFqNames = true, + renderDeclarationResolvePhase = false, + renderAnnotation = false, ) object WithResolvePhases : RenderMode( renderLambdaBodies = true, renderCallArguments = true, renderCallableFqNames = false, - renderDeclarationResolvePhase = true + renderDeclarationResolvePhase = true, + renderAnnotation = true, ) } @@ -154,6 +166,7 @@ class FirRenderer(builder: StringBuilder, private val mode: RenderMode = RenderM } private fun List.renderAnnotations() { + if (!mode.renderAnnotation) return for (annotation in this) { visitAnnotationCall(annotation) } diff --git a/compiler/fir/tree/src/org/jetbrains/kotlin/fir/FirSession.kt b/compiler/fir/tree/src/org/jetbrains/kotlin/fir/FirSession.kt index 391182ef4f8..f0d367308df 100644 --- a/compiler/fir/tree/src/org/jetbrains/kotlin/fir/FirSession.kt +++ b/compiler/fir/tree/src/org/jetbrains/kotlin/fir/FirSession.kt @@ -62,4 +62,5 @@ class BuiltinTypes { val nullableNothingType: FirImplicitBuiltinTypeRef = FirImplicitNullableNothingTypeRef(null) val charType: FirImplicitBuiltinTypeRef = FirImplicitCharTypeRef(null) val stringType: FirImplicitBuiltinTypeRef = FirImplicitStringTypeRef(null) + val throwableType: FirImplicitThrowableTypeRef = FirImplicitThrowableTypeRef(null) } diff --git a/compiler/fir/tree/src/org/jetbrains/kotlin/fir/FirSourceElement.kt b/compiler/fir/tree/src/org/jetbrains/kotlin/fir/FirSourceElement.kt index bab6e154260..e24d42d4043 100644 --- a/compiler/fir/tree/src/org/jetbrains/kotlin/fir/FirSourceElement.kt +++ b/compiler/fir/tree/src/org/jetbrains/kotlin/fir/FirSourceElement.kt @@ -161,6 +161,14 @@ sealed class FirFakeSourceElementKind : FirSourceElementKind() { // { it + 1} --> { it -> it + 1 } // where `it` parameter declaration has fake source object ItLambdaParameter : FirFakeSourceElementKind() + + // for java annotations implicit constructor is generated + // with a fake source which refers to containing class + object ImplicitJavaAnnotationConstructor : FirFakeSourceElementKind() + + // for java annotations constructor implicit parameters are generated + // with a fake source which refers to declared annotation methods + object ImplicitAnnotationAnnotationConstructorParameter : FirFakeSourceElementKind() } sealed class FirSourceElement { diff --git a/compiler/fir/tree/src/org/jetbrains/kotlin/fir/types/impl/FirImplicitBuiltinTypeRef.kt b/compiler/fir/tree/src/org/jetbrains/kotlin/fir/types/impl/FirImplicitBuiltinTypeRef.kt index 9733c9d9721..bfe73d6b81d 100644 --- a/compiler/fir/tree/src/org/jetbrains/kotlin/fir/types/impl/FirImplicitBuiltinTypeRef.kt +++ b/compiler/fir/tree/src/org/jetbrains/kotlin/fir/types/impl/FirImplicitBuiltinTypeRef.kt @@ -109,6 +109,10 @@ class FirImplicitStringTypeRef( source: FirSourceElement? ) : FirImplicitBuiltinTypeRef(source, StandardClassIds.String) +class FirImplicitThrowableTypeRef( + source: FirSourceElement? +) : FirImplicitBuiltinTypeRef(source, StandardClassIds.Throwable) + class FirImplicitKPropertyTypeRef( source: FirSourceElement?, typeArgument: ConeTypeProjection @@ -177,6 +181,7 @@ fun FirImplicitBuiltinTypeRef.withFakeSource(kind: FirFakeSourceElementKind): Fi is FirImplicitNullableNothingTypeRef -> FirImplicitNullableNothingTypeRef(newSource) is FirImplicitCharTypeRef -> FirImplicitCharTypeRef(newSource) is FirImplicitStringTypeRef -> FirImplicitStringTypeRef(newSource) + is FirImplicitThrowableTypeRef -> FirImplicitThrowableTypeRef(newSource) is FirImplicitKPropertyTypeRef -> FirImplicitKPropertyTypeRef( newSource, typeArgument = type.typeArguments[0] diff --git a/compiler/frontend.java/src/org/jetbrains/kotlin/frontend/java/di/injection.kt b/compiler/frontend.java/src/org/jetbrains/kotlin/frontend/java/di/injection.kt index 4758ae4a7f0..43fc9f78fe7 100644 --- a/compiler/frontend.java/src/org/jetbrains/kotlin/frontend/java/di/injection.kt +++ b/compiler/frontend.java/src/org/jetbrains/kotlin/frontend/java/di/injection.kt @@ -47,7 +47,6 @@ import org.jetbrains.kotlin.resolve.jvm.JavaDescriptorResolver import org.jetbrains.kotlin.resolve.jvm.JvmDiagnosticComponents import org.jetbrains.kotlin.resolve.jvm.multiplatform.OptionalAnnotationPackageFragmentProvider import org.jetbrains.kotlin.resolve.jvm.platform.JvmPlatformAnalyzerServices -import org.jetbrains.kotlin.resolve.lazy.KotlinCodeAnalyzer import org.jetbrains.kotlin.resolve.lazy.declarations.DeclarationProviderFactory fun createContainerForLazyResolveWithJava( @@ -95,7 +94,9 @@ fun createContainerForLazyResolveWithJava( } fun StorageComponentContainer.initializeJavaSpecificComponents(bindingTrace: BindingTrace) { - get().initialize(bindingTrace, get(), get()) + get().initialize( + bindingTrace, codeAnalyzer = get(), languageVersionSettings = get(), jvmTarget = get() + ) } fun StorageComponentContainer.configureJavaSpecificComponents( diff --git a/compiler/frontend.java/src/org/jetbrains/kotlin/load/java/AbstractJavaClassFinder.kt b/compiler/frontend.java/src/org/jetbrains/kotlin/load/java/AbstractJavaClassFinder.kt index 3363737904c..b946ea25b74 100644 --- a/compiler/frontend.java/src/org/jetbrains/kotlin/load/java/AbstractJavaClassFinder.kt +++ b/compiler/frontend.java/src/org/jetbrains/kotlin/load/java/AbstractJavaClassFinder.kt @@ -20,17 +20,18 @@ import com.intellij.openapi.project.Project import com.intellij.openapi.vfs.VirtualFile import com.intellij.psi.search.DelegatingGlobalSearchScope import com.intellij.psi.search.GlobalSearchScope +import org.jetbrains.kotlin.config.JvmTarget import org.jetbrains.kotlin.config.LanguageVersionSettings import org.jetbrains.kotlin.idea.KotlinFileType import org.jetbrains.kotlin.resolve.BindingTrace import org.jetbrains.kotlin.resolve.CodeAnalyzerInitializer +import org.jetbrains.kotlin.resolve.jvm.JvmCodeAnalyzerInitializer import org.jetbrains.kotlin.resolve.jvm.TopPackageNamesProvider import org.jetbrains.kotlin.resolve.lazy.KotlinCodeAnalyzer import javax.annotation.PostConstruct import javax.inject.Inject abstract class AbstractJavaClassFinder : JavaClassFinder { - protected lateinit var project: Project protected lateinit var javaSearchScope: GlobalSearchScope @@ -50,8 +51,15 @@ abstract class AbstractJavaClassFinder : JavaClassFinder { } @PostConstruct - open fun initialize(trace: BindingTrace, codeAnalyzer: KotlinCodeAnalyzer, languageVersionSettings: LanguageVersionSettings) { - CodeAnalyzerInitializer.getInstance(project).initialize(trace, codeAnalyzer.moduleDescriptor, codeAnalyzer, languageVersionSettings) + open fun initialize( + trace: BindingTrace, + codeAnalyzer: KotlinCodeAnalyzer, + languageVersionSettings: LanguageVersionSettings, + jvmTarget: JvmTarget, + ) { + (CodeAnalyzerInitializer.getInstance(project) as? JvmCodeAnalyzerInitializer)?.initialize( + trace, codeAnalyzer.moduleDescriptor, codeAnalyzer, languageVersionSettings, jvmTarget + ) } inner class FilterOutKotlinSourceFilesScope(baseScope: GlobalSearchScope) : DelegatingGlobalSearchScope(baseScope), diff --git a/compiler/frontend.java/src/org/jetbrains/kotlin/resolve/jvm/JvmCodeAnalyzerInitializer.kt b/compiler/frontend.java/src/org/jetbrains/kotlin/resolve/jvm/JvmCodeAnalyzerInitializer.kt new file mode 100644 index 00000000000..e6f2c68d70b --- /dev/null +++ b/compiler/frontend.java/src/org/jetbrains/kotlin/resolve/jvm/JvmCodeAnalyzerInitializer.kt @@ -0,0 +1,23 @@ +/* + * Copyright 2010-2021 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. + */ + +package org.jetbrains.kotlin.resolve.jvm + +import org.jetbrains.kotlin.config.JvmTarget +import org.jetbrains.kotlin.config.LanguageVersionSettings +import org.jetbrains.kotlin.descriptors.ModuleDescriptor +import org.jetbrains.kotlin.resolve.BindingTrace +import org.jetbrains.kotlin.resolve.CodeAnalyzerInitializer +import org.jetbrains.kotlin.resolve.lazy.KotlinCodeAnalyzer + +abstract class JvmCodeAnalyzerInitializer : CodeAnalyzerInitializer { + abstract fun initialize( + trace: BindingTrace, + module: ModuleDescriptor, + codeAnalyzer: KotlinCodeAnalyzer, + languageVersionSettings: LanguageVersionSettings, + jvmTarget: JvmTarget, + ) +} diff --git a/compiler/frontend/src/org/jetbrains/kotlin/analyzer/AnalysisResult.kt b/compiler/frontend/src/org/jetbrains/kotlin/analyzer/AnalysisResult.kt index 73717ca991f..e8c7a5001f4 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/analyzer/AnalysisResult.kt +++ b/compiler/frontend/src/org/jetbrains/kotlin/analyzer/AnalysisResult.kt @@ -52,9 +52,9 @@ open class AnalysisResult protected constructor( fun isError(): Boolean = this is InternalError || this is CompilationError fun throwIfError() { - when { - this is InternalError -> throw IllegalStateException("failed to analyze: " + error, error) - this is CompilationError -> throw CompilationErrorException() + when (this) { + is InternalError -> throw IllegalStateException("failed to analyze: $error", error) + is CompilationError -> throw CompilationErrorException() } } diff --git a/compiler/frontend/src/org/jetbrains/kotlin/diagnostics/DiagnosticSink.java b/compiler/frontend/src/org/jetbrains/kotlin/diagnostics/DiagnosticSink.java index 37d6a6fbb14..30043b68da1 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/diagnostics/DiagnosticSink.java +++ b/compiler/frontend/src/org/jetbrains/kotlin/diagnostics/DiagnosticSink.java @@ -53,6 +53,15 @@ public interface DiagnosticSink { } }; + interface DiagnosticsCallback { + void callback(Diagnostic diagnostic); + } + void report(@NotNull Diagnostic diagnostic); + + default void setCallback(@NotNull DiagnosticsCallback callback) { } + + default void resetCallback() { } + boolean wantsDiagnostics(); } diff --git a/compiler/frontend/src/org/jetbrains/kotlin/diagnostics/rendering/RenderingContext.kt b/compiler/frontend/src/org/jetbrains/kotlin/diagnostics/rendering/RenderingContext.kt index ff7304fa24d..aa726637803 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/diagnostics/rendering/RenderingContext.kt +++ b/compiler/frontend/src/org/jetbrains/kotlin/diagnostics/rendering/RenderingContext.kt @@ -48,16 +48,16 @@ sealed class RenderingContext { } @JvmStatic - fun fromDiagnostic(d: Diagnostic): RenderingContext { - val parameters = when (d) { - is SimpleDiagnostic<*> -> listOf() - is DiagnosticWithParameters1<*, *> -> listOf(d.a) - is DiagnosticWithParameters2<*, *, *> -> listOf(d.a, d.b) - is DiagnosticWithParameters3<*, *, *, *> -> listOf(d.a, d.b, d.c) - is ParametrizedDiagnostic<*> -> error("Unexpected diagnostic: ${d::class.java}") - else -> listOf() - } - return Impl(parameters) + fun parameters(d: Diagnostic): List = when (d) { + is SimpleDiagnostic<*> -> listOf() + is DiagnosticWithParameters1<*, *> -> listOf(d.a) + is DiagnosticWithParameters2<*, *, *> -> listOf(d.a, d.b) + is DiagnosticWithParameters3<*, *, *, *> -> listOf(d.a, d.b, d.c) + is ParametrizedDiagnostic<*> -> error("Unexpected diagnostic: ${d::class.java}") + else -> listOf() } + + @JvmStatic + fun fromDiagnostic(d: Diagnostic): RenderingContext = Impl(parameters(d)) } } diff --git a/compiler/frontend/src/org/jetbrains/kotlin/resolve/AbstractFilteringTrace.kt b/compiler/frontend/src/org/jetbrains/kotlin/resolve/AbstractFilteringTrace.kt index 3ef6e842a1f..e98c6e2c2fd 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/resolve/AbstractFilteringTrace.kt +++ b/compiler/frontend/src/org/jetbrains/kotlin/resolve/AbstractFilteringTrace.kt @@ -37,6 +37,8 @@ abstract class AbstractFilteringTrace( } override fun report(diagnostic: Diagnostic) { + diagnosticsCallback?.callback(diagnostic) + parentTrace.report(diagnostic) } diff --git a/compiler/frontend/src/org/jetbrains/kotlin/resolve/CodeAnalyzerInitializer.kt b/compiler/frontend/src/org/jetbrains/kotlin/resolve/CodeAnalyzerInitializer.kt index 8778524846e..a8d1c72a2ee 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/resolve/CodeAnalyzerInitializer.kt +++ b/compiler/frontend/src/org/jetbrains/kotlin/resolve/CodeAnalyzerInitializer.kt @@ -18,35 +18,16 @@ package org.jetbrains.kotlin.resolve import com.intellij.openapi.components.ServiceManager import com.intellij.openapi.project.Project -import org.jetbrains.kotlin.config.LanguageVersionSettings -import org.jetbrains.kotlin.descriptors.ModuleDescriptor -import org.jetbrains.kotlin.resolve.lazy.KotlinCodeAnalyzer interface CodeAnalyzerInitializer { - fun initialize( - trace: BindingTrace, - module: ModuleDescriptor, - codeAnalyzer: KotlinCodeAnalyzer, - languageVersionSettings: LanguageVersionSettings - ) - fun createTrace(): BindingTrace companion object { fun getInstance(project: Project): CodeAnalyzerInitializer = - ServiceManager.getService(project, CodeAnalyzerInitializer::class.java)!! + ServiceManager.getService(project, CodeAnalyzerInitializer::class.java)!! } } class DummyCodeAnalyzerInitializer : CodeAnalyzerInitializer { - override fun initialize( - trace: BindingTrace, - module: ModuleDescriptor, - codeAnalyzer: KotlinCodeAnalyzer, - languageVersionSettings: LanguageVersionSettings - ) { - // Do nothing - } - override fun createTrace(): BindingTrace = BindingTraceContext(true) } diff --git a/compiler/frontend/src/org/jetbrains/kotlin/resolve/DelegatingBindingTrace.kt b/compiler/frontend/src/org/jetbrains/kotlin/resolve/DelegatingBindingTrace.kt index 59c1c93dc27..b54b1cba8e3 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/resolve/DelegatingBindingTrace.kt +++ b/compiler/frontend/src/org/jetbrains/kotlin/resolve/DelegatingBindingTrace.kt @@ -19,6 +19,7 @@ package org.jetbrains.kotlin.resolve import com.google.common.collect.ImmutableMap import org.jetbrains.annotations.TestOnly import org.jetbrains.kotlin.diagnostics.Diagnostic +import org.jetbrains.kotlin.diagnostics.DiagnosticSink import org.jetbrains.kotlin.psi.KtExpression import org.jetbrains.kotlin.resolve.diagnostics.BindingContextSuppressCache import org.jetbrains.kotlin.resolve.diagnostics.Diagnostics @@ -156,6 +157,18 @@ open class DelegatingBindingTrace( mutableDiagnostics.report(diagnostic) } + protected var diagnosticsCallback: DiagnosticSink.DiagnosticsCallback? = null + + override fun setCallback(callback: DiagnosticSink.DiagnosticsCallback) { + diagnosticsCallback = callback + mutableDiagnostics?.setCallback(callback) + } + + override fun resetCallback() { + diagnosticsCallback = null + mutableDiagnostics?.resetCallback() + } + override fun wantsDiagnostics(): Boolean = mutableDiagnostics != null override fun toString(): String = name diff --git a/compiler/frontend/src/org/jetbrains/kotlin/resolve/calls/CallExpressionResolver.kt b/compiler/frontend/src/org/jetbrains/kotlin/resolve/calls/CallExpressionResolver.kt index 978448f76f1..8f56e44e99e 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/resolve/calls/CallExpressionResolver.kt +++ b/compiler/frontend/src/org/jetbrains/kotlin/resolve/calls/CallExpressionResolver.kt @@ -67,6 +67,7 @@ import org.jetbrains.kotlin.types.expressions.ExpressionTypingServices import org.jetbrains.kotlin.types.expressions.KotlinTypeInfo import org.jetbrains.kotlin.types.expressions.typeInfoFactory.createTypeInfo import org.jetbrains.kotlin.types.expressions.typeInfoFactory.noTypeInfo +import org.jetbrains.kotlin.types.isError import org.jetbrains.kotlin.types.refinement.TypeRefinement import javax.inject.Inject @@ -534,15 +535,17 @@ class CallExpressionResolver( } ?: false fun reportUnnecessarySafeCall( - trace: BindingTrace, type: KotlinType, - callOperationNode: ASTNode, explicitReceiver: Receiver? - ) = trace.report( + trace: BindingTrace, + type: KotlinType, + callOperationNode: ASTNode, + explicitReceiver: Receiver? + ) { if (explicitReceiver is ExpressionReceiver && explicitReceiver.expression is KtSuperExpression) { - UNEXPECTED_SAFE_CALL.on(callOperationNode.psi) - } else { - UNNECESSARY_SAFE_CALL.on(callOperationNode.psi, type) + trace.report(UNEXPECTED_SAFE_CALL.on(callOperationNode.psi)) + } else if (!type.isError) { + trace.report(UNNECESSARY_SAFE_CALL.on(callOperationNode.psi, type)) } - ) + } private fun checkNestedClassAccess( expression: KtQualifiedExpression, diff --git a/compiler/frontend/src/org/jetbrains/kotlin/resolve/calls/inference/CoroutineInferenceSession.kt b/compiler/frontend/src/org/jetbrains/kotlin/resolve/calls/inference/CoroutineInferenceSession.kt index 2770be2db9a..5935ff9472b 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/resolve/calls/inference/CoroutineInferenceSession.kt +++ b/compiler/frontend/src/org/jetbrains/kotlin/resolve/calls/inference/CoroutineInferenceSession.kt @@ -6,7 +6,6 @@ package org.jetbrains.kotlin.resolve.calls.inference import org.jetbrains.kotlin.builtins.KotlinBuiltIns -import org.jetbrains.kotlin.config.LanguageFeature import org.jetbrains.kotlin.descriptors.CallableDescriptor import org.jetbrains.kotlin.descriptors.ModuleDescriptor import org.jetbrains.kotlin.descriptors.impl.* @@ -79,10 +78,10 @@ class CoroutineInferenceSession( return true } - return !storage.notFixedTypeVariables.keys.any { + return storage.notFixedTypeVariables.keys.all { val variable = storage.allTypeVariables[it] val isPostponed = variable != null && variable in storage.postponedTypeVariables - !isPostponed && !kotlinConstraintSystemCompleter.variableFixationFinder.isTypeVariableHasProperConstraint( + isPostponed || kotlinConstraintSystemCompleter.variableFixationFinder.isTypeVariableHasProperConstraint( system, it, ) diff --git a/compiler/frontend/src/org/jetbrains/kotlin/resolve/diagnostics/Diagnostics.kt b/compiler/frontend/src/org/jetbrains/kotlin/resolve/diagnostics/Diagnostics.kt index 80e4c0f0c03..04231909f5a 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/resolve/diagnostics/Diagnostics.kt +++ b/compiler/frontend/src/org/jetbrains/kotlin/resolve/diagnostics/Diagnostics.kt @@ -16,9 +16,10 @@ package org.jetbrains.kotlin.resolve.diagnostics -import com.intellij.psi.PsiElement import com.intellij.openapi.util.ModificationTracker +import com.intellij.psi.PsiElement import org.jetbrains.kotlin.diagnostics.Diagnostic +import org.jetbrains.kotlin.diagnostics.DiagnosticSink.DiagnosticsCallback import org.jetbrains.kotlin.diagnostics.GenericDiagnostics interface Diagnostics : GenericDiagnostics { @@ -37,6 +38,9 @@ interface Diagnostics : GenericDiagnostics { fun noSuppression(): Diagnostics + fun setCallback(callback: DiagnosticsCallback) {} + fun resetCallback() {} + companion object { val EMPTY: Diagnostics = object : Diagnostics { override fun noSuppression(): Diagnostics = this diff --git a/compiler/frontend/src/org/jetbrains/kotlin/resolve/diagnostics/DiagnosticsWithSuppression.java b/compiler/frontend/src/org/jetbrains/kotlin/resolve/diagnostics/DiagnosticsWithSuppression.java index 4463565bd84..f759209c551 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/resolve/diagnostics/DiagnosticsWithSuppression.java +++ b/compiler/frontend/src/org/jetbrains/kotlin/resolve/diagnostics/DiagnosticsWithSuppression.java @@ -23,6 +23,7 @@ import kotlin.collections.CollectionsKt; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.TestOnly; import org.jetbrains.kotlin.diagnostics.Diagnostic; +import org.jetbrains.kotlin.diagnostics.DiagnosticSink; import java.util.Collection; import java.util.Iterator; @@ -73,6 +74,16 @@ public class DiagnosticsWithSuppression implements Diagnostics { throw new IllegalStateException("Trying to obtain modification tracker for readonly DiagnosticsWithSuppression."); } + @Override + public void setCallback(@NotNull DiagnosticSink.DiagnosticsCallback callback) { + + } + + @Override + public void resetCallback() { + + } + @TestOnly @NotNull public Collection getDiagnostics() { diff --git a/compiler/frontend/src/org/jetbrains/kotlin/resolve/diagnostics/KotlinSuppressCache.kt b/compiler/frontend/src/org/jetbrains/kotlin/resolve/diagnostics/KotlinSuppressCache.kt index d870fc079c3..259de46c32a 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/resolve/diagnostics/KotlinSuppressCache.kt +++ b/compiler/frontend/src/org/jetbrains/kotlin/resolve/diagnostics/KotlinSuppressCache.kt @@ -24,10 +24,7 @@ import org.jetbrains.kotlin.builtins.StandardNames import org.jetbrains.kotlin.descriptors.annotations.AnnotationDescriptor import org.jetbrains.kotlin.diagnostics.Diagnostic import org.jetbrains.kotlin.diagnostics.Severity -import org.jetbrains.kotlin.psi.KtAnnotated -import org.jetbrains.kotlin.psi.KtFile -import org.jetbrains.kotlin.psi.KtStubbedPsiUtil -import org.jetbrains.kotlin.psi.doNotAnalyze +import org.jetbrains.kotlin.psi.* import org.jetbrains.kotlin.resolve.BindingContext import org.jetbrains.kotlin.resolve.constants.ArrayValue import org.jetbrains.kotlin.resolve.constants.StringValue @@ -111,7 +108,12 @@ abstract class KotlinSuppressCache { This way we need no more lookups than the number of suppress() annotations from here to the root. */ - private fun isSuppressedByAnnotated(suppressionKey: String, severity: Severity, annotated: KtAnnotated, debugDepth: Int): Boolean { + private fun isSuppressedByAnnotated( + suppressionKey: String, + severity: Severity, + annotated: KtAnnotated, + debugDepth: Int + ): Boolean { val suppressor = getOrCreateSuppressor(annotated) if (suppressor.isSuppressed(suppressionKey, severity)) return true @@ -140,6 +142,7 @@ abstract class KotlinSuppressCache { private fun getSuppressingStrings(annotated: KtAnnotated): Set { val builder = ImmutableSet.builder() + for (annotationDescriptor in getSuppressionAnnotations(annotated)) { processAnnotation(builder, annotationDescriptor) } diff --git a/compiler/frontend/src/org/jetbrains/kotlin/resolve/diagnostics/MutableDiagnosticsWithSuppression.kt b/compiler/frontend/src/org/jetbrains/kotlin/resolve/diagnostics/MutableDiagnosticsWithSuppression.kt index 7157dfdec02..ddbf703cce7 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/resolve/diagnostics/MutableDiagnosticsWithSuppression.kt +++ b/compiler/frontend/src/org/jetbrains/kotlin/resolve/diagnostics/MutableDiagnosticsWithSuppression.kt @@ -22,12 +22,16 @@ import com.intellij.psi.util.CachedValueProvider import com.intellij.util.CachedValueImpl import org.jetbrains.annotations.TestOnly import org.jetbrains.kotlin.diagnostics.Diagnostic +import org.jetbrains.kotlin.diagnostics.DiagnosticSink +import org.jetbrains.kotlin.psi.KtAnnotationEntry +import org.jetbrains.kotlin.psi.KtStubbedPsiUtil class MutableDiagnosticsWithSuppression( private val suppressCache: KotlinSuppressCache, private val delegateDiagnostics: Diagnostics, ) : Diagnostics { private val diagnosticList = ArrayList() + private var diagnosticsCallback: DiagnosticSink.DiagnosticsCallback? = null //NOTE: CachedValuesManager is not used because it requires Project passed to this object private val cache = CachedValueImpl { @@ -43,16 +47,38 @@ class MutableDiagnosticsWithSuppression( override fun forElement(psiElement: PsiElement) = readonlyView().forElement(psiElement) override fun noSuppression() = readonlyView().noSuppression() + override fun setCallback(callback: DiagnosticSink.DiagnosticsCallback) { + assert(diagnosticsCallback == null) { "diagnostic callback has been already registered" } + diagnosticsCallback = callback + delegateDiagnostics.setCallback(callback) + } + + override fun resetCallback() { + diagnosticsCallback = null + delegateDiagnostics.resetCallback() + } + //essential that this list is readonly fun getOwnDiagnostics(): List { return diagnosticList } fun report(diagnostic: Diagnostic) { + onFlyDiagnosticsCallback(diagnostic)?.callback(diagnostic) + diagnosticList.add(diagnostic) modificationTracker.incModificationCount() } + private fun onFlyDiagnosticsCallback(diagnostic: Diagnostic): DiagnosticSink.DiagnosticsCallback? = + diagnosticsCallback.takeIf { + diagnosticsCallback != null && + // Due to a potential recursion in filter.invoke (via LazyAnnotations) do not try to report + // diagnostic on fly if it happened in annotations + KtStubbedPsiUtil.getPsiOrStubParent(diagnostic.psiElement, KtAnnotationEntry::class.java, false) == null && + suppressCache.filter.invoke(diagnostic) + } + fun clear() { diagnosticList.clear() modificationTracker.incModificationCount() diff --git a/compiler/frontend/src/org/jetbrains/kotlin/storage/LockBasedLazyResolveStorageManager.kt b/compiler/frontend/src/org/jetbrains/kotlin/storage/LockBasedLazyResolveStorageManager.kt index cf1aa29901e..e9db0d08abf 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/storage/LockBasedLazyResolveStorageManager.kt +++ b/compiler/frontend/src/org/jetbrains/kotlin/storage/LockBasedLazyResolveStorageManager.kt @@ -22,7 +22,6 @@ import org.jetbrains.kotlin.resolve.BindingContext import org.jetbrains.kotlin.resolve.BindingTrace import org.jetbrains.kotlin.util.slicedMap.ReadOnlySlice import org.jetbrains.kotlin.util.slicedMap.WritableSlice -import org.jetbrains.kotlin.resolve.TraceEntryFilter import org.jetbrains.kotlin.resolve.diagnostics.Diagnostics import com.intellij.util.containers.ContainerUtil import org.jetbrains.kotlin.psi.KtExpression diff --git a/compiler/incremental-compilation-impl/src/org/jetbrains/kotlin/incremental/multiproject/ModulesApiHistory.kt b/compiler/incremental-compilation-impl/src/org/jetbrains/kotlin/incremental/multiproject/ModulesApiHistory.kt index 8951733c126..ce7ac983cad 100644 --- a/compiler/incremental-compilation-impl/src/org/jetbrains/kotlin/incremental/multiproject/ModulesApiHistory.kt +++ b/compiler/incremental-compilation-impl/src/org/jetbrains/kotlin/incremental/multiproject/ModulesApiHistory.kt @@ -5,7 +5,6 @@ package org.jetbrains.kotlin.incremental.multiproject -import org.jetbrains.kotlin.incremental.IncrementalModuleEntry import org.jetbrains.kotlin.incremental.IncrementalModuleInfo import org.jetbrains.kotlin.incremental.util.Either import java.io.File @@ -23,7 +22,14 @@ object EmptyModulesApiHistory : ModulesApiHistory { } abstract class ModulesApiHistoryBase(protected val modulesInfo: IncrementalModuleInfo) : ModulesApiHistory { - protected val projectRootPath: Path = Paths.get(modulesInfo.projectRoot.absolutePath) + // All project build dirs should have this dir as their parent. For a default project setup, this will + // be the same as root project path. Some projects map output outside of the root project dir, typically + // with //build, and in that case, this path will be . + // This is using set in order to de-dup paths, and avoid duplicate checks when possible. + protected val possibleParentsToBuildDirs: Set = setOf( + Paths.get(modulesInfo.rootProjectBuildDir.parentFile.absolutePath), + Paths.get(modulesInfo.projectRoot.absolutePath) + ) private val dirToHistoryFileCache = HashMap>() override fun historyFilesForChangedFiles(changedFiles: Set): Either> { @@ -76,7 +82,7 @@ abstract class ModulesApiHistoryBase(protected val modulesInfo: IncrementalModul when { module != null -> setOf(module.buildHistoryFile) - parent != null && projectRootPath.isParentOf(parent) -> { + parent != null && isInProjectBuildDir(parent) -> { val parentHistory = getBuildHistoryForDir(parent) when (parentHistory) { is Either.Success> -> parentHistory.value @@ -90,6 +96,10 @@ abstract class ModulesApiHistoryBase(protected val modulesInfo: IncrementalModul return Either.Success(history) } + protected fun isInProjectBuildDir(file: File): Boolean { + return possibleParentsToBuildDirs.any { it.isParentOf(file) } + } + protected abstract fun getBuildHistoryFilesForJar(jar: File): Either> } @@ -145,14 +155,14 @@ class ModulesApiHistoryAndroid(modulesInfo: IncrementalModuleInfo) : ModulesApiH override fun getBuildHistoryFilesForJar(jar: File): Either> { // Module detection is expensive, so we don't don it for jars outside of project dir - if (!projectRootPath.isParentOf(jar)) return Either.Error("Non-project jar is modified $jar") + if (!isInProjectBuildDir(jar)) return Either.Error("Non-project jar is modified $jar") val jarPath = Paths.get(jar.absolutePath) return getHistoryForModuleNames(jarPath, getPossibleModuleNamesFromJar(jarPath)) } override fun getBuildHistoryForDir(file: File): Either> { - if (!projectRootPath.isParentOf(file)) return Either.Error("Non-project file while looking for history $file") + if (!isInProjectBuildDir(file)) return Either.Error("Non-project file while looking for history $file") // check both meta-inf and META-INF directories val moduleNames = diff --git a/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/AbstractIncrementaMultiModulelCompilerRunnerTest.kt b/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/AbstractIncrementaMultiModulelCompilerRunnerTest.kt index c46bee28e71..2c25c1f3612 100644 --- a/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/AbstractIncrementaMultiModulelCompilerRunnerTest.kt +++ b/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/AbstractIncrementaMultiModulelCompilerRunnerTest.kt @@ -32,7 +32,7 @@ abstract class AbstractIncrementalMultiModuleCompilerRunnerTest() protected val incrementalModuleInfo: IncrementalModuleInfo by lazy { - IncrementalModuleInfo(workingDir, dirToModule, nameToModules, jarToClassListFile, jarToModule) + IncrementalModuleInfo(workingDir, workingDir, dirToModule, nameToModules, jarToClassListFile, jarToModule) } protected abstract val modulesApiHistory: ApiHistory diff --git a/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/multiproject/ModulesApiHistoryAndroidTest.kt b/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/multiproject/ModulesApiHistoryAndroidTest.kt index bb3ec09aacc..c783c7de358 100644 --- a/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/multiproject/ModulesApiHistoryAndroidTest.kt +++ b/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/multiproject/ModulesApiHistoryAndroidTest.kt @@ -56,6 +56,7 @@ class ModulesApiHistoryAndroidTest { val info = IncrementalModuleInfo( projectRoot = projectRoot, + rootProjectBuildDir = projectRoot.resolve("build"), dirToModule = mapOf(appKotlinDestination to appEntry, libKotlinDestination to libEntry), nameToModules = mapOf("app" to setOf(appEntry), "lib" to setOf(libEntry)), jarToClassListFile = mapOf(), diff --git a/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/extensions/IrPluginContext.kt b/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/extensions/IrPluginContext.kt index a57353f6f59..858c8b57d38 100644 --- a/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/extensions/IrPluginContext.kt +++ b/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/extensions/IrPluginContext.kt @@ -11,6 +11,7 @@ import org.jetbrains.kotlin.descriptors.ModuleDescriptor import org.jetbrains.kotlin.ir.ObsoleteDescriptorBasedAPI import org.jetbrains.kotlin.ir.builders.IrGeneratorContext import org.jetbrains.kotlin.ir.symbols.* +import org.jetbrains.kotlin.ir.util.IrMessageLogger import org.jetbrains.kotlin.ir.util.ReferenceSymbolTable import org.jetbrains.kotlin.ir.util.TypeTranslator import org.jetbrains.kotlin.name.FqName @@ -36,6 +37,14 @@ interface IrPluginContext : IrGeneratorContext { val platform: TargetPlatform? + /** + * Returns a logger instance to post diagnostic messages from plugin + * + * @param pluginId the unique plugin ID to make it easy to distinguish in log + * @return the logger associated with specified ID + */ + fun createDiagnosticReporter(pluginId: String): IrMessageLogger + // The following API is experimental fun referenceClass(fqName: FqName): IrClassSymbol? fun referenceTypeAlias(fqName: FqName): IrTypeAliasSymbol? diff --git a/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/extensions/IrPluginContextImpl.kt b/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/extensions/IrPluginContextImpl.kt index 22e588abf6e..bf8da2ef0ba 100644 --- a/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/extensions/IrPluginContextImpl.kt +++ b/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/extensions/IrPluginContextImpl.kt @@ -16,6 +16,7 @@ import org.jetbrains.kotlin.ir.declarations.IrConstructor import org.jetbrains.kotlin.ir.descriptors.IrBuiltIns import org.jetbrains.kotlin.ir.linkage.IrDeserializer import org.jetbrains.kotlin.ir.symbols.* +import org.jetbrains.kotlin.ir.util.IrMessageLogger import org.jetbrains.kotlin.ir.util.ReferenceSymbolTable import org.jetbrains.kotlin.ir.util.TypeTranslator import org.jetbrains.kotlin.name.FqName @@ -33,6 +34,7 @@ open class IrPluginContextImpl constructor( override val typeTranslator: TypeTranslator, override val irBuiltIns: IrBuiltIns, val linker: IrDeserializer, + private val diagnosticReporter: IrMessageLogger, override val symbols: BuiltinSymbolsBase = BuiltinSymbolsBase(irBuiltIns, irBuiltIns.builtIns, st) ) : IrPluginContext { @@ -68,6 +70,18 @@ open class IrPluginContextImpl constructor( return symbol } + override fun createDiagnosticReporter(pluginId: String): IrMessageLogger { + return object : IrMessageLogger { + override fun report( + severity: IrMessageLogger.Severity, + message: String, + location: IrMessageLogger.Location? + ) { + diagnosticReporter.report(severity, "[Plugin $pluginId] $message", location) + } + } + } + private fun resolveSymbolCollection(fqName: FqName, referencer: (MemberScope) -> Collection): Collection { val memberScope = resolveMemberScope(fqName) ?: return emptyList() diff --git a/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/lower/LocalDeclarationsLowering.kt b/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/lower/LocalDeclarationsLowering.kt index 3446933e2cb..d881b247b05 100644 --- a/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/lower/LocalDeclarationsLowering.kt +++ b/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/lower/LocalDeclarationsLowering.kt @@ -404,7 +404,7 @@ class LocalDeclarationsLowering( val oldCallee = expression.symbol.owner val newCallee = oldCallee.transformed ?: return expression - val newReflectionTarget = expression.reflectionTarget?.run { owner.transformed } + val newReflectionTarget = expression.reflectionTarget?.run { owner.transformed ?: owner } val typeParameters = if (newCallee is IrConstructor) newCallee.parentAsClass.typeParameters diff --git a/compiler/ir/backend.common/src/org/jetbrains/kotlin/ir/builders/declarations/declarationBuilders.kt b/compiler/ir/backend.common/src/org/jetbrains/kotlin/ir/builders/declarations/declarationBuilders.kt index f98360eeb14..2e42ba90d48 100644 --- a/compiler/ir/backend.common/src/org/jetbrains/kotlin/ir/builders/declarations/declarationBuilders.kt +++ b/compiler/ir/backend.common/src/org/jetbrains/kotlin/ir/builders/declarations/declarationBuilders.kt @@ -168,7 +168,8 @@ fun IrClass.addFunction( this.origin = origin }.apply { if (!isStatic) { - dispatchReceiverParameter = parentAsClass.thisReceiver!!.copyTo(this) + val thisReceiver = parentAsClass.thisReceiver!! + dispatchReceiverParameter = thisReceiver.copyTo(this, type = thisReceiver.type) } } diff --git a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/compiler.kt b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/compiler.kt index 8d705660543..ccc1d64bf62 100644 --- a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/compiler.kt +++ b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/compiler.kt @@ -10,7 +10,6 @@ import org.jetbrains.kotlin.analyzer.AbstractAnalyzerWithCompilerReport import org.jetbrains.kotlin.backend.common.phaser.PhaseConfig import org.jetbrains.kotlin.backend.common.phaser.invokeToplevel import org.jetbrains.kotlin.config.CompilerConfiguration -import org.jetbrains.kotlin.config.languageVersionSettings import org.jetbrains.kotlin.ir.backend.js.lower.generateTests import org.jetbrains.kotlin.ir.backend.js.lower.moveBodilessDeclarationsToSeparatePlace import org.jetbrains.kotlin.ir.backend.js.transformers.irToJs.IrModuleToJsTransformer @@ -80,7 +79,7 @@ fun compile( // Load declarations referenced during `context` initialization val irProviders = listOf(deserializer) - ExternalDependenciesGenerator(symbolTable, irProviders, configuration.languageVersionSettings).generateUnboundSymbolsAsDependencies() + ExternalDependenciesGenerator(symbolTable, irProviders).generateUnboundSymbolsAsDependencies() deserializer.postProcess() symbolTable.noUnboundLeft("Unbound symbols at the end of linker") diff --git a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/JsBridgesConstruction.kt b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/JsBridgesConstruction.kt index 1c540748bb9..e9caad78314 100644 --- a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/JsBridgesConstruction.kt +++ b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/JsBridgesConstruction.kt @@ -7,14 +7,13 @@ package org.jetbrains.kotlin.ir.backend.js.lower import org.jetbrains.kotlin.ir.backend.js.JsIrBackendContext import org.jetbrains.kotlin.ir.backend.js.JsLoweredDeclarationOrigin -import org.jetbrains.kotlin.ir.backend.js.utils.Signature import org.jetbrains.kotlin.ir.backend.js.utils.hasStableJsName import org.jetbrains.kotlin.ir.backend.js.utils.jsFunctionSignature import org.jetbrains.kotlin.ir.declarations.IrDeclarationOrigin import org.jetbrains.kotlin.ir.declarations.IrSimpleFunction class JsBridgesConstruction(context: JsIrBackendContext) : BridgesConstruction(context) { - override fun getFunctionSignature(function: IrSimpleFunction): Signature = + override fun getFunctionSignature(function: IrSimpleFunction): String = jsFunctionSignature(function, context) override fun getBridgeOrigin(bridge: IrSimpleFunction): IrDeclarationOrigin = diff --git a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/JsSingleAbstractMethodLowering.kt b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/JsSingleAbstractMethodLowering.kt index 0fc71862551..5ebede73f40 100644 --- a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/JsSingleAbstractMethodLowering.kt +++ b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/JsSingleAbstractMethodLowering.kt @@ -6,15 +6,15 @@ package org.jetbrains.kotlin.ir.backend.js.lower import org.jetbrains.kotlin.backend.common.BodyLoweringPass -import org.jetbrains.kotlin.backend.common.lower.SingleAbstractMethodLowering import org.jetbrains.kotlin.backend.common.ScopeWithIr +import org.jetbrains.kotlin.backend.common.lower.SingleAbstractMethodLowering import org.jetbrains.kotlin.descriptors.DescriptorVisibilities import org.jetbrains.kotlin.descriptors.DescriptorVisibility import org.jetbrains.kotlin.ir.backend.js.JsIrBackendContext import org.jetbrains.kotlin.ir.declarations.* import org.jetbrains.kotlin.ir.expressions.IrBody -import org.jetbrains.kotlin.ir.symbols.IrSymbol import org.jetbrains.kotlin.ir.expressions.IrTypeOperatorCall +import org.jetbrains.kotlin.ir.symbols.IrSymbol import org.jetbrains.kotlin.ir.types.IrType import org.jetbrains.kotlin.ir.types.classOrNull import org.jetbrains.kotlin.ir.types.defaultType @@ -24,9 +24,8 @@ import org.jetbrains.kotlin.ir.util.render class JsSingleAbstractMethodLowering(context: JsIrBackendContext) : SingleAbstractMethodLowering(context), BodyLoweringPass { - override fun getWrapperVisibility(expression: IrTypeOperatorCall, scopes: List): DescriptorVisibility { - return DescriptorVisibilities.PRIVATE - } + override fun getWrapperVisibility(expression: IrTypeOperatorCall, scopes: List): DescriptorVisibility = + DescriptorVisibilities.LOCAL override val IrType.needEqualsHashCodeMethods get() = false diff --git a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/MoveBodilessDeclarationsToSeparatePlace.kt b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/MoveBodilessDeclarationsToSeparatePlace.kt index 3a812e56db2..3516496060b 100644 --- a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/MoveBodilessDeclarationsToSeparatePlace.kt +++ b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/MoveBodilessDeclarationsToSeparatePlace.kt @@ -48,6 +48,7 @@ private fun isBuiltInClass(declaration: IrDeclaration): Boolean = fun moveBodilessDeclarationsToSeparatePlace(context: JsIrBackendContext, moduleFragment: IrModuleFragment) { MoveBodilessDeclarationsToSeparatePlaceLowering(context).let { moveBodiless -> moduleFragment.files.forEach { + markExternalDeclarations(it) moveBodiless.lower(it) } } @@ -112,3 +113,31 @@ class MoveBodilessDeclarationsToSeparatePlaceLowering(private val context: JsIrB }, null) } } + +fun markExternalDeclarations(packageFragment: IrPackageFragment) { + for (declaration in packageFragment.declarations) { + if (declaration is IrPossiblyExternalDeclaration) { + if (declaration.isExternal) { + markNestedExternalDeclarations(declaration) + } + } + } +} + + +fun markNestedExternalDeclarations(declaration: IrDeclaration) { + if (declaration is IrPossiblyExternalDeclaration) { + declaration.isExternal = true + } + if (declaration is IrProperty) { + declaration.getter?.isExternal = true + declaration.setter?.isExternal = true + declaration.backingField?.isExternal = true + } + if (declaration is IrClass) { + declaration.declarations.forEach { + markNestedExternalDeclarations(it) + } + } +} + diff --git a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/ObjectLowering.kt b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/ObjectLowering.kt index 8627aac6678..eb297a41f3f 100644 --- a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/ObjectLowering.kt +++ b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/ObjectLowering.kt @@ -114,6 +114,7 @@ private fun JsCommonBackendContext.getOrCreateGetInstanceFunction(obj: IrClass) name = Name.identifier(obj.name.asString() + "_getInstance") returnType = obj.defaultType origin = JsLoweredDeclarationOrigin.OBJECT_GET_INSTANCE_FUNCTION + visibility = obj.visibility }.apply { parent = obj.parent } diff --git a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/transformers/irToJs/IrElementToJsExpressionTransformer.kt b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/transformers/irToJs/IrElementToJsExpressionTransformer.kt index 2889b4cc274..9cdb0b6933a 100644 --- a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/transformers/irToJs/IrElementToJsExpressionTransformer.kt +++ b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/transformers/irToJs/IrElementToJsExpressionTransformer.kt @@ -111,13 +111,6 @@ class IrElementToJsExpressionTransformer : BaseIrElementToJsNodeTransformer { override fun visitSimpleFunction(declaration: IrSimpleFunction, context: JsGenerationContext): JsFunction { val funcName = if (declaration.dispatchReceiverParameter == null) { - context.getNameForStaticFunction(declaration) + if (declaration.parent is IrFunction) { + context.getNameForValueDeclaration(declaration) + } else { + context.getNameForStaticFunction(declaration) + } } else { context.getNameForMemberFunction(declaration) } diff --git a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/transformers/irToJs/IrModuleToJsTransformer.kt b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/transformers/irToJs/IrModuleToJsTransformer.kt index 269a63319ff..968bc4fbc43 100644 --- a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/transformers/irToJs/IrModuleToJsTransformer.kt +++ b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/transformers/irToJs/IrModuleToJsTransformer.kt @@ -127,16 +127,18 @@ class IrModuleToJsTransformer( ): String { val nameGenerator = refInfo.withReferenceTracking( - IrNamerImpl(newNameTables = namer), + IrNamerImpl(newNameTables = namer, backendContext), modules ) val staticContext = JsStaticContext( backendContext = backendContext, - irNamer = nameGenerator + irNamer = nameGenerator, + globalNameScope = namer.globalNames ) val rootContext = JsGenerationContext( currentFunction = null, - staticContext = staticContext + staticContext = staticContext, + localNames = LocalNameGenerator(NameScope.EmptyScope) ) val (importStatements, importedJsModules) = diff --git a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/transformers/irToJs/JsClassGenerator.kt b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/transformers/irToJs/JsClassGenerator.kt index 843b9838f75..13ff53bbc25 100644 --- a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/transformers/irToJs/JsClassGenerator.kt +++ b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/transformers/irToJs/JsClassGenerator.kt @@ -5,12 +5,10 @@ package org.jetbrains.kotlin.ir.backend.js.transformers.irToJs -import org.jetbrains.kotlin.descriptors.ClassKind import org.jetbrains.kotlin.descriptors.DescriptorVisibilities import org.jetbrains.kotlin.ir.backend.js.export.isExported import org.jetbrains.kotlin.ir.backend.js.utils.* import org.jetbrains.kotlin.ir.declarations.* -import org.jetbrains.kotlin.ir.expressions.IrClassReference import org.jetbrains.kotlin.ir.symbols.IrClassSymbol import org.jetbrains.kotlin.ir.symbols.IrClassifierSymbol import org.jetbrains.kotlin.ir.types.IrType @@ -26,8 +24,11 @@ class JsClassGenerator(private val irClass: IrClass, val context: JsGenerationCo private val className = context.getNameForClass(irClass) private val classNameRef = className.makeRef() private val baseClass: IrType? = irClass.superTypes.firstOrNull { !it.classifierOrFail.isInterface } - private val baseClassName = baseClass?.let { - context.getNameForClass(baseClass.classifierOrFail.owner as IrClass) + + private val baseClassName by lazy { // Lazy in case was not collected by namer during JsClassGenerator construction + baseClass?.let { + context.getNameForClass(baseClass.classifierOrFail.owner as IrClass) + } } private val classPrototypeRef = prototypeOf(classNameRef) private val classBlock = JsGlobalBlock() diff --git a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/transformers/irToJs/jsAstUtils.kt b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/transformers/irToJs/jsAstUtils.kt index a4b64bb3fa6..7f3400e2886 100644 --- a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/transformers/irToJs/jsAstUtils.kt +++ b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/transformers/irToJs/jsAstUtils.kt @@ -14,6 +14,8 @@ import org.jetbrains.kotlin.ir.declarations.IrSimpleFunction import org.jetbrains.kotlin.ir.expressions.* import org.jetbrains.kotlin.ir.symbols.IrFunctionSymbol import org.jetbrains.kotlin.ir.util.* +import org.jetbrains.kotlin.ir.visitors.acceptChildrenVoid +import org.jetbrains.kotlin.ir.visitors.acceptVoid import org.jetbrains.kotlin.js.backend.ast.* import org.jetbrains.kotlin.util.OperatorNameConventions @@ -50,7 +52,14 @@ fun translateFunction(declaration: IrFunction, name: JsName?, context: JsGenerat return function } - val functionContext = context.newDeclaration(declaration) + val localNameGenerator = context.localNames + ?: LocalNameGenerator(context.staticContext.globalNameScope).also { + declaration.acceptChildrenVoid(it) + declaration.parentClassOrNull?.thisReceiver?.acceptVoid(it) + } + + val functionContext = context.newDeclaration(declaration, localNameGenerator) + val functionParams = declaration.valueParameters.map { functionContext.getNameForValueDeclaration(it) } val body = declaration.body?.accept(IrElementToJsStatementTransformer(), functionContext) as? JsBlock ?: JsBlock() diff --git a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/utils/IrNamer.kt b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/utils/IrNamer.kt index d21f466dc29..f401d082059 100644 --- a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/utils/IrNamer.kt +++ b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/utils/IrNamer.kt @@ -6,21 +6,81 @@ package org.jetbrains.kotlin.ir.backend.js.utils import org.jetbrains.kotlin.ir.declarations.* -import org.jetbrains.kotlin.ir.expressions.IrLoop +import org.jetbrains.kotlin.ir.util.parentAsClass import org.jetbrains.kotlin.js.backend.ast.JsName import org.jetbrains.kotlin.js.backend.ast.JsNameRef interface IrNamer { - fun getNameForConstructor(constructor: IrConstructor): JsName fun getNameForMemberFunction(function: IrSimpleFunction): JsName fun getNameForMemberField(field: IrField): JsName - fun getNameForField(field: IrField): JsName - fun getNameForValueDeclaration(declaration: IrValueDeclaration): JsName - fun getNameForClass(klass: IrClass): JsName - fun getNameForStaticFunction(function: IrSimpleFunction): JsName fun getNameForStaticDeclaration(declaration: IrDeclarationWithName): JsName - fun getNameForProperty(property: IrProperty): JsName + fun getNameForStaticFunction(function: IrSimpleFunction): JsName + fun getNameForField(field: IrField): JsName + fun getNameForConstructor(constructor: IrConstructor): JsName + fun getNameForClass(klass: IrClass): JsName fun getRefForExternalClass(klass: IrClass): JsNameRef - fun getNameForLoop(loop: IrLoop): JsName? + fun getNameForProperty(property: IrProperty): JsName fun getAssociatedObjectKey(irClass: IrClass): Int? +} + +abstract class IrNamerBase : IrNamer { + abstract override fun getNameForMemberFunction(function: IrSimpleFunction): JsName + abstract override fun getNameForMemberField(field: IrField): JsName + abstract override fun getNameForStaticDeclaration(declaration: IrDeclarationWithName): JsName + + protected fun String.toJsName() = JsName(this) + + override fun getNameForStaticFunction(function: IrSimpleFunction): JsName = + getNameForStaticDeclaration(function) + + override fun getNameForField(field: IrField): JsName { + return if (field.isStatic || field.parent is IrScript) { + getNameForStaticDeclaration(field) + } else { + getNameForMemberField(field) + } + } + + override fun getNameForConstructor(constructor: IrConstructor): JsName = + getNameForStaticDeclaration(constructor.parentAsClass) + + override fun getNameForClass(klass: IrClass): JsName = + getNameForStaticDeclaration(klass) + + override fun getRefForExternalClass(klass: IrClass): JsNameRef { + val parent = klass.parent + if (klass.isCompanion) + return getRefForExternalClass(parent as IrClass) + + val currentClassName = klass.getJsNameOrKotlinName().identifier + return when (parent) { + is IrClass -> + JsNameRef(currentClassName, getRefForExternalClass(parent)) + + is IrPackageFragment -> { + getNameForStaticDeclaration(klass).makeRef() + } + + else -> + error("Unsupported external class parent $parent") + } + } + + override fun getNameForProperty(property: IrProperty): JsName { + return if (property.parent is IrClass) { + property.getJsNameOrKotlinName().asString().toJsName() + } else { + getNameForStaticDeclaration(property) + } + } + + private val associatedObjectKeyMap = mutableMapOf() + + override fun getAssociatedObjectKey(irClass: IrClass): Int? { + if (irClass.isAssociatedObjectAnnotatedAnnotation) { + + return associatedObjectKeyMap.getOrPut(irClass) { associatedObjectKeyMap.size } + } + return null + } } \ No newline at end of file diff --git a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/utils/IrNamerImpl.kt b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/utils/IrNamerImpl.kt index b7fe32e4bcd..2674710bf3b 100644 --- a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/utils/IrNamerImpl.kt +++ b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/utils/IrNamerImpl.kt @@ -5,82 +5,27 @@ package org.jetbrains.kotlin.ir.backend.js.utils -import org.jetbrains.kotlin.ir.declarations.* -import org.jetbrains.kotlin.ir.expressions.IrLoop -import org.jetbrains.kotlin.ir.util.parentAsClass +import org.jetbrains.kotlin.ir.backend.js.JsIrBackendContext +import org.jetbrains.kotlin.ir.declarations.IrDeclarationWithName +import org.jetbrains.kotlin.ir.declarations.IrField +import org.jetbrains.kotlin.ir.declarations.IrSimpleFunction import org.jetbrains.kotlin.js.backend.ast.JsName -import org.jetbrains.kotlin.js.backend.ast.JsNameRef -import org.jetbrains.kotlin.js.backend.ast.JsRootScope - -class IrNamerImpl(private val newNameTables: NameTables) : IrNamer { - - private fun String.toJsName() = JsName(this) +class IrNamerImpl( + private val newNameTables: NameTables, + private val context: JsIrBackendContext, +) : IrNamerBase() { override fun getNameForStaticDeclaration(declaration: IrDeclarationWithName): JsName = newNameTables.getNameForStaticDeclaration(declaration).toJsName() - override fun getNameForLoop(loop: IrLoop): JsName? = - newNameTables.getNameForLoop(loop)?.toJsName() - - override fun getNameForConstructor(constructor: IrConstructor): JsName { - return getNameForStaticDeclaration(constructor.parentAsClass) - } - override fun getNameForMemberFunction(function: IrSimpleFunction): JsName { require(function.dispatchReceiverParameter != null) - return newNameTables.getNameForMemberFunction(function).toJsName() + val signature = jsFunctionSignature(function, context) + return signature.toJsName() } override fun getNameForMemberField(field: IrField): JsName { require(!field.isStatic) return newNameTables.getNameForMemberField(field).toJsName() } - - override fun getNameForField(field: IrField): JsName { - return if (field.isStatic || field.parent is IrScript) { - getNameForStaticDeclaration(field) - } else { - getNameForMemberField(field) - } - } - - override fun getNameForValueDeclaration(declaration: IrValueDeclaration): JsName = - getNameForStaticDeclaration(declaration) - - override fun getNameForClass(klass: IrClass): JsName = - getNameForStaticDeclaration(klass) - - override fun getNameForStaticFunction(function: IrSimpleFunction): JsName = - getNameForStaticDeclaration(function) - - override fun getNameForProperty(property: IrProperty): JsName = - property.getJsNameOrKotlinName().asString().toJsName() - - override fun getRefForExternalClass(klass: IrClass): JsNameRef { - val parent = klass.parent - if (klass.isCompanion) - return getRefForExternalClass(parent as IrClass) - - val currentClassName = klass.getJsNameOrKotlinName().identifier - return when (parent) { - is IrClass -> - JsNameRef(currentClassName, getRefForExternalClass(parent)) - - is IrPackageFragment -> - JsNameRef(currentClassName) - - else -> - error("Unsupported external class parent $parent") - } - } - - private val associatedObjectKeyMap = mutableMapOf() - - override fun getAssociatedObjectKey(irClass: IrClass): Int? { - if (irClass.isAssociatedObjectAnnotatedAnnotation) { - - return associatedObjectKeyMap.getOrPut(irClass) { associatedObjectKeyMap.size } - } - return null - } } diff --git a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/utils/JsGenerationContext.kt b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/utils/JsGenerationContext.kt index 652269727ae..0ce3066d03f 100644 --- a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/utils/JsGenerationContext.kt +++ b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/utils/JsGenerationContext.kt @@ -5,8 +5,10 @@ package org.jetbrains.kotlin.ir.backend.js.utils +import org.jetbrains.kotlin.ir.declarations.IrDeclarationWithName import org.jetbrains.kotlin.ir.declarations.IrFunction import org.jetbrains.kotlin.ir.declarations.IrSimpleFunction +import org.jetbrains.kotlin.ir.expressions.IrLoop import org.jetbrains.kotlin.ir.symbols.IrFunctionSymbol import org.jetbrains.kotlin.ir.util.isSuspend import org.jetbrains.kotlin.js.backend.ast.JsName @@ -23,12 +25,14 @@ val emptyScope: JsScope class JsGenerationContext( val currentFunction: IrFunction?, - val staticContext: JsStaticContext + val staticContext: JsStaticContext, + val localNames: LocalNameGenerator? = null ): IrNamer by staticContext { - fun newDeclaration(func: IrFunction? = null): JsGenerationContext { + fun newDeclaration(func: IrFunction? = null, localNames: LocalNameGenerator? = null): JsGenerationContext { return JsGenerationContext( currentFunction = func, - staticContext = staticContext + staticContext = staticContext, + localNames = localNames, ) } @@ -39,10 +43,21 @@ class JsGenerationContext( if (currentFunction!!.isSuspend) { JsNameRef(Namer.CONTINUATION) } else { - getNameForValueDeclaration(currentFunction.valueParameters.last()).makeRef() + JsNameRef(this.getNameForValueDeclaration(currentFunction.valueParameters.last())) } } + fun getNameForValueDeclaration(declaration: IrDeclarationWithName): JsName { + val name = localNames!!.variableNames.names[declaration] + ?: error("Variable name is not found ${declaration.name}") + return JsName(name) + } + + fun getNameForLoop(loop: IrLoop): JsName? { + val name = localNames!!.localLoopNames.names[loop] ?: return null + return JsName(name) + } + private fun isCoroutineDoResume(): Boolean { val overriddenSymbols = (currentFunction as? IrSimpleFunction)?.overriddenSymbols ?: return false return overriddenSymbols.any { diff --git a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/utils/JsStaticContext.kt b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/utils/JsStaticContext.kt index 72e84ac97a6..4c6dfbf502a 100644 --- a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/utils/JsStaticContext.kt +++ b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/utils/JsStaticContext.kt @@ -8,16 +8,15 @@ package org.jetbrains.kotlin.ir.backend.js.utils import org.jetbrains.kotlin.ir.backend.js.JsIrBackendContext import org.jetbrains.kotlin.ir.backend.js.transformers.irToJs.JsIntrinsicTransformers import org.jetbrains.kotlin.ir.backend.js.transformers.irToJs.JsIrClassModel -import org.jetbrains.kotlin.ir.declarations.IrSimpleFunction import org.jetbrains.kotlin.ir.symbols.IrClassSymbol import org.jetbrains.kotlin.js.backend.ast.JsGlobalBlock class JsStaticContext( val backendContext: JsIrBackendContext, - private val irNamer: IrNamer + private val irNamer: IrNamer, + val globalNameScope: NameScope ) : IrNamer by irNamer { - val intrinsics = JsIntrinsicTransformers(backendContext) val classModels = mutableMapOf() val coroutineImplDeclaration = backendContext.ir.symbols.coroutineImpl.owner diff --git a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/utils/NameTables.kt b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/utils/NameTables.kt index f5163534a62..9986206a876 100644 --- a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/utils/NameTables.kt +++ b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/utils/NameTables.kt @@ -17,55 +17,60 @@ import org.jetbrains.kotlin.ir.expressions.IrWhen import org.jetbrains.kotlin.ir.types.isUnit import org.jetbrains.kotlin.ir.util.fqNameWhenAvailable import org.jetbrains.kotlin.ir.util.isEffectivelyExternal -import org.jetbrains.kotlin.ir.util.isEnumClass import org.jetbrains.kotlin.ir.util.render import org.jetbrains.kotlin.ir.visitors.IrElementVisitorVoid import org.jetbrains.kotlin.ir.visitors.acceptChildrenVoid -import org.jetbrains.kotlin.ir.visitors.acceptVoid import org.jetbrains.kotlin.js.naming.isES5IdentifierPart import org.jetbrains.kotlin.js.naming.isES5IdentifierStart +import org.jetbrains.kotlin.js.naming.isValidES5Identifier import org.jetbrains.kotlin.name.FqName import org.jetbrains.kotlin.utils.addToStdlib.ifNotEmpty import java.util.* +import kotlin.collections.set +import kotlin.math.abs // TODO remove direct usages of [mapToKey] from [NameTable] & co and move it to scripting & REPL infrastructure. Review usages. private fun mapToKey(declaration: T): String { return with(JsManglerIr) { if (declaration is IrDeclaration) { declaration.hashedMangle.toString() - } else if (declaration is Signature) { - declaration.toString().hashMangle.toString() + } else if (declaration is String) { + declaration.hashMangle.toString() } else { error("Key is not generated for " + declaration?.let { it::class.simpleName }) } } } +abstract class NameScope { + abstract fun isReserved(name: String): Boolean + + object EmptyScope : NameScope() { + override fun isReserved(name: String): Boolean = false + } +} + class NameTable( - val parent: NameTable<*>? = null, + val parent: NameScope = EmptyScope, val reserved: MutableSet = mutableSetOf(), - val sanitizer: (String) -> String = ::sanitizeName, val mappedNames: MutableMap? = null -) { - var finished = false +) : NameScope() { val names = mutableMapOf() - private fun isReserved(name: String): Boolean { - if (parent != null && parent.isReserved(name)) - return true - return name in reserved + private val suggestedNameLastIdx = mutableMapOf() + + override fun isReserved(name: String): Boolean { + return parent.isReserved(name) || name in reserved } fun declareStableName(declaration: T, name: String) { - if (parent != null) assert(parent.finished) - assert(!finished) names[declaration] = name reserved.add(name) mappedNames?.set(mapToKey(declaration), name) } fun declareFreshName(declaration: T, suggestedName: String): String { - val freshName = findFreshName(sanitizer(suggestedName)) + val freshName = findFreshName(sanitizeName(suggestedName)) declareStableName(declaration, freshName) return freshName } @@ -74,7 +79,7 @@ class NameTable( if (!isReserved(suggestedName)) return suggestedName - var i = 0 + var i = suggestedNameLastIdx[suggestedName] ?: 0 fun freshName() = suggestedName + "_" + i @@ -82,6 +87,9 @@ class NameTable( while (isReserved(freshName())) { i++ } + + suggestedNameLastIdx[suggestedName] = i + return freshName() } } @@ -93,33 +101,25 @@ fun NameTable.dump(): String = "--- $declRef => $name" } -sealed class Signature -data class StableNameSignature(val name: String) : Signature() -data class BackingFieldSignature(val field: IrField) : Signature() -data class ParameterTypeBasedSignature(val mangledName: String, val suggestedName: String) : Signature() -fun fieldSignature(field: IrField): Signature { - if (field.isEffectivelyExternal()) { - return StableNameSignature(field.name.identifier) - } +private const val RESERVED_MEMBER_NAME_SUFFIX = "_k$" - return BackingFieldSignature(field) -} - -fun jsFunctionSignature(declaration: IrFunction, context: JsIrBackendContext?): Signature { +fun jsFunctionSignature(declaration: IrFunction, context: JsIrBackendContext?): String { require(!declaration.isStaticMethodOfClass) require(declaration.dispatchReceiverParameter != null) val declarationName = declaration.getJsNameOrKotlinName().asString() if (declaration.hasStableJsName(context)) { - return StableNameSignature(declarationName) + // TODO: Handle reserved suffix in FE + require(!declarationName.endsWith(RESERVED_MEMBER_NAME_SUFFIX)) { + "Function ${declaration.fqNameWhenAvailable} uses reserved name suffix \"$RESERVED_MEMBER_NAME_SUFFIX\"" + } + return declarationName } val nameBuilder = StringBuilder() - nameBuilder.append(declarationName) - // TODO should we skip type parameters and use upper bound of type parameter when print type of value parameters? declaration.typeParameters.ifNotEmpty { nameBuilder.append("_\$t") @@ -141,20 +141,19 @@ fun jsFunctionSignature(declaration: IrFunction, context: JsIrBackendContext?): val signature = nameBuilder.toString() - // TODO: Check reserved names - return ParameterTypeBasedSignature(signature, declarationName) + // TODO: Use better hashCode + return sanitizeName(declarationName) + "_" + abs(signature.hashCode()).toString(Character.MAX_RADIX) + RESERVED_MEMBER_NAME_SUFFIX } class NameTables( - packages: List, + packages: Iterable, reservedForGlobal: MutableSet = mutableSetOf(), reservedForMember: MutableSet = mutableSetOf(), val mappedNames: MutableMap? = null, private val context: JsIrBackendContext? = null ) { val globalNames: NameTable - private val memberNames: NameTable - private val localNames = mutableMapOf>() + private val memberNames: NameTable private val loopNames = mutableMapOf() init { @@ -171,74 +170,48 @@ class NameTables( mappedNames = mappedNames ) - val classDeclaration = mutableListOf() for (p in packages) { for (declaration in p.declarations) { - generateNamesForTopLevelDecl(declaration) + processTopLevelLocalDecl(declaration) + processNonTopLevelLocalDecl(declaration) + declaration.acceptChildrenVoid(object : IrElementVisitorVoid { + override fun visitElement(element: IrElement) { + element.acceptChildrenVoid(this) + } + + override fun visitDeclaration(declaration: IrDeclarationBase) { + processNonTopLevelLocalDecl(declaration) + super.visitDeclaration(declaration) + } + }) if (declaration is IrScript) { for (memberDecl in declaration.statements) { if (memberDecl is IrDeclaration) { - generateNamesForTopLevelDecl(memberDecl) + processTopLevelLocalDecl(memberDecl) if (memberDecl is IrClass) { - classDeclaration += memberDecl + processNonTopLevelLocalDecl(memberDecl) } } } } } } + } - globalNames.finished = true - - for (declaration in classDeclaration) { - acceptDeclaration(declaration) - } - - for (p in packages) { - for (declaration in p.declarations) { - acceptDeclaration(declaration) + private fun acceptNonExternalClass(declaration: IrClass) { + for (memberDecl in declaration.declarations) { + when (memberDecl) { + is IrField -> + generateNameForMemberField(memberDecl) } } } - private fun acceptDeclaration(declaration: IrDeclaration) { - val localNameGenerator = LocalNameGenerator(declaration) - + private fun processNonTopLevelLocalDecl(declaration: IrDeclaration) { if (declaration is IrClass) { - if (declaration.isEffectivelyExternal()) { - declaration.acceptChildrenVoid(object : IrElementVisitorVoid { - override fun visitElement(element: IrElement) { - element.acceptChildrenVoid(this) - } - - override fun visitSimpleFunction(declaration: IrSimpleFunction) { - val parent = declaration.parent - if (parent is IrClass && !parent.isEnumClass) { - generateNameForMemberFunction(declaration) - } - } - - override fun visitField(declaration: IrField) { - val parent = declaration.parent - if (parent is IrClass && !parent.isEnumClass) { - generateNameForMemberField(declaration) - } - } - }) - } else { - declaration.thisReceiver!!.acceptVoid(localNameGenerator) - for (memberDecl in declaration.declarations) { - memberDecl.acceptChildrenVoid(LocalNameGenerator(memberDecl)) - when (memberDecl) { - is IrSimpleFunction -> - generateNameForMemberFunction(memberDecl) - is IrField -> - generateNameForMemberField(memberDecl) - } - } + if (!declaration.isEffectivelyExternal()) { + acceptNonExternalClass(declaration) } - } else { - declaration.acceptChildrenVoid(localNameGenerator) } } @@ -262,7 +235,6 @@ class NameTables( globalNames.names.addAllIfAbsent(table.globalNames.names) memberNames.names.addAllIfAbsent(table.memberNames.names) - localNames.addAllIfAbsent(table.localNames) loopNames.addAllIfAbsent(table.loopNames) globalNames.reserved.addAll(table.globalNames.reserved) @@ -272,49 +244,23 @@ class NameTables( private fun generateNameForMemberField(field: IrField) { require(!field.isTopLevel) require(!field.isStatic) - val signature = fieldSignature(field) if (field.isEffectivelyExternal()) { - memberNames.declareStableName(signature, field.name.identifier) + memberNames.declareStableName(field, field.name.identifier) } else { - memberNames.declareFreshName(signature, "_" + sanitizeName(field.name.asString())) - } - } - - private fun generateNameForMemberFunction(declaration: IrSimpleFunction) { - when (val signature = jsFunctionSignature(declaration, context)) { - is StableNameSignature -> memberNames.declareStableName(signature, signature.name) - is ParameterTypeBasedSignature -> memberNames.declareFreshName(signature, signature.suggestedName) + memberNames.declareFreshName(field, "_" + sanitizeName(field.name.asString())) } } @Suppress("unused") fun dump(): String { - val local = localNames.toList().joinToString("\n") { (decl, table) -> - val declRef = (decl as? IrDeclarationWithName)?.fqNameWhenAvailable ?: decl - "\nLocal names for $declRef:\n${table.dump()}\n" - } - return "Global names:\n${globalNames.dump()}" + - // "\nMember names:\n${memberNames.dump()}" + - "\nLocal names:\n$local\n" + return "Global names:\n${globalNames.dump()}" } fun getNameForStaticDeclaration(declaration: IrDeclarationWithName): String { val global: String? = globalNames.names[declaration] if (global != null) return global - var parent: IrDeclarationParent = declaration.parent - while (parent is IrDeclaration) { - val parentLocalNames = localNames[parent] - if (parentLocalNames != null) { - val localName = parentLocalNames.names[declaration] - if (localName != null) - return localName - } - parent = parent.parent - } - - mappedNames?.get(mapToKey(declaration))?.let { return it } @@ -323,8 +269,7 @@ class NameTables( } fun getNameForMemberField(field: IrField): String { - val signature = fieldSignature(field) - val name = memberNames.names[signature] ?: mappedNames?.get(mapToKey(signature)) + val name = memberNames.names[field] ?: mappedNames?.get(mapToKey(field)) // TODO investigate if (name == null) { @@ -334,24 +279,12 @@ class NameTables( return name } - fun getNameForMemberFunction(function: IrSimpleFunction): String { - val signature = jsFunctionSignature(function, context) - val name = memberNames.names[signature] ?: mappedNames?.get(mapToKey(signature)) - - // TODO Add a compiler flag, which enables this behaviour - // TODO remove in DCE - if (name == null) { - return sanitizeName(function.name.asString()) + "__error" // TODO one case is a virtual method of an abstract class with no implementation - } - - return name - } - - private fun generateNamesForTopLevelDecl(declaration: IrDeclaration) { + private fun processTopLevelLocalDecl(declaration: IrDeclaration) { when { declaration !is IrDeclarationWithName -> return + // TODO: Handle JsQualifier declaration.isEffectivelyExternal() && (declaration.getJsModule() == null || declaration.isJsNonModule()) -> globalNames.declareStableName(declaration, declaration.getJsNameOrKotlinName().identifier) @@ -360,74 +293,77 @@ class NameTables( } } - inner class LocalNameGenerator(parentDeclaration: IrDeclaration) : IrElementVisitorVoid { - val table = NameTable(globalNames) +} - private val breakableDeque: Deque = LinkedList() +class LocalNameGenerator(parentScope: NameScope) : IrElementVisitorVoid { + val variableNames = NameTable(parentScope) + val localLoopNames = NameTable() - init { - localNames[parentDeclaration] = table - } + private val breakableDeque: Deque = LinkedList() - private val localLoopNames = NameTable() - override fun visitElement(element: IrElement) { - element.acceptChildrenVoid(this) - } + override fun visitElement(element: IrElement) { + element.acceptChildrenVoid(this) + } - override fun visitDeclaration(declaration: IrDeclarationBase) { - if (declaration is IrDeclarationWithName) { - table.declareFreshName(declaration, declaration.name.asString()) - } - super.visitDeclaration(declaration) - } - - override fun visitBreak(jump: IrBreak) { - val loop = jump.loop - if (loop.label == null && loop != breakableDeque.firstOrNull()) { - persistLoopName(SYNTHETIC_LOOP_LABEL, loop) - } - - super.visitBreak(jump) - } - - override fun visitWhen(expression: IrWhen) { - breakableDeque.push(expression) - - super.visitWhen(expression) - - breakableDeque.pop() - } - - override fun visitLoop(loop: IrLoop) { - breakableDeque.push(loop) - - super.visitLoop(loop) - - breakableDeque.pop() - - val label = loop.label - - if (label != null) { - persistLoopName(label, loop) - } - } - - private fun persistLoopName(label: String, loop: IrLoop) { - localLoopNames.declareFreshName(loop, label) - loopNames[loop] = localLoopNames.names[loop]!! + override fun visitDeclaration(declaration: IrDeclarationBase) { + super.visitDeclaration(declaration) + if (declaration is IrDeclarationWithName) { + variableNames.declareFreshName(declaration, declaration.name.asString()) } } - fun getNameForLoop(loop: IrLoop): String? = - loopNames[loop] + override fun visitBreak(jump: IrBreak) { + val loop = jump.loop + if (loop.label == null && loop != breakableDeque.firstOrNull()) { + persistLoopName(SYNTHETIC_LOOP_LABEL, loop) + } + + super.visitBreak(jump) + } + + override fun visitWhen(expression: IrWhen) { + breakableDeque.push(expression) + + super.visitWhen(expression) + + breakableDeque.pop() + } + + override fun visitLoop(loop: IrLoop) { + breakableDeque.push(loop) + + super.visitLoop(loop) + + breakableDeque.pop() + + val label = loop.label + + if (label != null) { + persistLoopName(label, loop) + } + } + + private fun persistLoopName(label: String, loop: IrLoop) { + localLoopNames.declareFreshName(loop, label) + } } fun sanitizeName(name: String): String { + if (name.isValidES5Identifier()) return name if (name.isEmpty()) return "_" + val builder = StringBuilder() + val first = name.first().let { if (it.isES5IdentifierStart()) it else '_' } - return first.toString() + name.drop(1).map { if (it.isES5IdentifierPart()) it else '_' }.joinToString("") + builder.append(first) + + for (idx in 1..name.lastIndex) { + val c = name[idx] + builder.append(if (c.isES5IdentifierPart()) c else '_') + } + + return builder.toString() } private const val SYNTHETIC_LOOP_LABEL = "\$l\$break" diff --git a/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/JvmIrCodegenFactory.kt b/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/JvmIrCodegenFactory.kt index 862507de227..51a4cb98c19 100644 --- a/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/JvmIrCodegenFactory.kt +++ b/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/JvmIrCodegenFactory.kt @@ -21,7 +21,6 @@ import org.jetbrains.kotlin.descriptors.ModuleDescriptor import org.jetbrains.kotlin.descriptors.konan.DeserializedKlibModuleOrigin import org.jetbrains.kotlin.descriptors.konan.KlibModuleOrigin import org.jetbrains.kotlin.idea.MainFunctionDetector -import org.jetbrains.kotlin.ir.backend.jvm.serialization.EmptyLoggingContext import org.jetbrains.kotlin.ir.backend.jvm.serialization.JvmIrLinker import org.jetbrains.kotlin.ir.backend.jvm.serialization.JvmManglerDesc import org.jetbrains.kotlin.ir.builders.TranslationPluginContext @@ -63,6 +62,7 @@ class JvmIrCodegenFactory(private val phaseConfig: PhaseConfig) : CodegenFactory val mangler = JvmManglerDesc(MainFunctionDetector(state.bindingContext, state.languageVersionSettings)) val psi2ir = Psi2IrTranslator(state.languageVersionSettings, Psi2IrConfiguration(ignoreErrors)) val symbolTable = SymbolTable(JvmIdSignatureDescriptor(mangler), IrFactoryImpl, JvmNameProvider) + val messageLogger = state.configuration[IrMessageLogger.IR_MESSAGE_LOGGER] ?: IrMessageLogger.None val psi2irContext = psi2ir.createGeneratorContext(state.module, state.bindingContext, symbolTable, extensions) val pluginExtensions = IrGenerationExtension.getInstances(state.project) val functionFactory = IrFunctionFactory(psi2irContext.irBuiltIns, symbolTable) @@ -85,7 +85,7 @@ class JvmIrCodegenFactory(private val phaseConfig: PhaseConfig) : CodegenFactory } val irLinker = JvmIrLinker( psi2irContext.moduleDescriptor, - EmptyLoggingContext, + messageLogger, psi2irContext.irBuiltIns, symbolTable, functionFactory, @@ -98,7 +98,15 @@ class JvmIrCodegenFactory(private val phaseConfig: PhaseConfig) : CodegenFactory psi2irContext.run { val symbols = BuiltinSymbolsBase(irBuiltIns, moduleDescriptor.builtIns, symbolTable.lazyWrapper) IrPluginContextImpl( - moduleDescriptor, bindingContext, languageVersionSettings, symbolTable, typeTranslator, irBuiltIns, irLinker, symbols + moduleDescriptor, + bindingContext, + languageVersionSettings, + symbolTable, + typeTranslator, + irBuiltIns, + irLinker, + messageLogger, + symbols ) } } @@ -171,7 +179,7 @@ class JvmIrCodegenFactory(private val phaseConfig: PhaseConfig) : CodegenFactory symbolTable, phaseConfig, extensions, backendExtension ) /* JvmBackendContext creates new unbound symbols, have to resolve them. */ - ExternalDependenciesGenerator(symbolTable, irProviders, state.languageVersionSettings).generateUnboundSymbolsAsDependencies() + ExternalDependenciesGenerator(symbolTable, irProviders).generateUnboundSymbolsAsDependencies() state.mapInlineClass = { descriptor -> context.typeMapper.mapType(context.referenceClass(descriptor).defaultType) diff --git a/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/JvmLower.kt b/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/JvmLower.kt index 47e43f02d84..cafe0c14140 100644 --- a/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/JvmLower.kt +++ b/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/JvmLower.kt @@ -313,8 +313,6 @@ private val jvmFilePhases = listOf( collectionStubMethodLowering, jvmInlineClassPhase, - sharedVariablesPhase, - makePatchParentsPhase(1), enumWhenPhase, @@ -323,6 +321,7 @@ private val jvmFilePhases = listOf( singleAbstractMethodPhase, assertionPhase, returnableBlocksPhase, + sharedVariablesPhase, localDeclarationsPhase, jvmLocalClassExtractionPhase, staticCallableReferencePhase, @@ -395,7 +394,7 @@ val jvmPhases = NamedCompilerPhase( generateMultifileFacadesPhase then resolveInlineCallsPhase then // should be last transformation - removeDeclarationsThatWouldBeInlined then + prepareForBytecodeInlining then validateIrAfterLowering ) diff --git a/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/codegen/ExpressionCodegen.kt b/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/codegen/ExpressionCodegen.kt index 70dafe7c487..8137dd38511 100644 --- a/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/codegen/ExpressionCodegen.kt +++ b/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/codegen/ExpressionCodegen.kt @@ -80,7 +80,7 @@ class TryWithFinallyInfo(val onExit: IrExpression) : TryInfo() class BlockInfo(val parent: BlockInfo? = null) { val variables = mutableListOf() - private val infos: Stack = parent?.infos ?: Stack() + val infos: Stack = parent?.infos ?: Stack() fun hasFinallyBlocks(): Boolean = infos.firstIsInstanceOrNull() != null @@ -504,10 +504,10 @@ class ExpressionCodegen( } unboxedInlineClassIrType != null && !irFunction.isInvokeSuspendOfContinuation() -> object : PromisedValue(this, unboxedInlineClassIrType.asmType, unboxedInlineClassIrType) { - override fun materializeAt(target: Type, irTarget: IrType) { + override fun materializeAt(target: Type, irTarget: IrType, castForReified: Boolean) { mv.checkcast(unboxedInlineClassIrType.asmType) MaterialValue(this@ExpressionCodegen, unboxedInlineClassIrType.asmType, unboxedInlineClassIrType) - .materializeAt(target, irTarget) + .materializeAt(target, irTarget, castForReified) } override fun discard() { @@ -626,6 +626,7 @@ class ExpressionCodegen( // bridge to unbox it. Instead, we unbox it in the non-mangled function manually. private fun unboxResultIfNeeded(arg: IrGetValue) { if (arg.type.erasedUpperBound.fqNameWhenAvailable != StandardNames.RESULT_FQ_NAME) return + if (irFunction.origin == IrDeclarationOrigin.LOCAL_FUNCTION_FOR_LAMBDA) return if (!onlyResultInlineClassParameters()) return if (irFunction !is IrSimpleFunction) return // Skip Result's methods @@ -869,42 +870,39 @@ class ExpressionCodegen( return unitValue } + private fun generateGlobalReturnFlagIfPossible(expression: IrExpression, label: String) { + if (state.isInlineDisabled) { + context.psiErrorBuilder.at(expression, irFunction).report(Errors.NON_LOCAL_RETURN_IN_DISABLED_INLINE) + genThrow(mv, "java/lang/UnsupportedOperationException", "Non-local returns are not allowed with inlining disabled") + } else { + generateGlobalReturnFlag(mv, label) + } + } + override fun visitReturn(expression: IrReturn, data: BlockInfo): PromisedValue { val returnTarget = expression.returnTargetSymbol.owner - val owner = - returnTarget as? IrFunction - ?: (returnTarget as? IrReturnableBlock)?.inlineFunctionSymbol?.owner - ?: error("Unsupported IrReturnTarget: $returnTarget") - //TODO: should be owner != irFunction - val isNonLocalReturn = - methodSignatureMapper.mapFunctionName(owner) != methodSignatureMapper.mapFunctionName(irFunction) - if (isNonLocalReturn && state.isInlineDisabled) { - context.psiErrorBuilder.at(expression, owner).report(Errors.NON_LOCAL_RETURN_IN_DISABLED_INLINE) - genThrow( - mv, "java/lang/UnsupportedOperationException", - "Non-local returns are not allowed with inlining disabled" - ) - return unitValue - } + val owner = returnTarget as? IrFunction ?: error("Unsupported IrReturnTarget: $returnTarget") + // TODO: should be owner != irFunction + val isNonLocalReturn = methodSignatureMapper.mapFunctionName(owner) != methodSignatureMapper.mapFunctionName(irFunction) var returnType = if (owner == irFunction) signature.returnType else methodSignatureMapper.mapReturnType(owner) var returnIrType = owner.returnType - val unboxedInlineClass = owner.suspendFunctionOriginal().originalReturnTypeOfSuspendFunctionReturningUnboxedInlineClass() if (unboxedInlineClass != null) { returnIrType = unboxedInlineClass returnType = unboxedInlineClass.asmType } + val afterReturnLabel = Label() expression.value.accept(this, data).materializeAt(returnType, returnIrType) // In case of non-local return from suspend lambda 'materializeAt' does not box return value, box it manually. if (isNonLocalReturn && owner.isInvokeSuspendOfLambda() && expression.value.type.isKotlinResult()) { StackValue.boxInlineClass(expression.value.type.toIrBasedKotlinType(), mv) } - generateFinallyBlocksIfNeeded(returnType, afterReturnLabel, data) + generateFinallyBlocksIfNeeded(returnType, afterReturnLabel, data, null) expression.markLineNumber(startOffset = true) if (isNonLocalReturn) { - generateGlobalReturnFlag(mv, owner.name.asString()) + generateGlobalReturnFlagIfPossible(expression, owner.name.asString()) } mv.areturn(returnType) mv.mark(afterReturnLabel) @@ -954,7 +952,7 @@ class ExpressionCodegen( if (!exhaustive) { result.discard() } else { - val materializedResult = result.materializedAt(expression.type) + val materializedResult = result.materializedAt(typeMapper.mapType(expression.type), expression.type, true) if (branch.condition.isTrueConst()) { // The rest of the expression is dead code. mv.mark(endLabel) @@ -1012,9 +1010,15 @@ class ExpressionCodegen( } override fun visitWhileLoop(loop: IrWhileLoop, data: BlockInfo): PromisedValue { - val continueLabel = markNewLabel() - val endLabel = Label() - // Mark stack depth for break + // Spill the stack in case the loop contains inline functions that break/continue + // out of it. (The case where a loop is entered with a non-empty stack is rare, but + // possible; basically, you need to either use `Array(n) { ... }` or put a `when` + // containing a loop as an argument to a function call.) + addInlineMarker(mv, true) + val continueLabel = markNewLinkedLabel() + val endLabel = linkedLabel() + // Mark the label as having 0 stack depth, so that `break`/`continue` inside + // expressions pop all elements off it before jumping. mv.fakeAlwaysFalseIfeq(endLabel) loop.condition.markLineNumber(true) loop.condition.accept(this, data).coerceToBoolean().jumpIfFalse(endLabel) @@ -1023,14 +1027,16 @@ class ExpressionCodegen( } mv.goTo(continueLabel) mv.mark(endLabel) + addInlineMarker(mv, false) return unitValue } override fun visitDoWhileLoop(loop: IrDoWhileLoop, data: BlockInfo): PromisedValue { + // See comments in `visitWhileLoop` + addInlineMarker(mv, true) val entry = markNewLabel() - val endLabel = Label() - val continueLabel = Label() - // Mark stack depth for break/continue + val endLabel = linkedLabel() + val continueLabel = linkedLabel() mv.fakeAlwaysFalseIfeq(continueLabel) mv.fakeAlwaysFalseIfeq(endLabel) data.withBlock(LoopInfo(loop, continueLabel, endLabel)) { @@ -1040,6 +1046,7 @@ class ExpressionCodegen( loop.condition.markLineNumber(true) loop.condition.accept(this, data).coerceToBoolean().jumpIfTrue(entry) mv.mark(endLabel) + addInlineMarker(mv, false) return unitValue } @@ -1047,26 +1054,32 @@ class ExpressionCodegen( endLabel: Label, data: BlockInfo, nestedTryWithoutFinally: MutableList = arrayListOf(), - stop: (ExpressionInfo) -> Boolean = { false } - ): ExpressionInfo? { + stop: (LoopInfo) -> Boolean + ): LoopInfo? { return data.handleBlock { - if (it is TryWithFinallyInfo) { - genFinallyBlock(it, null, endLabel, data, nestedTryWithoutFinally) - nestedTryWithoutFinally.clear() - } else if (it is TryInfo) { - nestedTryWithoutFinally.add(it) + when { + it is TryWithFinallyInfo -> { + genFinallyBlock(it, null, endLabel, data, nestedTryWithoutFinally) + nestedTryWithoutFinally.clear() + } + it is TryInfo -> nestedTryWithoutFinally.add(it) + it is LoopInfo && stop(it) -> return it } - return if (stop(it)) it else unwindBlockStack(endLabel, data, nestedTryWithoutFinally, stop) + return unwindBlockStack(endLabel, data, nestedTryWithoutFinally, stop) } } override fun visitBreakContinue(jump: IrBreakContinue, data: BlockInfo): PromisedValue { jump.markLineNumber(startOffset = true) val endLabel = Label() - val stackElement = unwindBlockStack(endLabel, data) { it is LoopInfo && it.loop == jump.loop } as LoopInfo? - ?: throw AssertionError("Target label for break/continue not found") - mv.fixStackAndJump(if (jump is IrBreak) stackElement.breakLabel else stackElement.continueLabel) - mv.mark(endLabel) + val stackElement = unwindBlockStack(endLabel, data) { it.loop == jump.loop } + if (stackElement == null) { + generateGlobalReturnFlagIfPossible(jump, jump.loop.nonLocalReturnLabel(jump is IrBreak)) + mv.areturn(Type.VOID_TYPE) + } else { + mv.fixStackAndJump(if (jump is IrBreak) stackElement.breakLabel else stackElement.continueLabel) + mv.mark(endLabel) + } return unitValue } @@ -1086,7 +1099,7 @@ class ExpressionCodegen( val isExpression = !aTry.type.isUnit() var savedValue: Int? = null if (isExpression) { - tryResult.materializeAt(tryAsmType, aTry.type) + tryResult.materializeAt(tryAsmType, aTry.type, true) savedValue = frameMap.enterTemp(tryAsmType) mv.store(savedValue, tryAsmType) } else { @@ -1115,7 +1128,7 @@ class ExpressionCodegen( val catchBody = clause.result val catchResult = catchBody.accept(this, data) if (savedValue != null) { - catchResult.materializeAt(tryAsmType, aTry.type) + catchResult.materializeAt(tryAsmType, aTry.type, true) mv.store(savedValue, tryAsmType) } else { catchResult.discard() @@ -1158,11 +1171,11 @@ class ExpressionCodegen( mv.mark(tryCatchBlockEnd) // TODO: generate a common `finally` for try & catch blocks here? Right now this breaks the inliner. return object : PromisedValue(this, tryAsmType, aTry.type) { - override fun materializeAt(target: Type, irTarget: IrType) { + override fun materializeAt(target: Type, irTarget: IrType, castForReified: Boolean) { if (savedValue != null) { mv.load(savedValue, tryAsmType) frameMap.leaveTemp(tryAsmType) - super.materializeAt(target, irTarget) + super.materializeAt(target, irTarget, castForReified) } else { unitValue.materializeAt(target, irTarget) } @@ -1214,16 +1227,16 @@ class ExpressionCodegen( } } - fun generateFinallyBlocksIfNeeded(returnType: Type, afterReturnLabel: Label, data: BlockInfo) { + fun generateFinallyBlocksIfNeeded(returnType: Type, afterReturnLabel: Label, data: BlockInfo, jumpLabel: Label?) { if (data.hasFinallyBlocks()) { if (Type.VOID_TYPE != returnType) { val returnValIndex = frameMap.enterTemp(returnType) mv.store(returnValIndex, returnType) - unwindBlockStack(afterReturnLabel, data) + unwindBlockStack(afterReturnLabel, data) { it.breakLabel == jumpLabel || it.continueLabel == jumpLabel } mv.load(returnValIndex, returnType) frameMap.leaveTemp(returnType) } else { - unwindBlockStack(afterReturnLabel, data) + unwindBlockStack(afterReturnLabel, data) { it.breakLabel == jumpLabel || it.continueLabel == jumpLabel } } } } diff --git a/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/codegen/IrInlineCodegen.kt b/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/codegen/IrInlineCodegen.kt index 8cf6c637b0b..7d946c0eb6a 100644 --- a/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/codegen/IrInlineCodegen.kt +++ b/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/codegen/IrInlineCodegen.kt @@ -181,10 +181,6 @@ class IrExpressionLambdaImpl( override val isSuspend: Boolean = function.isSuspend - override fun isReturnFromMe(labelName: String): Boolean { - return false //always false - } - // This name doesn't actually matter: it is used internally to tell this lambda's captured // arguments apart from any other scope's. So long as it's unique, any value is fine. // This particular string slightly aids in debugging internal compiler errors as it at least diff --git a/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/codegen/IrSourceCompilerForInline.kt b/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/codegen/IrSourceCompilerForInline.kt index d838d691ed1..70f4b80a811 100644 --- a/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/codegen/IrSourceCompilerForInline.kt +++ b/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/codegen/IrSourceCompilerForInline.kt @@ -24,10 +24,10 @@ import org.jetbrains.kotlin.ir.declarations.* import org.jetbrains.kotlin.ir.descriptors.IrBasedSimpleFunctionDescriptor import org.jetbrains.kotlin.ir.descriptors.toIrBasedDescriptor import org.jetbrains.kotlin.ir.expressions.IrFunctionAccessExpression +import org.jetbrains.kotlin.ir.expressions.IrLoop import org.jetbrains.kotlin.ir.util.isSuspend import org.jetbrains.kotlin.ir.util.module import org.jetbrains.kotlin.ir.util.parentAsClass -import org.jetbrains.kotlin.load.kotlin.* import org.jetbrains.kotlin.psi.KtElement import org.jetbrains.kotlin.psi.doNotAnalyze import org.jetbrains.kotlin.resolve.jvm.diagnostics.ErrorsJvm.SUSPENSION_POINT_INSIDE_MONITOR @@ -36,7 +36,6 @@ import org.jetbrains.org.objectweb.asm.* import org.jetbrains.org.objectweb.asm.commons.InstructionAdapter import org.jetbrains.org.objectweb.asm.commons.Method import org.jetbrains.org.objectweb.asm.tree.MethodNode -import java.io.File class IrSourceCompilerForInline( override val state: GenerationState, @@ -107,9 +106,9 @@ class IrSourceCompilerForInline( override fun hasFinallyBlocks() = data.hasFinallyBlocks() - override fun generateFinallyBlocksIfNeeded(finallyCodegen: BaseExpressionCodegen, returnType: Type, afterReturnLabel: Label) { - require(finallyCodegen is ExpressionCodegen) - finallyCodegen.generateFinallyBlocksIfNeeded(returnType, afterReturnLabel, data) + override fun generateFinallyBlocksIfNeeded(codegen: BaseExpressionCodegen, returnType: Type, afterReturnLabel: Label, target: Label?) { + require(codegen is ExpressionCodegen) + codegen.generateFinallyBlocksIfNeeded(returnType, afterReturnLabel, data, target) } override fun createCodegenForExternalFinallyBlockGenerationOnNonLocalReturn(finallyNode: MethodNode, curFinallyDepth: Int) = @@ -139,9 +138,15 @@ class IrSourceCompilerForInline( override val compilationContextFunctionDescriptor: FunctionDescriptor get() = generateSequence(codegen) { it.inlinedInto }.last().irFunction.toIrBasedDescriptor() - override fun getContextLabels(): Set { - val name = codegen.irFunction.name.asString() - return setOf(name) + override fun getContextLabels(): Map { + val result = mutableMapOf(codegen.irFunction.name.asString() to null) + for (info in data.infos) { + if (info !is LoopInfo) + continue + result[info.loop.nonLocalReturnLabel(false)] = info.continueLabel + result[info.loop.nonLocalReturnLabel(true)] = info.breakLabel + } + return result } // TODO: Find a way to avoid using PSI here @@ -161,3 +166,5 @@ private tailrec fun IrDeclaration.isInlineOrInsideInline(): Boolean { if (parent !is IrDeclaration) return false return parent.isInlineOrInsideInline() } + +internal fun IrLoop.nonLocalReturnLabel(forBreak: Boolean): String = "${label!!}\$${if (forBreak) "break" else "continue"}" diff --git a/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/codegen/PromisedValue.kt b/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/codegen/PromisedValue.kt index 2b04dcdac52..a04c91af2ce 100644 --- a/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/codegen/PromisedValue.kt +++ b/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/codegen/PromisedValue.kt @@ -11,10 +11,16 @@ import org.jetbrains.kotlin.backend.jvm.ir.erasedUpperBound import org.jetbrains.kotlin.backend.jvm.lower.inlineclasses.InlineClassAbi import org.jetbrains.kotlin.codegen.AsmUtil import org.jetbrains.kotlin.codegen.StackValue +import org.jetbrains.kotlin.ir.declarations.IrTypeParameter import org.jetbrains.kotlin.ir.descriptors.toIrBasedKotlinType +import org.jetbrains.kotlin.ir.symbols.IrTypeParameterSymbol import org.jetbrains.kotlin.ir.types.* +import org.jetbrains.kotlin.ir.util.isTypeParameter import org.jetbrains.kotlin.ir.util.parentAsClass +import org.jetbrains.kotlin.ir.util.substitute import org.jetbrains.kotlin.resolve.jvm.AsmTypes +import org.jetbrains.kotlin.types.model.SimpleTypeMarker +import org.jetbrains.kotlin.types.model.typeConstructor import org.jetbrains.org.objectweb.asm.Label import org.jetbrains.org.objectweb.asm.Type import org.jetbrains.org.objectweb.asm.commons.InstructionAdapter @@ -24,7 +30,7 @@ import org.jetbrains.org.objectweb.asm.commons.InstructionAdapter abstract class PromisedValue(val codegen: ExpressionCodegen, val type: Type, val irType: IrType) { // If this value is immaterial, construct an object on the top of the stack. This // must always be done before generating other values or emitting raw bytecode. - open fun materializeAt(target: Type, irTarget: IrType) { + open fun materializeAt(target: Type, irTarget: IrType, castForReified: Boolean) { val erasedSourceType = irType.eraseTypeParameters() val erasedTargetType = irTarget.eraseTypeParameters() val isFromTypeInlineClass = erasedSourceType.classOrNull!!.owner.isInline @@ -33,7 +39,8 @@ abstract class PromisedValue(val codegen: ExpressionCodegen, val type: Type, val // Boxing and unboxing kotlin.Result leads to CCE in generated code val doNotCoerceKotlinResultInContinuation = (codegen.irFunction.parentAsClass.origin == JvmLoweredDeclarationOrigin.CONTINUATION_CLASS || - codegen.irFunction.parentAsClass.origin == JvmLoweredDeclarationOrigin.SUSPEND_LAMBDA) + (codegen.irFunction.parentAsClass.origin == JvmLoweredDeclarationOrigin.SUSPEND_LAMBDA && + !codegen.irFunction.isInvokeSuspendOfLambda())) && (irType.isKotlinResult() || irTarget.isKotlinResult()) // Coerce inline classes @@ -54,9 +61,10 @@ abstract class PromisedValue(val codegen: ExpressionCodegen, val type: Type, val } } - if (type != target) { - StackValue.coerce(type, target, mv) + if (type != target || (castForReified && irType.anyTypeArgument { it.isReified })) { + StackValue.coerce(type, target, mv, type == target) } + } abstract fun discard() @@ -68,6 +76,15 @@ abstract class PromisedValue(val codegen: ExpressionCodegen, val type: Type, val get() = codegen.typeMapper } + +fun IrType.anyTypeArgument(check: (IrTypeParameter) -> Boolean): Boolean { + when { + isTypeParameter() -> if (check((classifierOrNull as IrTypeParameterSymbol).owner)) return true + this is IrSimpleType -> return arguments.any { it.typeOrNull?.anyTypeArgument(check) ?: false } + } + return false +} + // A value that *has* been fully constructed. class MaterialValue(codegen: ExpressionCodegen, type: Type, irType: IrType) : PromisedValue(codegen, type, irType) { override fun discard() { @@ -83,7 +100,7 @@ abstract class BooleanValue(codegen: ExpressionCodegen) : abstract fun jumpIfFalse(target: Label) abstract fun jumpIfTrue(target: Label) - override fun materializeAt(target: Type, irTarget: IrType) { + override fun materializeAt(target: Type, irTarget: IrType, castForReified: Boolean) { val const0 = Label() val end = Label() jumpIfFalse(const0) @@ -101,7 +118,7 @@ abstract class BooleanValue(codegen: ExpressionCodegen) : class BooleanConstant(codegen: ExpressionCodegen, val value: Boolean) : BooleanValue(codegen) { override fun jumpIfFalse(target: Label) = if (value) Unit else mv.goTo(target) override fun jumpIfTrue(target: Label) = if (value) mv.goTo(target) else Unit - override fun materializeAt(target: Type, irTarget: IrType) { + override fun materializeAt(target: Type, irTarget: IrType, castForReified: Boolean) { mv.iconst(if (value) 1 else 0) if (Type.BOOLEAN_TYPE != target) { StackValue.coerce(Type.BOOLEAN_TYPE, target, mv) @@ -116,10 +133,10 @@ fun PromisedValue.coerceToBoolean(): BooleanValue = is BooleanValue -> this else -> object : BooleanValue(codegen) { override fun jumpIfFalse(target: Label) = - this@coerceToBoolean.materializeAt(Type.BOOLEAN_TYPE, codegen.context.irBuiltIns.booleanType).also { mv.ifeq(target) } + this@coerceToBoolean.materializeAt(Type.BOOLEAN_TYPE, codegen.context.irBuiltIns.booleanType, false).also { mv.ifeq(target) } override fun jumpIfTrue(target: Label) = - this@coerceToBoolean.materializeAt(Type.BOOLEAN_TYPE, codegen.context.irBuiltIns.booleanType).also { mv.ifne(target) } + this@coerceToBoolean.materializeAt(Type.BOOLEAN_TYPE, codegen.context.irBuiltIns.booleanType, false).also { mv.ifne(target) } override fun discard() { this@coerceToBoolean.discard() @@ -127,9 +144,12 @@ fun PromisedValue.coerceToBoolean(): BooleanValue = } } +fun PromisedValue.materializeAt(target: Type, irTarget: IrType) { + materializeAt(target, irTarget, false) +} -fun PromisedValue.materializedAt(target: Type, irTarget: IrType): MaterialValue { - materializeAt(target, irTarget) +fun PromisedValue.materializedAt(target: Type, irTarget: IrType, castForReified: Boolean = false): MaterialValue { + materializeAt(target, irTarget, castForReified) return MaterialValue(codegen, target, irTarget) } @@ -163,7 +183,7 @@ val ExpressionCodegen.unitValue: PromisedValue val ExpressionCodegen.nullConstant: PromisedValue get() = object : PromisedValue(this, AsmTypes.OBJECT_TYPE, context.irBuiltIns.nothingNType) { - override fun materializeAt(target: Type, irTarget: IrType) { + override fun materializeAt(target: Type, irTarget: IrType, castForReified: Boolean) { mv.aconst(null) } diff --git a/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/intrinsics/JvmInvokeDynamic.kt b/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/intrinsics/JvmInvokeDynamic.kt index a7911e1bd52..5593a189ee2 100644 --- a/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/intrinsics/JvmInvokeDynamic.kt +++ b/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/intrinsics/JvmInvokeDynamic.kt @@ -9,6 +9,7 @@ import org.jetbrains.kotlin.backend.jvm.JvmLoweredDeclarationOrigin import org.jetbrains.kotlin.backend.jvm.codegen.* import org.jetbrains.kotlin.codegen.inline.v import org.jetbrains.kotlin.ir.builders.declarations.buildClass +import org.jetbrains.kotlin.ir.declarations.IrClass import org.jetbrains.kotlin.ir.declarations.IrConstructor import org.jetbrains.kotlin.ir.declarations.IrSimpleFunction import org.jetbrains.kotlin.ir.expressions.* @@ -101,7 +102,8 @@ object JvmInvokeDynamic : IntrinsicMethod() { private fun generateMethodHandle(irRawFunctionReference: IrRawFunctionReference, codegen: ExpressionCodegen): Handle { val irFun = irRawFunctionReference.symbol.owner - val irParentClass = irFun.parentAsClass + val irParentClass = irFun.parent as? IrClass + ?: throw AssertionError("Unexpected parent: ${irFun.parent.render()}") val owner = codegen.typeMapper.mapOwner(irParentClass) val asmMethod = codegen.methodSignatureMapper.mapAsmMethod(irFun) val handleTag = when { diff --git a/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/intrinsics/UnsafeCoerce.kt b/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/intrinsics/UnsafeCoerce.kt index c5f095febf2..c91d376718a 100644 --- a/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/intrinsics/UnsafeCoerce.kt +++ b/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/intrinsics/UnsafeCoerce.kt @@ -29,9 +29,9 @@ object UnsafeCoerce : IntrinsicMethod() { val arg = expression.getValueArgument(0)!! val result = arg.accept(codegen, data) return object : PromisedValue(codegen, toType, to) { - override fun materializeAt(target: Type, irTarget: IrType) { + override fun materializeAt(target: Type, irTarget: IrType, castForReified: Boolean) { result.materializeAt(fromType, from) - super.materializeAt(target, irTarget) + super.materializeAt(target, irTarget, castForReified) } override fun discard() { diff --git a/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/lower/AddContinuationLowering.kt b/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/lower/AddContinuationLowering.kt index b0ef3d63134..45f1a89fdeb 100644 --- a/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/lower/AddContinuationLowering.kt +++ b/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/lower/AddContinuationLowering.kt @@ -16,6 +16,7 @@ import org.jetbrains.kotlin.backend.jvm.JvmLoweredDeclarationOrigin import org.jetbrains.kotlin.backend.jvm.codegen.continuationParameter import org.jetbrains.kotlin.backend.jvm.codegen.hasContinuation import org.jetbrains.kotlin.backend.jvm.codegen.isInvokeSuspendOfContinuation +import org.jetbrains.kotlin.backend.jvm.codegen.isJvmInterface import org.jetbrains.kotlin.backend.jvm.ir.defaultValue import org.jetbrains.kotlin.backend.jvm.ir.isStaticInlineClassReplacement import org.jetbrains.kotlin.backend.jvm.localDeclarationsPhase @@ -302,7 +303,7 @@ private class AddContinuationLowering(context: JvmBackendContext) : SuspendLower } } - val newFunction = if (function.isOverridable) { + val newFunction = if (function.isOverridable && !function.parentAsClass.isJvmInterface) { // Create static method for the suspend state machine method so that reentering the method // does not lead to virtual dispatch to the wrong method. createStaticSuspendImpl(view).also { result += it } diff --git a/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/lower/BridgeLowering.kt b/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/lower/BridgeLowering.kt index 6017d3fbd3b..063805baf08 100644 --- a/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/lower/BridgeLowering.kt +++ b/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/lower/BridgeLowering.kt @@ -17,10 +17,8 @@ import org.jetbrains.kotlin.backend.jvm.JvmLoweredDeclarationOrigin import org.jetbrains.kotlin.backend.jvm.codegen.isJvmInterface import org.jetbrains.kotlin.backend.jvm.ir.* import org.jetbrains.kotlin.backend.jvm.lower.inlineclasses.unboxInlineClass -import org.jetbrains.kotlin.builtins.StandardNames import org.jetbrains.kotlin.codegen.AsmUtil import org.jetbrains.kotlin.descriptors.DescriptorVisibilities -import org.jetbrains.kotlin.descriptors.DescriptorVisibility import org.jetbrains.kotlin.descriptors.Modality import org.jetbrains.kotlin.ir.IrStatement import org.jetbrains.kotlin.ir.builders.* @@ -560,7 +558,9 @@ internal class BridgeLowering(val context: JvmBackendContext) : FileLoweringPass target, IrDeclarationOrigin.BRIDGE, type = (substitutedType?.eraseToScope(visibleTypeParameters) ?: type.eraseTypeParameters()), // Currently there are no special bridge methods with vararg parameters, so we don't track substituted vararg element types. - varargElementType = varargElementType?.eraseToScope(visibleTypeParameters) + varargElementType = varargElementType?.eraseToScope(visibleTypeParameters), + startOffset = target.startOffset, + endOffset = target.endOffset, ) private fun IrBuilderWithScope.delegatingCall( @@ -593,17 +593,23 @@ internal class BridgeLowering(val context: JvmBackendContext) : FileLoweringPass fun computeJvmMethod(function: IrFunction): Method = signatureCache.getOrPut(function.symbol) { context.methodSignatureMapper.mapAsmMethod(function) } + private fun canHaveSpecialBridge(function: IrSimpleFunction): Boolean { + if (function.name in specialBridgeMethods.specialMethodNames) + return true + // Function name could be mangled by inline class rules + val functionName = function.name.asString() + if (specialBridgeMethods.specialMethodNames.any { functionName.startsWith(it.asString() + "-") }) + return true + return false + } + fun computeSpecialBridge(function: IrSimpleFunction): SpecialBridge? { // Optimization: do not try to compute special bridge for irrelevant methods. val correspondingProperty = function.correspondingPropertySymbol if (correspondingProperty != null) { if (correspondingProperty.owner.name !in specialBridgeMethods.specialPropertyNames) return null } else { - // 'remove' and 'removeAt' functions can be mangled by inline class rules - if (function.name !in specialBridgeMethods.specialMethodNames && - !function.name.asString().startsWith("removeAt-") && - !function.name.asString().startsWith("remove-") - ) { + if (!canHaveSpecialBridge(function)) { return null } } diff --git a/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/lower/BytecodeInliningPreparationLowering.kt b/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/lower/BytecodeInliningPreparationLowering.kt new file mode 100644 index 00000000000..5f023370765 --- /dev/null +++ b/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/lower/BytecodeInliningPreparationLowering.kt @@ -0,0 +1,56 @@ +/* + * Copyright 2010-2019 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. + */ + +package org.jetbrains.kotlin.backend.jvm.lower + +import org.jetbrains.kotlin.backend.common.FileLoweringPass +import org.jetbrains.kotlin.backend.common.phaser.makeIrModulePhase +import org.jetbrains.kotlin.backend.jvm.JvmBackendContext +import org.jetbrains.kotlin.backend.jvm.codegen.isInlineIrExpression +import org.jetbrains.kotlin.ir.IrElement +import org.jetbrains.kotlin.ir.declarations.* +import org.jetbrains.kotlin.ir.expressions.IrFunctionReference +import org.jetbrains.kotlin.ir.expressions.IrLoop +import org.jetbrains.kotlin.ir.util.parentAsClass +import org.jetbrains.kotlin.ir.visitors.IrElementVisitor + +internal val prepareForBytecodeInlining = makeIrModulePhase( + ::BytecodeInliningPreparationLowering, + name = "BytecodeInliningPreparation", + description = "Remove inline lambda declarations and label all loops" +) + +private class BytecodeInliningPreparationLowering(val context: JvmBackendContext) : FileLoweringPass { + override fun lower(irFile: IrFile) { + val loweredLambdasToDelete = mutableSetOf() + irFile.accept(object : IrElementVisitor { + // This counter is intentionally not local to every declaration because their names might clash. + private var counter = 0 + + override fun visitElement(element: IrElement, data: String) = + element.acceptChildren(this, if (element is IrDeclarationWithName) "$data${element.name}$" else data) + + override fun visitLoop(loop: IrLoop, data: String) { + // Give all loops unique labels so that we can generate unambiguous instructions for non-local + // `break`/`continue` statements. + loop.label = "$data${++counter}" + super.visitLoop(loop, data) + } + + override fun visitFunctionReference(expression: IrFunctionReference, data: String) { + // Remove inline lambdas from their declaration parents. They should not appear in the output + // bytecode in non-inlined form. + if (expression.origin.isInlineIrExpression()) { + loweredLambdasToDelete.add(expression.symbol.owner) + } + super.visitFunctionReference(expression, data) + } + }, "") + + for (irClass in loweredLambdasToDelete.mapTo(mutableSetOf()) { it.parentAsClass }) { + irClass.declarations.removeAll(loweredLambdasToDelete) + } + } +} diff --git a/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/lower/FunctionReferenceLowering.kt b/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/lower/FunctionReferenceLowering.kt index 3f06295dccd..a640e7a7325 100644 --- a/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/lower/FunctionReferenceLowering.kt +++ b/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/lower/FunctionReferenceLowering.kt @@ -15,7 +15,8 @@ import org.jetbrains.kotlin.backend.jvm.JvmBackendContext import org.jetbrains.kotlin.backend.jvm.JvmLoweredDeclarationOrigin import org.jetbrains.kotlin.backend.jvm.ir.* import org.jetbrains.kotlin.backend.jvm.lower.inlineclasses.InlineClassAbi -import org.jetbrains.kotlin.config.JvmSamConversions +import org.jetbrains.kotlin.builtins.functions.BuiltInFunctionArity +import org.jetbrains.kotlin.config.JvmClosureGenerationScheme import org.jetbrains.kotlin.descriptors.DescriptorVisibilities import org.jetbrains.kotlin.descriptors.Modality import org.jetbrains.kotlin.ir.UNDEFINED_OFFSET @@ -74,6 +75,12 @@ internal class FunctionReferenceLowering(private val context: JvmBackendContext) irFile.transformChildrenVoid(this) } + private val shouldGenerateIndySamConversions = + context.state.samConversionsScheme == JvmClosureGenerationScheme.INDY + + private val shouldGenerateIndyLambdas = + context.state.lambdasScheme == JvmClosureGenerationScheme.INDY + override fun visitBlock(expression: IrBlock): IrExpression { if (!expression.origin.isLambda) return super.visitBlock(expression) @@ -84,9 +91,24 @@ internal class FunctionReferenceLowering(private val context: JvmBackendContext) expression.statements.dropLast(1).forEach { it.transform(this, null) } reference.transformChildrenVoid(this) + + if (shouldGenerateIndyLambdas && canUseIndySamConversion(reference, reference.type, true)) { + return wrapLambdaReferenceWithIndySamConversion(expression, reference) + } + return FunctionReferenceBuilder(reference).build() } + private fun wrapLambdaReferenceWithIndySamConversion(expression: IrBlock, reference: IrFunctionReference): IrBlock { + expression.statements[expression.statements.size - 1] = wrapWithIndySamConversion(reference.type, reference) + val irLambda = reference.symbol.owner + // JDK LambdaMetafactory can't adapt '(...)V' to '(...)Lkotlin/Unit;'. + if (irLambda.returnType.isUnit()) { + irLambda.returnType = irLambda.returnType.makeNullable() + } + return expression + } + override fun visitFunctionReference(expression: IrFunctionReference): IrExpression { expression.transformChildrenVoid(this) return if (expression.isIgnored) @@ -95,9 +117,6 @@ internal class FunctionReferenceLowering(private val context: JvmBackendContext) FunctionReferenceBuilder(expression).build() } - private val shouldUseIndySamConversions = - context.state.samConversionsScheme == JvmSamConversions.INDY - // Handle SAM conversions which wrap a function reference: // class sam$n(private val receiver: R) : Interface { override fun method(...) = receiver.target(...) } // @@ -121,15 +140,15 @@ internal class FunctionReferenceLowering(private val context: JvmBackendContext) reference.transformChildrenVoid() val samSuperType = expression.typeOperand - return if (shouldUseIndySamConversions && canUseIndySamConversion(reference, samSuperType)) { + return if (shouldGenerateIndySamConversions && canUseIndySamConversion(reference, samSuperType, false)) { wrapSamConversionArgumentWithIndySamConversion(expression) } else { FunctionReferenceBuilder(reference, samSuperType).build() } } - private fun canUseIndySamConversion(reference: IrFunctionReference, samSuperType: IrType): Boolean { - // Can't use indy for regular function references by default (because of 'equals'). + private fun canUseIndySamConversion(reference: IrFunctionReference, samSuperType: IrType, plainLambda: Boolean): Boolean { + // Can't use JDK LambdaMetafactory for function references by default (because of 'equals'). // TODO special mode that would generate indy everywhere? if (reference.origin != IrStatementOrigin.LAMBDA) return false @@ -150,6 +169,13 @@ internal class FunctionReferenceLowering(private val context: JvmBackendContext) ) return false + if (plainLambda) { + var parametersCount = target.valueParameters.size + if (target.extensionReceiverParameter != null) ++parametersCount + if (parametersCount >= BuiltInFunctionArity.BIG_ARITY) + return false + } + // Can't use indy-based SAM conversion inside inline fun (Ok in inline lambda). if (target.parents.any { it.isInlineFunction() || it.isCrossinlineLambda() }) return false diff --git a/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/lower/RemoveDeclarationsThatWouldBeInlinedLowering.kt b/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/lower/RemoveDeclarationsThatWouldBeInlinedLowering.kt deleted file mode 100644 index c3637e0a17f..00000000000 --- a/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/lower/RemoveDeclarationsThatWouldBeInlinedLowering.kt +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright 2010-2019 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. - */ - -package org.jetbrains.kotlin.backend.jvm.lower - -import org.jetbrains.kotlin.backend.common.FileLoweringPass -import org.jetbrains.kotlin.backend.common.phaser.makeIrModulePhase -import org.jetbrains.kotlin.backend.jvm.JvmBackendContext -import org.jetbrains.kotlin.backend.jvm.codegen.isInlineIrExpression -import org.jetbrains.kotlin.ir.IrElement -import org.jetbrains.kotlin.ir.IrStatement -import org.jetbrains.kotlin.ir.declarations.IrClass -import org.jetbrains.kotlin.ir.declarations.IrFile -import org.jetbrains.kotlin.ir.declarations.IrFunction -import org.jetbrains.kotlin.ir.expressions.IrFunctionReference -import org.jetbrains.kotlin.ir.visitors.* - -internal val removeDeclarationsThatWouldBeInlined = makeIrModulePhase( - ::RemoveDeclarationsThatWouldBeInlinedLowering, - name = "RemoveInlinedDeclarations", - description = "Rename declaration that should be inlined" -) - -// Removes all functions which are only used as arguments to inline functions. It's -// important that this phase runs right before codegen, since we need the bodies of lambdas to -// be lowered for inline codegen. Conversely, since this phase runs right before codegen we can -// assume that all remaining function references are only used as arguments to inline functions - -// otherwise they would have been lowered. -private class RemoveDeclarationsThatWouldBeInlinedLowering(val context: JvmBackendContext) : FileLoweringPass { - override fun lower(irFile: IrFile) { - val loweredLambdasToDelete = mutableSetOf() - - irFile.acceptVoid(object : IrElementVisitorVoid { - override fun visitElement(element: IrElement) = element.acceptChildrenVoid(this) - - override fun visitFunctionReference(expression: IrFunctionReference) { - if (expression.origin.isInlineIrExpression()) { - loweredLambdasToDelete.add(expression.symbol.owner) - } - - expression.acceptChildrenVoid(this) - } - }) - - irFile.transformChildrenVoid(object : IrElementTransformerVoid() { - override fun visitClass(declaration: IrClass): IrStatement { - return super.visitClass(declaration).also { - declaration.declarations.removeAll(loweredLambdasToDelete) - } - } - }) - } -} diff --git a/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/lower/SyntheticAccessorLowering.kt b/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/lower/SyntheticAccessorLowering.kt index 62e5b8d0a60..bccad36e16c 100644 --- a/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/lower/SyntheticAccessorLowering.kt +++ b/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/lower/SyntheticAccessorLowering.kt @@ -68,9 +68,11 @@ internal class SyntheticAccessorLowering(val context: JvmBackendContext) : IrEle } } + private data class FieldKey(val fieldSymbol: IrFieldSymbol, val parent: IrDeclarationParent, val superQualifierSymbol: IrClassSymbol?) + private val functionMap = mutableMapOf, IrFunctionSymbol>() - private val getterMap = mutableMapOf, IrSimpleFunctionSymbol>() - private val setterMap = mutableMapOf, IrSimpleFunctionSymbol>() + private val getterMap = mutableMapOf() + private val setterMap = mutableMapOf() override fun visitFunctionAccess(expression: IrFunctionAccessExpression): IrExpression { if (expression.usesDefaultArguments()) { @@ -158,7 +160,9 @@ internal class SyntheticAccessorLowering(val context: JvmBackendContext) : IrEle symbol.owner.accessorParent(dispatchReceiverType?.classOrNull?.owner ?: symbol.owner.parent) as IrClass modifyGetterExpression( expression, - getterMap.getOrPut(Pair(symbol, parent)) { makeGetterAccessorSymbol(symbol, parent) } + getterMap.getOrPut(FieldKey(symbol, parent, expression.superQualifierSymbol)) { + makeGetterAccessorSymbol(symbol, parent, expression.superQualifierSymbol) + } ) } else { expression @@ -175,7 +179,9 @@ internal class SyntheticAccessorLowering(val context: JvmBackendContext) : IrEle symbol.owner.accessorParent(dispatchReceiverType?.classOrNull?.owner ?: symbol.owner.parent) as IrClass modifySetterExpression( expression, - setterMap.getOrPut(Pair(symbol, parent)) { makeSetterAccessorSymbol(symbol, parent) } + setterMap.getOrPut(FieldKey(symbol, parent, expression.superQualifierSymbol)) { + makeSetterAccessorSymbol(symbol, parent, expression.superQualifierSymbol) + } ) } else { expression @@ -348,12 +354,16 @@ internal class SyntheticAccessorLowering(val context: JvmBackendContext) : IrEle copyAllParamsToArgs(it, accessor) } - private fun makeGetterAccessorSymbol(fieldSymbol: IrFieldSymbol, parent: IrClass): IrSimpleFunctionSymbol = + private fun makeGetterAccessorSymbol( + fieldSymbol: IrFieldSymbol, + parent: IrClass, + superQualifierSymbol: IrClassSymbol? + ): IrSimpleFunctionSymbol = context.irFactory.buildFun { startOffset = parent.startOffset endOffset = parent.startOffset origin = JvmLoweredDeclarationOrigin.SYNTHETIC_ACCESSOR - name = fieldSymbol.owner.accessorNameForGetter() + name = fieldSymbol.owner.accessorNameForGetter(superQualifierSymbol) visibility = DescriptorVisibilities.PUBLIC modality = Modality.FINAL returnType = fieldSymbol.owner.type @@ -368,10 +378,14 @@ internal class SyntheticAccessorLowering(val context: JvmBackendContext) : IrEle ) } - accessor.body = createAccessorBodyForGetter(fieldSymbol.owner, accessor) + accessor.body = createAccessorBodyForGetter(fieldSymbol.owner, accessor, superQualifierSymbol) }.symbol - private fun createAccessorBodyForGetter(targetField: IrField, accessor: IrSimpleFunction): IrBody { + private fun createAccessorBodyForGetter( + targetField: IrField, + accessor: IrSimpleFunction, + superQualifierSymbol: IrClassSymbol? + ): IrBody { val maybeDispatchReceiver = if (targetField.isStatic) null else IrGetValueImpl(accessor.startOffset, accessor.endOffset, accessor.valueParameters[0].symbol) @@ -381,17 +395,22 @@ internal class SyntheticAccessorLowering(val context: JvmBackendContext) : IrEle accessor.startOffset, accessor.endOffset, targetField.symbol, targetField.type, - maybeDispatchReceiver + maybeDispatchReceiver, + superQualifierSymbol = superQualifierSymbol ) ) } - private fun makeSetterAccessorSymbol(fieldSymbol: IrFieldSymbol, parent: IrClass): IrSimpleFunctionSymbol = + private fun makeSetterAccessorSymbol( + fieldSymbol: IrFieldSymbol, + parent: IrClass, + superQualifierSymbol: IrClassSymbol? + ): IrSimpleFunctionSymbol = context.irFactory.buildFun { startOffset = parent.startOffset endOffset = parent.startOffset origin = JvmLoweredDeclarationOrigin.SYNTHETIC_ACCESSOR - name = fieldSymbol.owner.accessorNameForSetter() + name = fieldSymbol.owner.accessorNameForSetter(superQualifierSymbol) visibility = DescriptorVisibilities.PUBLIC modality = Modality.FINAL returnType = context.irBuiltIns.unitType @@ -408,10 +427,14 @@ internal class SyntheticAccessorLowering(val context: JvmBackendContext) : IrEle accessor.addValueParameter("", fieldSymbol.owner.type, JvmLoweredDeclarationOrigin.SYNTHETIC_ACCESSOR) - accessor.body = createAccessorBodyForSetter(fieldSymbol.owner, accessor) + accessor.body = createAccessorBodyForSetter(fieldSymbol.owner, accessor, superQualifierSymbol) }.symbol - private fun createAccessorBodyForSetter(targetField: IrField, accessor: IrSimpleFunction): IrBody { + private fun createAccessorBodyForSetter( + targetField: IrField, + accessor: IrSimpleFunction, + superQualifierSymbol: IrClassSymbol? + ): IrBody { val maybeDispatchReceiver = if (targetField.isStatic) null else IrGetValueImpl(accessor.startOffset, accessor.endOffset, accessor.valueParameters[0].symbol) @@ -426,7 +449,8 @@ internal class SyntheticAccessorLowering(val context: JvmBackendContext) : IrEle targetField.symbol, maybeDispatchReceiver, value, - context.irBuiltIns.unitType + context.irBuiltIns.unitType, + superQualifierSymbol = superQualifierSymbol ) ) } @@ -565,22 +589,26 @@ internal class SyntheticAccessorLowering(val context: JvmBackendContext) : IrEle return Name.identifier("access\$$jvmName$suffix") } - private fun IrField.accessorNameForGetter(): Name { + private fun IrField.accessorNameForGetter(superQualifierSymbol: IrClassSymbol?): Name { val getterName = JvmAbi.getterName(name.asString()) - return Name.identifier("access\$$getterName\$${fieldAccessorSuffix()}") + return Name.identifier("access\$$getterName\$${fieldAccessorSuffix(superQualifierSymbol)}") } - private fun IrField.accessorNameForSetter(): Name { + private fun IrField.accessorNameForSetter(superQualifierSymbol: IrClassSymbol?): Name { val setterName = JvmAbi.setterName(name.asString()) - return Name.identifier("access\$$setterName\$${fieldAccessorSuffix()}") + return Name.identifier("access\$$setterName\$${fieldAccessorSuffix(superQualifierSymbol)}") } - private fun IrField.fieldAccessorSuffix(): String { + private fun IrField.fieldAccessorSuffix(superQualifierSymbol: IrClassSymbol?): String { // Special _c_ompanion _p_roperty suffix for accessing companion backing field moved to outer if (origin == JvmLoweredDeclarationOrigin.COMPANION_PROPERTY_BACKING_FIELD && !parentAsClass.isCompanion) { return "cp" } + if (superQualifierSymbol != null) { + return "p\$s${superQualifierSymbol.owner.syntheticAccessorToSuperSuffix()}" + } + // Accesses to static protected fields that need an accessor must be due to being inherited, hence accessed on a // _s_upertype. If the field is static, the super class the access is on can be different and therefore // we generate a suffix to distinguish access to field with different receiver types in the super hierarchy. diff --git a/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/lower/TypeOperatorLowering.kt b/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/lower/TypeOperatorLowering.kt index 44e90ea38ea..04f6a0f3af8 100644 --- a/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/lower/TypeOperatorLowering.kt +++ b/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/lower/TypeOperatorLowering.kt @@ -231,10 +231,9 @@ private class TypeOperatorLowering(private val context: JvmBackendContext) : Fil } val targetExtensionReceiverParameter = targetFun.extensionReceiverParameter - if (targetExtensionReceiverParameter != null) { + if (targetExtensionReceiverParameter != null && irFunRef.extensionReceiver != null) { addValueParameter("p${syntheticParameterIndex++}", targetExtensionReceiverParameter.type) - val extensionReceiver = irFunRef.extensionReceiver - ?: fail("Captured extension receiver is not provided") + val extensionReceiver = irFunRef.extensionReceiver!! dynamicCallArguments.add(extensionReceiver) } diff --git a/compiler/ir/backend.wasm/src/org/jetbrains/kotlin/backend/wasm/compiler.kt b/compiler/ir/backend.wasm/src/org/jetbrains/kotlin/backend/wasm/compiler.kt index 7425e543b85..b2f62da625c 100644 --- a/compiler/ir/backend.wasm/src/org/jetbrains/kotlin/backend/wasm/compiler.kt +++ b/compiler/ir/backend.wasm/src/org/jetbrains/kotlin/backend/wasm/compiler.kt @@ -13,7 +13,6 @@ import org.jetbrains.kotlin.backend.wasm.ir2wasm.WasmCompiledModuleFragment import org.jetbrains.kotlin.backend.wasm.ir2wasm.WasmModuleFragmentGenerator import org.jetbrains.kotlin.backend.wasm.ir2wasm.generateStringLiteralsSupport import org.jetbrains.kotlin.config.CompilerConfiguration -import org.jetbrains.kotlin.config.languageVersionSettings import org.jetbrains.kotlin.ir.backend.js.MainModule import org.jetbrains.kotlin.ir.backend.js.loadIr import org.jetbrains.kotlin.ir.declarations.impl.IrFactoryImpl @@ -56,7 +55,7 @@ fun compileWasm( // Load declarations referenced during `context` initialization allModules.forEach { val irProviders = generateTypicalIrProviderList(it.descriptor, irBuiltIns, symbolTable, deserializer) - ExternalDependenciesGenerator(symbolTable, irProviders, configuration.languageVersionSettings) + ExternalDependenciesGenerator(symbolTable, irProviders) .generateUnboundSymbolsAsDependencies() } @@ -67,7 +66,7 @@ fun compileWasm( // Create stubs val irProviders = generateTypicalIrProviderList(moduleDescriptor, irBuiltIns, symbolTable, deserializer) - ExternalDependenciesGenerator(symbolTable, irProviders, configuration.languageVersionSettings).generateUnboundSymbolsAsDependencies() + ExternalDependenciesGenerator(symbolTable, irProviders).generateUnboundSymbolsAsDependencies() moduleFragment.patchDeclarationParents() wasmPhases.invokeToplevel(phaseConfig, context, moduleFragment) diff --git a/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/ModuleGenerator.kt b/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/ModuleGenerator.kt index cd44ab7cf33..945a934e548 100644 --- a/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/ModuleGenerator.kt +++ b/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/ModuleGenerator.kt @@ -60,12 +60,12 @@ class ModuleGenerator( irModule.descriptor, context.irBuiltIns, context.symbolTable, deserializer, extensions ) - ExternalDependenciesGenerator(context.symbolTable, fullIrProvidersList, context.languageVersionSettings) + ExternalDependenciesGenerator(context.symbolTable, fullIrProvidersList) .generateUnboundSymbolsAsDependencies() } fun generateUnboundSymbolsAsDependencies(irProviders: List) { - ExternalDependenciesGenerator(context.symbolTable, irProviders, context.languageVersionSettings) + ExternalDependenciesGenerator(context.symbolTable, irProviders) .generateUnboundSymbolsAsDependencies() } diff --git a/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/ReflectionReferencesGenerator.kt b/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/ReflectionReferencesGenerator.kt index 7abed0ee355..21a067338ca 100644 --- a/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/ReflectionReferencesGenerator.kt +++ b/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/ReflectionReferencesGenerator.kt @@ -159,20 +159,13 @@ class ReflectionReferencesGenerator(statementGenerator: StatementGenerator) : St "Bound callable reference cannot have both receivers: $adapteeDescriptor" } val receiver = irDispatchReceiver ?: irExtensionReceiver - if (receiver == null) { - IrFunctionExpressionImpl( - startOffset, endOffset, irFunctionalType, irAdapterFun, IrStatementOrigin.ADAPTED_FUNCTION_REFERENCE - ) - } else { - // TODO add a bound receiver property to IrFunctionExpressionImpl? - val irAdapterRef = IrFunctionReferenceImpl( - startOffset, endOffset, irFunctionalType, irAdapterFun.symbol, irAdapterFun.typeParameters.size, - irAdapterFun.valueParameters.size, null, IrStatementOrigin.ADAPTED_FUNCTION_REFERENCE - ) - IrBlockImpl(startOffset, endOffset, irFunctionalType, IrStatementOrigin.ADAPTED_FUNCTION_REFERENCE).apply { - statements.add(irAdapterFun) - statements.add(irAdapterRef.apply { extensionReceiver = receiver }) - } + val irAdapterRef = IrFunctionReferenceImpl( + startOffset, endOffset, irFunctionalType, irAdapterFun.symbol, irAdapterFun.typeParameters.size, + irAdapterFun.valueParameters.size, adapteeSymbol, IrStatementOrigin.ADAPTED_FUNCTION_REFERENCE + ) + IrBlockImpl(startOffset, endOffset, irFunctionalType, IrStatementOrigin.ADAPTED_FUNCTION_REFERENCE).apply { + statements.add(irAdapterFun) + statements.add(irAdapterRef.apply { extensionReceiver = receiver }) } } } diff --git a/compiler/ir/ir.tree.impl/src/org/jetbrains/kotlin/ir/declarations/impl/IrClassImpl.kt b/compiler/ir/ir.tree.impl/src/org/jetbrains/kotlin/ir/declarations/impl/IrClassImpl.kt index 2f184aceeff..ec264e7d548 100644 --- a/compiler/ir/ir.tree.impl/src/org/jetbrains/kotlin/ir/declarations/impl/IrClassImpl.kt +++ b/compiler/ir/ir.tree.impl/src/org/jetbrains/kotlin/ir/declarations/impl/IrClassImpl.kt @@ -36,7 +36,7 @@ class IrClassImpl( override val isCompanion: Boolean = false, override val isInner: Boolean = false, override val isData: Boolean = false, - override val isExternal: Boolean = false, + override var isExternal: Boolean = false, override val isInline: Boolean = false, override val isExpect: Boolean = false, override val isFun: Boolean = false, diff --git a/compiler/ir/ir.tree.impl/src/org/jetbrains/kotlin/ir/declarations/impl/IrConstructorImpl.kt b/compiler/ir/ir.tree.impl/src/org/jetbrains/kotlin/ir/declarations/impl/IrConstructorImpl.kt index 8bb9e678b54..42b02e6120a 100644 --- a/compiler/ir/ir.tree.impl/src/org/jetbrains/kotlin/ir/declarations/impl/IrConstructorImpl.kt +++ b/compiler/ir/ir.tree.impl/src/org/jetbrains/kotlin/ir/declarations/impl/IrConstructorImpl.kt @@ -38,7 +38,7 @@ class IrConstructorImpl( override var visibility: DescriptorVisibility, returnType: IrType, override val isInline: Boolean, - override val isExternal: Boolean, + override var isExternal: Boolean, override val isPrimary: Boolean, override val isExpect: Boolean, override val containerSource: DeserializedContainerSource? = null, diff --git a/compiler/ir/ir.tree.impl/src/org/jetbrains/kotlin/ir/declarations/impl/IrFieldImpl.kt b/compiler/ir/ir.tree.impl/src/org/jetbrains/kotlin/ir/declarations/impl/IrFieldImpl.kt index c9602b4c5cf..3cd259e3bea 100644 --- a/compiler/ir/ir.tree.impl/src/org/jetbrains/kotlin/ir/declarations/impl/IrFieldImpl.kt +++ b/compiler/ir/ir.tree.impl/src/org/jetbrains/kotlin/ir/declarations/impl/IrFieldImpl.kt @@ -36,7 +36,7 @@ class IrFieldImpl( override var type: IrType, override var visibility: DescriptorVisibility, override val isFinal: Boolean, - override val isExternal: Boolean, + override var isExternal: Boolean, override val isStatic: Boolean, ) : IrField() { init { diff --git a/compiler/ir/ir.tree.impl/src/org/jetbrains/kotlin/ir/declarations/impl/IrFunctionImpl.kt b/compiler/ir/ir.tree.impl/src/org/jetbrains/kotlin/ir/declarations/impl/IrFunctionImpl.kt index 21fe68874af..f385e4ec8b4 100644 --- a/compiler/ir/ir.tree.impl/src/org/jetbrains/kotlin/ir/declarations/impl/IrFunctionImpl.kt +++ b/compiler/ir/ir.tree.impl/src/org/jetbrains/kotlin/ir/declarations/impl/IrFunctionImpl.kt @@ -29,7 +29,7 @@ abstract class IrFunctionCommonImpl( override var visibility: DescriptorVisibility, returnType: IrType, override val isInline: Boolean, - override val isExternal: Boolean, + override var isExternal: Boolean, override val isTailrec: Boolean, override val isSuspend: Boolean, override val isOperator: Boolean, diff --git a/compiler/ir/ir.tree.impl/src/org/jetbrains/kotlin/ir/declarations/impl/IrPropertyImpl.kt b/compiler/ir/ir.tree.impl/src/org/jetbrains/kotlin/ir/declarations/impl/IrPropertyImpl.kt index ec97784ef1a..c0486f9f244 100644 --- a/compiler/ir/ir.tree.impl/src/org/jetbrains/kotlin/ir/declarations/impl/IrPropertyImpl.kt +++ b/compiler/ir/ir.tree.impl/src/org/jetbrains/kotlin/ir/declarations/impl/IrPropertyImpl.kt @@ -37,7 +37,7 @@ abstract class IrPropertyCommonImpl( override val isConst: Boolean, override val isLateinit: Boolean, override val isDelegated: Boolean, - override val isExternal: Boolean, + override var isExternal: Boolean, override val isExpect: Boolean, override val containerSource: DeserializedContainerSource?, ) : IrProperty() { diff --git a/compiler/ir/ir.tree.persistent/src/org/jetbrains/kotlin/ir/declarations/persistent/PersistentIrClass.kt b/compiler/ir/ir.tree.persistent/src/org/jetbrains/kotlin/ir/declarations/persistent/PersistentIrClass.kt index 5d249d1a231..67a8b24fa40 100644 --- a/compiler/ir/ir.tree.persistent/src/org/jetbrains/kotlin/ir/declarations/persistent/PersistentIrClass.kt +++ b/compiler/ir/ir.tree.persistent/src/org/jetbrains/kotlin/ir/declarations/persistent/PersistentIrClass.kt @@ -39,7 +39,7 @@ internal class PersistentIrClass( override val isCompanion: Boolean = false, override val isInner: Boolean = false, override val isData: Boolean = false, - override val isExternal: Boolean = false, + isExternal: Boolean = false, override val isInline: Boolean = false, override val isExpect: Boolean = false, override val isFun: Boolean = false, @@ -142,6 +142,16 @@ internal class PersistentIrClass( } } + override var isExternalField: Boolean = isExternal + + override var isExternal: Boolean + get() = getCarrier().isExternalField + set(v) { + if (isExternal != v) { + setCarrier().isExternalField = v + } + } + override var attributeOwnerIdField: IrAttributeContainer = this override var attributeOwnerId: IrAttributeContainer diff --git a/compiler/ir/ir.tree.persistent/src/org/jetbrains/kotlin/ir/declarations/persistent/PersistentIrConstructor.kt b/compiler/ir/ir.tree.persistent/src/org/jetbrains/kotlin/ir/declarations/persistent/PersistentIrConstructor.kt index 146af147243..05c22b2bc46 100644 --- a/compiler/ir/ir.tree.persistent/src/org/jetbrains/kotlin/ir/declarations/persistent/PersistentIrConstructor.kt +++ b/compiler/ir/ir.tree.persistent/src/org/jetbrains/kotlin/ir/declarations/persistent/PersistentIrConstructor.kt @@ -40,7 +40,7 @@ internal class PersistentIrConstructor( visibility: DescriptorVisibility, returnType: IrType, override val isInline: Boolean, - override val isExternal: Boolean, + isExternal: Boolean, override val isPrimary: Boolean, override val isExpect: Boolean, override val containerSource: DeserializedContainerSource? @@ -153,6 +153,16 @@ internal class PersistentIrConstructor( } } + override var isExternalField: Boolean = isExternal + + override var isExternal: Boolean + get() = getCarrier().isExternalField + set(v) { + if (isExternal != v) { + setCarrier().isExternalField = v + } + } + @ObsoleteDescriptorBasedAPI override val descriptor: ClassConstructorDescriptor get() = symbol.descriptor diff --git a/compiler/ir/ir.tree.persistent/src/org/jetbrains/kotlin/ir/declarations/persistent/PersistentIrField.kt b/compiler/ir/ir.tree.persistent/src/org/jetbrains/kotlin/ir/declarations/persistent/PersistentIrField.kt index 716cdcce774..0a3b2db6dff 100644 --- a/compiler/ir/ir.tree.persistent/src/org/jetbrains/kotlin/ir/declarations/persistent/PersistentIrField.kt +++ b/compiler/ir/ir.tree.persistent/src/org/jetbrains/kotlin/ir/declarations/persistent/PersistentIrField.kt @@ -38,7 +38,7 @@ internal class PersistentIrField( type: IrType, override var visibility: DescriptorVisibility, override val isFinal: Boolean, - override val isExternal: Boolean, + isExternal: Boolean, override val isStatic: Boolean ) : IrField(), PersistentIrDeclarationBase, @@ -104,4 +104,14 @@ internal class PersistentIrField( setCarrier().typeField = v } } + + override var isExternalField: Boolean = isExternal + + override var isExternal: Boolean + get() = getCarrier().isExternalField + set(v) { + if (isExternal != v) { + setCarrier().isExternalField = v + } + } } diff --git a/compiler/ir/ir.tree.persistent/src/org/jetbrains/kotlin/ir/declarations/persistent/PersistentIrFunction.kt b/compiler/ir/ir.tree.persistent/src/org/jetbrains/kotlin/ir/declarations/persistent/PersistentIrFunction.kt index 6802894d21e..e75fef79067 100644 --- a/compiler/ir/ir.tree.persistent/src/org/jetbrains/kotlin/ir/declarations/persistent/PersistentIrFunction.kt +++ b/compiler/ir/ir.tree.persistent/src/org/jetbrains/kotlin/ir/declarations/persistent/PersistentIrFunction.kt @@ -31,7 +31,7 @@ internal abstract class PersistentIrFunctionCommon( visibility: DescriptorVisibility, returnType: IrType, override val isInline: Boolean, - override val isExternal: Boolean, + isExternal: Boolean, override val isTailrec: Boolean, override val isSuspend: Boolean, override val isOperator: Boolean, @@ -173,6 +173,16 @@ internal abstract class PersistentIrFunctionCommon( setCarrier().correspondingPropertySymbolField = v } } + + override var isExternalField: Boolean = isExternal + + override var isExternal: Boolean + get() = getCarrier().isExternalField + set(v) { + if (isExternal != v) { + setCarrier().isExternalField = v + } + } } internal class PersistentIrFunction( diff --git a/compiler/ir/ir.tree.persistent/src/org/jetbrains/kotlin/ir/declarations/persistent/PersistentIrProperty.kt b/compiler/ir/ir.tree.persistent/src/org/jetbrains/kotlin/ir/declarations/persistent/PersistentIrProperty.kt index 12407ba9537..c9383041931 100644 --- a/compiler/ir/ir.tree.persistent/src/org/jetbrains/kotlin/ir/declarations/persistent/PersistentIrProperty.kt +++ b/compiler/ir/ir.tree.persistent/src/org/jetbrains/kotlin/ir/declarations/persistent/PersistentIrProperty.kt @@ -39,7 +39,7 @@ internal abstract class PersistentIrPropertyCommon( override val isConst: Boolean, override val isLateinit: Boolean, override val isDelegated: Boolean, - override val isExternal: Boolean, + isExternal: Boolean, override val isExpect: Boolean, override val containerSource: DeserializedContainerSource?, ) : IrProperty(), @@ -106,6 +106,16 @@ internal abstract class PersistentIrPropertyCommon( setCarrier().attributeOwnerIdField = v } } + + override var isExternalField: Boolean = isExternal + + override var isExternal: Boolean + get() = getCarrier().isExternalField + set(v) { + if (isExternal != v) { + setCarrier().isExternalField = v + } + } } internal class PersistentIrProperty( diff --git a/compiler/ir/ir.tree.persistent/src/org/jetbrains/kotlin/ir/declarations/persistent/carriers/ClassCarrier.kt b/compiler/ir/ir.tree.persistent/src/org/jetbrains/kotlin/ir/declarations/persistent/carriers/ClassCarrier.kt index 6a6bb7046d1..46732248661 100644 --- a/compiler/ir/ir.tree.persistent/src/org/jetbrains/kotlin/ir/declarations/persistent/carriers/ClassCarrier.kt +++ b/compiler/ir/ir.tree.persistent/src/org/jetbrains/kotlin/ir/declarations/persistent/carriers/ClassCarrier.kt @@ -16,6 +16,7 @@ internal interface ClassCarrier : DeclarationCarrier { var metadataField: MetadataSource? var visibilityField: DescriptorVisibility var modalityField: Modality + var isExternalField: Boolean var attributeOwnerIdField: IrAttributeContainer var typeParametersField: List var superTypesField: List @@ -32,7 +33,8 @@ internal interface ClassCarrier : DeclarationCarrier { modalityField, attributeOwnerIdField, typeParametersField, - superTypesField + superTypesField, + isExternalField ) } } @@ -48,5 +50,6 @@ internal class ClassCarrierImpl( override var modalityField: Modality, override var attributeOwnerIdField: IrAttributeContainer, override var typeParametersField: List, - override var superTypesField: List + override var superTypesField: List, + override var isExternalField: Boolean ) : ClassCarrier diff --git a/compiler/ir/ir.tree.persistent/src/org/jetbrains/kotlin/ir/declarations/persistent/carriers/ConstructorCarrier.kt b/compiler/ir/ir.tree.persistent/src/org/jetbrains/kotlin/ir/declarations/persistent/carriers/ConstructorCarrier.kt index 11dee7fcb92..85ee79cea81 100644 --- a/compiler/ir/ir.tree.persistent/src/org/jetbrains/kotlin/ir/declarations/persistent/carriers/ConstructorCarrier.kt +++ b/compiler/ir/ir.tree.persistent/src/org/jetbrains/kotlin/ir/declarations/persistent/carriers/ConstructorCarrier.kt @@ -25,7 +25,8 @@ internal interface ConstructorCarrier : FunctionBaseCarrier { metadataField, visibilityField, typeParametersField, - valueParametersField + valueParametersField, + isExternalField, ) } } @@ -42,5 +43,6 @@ internal class ConstructorCarrierImpl( override var metadataField: MetadataSource?, override var visibilityField: DescriptorVisibility, override var typeParametersField: List, - override var valueParametersField: List + override var valueParametersField: List, + override var isExternalField: Boolean, ) : ConstructorCarrier diff --git a/compiler/ir/ir.tree.persistent/src/org/jetbrains/kotlin/ir/declarations/persistent/carriers/FieldCarrier.kt b/compiler/ir/ir.tree.persistent/src/org/jetbrains/kotlin/ir/declarations/persistent/carriers/FieldCarrier.kt index 224a1ffbfb0..8da09c3fd20 100644 --- a/compiler/ir/ir.tree.persistent/src/org/jetbrains/kotlin/ir/declarations/persistent/carriers/FieldCarrier.kt +++ b/compiler/ir/ir.tree.persistent/src/org/jetbrains/kotlin/ir/declarations/persistent/carriers/FieldCarrier.kt @@ -18,6 +18,7 @@ internal interface FieldCarrier : DeclarationCarrier { var initializerField: IrExpressionBody? var correspondingPropertySymbolField: IrPropertySymbol? var metadataField: MetadataSource? + var isExternalField: Boolean override fun clone(): FieldCarrier { return FieldCarrierImpl( @@ -28,7 +29,8 @@ internal interface FieldCarrier : DeclarationCarrier { typeField, initializerField, correspondingPropertySymbolField, - metadataField + metadataField, + isExternalField, ) } } @@ -41,5 +43,6 @@ internal class FieldCarrierImpl( override var typeField: IrType, override var initializerField: IrExpressionBody?, override var correspondingPropertySymbolField: IrPropertySymbol?, - override var metadataField: MetadataSource? + override var metadataField: MetadataSource?, + override var isExternalField: Boolean ) : FieldCarrier diff --git a/compiler/ir/ir.tree.persistent/src/org/jetbrains/kotlin/ir/declarations/persistent/carriers/FunctionBaseCarrier.kt b/compiler/ir/ir.tree.persistent/src/org/jetbrains/kotlin/ir/declarations/persistent/carriers/FunctionBaseCarrier.kt index a677799a357..b2f27879fa2 100644 --- a/compiler/ir/ir.tree.persistent/src/org/jetbrains/kotlin/ir/declarations/persistent/carriers/FunctionBaseCarrier.kt +++ b/compiler/ir/ir.tree.persistent/src/org/jetbrains/kotlin/ir/declarations/persistent/carriers/FunctionBaseCarrier.kt @@ -21,4 +21,5 @@ internal interface FunctionBaseCarrier : DeclarationCarrier { var visibilityField: DescriptorVisibility var typeParametersField: List var valueParametersField: List + var isExternalField: Boolean } diff --git a/compiler/ir/ir.tree.persistent/src/org/jetbrains/kotlin/ir/declarations/persistent/carriers/FunctionCarrier.kt b/compiler/ir/ir.tree.persistent/src/org/jetbrains/kotlin/ir/declarations/persistent/carriers/FunctionCarrier.kt index 22ff537563d..80b113997fb 100644 --- a/compiler/ir/ir.tree.persistent/src/org/jetbrains/kotlin/ir/declarations/persistent/carriers/FunctionCarrier.kt +++ b/compiler/ir/ir.tree.persistent/src/org/jetbrains/kotlin/ir/declarations/persistent/carriers/FunctionCarrier.kt @@ -34,7 +34,8 @@ internal interface FunctionCarrier : FunctionBaseCarrier { valueParametersField, correspondingPropertySymbolField, overriddenSymbolsField, - attributeOwnerIdField + attributeOwnerIdField, + isExternalField, ) } } @@ -54,5 +55,6 @@ internal class FunctionCarrierImpl( override var valueParametersField: List, override var correspondingPropertySymbolField: IrPropertySymbol?, override var overriddenSymbolsField: List, - override var attributeOwnerIdField: IrAttributeContainer + override var attributeOwnerIdField: IrAttributeContainer, + override var isExternalField: Boolean, ) : FunctionCarrier diff --git a/compiler/ir/ir.tree.persistent/src/org/jetbrains/kotlin/ir/declarations/persistent/carriers/PropertyCarrier.kt b/compiler/ir/ir.tree.persistent/src/org/jetbrains/kotlin/ir/declarations/persistent/carriers/PropertyCarrier.kt index 02f64a30ca1..17dc84fc51e 100644 --- a/compiler/ir/ir.tree.persistent/src/org/jetbrains/kotlin/ir/declarations/persistent/carriers/PropertyCarrier.kt +++ b/compiler/ir/ir.tree.persistent/src/org/jetbrains/kotlin/ir/declarations/persistent/carriers/PropertyCarrier.kt @@ -14,6 +14,7 @@ internal interface PropertyCarrier : DeclarationCarrier { var setterField: IrSimpleFunction? var metadataField: MetadataSource? var attributeOwnerIdField: IrAttributeContainer + var isExternalField: Boolean override fun clone(): PropertyCarrier { return PropertyCarrierImpl( @@ -26,6 +27,7 @@ internal interface PropertyCarrier : DeclarationCarrier { setterField, metadataField, attributeOwnerIdField, + isExternalField, ) } } @@ -39,5 +41,6 @@ internal class PropertyCarrierImpl( override var getterField: IrSimpleFunction?, override var setterField: IrSimpleFunction?, override var metadataField: MetadataSource?, - override var attributeOwnerIdField: IrAttributeContainer + override var attributeOwnerIdField: IrAttributeContainer, + override var isExternalField: Boolean ) : PropertyCarrier diff --git a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/declarations/IrClass.kt b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/declarations/IrClass.kt index 59b68ebdf0f..3de4027ca0a 100644 --- a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/declarations/IrClass.kt +++ b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/declarations/IrClass.kt @@ -29,7 +29,7 @@ import org.jetbrains.kotlin.ir.visitors.IrElementTransformer import org.jetbrains.kotlin.ir.visitors.IrElementVisitor abstract class IrClass : - IrDeclarationBase(), IrDeclarationWithName, IrDeclarationWithVisibility, + IrDeclarationBase(), IrPossiblyExternalDeclaration, IrDeclarationWithVisibility, IrDeclarationContainer, IrTypeParametersContainer, IrAttributeContainer, IrMetadataSourceOwner { @ObsoleteDescriptorBasedAPI @@ -41,7 +41,6 @@ abstract class IrClass : abstract val isCompanion: Boolean abstract val isInner: Boolean abstract val isData: Boolean - abstract val isExternal: Boolean abstract val isInline: Boolean abstract val isExpect: Boolean abstract val isFun: Boolean diff --git a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/declarations/IrDeclaration.kt b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/declarations/IrDeclaration.kt index 2d296e31522..f5a1939fd3e 100644 --- a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/declarations/IrDeclaration.kt +++ b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/declarations/IrDeclaration.kt @@ -17,8 +17,8 @@ package org.jetbrains.kotlin.ir.declarations import org.jetbrains.kotlin.descriptors.DeclarationDescriptor -import org.jetbrains.kotlin.descriptors.Modality import org.jetbrains.kotlin.descriptors.DescriptorVisibility +import org.jetbrains.kotlin.descriptors.Modality import org.jetbrains.kotlin.ir.IrElement import org.jetbrains.kotlin.ir.IrElementBase import org.jetbrains.kotlin.ir.IrStatement @@ -60,6 +60,10 @@ interface IrDeclarationWithName : IrDeclaration { val name: Name } +interface IrPossiblyExternalDeclaration : IrDeclarationWithName { + var isExternal: Boolean +} + interface IrOverridableMember : IrDeclarationWithVisibility, IrDeclarationWithName, IrSymbolOwner { val modality: Modality } diff --git a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/declarations/IrField.kt b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/declarations/IrField.kt index 43d7d2cf599..aff06ffc3a5 100644 --- a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/declarations/IrField.kt +++ b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/declarations/IrField.kt @@ -16,7 +16,7 @@ import org.jetbrains.kotlin.ir.visitors.IrElementVisitor abstract class IrField : IrDeclarationBase(), - IrDeclarationWithName, IrDeclarationWithVisibility, IrDeclarationParent, IrMetadataSourceOwner { + IrPossiblyExternalDeclaration, IrDeclarationWithVisibility, IrDeclarationParent, IrMetadataSourceOwner { @ObsoleteDescriptorBasedAPI abstract override val descriptor: PropertyDescriptor @@ -24,7 +24,6 @@ abstract class IrField : abstract var type: IrType abstract val isFinal: Boolean - abstract val isExternal: Boolean abstract val isStatic: Boolean abstract var initializer: IrExpressionBody? diff --git a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/declarations/IrFunction.kt b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/declarations/IrFunction.kt index 05e9f6a524a..de8b0c2b6c3 100644 --- a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/declarations/IrFunction.kt +++ b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/declarations/IrFunction.kt @@ -29,7 +29,7 @@ import org.jetbrains.kotlin.ir.visitors.IrElementVisitor abstract class IrFunction : IrDeclarationBase(), - IrDeclarationWithName, IrDeclarationWithVisibility, IrTypeParametersContainer, IrSymbolOwner, IrDeclarationParent, IrReturnTarget, + IrPossiblyExternalDeclaration, IrDeclarationWithVisibility, IrTypeParametersContainer, IrSymbolOwner, IrDeclarationParent, IrReturnTarget, IrMemberWithContainerSource, IrMetadataSourceOwner { @@ -38,7 +38,6 @@ abstract class IrFunction : abstract override val symbol: IrFunctionSymbol abstract val isInline: Boolean // NB: there's an inline constructor for Array and each primitive array class - abstract val isExternal: Boolean abstract val isExpect: Boolean abstract var returnType: IrType diff --git a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/declarations/IrProperty.kt b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/declarations/IrProperty.kt index 27435508549..9db122e2fcd 100644 --- a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/declarations/IrProperty.kt +++ b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/declarations/IrProperty.kt @@ -21,10 +21,9 @@ import org.jetbrains.kotlin.ir.ObsoleteDescriptorBasedAPI import org.jetbrains.kotlin.ir.symbols.IrPropertySymbol import org.jetbrains.kotlin.ir.visitors.IrElementTransformer import org.jetbrains.kotlin.ir.visitors.IrElementVisitor -import org.jetbrains.kotlin.serialization.deserialization.descriptors.DeserializedContainerSource abstract class IrProperty : - IrDeclarationBase(), IrOverridableMember, IrMetadataSourceOwner, IrAttributeContainer, IrMemberWithContainerSource { + IrDeclarationBase(), IrPossiblyExternalDeclaration, IrOverridableMember, IrMetadataSourceOwner, IrAttributeContainer, IrMemberWithContainerSource { @ObsoleteDescriptorBasedAPI abstract override val descriptor: PropertyDescriptor abstract override val symbol: IrPropertySymbol @@ -33,7 +32,6 @@ abstract class IrProperty : abstract val isConst: Boolean abstract val isLateinit: Boolean abstract val isDelegated: Boolean - abstract val isExternal: Boolean abstract val isExpect: Boolean abstract val isFakeOverride: Boolean diff --git a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/declarations/lazy/IrLazyClass.kt b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/declarations/lazy/IrLazyClass.kt index 247675cc629..052cbb850d9 100644 --- a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/declarations/lazy/IrLazyClass.kt +++ b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/declarations/lazy/IrLazyClass.kt @@ -32,7 +32,7 @@ class IrLazyClass( override val isCompanion: Boolean, override val isInner: Boolean, override val isData: Boolean, - override val isExternal: Boolean, + override var isExternal: Boolean, override val isInline: Boolean, override val isExpect: Boolean, override val isFun: Boolean, diff --git a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/declarations/lazy/IrLazyConstructor.kt b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/declarations/lazy/IrLazyConstructor.kt index 81928a1efd8..b7f2ba5f21e 100644 --- a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/declarations/lazy/IrLazyConstructor.kt +++ b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/declarations/lazy/IrLazyConstructor.kt @@ -30,7 +30,7 @@ class IrLazyConstructor( override val name: Name, override var visibility: DescriptorVisibility, override val isInline: Boolean, - override val isExternal: Boolean, + override var isExternal: Boolean, override val isPrimary: Boolean, override val isExpect: Boolean, override val stubGenerator: DeclarationStubGenerator, diff --git a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/declarations/lazy/IrLazyField.kt b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/declarations/lazy/IrLazyField.kt index 414072adfe2..e60906656f2 100644 --- a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/declarations/lazy/IrLazyField.kt +++ b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/declarations/lazy/IrLazyField.kt @@ -32,7 +32,7 @@ class IrLazyField( override val name: Name, override var visibility: DescriptorVisibility, override val isFinal: Boolean, - override val isExternal: Boolean, + override var isExternal: Boolean, override val isStatic: Boolean, override val stubGenerator: DeclarationStubGenerator, override val typeTranslator: TypeTranslator, diff --git a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/declarations/lazy/IrLazyFunction.kt b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/declarations/lazy/IrLazyFunction.kt index b575411e7f2..c71ef05c1ab 100644 --- a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/declarations/lazy/IrLazyFunction.kt +++ b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/declarations/lazy/IrLazyFunction.kt @@ -34,7 +34,7 @@ class IrLazyFunction( override var visibility: DescriptorVisibility, override val modality: Modality, override val isInline: Boolean, - override val isExternal: Boolean, + override var isExternal: Boolean, override val isTailrec: Boolean, override val isSuspend: Boolean, override val isExpect: Boolean, diff --git a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/declarations/lazy/IrLazyProperty.kt b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/declarations/lazy/IrLazyProperty.kt index 813d20352b3..2d33afc799f 100644 --- a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/declarations/lazy/IrLazyProperty.kt +++ b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/declarations/lazy/IrLazyProperty.kt @@ -34,7 +34,7 @@ class IrLazyProperty( override val isConst: Boolean, override val isLateinit: Boolean, override val isDelegated: Boolean, - override val isExternal: Boolean, + override var isExternal: Boolean, override val isExpect: Boolean, override val isFakeOverride: Boolean, override val stubGenerator: DeclarationStubGenerator, diff --git a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/linkage/KotlinIrLinkerInternalException.kt b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/linkage/KotlinIrLinkerInternalException.kt new file mode 100644 index 00000000000..39948d0416d --- /dev/null +++ b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/linkage/KotlinIrLinkerInternalException.kt @@ -0,0 +1,8 @@ +/* + * Copyright 2010-2021 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. + */ + +package org.jetbrains.kotlin.ir.linkage + +object KotlinIrLinkerInternalException : Exception("Kotlin IR Linker exception") \ No newline at end of file diff --git a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/ExternalDependenciesGenerator.kt b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/ExternalDependenciesGenerator.kt index c5e686b1dd5..ff4ee5d322c 100644 --- a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/ExternalDependenciesGenerator.kt +++ b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/ExternalDependenciesGenerator.kt @@ -16,19 +16,19 @@ package org.jetbrains.kotlin.ir.util -import org.jetbrains.kotlin.config.LanguageVersionSettings +import org.jetbrains.kotlin.analyzer.AnalysisResult import org.jetbrains.kotlin.descriptors.ModuleDescriptor import org.jetbrains.kotlin.ir.declarations.IrDeclaration import org.jetbrains.kotlin.ir.descriptors.IrBuiltIns import org.jetbrains.kotlin.ir.linkage.IrDeserializer import org.jetbrains.kotlin.ir.linkage.IrProvider +import org.jetbrains.kotlin.ir.linkage.KotlinIrLinkerInternalException import org.jetbrains.kotlin.ir.symbols.IrSymbol import org.jetbrains.kotlin.utils.addToStdlib.firstNotNullResult class ExternalDependenciesGenerator( val symbolTable: SymbolTable, - private val irProviders: List, - private val languageVersionSettings: LanguageVersionSettings + private val irProviders: List ) { fun generateUnboundSymbolsAsDependencies() { // There should be at most one DeclarationStubGenerator (none in closed world?) @@ -40,18 +40,22 @@ class ExternalDependenciesGenerator( */ var unbound = setOf() lateinit var prevUnbound: Set - do { - prevUnbound = unbound - unbound = symbolTable.allUnbound + try { + do { + prevUnbound = unbound + unbound = symbolTable.allUnbound - for (symbol in unbound) { - // Symbol could get bound as a side effect of deserializing other symbols. - if (!symbol.isBound) { - irProviders.getDeclaration(symbol) + for (symbol in unbound) { + // Symbol could get bound as a side effect of deserializing other symbols. + if (!symbol.isBound) { + irProviders.getDeclaration(symbol) + } } - } - // We wait for the unbound to stabilize on fake overrides. - } while (unbound != prevUnbound) + // We wait for the unbound to stabilize on fake overrides. + } while (unbound != prevUnbound) + } catch (ex: KotlinIrLinkerInternalException) { + throw AnalysisResult.CompilationErrorException() + } } } diff --git a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/IrMessageLogger.kt b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/IrMessageLogger.kt new file mode 100644 index 00000000000..9069a51c5d7 --- /dev/null +++ b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/IrMessageLogger.kt @@ -0,0 +1,28 @@ +/* + * Copyright 2010-2021 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. + */ + +package org.jetbrains.kotlin.ir.util + +import org.jetbrains.kotlin.config.CompilerConfigurationKey + +interface IrMessageLogger { + + enum class Severity { + INFO, WARNING, ERROR + } + + data class Location(val filePath: String, val line: Int, val column: Int) + + fun report(severity: Severity, message: String, location: Location?) + + object None : IrMessageLogger { + override fun report(severity: Severity, message: String, location: Location?) {} + } + + companion object { + @JvmStatic + val IR_MESSAGE_LOGGER = CompilerConfigurationKey("ir message logger") + } +} \ No newline at end of file diff --git a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/IrUtils.kt b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/IrUtils.kt index f095109368b..aea264701db 100644 --- a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/IrUtils.kt +++ b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/IrUtils.kt @@ -313,23 +313,12 @@ fun IrCall.isSuperToAny() = superQualifierSymbol?.let { this.symbol.owner.isFake fun IrDeclaration.hasInterfaceParent() = parent.safeAs()?.isInterface == true -fun IrDeclaration.isEffectivelyExternal(): Boolean { - fun IrFunction.effectiveParentDeclaration(): IrDeclaration? = - when (this) { - is IrSimpleFunction -> correspondingPropertySymbol?.owner ?: parent as? IrDeclaration - else -> parent as? IrDeclaration - } +fun IrPossiblyExternalDeclaration.isEffectivelyExternal(): Boolean = + this.isExternal - val parent = parent - return when (this) { - is IrFunction -> isExternal || (effectiveParentDeclaration()?.isEffectivelyExternal() ?: false) - is IrField -> isExternal || parent is IrDeclaration && parent.isEffectivelyExternal() - is IrProperty -> isExternal || parent is IrDeclaration && parent.isEffectivelyExternal() - is IrClass -> isExternal || parent is IrDeclaration && parent.isEffectivelyExternal() - else -> false - } -} +fun IrDeclaration.isEffectivelyExternal(): Boolean = + this is IrPossiblyExternalDeclaration && this.isExternal fun IrFunction.isExternalOrInheritedFromExternal(): Boolean { fun isExternalOrInheritedFromExternalImpl(f: IrSimpleFunction): Boolean = diff --git a/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/IncrementalCompilationSupport.kt b/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/IncrementalCompilationSupport.kt index 65f286ae02a..b10c31c6c11 100644 --- a/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/IncrementalCompilationSupport.kt +++ b/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/IncrementalCompilationSupport.kt @@ -127,6 +127,8 @@ class CurrentModuleWithICDeserializer( icDeserializer.init(delegate) } + override fun toString(): String = "Incremental Cache Klib" + override val klib: IrLibrary get() = icDeserializer.klib diff --git a/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/IrFileDeserializer.kt b/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/IrFileDeserializer.kt index dccd507249f..b949cff18ac 100644 --- a/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/IrFileDeserializer.kt +++ b/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/IrFileDeserializer.kt @@ -5,8 +5,6 @@ package org.jetbrains.kotlin.backend.common.serialization -import org.jetbrains.kotlin.backend.common.LoggingContext -import org.jetbrains.kotlin.backend.common.ir.ir2string import org.jetbrains.kotlin.backend.common.lower.InnerClassesSupport import org.jetbrains.kotlin.backend.common.overrides.FakeOverrideBuilder import org.jetbrains.kotlin.backend.common.overrides.FakeOverrideClassFilter @@ -111,7 +109,7 @@ import org.jetbrains.kotlin.backend.common.serialization.proto.MemberAccessCommo import org.jetbrains.kotlin.backend.common.serialization.proto.PublicIdSignature as ProtoPublicIdSignature abstract class IrFileDeserializer( - val logger: LoggingContext, + val messageLogger: IrMessageLogger, val builtIns: IrBuiltIns, val symbolTable: SymbolTable, protected var deserializeBodies: Boolean, @@ -169,7 +167,6 @@ abstract class IrFileDeserializer( private fun deserializeSimpleType(proto: ProtoSimpleType): IrSimpleType { val symbol = deserializeIrSymbolAndRemap(proto.classifier) as? IrClassifierSymbol ?: error("could not convert sym to ClassifierSymbol") - logger.log { "deserializeSimpleType: symbol=$symbol" } val arguments = proto.argumentList.map { deserializeIrTypeArgument(it) } val annotations = deserializeAnnotations(proto.annotationList) @@ -182,7 +179,6 @@ abstract class IrFileDeserializer( annotations, if (proto.hasAbbreviation()) deserializeTypeAbbreviation(proto.abbreviation) else null ) - logger.log { "ir_type = $result; render = ${result.render()}" } return result } @@ -322,8 +318,6 @@ abstract class IrFileDeserializer( -> TODO("Statement deserialization not implemented: ${proto.statementCase}") } - logger.log { "### Deserialized statement: ${ir2string(element)}" } - return element } @@ -938,7 +932,6 @@ abstract class IrFileDeserializer( val operation = proto.operation val expression = deserializeOperation(operation, start, end, type) - logger.log { "### Deserialized expression: ${ir2string(expression)} ir_type=$type" } return expression } @@ -1429,8 +1422,6 @@ abstract class IrFileDeserializer( DECLARATOR_NOT_SET -> error("Declaration deserialization not implemented: ${proto.declaratorCase}") } - logger.log { "### Deserialized declaration: ${declaration.descriptor} -> ${ir2string(declaration)}" } - return declaration } diff --git a/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/IrFileSerializer.kt b/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/IrFileSerializer.kt index 3537730acee..8af40c9a503 100644 --- a/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/IrFileSerializer.kt +++ b/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/IrFileSerializer.kt @@ -5,7 +5,6 @@ package org.jetbrains.kotlin.backend.common.serialization -import org.jetbrains.kotlin.backend.common.LoggingContext import org.jetbrains.kotlin.backend.common.ir.ir2string import org.jetbrains.kotlin.backend.common.serialization.encodings.* import org.jetbrains.kotlin.descriptors.* @@ -104,7 +103,7 @@ import org.jetbrains.kotlin.backend.common.serialization.proto.NullableIrExpress import org.jetbrains.kotlin.backend.common.serialization.proto.PublicIdSignature as ProtoPublicIdSignature open class IrFileSerializer( - val logger: LoggingContext, + val messageLogger: IrMessageLogger, private val declarationTable: DeclarationTable, private val expectDescriptorToSymbol: MutableMap, private val bodiesOnlyForInlines: Boolean = false, @@ -348,7 +347,6 @@ open class IrFileSerializer( .build() private fun serializeIrTypeData(type: IrType): ProtoType { - logger.log { "### serializing IrType: $type" } val proto = ProtoType.newBuilder() when (type) { is IrSimpleType -> @@ -917,8 +915,6 @@ open class IrFileSerializer( } private fun serializeExpression(expression: IrExpression): ProtoExpression { - logger.log { "### serializing Expression: ${ir2string(expression)}" } - val coordinates = serializeCoordinates(expression.startOffset, expression.endOffset) val proto = ProtoExpression.newBuilder() .setType(serializeIrType(expression.type)) @@ -973,7 +969,6 @@ open class IrFileSerializer( } private fun serializeStatement(statement: IrElement): ProtoStatement { - logger.log { "### serializing Statement: ${ir2string(statement)}" } val coordinates = serializeCoordinates(statement.startOffset, statement.endOffset) val proto = ProtoStatement.newBuilder() @@ -981,22 +976,22 @@ open class IrFileSerializer( when (statement) { is IrDeclaration -> { - logger.log { " ###Declaration " }; proto.declaration = serializeDeclaration(statement) + proto.declaration = serializeDeclaration(statement) } is IrExpression -> { - logger.log { " ###Expression " }; proto.expression = serializeExpression(statement) + proto.expression = serializeExpression(statement) } is IrBlockBody -> { - logger.log { " ###BlockBody " }; proto.blockBody = serializeBlockBody(statement) + proto.blockBody = serializeBlockBody(statement) } is IrBranch -> { - logger.log { " ###Branch " }; proto.branch = serializeBranch(statement) + proto.branch = serializeBranch(statement) } is IrCatch -> { - logger.log { " ###Catch " }; proto.catch = serializeCatch(statement) + proto.catch = serializeCatch(statement) } is IrSyntheticBody -> { - logger.log { " ###SyntheticBody " }; proto.syntheticBody = serializeSyntheticBody(statement) + proto.syntheticBody = serializeSyntheticBody(statement) } else -> { TODO("Statement not implemented yet: ${ir2string(statement)}") @@ -1191,8 +1186,6 @@ open class IrFileSerializer( } private fun serializeDeclaration(declaration: IrDeclaration): ProtoDeclaration { - logger.log { "### serializing Declaration: ${ir2string(declaration)}" } - val proto = ProtoDeclaration.newBuilder() when (declaration) { diff --git a/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/IrModuleSerializer.kt b/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/IrModuleSerializer.kt index a95fced8663..2e6657240a4 100644 --- a/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/IrModuleSerializer.kt +++ b/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/IrModuleSerializer.kt @@ -5,14 +5,14 @@ package org.jetbrains.kotlin.backend.common.serialization -import org.jetbrains.kotlin.backend.common.LoggingContext import org.jetbrains.kotlin.builtins.FunctionInterfacePackageFragment import org.jetbrains.kotlin.ir.declarations.IrFile import org.jetbrains.kotlin.ir.declarations.IrModuleFragment +import org.jetbrains.kotlin.ir.util.IrMessageLogger import org.jetbrains.kotlin.library.SerializedIrFile import org.jetbrains.kotlin.library.SerializedIrModule -abstract class IrModuleSerializer(protected val logger: LoggingContext) { +abstract class IrModuleSerializer(protected val messageLogger: IrMessageLogger) { abstract fun createSerializerForFile(file: IrFile): F /** diff --git a/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/KotlinIrLinker.kt b/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/KotlinIrLinker.kt index 62574d45b92..432fd54ea8c 100644 --- a/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/KotlinIrLinker.kt +++ b/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/KotlinIrLinker.kt @@ -5,7 +5,6 @@ package org.jetbrains.kotlin.backend.common.serialization -import org.jetbrains.kotlin.backend.common.LoggingContext import org.jetbrains.kotlin.backend.common.overrides.FakeOverrideBuilder import org.jetbrains.kotlin.backend.common.overrides.FileLocalAwareLinker import org.jetbrains.kotlin.backend.common.serialization.encodings.BinarySymbolData @@ -20,11 +19,13 @@ import org.jetbrains.kotlin.ir.declarations.IrFile import org.jetbrains.kotlin.ir.declarations.IrModuleFragment import org.jetbrains.kotlin.ir.declarations.impl.IrFileImpl import org.jetbrains.kotlin.ir.declarations.impl.IrModuleFragmentImpl -import org.jetbrains.kotlin.ir.descriptors.* +import org.jetbrains.kotlin.ir.descriptors.IrAbstractFunctionFactory +import org.jetbrains.kotlin.ir.descriptors.IrBuiltIns import org.jetbrains.kotlin.ir.expressions.IrExpression import org.jetbrains.kotlin.ir.expressions.IrLoop import org.jetbrains.kotlin.ir.expressions.impl.IrErrorExpressionImpl import org.jetbrains.kotlin.ir.linkage.IrDeserializer +import org.jetbrains.kotlin.ir.linkage.KotlinIrLinkerInternalException import org.jetbrains.kotlin.ir.symbols.* import org.jetbrains.kotlin.ir.symbols.impl.* import org.jetbrains.kotlin.ir.types.IrType @@ -49,7 +50,7 @@ import org.jetbrains.kotlin.backend.common.serialization.proto.IrType as ProtoTy abstract class KotlinIrLinker( private val currentModule: ModuleDescriptor?, - val logger: LoggingContext, + val messageLogger: IrMessageLogger, val builtIns: IrBuiltIns, val symbolTable: SymbolTable, private val exportedDependencies: List @@ -103,12 +104,14 @@ abstract class KotlinIrLinker( filesWithPendingTopLevels.remove(pendingDeserializer) } } + + override fun toString(): String = klib.toString() } private val moduleDeserializationState = ModuleDeserializationState() private val moduleReversedFileIndex = mutableMapOf() override val moduleDependencies by lazy { - moduleDescriptor.allDependencyModules.filter { it != moduleDescriptor }.map { resolveModuleDeserializer(it) } + moduleDescriptor.allDependencyModules.filter { it != moduleDescriptor }.map { resolveModuleDeserializer(it, null) } } override fun init(delegate: IrModuleDeserializer) { @@ -126,7 +129,7 @@ abstract class KotlinIrLinker( fileToDeserializerMap.values.forEach { it.deserializeExpectActualMapping() } } - override fun referenceSimpleFunctionByLocalSignature(file: IrFile, idSignature: IdSignature) : IrSimpleFunctionSymbol = + override fun referenceSimpleFunctionByLocalSignature(file: IrFile, idSignature: IdSignature): IrSimpleFunctionSymbol = fileToDeserializerMap[file]?.referenceSimpleFunctionByLocalSignature(idSignature) ?: error("No deserializer for file $file in module ${moduleDescriptor.name}") @@ -238,7 +241,7 @@ abstract class KotlinIrLinker( allowErrorNodes: Boolean ) : IrFileDeserializer( - logger, + messageLogger, builtIns, symbolTable, !onlyHeaders, @@ -356,7 +359,11 @@ abstract class KotlinIrLinker( val topLevelSig = idSig.topLevelSignature() if (topLevelSig in moduleDeserializer) return moduleDeserializer - return moduleDeserializer.moduleDependencies.firstOrNull { topLevelSig in it } ?: handleNoModuleDeserializerFound(idSig) + return moduleDeserializer.moduleDependencies.firstOrNull { topLevelSig in it } ?: handleNoModuleDeserializerFound( + idSig, + moduleDeserializer.moduleDescriptor, + moduleDeserializer.moduleDependencies + ) } private fun referenceIrSymbolData(symbol: IrSymbol, signature: IdSignature) { @@ -467,12 +474,33 @@ abstract class KotlinIrLinker( return codedInputStream } - protected open fun handleNoModuleDeserializerFound(idSignature: IdSignature): IrModuleDeserializer { - error("Deserializer for declaration $idSignature is not found") + protected open fun handleNoModuleDeserializerFound(idSignature: IdSignature, currentModule: ModuleDescriptor, dependencies: Collection): IrModuleDeserializer { + val message = buildString { + append("Module $currentModule has reference $idSignature, unfortunately neither itself nor its dependencies ") + dependencies.joinTo(this, "\n\t", "[\n\t", "\n]") + append(" contain this declaration") + append("\n") + append("Please check that project configuration is correct and has required dependencies.") + } + messageLogger.report(IrMessageLogger.Severity.ERROR, message, null) + + throw KotlinIrLinkerInternalException } - protected open fun resolveModuleDeserializer(moduleDescriptor: ModuleDescriptor): IrModuleDeserializer { - return deserializersForModules[moduleDescriptor] ?: error("No module deserializer found for $moduleDescriptor") + protected open fun resolveModuleDeserializer(module: ModuleDescriptor, signature: IdSignature?): IrModuleDeserializer { + return deserializersForModules[module] ?: run { + val message = buildString { + append("Could not load module ") + append(module) + signature?.let { + append("; It was an attempt to find deserializer for ") + append(it) + } + } + messageLogger.report(IrMessageLogger.Severity.ERROR, message, null) + + throw KotlinIrLinkerInternalException + } } protected abstract fun createModuleDeserializer( @@ -540,7 +568,7 @@ abstract class KotlinIrLinker( val descriptor = symbol.descriptor - val moduleDeserializer = resolveModuleDeserializer(descriptor.module) + val moduleDeserializer = resolveModuleDeserializer(descriptor.module, symbol.signature) // moduleDeserializer.deserializeIrSymbol(signature, symbol.kind()) moduleDeserializer.declareIrSymbol(symbol) @@ -600,14 +628,16 @@ abstract class KotlinIrLinker( override fun tryReferencingSimpleFunctionByLocalSignature(parent: IrDeclaration, idSignature: IdSignature): IrSimpleFunctionSymbol? { if (idSignature.isPublic) return null - return deserializersForModules[parent.file.packageFragmentDescriptor.containingDeclaration]?.referenceSimpleFunctionByLocalSignature(parent.file, idSignature) - ?: error("No module deserializer for ${parent.render()}") + val file = parent.file + val moduleDescriptor = file.packageFragmentDescriptor.containingDeclaration + return resolveModuleDeserializer(moduleDescriptor, null).referenceSimpleFunctionByLocalSignature(file, idSignature) } override fun tryReferencingPropertyByLocalSignature(parent: IrDeclaration, idSignature: IdSignature): IrPropertySymbol? { if (idSignature.isPublic) return null - return deserializersForModules[parent.file.packageFragmentDescriptor.containingDeclaration]?.referencePropertyByLocalSignature(parent.file, idSignature) - ?: error("No module deserializer for ${parent.render()}") + val file = parent.file + val moduleDescriptor = file.packageFragmentDescriptor.containingDeclaration + return resolveModuleDeserializer(moduleDescriptor, null).referencePropertyByLocalSignature(file, idSignature) } protected open fun createCurrentModuleDeserializer(moduleFragment: IrModuleFragment, dependencies: Collection): IrModuleDeserializer = @@ -617,7 +647,7 @@ abstract class KotlinIrLinker( linkerExtensions = extensions if (moduleFragment != null) { val currentModuleDependencies = moduleFragment.descriptor.allDependencyModules.map { - deserializersForModules[it] ?: error("No deserializer found for $it") + resolveModuleDeserializer(it, null) } val currentModuleDeserializer = createCurrentModuleDeserializer(moduleFragment, currentModuleDependencies) deserializersForModules[moduleFragment.descriptor] = diff --git a/compiler/ir/serialization.js/src/org/jetbrains/kotlin/ir/backend/js/klib.kt b/compiler/ir/serialization.js/src/org/jetbrains/kotlin/ir/backend/js/klib.kt index 314c5b1a144..6ea12e0f8a2 100644 --- a/compiler/ir/serialization.js/src/org/jetbrains/kotlin/ir/backend/js/klib.kt +++ b/compiler/ir/serialization.js/src/org/jetbrains/kotlin/ir/backend/js/klib.kt @@ -10,7 +10,6 @@ import com.intellij.openapi.vfs.VfsUtilCore import com.intellij.psi.PsiElement import org.jetbrains.kotlin.analyzer.AbstractAnalyzerWithCompilerReport import org.jetbrains.kotlin.analyzer.AnalysisResult -import org.jetbrains.kotlin.backend.common.LoggingContext import org.jetbrains.kotlin.backend.common.extensions.IrGenerationExtension import org.jetbrains.kotlin.backend.common.extensions.IrPluginContextImpl import org.jetbrains.kotlin.backend.common.overrides.FakeOverrideChecker @@ -82,12 +81,6 @@ val KotlinLibrary.isBuiltIns: Boolean fun loadKlib(klibPath: String) = resolveSingleFileKlib(KFile(KFile(klibPath).absolutePath)) -val emptyLoggingContext = object : LoggingContext { - override var inVerbosePhase = false - - override fun log(message: () -> String) {} -} - private val CompilerConfiguration.metadataVersion get() = get(CommonConfigurationKeys.METADATA_VERSION) as? KlibMetadataVersion ?: KlibMetadataVersion.INSTANCE @@ -109,6 +102,7 @@ fun generateKLib( ) { val incrementalDataProvider = configuration.get(JSConfigurationKeys.INCREMENTAL_DATA_PROVIDER) val errorPolicy = configuration.get(JSConfigurationKeys.ERROR_TOLERANCE_POLICY) ?: ErrorTolerancePolicy.DEFAULT + val messageLogger = configuration.get(IrMessageLogger.IR_MESSAGE_LOGGER) ?: IrMessageLogger.None val icData: List val serializedIrFiles: List? @@ -154,7 +148,7 @@ fun generateKLib( } val irLinker = JsIrLinker( psi2IrContext.moduleDescriptor, - emptyLoggingContext, + messageLogger, psi2IrContext.irBuiltIns, psi2IrContext.symbolTable, functionFactory, @@ -166,7 +160,7 @@ fun generateKLib( irLinker.deserializeOnlyHeaderModule(depsDescriptors.getModuleDescriptor(it), it) } - val moduleFragment = psi2IrContext.generateModuleFragmentWithPlugins(project, files, irLinker, expectDescriptorToSymbol) + val moduleFragment = psi2IrContext.generateModuleFragmentWithPlugins(project, files, irLinker, messageLogger, expectDescriptorToSymbol) moduleFragment.acceptVoid(ManglerChecker(JsManglerIr, Ir2DescriptorManglerAdapter(JsManglerDesc))) if (configuration.getBoolean(JSConfigurationKeys.FAKE_OVERRIDE_VALIDATOR)) { @@ -184,6 +178,7 @@ fun generateKLib( moduleName, project, configuration, + messageLogger, psi2IrContext.bindingContext, files, outputKlibPath, @@ -225,6 +220,7 @@ fun loadIr( ): IrModuleInfo { val depsDescriptors = ModulesStructure(project, mainModule, analyzer, configuration, allDependencies, friendDependencies) val errorPolicy = configuration.get(JSConfigurationKeys.ERROR_TOLERANCE_POLICY) ?: ErrorTolerancePolicy.DEFAULT + val messageLogger = configuration.get(IrMessageLogger.IR_MESSAGE_LOGGER) ?: IrMessageLogger.None when (mainModule) { is MainModule.SourceFiles -> { @@ -236,12 +232,12 @@ fun loadIr( val feContext = psi2IrContext.run { JsIrLinker.JsFePluginContext(moduleDescriptor, bindingContext, symbolTable, typeTranslator, irBuiltIns) } - val irLinker = JsIrLinker(psi2IrContext.moduleDescriptor, emptyLoggingContext, irBuiltIns, symbolTable, functionFactory, feContext, null) + val irLinker = JsIrLinker(psi2IrContext.moduleDescriptor, messageLogger, irBuiltIns, symbolTable, functionFactory, feContext, null) val deserializedModuleFragments = sortDependencies(allDependencies.getFullList(), depsDescriptors.descriptors).map { irLinker.deserializeIrModuleHeader(depsDescriptors.getModuleDescriptor(it), it) } - val moduleFragment = psi2IrContext.generateModuleFragmentWithPlugins(project, mainModule.files, irLinker) + val moduleFragment = psi2IrContext.generateModuleFragmentWithPlugins(project, mainModule.files, irLinker, messageLogger) symbolTable.noUnboundLeft("Unbound symbols left after linker") // TODO: not sure whether this check should be enabled by default. Add configuration key for it. @@ -273,7 +269,7 @@ fun loadIr( val irBuiltIns = IrBuiltIns(moduleDescriptor.builtIns, typeTranslator, symbolTable) val functionFactory = IrFunctionFactory(irBuiltIns, symbolTable) val irLinker = - JsIrLinker(null, emptyLoggingContext, irBuiltIns, symbolTable, functionFactory, null, null) + JsIrLinker(null, messageLogger, irBuiltIns, symbolTable, functionFactory, null, null) val deserializedModuleFragments = sortDependencies(allDependencies.getFullList(), depsDescriptors.descriptors).map { val strategy = @@ -289,7 +285,7 @@ fun loadIr( val moduleFragment = deserializedModuleFragments.last() irLinker.init(null, emptyList()) - ExternalDependenciesGenerator(symbolTable, listOf(irLinker), configuration.languageVersionSettings).generateUnboundSymbolsAsDependencies() + ExternalDependenciesGenerator(symbolTable, listOf(irLinker)).generateUnboundSymbolsAsDependencies() irLinker.postProcess() return IrModuleInfo(moduleFragment, deserializedModuleFragments, irBuiltIns, symbolTable, irLinker) @@ -315,6 +311,7 @@ fun GeneratorContext.generateModuleFragmentWithPlugins( project: Project, files: List, irLinker: IrDeserializer, + messageLogger: IrMessageLogger, expectDescriptorToSymbol: MutableMap? = null ): IrModuleFragment { val psi2Ir = Psi2IrTranslator(languageVersionSettings, configuration) @@ -330,7 +327,8 @@ fun GeneratorContext.generateModuleFragmentWithPlugins( symbolTable, typeTranslator, irBuiltIns, - linker = irLinker + linker = irLinker, + messageLogger ) for (extension in extensions) { @@ -363,8 +361,6 @@ fun getModuleDescriptorByLibrary(current: KotlinLibrary, mapping: Map) : MainModule() class Klib(val lib: KotlinLibrary) : MainModule() @@ -416,7 +412,7 @@ private class ModulesStructure( var hasErrors = false if (analyzer.hasErrors() || analysisResult !is JsAnalysisResult) { if (!errorPolicy.allowErrors) - throw JsIrCompilationError + throw AnalysisResult.CompilationErrorException() else hasErrors = true } @@ -468,6 +464,7 @@ fun serializeModuleIntoKlib( moduleName: String, project: Project, configuration: CompilerConfiguration, + messageLogger: IrMessageLogger, bindingContext: BindingContext, files: List, klibPath: String, @@ -483,7 +480,7 @@ fun serializeModuleIntoKlib( val serializedIr = JsIrModuleSerializer( - emptyLoggingContext, + messageLogger, moduleFragment.irBuiltins, expectDescriptorToSymbol = expectDescriptorToSymbol, skipExpects = !configuration.expectActualLinker diff --git a/compiler/ir/serialization.js/src/org/jetbrains/kotlin/ir/backend/js/lower/serialization/ir/JsIrFileSerializer.kt b/compiler/ir/serialization.js/src/org/jetbrains/kotlin/ir/backend/js/lower/serialization/ir/JsIrFileSerializer.kt index 1f3af3546ee..c5c28cff376 100644 --- a/compiler/ir/serialization.js/src/org/jetbrains/kotlin/ir/backend/js/lower/serialization/ir/JsIrFileSerializer.kt +++ b/compiler/ir/serialization.js/src/org/jetbrains/kotlin/ir/backend/js/lower/serialization/ir/JsIrFileSerializer.kt @@ -5,23 +5,23 @@ package org.jetbrains.kotlin.ir.backend.js.lower.serialization.ir -import org.jetbrains.kotlin.backend.common.LoggingContext -import org.jetbrains.kotlin.backend.common.serialization.IrFileSerializer import org.jetbrains.kotlin.backend.common.serialization.DeclarationTable +import org.jetbrains.kotlin.backend.common.serialization.IrFileSerializer import org.jetbrains.kotlin.descriptors.DeclarationDescriptor -import org.jetbrains.kotlin.ir.declarations.* +import org.jetbrains.kotlin.ir.declarations.IrAnnotationContainer import org.jetbrains.kotlin.ir.symbols.IrSymbol +import org.jetbrains.kotlin.ir.util.IrMessageLogger import org.jetbrains.kotlin.ir.util.hasAnnotation import org.jetbrains.kotlin.name.FqName class JsIrFileSerializer( - logger: LoggingContext, + messageLogger: IrMessageLogger, declarationTable: DeclarationTable, expectDescriptorToSymbol: MutableMap, skipExpects: Boolean, bodiesOnlyForInlines: Boolean = false ) : IrFileSerializer( - logger, + messageLogger, declarationTable, expectDescriptorToSymbol, bodiesOnlyForInlines = bodiesOnlyForInlines, diff --git a/compiler/ir/serialization.js/src/org/jetbrains/kotlin/ir/backend/js/lower/serialization/ir/JsIrLinker.kt b/compiler/ir/serialization.js/src/org/jetbrains/kotlin/ir/backend/js/lower/serialization/ir/JsIrLinker.kt index de2b78291f3..33423e36a90 100644 --- a/compiler/ir/serialization.js/src/org/jetbrains/kotlin/ir/backend/js/lower/serialization/ir/JsIrLinker.kt +++ b/compiler/ir/serialization.js/src/org/jetbrains/kotlin/ir/backend/js/lower/serialization/ir/JsIrLinker.kt @@ -5,7 +5,6 @@ package org.jetbrains.kotlin.ir.backend.js.lower.serialization.ir -import org.jetbrains.kotlin.backend.common.LoggingContext import org.jetbrains.kotlin.backend.common.overrides.FakeOverrideBuilder import org.jetbrains.kotlin.backend.common.serialization.* import org.jetbrains.kotlin.backend.common.serialization.signature.IdSignatureSerializer @@ -14,6 +13,7 @@ import org.jetbrains.kotlin.ir.builders.TranslationPluginContext import org.jetbrains.kotlin.ir.declarations.IrModuleFragment import org.jetbrains.kotlin.ir.descriptors.IrAbstractFunctionFactory import org.jetbrains.kotlin.ir.descriptors.IrBuiltIns +import org.jetbrains.kotlin.ir.util.IrMessageLogger import org.jetbrains.kotlin.ir.util.ReferenceSymbolTable import org.jetbrains.kotlin.ir.util.SymbolTable import org.jetbrains.kotlin.ir.util.TypeTranslator @@ -23,11 +23,11 @@ import org.jetbrains.kotlin.library.containsErrorCode import org.jetbrains.kotlin.resolve.BindingContext class JsIrLinker( - private val currentModule: ModuleDescriptor?, logger: LoggingContext, builtIns: IrBuiltIns, symbolTable: SymbolTable, + private val currentModule: ModuleDescriptor?, messageLogger: IrMessageLogger, builtIns: IrBuiltIns, symbolTable: SymbolTable, override val functionalInterfaceFactory: IrAbstractFunctionFactory, override val translationPluginContext: TranslationPluginContext?, private val icData: ICData? = null -) : KotlinIrLinker(currentModule, logger, builtIns, symbolTable, emptyList()) { +) : KotlinIrLinker(currentModule, messageLogger, builtIns, symbolTable, emptyList()) { override val fakeOverrideBuilder = FakeOverrideBuilder(this, symbolTable, IdSignatureSerializer(JsManglerIr), builtIns) diff --git a/compiler/ir/serialization.js/src/org/jetbrains/kotlin/ir/backend/js/lower/serialization/ir/JsIrModuleSerializer.kt b/compiler/ir/serialization.js/src/org/jetbrains/kotlin/ir/backend/js/lower/serialization/ir/JsIrModuleSerializer.kt index f2f10ca418b..49a7d708b8b 100644 --- a/compiler/ir/serialization.js/src/org/jetbrains/kotlin/ir/backend/js/lower/serialization/ir/JsIrModuleSerializer.kt +++ b/compiler/ir/serialization.js/src/org/jetbrains/kotlin/ir/backend/js/lower/serialization/ir/JsIrModuleSerializer.kt @@ -5,7 +5,6 @@ package org.jetbrains.kotlin.ir.backend.js.lower.serialization.ir -import org.jetbrains.kotlin.backend.common.LoggingContext import org.jetbrains.kotlin.backend.common.serialization.DeclarationTable import org.jetbrains.kotlin.backend.common.serialization.IrModuleSerializer import org.jetbrains.kotlin.backend.common.serialization.signature.IdSignatureSerializer @@ -13,17 +12,18 @@ import org.jetbrains.kotlin.descriptors.DeclarationDescriptor import org.jetbrains.kotlin.ir.declarations.IrFile import org.jetbrains.kotlin.ir.descriptors.IrBuiltIns import org.jetbrains.kotlin.ir.symbols.IrSymbol +import org.jetbrains.kotlin.ir.util.IrMessageLogger class JsIrModuleSerializer( - logger: LoggingContext, + messageLogger: IrMessageLogger, irBuiltIns: IrBuiltIns, private val expectDescriptorToSymbol: MutableMap, val skipExpects: Boolean -) : IrModuleSerializer(logger) { +) : IrModuleSerializer(messageLogger) { private val signaturer = IdSignatureSerializer(JsManglerIr) private val globalDeclarationTable = JsGlobalDeclarationTable(signaturer, irBuiltIns) override fun createSerializerForFile(file: IrFile): JsIrFileSerializer = - JsIrFileSerializer(logger, DeclarationTable(globalDeclarationTable), expectDescriptorToSymbol, skipExpects = skipExpects) + JsIrFileSerializer(messageLogger, DeclarationTable(globalDeclarationTable), expectDescriptorToSymbol, skipExpects = skipExpects) } \ No newline at end of file diff --git a/compiler/ir/serialization.jvm/src/org/jetbrains/kotlin/ir/backend/jvm/serialization/JvmIrLinker.kt b/compiler/ir/serialization.jvm/src/org/jetbrains/kotlin/ir/backend/jvm/serialization/JvmIrLinker.kt index cb81822cb83..77746c688d6 100644 --- a/compiler/ir/serialization.jvm/src/org/jetbrains/kotlin/ir/backend/jvm/serialization/JvmIrLinker.kt +++ b/compiler/ir/serialization.jvm/src/org/jetbrains/kotlin/ir/backend/jvm/serialization/JvmIrLinker.kt @@ -5,7 +5,6 @@ package org.jetbrains.kotlin.ir.backend.jvm.serialization -import org.jetbrains.kotlin.backend.common.LoggingContext import org.jetbrains.kotlin.backend.common.overrides.FakeOverrideBuilder import org.jetbrains.kotlin.backend.common.serialization.* import org.jetbrains.kotlin.backend.common.serialization.encodings.BinarySymbolData @@ -24,6 +23,7 @@ import org.jetbrains.kotlin.ir.symbols.IrSymbol import org.jetbrains.kotlin.ir.symbols.isPublicApi import org.jetbrains.kotlin.ir.util.DeclarationStubGenerator import org.jetbrains.kotlin.ir.util.IdSignature +import org.jetbrains.kotlin.ir.util.IrMessageLogger import org.jetbrains.kotlin.ir.util.SymbolTable import org.jetbrains.kotlin.library.IrLibrary import org.jetbrains.kotlin.load.java.descriptors.JavaCallableMemberDescriptor @@ -34,14 +34,14 @@ import org.jetbrains.kotlin.name.Name @OptIn(ObsoleteDescriptorBasedAPI::class) class JvmIrLinker( currentModule: ModuleDescriptor?, - logger: LoggingContext, + messageLogger: IrMessageLogger, builtIns: IrBuiltIns, symbolTable: SymbolTable, override val functionalInterfaceFactory: IrAbstractFunctionFactory, override val translationPluginContext: TranslationPluginContext?, private val stubGenerator: DeclarationStubGenerator, private val manglerDesc: JvmManglerDesc -) : KotlinIrLinker(currentModule, logger, builtIns, symbolTable, emptyList()) { +) : KotlinIrLinker(currentModule, messageLogger, builtIns, symbolTable, emptyList()) { override val fakeOverrideBuilder = FakeOverrideBuilder(this, symbolTable, IdSignatureSerializer(JvmManglerIr), builtIns) diff --git a/compiler/javac-wrapper/src/org/jetbrains/kotlin/javac/components/JavacBasedClassFinder.kt b/compiler/javac-wrapper/src/org/jetbrains/kotlin/javac/components/JavacBasedClassFinder.kt index b41fc2e1873..cb3b5ab5cad 100644 --- a/compiler/javac-wrapper/src/org/jetbrains/kotlin/javac/components/JavacBasedClassFinder.kt +++ b/compiler/javac-wrapper/src/org/jetbrains/kotlin/javac/components/JavacBasedClassFinder.kt @@ -16,6 +16,7 @@ package org.jetbrains.kotlin.javac.components +import org.jetbrains.kotlin.config.JvmTarget import org.jetbrains.kotlin.config.LanguageVersionSettings import org.jetbrains.kotlin.javac.JavacWrapper import org.jetbrains.kotlin.load.java.AbstractJavaClassFinder @@ -25,12 +26,16 @@ import org.jetbrains.kotlin.resolve.BindingTrace import org.jetbrains.kotlin.resolve.lazy.KotlinCodeAnalyzer class JavacBasedClassFinder : AbstractJavaClassFinder() { - private lateinit var javac: JavacWrapper - override fun initialize(trace: BindingTrace, codeAnalyzer: KotlinCodeAnalyzer, languageVersionSettings: LanguageVersionSettings) { + override fun initialize( + trace: BindingTrace, + codeAnalyzer: KotlinCodeAnalyzer, + languageVersionSettings: LanguageVersionSettings, + jvmTarget: JvmTarget, + ) { javac = JavacWrapper.getInstance(project) - super.initialize(trace, codeAnalyzer, languageVersionSettings) + super.initialize(trace, codeAnalyzer, languageVersionSettings, jvmTarget) } override fun findClass(request: JavaClassFinder.Request) = @@ -40,5 +45,4 @@ class JavacBasedClassFinder : AbstractJavaClassFinder() { override fun findPackage(fqName: FqName) = javac.findPackage(fqName, javaSearchScope) override fun knownClassNamesInPackage(packageFqName: FqName) = javac.knownClassNamesInPackage(packageFqName) - } diff --git a/compiler/light-classes/src/org/jetbrains/kotlin/asJava/KotlinAsJavaSupport.kt b/compiler/light-classes/src/org/jetbrains/kotlin/asJava/KotlinAsJavaSupport.kt index 80e4efa6634..fd4e68a37d7 100644 --- a/compiler/light-classes/src/org/jetbrains/kotlin/asJava/KotlinAsJavaSupport.kt +++ b/compiler/light-classes/src/org/jetbrains/kotlin/asJava/KotlinAsJavaSupport.kt @@ -9,6 +9,7 @@ import com.intellij.openapi.components.ServiceManager import com.intellij.openapi.project.Project import com.intellij.psi.PsiClass import com.intellij.psi.search.GlobalSearchScope +import org.jetbrains.kotlin.asJava.classes.KtFakeLightClass import org.jetbrains.kotlin.asJava.classes.KtLightClass import org.jetbrains.kotlin.name.FqName import org.jetbrains.kotlin.psi.KtClassOrObject @@ -53,6 +54,8 @@ abstract class KotlinAsJavaSupport { abstract fun findFilesForFacade(facadeFqName: FqName, scope: GlobalSearchScope): Collection + abstract fun getFakeLightClass(classOrObject: KtClassOrObject): KtFakeLightClass + companion object { @JvmStatic fun getInstance(project: Project): KotlinAsJavaSupport { diff --git a/compiler/light-classes/src/org/jetbrains/kotlin/asJava/builder/LightClassBuilder.kt b/compiler/light-classes/src/org/jetbrains/kotlin/asJava/builder/LightClassBuilder.kt index 3f78b51acba..1b6b29a3e8e 100644 --- a/compiler/light-classes/src/org/jetbrains/kotlin/asJava/builder/LightClassBuilder.kt +++ b/compiler/light-classes/src/org/jetbrains/kotlin/asJava/builder/LightClassBuilder.kt @@ -25,6 +25,7 @@ import com.intellij.psi.impl.java.stubs.PsiJavaFileStub import com.intellij.psi.impl.java.stubs.impl.PsiJavaFileStubImpl import org.jetbrains.kotlin.codegen.state.GenerationState import org.jetbrains.kotlin.config.CompilerConfiguration +import org.jetbrains.kotlin.config.JVMConfigurationKeys import org.jetbrains.kotlin.config.languageVersionSettings import org.jetbrains.kotlin.name.FqName import org.jetbrains.kotlin.psi.KtFile @@ -53,6 +54,7 @@ fun buildLightClass( context.languageVersionSettings?.let { CompilerConfiguration().apply { languageVersionSettings = it + put(JVMConfigurationKeys.JVM_TARGET, context.jvmTarget) isReadOnly = true } } ?: CompilerConfiguration.EMPTY diff --git a/compiler/light-classes/src/org/jetbrains/kotlin/asJava/builder/LightClassConstructionContext.kt b/compiler/light-classes/src/org/jetbrains/kotlin/asJava/builder/LightClassConstructionContext.kt index f3f42df0d43..30165a36e34 100644 --- a/compiler/light-classes/src/org/jetbrains/kotlin/asJava/builder/LightClassConstructionContext.kt +++ b/compiler/light-classes/src/org/jetbrains/kotlin/asJava/builder/LightClassConstructionContext.kt @@ -16,12 +16,14 @@ package org.jetbrains.kotlin.asJava.builder +import org.jetbrains.kotlin.config.JvmTarget import org.jetbrains.kotlin.config.LanguageVersionSettings import org.jetbrains.kotlin.descriptors.ModuleDescriptor import org.jetbrains.kotlin.resolve.BindingContext open class LightClassConstructionContext( - val bindingContext: BindingContext, - val module: ModuleDescriptor, - val languageVersionSettings: LanguageVersionSettings? = null -) \ No newline at end of file + val bindingContext: BindingContext, + val module: ModuleDescriptor, + val languageVersionSettings: LanguageVersionSettings?, + val jvmTarget: JvmTarget, +) diff --git a/idea/idea-analysis/src/org/jetbrains/kotlin/idea/caches/lightClasses/KtFakeLightClass.kt b/compiler/light-classes/src/org/jetbrains/kotlin/asJava/classes/KtFakeLightClass.kt similarity index 68% rename from idea/idea-analysis/src/org/jetbrains/kotlin/idea/caches/lightClasses/KtFakeLightClass.kt rename to compiler/light-classes/src/org/jetbrains/kotlin/asJava/classes/KtFakeLightClass.kt index ab6e1f6416f..630f7f4fbf0 100644 --- a/idea/idea-analysis/src/org/jetbrains/kotlin/idea/caches/lightClasses/KtFakeLightClass.kt +++ b/compiler/light-classes/src/org/jetbrains/kotlin/asJava/classes/KtFakeLightClass.kt @@ -3,7 +3,7 @@ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. */ -package org.jetbrains.kotlin.idea.caches.lightClasses +package org.jetbrains.kotlin.asJava.classes import com.intellij.ide.highlighter.JavaFileType import com.intellij.openapi.project.Project @@ -11,13 +11,13 @@ import com.intellij.psi.* import com.intellij.psi.impl.PsiClassImplUtil import com.intellij.psi.impl.light.AbstractLightClass import com.intellij.psi.impl.light.LightMethod +import com.intellij.psi.search.SearchScope import com.intellij.util.IncorrectOperationException -import org.jetbrains.kotlin.asJava.ImpreciseResolveResult -import org.jetbrains.kotlin.asJava.classes.KtLightClass -import org.jetbrains.kotlin.asJava.classes.LightClassInheritanceHelper +import org.jetbrains.kotlin.asJava.LightClassGenerationSupport import org.jetbrains.kotlin.asJava.elements.KtLightElement +import org.jetbrains.kotlin.asJava.toFakeLightClass +import org.jetbrains.kotlin.descriptors.ClassDescriptor import org.jetbrains.kotlin.idea.KotlinLanguage -import org.jetbrains.kotlin.idea.caches.resolve.resolveToDescriptorIfAny import org.jetbrains.kotlin.load.java.structure.LightClassOriginKind import org.jetbrains.kotlin.psi.KtClassOrObject import org.jetbrains.kotlin.psi.KtNamedDeclaration @@ -27,34 +27,50 @@ import javax.swing.Icon // Used as a placeholder when actual light class does not exist (expect-classes, for example) // The main purpose is to allow search of inheritors within hierarchies containing such classes -class KtFakeLightClass(override val kotlinOrigin: KtClassOrObject) : +abstract class KtFakeLightClass(override val kotlinOrigin: KtClassOrObject) : AbstractLightClass(kotlinOrigin.manager, KotlinLanguage.INSTANCE), KtLightClass { - private val _delegate by lazy { DummyJavaPsiFactory.createDummyClass(kotlinOrigin.project) } - private val _containingClass by lazy { kotlinOrigin.containingClassOrObject?.let { KtFakeLightClass(it) } } + + private val _delegate: PsiClass by lazy { DummyJavaPsiFactory.createDummyClass(kotlinOrigin.project) } override val clsDelegate get() = _delegate override val originKind get() = LightClassOriginKind.SOURCE - override fun getName() = kotlinOrigin.name + override fun getName(): String? = kotlinOrigin.name + override fun getDelegate(): PsiClass = _delegate + abstract override fun copy(): KtFakeLightClass - override fun getDelegate() = _delegate - override fun copy() = KtFakeLightClass(kotlinOrigin) + override fun getQualifiedName(): String? = kotlinOrigin.fqName?.asString() + abstract override fun getContainingClass(): KtFakeLightClass? + override fun getNavigationElement(): PsiElement = kotlinOrigin.navigationElement + override fun getIcon(flags: Int): Icon? = kotlinOrigin.getIcon(flags) + override fun getContainingFile(): PsiFile = kotlinOrigin.containingFile + override fun getUseScope(): SearchScope = kotlinOrigin.useScope - override fun getQualifiedName() = kotlinOrigin.fqName?.asString() - override fun getContainingClass() = _containingClass - override fun getNavigationElement() = kotlinOrigin.navigationElement - override fun getIcon(flags: Int) = kotlinOrigin.getIcon(flags) - override fun getContainingFile() = kotlinOrigin.containingFile - override fun getUseScope() = kotlinOrigin.useScope + abstract override fun isInheritor(baseClass: PsiClass, checkDeep: Boolean): Boolean + + override fun isEquivalentTo(another: PsiElement?): Boolean = PsiClassImplUtil.isClassEquivalentTo(this, another) +} + +class KtDescriptorBasedFakeLightClass(kotlinOrigin: KtClassOrObject) : KtFakeLightClass(kotlinOrigin) { + + override fun copy(): KtFakeLightClass = KtDescriptorBasedFakeLightClass(kotlinOrigin) + + private val _containingClass: KtFakeLightClass? by lazy { + kotlinOrigin.containingClassOrObject?.let { KtDescriptorBasedFakeLightClass(it) } + } + override fun getContainingClass(): KtFakeLightClass? = _containingClass override fun isInheritor(baseClass: PsiClass, checkDeep: Boolean): Boolean { if (manager.areElementsEquivalent(baseClass, this)) return false LightClassInheritanceHelper.getService(project).isInheritor(this, baseClass, checkDeep).ifSure { return it } val baseKtClass = (baseClass as? KtLightClass)?.kotlinOrigin ?: return false - val baseDescriptor = baseKtClass.resolveToDescriptorIfAny() ?: return false - val thisDescriptor = kotlinOrigin.resolveToDescriptorIfAny() ?: return false + + val generationSupport = LightClassGenerationSupport.getInstance(project) + + val baseDescriptor = generationSupport.resolveToDescriptor(baseKtClass) as? ClassDescriptor ?: return false + val thisDescriptor = generationSupport.resolveToDescriptor(kotlinOrigin) as? ClassDescriptor ?: return false val thisFqName = DescriptorUtils.getFqName(thisDescriptor).asString() val baseFqName = DescriptorUtils.getFqName(baseDescriptor).asString() @@ -65,8 +81,6 @@ class KtFakeLightClass(override val kotlinOrigin: KtClassOrObject) : else DescriptorUtils.isDirectSubclass(thisDescriptor, baseDescriptor) } - - override fun isEquivalentTo(another: PsiElement?): Boolean = PsiClassImplUtil.isClassEquivalentTo(this, another) } class KtFakeLightMethod private constructor( @@ -75,7 +89,7 @@ class KtFakeLightMethod private constructor( ) : LightMethod( ktDeclaration.manager, DummyJavaPsiFactory.createDummyVoidMethod(ktDeclaration.project), - KtFakeLightClass(ktClassOrObject), + ktClassOrObject.toFakeLightClass(), KotlinLanguage.INSTANCE ), KtLightElement { override val kotlinOrigin get() = ktDeclaration @@ -110,7 +124,7 @@ private object DummyJavaPsiFactory { ?: throw IncorrectOperationException("Method was not created. Method name: $name; return type: $canonicalText") } - fun createDummyClass(project: Project): PsiClass = PsiElementFactory.SERVICE.getInstance(project).createClass("dummy") + fun createDummyClass(project: Project): PsiClass = PsiElementFactory.getInstance(project).createClass("dummy") private fun createDummyJavaFile(project: Project, text: String): PsiJavaFile { return PsiFileFactory.getInstance(project).createFileFromText( diff --git a/compiler/light-classes/src/org/jetbrains/kotlin/asJava/elements/KtToJvmAnnotationsConverter.kt b/compiler/light-classes/src/org/jetbrains/kotlin/asJava/elements/KtToJvmAnnotationsConverter.kt index 30a78d43dac..f8961b2280d 100644 --- a/compiler/light-classes/src/org/jetbrains/kotlin/asJava/elements/KtToJvmAnnotationsConverter.kt +++ b/compiler/light-classes/src/org/jetbrains/kotlin/asJava/elements/KtToJvmAnnotationsConverter.kt @@ -14,10 +14,12 @@ import com.intellij.psi.PsiNameValuePair import org.jetbrains.kotlin.asJava.classes.KtUltraLightSimpleAnnotation import org.jetbrains.kotlin.asJava.classes.KtUltraLightSupport import org.jetbrains.kotlin.builtins.StandardNames.FqNames +import org.jetbrains.kotlin.config.JvmTarget import org.jetbrains.kotlin.name.ClassId import org.jetbrains.kotlin.name.Name import org.jetbrains.kotlin.resolve.constants.ArrayValue import org.jetbrains.kotlin.resolve.constants.EnumValue +import java.util.* private const val JAVA_LANG_ANNOTATION_DOCUMENTED = "java.lang.annotation.Documented" @@ -49,18 +51,27 @@ private fun PsiAnnotation.extractArrayAnnotationFqNames(attributeName: String): .map { "${it.first.asSingleFqName().asString()}.${it.second.identifier}" } } -private val javaAnnotationElementTypeId = ClassId.fromString("java.lang.annotation.ElementType") -private val targetMapping = hashMapOf( - "kotlin.annotation.AnnotationTarget.CLASS" to EnumValue(javaAnnotationElementTypeId, Name.identifier("TYPE")), - "kotlin.annotation.AnnotationTarget.ANNOTATION_CLASS" to EnumValue(javaAnnotationElementTypeId, Name.identifier("ANNOTATION_TYPE")), - "kotlin.annotation.AnnotationTarget.FIELD" to EnumValue(javaAnnotationElementTypeId, Name.identifier("FIELD")), - "kotlin.annotation.AnnotationTarget.LOCAL_VARIABLE" to EnumValue(javaAnnotationElementTypeId, Name.identifier("LOCAL_VARIABLE")), - "kotlin.annotation.AnnotationTarget.VALUE_PARAMETER" to EnumValue(javaAnnotationElementTypeId, Name.identifier("PARAMETER")), - "kotlin.annotation.AnnotationTarget.CONSTRUCTOR" to EnumValue(javaAnnotationElementTypeId, Name.identifier("CONSTRUCTOR")), - "kotlin.annotation.AnnotationTarget.FUNCTION" to EnumValue(javaAnnotationElementTypeId, Name.identifier("METHOD")), - "kotlin.annotation.AnnotationTarget.PROPERTY_GETTER" to EnumValue(javaAnnotationElementTypeId, Name.identifier("METHOD")), - "kotlin.annotation.AnnotationTarget.PROPERTY_SETTER" to EnumValue(javaAnnotationElementTypeId, Name.identifier("METHOD")) -) +private val targetMappings = EnumMap>(JvmTarget::class.java).also { result -> + val javaAnnotationElementTypeId = ClassId.fromString("java.lang.annotation.ElementType") + val jdk6 = hashMapOf( + "kotlin.annotation.AnnotationTarget.CLASS" to EnumValue(javaAnnotationElementTypeId, Name.identifier("TYPE")), + "kotlin.annotation.AnnotationTarget.ANNOTATION_CLASS" to EnumValue(javaAnnotationElementTypeId, Name.identifier("ANNOTATION_TYPE")), + "kotlin.annotation.AnnotationTarget.FIELD" to EnumValue(javaAnnotationElementTypeId, Name.identifier("FIELD")), + "kotlin.annotation.AnnotationTarget.LOCAL_VARIABLE" to EnumValue(javaAnnotationElementTypeId, Name.identifier("LOCAL_VARIABLE")), + "kotlin.annotation.AnnotationTarget.VALUE_PARAMETER" to EnumValue(javaAnnotationElementTypeId, Name.identifier("PARAMETER")), + "kotlin.annotation.AnnotationTarget.CONSTRUCTOR" to EnumValue(javaAnnotationElementTypeId, Name.identifier("CONSTRUCTOR")), + "kotlin.annotation.AnnotationTarget.FUNCTION" to EnumValue(javaAnnotationElementTypeId, Name.identifier("METHOD")), + "kotlin.annotation.AnnotationTarget.PROPERTY_GETTER" to EnumValue(javaAnnotationElementTypeId, Name.identifier("METHOD")), + "kotlin.annotation.AnnotationTarget.PROPERTY_SETTER" to EnumValue(javaAnnotationElementTypeId, Name.identifier("METHOD")) + ) + val jdk8AndLater = HashMap(jdk6).apply { + put("kotlin.annotation.AnnotationTarget.TYPE_PARAMETER", EnumValue(javaAnnotationElementTypeId, Name.identifier("TYPE_PARAMETER"))) + put("kotlin.annotation.AnnotationTarget.TYPE", EnumValue(javaAnnotationElementTypeId, Name.identifier("TYPE_USE"))) + } + for (target in JvmTarget.values()) { + result[target] = if (target >= JvmTarget.JVM_1_8) jdk8AndLater else jdk6 + } +} internal fun PsiAnnotation.tryConvertAsTarget(support: KtUltraLightSupport): KtLightAbstractAnnotation? { @@ -71,6 +82,7 @@ internal fun PsiAnnotation.tryConvertAsTarget(support: KtUltraLightSupport): KtL attributeValues ?: return null + val targetMapping = targetMappings.getValue(support.typeMapper.jvmTarget) val convertedValues = attributeValues.mapNotNull { targetMapping[it] }.distinct() val targetAttributes = "value" to ArrayValue(convertedValues) { module -> module.builtIns.array.defaultType } diff --git a/compiler/light-classes/src/org/jetbrains/kotlin/asJava/lightClassUtils.kt b/compiler/light-classes/src/org/jetbrains/kotlin/asJava/lightClassUtils.kt index eee75fe1574..0aacc958f39 100644 --- a/compiler/light-classes/src/org/jetbrains/kotlin/asJava/lightClassUtils.kt +++ b/compiler/light-classes/src/org/jetbrains/kotlin/asJava/lightClassUtils.kt @@ -19,10 +19,7 @@ package org.jetbrains.kotlin.asJava import com.intellij.psi.* import com.intellij.psi.impl.light.LightField import com.intellij.psi.search.GlobalSearchScope -import org.jetbrains.kotlin.asJava.classes.KtLightClass -import org.jetbrains.kotlin.asJava.classes.KtLightClassForFacade -import org.jetbrains.kotlin.asJava.classes.KtUltraLightElementWithNullabilityAnnotation -import org.jetbrains.kotlin.asJava.classes.runReadAction +import org.jetbrains.kotlin.asJava.classes.* import org.jetbrains.kotlin.asJava.elements.PsiElementWithOrigin import org.jetbrains.kotlin.asJava.elements.* import org.jetbrains.kotlin.builtins.jvm.JavaToKotlinClassMap @@ -54,6 +51,8 @@ fun KtClassOrObject.toLightClassWithBuiltinMapping(): PsiClass? { return JavaPsiFacade.getInstance(project).findClass(javaClassFqName.asString(), searchScope) } +fun KtClassOrObject.toFakeLightClass(): KtFakeLightClass = KotlinAsJavaSupport.getInstance(project).getFakeLightClass(this) + fun KtFile.findFacadeClass(): KtLightClass? { return KotlinAsJavaSupport.getInstance(project) .getFacadeClassesInPackage(packageFqName, this.useScope as? GlobalSearchScope ?: GlobalSearchScope.projectScope(project)) diff --git a/compiler/test-infrastructure-utils/tests/org/jetbrains/kotlin/codegen/CommonSMAPTestUtil.kt b/compiler/test-infrastructure-utils/tests/org/jetbrains/kotlin/codegen/CommonSMAPTestUtil.kt new file mode 100644 index 00000000000..4074b02d5dd --- /dev/null +++ b/compiler/test-infrastructure-utils/tests/org/jetbrains/kotlin/codegen/CommonSMAPTestUtil.kt @@ -0,0 +1,66 @@ +/* + * Copyright 2010-2021 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. + */ + +package org.jetbrains.kotlin.codegen + +import com.intellij.openapi.util.io.FileUtil +import org.jetbrains.kotlin.backend.common.output.OutputFile +import org.jetbrains.kotlin.codegen.inline.RangeMapping +import org.jetbrains.kotlin.codegen.inline.SMAPParser +import org.jetbrains.kotlin.codegen.inline.toRange +import org.jetbrains.kotlin.test.Assertions +import org.jetbrains.kotlin.utils.keysToMap +import org.jetbrains.org.objectweb.asm.ClassReader +import org.jetbrains.org.objectweb.asm.ClassVisitor +import org.jetbrains.org.objectweb.asm.Opcodes +import java.io.File + +object CommonSMAPTestUtil { + fun extractSMAPFromClasses(outputFiles: Iterable): List { + return outputFiles.map { outputFile -> + var debugInfo: String? = null + ClassReader(outputFile.asByteArray()).accept(object : ClassVisitor(Opcodes.API_VERSION) { + override fun visitSource(source: String?, debug: String?) { + debugInfo = debug + } + }, 0) + + SMAPAndFile(debugInfo, outputFile.sourceFiles.single(), outputFile.relativePath) + } + } + + fun checkNoConflictMappings(compiledSmap: List?, assertions: Assertions) { + if (compiledSmap == null) return + + compiledSmap.mapNotNull(SMAPAndFile::smap).forEach { smapString -> + val smap = SMAPParser.parseOrNull(smapString) ?: throw AssertionError("bad SMAP: $smapString") + val conflictingLines = smap.fileMappings.flatMap { fileMapping -> + fileMapping.lineMappings.flatMap { lineMapping: RangeMapping -> + lineMapping.toRange.keysToMap { lineMapping }.entries + } + }.groupBy { it.key }.entries.filter { it.value.size != 1 } + + assertions.assertTrue(conflictingLines.isEmpty()) { + conflictingLines.joinToString(separator = "\n") { + "Conflicting mapping for line ${it.key} in ${it.value.joinToString(transform = Any::toString)}" + } + } + } + } + + class SMAPAndFile(val smap: String?, val sourceFile: String, val outputFile: String) { + constructor(smap: String?, sourceFile: File, outputFile: String) : this(smap, getPath(sourceFile), outputFile) + + companion object { + fun getPath(file: File): String = + getPath(file.canonicalPath) + + fun getPath(canonicalPath: String): String { + //There are some problems with disk name on windows cause LightVirtualFile return it without disk name + return FileUtil.toSystemIndependentName(canonicalPath).substringAfter(":") + } + } + } +} diff --git a/compiler/tests-common/tests/org/jetbrains/kotlin/codegen/InlineTestUtil.kt b/compiler/test-infrastructure-utils/tests/org/jetbrains/kotlin/codegen/InlineTestUtil.kt similarity index 95% rename from compiler/tests-common/tests/org/jetbrains/kotlin/codegen/InlineTestUtil.kt rename to compiler/test-infrastructure-utils/tests/org/jetbrains/kotlin/codegen/InlineTestUtil.kt index 19a156fc3bd..a255eb00427 100644 --- a/compiler/tests-common/tests/org/jetbrains/kotlin/codegen/InlineTestUtil.kt +++ b/compiler/test-infrastructure-utils/tests/org/jetbrains/kotlin/codegen/InlineTestUtil.kt @@ -25,13 +25,16 @@ import org.jetbrains.kotlin.load.java.JvmAnnotationNames import org.jetbrains.kotlin.load.kotlin.FileBasedKotlinClass import org.jetbrains.kotlin.load.kotlin.KotlinJvmBinaryClass import org.jetbrains.kotlin.load.kotlin.header.KotlinClassHeader -import org.jetbrains.kotlin.test.KotlinBaseTest import org.jetbrains.org.objectweb.asm.* import org.jetbrains.org.objectweb.asm.tree.MethodNode import java.util.* object InlineTestUtil { - fun checkNoCallsToInline(outputFiles: Iterable, files: List) { + fun checkNoCallsToInline( + outputFiles: Iterable, + skipParameterCheckingInDirectives: Boolean, + skippedMethods: Set + ) { val inlineInfo = obtainInlineInfo(outputFiles) val inlineMethods = inlineInfo.inlineMethods assert(inlineMethods.isNotEmpty()) { "There are no inline methods" } @@ -39,12 +42,10 @@ object InlineTestUtil { val notInlinedCalls = checkInlineMethodNotInvoked(outputFiles, inlineMethods) assert(notInlinedCalls.isEmpty()) { "All inline methods should be inlined but:\n" + notInlinedCalls.joinToString("\n") } - val skipParameterChecking = files.any { - "NO_CHECK_LAMBDA_INLINING" in it.directives - } || !doLambdaInliningCheck(outputFiles, inlineInfo) + val skipParameterChecking = skipParameterCheckingInDirectives || !doLambdaInliningCheck(outputFiles, inlineInfo) if (!skipParameterChecking) { - val notInlinedParameters = checkParametersInlined(outputFiles, inlineInfo, files) + val notInlinedParameters = checkParametersInlined(outputFiles, inlineInfo, skippedMethods) assert(notInlinedParameters.isEmpty()) { "All inline parameters should be inlined but:\n${notInlinedParameters.joinToString("\n")}\n" + "but if you have not inlined lambdas or anonymous objects enable NO_CHECK_LAMBDA_INLINING directive" @@ -166,13 +167,10 @@ object InlineTestUtil { } private fun checkParametersInlined( - outputFiles: Iterable, inlineInfo: InlineInfo, files: List + outputFiles: Iterable, + inlineInfo: InlineInfo, + skipMethods: Set ): ArrayList { - val skipMethods = - files.flatMap { - it.directives.listValues("SKIP_INLINE_CHECK_IN") ?: emptyList() - }.toSet() - val inlinedMethods = inlineInfo.inlineMethods val notInlinedParameters = ArrayList() for (file in outputFiles) { diff --git a/compiler/test-infrastructure-utils/tests/org/jetbrains/kotlin/test/InTextDirectivesUtils.java b/compiler/test-infrastructure-utils/tests/org/jetbrains/kotlin/test/InTextDirectivesUtils.java index 9889815c0e9..cd12e1f5a65 100644 --- a/compiler/test-infrastructure-utils/tests/org/jetbrains/kotlin/test/InTextDirectivesUtils.java +++ b/compiler/test-infrastructure-utils/tests/org/jetbrains/kotlin/test/InTextDirectivesUtils.java @@ -12,6 +12,7 @@ import com.intellij.util.ArrayUtil; import kotlin.text.StringsKt; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; +import org.jetbrains.kotlin.utils.CollectionsKt; import org.jetbrains.kotlin.utils.ExceptionUtilsKt; import java.io.BufferedReader; @@ -19,6 +20,7 @@ import java.io.File; import java.io.IOException; import java.io.StringReader; import java.util.*; +import java.util.stream.Collectors; public final class InTextDirectivesUtils { @@ -226,6 +228,7 @@ public final class InTextDirectivesUtils { if (targetBackend == TargetBackend.ANY) return true; List doNotTarget = findLinesWithPrefixesRemoved(textWithDirectives(file), "// DONT_TARGET_EXACT_BACKEND: "); + doNotTarget = doNotTarget.stream().flatMap((s) -> Arrays.stream(s.split(" "))).collect(Collectors.toList()); if (doNotTarget.contains(targetBackend.name())) return false; diff --git a/compiler/test-infrastructure-utils/tests/org/jetbrains/kotlin/test/util/KtTestUtil.java b/compiler/test-infrastructure-utils/tests/org/jetbrains/kotlin/test/util/KtTestUtil.java index 58f0b31c2a5..7e4380b4c45 100644 --- a/compiler/test-infrastructure-utils/tests/org/jetbrains/kotlin/test/util/KtTestUtil.java +++ b/compiler/test-infrastructure-utils/tests/org/jetbrains/kotlin/test/util/KtTestUtil.java @@ -105,38 +105,51 @@ public class KtTestUtil { } @NotNull - public static File getJdk9Home() { - String jdk9 = System.getenv("JDK_9"); - if (jdk9 == null) { - jdk9 = System.getenv("JDK_19"); - if (jdk9 == null) { - throw new AssertionError("Environment variable JDK_9 is not set!"); - } - } - return new File(jdk9); + private static File getJdkHome(@NotNull String prop) { + return getJdkHome(prop, null, prop); } - @Nullable - public static File getJdk11Home() { - String jdk11 = System.getenv("JDK_11"); - if (jdk11 == null) { - return null; + @NotNull + private static File getJdkHome(@NotNull String prop, @Nullable String otherProp) { + return getJdkHome(prop, otherProp, prop); + } + + @NotNull + private static File getJdkHome(@NotNull String prop, @Nullable String otherProp, @NotNull String propToReport) { + String jdk = System.getenv(prop); + if (jdk == null) { + if (otherProp != null) { + return getJdkHome(otherProp, null, prop); + } else { + throw new AssertionError("Environment variable " + propToReport + " is not set!"); + } } - return new File(jdk11); + return new File(jdk); + } + + @NotNull + public static File getJdk6Home() { + return getJdkHome("JDK_6", "JDK_16"); + } + + @NotNull + public static File getJdk8Home() { + return getJdkHome("JDK_8", "JDK_18"); + } + + @NotNull + public static File getJdk9Home() { + return getJdkHome("JDK_9", "JDK_19"); + } + + @NotNull + public static File getJdk11Home() { + return getJdkHome("JDK_11"); } @NotNull public static File getJdk15Home() { - String jdk15 = System.getenv("JDK_15"); - - if (jdk15 == null) { - jdk15 = System.getenv("JDK_15_0"); - } - - if (jdk15 == null) { - throw new AssertionError("Environment variable JDK_15 is not set!"); - } - return new File(jdk15); + return getJdkHome("JDK_15", "JDK_15_0"); } @NotNull diff --git a/compiler/test-infrastructure/tests/org/jetbrains/kotlin/test/TestConfiguration.kt b/compiler/test-infrastructure/tests/org/jetbrains/kotlin/test/TestConfiguration.kt index 3c0b5c35fd6..d0dd7bfb70f 100644 --- a/compiler/test-infrastructure/tests/org/jetbrains/kotlin/test/TestConfiguration.kt +++ b/compiler/test-infrastructure/tests/org/jetbrains/kotlin/test/TestConfiguration.kt @@ -42,3 +42,8 @@ abstract class TestConfiguration { abstract fun getAllHandlers(): List> } +// ---------------------------- Utils ---------------------------- + +fun ((TestServices, T) -> R).bind(value: T): Constructor { + return { this.invoke(it, value) } +} diff --git a/compiler/test-infrastructure/tests/org/jetbrains/kotlin/test/TestInfrastructureInternals.kt b/compiler/test-infrastructure/tests/org/jetbrains/kotlin/test/TestInfrastructureInternals.kt new file mode 100644 index 00000000000..81cc3944ae0 --- /dev/null +++ b/compiler/test-infrastructure/tests/org/jetbrains/kotlin/test/TestInfrastructureInternals.kt @@ -0,0 +1,14 @@ +/* + * Copyright 2010-2021 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. + */ + +package org.jetbrains.kotlin.test + +/** + * This annotation used for marking low-level services of test infrastructure which + * normally should not be used. Please think twice before using something + * marked with this annotation + */ +@RequiresOptIn +annotation class TestInfrastructureInternals diff --git a/compiler/test-infrastructure/tests/org/jetbrains/kotlin/test/TestRunner.kt b/compiler/test-infrastructure/tests/org/jetbrains/kotlin/test/TestRunner.kt index e5f6dba88e4..724111abe66 100644 --- a/compiler/test-infrastructure/tests/org/jetbrains/kotlin/test/TestRunner.kt +++ b/compiler/test-infrastructure/tests/org/jetbrains/kotlin/test/TestRunner.kt @@ -35,11 +35,17 @@ class TestRunner(private val testConfiguration: TestConfiguration) { configurator.transformTestDataPath(fileName) } - val moduleStructure = testConfiguration.moduleStructureExtractor.splitTestDataByModules( - testDataFileName, - testConfiguration.directives, - ).also { - services.register(TestModuleStructure::class, it) + val moduleStructure = try { + testConfiguration.moduleStructureExtractor.splitTestDataByModules( + testDataFileName, + testConfiguration.directives, + ).also { + services.register(TestModuleStructure::class, it) + } + } catch (e: ExceptionFromModuleStructureTransformer) { + services.register(TestModuleStructure::class, e.alreadyParsedModuleStructure) + val exception = filterFailedExceptions(listOf(e.cause)).singleOrNull() ?: return + throw exception } testConfiguration.metaTestConfigurators.forEach { @@ -55,7 +61,8 @@ class TestRunner(private val testConfiguration: TestConfiguration) { var failedException: Throwable? = null try { for (module in modules) { - processModule(services, module, dependencyProvider, moduleStructure) + val shouldProcessNextModules = processModule(services, module, dependencyProvider, moduleStructure) + if (!shouldProcessNextModules) break } } catch (e: Throwable) { failedException = e @@ -84,50 +91,58 @@ class TestRunner(private val testConfiguration: TestConfiguration) { } } - val filteredFailedAssertions = testConfiguration.afterAnalysisCheckers - .fold>(failedAssertions) { assertions, checker -> - checker.suppressIfNeeded(assertions) - } - .map { if (it is ExceptionFromTestError) it.cause else it } + val filteredFailedAssertions = filterFailedExceptions(failedAssertions) services.assertions.assertAll(filteredFailedAssertions) } + private fun filterFailedExceptions(failedExceptions: List): List = testConfiguration.afterAnalysisCheckers + .fold(failedExceptions) { assertions, checker -> + checker.suppressIfNeeded(assertions) + } + .map { if (it is ExceptionFromTestError) it.cause else it } + + /* + * If there was failure from handler with `failureDisablesNextSteps=true` then `processModule` + * returns false which indicates that other modules should not be processed + */ private fun processModule( services: TestServices, module: TestModule, dependencyProvider: DependencyProviderImpl, moduleStructure: TestModuleStructure - ) { + ): Boolean { val sourcesArtifact = ResultingArtifact.Source() val frontendKind = module.frontendKind - if (!frontendKind.shouldRunAnalysis) return + if (!frontendKind.shouldRunAnalysis) return true val frontendArtifacts: ResultingArtifact.FrontendOutput<*> = testConfiguration.getFacade(SourcesKind, frontendKind) - .transform(module, sourcesArtifact)?.also { dependencyProvider.registerArtifact(module, it) } ?: return + .transform(module, sourcesArtifact)?.also { dependencyProvider.registerArtifact(module, it) } ?: return true val frontendHandlers: List> = testConfiguration.getHandlers(frontendKind) for (frontendHandler in frontendHandlers) { - withAssertionCatching { + val thereWasAnException = withAssertionCatching { if (frontendHandler.shouldRun(failedAssertions.isNotEmpty())) { frontendHandler.hackyProcess(module, frontendArtifacts) } } + if (thereWasAnException && frontendHandler.failureDisablesNextSteps) return false } val backendKind = services.backendKindExtractor.backendKind(module.targetBackend) - if (!backendKind.shouldRunAnalysis) return + if (!backendKind.shouldRunAnalysis) return true val backendInputInfo = testConfiguration.getFacade(frontendKind, backendKind) - .hackyTransform(module, frontendArtifacts)?.also { dependencyProvider.registerArtifact(module, it) } ?: return + .hackyTransform(module, frontendArtifacts)?.also { dependencyProvider.registerArtifact(module, it) } ?: return true val backendHandlers: List> = testConfiguration.getHandlers(backendKind) for (backendHandler in backendHandlers) { - withAssertionCatching { + val thereWasAnException = withAssertionCatching { if (backendHandler.shouldRun(failedAssertions.isNotEmpty())) { backendHandler.hackyProcess(module, backendInputInfo) } } + if (thereWasAnException && backendHandler.failureDisablesNextSteps) return false } for (artifactKind in moduleStructure.getTargetArtifactKinds(module)) { @@ -135,28 +150,36 @@ class TestRunner(private val testConfiguration: TestConfiguration) { val binaryArtifact = testConfiguration.getFacade(backendKind, artifactKind) .hackyTransform(module, backendInputInfo)?.also { dependencyProvider.registerArtifact(module, it) - } ?: return + } ?: return true val binaryHandlers: List> = testConfiguration.getHandlers(artifactKind) for (binaryHandler in binaryHandlers) { - withAssertionCatching { + val thereWasAnException = withAssertionCatching { if (binaryHandler.shouldRun(failedAssertions.isNotEmpty())) { binaryHandler.hackyProcess(module, binaryArtifact) } } + if (thereWasAnException && binaryHandler.failureDisablesNextSteps) return false } } + + return true } - private inline fun withAssertionCatching(insertExceptionInStart: Boolean = false, block: () -> Unit) { - try { + /* + * Returns true if there was an exception in block + */ + private inline fun withAssertionCatching(insertExceptionInStart: Boolean = false, block: () -> Unit): Boolean { + return try { block() + false } catch (e: Throwable) { if (insertExceptionInStart) { failedAssertions.add(0, e) } else { failedAssertions += e } + true } } diff --git a/compiler/test-infrastructure/tests/org/jetbrains/kotlin/test/directives/model/Directive.kt b/compiler/test-infrastructure/tests/org/jetbrains/kotlin/test/directives/model/Directive.kt index 621eb3a88fd..9396fb19942 100644 --- a/compiler/test-infrastructure/tests/org/jetbrains/kotlin/test/directives/model/Directive.kt +++ b/compiler/test-infrastructure/tests/org/jetbrains/kotlin/test/directives/model/Directive.kt @@ -162,6 +162,6 @@ fun RegisteredDirectives.singleOrZeroValue(directive: ValueDirective null 1 -> values.single() - else -> error("Too many values passed to $directive") + else -> error("Too many values passed to $directive: ${values.joinToArrayString()}") } } diff --git a/compiler/test-infrastructure/tests/org/jetbrains/kotlin/test/model/AnalysisHandler.kt b/compiler/test-infrastructure/tests/org/jetbrains/kotlin/test/model/AnalysisHandler.kt index a9b7a4907da..992d9adc172 100644 --- a/compiler/test-infrastructure/tests/org/jetbrains/kotlin/test/model/AnalysisHandler.kt +++ b/compiler/test-infrastructure/tests/org/jetbrains/kotlin/test/model/AnalysisHandler.kt @@ -13,6 +13,7 @@ import org.jetbrains.kotlin.test.services.assertions abstract class AnalysisHandler>( val testServices: TestServices, + val failureDisablesNextSteps: Boolean, val doNotRunIfThereWerePreviousFailures: Boolean ) { protected val assertions: Assertions @@ -34,17 +35,20 @@ abstract class AnalysisHandler>( abstract class FrontendOutputHandler>( testServices: TestServices, override val artifactKind: FrontendKind, + failureDisablesNextSteps: Boolean, doNotRunIfThereWerePreviousFailures: Boolean -) : AnalysisHandler(testServices, doNotRunIfThereWerePreviousFailures) +) : AnalysisHandler(testServices, failureDisablesNextSteps, doNotRunIfThereWerePreviousFailures) abstract class BackendInputHandler>( testServices: TestServices, override val artifactKind: BackendKind, + failureDisablesNextSteps: Boolean, doNotRunIfThereWerePreviousFailures: Boolean -) : AnalysisHandler(testServices, doNotRunIfThereWerePreviousFailures) +) : AnalysisHandler(testServices, failureDisablesNextSteps, doNotRunIfThereWerePreviousFailures) abstract class BinaryArtifactHandler>( testServices: TestServices, override val artifactKind: BinaryKind, + failureDisablesNextSteps: Boolean, doNotRunIfThereWerePreviousFailures: Boolean -) : AnalysisHandler(testServices, doNotRunIfThereWerePreviousFailures) +) : AnalysisHandler(testServices, failureDisablesNextSteps, doNotRunIfThereWerePreviousFailures) diff --git a/compiler/test-infrastructure/tests/org/jetbrains/kotlin/test/services/GlobalMetadataInfoHandler.kt b/compiler/test-infrastructure/tests/org/jetbrains/kotlin/test/services/GlobalMetadataInfoHandler.kt index b6a3517a678..f3b38b30367 100644 --- a/compiler/test-infrastructure/tests/org/jetbrains/kotlin/test/services/GlobalMetadataInfoHandler.kt +++ b/compiler/test-infrastructure/tests/org/jetbrains/kotlin/test/services/GlobalMetadataInfoHandler.kt @@ -60,16 +60,26 @@ class GlobalMetadataInfoHandler( if (file.isAdditional) continue processors.forEach { it.processMetaInfos(module, file) } val codeMetaInfos = infosPerFile.getValue(file) + val fileBuilder = StringBuilder() CodeMetaInfoRenderer.renderTagsToText( - builder, + fileBuilder, codeMetaInfos, testServices.sourceFileProvider.getContentOfSourceFile(file) ) + builder.append(fileBuilder.stripAdditionalEmptyLines(file)) } } val actualText = builder.toString() testServices.assertions.assertEqualsToFile(moduleStructure.originalTestDataFiles.single(), actualText) } + + private fun StringBuilder.stripAdditionalEmptyLines(file: TestFile): CharSequence { + return if (file.startLineNumberInOriginalFile != 0) { + this.removePrefix((1..file.startLineNumberInOriginalFile).joinToString(separator = "") { "\n" }) + } else { + this.toString() + } + } } val TestServices.globalMetadataInfoHandler: GlobalMetadataInfoHandler by TestServices.testServiceAccessor() diff --git a/compiler/test-infrastructure/tests/org/jetbrains/kotlin/test/services/ModuleStructureExtractor.kt b/compiler/test-infrastructure/tests/org/jetbrains/kotlin/test/services/ModuleStructureExtractor.kt index c0161f13257..6ac7f7db09a 100644 --- a/compiler/test-infrastructure/tests/org/jetbrains/kotlin/test/services/ModuleStructureExtractor.kt +++ b/compiler/test-infrastructure/tests/org/jetbrains/kotlin/test/services/ModuleStructureExtractor.kt @@ -5,11 +5,13 @@ package org.jetbrains.kotlin.test.services +import org.jetbrains.kotlin.test.TestInfrastructureInternals import org.jetbrains.kotlin.test.directives.model.DirectivesContainer -abstract class ModuleStructureExtractor( +abstract class ModuleStructureExtractor @OptIn(TestInfrastructureInternals::class) constructor( protected val testServices: TestServices, - protected val additionalSourceProviders: List + protected val additionalSourceProviders: List, + protected val moduleStructureTransformers: List ) { abstract fun splitTestDataByModules( testDataFileName: String, diff --git a/compiler/test-infrastructure/tests/org/jetbrains/kotlin/test/services/ModuleStructureTransformer.kt b/compiler/test-infrastructure/tests/org/jetbrains/kotlin/test/services/ModuleStructureTransformer.kt new file mode 100644 index 00000000000..644478191d5 --- /dev/null +++ b/compiler/test-infrastructure/tests/org/jetbrains/kotlin/test/services/ModuleStructureTransformer.kt @@ -0,0 +1,18 @@ +/* + * Copyright 2010-2021 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. + */ + +package org.jetbrains.kotlin.test.services + +import org.jetbrains.kotlin.test.TestInfrastructureInternals + +@TestInfrastructureInternals +abstract class ModuleStructureTransformer { + abstract fun transformModuleStructure(moduleStructure: TestModuleStructure): TestModuleStructure +} + +class ExceptionFromModuleStructureTransformer( + override val cause: Throwable, + val alreadyParsedModuleStructure: TestModuleStructure +) : Exception(cause) diff --git a/compiler/testData/asJava/lightClasses/SpecialAnnotationsOnAnnotationClass.java b/compiler/testData/asJava/lightClasses/SpecialAnnotationsOnAnnotationClass.java index e82640d994c..b9372c88d94 100644 --- a/compiler/testData/asJava/lightClasses/SpecialAnnotationsOnAnnotationClass.java +++ b/compiler/testData/asJava/lightClasses/SpecialAnnotationsOnAnnotationClass.java @@ -1,11 +1,11 @@ @java.lang.annotation.Documented() @java.lang.annotation.Retention(value = java.lang.annotation.RetentionPolicy.SOURCE) -@java.lang.annotation.Target(value = {}) +@java.lang.annotation.Target(value = {java.lang.annotation.ElementType.TYPE_PARAMETER, java.lang.annotation.ElementType.TYPE_USE}) @kotlin.annotation.MustBeDocumented() @kotlin.annotation.Repeatable() @kotlin.annotation.Retention(value = kotlin.annotation.AnnotationRetention.SOURCE) -@kotlin.annotation.Target(allowedTargets = {kotlin.annotation.AnnotationTarget.TYPE_PARAMETER}) +@kotlin.annotation.Target(allowedTargets = {kotlin.annotation.AnnotationTarget.TYPE_PARAMETER, kotlin.annotation.AnnotationTarget.TYPE}) public abstract @interface Anno /* Anno*/ { public abstract int i();// i() -} \ No newline at end of file +} diff --git a/compiler/testData/asJava/lightClasses/SpecialAnnotationsOnAnnotationClass.kt b/compiler/testData/asJava/lightClasses/SpecialAnnotationsOnAnnotationClass.kt index 25433768b75..16242f5b9b4 100644 --- a/compiler/testData/asJava/lightClasses/SpecialAnnotationsOnAnnotationClass.kt +++ b/compiler/testData/asJava/lightClasses/SpecialAnnotationsOnAnnotationClass.kt @@ -1,7 +1,7 @@ // Anno @Retention(AnnotationRetention.SOURCE) -@Target(AnnotationTarget.TYPE_PARAMETER) +@Target(AnnotationTarget.TYPE_PARAMETER, AnnotationTarget.TYPE) @MustBeDocumented @Repeatable annotation class Anno(val i: Int) diff --git a/compiler/testData/asJava/lightClasses/SpecialAnnotationsOnAnnotationClass_1_6.java b/compiler/testData/asJava/lightClasses/SpecialAnnotationsOnAnnotationClass_1_6.java new file mode 100644 index 00000000000..b5f1f83c580 --- /dev/null +++ b/compiler/testData/asJava/lightClasses/SpecialAnnotationsOnAnnotationClass_1_6.java @@ -0,0 +1,11 @@ +@java.lang.annotation.Documented() +@java.lang.annotation.Retention(value = java.lang.annotation.RetentionPolicy.SOURCE) +@java.lang.annotation.Target(value = {}) +@kotlin.annotation.MustBeDocumented() +@kotlin.annotation.Repeatable() +@kotlin.annotation.Retention(value = kotlin.annotation.AnnotationRetention.SOURCE) +@kotlin.annotation.Target(allowedTargets = {kotlin.annotation.AnnotationTarget.TYPE_PARAMETER, kotlin.annotation.AnnotationTarget.TYPE}) +public abstract @interface Anno /* Anno*/ { + public abstract int i();// i() + +} diff --git a/compiler/testData/asJava/lightClasses/SpecialAnnotationsOnAnnotationClass_1_6.kt b/compiler/testData/asJava/lightClasses/SpecialAnnotationsOnAnnotationClass_1_6.kt new file mode 100644 index 00000000000..b1196da6bb9 --- /dev/null +++ b/compiler/testData/asJava/lightClasses/SpecialAnnotationsOnAnnotationClass_1_6.kt @@ -0,0 +1,8 @@ +// Anno +// JVM_TARGET: 1.6 + +@Retention(AnnotationRetention.SOURCE) +@Target(AnnotationTarget.TYPE_PARAMETER, AnnotationTarget.TYPE) +@MustBeDocumented +@Repeatable +annotation class Anno(val i: Int) diff --git a/compiler/testData/asJava/ultraLightClasses/annotationTargets_1_6.java b/compiler/testData/asJava/ultraLightClasses/annotationTargets_1_6.java new file mode 100644 index 00000000000..37de513eb55 --- /dev/null +++ b/compiler/testData/asJava/ultraLightClasses/annotationTargets_1_6.java @@ -0,0 +1,16 @@ +@java.lang.annotation.Retention(value = java.lang.annotation.RetentionPolicy.RUNTIME) +@kotlin.annotation.Target() +public abstract @interface A0 /* A0*/ { +} + +@java.lang.annotation.Retention(value = java.lang.annotation.RetentionPolicy.RUNTIME) +@java.lang.annotation.Target(value = {java.lang.annotation.ElementType.PARAMETER}) +@kotlin.annotation.Target(allowedTargets = {kotlin.annotation.AnnotationTarget.VALUE_PARAMETER, kotlin.annotation.AnnotationTarget.TYPE}) +public abstract @interface A1 /* A1*/ { +} + +@java.lang.annotation.Retention(value = java.lang.annotation.RetentionPolicy.RUNTIME) +@java.lang.annotation.Target(value = {java.lang.annotation.ElementType.PARAMETER}) +@kotlin.annotation.Target(allowedTargets = {kotlin.annotation.AnnotationTarget.VALUE_PARAMETER, kotlin.annotation.AnnotationTarget.TYPE, kotlin.annotation.AnnotationTarget.TYPE_PARAMETER}) +public abstract @interface A2 /* A2*/ { +} \ No newline at end of file diff --git a/compiler/testData/asJava/ultraLightClasses/annotationTargets_1_6.kt b/compiler/testData/asJava/ultraLightClasses/annotationTargets_1_6.kt new file mode 100644 index 00000000000..013fc1dfb9d --- /dev/null +++ b/compiler/testData/asJava/ultraLightClasses/annotationTargets_1_6.kt @@ -0,0 +1,9 @@ +// CHECK_BY_JAVA_FILE +// JVM_TARGET: 1.6 + +@Target() +annotation class A0 +@Target(AnnotationTarget.VALUE_PARAMETER, AnnotationTarget.TYPE) +annotation class A1 +@Target(AnnotationTarget.VALUE_PARAMETER, AnnotationTarget.TYPE, AnnotationTarget.TYPE_PARAMETER) +annotation class A2 diff --git a/compiler/testData/asJava/ultraLightClasses/typeAnnotations.java b/compiler/testData/asJava/ultraLightClasses/typeAnnotations.java index d10d935f4f7..d5473375e39 100644 --- a/compiler/testData/asJava/ultraLightClasses/typeAnnotations.java +++ b/compiler/testData/asJava/ultraLightClasses/typeAnnotations.java @@ -1,41 +1,41 @@ @java.lang.annotation.Retention(value = java.lang.annotation.RetentionPolicy.RUNTIME) -@java.lang.annotation.Target(value = {java.lang.annotation.ElementType.PARAMETER}) +@java.lang.annotation.Target(value = {java.lang.annotation.ElementType.PARAMETER, java.lang.annotation.ElementType.TYPE_USE}) @kotlin.annotation.Target(allowedTargets = {kotlin.annotation.AnnotationTarget.VALUE_PARAMETER, kotlin.annotation.AnnotationTarget.TYPE}) public abstract @interface A0 /* A0*/ { } @java.lang.annotation.Retention(value = java.lang.annotation.RetentionPolicy.RUNTIME) -@java.lang.annotation.Target(value = {java.lang.annotation.ElementType.PARAMETER}) +@java.lang.annotation.Target(value = {java.lang.annotation.ElementType.PARAMETER, java.lang.annotation.ElementType.TYPE_USE}) @kotlin.annotation.Target(allowedTargets = {kotlin.annotation.AnnotationTarget.VALUE_PARAMETER, kotlin.annotation.AnnotationTarget.TYPE}) public abstract @interface A1 /* A1*/ { } @java.lang.annotation.Retention(value = java.lang.annotation.RetentionPolicy.RUNTIME) -@java.lang.annotation.Target(value = {java.lang.annotation.ElementType.PARAMETER}) +@java.lang.annotation.Target(value = {java.lang.annotation.ElementType.PARAMETER, java.lang.annotation.ElementType.TYPE_USE}) @kotlin.annotation.Target(allowedTargets = {kotlin.annotation.AnnotationTarget.VALUE_PARAMETER, kotlin.annotation.AnnotationTarget.TYPE}) public abstract @interface A2 /* A2*/ { } @java.lang.annotation.Retention(value = java.lang.annotation.RetentionPolicy.RUNTIME) -@java.lang.annotation.Target(value = {java.lang.annotation.ElementType.PARAMETER}) +@java.lang.annotation.Target(value = {java.lang.annotation.ElementType.PARAMETER, java.lang.annotation.ElementType.TYPE_USE}) @kotlin.annotation.Target(allowedTargets = {kotlin.annotation.AnnotationTarget.VALUE_PARAMETER, kotlin.annotation.AnnotationTarget.TYPE}) public abstract @interface A3 /* A3*/ { } @java.lang.annotation.Retention(value = java.lang.annotation.RetentionPolicy.RUNTIME) -@java.lang.annotation.Target(value = {java.lang.annotation.ElementType.PARAMETER}) +@java.lang.annotation.Target(value = {java.lang.annotation.ElementType.PARAMETER, java.lang.annotation.ElementType.TYPE_USE}) @kotlin.annotation.Target(allowedTargets = {kotlin.annotation.AnnotationTarget.VALUE_PARAMETER, kotlin.annotation.AnnotationTarget.TYPE}) public abstract @interface A4 /* A4*/ { } @java.lang.annotation.Retention(value = java.lang.annotation.RetentionPolicy.RUNTIME) -@java.lang.annotation.Target(value = {java.lang.annotation.ElementType.PARAMETER}) +@java.lang.annotation.Target(value = {java.lang.annotation.ElementType.PARAMETER, java.lang.annotation.ElementType.TYPE_USE}) @kotlin.annotation.Target(allowedTargets = {kotlin.annotation.AnnotationTarget.VALUE_PARAMETER, kotlin.annotation.AnnotationTarget.TYPE}) public abstract @interface A5 /* A5*/ { } @java.lang.annotation.Retention(value = java.lang.annotation.RetentionPolicy.RUNTIME) -@java.lang.annotation.Target(value = {java.lang.annotation.ElementType.PARAMETER}) +@java.lang.annotation.Target(value = {java.lang.annotation.ElementType.PARAMETER, java.lang.annotation.ElementType.TYPE_USE}) @kotlin.annotation.Target(allowedTargets = {kotlin.annotation.AnnotationTarget.VALUE_PARAMETER, kotlin.annotation.AnnotationTarget.TYPE}) public abstract @interface A6 /* A6*/ { } diff --git a/compiler/testData/cli/js/jsExtraHelp.out b/compiler/testData/cli/js/jsExtraHelp.out index e53c25cb0d9..766636dd930 100644 --- a/compiler/testData/cli/js/jsExtraHelp.out +++ b/compiler/testData/cli/js/jsExtraHelp.out @@ -71,6 +71,7 @@ where advanced options include: -Xreport-perf Report detailed performance statistics -Xskip-metadata-version-check Allow to load classes with bad metadata version and pre-release classes -Xskip-prerelease-check Allow to load pre-release classes + -Xsuppress-version-warnings Suppress warnings about outdated, inconsistent or experimental language or API versions -Xuse-experimental= Enable, but don't propagate usages of experimental API for marker annotation with the given fully qualified name -Xuse-fir Compile using Front-end IR. Warning: this feature is far from being production-ready -Xuse-fir-extended-checkers Use extended analysis mode based on Front-end IR. Warning: this feature is far from being production-ready diff --git a/compiler/testData/cli/jvm/extraHelp.out b/compiler/testData/cli/jvm/extraHelp.out index 9d5a61915f4..8c5061724e1 100644 --- a/compiler/testData/cli/jvm/extraHelp.out +++ b/compiler/testData/cli/jvm/extraHelp.out @@ -74,6 +74,10 @@ where advanced options include: -Xjvm-default=compatibility Allow usages of @JvmDefault; generate a compatibility accessor in the 'DefaultImpls' class in addition to the default interface method -Xklib= Paths to cross-platform libraries in .klib format + -Xlambdas={class|indy} Select code generation scheme for lambdas. + -Xlambdas=indy Generate lambdas using `invokedynamic` with `LambdaMetafactory.metafactory`. Requires `-jvm-target 1.8` or greater. + Lambda objects created using `LambdaMetafactory.metafactory` will have different `toString()`. + -Xlambdas=class Generate lambdas as explicit classes -Xno-call-assertions Don't generate not-null assertions for arguments of platform types -Xno-exception-on-explicit-equals-for-boxed-null Do not throw NPE on explicit 'equals' call for null receiver of platform boxed primitive type @@ -93,7 +97,7 @@ where advanced options include: Example: -Xprofile=/async-profiler/build/libasyncProfiler.so:event=cpu,interval=1ms,threads,start,framebuf=50000000: -Xrepeat= Debug option: Repeats modules compilation times -Xsam-conversions={class|indy} Select code generation scheme for SAM conversions. - -Xsam-conversions=indy Generate SAM conversions using `invokedynamic` with `LambdaMetafactory.metafactory`. Requires `-jvm-target 8` or greater. + -Xsam-conversions=indy Generate SAM conversions using `invokedynamic` with `LambdaMetafactory.metafactory`. Requires `-jvm-target 1.8` or greater. -Xsam-conversions=class Generate SAM conversions as explicit classes -Xsanitize-parentheses Transform '(' and ')' in method names to some other character sequence. This mode can BREAK BINARY COMPATIBILITY and is only supposed to be used to workaround @@ -107,13 +111,15 @@ where advanced options include: -Xgenerate-strict-metadata-version Generate metadata with strict version semantics (see kdoc on Metadata.extraInt) -Xstring-concat={indy-with-constants|indy|inline} - Switch a way in which string concatenation is performed. - -Xstring-concat=indy-with-constants Performs string concatenation via `invokedynamic` 'makeConcatWithConstants'. Works only with `-jvm-target 9` or greater - -Xstring-concat=indy Performs string concatenation via `invokedynamic` 'makeConcat'. Works only with `-jvm-target 9` or greater - -Xstring-concat=inline Performs string concatenation via `StringBuilder` + Select code generation scheme for string concatenation. + -Xstring-concat=indy-with-constants Concatenate strings using `invokedynamic` `makeConcatWithConstants`. Requires `-jvm-target 9` or greater. + -Xstring-concat=indy Concatenate strings using `invokedynamic` `makeConcat`. Requires `-jvm-target 9` or greater. + -Xstring-concat=inline Concatenate strings using `StringBuilder` -Xsupport-compatqual-checker-framework-annotations=enable|disable Specify behavior for Checker Framework compatqual annotations (NullableDecl/NonNullDecl). Default value is 'enable' + -Xsuppress-deprecated-jvm-target-warning + Suppress deprecation warning about deprecated JVM target versions -Xsuppress-missing-builtins-error Suppress the "cannot access built-in declaration" error (useful with -no-stdlib) -Xuse-ir Use the IR backend @@ -173,6 +179,7 @@ where advanced options include: -Xreport-perf Report detailed performance statistics -Xskip-metadata-version-check Allow to load classes with bad metadata version and pre-release classes -Xskip-prerelease-check Allow to load pre-release classes + -Xsuppress-version-warnings Suppress warnings about outdated, inconsistent or experimental language or API versions -Xuse-experimental= Enable, but don't propagate usages of experimental API for marker annotation with the given fully qualified name -Xuse-fir Compile using Front-end IR. Warning: this feature is far from being production-ready -Xuse-fir-extended-checkers Use extended analysis mode based on Front-end IR. Warning: this feature is far from being production-ready diff --git a/compiler/testData/cli/jvm/help.out b/compiler/testData/cli/jvm/help.out index cad39163ca3..376f8720d62 100644 --- a/compiler/testData/cli/jvm/help.out +++ b/compiler/testData/cli/jvm/help.out @@ -6,7 +6,7 @@ where possible options include: -include-runtime Include Kotlin runtime into the resulting JAR -java-parameters Generate metadata for Java 1.8 reflection on method parameters -jdk-home Include a custom JDK from the specified location into the classpath instead of the default JAVA_HOME - -jvm-target Target version of the generated JVM bytecode (1.6, 1.8, 9, 10, 11, 12, 13, 14 or 15), default is 1.6 + -jvm-target Target version of the generated JVM bytecode (1.6 (DEPRECATED), 1.8, 9, 10, 11, 12, 13, 14 or 15), default is 1.8 -module-name Name of the generated .kotlin_module file -no-jdk Don't automatically include the Java runtime into the classpath -no-reflect Don't automatically include Kotlin reflection into the classpath diff --git a/compiler/testData/cli/jvm/jvm6Target.args b/compiler/testData/cli/jvm/jvm6Target.args new file mode 100644 index 00000000000..d7e4dd3f1bd --- /dev/null +++ b/compiler/testData/cli/jvm/jvm6Target.args @@ -0,0 +1,5 @@ +$TESTDATA_DIR$/jvm8Target.kt +-d +$TEMP_DIR$ +-jvm-target +1.6 diff --git a/compiler/testData/cli/jvm/jvm6Target.out b/compiler/testData/cli/jvm/jvm6Target.out new file mode 100644 index 00000000000..ea521634a30 --- /dev/null +++ b/compiler/testData/cli/jvm/jvm6Target.out @@ -0,0 +1,2 @@ +warning: JVM target 1.6 is deprecated and will be removed in a future release. Please migrate to JVM target 1.8 or above +OK diff --git a/compiler/testData/cli/jvm/jvmDefaultAll.out b/compiler/testData/cli/jvm/jvmDefaultAll.out index 9d661afc460..c33fbbd9084 100644 --- a/compiler/testData/cli/jvm/jvmDefaultAll.out +++ b/compiler/testData/cli/jvm/jvmDefaultAll.out @@ -1,2 +1,3 @@ +warning: JVM target 1.6 is deprecated and will be removed in a future release. Please migrate to JVM target 1.8 or above error: '-Xjvm-default=all' is only supported since JVM target 1.8. Recompile with '-jvm-target 1.8' COMPILATION_ERROR diff --git a/compiler/testData/codegen/boxAgainstJava/annotations/divisionByZeroInJava.kt b/compiler/testData/codegen/box/annotations/divisionByZeroInJava.kt similarity index 86% rename from compiler/testData/codegen/boxAgainstJava/annotations/divisionByZeroInJava.kt rename to compiler/testData/codegen/box/annotations/divisionByZeroInJava.kt index cf517081616..9efe9d0b395 100644 --- a/compiler/testData/codegen/boxAgainstJava/annotations/divisionByZeroInJava.kt +++ b/compiler/testData/codegen/box/annotations/divisionByZeroInJava.kt @@ -1,4 +1,6 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE // KOTLIN_CONFIGURATION_FLAGS: +JVM.USE_PSI_CLASS_FILES_READING +// MODULE: lib // FILE: J.java public @interface J { @@ -13,6 +15,7 @@ public @interface J { float divisionByZeroFloat() default 1.0f / 0.0f; } +// MODULE: main(lib) // FILE: K.kt fun box(): String { diff --git a/compiler/testData/codegen/boxAgainstJava/annotations/javaAnnotationArrayValueDefault.kt b/compiler/testData/codegen/box/annotations/javaAnnotationArrayValueDefault.kt similarity index 92% rename from compiler/testData/codegen/boxAgainstJava/annotations/javaAnnotationArrayValueDefault.kt rename to compiler/testData/codegen/box/annotations/javaAnnotationArrayValueDefault.kt index 538a042b1a4..1b3953379ae 100644 --- a/compiler/testData/codegen/boxAgainstJava/annotations/javaAnnotationArrayValueDefault.kt +++ b/compiler/testData/codegen/box/annotations/javaAnnotationArrayValueDefault.kt @@ -1,5 +1,7 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE // IGNORE_BACKEND_FIR: JVM_IR // WITH_RUNTIME +// MODULE: lib // FILE: JavaAnn.java import java.lang.annotation.Retention; @@ -10,6 +12,7 @@ import java.lang.annotation.RetentionPolicy; String[] value() default {"d1", "d2"}; } +// MODULE: main(lib) // FILE: 1.kt @JavaAnn class MyClass1 diff --git a/compiler/testData/codegen/boxAgainstJava/annotations/javaAnnotationArrayValueNoDefault.kt b/compiler/testData/codegen/box/annotations/javaAnnotationArrayValueNoDefault.kt similarity index 88% rename from compiler/testData/codegen/boxAgainstJava/annotations/javaAnnotationArrayValueNoDefault.kt rename to compiler/testData/codegen/box/annotations/javaAnnotationArrayValueNoDefault.kt index 745c644efe9..5983dd2c952 100644 --- a/compiler/testData/codegen/boxAgainstJava/annotations/javaAnnotationArrayValueNoDefault.kt +++ b/compiler/testData/codegen/box/annotations/javaAnnotationArrayValueNoDefault.kt @@ -1,4 +1,7 @@ +// IGNORE_BACKEND_FIR: JVM_IR +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE // WITH_RUNTIME +// MODULE: lib // FILE: JavaAnn.java import java.lang.annotation.Retention; @@ -9,6 +12,7 @@ import java.lang.annotation.RetentionPolicy; String[] value(); } +// MODULE: main(lib) // FILE: 1.kt @JavaAnn class MyClass1 diff --git a/compiler/testData/codegen/boxAgainstJava/annotations/javaAnnotationCall.kt b/compiler/testData/codegen/box/annotations/javaAnnotationCall.kt similarity index 80% rename from compiler/testData/codegen/boxAgainstJava/annotations/javaAnnotationCall.kt rename to compiler/testData/codegen/box/annotations/javaAnnotationCall.kt index b34683cf718..86a46e62036 100644 --- a/compiler/testData/codegen/boxAgainstJava/annotations/javaAnnotationCall.kt +++ b/compiler/testData/codegen/box/annotations/javaAnnotationCall.kt @@ -1,4 +1,7 @@ +// IGNORE_BACKEND_FIR: JVM_IR +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE // WITH_RUNTIME +// MODULE: lib // FILE: JavaAnn.java import java.lang.annotation.Retention; @@ -9,6 +12,7 @@ import java.lang.annotation.RetentionPolicy; String value(); } +// MODULE: main(lib) // FILE: 1.kt @JavaAnn("value") class MyClass diff --git a/compiler/testData/codegen/boxAgainstJava/annotations/javaAnnotationDefault.kt b/compiler/testData/codegen/box/annotations/javaAnnotationDefault.kt similarity index 92% rename from compiler/testData/codegen/boxAgainstJava/annotations/javaAnnotationDefault.kt rename to compiler/testData/codegen/box/annotations/javaAnnotationDefault.kt index 352d35d16b7..9adbf26a5f2 100644 --- a/compiler/testData/codegen/boxAgainstJava/annotations/javaAnnotationDefault.kt +++ b/compiler/testData/codegen/box/annotations/javaAnnotationDefault.kt @@ -1,4 +1,7 @@ +// IGNORE_BACKEND_FIR: JVM_IR +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE // WITH_RUNTIME +// MODULE: lib // FILE: JavaAnn.java import java.lang.annotation.Retention; @@ -25,6 +28,7 @@ import java.lang.annotation.RetentionPolicy; String f() default "default"; } +// MODULE: main(lib) // FILE: 1.kt @JavaAnn class MyClass diff --git a/compiler/testData/codegen/boxAgainstJava/annotations/javaNegativePropertyAsAnnotationParameter.kt b/compiler/testData/codegen/box/annotations/javaNegativePropertyAsAnnotationParameter.kt similarity index 91% rename from compiler/testData/codegen/boxAgainstJava/annotations/javaNegativePropertyAsAnnotationParameter.kt rename to compiler/testData/codegen/box/annotations/javaNegativePropertyAsAnnotationParameter.kt index 241abdd9483..0d2a7683be9 100644 --- a/compiler/testData/codegen/boxAgainstJava/annotations/javaNegativePropertyAsAnnotationParameter.kt +++ b/compiler/testData/codegen/box/annotations/javaNegativePropertyAsAnnotationParameter.kt @@ -1,4 +1,7 @@ +// IGNORE_BACKEND_FIR: JVM_IR +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE // WITH_RUNTIME +// MODULE: lib // FILE: Foo.java class Foo { @@ -10,6 +13,7 @@ class Foo { public static final byte b = -2; } +// MODULE: main(lib) // FILE: 1.kt @Ann(Foo.i, Foo.s, Foo.f, Foo.d, Foo.l, Foo.b) class MyClass diff --git a/compiler/testData/codegen/boxAgainstJava/annotations/javaPropertyAsAnnotationParameter.kt b/compiler/testData/codegen/box/annotations/javaPropertyAsAnnotationParameter.kt similarity index 94% rename from compiler/testData/codegen/boxAgainstJava/annotations/javaPropertyAsAnnotationParameter.kt rename to compiler/testData/codegen/box/annotations/javaPropertyAsAnnotationParameter.kt index a8b3750b2a5..e288aaa49fe 100644 --- a/compiler/testData/codegen/boxAgainstJava/annotations/javaPropertyAsAnnotationParameter.kt +++ b/compiler/testData/codegen/box/annotations/javaPropertyAsAnnotationParameter.kt @@ -1,4 +1,7 @@ +// IGNORE_BACKEND_FIR: JVM_IR +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE // WITH_RUNTIME +// MODULE: lib // FILE: Foo.java class Foo { @@ -15,6 +18,7 @@ class Foo { public static final char intAsChar = 3; } +// MODULE: main(lib) // FILE: 1.kt @Ann(Foo.i, Foo.s, Foo.f, Foo.d, Foo.l, Foo.b, Foo.bool, Foo.c, Foo.str, Foo.charAsInt, Foo.intAsChar) class MyClass diff --git a/compiler/testData/codegen/boxAgainstJava/annotations/javaPropertyWithIntInitializer.kt b/compiler/testData/codegen/box/annotations/javaPropertyWithIntInitializer.kt similarity index 91% rename from compiler/testData/codegen/boxAgainstJava/annotations/javaPropertyWithIntInitializer.kt rename to compiler/testData/codegen/box/annotations/javaPropertyWithIntInitializer.kt index 9c51d9dd7af..438640e634f 100644 --- a/compiler/testData/codegen/boxAgainstJava/annotations/javaPropertyWithIntInitializer.kt +++ b/compiler/testData/codegen/box/annotations/javaPropertyWithIntInitializer.kt @@ -1,4 +1,7 @@ +// IGNORE_BACKEND_FIR: JVM_IR +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE // WITH_RUNTIME +// MODULE: lib // FILE: Foo.java class Foo { @@ -11,6 +14,7 @@ class Foo { public static final char c = 99; } +// MODULE: main(lib) // FILE: 1.kt @Ann(Foo.i, Foo.s, Foo.f, Foo.d, Foo.l, Foo.b, Foo.c) class MyClass diff --git a/compiler/testData/codegen/boxAgainstJava/annotations/kClassMapping/arrayClassParameter.kt b/compiler/testData/codegen/box/annotations/kClassMapping/arrayClassParameter.kt similarity index 85% rename from compiler/testData/codegen/boxAgainstJava/annotations/kClassMapping/arrayClassParameter.kt rename to compiler/testData/codegen/box/annotations/kClassMapping/arrayClassParameter.kt index ed18d0f2361..02b740e9252 100644 --- a/compiler/testData/codegen/boxAgainstJava/annotations/kClassMapping/arrayClassParameter.kt +++ b/compiler/testData/codegen/box/annotations/kClassMapping/arrayClassParameter.kt @@ -1,5 +1,7 @@ // IGNORE_BACKEND_FIR: JVM_IR +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE // WITH_RUNTIME +// MODULE: lib // FILE: JavaAnn.java import java.lang.annotation.Retention; @@ -10,6 +12,7 @@ import java.lang.annotation.RetentionPolicy; Class[] args(); } +// MODULE: main(lib) // FILE: 1.kt class O diff --git a/compiler/testData/codegen/boxAgainstJava/annotations/kClassMapping/arrayClassParameterOnJavaClass.kt b/compiler/testData/codegen/box/annotations/kClassMapping/arrayClassParameterOnJavaClass.kt similarity index 86% rename from compiler/testData/codegen/boxAgainstJava/annotations/kClassMapping/arrayClassParameterOnJavaClass.kt rename to compiler/testData/codegen/box/annotations/kClassMapping/arrayClassParameterOnJavaClass.kt index e7652bb492e..091ffcfe95e 100644 --- a/compiler/testData/codegen/boxAgainstJava/annotations/kClassMapping/arrayClassParameterOnJavaClass.kt +++ b/compiler/testData/codegen/box/annotations/kClassMapping/arrayClassParameterOnJavaClass.kt @@ -1,5 +1,7 @@ // IGNORE_BACKEND_FIR: JVM_IR +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE // WITH_RUNTIME +// MODULE: lib // FILE: JavaAnn.java import java.lang.annotation.Retention; @@ -18,6 +20,7 @@ class K {} @JavaAnn(args = {O.class, K.class}) class MyJavaClass {} +// MODULE: main(lib) // FILE: 1.kt fun box(): String { diff --git a/compiler/testData/codegen/boxAgainstJava/annotations/kClassMapping/classParameter.kt b/compiler/testData/codegen/box/annotations/kClassMapping/classParameter.kt similarity index 83% rename from compiler/testData/codegen/boxAgainstJava/annotations/kClassMapping/classParameter.kt rename to compiler/testData/codegen/box/annotations/kClassMapping/classParameter.kt index a54e4ed659c..8c7f4b02986 100644 --- a/compiler/testData/codegen/boxAgainstJava/annotations/kClassMapping/classParameter.kt +++ b/compiler/testData/codegen/box/annotations/kClassMapping/classParameter.kt @@ -1,5 +1,7 @@ // IGNORE_BACKEND_FIR: JVM_IR +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE // WITH_RUNTIME +// MODULE: lib // FILE: JavaAnn.java import java.lang.annotation.Retention; @@ -10,6 +12,7 @@ import java.lang.annotation.RetentionPolicy; Class value(); } +// MODULE: main(lib) // FILE: 1.kt class OK diff --git a/compiler/testData/codegen/boxAgainstJava/annotations/kClassMapping/classParameterOnJavaClass.kt b/compiler/testData/codegen/box/annotations/kClassMapping/classParameterOnJavaClass.kt similarity index 84% rename from compiler/testData/codegen/boxAgainstJava/annotations/kClassMapping/classParameterOnJavaClass.kt rename to compiler/testData/codegen/box/annotations/kClassMapping/classParameterOnJavaClass.kt index a455fb36f14..ba7e9bfa0e0 100644 --- a/compiler/testData/codegen/boxAgainstJava/annotations/kClassMapping/classParameterOnJavaClass.kt +++ b/compiler/testData/codegen/box/annotations/kClassMapping/classParameterOnJavaClass.kt @@ -1,5 +1,7 @@ // IGNORE_BACKEND_FIR: JVM_IR +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE // WITH_RUNTIME +// MODULE: lib // FILE: JavaAnn.java import java.lang.annotation.Retention; @@ -17,6 +19,7 @@ class OK {} @JavaAnn(OK.class) class MyJavaClass {} +// MODULE: main(lib) // FILE: 1.kt fun box(): String { diff --git a/compiler/testData/codegen/boxAgainstJava/annotations/kClassMapping/varargClassParameter.kt b/compiler/testData/codegen/box/annotations/kClassMapping/varargClassParameter.kt similarity index 85% rename from compiler/testData/codegen/boxAgainstJava/annotations/kClassMapping/varargClassParameter.kt rename to compiler/testData/codegen/box/annotations/kClassMapping/varargClassParameter.kt index 9ee6c9bdf4b..d414b17ec10 100644 --- a/compiler/testData/codegen/boxAgainstJava/annotations/kClassMapping/varargClassParameter.kt +++ b/compiler/testData/codegen/box/annotations/kClassMapping/varargClassParameter.kt @@ -1,5 +1,7 @@ // IGNORE_BACKEND_FIR: JVM_IR +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE // WITH_RUNTIME +// MODULE: lib // FILE: JavaAnn.java import java.lang.annotation.Retention; @@ -10,6 +12,7 @@ import java.lang.annotation.RetentionPolicy; Class[] value(); } +// MODULE: main(lib) // FILE: 1.kt class O diff --git a/compiler/testData/codegen/boxAgainstJava/annotations/kClassMapping/varargClassParameterOnJavaClass.kt b/compiler/testData/codegen/box/annotations/kClassMapping/varargClassParameterOnJavaClass.kt similarity index 86% rename from compiler/testData/codegen/boxAgainstJava/annotations/kClassMapping/varargClassParameterOnJavaClass.kt rename to compiler/testData/codegen/box/annotations/kClassMapping/varargClassParameterOnJavaClass.kt index efbade72b7a..e082122a78a 100644 --- a/compiler/testData/codegen/boxAgainstJava/annotations/kClassMapping/varargClassParameterOnJavaClass.kt +++ b/compiler/testData/codegen/box/annotations/kClassMapping/varargClassParameterOnJavaClass.kt @@ -1,5 +1,7 @@ // IGNORE_BACKEND_FIR: JVM_IR +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE // WITH_RUNTIME +// MODULE: lib // FILE: JavaAnn.java import java.lang.annotation.Retention; @@ -18,6 +20,7 @@ class K {} @JavaAnn({O.class, K.class}) class MyJavaClass {} +// MODULE: main(lib) // FILE: 1.kt class O diff --git a/compiler/testData/codegen/boxAgainstJava/annotations/retentionInJava.kt b/compiler/testData/codegen/box/annotations/retentionInJava.kt similarity index 70% rename from compiler/testData/codegen/boxAgainstJava/annotations/retentionInJava.kt rename to compiler/testData/codegen/box/annotations/retentionInJava.kt index 468f6e457ad..006f1d9d88e 100644 --- a/compiler/testData/codegen/boxAgainstJava/annotations/retentionInJava.kt +++ b/compiler/testData/codegen/box/annotations/retentionInJava.kt @@ -1,3 +1,5 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: Foo.java import java.lang.annotation.Retention; @@ -7,6 +9,7 @@ import java.lang.annotation.RetentionPolicy; @interface Foo { } +// MODULE: main(lib) // FILE: 1.kt @Foo class Bar diff --git a/compiler/testData/codegen/box/annotations/typeAnnotationOnJdk6.kt b/compiler/testData/codegen/box/annotations/typeAnnotationOnJdk6.kt index 0e2d9aea7e6..b5be1dfdeb4 100644 --- a/compiler/testData/codegen/box/annotations/typeAnnotationOnJdk6.kt +++ b/compiler/testData/codegen/box/annotations/typeAnnotationOnJdk6.kt @@ -1,5 +1,6 @@ // TARGET_BACKEND: JVM // WITH_RUNTIME +// JVM_TARGET: 1.6 @Target(AnnotationTarget.TYPE) annotation class A diff --git a/compiler/testData/codegen/boxAgainstJava/annotations/typeAnnotations/implicitReturn.kt b/compiler/testData/codegen/box/annotations/typeAnnotations/implicitReturnAgainstCompiled.kt similarity index 94% rename from compiler/testData/codegen/boxAgainstJava/annotations/typeAnnotations/implicitReturn.kt rename to compiler/testData/codegen/box/annotations/typeAnnotations/implicitReturnAgainstCompiled.kt index 6023ecf9244..f59f598b264 100644 --- a/compiler/testData/codegen/boxAgainstJava/annotations/typeAnnotations/implicitReturn.kt +++ b/compiler/testData/codegen/box/annotations/typeAnnotations/implicitReturnAgainstCompiled.kt @@ -1,3 +1,4 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE // KOTLIN_CONFIGURATION_FLAGS: +JVM.EMIT_JVM_TYPE_ANNOTATIONS // TARGET_BACKEND: JVM // IGNORE_BACKEND_FIR: JVM_IR @@ -5,6 +6,7 @@ // WITH_REFLECT // FULL_JDK +// MODULE: lib // FILE: ImplicitReturn.java import java.lang.annotation.ElementType; @@ -26,6 +28,7 @@ public class ImplicitReturn { } +// MODULE: main(lib) // FILE: Kotlin.kt import java.lang.reflect.AnnotatedType diff --git a/compiler/testData/codegen/boxAgainstJava/callableReference/constructor.kt b/compiler/testData/codegen/box/callableReference/constructor.kt similarity index 58% rename from compiler/testData/codegen/boxAgainstJava/callableReference/constructor.kt rename to compiler/testData/codegen/box/callableReference/constructor.kt index a2c3ad8ba04..555056a8232 100644 --- a/compiler/testData/codegen/boxAgainstJava/callableReference/constructor.kt +++ b/compiler/testData/codegen/box/callableReference/constructor.kt @@ -1,9 +1,12 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: A.java class A { public A(double x, int y) { } } +// MODULE: main(lib) // FILE: 1.kt fun box(): String { diff --git a/compiler/testData/codegen/boxAgainstJava/callableReference/kt16412.kt b/compiler/testData/codegen/box/callableReference/kt16412.kt similarity index 73% rename from compiler/testData/codegen/boxAgainstJava/callableReference/kt16412.kt rename to compiler/testData/codegen/box/callableReference/kt16412.kt index f4f582caca9..a4bc421599b 100644 --- a/compiler/testData/codegen/boxAgainstJava/callableReference/kt16412.kt +++ b/compiler/testData/codegen/box/callableReference/kt16412.kt @@ -1,9 +1,12 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: MFunction.java public interface MFunction { R invoke(T t); } +// MODULE: main(lib) // FILE: 1.kt @@ -17,4 +20,4 @@ class Bar { fun box(): String { return Bar().foo("OK").dealToBeOffered -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxAgainstJava/callableReference/publicFinalField.kt b/compiler/testData/codegen/box/callableReference/publicFinalField.kt similarity index 55% rename from compiler/testData/codegen/boxAgainstJava/callableReference/publicFinalField.kt rename to compiler/testData/codegen/box/callableReference/publicFinalField.kt index e6eb43158b5..d2533488e0f 100644 --- a/compiler/testData/codegen/boxAgainstJava/callableReference/publicFinalField.kt +++ b/compiler/testData/codegen/box/callableReference/publicFinalField.kt @@ -1,9 +1,12 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: A.java public class A { public final String field = "OK"; } +// MODULE: main(lib) // FILE: 1.kt fun box() = (A::field).get(A()) diff --git a/compiler/testData/codegen/boxAgainstJava/callableReference/publicMutableField.kt b/compiler/testData/codegen/box/callableReference/publicMutableField.kt similarity index 77% rename from compiler/testData/codegen/boxAgainstJava/callableReference/publicMutableField.kt rename to compiler/testData/codegen/box/callableReference/publicMutableField.kt index 84cbe7f31ec..4450f45de30 100644 --- a/compiler/testData/codegen/boxAgainstJava/callableReference/publicMutableField.kt +++ b/compiler/testData/codegen/box/callableReference/publicMutableField.kt @@ -1,9 +1,12 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: A.java public class A { public int field = 239; } +// MODULE: main(lib) // FILE: 1.kt fun box(): String { diff --git a/compiler/testData/codegen/boxAgainstJava/callableReference/staticMethod.kt b/compiler/testData/codegen/box/callableReference/staticMethod.kt similarity index 68% rename from compiler/testData/codegen/boxAgainstJava/callableReference/staticMethod.kt rename to compiler/testData/codegen/box/callableReference/staticMethod.kt index c0a0f9f7441..882d183b121 100644 --- a/compiler/testData/codegen/boxAgainstJava/callableReference/staticMethod.kt +++ b/compiler/testData/codegen/box/callableReference/staticMethod.kt @@ -1,3 +1,5 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: A.java class A { @@ -6,6 +8,7 @@ class A { } } +// MODULE: main(lib) // FILE: 1.kt fun box(): String { diff --git a/compiler/testData/codegen/box/closures/kt23881.kt b/compiler/testData/codegen/box/closures/kt23881.kt new file mode 100644 index 00000000000..6619132ebac --- /dev/null +++ b/compiler/testData/codegen/box/closures/kt23881.kt @@ -0,0 +1,30 @@ +// TARGET_BACKEND: JVM +// IGNORE_BACKEND: JVM +// WITH_RUNTIME + +class ShouldBeCaptured +class ShouldNOTBeCaptured + +class ClassWithCallback { + var someCallback: (() -> Unit)? = null + + fun checkFields(): String { + for (field in someCallback!!.javaClass.declaredFields) { + val value = field.get(someCallback!!) + if (value is ShouldNOTBeCaptured) throw AssertionError("Leaked value") + } + return "OK" + } +} + +fun box(): String { + val toCapture = ShouldBeCaptured() + val notToCapture = ShouldNOTBeCaptured() + + val classWithCallback = ClassWithCallback() + classWithCallback.apply { + someCallback = { toCapture } + notToCapture + } + return classWithCallback.checkFields() +} diff --git a/compiler/testData/compileKotlinAgainstKotlin/annotationInInterface.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/annotationInInterface.kt similarity index 87% rename from compiler/testData/compileKotlinAgainstKotlin/annotationInInterface.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/annotationInInterface.kt index 995de6ec0eb..3fa31f3de8b 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/annotationInInterface.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/annotationInInterface.kt @@ -1,5 +1,9 @@ // IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM +// WITH_STDLIB +// WITH_REFLECT + +// MODULE: lib // FILE: A.kt package a @@ -12,6 +16,7 @@ interface Tr { fun foo() {} } +// MODULE: main(lib) // FILE: B.kt class C : a.Tr diff --git a/compiler/testData/compileKotlinAgainstKotlin/annotationOnTypeUseInTypeAlias.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/annotationOnTypeUseInTypeAlias.kt similarity index 96% rename from compiler/testData/compileKotlinAgainstKotlin/annotationOnTypeUseInTypeAlias.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/annotationOnTypeUseInTypeAlias.kt index 467f94de31f..ab1c731623c 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/annotationOnTypeUseInTypeAlias.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/annotationOnTypeUseInTypeAlias.kt @@ -1,6 +1,7 @@ // IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM // WITH_REFLECT +// MODULE: lib // FILE: A.kt @Target(AnnotationTarget.TYPE) annotation class Anno(val value: String) @@ -15,6 +16,7 @@ class C(val t: T) typealias MyCMyFoo = C<@Anno("OK") MyFoo?> typealias MyCMaybeFoo = C<@Anno("OK") MyMaybeFoo> +// MODULE: main(lib) // FILE: B.kt fun testMyFoo(myc: MyCMyFoo) {} fun testMyMaybeFoo(mycmyb: MyCMaybeFoo) {} diff --git a/compiler/testData/compileKotlinAgainstKotlin/annotationsOnTypeAliases.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/annotationsOnTypeAliases.kt similarity index 87% rename from compiler/testData/compileKotlinAgainstKotlin/annotationsOnTypeAliases.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/annotationsOnTypeAliases.kt index f01a7de8fe3..6d64ff59d17 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/annotationsOnTypeAliases.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/annotationsOnTypeAliases.kt @@ -1,4 +1,8 @@ +// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM +// WITH_STDLIB + +// MODULE: lib // FILE: A.kt package a @@ -13,6 +17,8 @@ annotation class Ann(val x: Int) @Ann(2) typealias TA = Any +// MODULE: main(lib) +// FULL_JDK // FILE: B.kt import a.Ann @@ -26,4 +32,4 @@ fun box(): String { Class.forName("a.AKt").assertHasDeclaredMethodWithAnn() return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/compileKotlinAgainstKotlin/callDeserializedPropertyOnInlineClassType.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/callDeserializedPropertyOnInlineClassType.kt similarity index 89% rename from compiler/testData/compileKotlinAgainstKotlin/callDeserializedPropertyOnInlineClassType.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/callDeserializedPropertyOnInlineClassType.kt index 5006d26bcf9..ed635145c75 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/callDeserializedPropertyOnInlineClassType.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/callDeserializedPropertyOnInlineClassType.kt @@ -1,4 +1,5 @@ // !LANGUAGE: +InlineClasses +// MODULE: lib // FILE: A.kt package a @@ -8,6 +9,7 @@ inline class Foo(val x: IntArray) { val size: Int get() = x.size } +// MODULE: main(lib) // FILE: B.kt import a.* diff --git a/compiler/testData/compileKotlinAgainstKotlin/callDeserializedPropertyOnInlineClassTypeOldMangling.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/callDeserializedPropertyOnInlineClassTypeOldMangling.kt similarity index 80% rename from compiler/testData/compileKotlinAgainstKotlin/callDeserializedPropertyOnInlineClassTypeOldMangling.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/callDeserializedPropertyOnInlineClassTypeOldMangling.kt index 6dd95b4460f..467bfa9f4df 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/callDeserializedPropertyOnInlineClassTypeOldMangling.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/callDeserializedPropertyOnInlineClassTypeOldMangling.kt @@ -1,7 +1,8 @@ // TARGET_BACKEND: JVM // !LANGUAGE: +InlineClasses +// MODULE: lib +// USE_OLD_INLINE_CLASSES_MANGLING_SCHEME // FILE: A.kt -// KOTLIN_CONFIGURATION_FLAGS: +JVM.USE_OLD_INLINE_CLASSES_MANGLING_SCHEME package a @@ -10,6 +11,7 @@ inline class Foo(val x: IntArray) { val size: Int get() = x.size } +// MODULE: main(lib) // FILE: B.kt import a.* diff --git a/compiler/testData/compileKotlinAgainstKotlin/callsToMultifileClassFromOtherPackage.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/callsToMultifileClassFromOtherPackage.kt similarity index 90% rename from compiler/testData/compileKotlinAgainstKotlin/callsToMultifileClassFromOtherPackage.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/callsToMultifileClassFromOtherPackage.kt index 3c6332d89bb..1b3eac8023e 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/callsToMultifileClassFromOtherPackage.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/callsToMultifileClassFromOtherPackage.kt @@ -1,4 +1,7 @@ // TARGET_BACKEND: JVM +// WITH_STDLIB + +// MODULE: lib // FILE: A.kt @file:[JvmName("MultifileClass") JvmMultifileClass] @@ -9,6 +12,7 @@ const val constOK: String = "OK" val valOK: String = "OK" var varOK: String = "Hmmm?" +// MODULE: main(lib) // FILE: B.kt import a.* diff --git a/compiler/testData/compileKotlinAgainstKotlin/clashingFakeOverrideSignatures.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/clashingFakeOverrideSignatures.kt similarity index 95% rename from compiler/testData/compileKotlinAgainstKotlin/clashingFakeOverrideSignatures.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/clashingFakeOverrideSignatures.kt index eb06a1ded37..d2c843590e7 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/clashingFakeOverrideSignatures.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/clashingFakeOverrideSignatures.kt @@ -1,5 +1,6 @@ // IGNORE_BACKEND_FIR: JVM_IR // ^ TODO decide if we want to fix KT-42020 for FIR as well +// MODULE: lib // FILE: a.kt package a @@ -8,6 +9,7 @@ open class Base { fun foo(y: String) = "y:$y" } +// MODULE: main(lib) // FILE: b.kt import a.Base diff --git a/compiler/testData/compileKotlinAgainstKotlin/classInObject.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/classInObject.kt similarity index 86% rename from compiler/testData/compileKotlinAgainstKotlin/classInObject.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/classInObject.kt index 28cf854a951..199481b6fa0 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/classInObject.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/classInObject.kt @@ -1,3 +1,4 @@ +// MODULE: lib // FILE: A.kt package a @@ -8,6 +9,7 @@ object CartRoutes { } } +// MODULE: main(lib) // FILE: B.kt import a.CartRoutes diff --git a/compiler/testData/compileKotlinAgainstKotlin/companionObjectInEnum.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/companionObjectInEnum.kt similarity index 89% rename from compiler/testData/compileKotlinAgainstKotlin/companionObjectInEnum.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/companionObjectInEnum.kt index 23b2ba03385..2ac79105a2e 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/companionObjectInEnum.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/companionObjectInEnum.kt @@ -1,3 +1,4 @@ +// MODULE: lib // FILE: A.kt package library @@ -10,6 +11,7 @@ public enum class EnumClass { } } +// MODULE: main(lib) // FILE: B.kt import library.EnumClass diff --git a/compiler/testData/compileKotlinAgainstKotlin/companionObjectMember.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/companionObjectMember.kt similarity index 84% rename from compiler/testData/compileKotlinAgainstKotlin/companionObjectMember.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/companionObjectMember.kt index deda85e7ded..3961d8f5cab 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/companionObjectMember.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/companionObjectMember.kt @@ -1,3 +1,4 @@ +// MODULE: lib // FILE: A.kt class A { @@ -7,6 +8,7 @@ class A { } } +// MODULE: main(lib) // FILE: B.kt fun box(): String { diff --git a/compiler/testData/compileKotlinAgainstKotlin/constPropertyReferenceFromMultifileClass.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/constPropertyReferenceFromMultifileClass.kt similarity index 85% rename from compiler/testData/compileKotlinAgainstKotlin/constPropertyReferenceFromMultifileClass.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/constPropertyReferenceFromMultifileClass.kt index e72e0a12217..4c563da79ec 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/constPropertyReferenceFromMultifileClass.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/constPropertyReferenceFromMultifileClass.kt @@ -1,4 +1,8 @@ // TARGET_BACKEND: JVM +// WITH_STDLIB +// WITH_REFLECT + +// MODULE: lib // FILE: A.kt @file:[JvmName("MultifileClass") JvmMultifileClass] @@ -9,6 +13,7 @@ annotation class A @A const val OK: String = "OK" +// MODULE: main(lib) // FILE: B.kt import a.OK diff --git a/compiler/testData/compileKotlinAgainstKotlin/constructorVararg.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/constructorVararg.kt similarity index 78% rename from compiler/testData/compileKotlinAgainstKotlin/constructorVararg.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/constructorVararg.kt index b618feba70e..2b8bd8c4084 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/constructorVararg.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/constructorVararg.kt @@ -1,9 +1,11 @@ +// MODULE: lib // FILE: A.kt class A(vararg s: String) { } +// MODULE: main(lib) // FILE: B.kt fun box(): String { diff --git a/compiler/testData/compileKotlinAgainstKotlin/constructorWithInlineClassParametersInBinaryDependencies.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/constructorWithInlineClassParametersInBinaryDependencies.kt similarity index 83% rename from compiler/testData/compileKotlinAgainstKotlin/constructorWithInlineClassParametersInBinaryDependencies.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/constructorWithInlineClassParametersInBinaryDependencies.kt index 164be2e2171..7ff12306b2d 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/constructorWithInlineClassParametersInBinaryDependencies.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/constructorWithInlineClassParametersInBinaryDependencies.kt @@ -1,4 +1,5 @@ // !LANGUAGE: +InlineClasses +// MODULE: lib // FILE: A.kt package lib @@ -6,6 +7,7 @@ inline class S(val string: String) class Test(val s: S) +// MODULE: main(lib) // FILE: B.kt import lib.* diff --git a/compiler/testData/compileKotlinAgainstKotlin/constructorWithInlineClassParametersInBinaryDependenciesOldMangling.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/constructorWithInlineClassParametersInBinaryDependenciesOldMangling.kt similarity index 59% rename from compiler/testData/compileKotlinAgainstKotlin/constructorWithInlineClassParametersInBinaryDependenciesOldMangling.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/constructorWithInlineClassParametersInBinaryDependenciesOldMangling.kt index 8febf6b7379..dfad96236c7 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/constructorWithInlineClassParametersInBinaryDependenciesOldMangling.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/constructorWithInlineClassParametersInBinaryDependenciesOldMangling.kt @@ -1,14 +1,16 @@ // TARGET_BACKEND: JVM // !LANGUAGE: +InlineClasses +// MODULE: lib +// USE_OLD_INLINE_CLASSES_MANGLING_SCHEME // FILE: A.kt -// KOTLIN_CONFIGURATION_FLAGS: +JVM.USE_OLD_INLINE_CLASSES_MANGLING_SCHEME package lib inline class S(val string: String) class Test(val s: S) +// MODULE: main(lib) // FILE: B.kt import lib.* -fun box() = Test(S("OK")).s.string \ No newline at end of file +fun box() = Test(S("OK")).s.string diff --git a/compiler/testData/compileKotlinAgainstKotlin/copySamOnInline.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/copySamOnInline.kt similarity index 94% rename from compiler/testData/compileKotlinAgainstKotlin/copySamOnInline.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/copySamOnInline.kt index f3c92ac7b5a..20b52506eda 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/copySamOnInline.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/copySamOnInline.kt @@ -1,6 +1,9 @@ // IGNORE_BACKEND_FIR: JVM_IR -// FILE: A.kt // FULL_JDK +// WITH_STDLIB + +// MODULE: lib +// FILE: A.kt package test @@ -16,6 +19,7 @@ inline fun doWork(noinline job: () -> String): Callable { var sameModule = doWork { "O" } +// MODULE: main(lib) // FILE: B.kt import test.* diff --git a/compiler/testData/compileKotlinAgainstKotlin/copySamOnInline2.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/copySamOnInline2.kt similarity index 90% rename from compiler/testData/compileKotlinAgainstKotlin/copySamOnInline2.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/copySamOnInline2.kt index d5888612bd2..06b19f700ab 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/copySamOnInline2.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/copySamOnInline2.kt @@ -1,6 +1,9 @@ // IGNORE_BACKEND_FIR: JVM_IR -// FILE: A.kt // FULL_JDK +// WITH_STDLIB + +// MODULE: lib +// FILE: A.kt package test @@ -10,6 +13,7 @@ inline fun doWork(noinline job: () -> String): Callable { return Callable(job) } +// MODULE: main(lib) // FILE: B.kt import test.* diff --git a/compiler/testData/compileKotlinAgainstKotlin/coroutinesBinary.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/coroutinesBinary.kt similarity index 95% rename from compiler/testData/compileKotlinAgainstKotlin/coroutinesBinary.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/coroutinesBinary.kt index d857af0cd9d..a79b8d5a986 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/coroutinesBinary.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/coroutinesBinary.kt @@ -1,6 +1,7 @@ -// FILE: A.kt +// MODULE: lib // WITH_RUNTIME // WITH_COROUTINES +// FILE: A.kt package a import kotlin.coroutines.* @@ -27,6 +28,7 @@ fun builder(c: suspend Controller.() -> Unit) { controller.callback() } +// MODULE: main(lib) // FILE: B.kt import a.builder diff --git a/compiler/testData/compileKotlinAgainstKotlin/defaultConstructor.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/defaultConstructor.kt similarity index 76% rename from compiler/testData/compileKotlinAgainstKotlin/defaultConstructor.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/defaultConstructor.kt index 8cbbab06504..350411dd058 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/defaultConstructor.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/defaultConstructor.kt @@ -1,9 +1,11 @@ +// MODULE: lib // FILE: A.kt package aaa class A(val a: Int = 1) +// MODULE: main(lib) // FILE: B.kt fun box(): String { diff --git a/compiler/testData/compileKotlinAgainstKotlin/defaultLambdaRegeneration.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/defaultLambdaRegeneration.kt similarity index 89% rename from compiler/testData/compileKotlinAgainstKotlin/defaultLambdaRegeneration.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/defaultLambdaRegeneration.kt index 78eaf5387fd..c792b0c31b8 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/defaultLambdaRegeneration.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/defaultLambdaRegeneration.kt @@ -1,5 +1,8 @@ // IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM +// WITH_STDLIB + +// MODULE: lib // FILE: A.kt package test @@ -9,6 +12,7 @@ inline fun test(s: () -> () -> String = { val z = "Outer"; { "OK" } }) = val same = test() +// MODULE: main(lib) // FILE: B.kt import test.* diff --git a/compiler/testData/compileKotlinAgainstKotlin/defaultLambdaRegeneration2.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/defaultLambdaRegeneration2.kt similarity index 91% rename from compiler/testData/compileKotlinAgainstKotlin/defaultLambdaRegeneration2.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/defaultLambdaRegeneration2.kt index 80e5c2758e9..42c2c35939f 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/defaultLambdaRegeneration2.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/defaultLambdaRegeneration2.kt @@ -1,5 +1,8 @@ // IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM +// WITH_STDLIB + +// MODULE: lib // FILE: A.kt package test @@ -9,6 +12,7 @@ inline fun test(s: () -> () -> () -> String = { val z = "Outer"; { { "OK" } } }) val same = test() +// MODULE: main(lib) // FILE: B.kt import test.* diff --git a/compiler/testData/compileKotlinAgainstKotlin/defaultWithInlineClassAndReceivers.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/defaultWithInlineClassAndReceivers.kt similarity index 86% rename from compiler/testData/compileKotlinAgainstKotlin/defaultWithInlineClassAndReceivers.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/defaultWithInlineClassAndReceivers.kt index a868b65df07..7d0f19055c9 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/defaultWithInlineClassAndReceivers.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/defaultWithInlineClassAndReceivers.kt @@ -1,4 +1,5 @@ // !LANGUAGE: +InlineClasses +// MODULE: lib // FILE: A.kt package z @@ -8,6 +9,7 @@ class X { fun Int.foo(z: Z, value: String = "OK") = value } +// MODULE: main(lib) // FILE: B.kt import z.* diff --git a/compiler/testData/compileKotlinAgainstKotlin/defaultWithInlineClassAndReceiversOldMangling.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/defaultWithInlineClassAndReceiversOldMangling.kt similarity index 75% rename from compiler/testData/compileKotlinAgainstKotlin/defaultWithInlineClassAndReceiversOldMangling.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/defaultWithInlineClassAndReceiversOldMangling.kt index 268760734a8..59a484beb0f 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/defaultWithInlineClassAndReceiversOldMangling.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/defaultWithInlineClassAndReceiversOldMangling.kt @@ -1,7 +1,8 @@ // TARGET_BACKEND: JVM // !LANGUAGE: +InlineClasses +// MODULE: lib +// USE_OLD_INLINE_CLASSES_MANGLING_SCHEME // FILE: A.kt -// KOTLIN_CONFIGURATION_FLAGS: +JVM.USE_OLD_INLINE_CLASSES_MANGLING_SCHEME package z inline class Z(val s: String) @@ -10,6 +11,7 @@ class X { fun Int.foo(z: Z, value: String = "OK") = value } +// MODULE: main(lib) // FILE: B.kt import z.* diff --git a/compiler/testData/compileKotlinAgainstKotlin/delegatedDefault.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/delegatedDefault.kt similarity index 85% rename from compiler/testData/compileKotlinAgainstKotlin/delegatedDefault.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/delegatedDefault.kt index a3e995b04fa..46edc4677e7 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/delegatedDefault.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/delegatedDefault.kt @@ -1,3 +1,4 @@ +// MODULE: lib // FILE: A.kt package lib @@ -11,6 +12,7 @@ class B : A { class C(val x: A) : A by x +// MODULE: main(lib) // FILE: B.kt import lib.* diff --git a/compiler/testData/compileKotlinAgainstKotlin/delegationAndAnnotations.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/delegationAndAnnotations.kt similarity index 89% rename from compiler/testData/compileKotlinAgainstKotlin/delegationAndAnnotations.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/delegationAndAnnotations.kt index 0fe888bdeb5..fb606a0f1ac 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/delegationAndAnnotations.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/delegationAndAnnotations.kt @@ -1,5 +1,7 @@ +// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM // WITH_RUNTIME +// MODULE: lib // FILE: A.kt import java.io.IOException @@ -12,6 +14,7 @@ interface A { annotation class Anno +// MODULE: main(lib) // FILE: B.kt class B(a: A) : A by a diff --git a/compiler/testData/compileKotlinAgainstKotlin/doublyNestedClass.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/doublyNestedClass.kt similarity index 84% rename from compiler/testData/compileKotlinAgainstKotlin/doublyNestedClass.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/doublyNestedClass.kt index 12ceef419a4..a03730ff7e7 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/doublyNestedClass.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/doublyNestedClass.kt @@ -1,3 +1,4 @@ +// MODULE: lib // FILE: A.kt package aaa @@ -10,6 +11,7 @@ class A { } } +// MODULE: main(lib) // FILE: B.kt fun box(): String { diff --git a/compiler/testData/compileKotlinAgainstKotlin/enum.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/enum.kt similarity index 84% rename from compiler/testData/compileKotlinAgainstKotlin/enum.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/enum.kt index aedb880cdbc..9eb2f9c1842 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/enum.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/enum.kt @@ -1,3 +1,4 @@ +// MODULE: lib // FILE: A.kt package aaa @@ -7,6 +8,7 @@ enum class E { SUBCLASS { } } +// MODULE: main(lib) // FILE: B.kt import aaa.E diff --git a/compiler/testData/compileKotlinAgainstKotlin/expectClassActualTypeAlias.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/expectClassActualTypeAlias.kt similarity index 79% rename from compiler/testData/compileKotlinAgainstKotlin/expectClassActualTypeAlias.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/expectClassActualTypeAlias.kt index 9089c2eba32..aff7e8872c4 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/expectClassActualTypeAlias.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/expectClassActualTypeAlias.kt @@ -1,8 +1,11 @@ +// IGNORE_BACKEND_FIR: JVM_IR // IGNORE_BACKEND: NATIVE // !LANGUAGE: +MultiPlatformProjects +// MODULE: lib // FILE: impl.kt class A(val result: String = "OK") +// MODULE: main(lib) // FILE: multiplatform.kt expect class B(result: String = "FAIL") diff --git a/compiler/testData/compileKotlinAgainstKotlin/fakeOverridesForIntersectionTypes.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/fakeOverridesForIntersectionTypes.kt similarity index 93% rename from compiler/testData/compileKotlinAgainstKotlin/fakeOverridesForIntersectionTypes.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/fakeOverridesForIntersectionTypes.kt index c134e2541d6..1afd47382b6 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/fakeOverridesForIntersectionTypes.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/fakeOverridesForIntersectionTypes.kt @@ -1,4 +1,5 @@ // TARGET_BACKEND: JVM +// MODULE: lib // FILE: A.kt package a @@ -22,6 +23,7 @@ class D : A, B { override var x: String = "" } +// MODULE: main(lib) // FILE: B.kt import a.* diff --git a/compiler/testData/compileKotlinAgainstKotlin/fir/AnonymousObjectInProperty.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/fir/AnonymousObjectInProperty.kt similarity index 85% rename from compiler/testData/compileKotlinAgainstKotlin/fir/AnonymousObjectInProperty.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/fir/AnonymousObjectInProperty.kt index 541d2fa4276..08f1d2c7760 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/fir/AnonymousObjectInProperty.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/fir/AnonymousObjectInProperty.kt @@ -1,4 +1,5 @@ // TARGET_BACKEND: JVM +// MODULE: lib // FILE: A.kt abstract class A { @@ -9,6 +10,7 @@ abstract class A { protected val y = x.foo() } +// MODULE: main(lib) // FILE: B.kt class B : A() { diff --git a/compiler/testData/compileKotlinAgainstKotlin/fir/ExistingSymbolInFakeOverride.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/fir/ExistingSymbolInFakeOverride.kt similarity index 95% rename from compiler/testData/compileKotlinAgainstKotlin/fir/ExistingSymbolInFakeOverride.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/fir/ExistingSymbolInFakeOverride.kt index 2450ef6b97b..f6d0c0a183f 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/fir/ExistingSymbolInFakeOverride.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/fir/ExistingSymbolInFakeOverride.kt @@ -1,4 +1,5 @@ // TARGET_BACKEND: JVM +// MODULE: lib // FILE: A.kt interface KotlinMangler { @@ -22,6 +23,7 @@ abstract class IrBasedKotlinManglerImpl : AbstractKotlinMangler(), Kotli get() = this } +// MODULE: main(lib) // FILE: B.kt abstract class AbstractJvmManglerIr : IrBasedKotlinManglerImpl() diff --git a/compiler/testData/compileKotlinAgainstKotlin/fir/IncrementalCompilerRunner.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/fir/IncrementalCompilerRunner.kt similarity index 94% rename from compiler/testData/compileKotlinAgainstKotlin/fir/IncrementalCompilerRunner.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/fir/IncrementalCompilerRunner.kt index 0ffc71aaf4d..313ce7389c1 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/fir/IncrementalCompilerRunner.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/fir/IncrementalCompilerRunner.kt @@ -1,6 +1,7 @@ // TARGET_BACKEND: JVM -// FILE: A.kt +// MODULE: lib // WITH_RUNTIME +// FILE: A.kt abstract class IncrementalCompilerRunner( private val workingDir: String, @@ -16,9 +17,10 @@ class IncrementalJsCompilerRunner( ) : IncrementalCompilerRunner(workingDir, fail) { } +// MODULE: main(lib) // FILE: B.kt fun box(): String { val runner = IncrementalJsCompilerRunner(workingDir = "OK", fail = false) return runner.res() -} \ No newline at end of file +} diff --git a/compiler/testData/compileKotlinAgainstKotlin/fir/IrConstAcceptMultiModule.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/fir/IrConstAcceptMultiModule.kt similarity index 97% rename from compiler/testData/compileKotlinAgainstKotlin/fir/IrConstAcceptMultiModule.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/fir/IrConstAcceptMultiModule.kt index e0c04b520e6..e7e1c121860 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/fir/IrConstAcceptMultiModule.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/fir/IrConstAcceptMultiModule.kt @@ -1,6 +1,8 @@ +// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM -// FILE: A.kt +// MODULE: lib // WITH_RUNTIME +// FILE: A.kt abstract class IrConst : IrExpression(), IrExpressionWithCopy { abstract val kind: IrConstKind @@ -81,6 +83,7 @@ interface IrElementVisitor interface IrElementTransformer : IrElementVisitor +// MODULE: main(lib) // FILE: B.kt fun foo(cases: Collection>, exprTransformer: IrElementTransformer, context: Any) { diff --git a/compiler/testData/compileKotlinAgainstKotlin/fir/LibraryProperty.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/fir/LibraryProperty.kt similarity index 82% rename from compiler/testData/compileKotlinAgainstKotlin/fir/LibraryProperty.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/fir/LibraryProperty.kt index f60c0cf1f12..4a56db00e82 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/fir/LibraryProperty.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/fir/LibraryProperty.kt @@ -1,6 +1,7 @@ // TARGET_BACKEND: JVM -// FILE: A.kt +// MODULE: lib // WITH_RUNTIME +// FILE: A.kt package first.second @@ -9,6 +10,7 @@ class FqName(val s: String) @JvmField val VOLATILE_ANNOTATION_FQ_NAME = FqName("volatile") +// MODULE: main(lib) // FILE: B.kt import first.second.VOLATILE_ANNOTATION_FQ_NAME @@ -18,4 +20,4 @@ fun foo() = hasAnnotation(VOLATILE_ANNOTATION_FQ_NAME) fun hasAnnotation(name: FqName): Boolean = true -fun box() = if (foo()) "OK" else "FAIL" \ No newline at end of file +fun box() = if (foo()) "OK" else "FAIL" diff --git a/compiler/testData/compileKotlinAgainstKotlin/importCompanion.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/importCompanion.kt similarity index 86% rename from compiler/testData/compileKotlinAgainstKotlin/importCompanion.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/importCompanion.kt index 4309b9a7fb8..095fc4b588a 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/importCompanion.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/importCompanion.kt @@ -1,5 +1,7 @@ // WITH_RUNTIME // TARGET_BACKEND: JVM + +// MODULE: lib // FILE: 1.kt package test @@ -10,6 +12,7 @@ class C(val x: String) { } } +// MODULE: main(lib) // FILE: 2.kt import test.C.Companion.instance diff --git a/compiler/testData/compileKotlinAgainstKotlin/inlineClassFakeOverrideMangling.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/inlineClassFakeOverrideMangling.kt similarity index 89% rename from compiler/testData/compileKotlinAgainstKotlin/inlineClassFakeOverrideMangling.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/inlineClassFakeOverrideMangling.kt index b5f77ab6073..a1fccc07ffd 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/inlineClassFakeOverrideMangling.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/inlineClassFakeOverrideMangling.kt @@ -1,5 +1,6 @@ // !LANGUAGE: +InlineClasses +// MODULE: lib // FILE: 1.kt inline class IC(val s: String) @@ -12,6 +13,7 @@ open class C : A() class D: C() +// MODULE: main(lib) // FILE: 2.kt fun box(): String { diff --git a/compiler/testData/compileKotlinAgainstKotlin/inlineClassFakeOverrideManglingOldMangling.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/inlineClassFakeOverrideManglingOldMangling.kt similarity index 81% rename from compiler/testData/compileKotlinAgainstKotlin/inlineClassFakeOverrideManglingOldMangling.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/inlineClassFakeOverrideManglingOldMangling.kt index 62905de982b..802d480d41c 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/inlineClassFakeOverrideManglingOldMangling.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/inlineClassFakeOverrideManglingOldMangling.kt @@ -1,7 +1,8 @@ // TARGET_BACKEND: JVM // !LANGUAGE: +InlineClasses +// MODULE: lib +// USE_OLD_INLINE_CLASSES_MANGLING_SCHEME // FILE: 1.kt -// KOTLIN_CONFIGURATION_FLAGS: +JVM.USE_OLD_INLINE_CLASSES_MANGLING_SCHEME inline class IC(val s: String) @@ -13,6 +14,7 @@ open class C : A() class D: C() +// MODULE: main(lib) // FILE: 2.kt fun box(): String { diff --git a/compiler/testData/compileKotlinAgainstKotlin/inlineClassFromBinaryDependencies.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/inlineClassFromBinaryDependencies.kt similarity index 92% rename from compiler/testData/compileKotlinAgainstKotlin/inlineClassFromBinaryDependencies.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/inlineClassFromBinaryDependencies.kt index 89ff9b439b2..effae59f82e 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/inlineClassFromBinaryDependencies.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/inlineClassFromBinaryDependencies.kt @@ -1,4 +1,7 @@ // !LANGUAGE: +InlineClasses +// WITH_STDLIB + +// MODULE: lib // FILE: A.kt package z @@ -20,6 +23,7 @@ inline class Z(val s: String) : IFoo { } } +// MODULE: main(lib) // FILE: B.kt import z.* @@ -35,4 +39,4 @@ fun box(): String { test(Z(1234)) test(Z.z(1234)) return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/compileKotlinAgainstKotlin/inlineClassFromBinaryDependenciesOldMangling.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/inlineClassFromBinaryDependenciesOldMangling.kt similarity index 88% rename from compiler/testData/compileKotlinAgainstKotlin/inlineClassFromBinaryDependenciesOldMangling.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/inlineClassFromBinaryDependenciesOldMangling.kt index 3219146bd33..3e6eb84c125 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/inlineClassFromBinaryDependenciesOldMangling.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/inlineClassFromBinaryDependenciesOldMangling.kt @@ -1,7 +1,9 @@ // TARGET_BACKEND: JVM // !LANGUAGE: +InlineClasses +// WITH_STDLIB +// MODULE: lib +// USE_OLD_INLINE_CLASSES_MANGLING_SCHEME // FILE: A.kt -// KOTLIN_CONFIGURATION_FLAGS: +JVM.USE_OLD_INLINE_CLASSES_MANGLING_SCHEME package z interface IFoo { @@ -22,6 +24,7 @@ inline class Z(val s: String) : IFoo { } } +// MODULE: main(lib) // FILE: B.kt import z.* @@ -37,4 +40,4 @@ fun box(): String { test(Z(1234)) test(Z.z(1234)) return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/compileKotlinAgainstKotlin/inlineClassInlineFunctionCall.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/inlineClassInlineFunctionCall.kt similarity index 81% rename from compiler/testData/compileKotlinAgainstKotlin/inlineClassInlineFunctionCall.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/inlineClassInlineFunctionCall.kt index 574a2e10e8e..b4942f6e538 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/inlineClassInlineFunctionCall.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/inlineClassInlineFunctionCall.kt @@ -1,10 +1,11 @@ -// !LANGUAGE: +InlineClasses +// MODULE: lib // FILE: A.kt inline class A(val x: String) { inline fun f(other: A): A = other } +// MODULE: main(lib) // FILE: B.kt fun box(): String { diff --git a/compiler/testData/compileKotlinAgainstKotlin/inlineClassInlineFunctionCallOldMangling.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/inlineClassInlineFunctionCallOldMangling.kt similarity index 73% rename from compiler/testData/compileKotlinAgainstKotlin/inlineClassInlineFunctionCallOldMangling.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/inlineClassInlineFunctionCallOldMangling.kt index 7c91cf4f455..d4f0876963c 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/inlineClassInlineFunctionCallOldMangling.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/inlineClassInlineFunctionCallOldMangling.kt @@ -1,12 +1,14 @@ // TARGET_BACKEND: JVM // !LANGUAGE: +InlineClasses +// MODULE: lib +// USE_OLD_INLINE_CLASSES_MANGLING_SCHEME // FILE: A.kt -// KOTLIN_CONFIGURATION_FLAGS: +JVM.USE_OLD_INLINE_CLASSES_MANGLING_SCHEME inline class A(val x: String) { inline fun f(other: A): A = other } +// MODULE: main(lib) // FILE: B.kt fun box(): String { diff --git a/compiler/testData/compileKotlinAgainstKotlin/inlineClassInlineProperty.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/inlineClassInlineProperty.kt similarity index 85% rename from compiler/testData/compileKotlinAgainstKotlin/inlineClassInlineProperty.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/inlineClassInlineProperty.kt index fb8153e2182..e4ac266dbf2 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/inlineClassInlineProperty.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/inlineClassInlineProperty.kt @@ -1,4 +1,5 @@ // !LANGUAGE: +InlineClasses +// MODULE: lib // FILE: A.kt package a @@ -8,6 +9,7 @@ inline class S(val value: String) { get() = value + "K" } +// MODULE: main(lib) // FILE: B.kt fun box(): String { diff --git a/compiler/testData/compileKotlinAgainstKotlin/inlineClassInlinePropertyOldMangling.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/inlineClassInlinePropertyOldMangling.kt similarity index 74% rename from compiler/testData/compileKotlinAgainstKotlin/inlineClassInlinePropertyOldMangling.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/inlineClassInlinePropertyOldMangling.kt index 83e528e9ae1..3021fd7157f 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/inlineClassInlinePropertyOldMangling.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/inlineClassInlinePropertyOldMangling.kt @@ -1,7 +1,8 @@ // TARGET_BACKEND: JVM // !LANGUAGE: +InlineClasses +// MODULE: lib +// USE_OLD_INLINE_CLASSES_MANGLING_SCHEME // FILE: A.kt -// KOTLIN_CONFIGURATION_FLAGS: +JVM.USE_OLD_INLINE_CLASSES_MANGLING_SCHEME package a @@ -10,6 +11,7 @@ inline class S(val value: String) { get() = value + "K" } +// MODULE: main(lib) // FILE: B.kt fun box(): String { diff --git a/compiler/testData/compileKotlinAgainstKotlin/inlineClassesOldMangling.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/inlineClassesOldMangling.kt similarity index 68% rename from compiler/testData/compileKotlinAgainstKotlin/inlineClassesOldMangling.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/inlineClassesOldMangling.kt index 32b07378d6e..3b1e8a45766 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/inlineClassesOldMangling.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/inlineClassesOldMangling.kt @@ -1,6 +1,10 @@ +// IGNORE_BACKEND_FIR: JVM_IR // !LANGUAGE: +InlineClasses +// WITH_STDLIB + +// MODULE: lib +// USE_OLD_INLINE_CLASSES_MANGLING_SCHEME // FILE: 1.kt -// KOTLIN_CONFIGURATION_FLAGS: +JVM.USE_OLD_INLINE_CLASSES_MANGLING_SCHEME package test inline class IC(val s: String) @@ -9,12 +13,15 @@ fun ordinary(s: String, ic: IC): String = s + ic.s suspend fun suspend(s: String, ic: IC): String = s + ic.s +// MODULE: main(lib) // FILE: 2.kt import kotlin.coroutines.* import test.* fun builder(c: suspend () -> Unit) { - c.startCoroutine(Continuation(EmptyCoroutineContext) {}) + c.startCoroutine(Continuation(EmptyCoroutineContext) { + it.getOrThrow() + }) } fun box(): String { diff --git a/compiler/testData/compileKotlinAgainstKotlin/inlinedConstants.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/inlinedConstants.kt similarity index 91% rename from compiler/testData/compileKotlinAgainstKotlin/inlinedConstants.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/inlinedConstants.kt index 51cb24fd65a..29ea554b454 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/inlinedConstants.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/inlinedConstants.kt @@ -1,4 +1,8 @@ +// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM +// WITH_STDLIB + +// MODULE: lib // FILE: A.kt package constants @@ -17,6 +21,7 @@ public const val str: String = ":)" @Retention(AnnotationRetention.RUNTIME) public annotation class AnnotationClass(public val value: String) +// MODULE: main(lib) // FILE: B.kt import constants.* diff --git a/compiler/testData/compileKotlinAgainstKotlin/innerClassConstructor.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/innerClassConstructor.kt similarity index 90% rename from compiler/testData/compileKotlinAgainstKotlin/innerClassConstructor.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/innerClassConstructor.kt index 410cc603f89..ab02e117cfd 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/innerClassConstructor.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/innerClassConstructor.kt @@ -1,3 +1,4 @@ +// MODULE: lib // FILE: A.kt package second @@ -6,6 +7,7 @@ public class Outer() { inner class Inner(test: String) } +// MODULE: main(lib) // FILE: B.kt //test for KT-3702 Inner class constructor cannot be invoked in override function with receiver diff --git a/compiler/testData/compileKotlinAgainstKotlin/interfaceDelegationAndBridgesProcessing.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/interfaceDelegationAndBridgesProcessing.kt similarity index 93% rename from compiler/testData/compileKotlinAgainstKotlin/interfaceDelegationAndBridgesProcessing.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/interfaceDelegationAndBridgesProcessing.kt index 6a38fd21d1d..61c4589d31b 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/interfaceDelegationAndBridgesProcessing.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/interfaceDelegationAndBridgesProcessing.kt @@ -1,3 +1,4 @@ +// MODULE: lib // FILE: A.kt package test @@ -18,6 +19,7 @@ abstract class CodeBlockBase: CompositeCodeBlock abstract class LineSeparatedCodeBlock: CodeBlockBase() +// MODULE: main(lib) // FILE: B.kt import test.* diff --git a/compiler/testData/compileKotlinAgainstKotlin/internalSetterOverridden.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/internalSetterOverridden.kt similarity index 86% rename from compiler/testData/compileKotlinAgainstKotlin/internalSetterOverridden.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/internalSetterOverridden.kt index fc975a74458..7203de8a0de 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/internalSetterOverridden.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/internalSetterOverridden.kt @@ -1,3 +1,4 @@ +// MODULE: lib // FILE: A.kt abstract class Base { abstract var x: String @@ -8,6 +9,7 @@ class Derived: Base() { override var x: String = "Z" } +// MODULE: main()(lib) // FILE: B.kt fun box(): String { val d = Derived() diff --git a/compiler/testData/compileKotlinAgainstKotlin/internalWithDefaultArgs.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/internalWithDefaultArgs.kt similarity index 85% rename from compiler/testData/compileKotlinAgainstKotlin/internalWithDefaultArgs.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/internalWithDefaultArgs.kt index 224667f963f..208442bce0f 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/internalWithDefaultArgs.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/internalWithDefaultArgs.kt @@ -1,5 +1,6 @@ // IGNORE_BACKEND_FIR: JVM_IR // IGNORE_BACKEND: NATIVE +// MODULE: lib // FILE: A.kt package a @@ -8,6 +9,7 @@ class Box() { internal fun result(value: String = "OK"): String = value } +// MODULE: main()(lib) // FILE: B.kt fun box(): String { diff --git a/compiler/testData/compileKotlinAgainstKotlin/internalWithInlineClass.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/internalWithInlineClass.kt similarity index 86% rename from compiler/testData/compileKotlinAgainstKotlin/internalWithInlineClass.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/internalWithInlineClass.kt index 939d2ee11fe..39765c8e15e 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/internalWithInlineClass.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/internalWithInlineClass.kt @@ -1,4 +1,5 @@ // IGNORE_BACKEND_FIR: JVM_IR +// MODULE: lib // FILE: A.kt package a @@ -9,6 +10,7 @@ class Box { internal fun result(msg: Message): String = msg.value } +// MODULE: main()(lib) // FILE: B.kt fun box(): String { diff --git a/compiler/testData/compileKotlinAgainstKotlin/internalWithOtherModuleName.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/internalWithOtherModuleName.kt similarity index 85% rename from compiler/testData/compileKotlinAgainstKotlin/internalWithOtherModuleName.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/internalWithOtherModuleName.kt index f577b711aa3..d0f813f2227 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/internalWithOtherModuleName.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/internalWithOtherModuleName.kt @@ -1,5 +1,6 @@ // IGNORE_BACKEND_FIR: JVM_IR // IGNORE_BACKEND: NATIVE +// MODULE: lib // FILE: A.kt package a @@ -8,6 +9,7 @@ class Box(val value: String) { internal fun result(): String = value } +// MODULE: main()(lib) // FILE: B.kt fun box(): String { diff --git a/compiler/testData/compileKotlinAgainstKotlin/intersectionOverrideProperies.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/intersectionOverrideProperies.kt similarity index 95% rename from compiler/testData/compileKotlinAgainstKotlin/intersectionOverrideProperies.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/intersectionOverrideProperies.kt index 33a46830ff2..b4f1eef3ddd 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/intersectionOverrideProperies.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/intersectionOverrideProperies.kt @@ -1,4 +1,5 @@ // TARGET_BACKEND: JVM +// MODULE: lib // FILE: A.kt package a @@ -21,6 +22,7 @@ interface IrBindableSymbol : IrSymbol { interface IrSimpleFunctionSymbol : IrFunctionSymbol, IrBindableSymbol +// MODULE: main(lib) // FILE: B.kt import a.* diff --git a/compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/callStackTrace.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/callStackTrace.kt similarity index 94% rename from compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/callStackTrace.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/callStackTrace.kt index 1142321a241..7f636a0cc30 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/callStackTrace.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/callStackTrace.kt @@ -1,6 +1,9 @@ // !JVM_DEFAULT_MODE: all-compatibility // JVM_TARGET: 1.8 // FULL_JDK +// WITH_STDLIB + +// MODULE: lib // FILE: 1.kt interface KInterface { fun call(): List { @@ -10,6 +13,7 @@ interface KInterface { fun superCall() = Thread.currentThread().getStackTrace().map { it.className + "." + it.methodName } } +// MODULE: main(lib) // FILE: main.kt interface KInterface2 : KInterface { diff --git a/compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/delegationBy/simple.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/delegationBy/simple.kt similarity index 94% rename from compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/delegationBy/simple.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/delegationBy/simple.kt index 1e95990ff38..4122bb80fc2 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/delegationBy/simple.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/delegationBy/simple.kt @@ -4,6 +4,7 @@ // JVM_TARGET: 1.8 // WITH_RUNTIME +// MODULE: lib // FILE: 1.kt interface Test { @JvmDefault @@ -26,6 +27,7 @@ class Delegate : Test { } } +// MODULE: main(lib) // FILE: 2.kt class TestClass(val foo: Test) : Test by foo diff --git a/compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/delegationBy/simpleProperty.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/delegationBy/simpleProperty.kt similarity index 94% rename from compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/delegationBy/simpleProperty.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/delegationBy/simpleProperty.kt index ae20669911f..9018fa6575e 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/delegationBy/simpleProperty.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/delegationBy/simpleProperty.kt @@ -4,6 +4,7 @@ // JVM_TARGET: 1.8 // WITH_RUNTIME +// MODULE: lib // FILE: 1.kt interface Test { @JvmDefault @@ -23,6 +24,7 @@ class Delegate : Test { get() = "K" } +// MODULE: main(lib) // FILE: 2.kt class TestClass(val foo: Test) : Test by foo diff --git a/compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superCall.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superCall.kt similarity index 89% rename from compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superCall.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superCall.kt index 6de59beeec0..efb341c30ae 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superCall.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superCall.kt @@ -1,6 +1,7 @@ // !JVM_DEFAULT_MODE: all-compatibility // JVM_TARGET: 1.8 // WITH_RUNTIME +// MODULE: lib // FILE: 1.kt interface Test { fun test(): String { @@ -8,6 +9,7 @@ interface Test { } } +// MODULE: main(lib) // FILE: 2.kt class TestClass : Test { override fun test(): String { diff --git a/compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superCallFromInterface.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superCallFromInterface.kt similarity index 90% rename from compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superCallFromInterface.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superCallFromInterface.kt index f4e6944bf84..b08c00d03e0 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superCallFromInterface.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superCallFromInterface.kt @@ -1,6 +1,7 @@ // !JVM_DEFAULT_MODE: all-compatibility // JVM_TARGET: 1.8 // WITH_RUNTIME +// MODULE: lib // FILE: 1.kt interface Test { fun test(): String { @@ -8,6 +9,7 @@ interface Test { } } +// MODULE: main(lib) // FILE: 2.kt interface Test2 : Test { diff --git a/compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superCallFromInterface2.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superCallFromInterface2.kt similarity index 91% rename from compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superCallFromInterface2.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superCallFromInterface2.kt index 6d8f1273b90..0cc74d5bec5 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superCallFromInterface2.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superCallFromInterface2.kt @@ -1,6 +1,7 @@ // !JVM_DEFAULT_MODE: all-compatibility // JVM_TARGET: 1.8 // WITH_RUNTIME +// MODULE: lib // FILE: 1.kt interface Test { fun test(): String { @@ -12,6 +13,7 @@ interface Test { } } +// MODULE: main(lib) // FILE: 2.kt interface Test2 : Test { diff --git a/compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superPropAccess.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superPropAccess.kt similarity index 89% rename from compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superPropAccess.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superPropAccess.kt index 86a85c2158c..0899a652493 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superPropAccess.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superPropAccess.kt @@ -1,12 +1,14 @@ // !JVM_DEFAULT_MODE: all-compatibility // JVM_TARGET: 1.8 // WITH_RUNTIME +// MODULE: lib // FILE: 1.kt interface Test { val prop: String get() = "OK" } +// MODULE: main(lib) // FILE: 2.kt class TestClass : Test { override val prop: String diff --git a/compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superPropAccessFromInterface.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superPropAccessFromInterface.kt similarity index 89% rename from compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superPropAccessFromInterface.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superPropAccessFromInterface.kt index dc3419e08ed..ec30b2feeb4 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superPropAccessFromInterface.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superPropAccessFromInterface.kt @@ -1,12 +1,14 @@ // !JVM_DEFAULT_MODE: all-compatibility // JVM_TARGET: 1.8 // WITH_RUNTIME +// MODULE: lib // FILE: 1.kt interface Test { val prop: String get() = "OK" } +// MODULE: main(lib) // FILE: 2.kt interface Test2 : Test { override val prop: String diff --git a/compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superPropAccessFromInterface2.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superPropAccessFromInterface2.kt similarity index 91% rename from compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superPropAccessFromInterface2.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superPropAccessFromInterface2.kt index 65d77df390a..8a6f3dca9b4 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superPropAccessFromInterface2.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superPropAccessFromInterface2.kt @@ -1,6 +1,7 @@ // !JVM_DEFAULT_MODE: all-compatibility // JVM_TARGET: 1.8 // WITH_RUNTIME +// MODULE: lib // FILE: 1.kt interface Test { val prop: String @@ -10,6 +11,7 @@ interface Test { get() = "OK" } +// MODULE: main(lib) // FILE: 2.kt interface Test2 : Test { override val prop: String diff --git a/compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop/likeMemberClash.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/interop/likeMemberClash.kt similarity index 92% rename from compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop/likeMemberClash.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/interop/likeMemberClash.kt index e6480c3b89d..f588ba0652d 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop/likeMemberClash.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/interop/likeMemberClash.kt @@ -1,7 +1,8 @@ // IGNORE_BACKEND_FIR: JVM_IR // FULL_JDK -// FILE: 1.kt +// MODULE: lib // !JVM_DEFAULT_MODE: disable +// FILE: 1.kt interface Check { fun test(): String { return "fail"; @@ -17,9 +18,10 @@ interface SubCheck : Check { open class CheckClass : Check -// FILE: main.kt +// MODULE: main(lib) // !JVM_DEFAULT_MODE: all // JVM_TARGET: 1.8 +// FILE: main.kt class SubCheckClass : CheckClass(), SubCheck fun box(): String { diff --git a/compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop/likeSpecialization.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/interop/likeSpecialization.kt similarity index 92% rename from compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop/likeSpecialization.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/interop/likeSpecialization.kt index addfd9ec5fa..b09c5375f82 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop/likeSpecialization.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/interop/likeSpecialization.kt @@ -1,8 +1,9 @@ // IGNORE_BACKEND_FIR: JVM_IR // WITH_RUNTIME // JVM_TARGET: 1.8 -// FILE: 1.kt +// MODULE: lib // !JVM_DEFAULT_MODE: disable +// FILE: 1.kt interface Foo { fun test(p: T) = p @@ -12,8 +13,9 @@ interface Foo { interface FooDerived: Foo -// FILE: main.kt +// MODULE: main(lib) // !JVM_DEFAULT_MODE: all-compatibility +// FILE: main.kt open class UnspecializedFromDerived : FooDerived fun box(): String { diff --git a/compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop/newAndOldSchemes.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/interop/newAndOldSchemes.kt similarity index 96% rename from compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop/newAndOldSchemes.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/interop/newAndOldSchemes.kt index 6f8c16cb5db..95dbddab51b 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop/newAndOldSchemes.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/interop/newAndOldSchemes.kt @@ -1,5 +1,8 @@ // IGNORE_BACKEND_FIR: JVM_IR // FULL_JDK +// WITH_STDLIB + +// MODULE: lib // FILE: 1.kt interface KInterface { fun call(): List { @@ -9,9 +12,10 @@ interface KInterface { fun superCall() = Thread.currentThread().getStackTrace().map { it.className + "." + it.methodName } } -// FILE: main.kt +// MODULE: main(lib) // !JVM_DEFAULT_MODE: all-compatibility // JVM_TARGET: 1.8 +// FILE: main.kt interface KInterface2 : KInterface { override fun superCall() = super.superCall() } diff --git a/compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop/newAndOldSchemes2.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/interop/newAndOldSchemes2.kt similarity index 90% rename from compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop/newAndOldSchemes2.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/interop/newAndOldSchemes2.kt index 8e7ad04a6e3..2e4c94ce732 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop/newAndOldSchemes2.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/interop/newAndOldSchemes2.kt @@ -1,5 +1,8 @@ -// FILE: 1.kt +// WITH_STDLIB + +// MODULE: lib // !JVM_DEFAULT_MODE: disable +// FILE: 1.kt interface Foo { fun test(p: T) = "fail" @@ -7,9 +10,10 @@ interface Foo { get() = "fail" } -// FILE: main.kt +// MODULE: main(lib) // !JVM_DEFAULT_MODE: all // JVM_TARGET: 1.8 +// FILE: main.kt interface Foo2: Foo { override fun test(p: String) = p diff --git a/compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop/newAndOldSchemes2Compatibility.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/interop/newAndOldSchemes2Compatibility.kt similarity index 90% rename from compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop/newAndOldSchemes2Compatibility.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/interop/newAndOldSchemes2Compatibility.kt index 606a3122e63..e04176190ac 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop/newAndOldSchemes2Compatibility.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/interop/newAndOldSchemes2Compatibility.kt @@ -1,5 +1,8 @@ -// FILE: 1.kt +// WITH_STDLIB + +// MODULE: lib // !JVM_DEFAULT_MODE: disable +// FILE: 1.kt interface Foo { fun test(p: T) = "fail" @@ -7,9 +10,10 @@ interface Foo { get() = "fail" } -// FILE: main.kt +// MODULE: main(lib) // !JVM_DEFAULT_MODE: all-compatibility // JVM_TARGET: 1.8 +// FILE: main.kt interface Foo2: Foo { override fun test(p: String) : String = p diff --git a/compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop/newAndOldSchemes3.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/interop/newAndOldSchemes3.kt similarity index 93% rename from compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop/newAndOldSchemes3.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/interop/newAndOldSchemes3.kt index 309ec073a8e..a24dfbe03fd 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop/newAndOldSchemes3.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/interop/newAndOldSchemes3.kt @@ -1,16 +1,20 @@ // IGNORE_BACKEND_FIR: JVM_IR // FULL_JDK -// FILE: 1.kt +// WITH_STDLIB + +// MODULE: lib // !JVM_DEFAULT_MODE: disable +// FILE: 1.kt interface KInterface { fun call(): List { return Thread.currentThread().getStackTrace().map { it.className + "." + it.methodName } } } -// FILE: main.kt +// MODULE: main(lib) // !JVM_DEFAULT_MODE: all // JVM_TARGET: 1.8 +// FILE: main.kt interface KInterface2 : KInterface { } diff --git a/compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop/newSchemeWithJvmDefault.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/interop/newSchemeWithJvmDefault.kt similarity index 96% rename from compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop/newSchemeWithJvmDefault.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/interop/newSchemeWithJvmDefault.kt index 00fb371ff65..bfba673831e 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop/newSchemeWithJvmDefault.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/interop/newSchemeWithJvmDefault.kt @@ -2,8 +2,9 @@ // FULL_JDK // WITH_RUNTIME // JVM_TARGET: 1.8 -// FILE: 1.kt +// MODULE: lib // !JVM_DEFAULT_MODE: enable +// FILE: 1.kt interface KInterface { @JvmDefault fun call(): List { @@ -13,8 +14,9 @@ interface KInterface { fun superCall() = Thread.currentThread().getStackTrace().map { it.className + "." + it.methodName } } -// FILE: main.kt +// MODULE: main(lib) // !JVM_DEFAULT_MODE: all +// FILE: main.kt interface KInterface2 : KInterface { override fun superCall() = super.superCall() } diff --git a/compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/superCall.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/superCall.kt similarity index 90% rename from compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/superCall.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/superCall.kt index 18329abfac4..e45d20cbedb 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/superCall.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/superCall.kt @@ -1,6 +1,7 @@ // !JVM_DEFAULT_MODE: enable // JVM_TARGET: 1.8 // WITH_RUNTIME +// MODULE: lib // FILE: 1.kt interface Test { @JvmDefault @@ -9,6 +10,7 @@ interface Test { } } +// MODULE: main(lib) // FILE: 2.kt class TestClass : Test { override fun test(): String { diff --git a/compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/superCallFromInterface.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/superCallFromInterface.kt similarity index 90% rename from compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/superCallFromInterface.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/superCallFromInterface.kt index 18d9fd5ad8b..4317facf0e8 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/superCallFromInterface.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/superCallFromInterface.kt @@ -1,6 +1,7 @@ // !JVM_DEFAULT_MODE: enable // JVM_TARGET: 1.8 // WITH_RUNTIME +// MODULE: lib // FILE: 1.kt interface Test { @JvmDefault @@ -9,6 +10,7 @@ interface Test { } } +// MODULE: main(lib) // FILE: 2.kt interface Test2 : Test { diff --git a/compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/superCallFromInterface2.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/superCallFromInterface2.kt similarity index 92% rename from compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/superCallFromInterface2.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/superCallFromInterface2.kt index 694274ca7f0..4008ef316d6 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/superCallFromInterface2.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/superCallFromInterface2.kt @@ -1,6 +1,7 @@ // !JVM_DEFAULT_MODE: enable // JVM_TARGET: 1.8 // WITH_RUNTIME +// MODULE: lib // FILE: 1.kt interface Test { @JvmDefault @@ -13,6 +14,7 @@ interface Test { } } +// MODULE: main(lib) // FILE: 2.kt interface Test2 : Test { diff --git a/compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/superPropAccess.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/superPropAccess.kt similarity index 90% rename from compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/superPropAccess.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/superPropAccess.kt index eee1b61a93e..0b7a1adc24d 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/superPropAccess.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/superPropAccess.kt @@ -2,6 +2,7 @@ // !JVM_DEFAULT_MODE: enable // JVM_TARGET: 1.8 // WITH_RUNTIME +// MODULE: lib // FILE: 1.kt interface Test { @JvmDefault @@ -9,6 +10,7 @@ interface Test { get() = "OK" } +// MODULE: main(lib) // FILE: 2.kt class TestClass : Test { override val prop: String diff --git a/compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/superPropAccessFromInterface.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/superPropAccessFromInterface.kt similarity index 90% rename from compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/superPropAccessFromInterface.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/superPropAccessFromInterface.kt index a41174e6cf3..c3561e2e0cd 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/superPropAccessFromInterface.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/superPropAccessFromInterface.kt @@ -2,6 +2,7 @@ // !JVM_DEFAULT_MODE: enable // JVM_TARGET: 1.8 // WITH_RUNTIME +// MODULE: lib // FILE: 1.kt interface Test { @JvmDefault @@ -9,6 +10,7 @@ interface Test { get() = "OK" } +// MODULE: main(lib) // FILE: 2.kt interface Test2 : Test { @JvmDefault diff --git a/compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/superPropAccessFromInterface2.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/superPropAccessFromInterface2.kt similarity index 92% rename from compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/superPropAccessFromInterface2.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/superPropAccessFromInterface2.kt index 17a7a2e5146..6a7ac09d6f6 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/superPropAccessFromInterface2.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/superPropAccessFromInterface2.kt @@ -2,6 +2,7 @@ // !JVM_DEFAULT_MODE: enable // JVM_TARGET: 1.8 // WITH_RUNTIME +// MODULE: lib // FILE: 1.kt interface Test { @JvmDefault @@ -12,6 +13,7 @@ interface Test { get() = "OK" } +// MODULE: main(lib) // FILE: 2.kt interface Test2 : Test { @JvmDefault diff --git a/compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/delegation/diamond.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/jvm8against6/delegation/diamond.kt similarity index 93% rename from compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/delegation/diamond.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/jvm8against6/delegation/diamond.kt index 15e6faacc1d..d7fdbc19216 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/delegation/diamond.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/jvm8against6/delegation/diamond.kt @@ -1,4 +1,5 @@ // !JVM_DEFAULT_MODE: enable +// MODULE: lib // FILE: 1.kt interface Test { fun test(): String { @@ -6,9 +7,10 @@ interface Test { } } -// FILE: 2.kt +// MODULE: main(lib) // JVM_TARGET: 1.8 // WITH_RUNTIME +// FILE: 2.kt interface Test2 : Test { @JvmDefault override fun test(): String { diff --git a/compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/delegation/diamond2.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/jvm8against6/delegation/diamond2.kt similarity index 93% rename from compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/delegation/diamond2.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/jvm8against6/delegation/diamond2.kt index 3ba7991a9b3..e3e7073effc 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/delegation/diamond2.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/jvm8against6/delegation/diamond2.kt @@ -1,4 +1,5 @@ // !JVM_DEFAULT_MODE: enable +// MODULE: lib // FILE: 1.kt interface Test { fun test(): String { @@ -6,9 +7,10 @@ interface Test { } } -// FILE: 2.kt +// MODULE: main(lib) // JVM_TARGET: 1.8 // WITH_RUNTIME +// FILE: 2.kt open class TestClass : Test { override fun test(): String { return super.test() diff --git a/compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/delegation/diamond3.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/jvm8against6/delegation/diamond3.kt similarity index 93% rename from compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/delegation/diamond3.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/jvm8against6/delegation/diamond3.kt index 0abbf2d98ea..3840ffc72b6 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/delegation/diamond3.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/jvm8against6/delegation/diamond3.kt @@ -1,4 +1,5 @@ // !JVM_DEFAULT_MODE: enable +// MODULE: lib // FILE: 1.kt interface Test { fun test(): String { @@ -6,9 +7,10 @@ interface Test { } } -// FILE: 2.kt +// MODULE: main(lib) // JVM_TARGET: 1.8 // WITH_RUNTIME +// FILE: 2.kt abstract class TestClass : Test { abstract override fun test(): String } diff --git a/compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/jdk8Against6.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/jvm8against6/jdk8Against6.kt similarity index 91% rename from compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/jdk8Against6.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/jvm8against6/jdk8Against6.kt index a2b985bfd01..7b27a77f915 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/jdk8Against6.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/jvm8against6/jdk8Against6.kt @@ -1,4 +1,6 @@ // SKIP_JDK6 +// FULL_JDK +// MODULE: lib // FILE: A.kt import java.util.* class Jdk6List : AbstractList() { @@ -11,8 +13,8 @@ class Jdk6List : AbstractList() { } +// MODULE: main(lib) // FILE: B.kt -// FULL_JDK fun box(): String { val result = Jdk6List().stream().filter { it == "OK" }.count() diff --git a/compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/simpleCall.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/jvm8against6/simpleCall.kt similarity index 88% rename from compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/simpleCall.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/jvm8against6/simpleCall.kt index eceedef8df0..c3cb58b5d95 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/simpleCall.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/jvm8against6/simpleCall.kt @@ -1,3 +1,4 @@ +// MODULE: lib // FILE: 1.kt interface Test { @@ -6,8 +7,9 @@ interface Test { } } -// FILE: 2.kt +// MODULE: main(lib) // JVM_TARGET: 1.8 +// FILE: 2.kt class TestClass : Test { override fun test(): String { return super.test() diff --git a/compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/simpleCallWithBigHierarchy.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/jvm8against6/simpleCallWithBigHierarchy.kt similarity index 91% rename from compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/simpleCallWithBigHierarchy.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/jvm8against6/simpleCallWithBigHierarchy.kt index 1fa4e6dc2ac..4e1d2e5790e 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/simpleCallWithBigHierarchy.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/jvm8against6/simpleCallWithBigHierarchy.kt @@ -1,4 +1,5 @@ // !JVM_DEFAULT_MODE: enable +// MODULE: lib // FILE: 1.kt interface Test { fun test(): String { @@ -6,9 +7,10 @@ interface Test { } } -// FILE: 2.kt +// MODULE: main(lib) // JVM_TARGET: 1.8 // WITH_RUNTIME +// FILE: 2.kt interface Test2 : Test { @JvmDefault override fun test(): String { diff --git a/compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/simpleCallWithHierarchy.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/jvm8against6/simpleCallWithHierarchy.kt similarity index 90% rename from compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/simpleCallWithHierarchy.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/jvm8against6/simpleCallWithHierarchy.kt index 9dc14e651bb..e6efeea1e54 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/simpleCallWithHierarchy.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/jvm8against6/simpleCallWithHierarchy.kt @@ -1,4 +1,5 @@ // !JVM_DEFAULT_MODE: enable +// MODULE: lib // FILE: 1.kt interface Test { @@ -7,9 +8,10 @@ interface Test { } } -// FILE: 2.kt +// MODULE: main(lib) // JVM_TARGET: 1.8 // WITH_RUNTIME +// FILE: 2.kt interface Test2 : Test { @JvmDefault override fun test(): String { diff --git a/compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/simpleProp.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/jvm8against6/simpleProp.kt similarity index 87% rename from compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/simpleProp.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/jvm8against6/simpleProp.kt index ce7cdd97a93..17c1d1183dc 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/simpleProp.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/jvm8against6/simpleProp.kt @@ -1,3 +1,4 @@ +// MODULE: lib // FILE: 1.kt interface Test { @@ -5,8 +6,9 @@ interface Test { get() = "OK" } -// FILE: 2.kt +// MODULE: main(lib) // JVM_TARGET: 1.8 +// FILE: 2.kt class TestClass : Test { override val test: String get() = super.test diff --git a/compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/simplePropWithHierarchy.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/jvm8against6/simplePropWithHierarchy.kt similarity index 90% rename from compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/simplePropWithHierarchy.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/jvm8against6/simplePropWithHierarchy.kt index 33b52cd6de6..037829a113b 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/simplePropWithHierarchy.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/jvm8against6/simplePropWithHierarchy.kt @@ -1,4 +1,5 @@ // !JVM_DEFAULT_MODE: enable +// MODULE: lib // FILE: 1.kt interface Test { @@ -6,9 +7,10 @@ interface Test { get() = "OK" } -// FILE: 2.kt +// MODULE: main(lib) // JVM_TARGET: 1.8 // WITH_RUNTIME +// FILE: 2.kt interface Test2 : Test { @JvmDefault override val test: String diff --git a/compiler/testData/compileKotlinAgainstKotlin/jvmField.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvmField.kt similarity index 89% rename from compiler/testData/compileKotlinAgainstKotlin/jvmField.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvmField.kt index d1b7412e933..aec5b7cfafd 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/jvmField.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvmField.kt @@ -1,5 +1,8 @@ // IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM +// WITH_STDLIB + +// MODULE: lib // FILE: A.kt open class A { @@ -12,6 +15,7 @@ open class B : A() { } +// MODULE: main()(lib) // FILE: B.kt open class C : B() { diff --git a/compiler/testData/compileKotlinAgainstKotlin/jvmFieldInAnnotationCompanion.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvmFieldInAnnotationCompanion.kt similarity index 90% rename from compiler/testData/compileKotlinAgainstKotlin/jvmFieldInAnnotationCompanion.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvmFieldInAnnotationCompanion.kt index 26741f1dda1..71e9a49baf4 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/jvmFieldInAnnotationCompanion.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvmFieldInAnnotationCompanion.kt @@ -1,7 +1,8 @@ // !LANGUAGE: +JvmFieldInInterface +NestedClassesInAnnotations // TARGET_BACKEND: JVM - // WITH_RUNTIME + +// MODULE: lib // FILE: Foo.kt public class Bar(public val value: String) @@ -13,7 +14,7 @@ annotation class Foo { } } - +// MODULE: main(lib) // FILE: bar.kt fun box(): String { diff --git a/compiler/testData/compileKotlinAgainstKotlin/jvmFieldInConstructor.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvmFieldInConstructor.kt similarity index 89% rename from compiler/testData/compileKotlinAgainstKotlin/jvmFieldInConstructor.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvmFieldInConstructor.kt index 0cde2a5ceb2..a4890317980 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/jvmFieldInConstructor.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvmFieldInConstructor.kt @@ -1,5 +1,8 @@ // IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM +// WITH_STDLIB + +// MODULE: lib // FILE: A.kt open class A(@JvmField public val publicField: String = "1", @@ -8,6 +11,7 @@ open class A(@JvmField public val publicField: String = "1", open class B : A() +// MODULE: main()(lib) // FILE: B.kt open class C : B() { diff --git a/compiler/testData/compileKotlinAgainstKotlin/jvmFieldInInterfaceCompanion.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvmFieldInInterfaceCompanion.kt similarity index 89% rename from compiler/testData/compileKotlinAgainstKotlin/jvmFieldInInterfaceCompanion.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvmFieldInInterfaceCompanion.kt index f99d3fec96a..f4942394fca 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/jvmFieldInInterfaceCompanion.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvmFieldInInterfaceCompanion.kt @@ -1,7 +1,8 @@ // !LANGUAGE: +JvmFieldInInterface // TARGET_BACKEND: JVM - // WITH_RUNTIME + +// MODULE: lib // FILE: Foo.kt public class Bar(public val value: String) @@ -13,7 +14,7 @@ interface Foo { } } - +// MODULE: main(lib) // FILE: bar.kt fun box(): String { diff --git a/compiler/testData/compileKotlinAgainstKotlin/jvmNames.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvmNames.kt similarity index 88% rename from compiler/testData/compileKotlinAgainstKotlin/jvmNames.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvmNames.kt index 88011ca28c9..f6e9815858a 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/jvmNames.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvmNames.kt @@ -1,4 +1,9 @@ +// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM +// WITH_STDLIB +// WITH_REFLECT + +// MODULE: lib // FILE: A.kt package lib @@ -24,6 +29,7 @@ open class A { annotation class Anno(@get:JvmName("uglyJvmName") val value: String) +// MODULE: main(lib) // FILE: B.kt import lib.* diff --git a/compiler/testData/compileKotlinAgainstKotlin/jvmPackageName.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvmPackageName.kt similarity index 81% rename from compiler/testData/compileKotlinAgainstKotlin/jvmPackageName.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvmPackageName.kt index 8cc09416ed6..77b05692b11 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/jvmPackageName.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvmPackageName.kt @@ -1,4 +1,8 @@ +// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM +// WITH_STDLIB + +// MODULE: lib // FILE: A.kt @file:Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE") @@ -11,6 +15,7 @@ var v: Int = 1 inline fun i(block: () -> Unit) = block() +// MODULE: main(lib) // FILE: B.kt import foo.* diff --git a/compiler/testData/compileKotlinAgainstKotlin/jvmPackageNameInRootPackage.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvmPackageNameInRootPackage.kt similarity index 75% rename from compiler/testData/compileKotlinAgainstKotlin/jvmPackageNameInRootPackage.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvmPackageNameInRootPackage.kt index 7cf60d73870..99bb9a443a9 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/jvmPackageNameInRootPackage.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvmPackageNameInRootPackage.kt @@ -1,4 +1,8 @@ +// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM +// WITH_STDLIB + +// MODULE: lib // FILE: A.kt @file:Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE") @@ -8,6 +12,7 @@ fun f() = "OK" var v: Int = 1 +// MODULE: main(lib) // FILE: B.kt fun box(): String { diff --git a/compiler/testData/compileKotlinAgainstKotlin/jvmPackageNameMultifileClass.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvmPackageNameMultifileClass.kt similarity index 86% rename from compiler/testData/compileKotlinAgainstKotlin/jvmPackageNameMultifileClass.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvmPackageNameMultifileClass.kt index fc80cf8849d..73bb3d1ee5d 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/jvmPackageNameMultifileClass.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvmPackageNameMultifileClass.kt @@ -1,6 +1,8 @@ +// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM // WITH_RUNTIME +// MODULE: lib // FILE: A.kt @file:Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @@ -17,6 +19,7 @@ val g: S? get() = f().substring(0, 0) + "K" inline fun i(block: () -> T): T = block() +// MODULE: main(lib) // FILE: B.kt import foo.bar.* diff --git a/compiler/testData/compileKotlinAgainstKotlin/jvmPackageNameWithJvmName.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvmPackageNameWithJvmName.kt similarity index 78% rename from compiler/testData/compileKotlinAgainstKotlin/jvmPackageNameWithJvmName.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvmPackageNameWithJvmName.kt index 29bcde0e05b..0fbd87621b3 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/jvmPackageNameWithJvmName.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvmPackageNameWithJvmName.kt @@ -1,4 +1,8 @@ +// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM +// MODULE: lib +// WITH_STDLIB + // FILE: A.kt @file:Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE") @@ -10,6 +14,7 @@ fun f() = "OK" var v: Int = 1 +// MODULE: main(lib) // FILE: B.kt import foo.* diff --git a/compiler/testData/compileKotlinAgainstKotlin/jvmStaticInObject.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvmStaticInObject.kt similarity index 80% rename from compiler/testData/compileKotlinAgainstKotlin/jvmStaticInObject.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvmStaticInObject.kt index 5e67b2cd53a..ba1db15ee7a 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/jvmStaticInObject.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvmStaticInObject.kt @@ -1,4 +1,7 @@ // TARGET_BACKEND: JVM +// WITH_STDLIB + +// MODULE: lib // FILE: A.kt package aaa @@ -10,6 +13,7 @@ public object TestObject { public val test: String = "OK" } +// MODULE: main(lib) // FILE: B.kt fun box(): String { diff --git a/compiler/testData/compileKotlinAgainstKotlin/jvmStaticInObjectPropertyReference.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvmStaticInObjectPropertyReference.kt similarity index 97% rename from compiler/testData/compileKotlinAgainstKotlin/jvmStaticInObjectPropertyReference.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvmStaticInObjectPropertyReference.kt index e8734ec9544..2ad4cfe9e5a 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/jvmStaticInObjectPropertyReference.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvmStaticInObjectPropertyReference.kt @@ -1,6 +1,7 @@ // TARGET_BACKEND: JVM // IGNORE_BACKEND_FIR: JVM_IR // WITH_RUNTIME +// MODULE: lib // FILE: A.kt object Host { @@ -30,6 +31,7 @@ object Host { set(value) { field = value } } +// MODULE: main(lib) // FILE: B.kt import kotlin.reflect.* diff --git a/compiler/testData/compileKotlinAgainstKotlin/kotlinPropertyAsAnnotationParameter.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/kotlinPropertyAsAnnotationParameter.kt similarity index 96% rename from compiler/testData/compileKotlinAgainstKotlin/kotlinPropertyAsAnnotationParameter.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/kotlinPropertyAsAnnotationParameter.kt index a43165004f0..443e8b77a8f 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/kotlinPropertyAsAnnotationParameter.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/kotlinPropertyAsAnnotationParameter.kt @@ -1,4 +1,5 @@ // TARGET_BACKEND: JVM +// MODULE: lib // FILE: A.kt package a @@ -23,6 +24,7 @@ const val bool2 = bool const val c2 = c const val str2 = str +// MODULE: main(lib) // FILE: B.kt import a.* diff --git a/compiler/testData/compileKotlinAgainstKotlin/kt14012.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/kt14012.kt similarity index 83% rename from compiler/testData/compileKotlinAgainstKotlin/kt14012.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/kt14012.kt index 71da17120c4..2b90f2170a6 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/kt14012.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/kt14012.kt @@ -1,3 +1,4 @@ +// MODULE: lib // FILE: A.kt package test @@ -8,6 +9,7 @@ fun test() { property = "OK" } +// MODULE: main(lib) // FILE: B.kt import test.* diff --git a/compiler/testData/compileKotlinAgainstKotlin/kt14012_multi.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/kt14012_multi.kt similarity index 83% rename from compiler/testData/compileKotlinAgainstKotlin/kt14012_multi.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/kt14012_multi.kt index 79d2cf612d8..93ff37f8daf 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/kt14012_multi.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/kt14012_multi.kt @@ -1,4 +1,7 @@ // TARGET_BACKEND: JVM +// WITH_STDLIB + +// MODULE: lib // FILE: A.kt @file:JvmName("TTest") @file:JvmMultifileClass @@ -11,6 +14,7 @@ fun test() { property = "OK" } +// MODULE: main(lib) // FILE: B.kt import test.* diff --git a/compiler/testData/compileKotlinAgainstKotlin/kt21775.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/kt21775.kt similarity index 95% rename from compiler/testData/compileKotlinAgainstKotlin/kt21775.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/kt21775.kt index a683731e927..6e10ac5153b 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/kt21775.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/kt21775.kt @@ -1,3 +1,4 @@ +// MODULE: lib // FILE: lib.kt package lib @@ -26,7 +27,7 @@ class CreateEmployeeUseCaseAccessor { } } - +// MODULE: main(lib) // FILE: main.kt import lib.* @@ -40,4 +41,4 @@ class CreateEmployeeUseCaseTest { fun box(): String { return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/compileKotlinAgainstKotlin/metadataForMembersInLocalClassInInitializer.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/metadataForMembersInLocalClassInInitializer.kt similarity index 89% rename from compiler/testData/compileKotlinAgainstKotlin/metadataForMembersInLocalClassInInitializer.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/metadataForMembersInLocalClassInInitializer.kt index 07a8a23d5d8..3ed9664d4c8 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/metadataForMembersInLocalClassInInitializer.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/metadataForMembersInLocalClassInInitializer.kt @@ -1,5 +1,9 @@ // IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM +// WITH_STDLIB +// WITH_REFLECT + +// MODULE: lib // FILE: A.kt class A { @@ -14,6 +18,7 @@ class A { } } +// MODULE: main(lib) // FILE: B.kt import kotlin.reflect.full.* diff --git a/compiler/testData/compileKotlinAgainstKotlin/multifileClassInlineFunctionAccessingProperty.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/multifileClassInlineFunctionAccessingProperty.kt similarity index 81% rename from compiler/testData/compileKotlinAgainstKotlin/multifileClassInlineFunctionAccessingProperty.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/multifileClassInlineFunctionAccessingProperty.kt index 467db537c76..e5f4cd71792 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/multifileClassInlineFunctionAccessingProperty.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/multifileClassInlineFunctionAccessingProperty.kt @@ -1,4 +1,7 @@ // TARGET_BACKEND: JVM +// WITH_STDLIB + +// MODULE: lib // FILE: A.kt @file:[JvmName("Test") JvmMultifileClass] @@ -8,6 +11,7 @@ val property = "K" inline fun K(body: () -> String): String = body() + property +// MODULE: main(lib) // FILE: B.kt fun box(): String { diff --git a/compiler/testData/compileKotlinAgainstKotlin/multifileClassWithTypealias.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/multifileClassWithTypealias.kt similarity index 81% rename from compiler/testData/compileKotlinAgainstKotlin/multifileClassWithTypealias.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/multifileClassWithTypealias.kt index 3fe812ecce0..4cb6085da7f 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/multifileClassWithTypealias.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/multifileClassWithTypealias.kt @@ -1,4 +1,7 @@ // TARGET_BACKEND: JVM +// WITH_STDLIB + +// MODULE: lib // FILE: A.kt @file:[JvmName("Test") JvmMultifileClass] @@ -6,6 +9,7 @@ typealias S = String typealias LS = List +// MODULE: main(lib) // FILE: B.kt import java.util.Arrays diff --git a/compiler/testData/compileKotlinAgainstKotlin/nestedClass.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/nestedClass.kt similarity index 79% rename from compiler/testData/compileKotlinAgainstKotlin/nestedClass.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/nestedClass.kt index 52d14e6357d..c2dc25ddd2a 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/nestedClass.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/nestedClass.kt @@ -1,3 +1,4 @@ +// MODULE: lib // FILE: A.kt package aaa @@ -8,6 +9,7 @@ class A { } } +// MODULE: main(lib) // FILE: B.kt fun box(): String { diff --git a/compiler/testData/compileKotlinAgainstKotlin/nestedClassInAnnotationArgument.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/nestedClassInAnnotationArgument.kt similarity index 94% rename from compiler/testData/compileKotlinAgainstKotlin/nestedClassInAnnotationArgument.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/nestedClassInAnnotationArgument.kt index fcf207eb5be..29b87a9af70 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/nestedClassInAnnotationArgument.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/nestedClassInAnnotationArgument.kt @@ -1,3 +1,4 @@ +// MODULE: lib // FILE: 1.kt import kotlin.reflect.* @@ -32,6 +33,7 @@ interface I { fun foo(): String = "OK" } +// MODULE: main(lib) // FILE: 2.kt class D : I { diff --git a/compiler/testData/compileKotlinAgainstKotlin/nestedEnum.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/nestedEnum.kt similarity index 85% rename from compiler/testData/compileKotlinAgainstKotlin/nestedEnum.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/nestedEnum.kt index 678e8d191a0..e5ef9e1f522 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/nestedEnum.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/nestedEnum.kt @@ -1,3 +1,4 @@ +// MODULE: lib // FILE: A.kt package aaa @@ -8,6 +9,7 @@ class A { } } +// MODULE: main(lib) // FILE: B.kt fun box(): String { diff --git a/compiler/testData/compileKotlinAgainstKotlin/nestedFunctionTypeAliasExpansion.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/nestedFunctionTypeAliasExpansion.kt similarity index 87% rename from compiler/testData/compileKotlinAgainstKotlin/nestedFunctionTypeAliasExpansion.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/nestedFunctionTypeAliasExpansion.kt index dd56222f2ed..b4ba537726a 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/nestedFunctionTypeAliasExpansion.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/nestedFunctionTypeAliasExpansion.kt @@ -1,3 +1,4 @@ +// MODULE: lib // FILE: lib.kt package lib @@ -7,6 +8,7 @@ typealias Effect = (Dispatch) -> Unit fun noEffect(): Effect = TODO() +// MODULE: main(lib) // FILE: main.kt import lib.* @@ -14,4 +16,4 @@ import lib.* fun box(): String { val s = { noEffect() } return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/compileKotlinAgainstKotlin/nestedObject.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/nestedObject.kt similarity index 79% rename from compiler/testData/compileKotlinAgainstKotlin/nestedObject.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/nestedObject.kt index a338168c8fd..3afae8dfe64 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/nestedObject.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/nestedObject.kt @@ -1,3 +1,4 @@ +// MODULE: lib // FILE: A.kt package aaa @@ -8,6 +9,7 @@ class A { } } +// MODULE: main(lib) // FILE: B.kt fun box(): String { diff --git a/compiler/testData/compileKotlinAgainstKotlin/nestedTypeAliasExpansion.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/nestedTypeAliasExpansion.kt similarity index 86% rename from compiler/testData/compileKotlinAgainstKotlin/nestedTypeAliasExpansion.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/nestedTypeAliasExpansion.kt index 4ec42b0eb62..52023fb3b80 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/nestedTypeAliasExpansion.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/nestedTypeAliasExpansion.kt @@ -1,3 +1,4 @@ +// MODULE: lib // FILE: lib.kt package lib @@ -9,6 +10,7 @@ typealias B = Inv> fun materialize(): B? = null +// MODULE: main(lib) // FILE: main.kt import lib.* @@ -16,4 +18,4 @@ import lib.* fun box(): String { val s = { materialize() } return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/compileKotlinAgainstKotlin/noExplicitOverrideForDelegatedFromSupertype.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/noExplicitOverrideForDelegatedFromSupertype.kt similarity index 89% rename from compiler/testData/compileKotlinAgainstKotlin/noExplicitOverrideForDelegatedFromSupertype.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/noExplicitOverrideForDelegatedFromSupertype.kt index 9999f9323ba..81caf1dc6bb 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/noExplicitOverrideForDelegatedFromSupertype.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/noExplicitOverrideForDelegatedFromSupertype.kt @@ -1,4 +1,5 @@ // TARGET_BACKEND: JVM +// MODULE: lib // FILE: A.kt package a @@ -8,6 +9,7 @@ interface Named { interface A : Named +// MODULE: main(lib) // FILE: B.kt import a.* diff --git a/compiler/testData/compileKotlinAgainstKotlin/optionalAnnotation.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/optionalAnnotation.kt similarity index 91% rename from compiler/testData/compileKotlinAgainstKotlin/optionalAnnotation.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/optionalAnnotation.kt index 0af7b987b29..a91d6325f44 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/optionalAnnotation.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/optionalAnnotation.kt @@ -1,7 +1,11 @@ +// IGNORE_BACKEND_FIR: JVM_IR // !LANGUAGE: +MultiPlatformProjects // !USE_EXPERIMENTAL: kotlin.ExperimentalMultiplatform // TARGET_BACKEND: JVM // FULL_JDK +// WITH_STDLIB + +// MODULE: lib // FILE: A.kt package a @@ -13,6 +17,7 @@ expect annotation class B(val s: String) actual annotation class A(actual val x: Int) +// MODULE: main(lib) // FILE: B.kt @file:Suppress("OPTIONAL_DECLARATION_USAGE_IN_NON_COMMON_SOURCE") // TODO: support common sources in the test infrastructure diff --git a/compiler/testData/compileKotlinAgainstKotlin/platformTypes.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/platformTypes.kt similarity index 95% rename from compiler/testData/compileKotlinAgainstKotlin/platformTypes.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/platformTypes.kt index 0dc58020a8b..e7341bea820 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/platformTypes.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/platformTypes.kt @@ -1,4 +1,5 @@ // TARGET_BACKEND: JVM +// MODULE: lib // FILE: A.kt package test @@ -9,6 +10,7 @@ fun printStream() = System.out fun list() = Collections.emptyList() fun array(a: Array) = Arrays.copyOf(a, 2) +// MODULE: main(lib) // FILE: B.kt import java.io.PrintStream diff --git a/compiler/testData/compileKotlinAgainstKotlin/privateCompanionObjectValInDifferentModule.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/privateCompanionObjectValInDifferentModule.kt similarity index 91% rename from compiler/testData/compileKotlinAgainstKotlin/privateCompanionObjectValInDifferentModule.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/privateCompanionObjectValInDifferentModule.kt index 605479aee50..d072ac712a0 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/privateCompanionObjectValInDifferentModule.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/privateCompanionObjectValInDifferentModule.kt @@ -2,6 +2,7 @@ // IGNORE_BACKEND: JS_IR, JS, NATIVE // WITH_REFLECT +// MODULE: lib // FILE: A.kt package a @@ -16,6 +17,7 @@ class Host { } } +// MODULE: main(lib) // FILE: B.kt import a.* diff --git a/compiler/testData/compileKotlinAgainstKotlin/privateCompanionObjectValInDifferentModuleOldMangling.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/privateCompanionObjectValInDifferentModuleOldMangling.kt similarity index 83% rename from compiler/testData/compileKotlinAgainstKotlin/privateCompanionObjectValInDifferentModuleOldMangling.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/privateCompanionObjectValInDifferentModuleOldMangling.kt index 221f80cde62..3bd80bf3e08 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/privateCompanionObjectValInDifferentModuleOldMangling.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/privateCompanionObjectValInDifferentModuleOldMangling.kt @@ -3,8 +3,9 @@ // IGNORE_BACKEND: JS_IR, JS, NATIVE // WITH_REFLECT +// MODULE: lib +// USE_OLD_INLINE_CLASSES_MANGLING_SCHEME // FILE: A.kt -// KOTLIN_CONFIGURATION_FLAGS: +JVM.USE_OLD_INLINE_CLASSES_MANGLING_SCHEME package a import kotlin.reflect.jvm.isAccessible @@ -18,6 +19,7 @@ class Host { } } +// MODULE: main(lib) // FILE: B.kt import a.* diff --git a/compiler/testData/compileKotlinAgainstKotlin/privateTopLevelValInDifferentModule.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/privateTopLevelValInDifferentModule.kt similarity index 89% rename from compiler/testData/compileKotlinAgainstKotlin/privateTopLevelValInDifferentModule.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/privateTopLevelValInDifferentModule.kt index 3b2fdc6c24d..be5ef9a2dc1 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/privateTopLevelValInDifferentModule.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/privateTopLevelValInDifferentModule.kt @@ -2,6 +2,7 @@ // IGNORE_BACKEND: JS_IR, JS, NATIVE // WITH_REFLECT +// MODULE: lib // FILE: A.kt package a @@ -13,6 +14,7 @@ private val ok = S("OK") val ref = ::ok.apply { isAccessible = true } +// MODULE: main(lib) // FILE: B.kt import a.* diff --git a/compiler/testData/compileKotlinAgainstKotlin/privateTopLevelValInDifferentModuleOldMangling.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/privateTopLevelValInDifferentModuleOldMangling.kt similarity index 74% rename from compiler/testData/compileKotlinAgainstKotlin/privateTopLevelValInDifferentModuleOldMangling.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/privateTopLevelValInDifferentModuleOldMangling.kt index 0479520d631..13f01a8f87f 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/privateTopLevelValInDifferentModuleOldMangling.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/privateTopLevelValInDifferentModuleOldMangling.kt @@ -3,8 +3,9 @@ // IGNORE_BACKEND: JS_IR, JS, NATIVE // WITH_REFLECT +// MODULE: lib +// USE_OLD_INLINE_CLASSES_MANGLING_SCHEME // FILE: A.kt -// KOTLIN_CONFIGURATION_FLAGS: +JVM.USE_OLD_INLINE_CLASSES_MANGLING_SCHEME package a import kotlin.reflect.jvm.isAccessible @@ -15,7 +16,8 @@ private val ok = S("OK") val ref = ::ok.apply { isAccessible = true } +// MODULE: main(lib) // FILE: B.kt import a.* -fun box() = ref.call().s \ No newline at end of file +fun box() = ref.call().s diff --git a/compiler/testData/compileKotlinAgainstKotlin/propertyReference.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/propertyReference.kt similarity index 92% rename from compiler/testData/compileKotlinAgainstKotlin/propertyReference.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/propertyReference.kt index 35bdea51241..3d398ca9d5a 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/propertyReference.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/propertyReference.kt @@ -1,3 +1,4 @@ +// MODULE: lib // FILE: A.kt package a @@ -7,6 +8,7 @@ public var topLevel: Int = 42 public val String.extension: Long get() = length.toLong() +// MODULE: main(lib) // FILE: B.kt import a.* diff --git a/compiler/testData/compileKotlinAgainstKotlin/recursiveGeneric.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/recursiveGeneric.kt similarity index 85% rename from compiler/testData/compileKotlinAgainstKotlin/recursiveGeneric.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/recursiveGeneric.kt index 36e8135d592..948af9ada40 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/recursiveGeneric.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/recursiveGeneric.kt @@ -1,4 +1,8 @@ +// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM +// WITH_STDLIB +// FULL_JDK +// MODULE: lib // FILE: A.kt package a @@ -11,6 +15,7 @@ interface Super { fun foo(p: Rec<*, *>) = p.t() } +// MODULE: main(lib) // FILE: B.kt import a.* diff --git a/compiler/testData/compileKotlinAgainstKotlin/reflectTopLevelFunctionOtherFile.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/reflectTopLevelFunctionOtherFile.kt similarity index 84% rename from compiler/testData/compileKotlinAgainstKotlin/reflectTopLevelFunctionOtherFile.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/reflectTopLevelFunctionOtherFile.kt index 4c6721a4750..b021228d93a 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/reflectTopLevelFunctionOtherFile.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/reflectTopLevelFunctionOtherFile.kt @@ -1,11 +1,14 @@ +// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM // WITH_REFLECT +// MODULE: lib // FILE: A.kt fun test() { } +// MODULE: main(lib) // FILE: B.kt import kotlin.reflect.jvm.javaMethod diff --git a/compiler/testData/compileKotlinAgainstKotlin/sealedClass.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/sealedClass.kt similarity index 95% rename from compiler/testData/compileKotlinAgainstKotlin/sealedClass.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/sealedClass.kt index dff0e486a51..e8683cc1e18 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/sealedClass.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/sealedClass.kt @@ -1,3 +1,4 @@ +// MODULE: lib // FILE: A.kt package a @@ -13,6 +14,7 @@ sealed class NestedAndTopLevel { } class TopLevel : NestedAndTopLevel() +// MODULE: main(lib) // FILE: B.kt import a.* diff --git a/compiler/testData/compileKotlinAgainstKotlin/secondaryConstructors.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/secondaryConstructors.kt similarity index 95% rename from compiler/testData/compileKotlinAgainstKotlin/secondaryConstructors.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/secondaryConstructors.kt index 4fa277472d8..143c007dbb8 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/secondaryConstructors.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/secondaryConstructors.kt @@ -1,3 +1,4 @@ +// MODULE: lib // FILE: A.kt open class A { @@ -10,6 +11,7 @@ open class A { } } +// MODULE: main(lib) // FILE: B.kt class B1() : A("123") { diff --git a/compiler/testData/compileKotlinAgainstKotlin/simple.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/simple.kt similarity index 82% rename from compiler/testData/compileKotlinAgainstKotlin/simple.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/simple.kt index 2a74fe2aba4..ccd2fe3ca56 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/simple.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/simple.kt @@ -1,9 +1,11 @@ +// MODULE: lib // FILE: A.kt package aaa fun hello() = 17 +// MODULE: main(lib) // FILE: B.kt fun box(): String { diff --git a/compiler/testData/compileKotlinAgainstKotlin/simpleValAnonymousObject.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/simpleValAnonymousObject.kt similarity index 88% rename from compiler/testData/compileKotlinAgainstKotlin/simpleValAnonymousObject.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/simpleValAnonymousObject.kt index 4d6fc957ea0..25eee755cb8 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/simpleValAnonymousObject.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/simpleValAnonymousObject.kt @@ -1,3 +1,4 @@ +// MODULE: lib // FILE: A.kt package pkg @@ -10,6 +11,7 @@ interface ClassA { } } +// MODULE: main(lib) // FILE: B.kt import pkg.ClassA diff --git a/compiler/testData/compileKotlinAgainstKotlin/specialBridgesInDependencies.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/specialBridgesInDependencies.kt similarity index 86% rename from compiler/testData/compileKotlinAgainstKotlin/specialBridgesInDependencies.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/specialBridgesInDependencies.kt index 95828c6a4d6..c4da7c0d992 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/specialBridgesInDependencies.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/specialBridgesInDependencies.kt @@ -1,11 +1,13 @@ // IGNORE_BACKEND_FIR: JVM_IR // WITH_RUNTIME +// MODULE: lib // FILE: A.kt package a open class A : ArrayList() +// MODULE: main(lib) // FILE: B.kt import a.A diff --git a/compiler/testData/compileKotlinAgainstKotlin/starImportEnum.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/starImportEnum.kt similarity index 89% rename from compiler/testData/compileKotlinAgainstKotlin/starImportEnum.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/starImportEnum.kt index 74d9dea8fa5..31e939b7f0a 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/starImportEnum.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/starImportEnum.kt @@ -1,3 +1,4 @@ +// MODULE: lib // FILE: A.kt package aaa @@ -11,6 +12,7 @@ enum class E { } } +// MODULE: main(lib) // FILE: B.kt import aaa.E.* diff --git a/compiler/testData/compileKotlinAgainstKotlin/suspendFunWithDefaultMangling.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/suspendFunWithDefaultMangling.kt similarity index 83% rename from compiler/testData/compileKotlinAgainstKotlin/suspendFunWithDefaultMangling.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/suspendFunWithDefaultMangling.kt index 7906f56bf27..a58fa376dbf 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/suspendFunWithDefaultMangling.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/suspendFunWithDefaultMangling.kt @@ -1,5 +1,8 @@ +// IGNORE_BACKEND_FIR: JVM_IR // !LANGUAGE: +InlineClasses -// WITH_COROUTINES +// WITH_STDLIB + +// MODULE: lib // FILE: a.kt package a @@ -12,6 +15,8 @@ suspend fun foo(p: P = P("OK")) { result = p.value } +// MODULE: main(lib) +// WITH_COROUTINES // FILE: b.kt import kotlin.coroutines.* diff --git a/compiler/testData/compileKotlinAgainstKotlin/suspendFunWithDefaultOldMangling.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/suspendFunWithDefaultOldMangling.kt similarity index 77% rename from compiler/testData/compileKotlinAgainstKotlin/suspendFunWithDefaultOldMangling.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/suspendFunWithDefaultOldMangling.kt index 03d1e7e49b9..c531356ccb0 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/suspendFunWithDefaultOldMangling.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/suspendFunWithDefaultOldMangling.kt @@ -1,8 +1,10 @@ // TARGET_BACKEND: JVM +// IGNORE_BACKEND_FIR: JVM_IR // !LANGUAGE: +InlineClasses -// WITH_COROUTINES +// WITH_STDLIB +// MODULE: lib +// USE_OLD_INLINE_CLASSES_MANGLING_SCHEME // FILE: a.kt -// KOTLIN_CONFIGURATION_FLAGS: +JVM.USE_OLD_INLINE_CLASSES_MANGLING_SCHEME package a @@ -14,6 +16,8 @@ suspend fun foo(p: P = P("OK")) { result = p.value } +// MODULE: main(lib) +// WITH_COROUTINES // FILE: b.kt import kotlin.coroutines.* diff --git a/compiler/testData/compileKotlinAgainstKotlin/targetedJvmName.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/targetedJvmName.kt similarity index 79% rename from compiler/testData/compileKotlinAgainstKotlin/targetedJvmName.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/targetedJvmName.kt index 8a62410214c..1da13150cb6 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/targetedJvmName.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/targetedJvmName.kt @@ -1,4 +1,7 @@ // TARGET_BACKEND: JVM +// WITH_STDLIB + +// MODULE: lib // FILE: A.kt package lib @@ -6,10 +9,11 @@ package lib @get:JvmName("renamedGetFoo") var foo = "not set" +// MODULE: main(lib) // FILE: B.kt import lib.* fun box(): String { foo = "OK" return foo -} \ No newline at end of file +} diff --git a/compiler/testData/compileKotlinAgainstKotlin/typeAliasesKt13181.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/typeAliasesKt13181.kt similarity index 88% rename from compiler/testData/compileKotlinAgainstKotlin/typeAliasesKt13181.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/typeAliasesKt13181.kt index 101c79e0cbd..1e5d383a59a 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/typeAliasesKt13181.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/typeAliasesKt13181.kt @@ -1,3 +1,4 @@ +// MODULE: lib // FILE: A.kt typealias Bar = (T) -> String @@ -6,6 +7,7 @@ class Foo(val t: T) { fun baz(b: Bar) = b(t) } +// MODULE: main(lib) // FILE: B.kt class FooTest { fun baz(): String { diff --git a/compiler/testData/compileKotlinAgainstKotlin/typeAnnotations/implicitReturn.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/typeAnnotations/implicitReturn.kt similarity index 95% rename from compiler/testData/compileKotlinAgainstKotlin/typeAnnotations/implicitReturn.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/typeAnnotations/implicitReturn.kt index c8b117a7130..22192d5c3b9 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/typeAnnotations/implicitReturn.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/typeAnnotations/implicitReturn.kt @@ -1,9 +1,11 @@ +// IGNORE_BACKEND_FIR: JVM_IR // KOTLIN_CONFIGURATION_FLAGS: +JVM.EMIT_JVM_TYPE_ANNOTATIONS // TARGET_BACKEND: JVM // JVM_TARGET: 1.8 // WITH_REFLECT // FULL_JDK +// MODULE: lib // FILE: A.kt import java.lang.reflect.AnnotatedType @@ -15,6 +17,7 @@ annotation class TypeAnn fun bar(): @TypeAnn String = "OK" +// MODULE: main(lib) // FILE: B.kt import java.lang.reflect.AnnotatedType diff --git a/compiler/testData/compileKotlinAgainstKotlin/unsignedTypesInAnnotations.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/unsignedTypesInAnnotations.kt similarity index 90% rename from compiler/testData/compileKotlinAgainstKotlin/unsignedTypesInAnnotations.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/unsignedTypesInAnnotations.kt index 610f894ab59..017f51009de 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/unsignedTypesInAnnotations.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/unsignedTypesInAnnotations.kt @@ -1,7 +1,10 @@ // IGNORE_BACKEND_FIR: JVM_IR // IGNORE_BACKEND: NATIVE // WITH_RUNTIME +// WITH_STDLIB +// WITH_REFLECT +// MODULE: lib // FILE: A.kt @kotlin.annotation.Target(AnnotationTarget.TYPE, AnnotationTarget.FUNCTION) @@ -17,9 +20,9 @@ object ForTest { fun g(b: @Anno(ONE_UINT) String) {} } +// MODULE: main(lib) // FILE: B.kt - fun box(): String { val fResult = (ForTest::f.annotations.first() as Anno).u // force annotation deserialization if (fResult != 0u) return "Fail" @@ -30,4 +33,4 @@ fun box(): String { if (ONE_UINT != 1u) return "Fail" return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/compileKotlinAgainstKotlin/useDeserializedFunInterface.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/useDeserializedFunInterface.kt similarity index 95% rename from compiler/testData/compileKotlinAgainstKotlin/useDeserializedFunInterface.kt rename to compiler/testData/codegen/box/compileKotlinAgainstKotlin/useDeserializedFunInterface.kt index 06c13da3428..335d155a2ee 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/useDeserializedFunInterface.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/useDeserializedFunInterface.kt @@ -1,5 +1,6 @@ // !LANGUAGE: +NewInference +FunctionalInterfaceConversion +SamConversionPerArgument +SamConversionForKotlinFunctions +// MODULE: lib // FILE: A.kt fun interface KRunnable { @@ -8,6 +9,7 @@ fun interface KRunnable { fun inA(k: KRunnable): String = k.invoke() +// MODULE: main(lib) // FILE: B.kt fun inB(k: KRunnable): String = k.invoke() diff --git a/compiler/testData/codegen/boxAgainstJava/constructor/genericConstructor.kt b/compiler/testData/codegen/box/constructor/genericConstructor.kt similarity index 70% rename from compiler/testData/codegen/boxAgainstJava/constructor/genericConstructor.kt rename to compiler/testData/codegen/box/constructor/genericConstructor.kt index 5af082234f9..d8d235d76cb 100644 --- a/compiler/testData/codegen/boxAgainstJava/constructor/genericConstructor.kt +++ b/compiler/testData/codegen/box/constructor/genericConstructor.kt @@ -1,3 +1,5 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: test/Foo.java package test; @@ -6,6 +8,7 @@ public class Foo { public Foo(T number) {} } +// MODULE: main(lib) // FILE: 1.kt import test.Foo diff --git a/compiler/testData/codegen/boxAgainstJava/constructor/secondaryConstructor.kt b/compiler/testData/codegen/box/constructor/secondaryConstructor.kt similarity index 89% rename from compiler/testData/codegen/boxAgainstJava/constructor/secondaryConstructor.kt rename to compiler/testData/codegen/box/constructor/secondaryConstructor.kt index ee42097bdfa..3500cd59775 100644 --- a/compiler/testData/codegen/boxAgainstJava/constructor/secondaryConstructor.kt +++ b/compiler/testData/codegen/box/constructor/secondaryConstructor.kt @@ -1,3 +1,5 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: test/Foo.java package test; @@ -25,6 +27,7 @@ public class Foo { } } +// MODULE: main(lib) // FILE: 1.kt import test.Foo; diff --git a/compiler/testData/codegen/box/coroutines/controlFlow/doWhileWithInline.kt b/compiler/testData/codegen/box/coroutines/controlFlow/doWhileWithInline.kt new file mode 100644 index 00000000000..48939642d0c --- /dev/null +++ b/compiler/testData/codegen/box/coroutines/controlFlow/doWhileWithInline.kt @@ -0,0 +1,23 @@ +// IGNORE_BACKEND: JVM +// WITH_RUNTIME +// WITH_COROUTINES +// KT-27830 + +import helpers.EmptyContinuation +import kotlin.coroutines.* + +fun box(): String { + var result = "Fail" + suspend { + do { + go { + result = "OK" + } + } while (false) + }.startCoroutine(EmptyContinuation) + return result +} + +suspend inline fun go(block: suspend () -> Unit) { + block() +} diff --git a/compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/lambdaParameterUsed.kt b/compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/lambdaParameterUsed.kt index a29fdaff363..83929b5689c 100644 --- a/compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/lambdaParameterUsed.kt +++ b/compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/lambdaParameterUsed.kt @@ -6,7 +6,9 @@ import kotlin.coroutines.* fun box(): String = a { (::write)() } fun builder(c: suspend () -> Unit) { - c.startCoroutine(Continuation(EmptyCoroutineContext) {}) + c.startCoroutine(Continuation(EmptyCoroutineContext) { + it.getOrThrow() + }) } fun a(a: suspend Writer.() -> String): String { diff --git a/compiler/testData/codegen/box/coroutines/featureIntersection/defaultExpect.kt b/compiler/testData/codegen/box/coroutines/featureIntersection/defaultExpect.kt index ed82d02b1ba..a106146f30c 100644 --- a/compiler/testData/codegen/box/coroutines/featureIntersection/defaultExpect.kt +++ b/compiler/testData/codegen/box/coroutines/featureIntersection/defaultExpect.kt @@ -14,7 +14,9 @@ actual suspend fun withLimit(limit: Long) { } fun builder(c: suspend () -> Unit) { - c.startCoroutine(Continuation(EmptyCoroutineContext) {}) + c.startCoroutine(Continuation(EmptyCoroutineContext) { + it.getOrThrow() + }) } fun box(): String { diff --git a/compiler/testData/codegen/box/coroutines/featureIntersection/funInterface.kt b/compiler/testData/codegen/box/coroutines/featureIntersection/funInterface.kt index 7941bd85f23..933b148156a 100644 --- a/compiler/testData/codegen/box/coroutines/featureIntersection/funInterface.kt +++ b/compiler/testData/codegen/box/coroutines/featureIntersection/funInterface.kt @@ -1,8 +1,9 @@ // WITH_RUNTIME // WITH_COROUTINES -// IGNORE_BACKEND: JVM, JS_IR +// IGNORE_BACKEND: JVM // IGNORE_LIGHT_ANALYSIS // LANGUAGE: +SuspendFunctionsInFunInterfaces, +JvmIrEnabledByDefault +// SKIP_DCE_DRIVEN import helpers.* import kotlin.coroutines.* diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/genericParameterResult.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/genericParameterResult.kt new file mode 100644 index 00000000000..07d3ea72405 --- /dev/null +++ b/compiler/testData/codegen/box/coroutines/inlineClasses/genericParameterResult.kt @@ -0,0 +1,15 @@ +// WITH_RUNTIME +// IGNORE_BACKEND: JS_IR + +import kotlin.coroutines.* + +fun box(): String { + suspend { + listOf(Result.success(true)).forEach { + println(it.getOrNull()) + } + }.startCoroutine(Continuation(EmptyCoroutineContext) { + it.getOrThrow() + }) + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/coroutines/intrinsicSemantics/resultExceptionOrNullInLambda.kt b/compiler/testData/codegen/box/coroutines/intrinsicSemantics/resultExceptionOrNullInLambda.kt new file mode 100644 index 00000000000..c39a5850475 --- /dev/null +++ b/compiler/testData/codegen/box/coroutines/intrinsicSemantics/resultExceptionOrNullInLambda.kt @@ -0,0 +1,29 @@ +// WITH_RUNTIME + +import kotlin.coroutines.intrinsics.* +import kotlin.coroutines.* + +fun myRun(c: () -> Unit) { + c() +} + +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") +fun box(): String { + var contiuation: Continuation? = null + val c: suspend () -> Unit = { + suspendCoroutine { + contiuation = it + } + } + + var exception: Throwable? = null + myRun { + c.startCoroutineUninterceptedOrReturn(Continuation(EmptyCoroutineContext) { + exception = it.exceptionOrNull() + }) + } + + contiuation?.resumeWithException(RuntimeException("OK")) + + return exception!!.message!! +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/coroutines/kt24135.kt b/compiler/testData/codegen/box/coroutines/kt24135.kt new file mode 100644 index 00000000000..64e035eaece --- /dev/null +++ b/compiler/testData/codegen/box/coroutines/kt24135.kt @@ -0,0 +1,38 @@ +// IGNORE_BACKEND: JVM +// WITH_RUNTIME +// WITH_COROUTINES + +import helpers.EmptyContinuation +import kotlin.coroutines.* + +var result = "" +lateinit var c: Continuation + +fun builder(block: suspend () -> Unit) { + block.startCoroutine(EmptyContinuation()) +} + +fun box(): String { + val flow = foo { + bar() + result += "O" + } + builder { + flow() + } + c.resume(Unit) + return result +} + +suspend fun bar() { + return suspendCoroutine { cont: Continuation -> + c = cont + } +} + +inline fun foo(crossinline coroutine: suspend () -> Unit): suspend () -> Unit { + return { + coroutine.invoke() + result += "K" + } +} diff --git a/compiler/testData/codegen/box/coroutines/localFunctions/named/defaultArgument.kt b/compiler/testData/codegen/box/coroutines/localFunctions/named/defaultArgument.kt new file mode 100644 index 00000000000..5bde6ddf260 --- /dev/null +++ b/compiler/testData/codegen/box/coroutines/localFunctions/named/defaultArgument.kt @@ -0,0 +1,27 @@ +// IGNORE_BACKEND: JVM +// WITH_RUNTIME +// WITH_COROUTINES +// KT-27449 + +import helpers.EmptyContinuation +import kotlin.coroutines.* + +var result = "Fail" + +suspend fun doAction() { + suspend fun run( + a: String, + f: suspend (String) -> Unit = { input -> result = input } + ) { + f(a) + } + + run("OK") +} + +fun box(): String { + suspend { + doAction() + }.startCoroutine(EmptyContinuation) + return result +} diff --git a/compiler/testData/codegen/box/coroutines/nonLocalReturn.kt b/compiler/testData/codegen/box/coroutines/nonLocalReturn.kt index 703da057b33..3f7b5354a5b 100644 --- a/compiler/testData/codegen/box/coroutines/nonLocalReturn.kt +++ b/compiler/testData/codegen/box/coroutines/nonLocalReturn.kt @@ -18,7 +18,9 @@ suspend fun whatever() = coroutineScope { } fun builder(c: suspend () -> Unit) { - c.startCoroutine(Continuation(EmptyCoroutineContext) {}) + c.startCoroutine(Continuation(EmptyCoroutineContext) { + it.getOrThrow() + }) } fun box(): String { diff --git a/compiler/testData/codegen/box/coroutines/varSpilling/safeCallElvis.kt b/compiler/testData/codegen/box/coroutines/varSpilling/safeCallElvis.kt index b051207068b..ef788673781 100644 --- a/compiler/testData/codegen/box/coroutines/varSpilling/safeCallElvis.kt +++ b/compiler/testData/codegen/box/coroutines/varSpilling/safeCallElvis.kt @@ -17,7 +17,9 @@ class C { } fun df(t: T, r: suspend (T) -> Unit) { - r.startCoroutine(t, Continuation(EmptyCoroutineContext) {}) + r.startCoroutine(t, Continuation(EmptyCoroutineContext) { + it.getOrThrow() + }) } fun foo(s: String, c: C?) { diff --git a/compiler/testData/codegen/boxAgainstJava/delegation/delegationAndInheritanceFromJava.kt b/compiler/testData/codegen/box/delegation/delegationAndInheritanceFromJava.kt similarity index 72% rename from compiler/testData/codegen/boxAgainstJava/delegation/delegationAndInheritanceFromJava.kt rename to compiler/testData/codegen/box/delegation/delegationAndInheritanceFromJava.kt index c7ad8ef7092..349ed6dcfbf 100644 --- a/compiler/testData/codegen/boxAgainstJava/delegation/delegationAndInheritanceFromJava.kt +++ b/compiler/testData/codegen/box/delegation/delegationAndInheritanceFromJava.kt @@ -1,3 +1,5 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: Foo.java import java.util.Set; @@ -8,6 +10,7 @@ public class Foo { public interface B extends Set {} } +// MODULE: main(lib) // FILE: 1.kt import Foo.* diff --git a/compiler/testData/codegen/boxAgainstJava/enum/nameConflict.kt b/compiler/testData/codegen/box/enum/nameConflict.kt similarity index 75% rename from compiler/testData/codegen/boxAgainstJava/enum/nameConflict.kt rename to compiler/testData/codegen/box/enum/nameConflict.kt index fad3605f1d5..3c7a5672cb8 100644 --- a/compiler/testData/codegen/boxAgainstJava/enum/nameConflict.kt +++ b/compiler/testData/codegen/box/enum/nameConflict.kt @@ -1,3 +1,5 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: C.java public enum C { OK(0); @@ -9,6 +11,7 @@ public enum C { public int getOrdinal() { return ordinal; } } +// MODULE: main(lib) // FILE: 1.kt fun box(): String { val ok = C.OK @@ -16,4 +19,4 @@ fun box(): String { C.OK -> "OK" else -> "fail" } -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxAgainstJava/enum/simpleJavaEnum.kt b/compiler/testData/codegen/box/enum/simpleJavaEnum.kt similarity index 62% rename from compiler/testData/codegen/boxAgainstJava/enum/simpleJavaEnum.kt rename to compiler/testData/codegen/box/enum/simpleJavaEnum.kt index fb36a5d4ffb..38508c07f22 100644 --- a/compiler/testData/codegen/boxAgainstJava/enum/simpleJavaEnum.kt +++ b/compiler/testData/codegen/box/enum/simpleJavaEnum.kt @@ -1,3 +1,5 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: test/En.java package test; @@ -6,6 +8,7 @@ public enum En { A; } +// MODULE: main(lib) // FILE: 1.kt import test.* diff --git a/compiler/testData/codegen/boxAgainstJava/enum/simpleJavaEnumWithFunction.kt b/compiler/testData/codegen/box/enum/simpleJavaEnumWithFunction.kt similarity index 80% rename from compiler/testData/codegen/boxAgainstJava/enum/simpleJavaEnumWithFunction.kt rename to compiler/testData/codegen/box/enum/simpleJavaEnumWithFunction.kt index 70ebefa67a0..6cf7e1ac3d9 100644 --- a/compiler/testData/codegen/boxAgainstJava/enum/simpleJavaEnumWithFunction.kt +++ b/compiler/testData/codegen/box/enum/simpleJavaEnumWithFunction.kt @@ -1,3 +1,5 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: test/En.java package test; @@ -19,6 +21,7 @@ public enum En { } } +// MODULE: main(lib) // FILE: 1.kt import test.En.* diff --git a/compiler/testData/codegen/boxAgainstJava/enum/simpleJavaEnumWithStaticImport.kt b/compiler/testData/codegen/box/enum/simpleJavaEnumWithStaticImport.kt similarity index 62% rename from compiler/testData/codegen/boxAgainstJava/enum/simpleJavaEnumWithStaticImport.kt rename to compiler/testData/codegen/box/enum/simpleJavaEnumWithStaticImport.kt index 9f46b9144b1..710b06c239d 100644 --- a/compiler/testData/codegen/boxAgainstJava/enum/simpleJavaEnumWithStaticImport.kt +++ b/compiler/testData/codegen/box/enum/simpleJavaEnumWithStaticImport.kt @@ -1,3 +1,5 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: test/En.java package test; @@ -6,6 +8,7 @@ public enum En { A; } +// MODULE: main(lib) // FILE: 1.kt import test.En.A diff --git a/compiler/testData/codegen/boxAgainstJava/enum/simpleJavaInnerEnum.kt b/compiler/testData/codegen/box/enum/simpleJavaInnerEnum.kt similarity index 72% rename from compiler/testData/codegen/boxAgainstJava/enum/simpleJavaInnerEnum.kt rename to compiler/testData/codegen/box/enum/simpleJavaInnerEnum.kt index cea70111e9d..4deb559fafa 100644 --- a/compiler/testData/codegen/boxAgainstJava/enum/simpleJavaInnerEnum.kt +++ b/compiler/testData/codegen/box/enum/simpleJavaInnerEnum.kt @@ -1,3 +1,5 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: test/Foo.java package test; @@ -8,6 +10,7 @@ public class Foo { } } +// MODULE: main(lib) // FILE: 1.kt import test.* diff --git a/compiler/testData/codegen/boxAgainstJava/enum/staticField.kt b/compiler/testData/codegen/box/enum/staticField.kt similarity index 85% rename from compiler/testData/codegen/boxAgainstJava/enum/staticField.kt rename to compiler/testData/codegen/box/enum/staticField.kt index f268c881ea1..8fae91ea795 100644 --- a/compiler/testData/codegen/boxAgainstJava/enum/staticField.kt +++ b/compiler/testData/codegen/box/enum/staticField.kt @@ -1,3 +1,5 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: test/E.java package test; @@ -13,6 +15,7 @@ public enum E { public static final Set INSTANCES = EnumSet.of(INSTANCE); } +// MODULE: main(lib) // FILE: 1.kt import test.E diff --git a/compiler/testData/codegen/boxAgainstJava/enum/staticMethod.kt b/compiler/testData/codegen/box/enum/staticMethod.kt similarity index 64% rename from compiler/testData/codegen/boxAgainstJava/enum/staticMethod.kt rename to compiler/testData/codegen/box/enum/staticMethod.kt index 1cdbae06d5a..0be34082751 100644 --- a/compiler/testData/codegen/boxAgainstJava/enum/staticMethod.kt +++ b/compiler/testData/codegen/box/enum/staticMethod.kt @@ -1,3 +1,5 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: test/En.java package test; @@ -10,6 +12,7 @@ public enum En { } } +// MODULE: main(lib) // FILE: 1.kt fun box() = test.En.foo() diff --git a/compiler/testData/codegen/box/funInterface/funInterfaceCallInLambda.kt b/compiler/testData/codegen/box/funInterface/funInterfaceCallInLambda.kt new file mode 100644 index 00000000000..681c9dc174f --- /dev/null +++ b/compiler/testData/codegen/box/funInterface/funInterfaceCallInLambda.kt @@ -0,0 +1,23 @@ +// DONT_TARGET_EXACT_BACKEND: WASM + +fun interface Action { + fun run() +} + +fun runAction(a: Action) { + a.run() +} + +fun builder(c: () -> Unit) { + c() +} + +fun box(): String { + var res = "FAIL" + builder { + runAction { + res = "OK" + } + } + return res +} \ No newline at end of file diff --git a/compiler/testData/codegen/boxAgainstJava/functions/constructor.kt b/compiler/testData/codegen/box/functions/constructor.kt similarity index 67% rename from compiler/testData/codegen/boxAgainstJava/functions/constructor.kt rename to compiler/testData/codegen/box/functions/constructor.kt index a2f765ecfbd..eca0c465b3a 100644 --- a/compiler/testData/codegen/boxAgainstJava/functions/constructor.kt +++ b/compiler/testData/codegen/box/functions/constructor.kt @@ -1,3 +1,5 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: A.java class A { @@ -8,6 +10,7 @@ class A { public A(long l, double z) {} } +// MODULE: main(lib) // FILE: 1.kt fun box(): String { diff --git a/compiler/testData/codegen/boxAgainstJava/functions/max.kt b/compiler/testData/codegen/box/functions/max.kt similarity index 75% rename from compiler/testData/codegen/boxAgainstJava/functions/max.kt rename to compiler/testData/codegen/box/functions/max.kt index 060d016d024..1bf885dbfad 100644 --- a/compiler/testData/codegen/boxAgainstJava/functions/max.kt +++ b/compiler/testData/codegen/box/functions/max.kt @@ -1,3 +1,5 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: Foo.java import java.util.*; @@ -8,6 +10,7 @@ public class Foo { } } +// MODULE: main(lib) // FILE: 1.kt fun box(): String { diff --git a/compiler/testData/codegen/boxAgainstJava/functions/referencesStaticInnerClassMethod.kt b/compiler/testData/codegen/box/functions/referencesStaticInnerClassMethod.kt similarity index 64% rename from compiler/testData/codegen/boxAgainstJava/functions/referencesStaticInnerClassMethod.kt rename to compiler/testData/codegen/box/functions/referencesStaticInnerClassMethod.kt index 7d45a7f330d..ba9d1038ed1 100644 --- a/compiler/testData/codegen/boxAgainstJava/functions/referencesStaticInnerClassMethod.kt +++ b/compiler/testData/codegen/box/functions/referencesStaticInnerClassMethod.kt @@ -1,3 +1,5 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: R.java class R { @@ -6,6 +8,7 @@ class R { } } +// MODULE: main(lib) // FILE: 1.kt fun box() = diff --git a/compiler/testData/codegen/boxAgainstJava/functions/referencesStaticInnerClassMethodL2.kt b/compiler/testData/codegen/box/functions/referencesStaticInnerClassMethodL2.kt similarity index 70% rename from compiler/testData/codegen/boxAgainstJava/functions/referencesStaticInnerClassMethodL2.kt rename to compiler/testData/codegen/box/functions/referencesStaticInnerClassMethodL2.kt index dff232e2b65..85396bbd10f 100644 --- a/compiler/testData/codegen/boxAgainstJava/functions/referencesStaticInnerClassMethodL2.kt +++ b/compiler/testData/codegen/box/functions/referencesStaticInnerClassMethodL2.kt @@ -1,3 +1,5 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: R.java class R { @@ -8,6 +10,7 @@ class R { } } +// MODULE: main(lib) // FILE: 1.kt fun box() = diff --git a/compiler/testData/codegen/boxAgainstJava/functions/unrelatedUpperBounds.kt b/compiler/testData/codegen/box/functions/unrelatedUpperBounds.kt similarity index 73% rename from compiler/testData/codegen/boxAgainstJava/functions/unrelatedUpperBounds.kt rename to compiler/testData/codegen/box/functions/unrelatedUpperBounds.kt index c3658604778..7bb9978070a 100644 --- a/compiler/testData/codegen/boxAgainstJava/functions/unrelatedUpperBounds.kt +++ b/compiler/testData/codegen/box/functions/unrelatedUpperBounds.kt @@ -1,3 +1,5 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: Foo.java import java.util.Collection; @@ -8,6 +10,7 @@ public class Foo { } } +// MODULE: main(lib) // FILE: 1.kt fun box(): String { diff --git a/compiler/testData/codegen/boxAgainstJava/ieee754/anyToReal.kt b/compiler/testData/codegen/box/ieee754/anyToReal_AgainstCompiled.kt similarity index 80% rename from compiler/testData/codegen/boxAgainstJava/ieee754/anyToReal.kt rename to compiler/testData/codegen/box/ieee754/anyToReal_AgainstCompiled.kt index 82b0e52c706..c2c25511ad4 100644 --- a/compiler/testData/codegen/boxAgainstJava/ieee754/anyToReal.kt +++ b/compiler/testData/codegen/box/ieee754/anyToReal_AgainstCompiled.kt @@ -1,3 +1,5 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: JavaClass.java public class JavaClass { @@ -14,6 +16,7 @@ public class JavaClass { } +// MODULE: main(lib) // FILE: b.kt fun box(): String { @@ -24,4 +27,4 @@ fun box(): String { if ((jClass.minus0() as Double) != (jClass.plus0() as Double)) return "fail 2" return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxAgainstJava/ieee754/comparableTypeCast.kt b/compiler/testData/codegen/box/ieee754/comparableTypeCast_AgainstCompiled.kt similarity index 83% rename from compiler/testData/codegen/boxAgainstJava/ieee754/comparableTypeCast.kt rename to compiler/testData/codegen/box/ieee754/comparableTypeCast_AgainstCompiled.kt index a6669e1491c..fe0f253a598 100644 --- a/compiler/testData/codegen/boxAgainstJava/ieee754/comparableTypeCast.kt +++ b/compiler/testData/codegen/box/ieee754/comparableTypeCast_AgainstCompiled.kt @@ -1,3 +1,5 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: JavaClass.java public class JavaClass { @@ -13,6 +15,7 @@ public class JavaClass { } } +// MODULE: main(lib) // FILE: b.kt fun box(): String { @@ -23,4 +26,4 @@ fun box(): String { if (jClass.minus0() == (jClass.plus0() as Comparable)) return "fail 3" return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxAgainstJava/ieee754/double.kt b/compiler/testData/codegen/box/ieee754/double.kt similarity index 90% rename from compiler/testData/codegen/boxAgainstJava/ieee754/double.kt rename to compiler/testData/codegen/box/ieee754/double.kt index 4c87b414db2..40879e5fbba 100644 --- a/compiler/testData/codegen/boxAgainstJava/ieee754/double.kt +++ b/compiler/testData/codegen/box/ieee754/double.kt @@ -1,3 +1,5 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: JavaClass.java public class JavaClass { @@ -17,6 +19,7 @@ public class JavaClass { } +// MODULE: main(lib) // FILE: b.kt fun box(): String { diff --git a/compiler/testData/codegen/boxAgainstJava/ieee754/explicitCompareCall.kt b/compiler/testData/codegen/box/ieee754/explicitCompareCall_AgainstCompiled.kt similarity index 86% rename from compiler/testData/codegen/boxAgainstJava/ieee754/explicitCompareCall.kt rename to compiler/testData/codegen/box/ieee754/explicitCompareCall_AgainstCompiled.kt index 9ddfb37f95e..7927b025171 100644 --- a/compiler/testData/codegen/boxAgainstJava/ieee754/explicitCompareCall.kt +++ b/compiler/testData/codegen/box/ieee754/explicitCompareCall_AgainstCompiled.kt @@ -1,3 +1,5 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: JavaClass.java public class JavaClass { @@ -16,6 +18,7 @@ public class JavaClass { } +// MODULE: main(lib) // FILE: b.kt @@ -35,4 +38,4 @@ fun box(): String { } return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxAgainstJava/ieee754/explicitEqualsCall.kt b/compiler/testData/codegen/box/ieee754/explicitEqualsCall_AgainstCompiled.kt similarity index 79% rename from compiler/testData/codegen/boxAgainstJava/ieee754/explicitEqualsCall.kt rename to compiler/testData/codegen/box/ieee754/explicitEqualsCall_AgainstCompiled.kt index d8269476cb0..28caf58a0e3 100644 --- a/compiler/testData/codegen/boxAgainstJava/ieee754/explicitEqualsCall.kt +++ b/compiler/testData/codegen/box/ieee754/explicitEqualsCall_AgainstCompiled.kt @@ -1,3 +1,5 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: JavaClass.java public class JavaClass { @@ -13,6 +15,7 @@ public class JavaClass { } +// MODULE: main(lib) // FILE: b.kt fun box(): String { diff --git a/compiler/testData/codegen/boxAgainstJava/ieee754/float.kt b/compiler/testData/codegen/box/ieee754/float.kt similarity index 90% rename from compiler/testData/codegen/boxAgainstJava/ieee754/float.kt rename to compiler/testData/codegen/box/ieee754/float.kt index 79ba6398e35..09992bd5da7 100644 --- a/compiler/testData/codegen/boxAgainstJava/ieee754/float.kt +++ b/compiler/testData/codegen/box/ieee754/float.kt @@ -1,3 +1,5 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: JavaClass.java public class JavaClass { @@ -20,6 +22,7 @@ public class JavaClass { } +// MODULE: main(lib) // FILE: b.kt fun box(): String { diff --git a/compiler/testData/codegen/boxAgainstJava/ieee754/generic.kt b/compiler/testData/codegen/box/ieee754/generic_AgainstCompiled.kt similarity index 84% rename from compiler/testData/codegen/boxAgainstJava/ieee754/generic.kt rename to compiler/testData/codegen/box/ieee754/generic_AgainstCompiled.kt index 88c63bd7a4e..fc18840a27e 100644 --- a/compiler/testData/codegen/boxAgainstJava/ieee754/generic.kt +++ b/compiler/testData/codegen/box/ieee754/generic_AgainstCompiled.kt @@ -1,3 +1,5 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: JavaClass.java public class JavaClass { @@ -24,6 +26,7 @@ public class JavaClass { } +// MODULE: main(lib) // FILE: b.kt fun box(): String { @@ -33,4 +36,4 @@ fun box(): String { if (jClass.minus0() != jClass.plus0()) return "fail 5" return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxAgainstJava/ieee754/nullableAnyToReal.kt b/compiler/testData/codegen/box/ieee754/nullableAnyToReal_AgainstCompiled.kt similarity index 80% rename from compiler/testData/codegen/boxAgainstJava/ieee754/nullableAnyToReal.kt rename to compiler/testData/codegen/box/ieee754/nullableAnyToReal_AgainstCompiled.kt index a751c11917c..8ebcd13fe36 100644 --- a/compiler/testData/codegen/boxAgainstJava/ieee754/nullableAnyToReal.kt +++ b/compiler/testData/codegen/box/ieee754/nullableAnyToReal_AgainstCompiled.kt @@ -1,3 +1,5 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: JavaClass.java public class JavaClass { @@ -13,6 +15,7 @@ public class JavaClass { } } +// MODULE: main(lib) // FILE: b.kt fun box(): String { @@ -23,4 +26,4 @@ fun box(): String { if ((jClass.minus0() as Double) != (jClass.plus0() as Double)) return "fail 5" return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxAgainstJava/inline/kt19910.kt b/compiler/testData/codegen/box/inline/kt19910.kt similarity index 88% rename from compiler/testData/codegen/boxAgainstJava/inline/kt19910.kt rename to compiler/testData/codegen/box/inline/kt19910.kt index 2c8dc93bd1e..d61aadeb3d7 100644 --- a/compiler/testData/codegen/boxAgainstJava/inline/kt19910.kt +++ b/compiler/testData/codegen/box/inline/kt19910.kt @@ -1,7 +1,10 @@ -// FILE: J.java +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE // FULL_JDK // WITH_RUNTIME // TARGET_BACKEND: JVM + +// MODULE: lib +// FILE: J.java public class J { public interface Consumer { void accept(String p); @@ -12,9 +15,8 @@ public class J { } } +// MODULE: main(lib) // FILE: Kotlin.kt - - inline fun makeRunnable(crossinline lambda: () -> Unit) = object : Runnable { override fun run() { @@ -36,4 +38,4 @@ fun box(): String { } return "fail: exception expected" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/box/inlineClasses/inlineClassCollection/inlineCollectionOfInlineClass.kt b/compiler/testData/codegen/box/inlineClasses/inlineClassCollection/inlineCollectionOfInlineClass.kt new file mode 100644 index 00000000000..284153155d9 --- /dev/null +++ b/compiler/testData/codegen/box/inlineClasses/inlineClassCollection/inlineCollectionOfInlineClass.kt @@ -0,0 +1,43 @@ +// WITH_RUNTIME + +inline class Z(val x: Int) + +inline class ZArray(val storage: IntArray) : Collection { + override val size: Int + get() = storage.size + + override fun contains(element: Z): Boolean { + return storage.contains(element.x) + } + + override fun containsAll(elements: Collection): Boolean { + return elements.all { contains(it) } + } + + override fun isEmpty(): Boolean { + return storage.isEmpty() + } + + private class ZArrayIterator(val storage: IntArray): Iterator { + var index = 0 + + override fun hasNext(): Boolean = index < storage.size + + override fun next(): Z = Z(storage[index++]) + } + + override fun iterator(): Iterator = ZArrayIterator(storage) +} + + +fun box(): String { + val zs = ZArray(IntArray(5)) + + val testSize = zs.size + if (testSize != 5) return "Failed: testSize=$testSize" + + val testContains = zs.contains(object {} as Any) + if (testContains) return "Failed: testContains=$testContains" + + return "OK" +} diff --git a/compiler/testData/codegen/box/inlineClasses/inlineClassCollection/inlineListOfInlineClass.kt b/compiler/testData/codegen/box/inlineClasses/inlineClassCollection/inlineListOfInlineClass.kt new file mode 100644 index 00000000000..d97fafd4ea0 --- /dev/null +++ b/compiler/testData/codegen/box/inlineClasses/inlineClassCollection/inlineListOfInlineClass.kt @@ -0,0 +1,56 @@ +// WITH_RUNTIME + +inline class Z(val x: Int) + +inline class ZArray(val storage: IntArray) : List { + override val size: Int + get() = storage.size + + override fun contains(element: Z): Boolean { + return storage.contains(element.x) + } + + override fun containsAll(elements: Collection): Boolean { + return elements.all { contains(it) } + } + + override fun isEmpty(): Boolean { + return storage.isEmpty() + } + + override fun get(index: Int): Z = Z(storage[index]) + + override fun indexOf(element: Z): Int = storage.indexOf(element.x) + + override fun lastIndexOf(element: Z): Int = storage.lastIndexOf(element.x) + + override fun listIterator(): ListIterator = ZArrayIterator(storage) + + override fun listIterator(index: Int): ListIterator = ZArrayIterator(storage, index) + + override fun subList(fromIndex: Int, toIndex: Int): List = TODO() + + private class ZArrayIterator(val storage: IntArray, var index: Int = 0): ListIterator { + override fun hasNext(): Boolean = index < storage.size + override fun next(): Z = Z(storage[index++]) + override fun nextIndex(): Int = index + 1 + + override fun hasPrevious(): Boolean = index > 0 + override fun previous(): Z = Z(storage[index--]) + override fun previousIndex(): Int = index - 1 + } + + override fun iterator(): Iterator = ZArrayIterator(storage) +} + + +fun box(): String { + val zs = ZArray(IntArray(5)) + + val testElement = object {} as Any + zs.contains(testElement) + zs.indexOf(testElement) + zs.lastIndexOf(testElement) + + return "OK" +} diff --git a/compiler/testData/codegen/box/inlineClasses/inlineClassCollection/inlineMapOfInlineClass.kt b/compiler/testData/codegen/box/inlineClasses/inlineClassCollection/inlineMapOfInlineClass.kt new file mode 100644 index 00000000000..81fa9a51558 --- /dev/null +++ b/compiler/testData/codegen/box/inlineClasses/inlineClassCollection/inlineMapOfInlineClass.kt @@ -0,0 +1,57 @@ +// WITH_RUNTIME + +inline class Z(val x: Int) + +inline class ZArrayMap(val storage: IntArray) : Map { + override val size: Int + get() = storage.size + + private class MapEntry(val i: Int, val si: Int): Map.Entry { + override val key: Z get() = Z(i) + override val value: Z get() = Z(si) + } + + private class MapEntrySet(val storage: IntArray) : AbstractSet>() { + private inner class MyIterator : Iterator> { + var index = 0 + override fun hasNext(): Boolean = index < size + override fun next(): Map.Entry = MapEntry(index, storage[index++]) + } + + override val size: Int + get() = storage.size + + override fun iterator(): Iterator> = MyIterator() + } + + override val entries: Set> + get() = MapEntrySet(storage) + + override val keys: Set + get() = (0 until size).mapTo(HashSet()) { Z(it) } + + override val values: Collection + get() = storage.mapTo(ArrayList()) { Z(it) } + + override fun containsKey(key: Z): Boolean = key.x in (0 until size) + + override fun containsValue(value: Z): Boolean = storage.contains(value.x) + + override fun get(key: Z) = storage.getOrNull(key.x)?.let { Z(it) } + + override fun isEmpty(): Boolean = size > 0 +} + +fun box(): String { + val zm = ZArrayMap(IntArray(5)) + + zm.containsKey(Z(0)) + zm.containsValue(Z(0)) + zm[Z(0)] + + zm.containsKey(object {} as Any) + zm.containsValue(object {} as Any) + zm.get(object {} as Any) + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/inlineClasses/jvm8DefaultInterfaceMethods/jvmDefaultSuspend.kt b/compiler/testData/codegen/box/inlineClasses/jvm8DefaultInterfaceMethods/jvmDefaultSuspend.kt index 883bb3b447b..31ded160631 100644 --- a/compiler/testData/codegen/box/inlineClasses/jvm8DefaultInterfaceMethods/jvmDefaultSuspend.kt +++ b/compiler/testData/codegen/box/inlineClasses/jvm8DefaultInterfaceMethods/jvmDefaultSuspend.kt @@ -16,7 +16,9 @@ suspend fun returnsUnboxed() = InlineClass("") suspend fun test(): String = returnsUnboxed().ok() fun builder(c: suspend () -> Unit) { - c.startCoroutine(Continuation(EmptyCoroutineContext) {}) + c.startCoroutine(Continuation(EmptyCoroutineContext) { + it.getOrThrow() + }) } fun box(): String { diff --git a/compiler/testData/codegen/box/inlineClasses/kt32793.kt b/compiler/testData/codegen/box/inlineClasses/kt32793.kt new file mode 100644 index 00000000000..2779f23d83c --- /dev/null +++ b/compiler/testData/codegen/box/inlineClasses/kt32793.kt @@ -0,0 +1,25 @@ +// DONT_TARGET_EXACT_BACKEND: WASM +// WASM_MUTE_REASON: CALLABLE_REFERENCES_FAIL +// WITH_RUNTIME +// WITH_COROUTINES +// IGNORE_BACKEND: JVM + +import kotlin.coroutines.startCoroutine +import helpers.EmptyContinuation + +suspend fun test() { + suspend fun process(myValue: UInt) { + if (myValue != 42u) throw AssertionError(myValue) + } + val value: UInt = 42u + process(value) +} + +fun builder(block: suspend () -> Unit) { + block.startCoroutine(EmptyContinuation) +} + +fun box(): String { + builder { test() } + return "OK" +} diff --git a/compiler/testData/codegen/boxAgainstJava/innerClass/kt3532.kt b/compiler/testData/codegen/box/innerClass/kt3532.kt similarity index 58% rename from compiler/testData/codegen/boxAgainstJava/innerClass/kt3532.kt rename to compiler/testData/codegen/box/innerClass/kt3532.kt index 7a6bebd14f4..15c49e03773 100644 --- a/compiler/testData/codegen/boxAgainstJava/innerClass/kt3532.kt +++ b/compiler/testData/codegen/box/innerClass/kt3532.kt @@ -1,9 +1,12 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: Foo.java public class Foo { public class Inner { } } +// MODULE: main(lib) // FILE: 1.kt fun box(): String { diff --git a/compiler/testData/codegen/boxAgainstJava/innerClass/kt3812.kt b/compiler/testData/codegen/box/innerClass/kt3812.kt similarity index 67% rename from compiler/testData/codegen/boxAgainstJava/innerClass/kt3812.kt rename to compiler/testData/codegen/box/innerClass/kt3812.kt index b8672663202..3406cfe907e 100644 --- a/compiler/testData/codegen/boxAgainstJava/innerClass/kt3812.kt +++ b/compiler/testData/codegen/box/innerClass/kt3812.kt @@ -1,3 +1,5 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: Foo.java public class Foo { @@ -9,6 +11,7 @@ public class Foo { } } +// MODULE: main(lib) // FILE: 1.kt fun box(): String { diff --git a/compiler/testData/codegen/boxAgainstJava/innerClass/kt4036.kt b/compiler/testData/codegen/box/innerClass/kt4036.kt similarity index 69% rename from compiler/testData/codegen/boxAgainstJava/innerClass/kt4036.kt rename to compiler/testData/codegen/box/innerClass/kt4036.kt index b44cebe6b9d..9ef204bbff6 100644 --- a/compiler/testData/codegen/boxAgainstJava/innerClass/kt4036.kt +++ b/compiler/testData/codegen/box/innerClass/kt4036.kt @@ -1,3 +1,5 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: Foo.java public class Foo { @@ -8,6 +10,7 @@ public class Foo { } } +// MODULE: main(lib) // FILE: 1.kt fun box(): String { diff --git a/compiler/testData/codegen/boxAgainstJava/interfaces/defaultMethod.kt b/compiler/testData/codegen/box/interfaces/defaultMethod.kt similarity index 72% rename from compiler/testData/codegen/boxAgainstJava/interfaces/defaultMethod.kt rename to compiler/testData/codegen/box/interfaces/defaultMethod.kt index 3e103e584c5..7f672bebb01 100644 --- a/compiler/testData/codegen/boxAgainstJava/interfaces/defaultMethod.kt +++ b/compiler/testData/codegen/box/interfaces/defaultMethod.kt @@ -1,5 +1,7 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE // JVM_TARGET: 1.8 +// MODULE: lib // FILE: A.java public interface A { @@ -8,6 +10,7 @@ public interface A { } } +// MODULE: main(lib) // FILE: 1.kt interface I : A diff --git a/compiler/testData/codegen/boxAgainstJava/interfaces/inheritJavaInterface.kt b/compiler/testData/codegen/box/interfaces/inheritJavaInterface.kt similarity index 73% rename from compiler/testData/codegen/boxAgainstJava/interfaces/inheritJavaInterface.kt rename to compiler/testData/codegen/box/interfaces/inheritJavaInterface.kt index e42a28174d3..93a3673c5e3 100644 --- a/compiler/testData/codegen/boxAgainstJava/interfaces/inheritJavaInterface.kt +++ b/compiler/testData/codegen/box/interfaces/inheritJavaInterface.kt @@ -1,9 +1,12 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: A.java interface A { void foo(); } +// MODULE: main(lib) // FILE: 1.kt internal interface B : A { diff --git a/compiler/testData/codegen/box/invokedynamic/lambdas/bigArityExtLambda.kt b/compiler/testData/codegen/box/invokedynamic/lambdas/bigArityExtLambda.kt new file mode 100644 index 00000000000..7a446ba02d9 --- /dev/null +++ b/compiler/testData/codegen/box/invokedynamic/lambdas/bigArityExtLambda.kt @@ -0,0 +1,24 @@ +// TARGET_BACKEND: JVM +// IGNORE_BACKEND: JVM +// IGNORE_LIGHT_ANALYSIS +// JVM_TARGET: 1.8 +// LAMBDAS: INDY + +fun test( + extFn: Int.( + p0: String, p1: String, + p2: Int, p3: Int, p4: Int, p5: Int, p6: Int, p7: Int, p8: Int, p9: Int, + p10: Int, p11: Int, p12: Int, p13: Int, p14: Int, p15: Int, p16: Int, p17: Int, p18: Int, p19: Int, + p20: Int, p21: Int, p22: Int + ) -> String +) = + 42.extFn("O", "K", 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22) + +fun box() = + test { p0: String, p1: String, + p2: Int, p3: Int, p4: Int, p5: Int, p6: Int, p7: Int, p8: Int, p9: Int, + p10: Int, p11: Int, p12: Int, p13: Int, p14: Int, p15: Int, p16: Int, p17: Int, p18: Int, p19: Int, + p20: Int, p21: Int, p22: Int + -> + p0 + p1 + } \ No newline at end of file diff --git a/compiler/testData/codegen/box/invokedynamic/lambdas/bigArityLambda.kt b/compiler/testData/codegen/box/invokedynamic/lambdas/bigArityLambda.kt new file mode 100644 index 00000000000..df283781112 --- /dev/null +++ b/compiler/testData/codegen/box/invokedynamic/lambdas/bigArityLambda.kt @@ -0,0 +1,12 @@ +// TARGET_BACKEND: JVM +// JVM_TARGET: 1.8 +// LAMBDAS: INDY + +fun box() = + { p0: String, p1: String, p2: Int, p3: Int, p4: Int, p5: Int, p6: Int, p7: Int, p8: Int, p9: Int, + p10: Int, p11: Int, p12: Int, p13: Int, p14: Int, p15: Int, p16: Int, p17: Int, p18: Int, p19: Int, + p20: Int, p21: Int, p22: Int, p23: Int, p24: Int, p25: Int, p26: Int, p27: Int, p28: Int, p29: Int + -> p0 + p1 + }( + "O", "K", 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29 + ) \ No newline at end of file diff --git a/compiler/testData/codegen/box/invokedynamic/lambdas/capturedDispatchReceiver.kt b/compiler/testData/codegen/box/invokedynamic/lambdas/capturedDispatchReceiver.kt new file mode 100644 index 00000000000..7b5580d4c09 --- /dev/null +++ b/compiler/testData/codegen/box/invokedynamic/lambdas/capturedDispatchReceiver.kt @@ -0,0 +1,9 @@ +// TARGET_BACKEND: JVM +// JVM_TARGET: 1.8 +// LAMBDAS: INDY + +class C(val x: String) { + fun test() = { x } +} + +fun box() = C("OK").test()() \ No newline at end of file diff --git a/compiler/testData/codegen/box/invokedynamic/lambdas/capturedExtensionReceiver.kt b/compiler/testData/codegen/box/invokedynamic/lambdas/capturedExtensionReceiver.kt new file mode 100644 index 00000000000..4ba7c831bea --- /dev/null +++ b/compiler/testData/codegen/box/invokedynamic/lambdas/capturedExtensionReceiver.kt @@ -0,0 +1,9 @@ +// TARGET_BACKEND: JVM +// JVM_TARGET: 1.8 +// LAMBDAS: INDY + +class C(val x: String) + +fun C.test() = { x } + +fun box() = C("OK").test()() \ No newline at end of file diff --git a/compiler/testData/codegen/box/invokedynamic/lambdas/capturingValue.kt b/compiler/testData/codegen/box/invokedynamic/lambdas/capturingValue.kt new file mode 100644 index 00000000000..d043125b227 --- /dev/null +++ b/compiler/testData/codegen/box/invokedynamic/lambdas/capturingValue.kt @@ -0,0 +1,8 @@ +// TARGET_BACKEND: JVM +// JVM_TARGET: 1.8 +// LAMBDAS: INDY + +fun box(): String { + val ok = "OK" + return { ok }() +} diff --git a/compiler/testData/codegen/box/invokedynamic/lambdas/capturingVar.kt b/compiler/testData/codegen/box/invokedynamic/lambdas/capturingVar.kt new file mode 100644 index 00000000000..a1d063d9d27 --- /dev/null +++ b/compiler/testData/codegen/box/invokedynamic/lambdas/capturingVar.kt @@ -0,0 +1,9 @@ +// TARGET_BACKEND: JVM +// JVM_TARGET: 1.8 +// LAMBDAS: INDY + +fun box(): String { + var ok = "Failed" + { ok = "OK" }() + return ok +} diff --git a/compiler/testData/codegen/box/invokedynamic/lambdas/extensionLambda.kt b/compiler/testData/codegen/box/invokedynamic/lambdas/extensionLambda.kt new file mode 100644 index 00000000000..ae44019e814 --- /dev/null +++ b/compiler/testData/codegen/box/invokedynamic/lambdas/extensionLambda.kt @@ -0,0 +1,12 @@ +// TARGET_BACKEND: JVM +// JVM_TARGET: 1.8 +// LAMBDAS: INDY + +class C(val x: String) + +fun boxLambda(lambda: C.() -> String) = lambda + +fun box(): String { + val ext = boxLambda { x } + return C("OK").ext() +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/invokedynamic/lambdas/inlineClassInSignature/lambdaWithInlineAny.kt b/compiler/testData/codegen/box/invokedynamic/lambdas/inlineClassInSignature/lambdaWithInlineAny.kt new file mode 100644 index 00000000000..3958133a62c --- /dev/null +++ b/compiler/testData/codegen/box/invokedynamic/lambdas/inlineClassInSignature/lambdaWithInlineAny.kt @@ -0,0 +1,14 @@ +// TARGET_BACKEND: JVM +// JVM_TARGET: 1.8 +// LAMBDAS: INDY + +inline class Z(val value: Any) + +fun foo1(fs: (Z) -> Z) = fs(Z(1)) + +fun box(): String { + val t = foo1 { Z((it.value as Int) + 41) } + if (t.value != 42) return "Failed: t=$t" + + return "OK" +} diff --git a/compiler/testData/codegen/box/invokedynamic/lambdas/inlineClassInSignature/lambdaWithInlineInt.kt b/compiler/testData/codegen/box/invokedynamic/lambdas/inlineClassInSignature/lambdaWithInlineInt.kt new file mode 100644 index 00000000000..14206cb16ac --- /dev/null +++ b/compiler/testData/codegen/box/invokedynamic/lambdas/inlineClassInSignature/lambdaWithInlineInt.kt @@ -0,0 +1,14 @@ +// TARGET_BACKEND: JVM +// JVM_TARGET: 1.8 +// LAMBDAS: INDY + +inline class Z(val value: Int) + +fun foo1(fs: (Z) -> Z) = fs(Z(1)) + +fun box(): String { + val t = foo1 { Z(it.value + 41) } + if (t.value != 42) return "Failed: t=$t" + + return "OK" +} diff --git a/compiler/testData/codegen/box/invokedynamic/lambdas/inlineClassInSignature/lambdaWithInlineNAny.kt b/compiler/testData/codegen/box/invokedynamic/lambdas/inlineClassInSignature/lambdaWithInlineNAny.kt new file mode 100644 index 00000000000..082f90a67ed --- /dev/null +++ b/compiler/testData/codegen/box/invokedynamic/lambdas/inlineClassInSignature/lambdaWithInlineNAny.kt @@ -0,0 +1,14 @@ +// TARGET_BACKEND: JVM +// JVM_TARGET: 1.8 +// LAMBDAS: INDY + +inline class Z(val value: Any?) + +fun foo1(fs: (Z) -> Z) = fs(Z(1)) + +fun box(): String { + val t = foo1 { Z((it.value as Int) + 41) } + if (t.value != 42) return "Failed: t=$t" + + return "OK" +} diff --git a/compiler/testData/codegen/box/invokedynamic/lambdas/inlineClassInSignature/lambdaWithInlineNInt.kt b/compiler/testData/codegen/box/invokedynamic/lambdas/inlineClassInSignature/lambdaWithInlineNInt.kt new file mode 100644 index 00000000000..f371eded5f2 --- /dev/null +++ b/compiler/testData/codegen/box/invokedynamic/lambdas/inlineClassInSignature/lambdaWithInlineNInt.kt @@ -0,0 +1,14 @@ +// TARGET_BACKEND: JVM +// JVM_TARGET: 1.8 +// LAMBDAS: INDY + +inline class Z(val value: Int?) + +fun foo1(fs: (Z) -> Z) = fs(Z(1)) + +fun box(): String { + val t = foo1 { Z(it.value!! + 41) } + if (t.value != 42) return "Failed: t=$t" + + return "OK" +} diff --git a/compiler/testData/codegen/box/invokedynamic/lambdas/inlineClassInSignature/lambdaWithInlineNString.kt b/compiler/testData/codegen/box/invokedynamic/lambdas/inlineClassInSignature/lambdaWithInlineNString.kt new file mode 100644 index 00000000000..ffdf1eb303b --- /dev/null +++ b/compiler/testData/codegen/box/invokedynamic/lambdas/inlineClassInSignature/lambdaWithInlineNString.kt @@ -0,0 +1,14 @@ +// TARGET_BACKEND: JVM +// JVM_TARGET: 1.8 +// LAMBDAS: INDY + +inline class Z(val value: String?) + +fun foo1(fs: (Z) -> Z) = fs(Z("O")) + +fun box(): String { + val t = foo1 { Z(it.value!! + "K") } + if (t.value != "OK") return "Failed: t=$t" + + return "OK" +} diff --git a/compiler/testData/codegen/box/invokedynamic/lambdas/inlineClassInSignature/lambdaWithInlineString.kt b/compiler/testData/codegen/box/invokedynamic/lambdas/inlineClassInSignature/lambdaWithInlineString.kt new file mode 100644 index 00000000000..007188459df --- /dev/null +++ b/compiler/testData/codegen/box/invokedynamic/lambdas/inlineClassInSignature/lambdaWithInlineString.kt @@ -0,0 +1,14 @@ +// TARGET_BACKEND: JVM +// JVM_TARGET: 1.8 +// LAMBDAS: INDY + +inline class Z(val value: String) + +fun foo1(fs: (Z) -> Z) = fs(Z("O")) + +fun box(): String { + val t = foo1 { Z(it.value + "K") } + if (t.value != "OK") return "Failed: t=$t" + + return "OK" +} diff --git a/compiler/testData/codegen/box/invokedynamic/lambdas/lambdaSerializable.kt b/compiler/testData/codegen/box/invokedynamic/lambdas/lambdaSerializable.kt new file mode 100644 index 00000000000..9cf4a35003e --- /dev/null +++ b/compiler/testData/codegen/box/invokedynamic/lambdas/lambdaSerializable.kt @@ -0,0 +1,13 @@ +// TARGET_BACKEND: JVM +// IGNORE_BACKEND: JVM +// JVM_TARGET: 1.8 +// LAMBDAS: INDY +// FULL_JDK + +fun lambdaIsSerializable(fn: () -> Unit) = fn is java.io.Serializable + +fun box(): String { + if (lambdaIsSerializable {}) + return "Failed: indy lambdas are not serializable" + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/invokedynamic/lambdas/lambdaToSting.kt b/compiler/testData/codegen/box/invokedynamic/lambdas/lambdaToSting.kt new file mode 100644 index 00000000000..66b3bcd5941 --- /dev/null +++ b/compiler/testData/codegen/box/invokedynamic/lambdas/lambdaToSting.kt @@ -0,0 +1,14 @@ +// TARGET_BACKEND: JVM +// IGNORE_BACKEND: JVM +// JVM_TARGET: 1.8 +// LAMBDAS: INDY +// WITH_RUNTIME + +fun lambdaToString(fn: () -> Unit) = fn.toString() + +fun box(): String { + val str = lambdaToString {} + if (!str.startsWith("LambdaToStingKt")) + return "Failed: indy lambda toString is inherited from java.lang.Object" + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/invokedynamic/lambdas/nestedIndyLambdas.kt b/compiler/testData/codegen/box/invokedynamic/lambdas/nestedIndyLambdas.kt new file mode 100644 index 00000000000..5081ecf869a --- /dev/null +++ b/compiler/testData/codegen/box/invokedynamic/lambdas/nestedIndyLambdas.kt @@ -0,0 +1,5 @@ +// TARGET_BACKEND: JVM +// JVM_TARGET: 1.8 +// LAMBDAS: INDY + +fun box() = { { "O" }() + { "K" }() }() diff --git a/compiler/testData/codegen/box/invokedynamic/lambdas/primitiveValueParameters.kt b/compiler/testData/codegen/box/invokedynamic/lambdas/primitiveValueParameters.kt new file mode 100644 index 00000000000..31755c370e5 --- /dev/null +++ b/compiler/testData/codegen/box/invokedynamic/lambdas/primitiveValueParameters.kt @@ -0,0 +1,10 @@ +// TARGET_BACKEND: JVM +// JVM_TARGET: 1.8 +// LAMBDAS: INDY + +fun box(): String { + val test = { i: Int -> i + 40 }(2) + if (test != 42) return "Failed: test=$test" + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/invokedynamic/lambdas/simpleIndyLambda.kt b/compiler/testData/codegen/box/invokedynamic/lambdas/simpleIndyLambda.kt new file mode 100644 index 00000000000..5c722ba6995 --- /dev/null +++ b/compiler/testData/codegen/box/invokedynamic/lambdas/simpleIndyLambda.kt @@ -0,0 +1,5 @@ +// TARGET_BACKEND: JVM +// JVM_TARGET: 1.8 +// LAMBDAS: INDY + +fun box() = { "OK" }() diff --git a/compiler/testData/codegen/box/invokedynamic/lambdas/suspendLambda.kt b/compiler/testData/codegen/box/invokedynamic/lambdas/suspendLambda.kt new file mode 100644 index 00000000000..50ab4c25a4d --- /dev/null +++ b/compiler/testData/codegen/box/invokedynamic/lambdas/suspendLambda.kt @@ -0,0 +1,35 @@ +// TARGET_BACKEND: JVM +// JVM_TARGET: 1.8 +// LAMBDAS: INDY +// WITH_RUNTIME +// WITH_COROUTINES + +import kotlin.coroutines.* + +var c: Continuation? = null + +suspend fun suspendMe() = suspendCoroutine { continuation -> + c = continuation +} + +fun builder(c: suspend () -> Unit) { + c.startCoroutine(object: Continuation { + override val context = EmptyCoroutineContext + override fun resumeWith(result: Result) { + result.getOrThrow() + } + }) +} + +fun box(): String { + var test = "" + builder { + suspendMe() + test += "O" + suspendMe() + test += "K" + } + c?.resume(Unit) + c?.resume(Unit) + return test +} diff --git a/compiler/testData/codegen/box/invokedynamic/lambdas/voidReturnType.kt b/compiler/testData/codegen/box/invokedynamic/lambdas/voidReturnType.kt new file mode 100644 index 00000000000..77fb0188c06 --- /dev/null +++ b/compiler/testData/codegen/box/invokedynamic/lambdas/voidReturnType.kt @@ -0,0 +1,10 @@ +// TARGET_BACKEND: JVM +// JVM_TARGET: 1.8 +// LAMBDAS: INDY + +var ok = "Failed" + +fun box(): String { + { ok = "OK" }() + return ok +} diff --git a/compiler/testData/codegen/box/invokedynamic/sam/voidReturnTypeAsGeneric.kt b/compiler/testData/codegen/box/invokedynamic/sam/voidReturnTypeAsGeneric.kt new file mode 100644 index 00000000000..6392915e1cc --- /dev/null +++ b/compiler/testData/codegen/box/invokedynamic/sam/voidReturnTypeAsGeneric.kt @@ -0,0 +1,16 @@ +// TARGET_BACKEND: JVM +// JVM_TARGET: 1.8 +// LAMBDAS: INDY + +fun interface IFoo { + fun foo(): T +} + +fun foo(iFoo: IFoo) = iFoo.foo() + +var ok = "Failed" + +fun box(): String { + foo { ok = "OK" } + return ok +} diff --git a/compiler/testData/codegen/box/jvm8/defaults/26360.kt b/compiler/testData/codegen/box/jvm8/defaults/26360.kt index 46c91da9952..424c557cb13 100644 --- a/compiler/testData/codegen/box/jvm8/defaults/26360.kt +++ b/compiler/testData/codegen/box/jvm8/defaults/26360.kt @@ -1,4 +1,4 @@ -// !JVM_TARGET: 1.8 +// JVM_TARGET: 1.8 // !JVM_DEFAULT_MODE: enable // WITH_RUNTIME // TARGET_BACKEND: JVM @@ -17,4 +17,4 @@ interface SubAB : SubA, SubB fun box(): String { return object : SubAB {}.value() -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/box/jvm8/defaults/allCompatibility/suspendFunction.kt b/compiler/testData/codegen/box/jvm8/defaults/allCompatibility/suspendFunction.kt new file mode 100644 index 00000000000..94d968f913f --- /dev/null +++ b/compiler/testData/codegen/box/jvm8/defaults/allCompatibility/suspendFunction.kt @@ -0,0 +1,38 @@ +// !JVM_DEFAULT_MODE: all-compatibility +// TARGET_BACKEND: JVM +// IGNORE_BACKEND: JVM +// JVM_TARGET: 1.8 +// WITH_COROUTINES +// WITH_RUNTIME + +import kotlin.coroutines.* +import helpers.* + +interface S { + suspend fun foo() +} + +interface T : S { + override suspend fun foo() { + bar() + } + + fun bar() +} + +object O : T { + var result = "" + + override fun bar() { + result = "OK" + } +} + +fun builder(block: suspend () -> Unit) { + block.startCoroutine(EmptyContinuation) +} + +fun box(): String { + builder { O.foo() } + return O.result +} diff --git a/compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/suspendFunction.kt b/compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/suspendFunction.kt new file mode 100644 index 00000000000..c449e7e231a --- /dev/null +++ b/compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/suspendFunction.kt @@ -0,0 +1,37 @@ +// !JVM_DEFAULT_MODE: all +// TARGET_BACKEND: JVM +// JVM_TARGET: 1.8 +// WITH_COROUTINES +// WITH_RUNTIME + +import kotlin.coroutines.* +import helpers.* + +interface S { + suspend fun foo() +} + +interface T : S { + override suspend fun foo() { + bar() + } + + fun bar() +} + +object O : T { + var result = "" + + override fun bar() { + result = "OK" + } +} + +fun builder(block: suspend () -> Unit) { + block.startCoroutine(EmptyContinuation) +} + +fun box(): String { + builder { O.foo() } + return O.result +} diff --git a/compiler/testData/codegen/box/jvm8/defaults/suspendFunction.kt b/compiler/testData/codegen/box/jvm8/defaults/suspendFunction.kt new file mode 100644 index 00000000000..11672cb0c5b --- /dev/null +++ b/compiler/testData/codegen/box/jvm8/defaults/suspendFunction.kt @@ -0,0 +1,38 @@ +// !JVM_DEFAULT_MODE: enable +// TARGET_BACKEND: JVM +// JVM_TARGET: 1.8 +// WITH_COROUTINES +// WITH_RUNTIME + +import kotlin.coroutines.* +import helpers.* + +interface S { + suspend fun foo() +} + +interface T : S { + @JvmDefault + override suspend fun foo() { + bar() + } + + fun bar() +} + +object O : T { + var result = "" + + override fun bar() { + result = "OK" + } +} + +fun builder(block: suspend () -> Unit) { + block.startCoroutine(EmptyContinuation) +} + +fun box(): String { + builder { O.foo() } + return O.result +} diff --git a/compiler/testData/codegen/boxAgainstJava/multiplatform/annotationsViaActualTypeAliasFromBinary.kt b/compiler/testData/codegen/box/multiplatform/annotationsViaActualTypeAliasFromBinary.kt similarity index 96% rename from compiler/testData/codegen/boxAgainstJava/multiplatform/annotationsViaActualTypeAliasFromBinary.kt rename to compiler/testData/codegen/box/multiplatform/annotationsViaActualTypeAliasFromBinary.kt index 635fb7d069a..242ff475aa6 100644 --- a/compiler/testData/codegen/boxAgainstJava/multiplatform/annotationsViaActualTypeAliasFromBinary.kt +++ b/compiler/testData/codegen/box/multiplatform/annotationsViaActualTypeAliasFromBinary.kt @@ -1,5 +1,45 @@ +// IGNORE_BACKEND_FIR: JVM_IR +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE // !LANGUAGE: +MultiPlatformProjects // WITH_REFLECT + +// MODULE: lib +// FILE: Jnno.java + +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; + +@Retention(RetentionPolicy.RUNTIME) +public @interface Jnno { + byte b() default 1; + char c() default 'x'; + double d() default 3.14; + float f() default -2.72f; + int i() default 42424242; + int i2() default 21212121 + 32323232; + long j() default 239239239239239L; + long j2() default 239239; + short s() default 42; + boolean z() default true; + byte[] ba() default {-1}; + char[] ca() default {'y'}; + double[] da() default {-3.14159}; + float[] fa() default {2.7218f}; + int[] ia() default {424242}; + long[] ja() default {239239239239L, 239239}; + short[] sa() default {-43}; + boolean[] za() default {false, true}; + String str() default "fi" + "zz"; + Class k() default Number.class; + // E e() default E.E1; + // TODO: A a() default @A("1"); + String[] stra() default {"bu", "zz"}; + Class[] ka() default {double.class, String.class, long[].class, Integer[][][].class, void.class}; + // E[] ea() default {E.E2, E.E3}; + // TODO: A[] aa() default {@A("2"), @A("3")}; +} + +// MODULE: main(lib) // FILE: main.kt // See compiler/testData/diagnostics/tests/multiplatform/defaultArguments/annotationsViaActualTypeAlias2.kt @@ -54,38 +94,3 @@ fun box(): String { return "OK" } - -// FILE: Jnno.java - -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; - -@Retention(RetentionPolicy.RUNTIME) -public @interface Jnno { - byte b() default 1; - char c() default 'x'; - double d() default 3.14; - float f() default -2.72f; - int i() default 42424242; - int i2() default 21212121 + 32323232; - long j() default 239239239239239L; - long j2() default 239239; - short s() default 42; - boolean z() default true; - byte[] ba() default {-1}; - char[] ca() default {'y'}; - double[] da() default {-3.14159}; - float[] fa() default {2.7218f}; - int[] ia() default {424242}; - long[] ja() default {239239239239L, 239239}; - short[] sa() default {-43}; - boolean[] za() default {false, true}; - String str() default "fi" + "zz"; - Class k() default Number.class; - // E e() default E.E1; - // TODO: A a() default @A("1"); - String[] stra() default {"bu", "zz"}; - Class[] ka() default {double.class, String.class, long[].class, Integer[][][].class, void.class}; - // E[] ea() default {E.E2, E.E3}; - // TODO: A[] aa() default {@A("2"), @A("3")}; -} diff --git a/compiler/testData/codegen/boxAgainstJava/notNullAssertions/callAssertions.kt b/compiler/testData/codegen/box/notNullAssertions/callAssertions.kt similarity index 96% rename from compiler/testData/codegen/boxAgainstJava/notNullAssertions/callAssertions.kt rename to compiler/testData/codegen/box/notNullAssertions/callAssertions.kt index b0f8a2f864f..6f7e7530a4a 100644 --- a/compiler/testData/codegen/boxAgainstJava/notNullAssertions/callAssertions.kt +++ b/compiler/testData/codegen/box/notNullAssertions/callAssertions.kt @@ -1,5 +1,51 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE // IGNORE_BACKEND_FIR: JVM_IR // KOTLIN_CONFIGURATION_FLAGS: +JVM.DISABLE_PARAM_ASSERTIONS + +// MODULE: lib +// FILE: A.java + +import org.jetbrains.annotations.NotNull; + +public class A { + @NotNull + public final String NULL = null; + + @NotNull + public static final String STATIC_NULL = null; + + public String foo() { + return null; + } + + public static String staticFoo() { + return null; + } + + public A plus(A a) { + return null; + } + + public A inc() { + return null; + } + + public Object get(Object o) { + return null; + } + + public A a() { return this; } + + public static class B { + public static B b() { return null; } + } + + public static class C { + public static C c() { return null; } + } +} + +// MODULE: main(lib) // FILE: callAssertions.kt class AssertionChecker(val nullPointerExceptionExpected: Boolean) { @@ -81,46 +127,3 @@ fun box(): String { checkAssertions(true) return "OK" } - -// FILE: A.java - -import org.jetbrains.annotations.NotNull; - -public class A { - @NotNull - public final String NULL = null; - - @NotNull - public static final String STATIC_NULL = null; - - public String foo() { - return null; - } - - public static String staticFoo() { - return null; - } - - public A plus(A a) { - return null; - } - - public A inc() { - return null; - } - - public Object get(Object o) { - return null; - } - - public A a() { return this; } - - public static class B { - public static B b() { return null; } - } - - public static class C { - public static C c() { return null; } - } -} - diff --git a/compiler/testData/codegen/boxAgainstJava/notNullAssertions/delegation.kt b/compiler/testData/codegen/box/notNullAssertions/delegation.kt similarity index 85% rename from compiler/testData/codegen/boxAgainstJava/notNullAssertions/delegation.kt rename to compiler/testData/codegen/box/notNullAssertions/delegation.kt index b949c4959bb..f92efb2944a 100644 --- a/compiler/testData/codegen/boxAgainstJava/notNullAssertions/delegation.kt +++ b/compiler/testData/codegen/box/notNullAssertions/delegation.kt @@ -1,4 +1,18 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE // IGNORE_BACKEND_FIR: JVM_IR + +// MODULE: lib +// FILE: Delegation.java + +public class Delegation { + public static class ReturnNull { + public String foo() { + return null; + } + } +} + +// MODULE: main(lib) // FILE: delegation.kt interface Tr { @@ -20,13 +34,3 @@ fun box(): String { return "OK" } } - -// FILE: Delegation.java - -public class Delegation { - public static class ReturnNull { - public String foo() { - return null; - } - } -} diff --git a/compiler/testData/codegen/boxAgainstJava/notNullAssertions/doGenerateParamAssertions.kt b/compiler/testData/codegen/box/notNullAssertions/doGenerateParamAssertions.kt similarity index 88% rename from compiler/testData/codegen/boxAgainstJava/notNullAssertions/doGenerateParamAssertions.kt rename to compiler/testData/codegen/box/notNullAssertions/doGenerateParamAssertions.kt index 170e31be093..0720bcb81d0 100644 --- a/compiler/testData/codegen/boxAgainstJava/notNullAssertions/doGenerateParamAssertions.kt +++ b/compiler/testData/codegen/box/notNullAssertions/doGenerateParamAssertions.kt @@ -1,4 +1,6 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE // KOTLIN_CONFIGURATION_FLAGS: +JVM.DISABLE_CALL_ASSERTIONS +// MODULE: lib // FILE: C.java package test; @@ -18,6 +20,7 @@ public abstract class C { } } +// MODULE: main(lib) // FILE: B.kt import test.C diff --git a/compiler/testData/codegen/boxAgainstJava/notNullAssertions/noCallAssertions.kt b/compiler/testData/codegen/box/notNullAssertions/noCallAssertions.kt similarity index 96% rename from compiler/testData/codegen/boxAgainstJava/notNullAssertions/noCallAssertions.kt rename to compiler/testData/codegen/box/notNullAssertions/noCallAssertions.kt index f2d0df6be19..df29dc2408b 100644 --- a/compiler/testData/codegen/boxAgainstJava/notNullAssertions/noCallAssertions.kt +++ b/compiler/testData/codegen/box/notNullAssertions/noCallAssertions.kt @@ -1,4 +1,50 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE // KOTLIN_CONFIGURATION_FLAGS: +JVM.DISABLE_PARAM_ASSERTIONS, +JVM.DISABLE_CALL_ASSERTIONS + +// MODULE: lib +// FILE: A.java + +import org.jetbrains.annotations.NotNull; + +public class A { + @NotNull + public final String NULL = null; + + @NotNull + public static final String STATIC_NULL = null; + + public String foo() { + return null; + } + + public static String staticFoo() { + return null; + } + + public A plus(A a) { + return null; + } + + public A inc() { + return null; + } + + public Object get(Object o) { + return null; + } + + public A a() { return this; } + + public static class B { + public static B b() { return null; } + } + + public static class C { + public static C c() { return null; } + } +} + +// MODULE: main(lib) // FILE: noCallAssertions.kt class AssertionChecker(val nullPointerExceptionExpected: Boolean) { @@ -80,46 +126,3 @@ fun box(): String { checkAssertions(false) return "OK" } - -// FILE: A.java - -import org.jetbrains.annotations.NotNull; - -public class A { - @NotNull - public final String NULL = null; - - @NotNull - public static final String STATIC_NULL = null; - - public String foo() { - return null; - } - - public static String staticFoo() { - return null; - } - - public A plus(A a) { - return null; - } - - public A inc() { - return null; - } - - public Object get(Object o) { - return null; - } - - public A a() { return this; } - - public static class B { - public static B b() { return null; } - } - - public static class C { - public static C c() { return null; } - } -} - diff --git a/compiler/testData/codegen/boxAgainstJava/notNullAssertions/rightElvisOperand.kt b/compiler/testData/codegen/box/notNullAssertions/rightElvisOperand.kt similarity index 86% rename from compiler/testData/codegen/boxAgainstJava/notNullAssertions/rightElvisOperand.kt rename to compiler/testData/codegen/box/notNullAssertions/rightElvisOperand.kt index 30e4169757e..00b6e5cad57 100644 --- a/compiler/testData/codegen/boxAgainstJava/notNullAssertions/rightElvisOperand.kt +++ b/compiler/testData/codegen/box/notNullAssertions/rightElvisOperand.kt @@ -1,4 +1,6 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE // IGNORE_BACKEND_FIR: JVM_IR +// MODULE: lib // FILE: RightElvisOperand.java class RightElvisOperand { @@ -7,6 +9,7 @@ class RightElvisOperand { } } +// MODULE: main(lib) // FILE: 1.kt fun baz(): String? = null diff --git a/compiler/testData/codegen/boxAgainstJava/oldLanguageVersions/ieee754/explicitEqualsCallNull.kt b/compiler/testData/codegen/box/oldLanguageVersions/ieee754/explicitEqualsCallNull.kt similarity index 85% rename from compiler/testData/codegen/boxAgainstJava/oldLanguageVersions/ieee754/explicitEqualsCallNull.kt rename to compiler/testData/codegen/box/oldLanguageVersions/ieee754/explicitEqualsCallNull.kt index 36720fd190f..c5fc02efb8c 100644 --- a/compiler/testData/codegen/boxAgainstJava/oldLanguageVersions/ieee754/explicitEqualsCallNull.kt +++ b/compiler/testData/codegen/box/oldLanguageVersions/ieee754/explicitEqualsCallNull.kt @@ -1,6 +1,8 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE // !LANGUAGE: -ThrowNpeOnExplicitEqualsForBoxedNull // IGNORE_BACKEND: JVM_IR // ^ ThrowNpeOnExplicitEqualsForBoxedNull is introduced in 1.2. +// MODULE: lib // FILE: JavaClass.java public class JavaClass { @@ -20,6 +22,7 @@ public class JavaClass { } +// MODULE: main(lib) // FILE: b.kt fun box(): String { diff --git a/compiler/testData/codegen/boxAgainstJava/platformTypes/genericUnit.kt b/compiler/testData/codegen/box/platformTypes/genericUnit.kt similarity index 85% rename from compiler/testData/codegen/boxAgainstJava/platformTypes/genericUnit.kt rename to compiler/testData/codegen/box/platformTypes/genericUnit.kt index 092582f1f91..7ce17472580 100644 --- a/compiler/testData/codegen/boxAgainstJava/platformTypes/genericUnit.kt +++ b/compiler/testData/codegen/box/platformTypes/genericUnit.kt @@ -1,3 +1,5 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: Foo.java public class Foo { @@ -12,6 +14,7 @@ public class Foo { } } +// MODULE: main(lib) // FILE: 1.kt import Foo.* diff --git a/compiler/testData/codegen/boxAgainstJava/platformTypes/kt14989.kt b/compiler/testData/codegen/box/platformTypes/kt14989.kt similarity index 76% rename from compiler/testData/codegen/boxAgainstJava/platformTypes/kt14989.kt rename to compiler/testData/codegen/box/platformTypes/kt14989.kt index e41114c8b5e..40c6dae52a7 100644 --- a/compiler/testData/codegen/boxAgainstJava/platformTypes/kt14989.kt +++ b/compiler/testData/codegen/box/platformTypes/kt14989.kt @@ -1,4 +1,6 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE //WITH_RUNTIME +// MODULE: lib // FILE: JavaClass.java public class JavaClass { @@ -9,6 +11,7 @@ public class JavaClass { } +// MODULE: main(lib) // FILE: b.kt fun test(s: Double) { @@ -23,4 +26,4 @@ fun box(): String { return "OK" } return "fail" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxAgainstJava/platformTypes/specializedMapFull.kt b/compiler/testData/codegen/box/platformTypes/specializedMapFull.kt similarity index 96% rename from compiler/testData/codegen/boxAgainstJava/platformTypes/specializedMapFull.kt rename to compiler/testData/codegen/box/platformTypes/specializedMapFull.kt index 8beed0ad8ed..0e4a274484e 100644 --- a/compiler/testData/codegen/boxAgainstJava/platformTypes/specializedMapFull.kt +++ b/compiler/testData/codegen/box/platformTypes/specializedMapFull.kt @@ -1,5 +1,7 @@ -// FILE: AbstractSpecializedMap.java +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE // IGNORE_BACKEND_FIR: JVM_IR +// MODULE: lib +// FILE: AbstractSpecializedMap.java public abstract class AbstractSpecializedMap implements java.util.Map { public abstract double put(int x, double y); public abstract double remove(int k); @@ -98,6 +100,7 @@ public class SpecializedMap extends AbstractSpecializedMap { } } +// MODULE: main(lib) // FILE: main.kt fun box(): String { val x = SpecializedMap() diff --git a/compiler/testData/codegen/boxAgainstJava/platformTypes/specializedMapPut.kt b/compiler/testData/codegen/box/platformTypes/specializedMapPut.kt similarity index 80% rename from compiler/testData/codegen/boxAgainstJava/platformTypes/specializedMapPut.kt rename to compiler/testData/codegen/box/platformTypes/specializedMapPut.kt index fbd978d172a..e29959f2411 100644 --- a/compiler/testData/codegen/boxAgainstJava/platformTypes/specializedMapPut.kt +++ b/compiler/testData/codegen/box/platformTypes/specializedMapPut.kt @@ -1,5 +1,7 @@ -// FILE: A.java +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE // IGNORE_BACKEND_FIR: JVM_IR +// MODULE: lib +// FILE: A.java import java.util.HashMap; public class A extends HashMap { @@ -13,6 +15,7 @@ public class A extends HashMap { } } +// MODULE: main(lib) // FILE: main.kt fun box(): String { val o = A() diff --git a/compiler/testData/codegen/boxAgainstJava/property/fieldAccessFromExtensionInTraitImpl.kt b/compiler/testData/codegen/box/property/fieldAccessFromExtensionInTraitImpl.kt similarity index 69% rename from compiler/testData/codegen/boxAgainstJava/property/fieldAccessFromExtensionInTraitImpl.kt rename to compiler/testData/codegen/box/property/fieldAccessFromExtensionInTraitImpl.kt index 6b16c4c6faf..8b535611e97 100644 --- a/compiler/testData/codegen/boxAgainstJava/property/fieldAccessFromExtensionInTraitImpl.kt +++ b/compiler/testData/codegen/box/property/fieldAccessFromExtensionInTraitImpl.kt @@ -1,9 +1,12 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: D.java public class D { public final String result = "OK"; } +// MODULE: main(lib) // FILE: 1.kt // KT-4878 diff --git a/compiler/testData/codegen/boxAgainstJava/property/fieldAccessViaSubclass.kt b/compiler/testData/codegen/box/property/fieldAccessViaSubclass.kt similarity index 74% rename from compiler/testData/codegen/boxAgainstJava/property/fieldAccessViaSubclass.kt rename to compiler/testData/codegen/box/property/fieldAccessViaSubclass.kt index 6e84f669dad..9cd9484087d 100644 --- a/compiler/testData/codegen/boxAgainstJava/property/fieldAccessViaSubclass.kt +++ b/compiler/testData/codegen/box/property/fieldAccessViaSubclass.kt @@ -1,3 +1,5 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: D.java public class D { @@ -6,6 +8,7 @@ public class D { public static String fieldK; } +// MODULE: main(lib) // FILE: 1.kt // KT-3492 diff --git a/compiler/testData/codegen/boxAgainstJava/property/referenceToJavaFieldViaBridge.kt b/compiler/testData/codegen/box/property/referenceToJavaFieldViaBridge.kt similarity index 70% rename from compiler/testData/codegen/boxAgainstJava/property/referenceToJavaFieldViaBridge.kt rename to compiler/testData/codegen/box/property/referenceToJavaFieldViaBridge.kt index 56dea581110..f68ebb796aa 100644 --- a/compiler/testData/codegen/boxAgainstJava/property/referenceToJavaFieldViaBridge.kt +++ b/compiler/testData/codegen/box/property/referenceToJavaFieldViaBridge.kt @@ -1,3 +1,5 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: test/D.java package test; @@ -6,6 +8,7 @@ public class D { protected String field = "OK"; } +// MODULE: main(lib) // FILE: 1.kt import test.D diff --git a/compiler/testData/codegen/box/ranges/contains/inUntilMaxValue.kt b/compiler/testData/codegen/box/ranges/contains/inUntilMaxValue.kt index 6d7eaa554f5..71f2b6f7692 100644 --- a/compiler/testData/codegen/box/ranges/contains/inUntilMaxValue.kt +++ b/compiler/testData/codegen/box/ranges/contains/inUntilMaxValue.kt @@ -1,6 +1,6 @@ // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME -// KOTLIN_CONFIGURATION_FLAGS: +JVM.USE_OLD_INLINE_CLASSES_MANGLING_SCHEME +// USE_OLD_INLINE_CLASSES_MANGLING_SCHEME fun box(): String { if (Char.MAX_VALUE in Char.MAX_VALUE until Char.MAX_VALUE) return "Fail in Char.MAX_VALUE" @@ -19,4 +19,4 @@ fun box(): String { if (!(ULong.MAX_VALUE !in ULong.MAX_VALUE until ULong.MAX_VALUE)) return "Fail !in ULong.MAX_VALUE" return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/box/ranges/contains/inUntilMinValue.kt b/compiler/testData/codegen/box/ranges/contains/inUntilMinValue.kt index 02e05512f22..79146450a63 100644 --- a/compiler/testData/codegen/box/ranges/contains/inUntilMinValue.kt +++ b/compiler/testData/codegen/box/ranges/contains/inUntilMinValue.kt @@ -1,6 +1,6 @@ // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME -// KOTLIN_CONFIGURATION_FLAGS: +JVM.USE_OLD_INLINE_CLASSES_MANGLING_SCHEME +// USE_OLD_INLINE_CLASSES_MANGLING_SCHEME fun box(): String { if ('b' in 'a' until Char.MIN_VALUE) return "Fail in Char.MIN_VALUE" @@ -19,4 +19,4 @@ fun box(): String { if (!(1uL !in 0uL until ULong.MIN_VALUE)) return "Fail !in ULong.MIN_VALUE" return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/box/ranges/contains/inUntilMinValueNonConst.kt b/compiler/testData/codegen/box/ranges/contains/inUntilMinValueNonConst.kt index cbd0898d652..285ed90b400 100644 --- a/compiler/testData/codegen/box/ranges/contains/inUntilMinValueNonConst.kt +++ b/compiler/testData/codegen/box/ranges/contains/inUntilMinValueNonConst.kt @@ -1,6 +1,6 @@ // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME -// KOTLIN_CONFIGURATION_FLAGS: +JVM.USE_OLD_INLINE_CLASSES_MANGLING_SCHEME +// USE_OLD_INLINE_CLASSES_MANGLING_SCHEME fun box(): String { val charBound = Char.MIN_VALUE @@ -24,4 +24,4 @@ fun box(): String { if (!(1uL !in 0uL until uLongBound)) return "Fail !in ULong.MIN_VALUE" return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxAgainstJava/recursiveRawTypes/kt16528.kt b/compiler/testData/codegen/box/recursiveRawTypes/kt16528.kt similarity index 83% rename from compiler/testData/codegen/boxAgainstJava/recursiveRawTypes/kt16528.kt rename to compiler/testData/codegen/box/recursiveRawTypes/kt16528.kt index c556592861d..fe76358c246 100644 --- a/compiler/testData/codegen/boxAgainstJava/recursiveRawTypes/kt16528.kt +++ b/compiler/testData/codegen/box/recursiveRawTypes/kt16528.kt @@ -1,3 +1,5 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: JavaScriptParser.java public class JavaScriptParser { public String foo() {return "OK";} @@ -9,6 +11,7 @@ public class JSPsiTypeParser {} public class ES6Parser extends JavaScriptParser {} +// MODULE: main(lib) // FILE: main.kt fun createParser(): JavaScriptParser<*> { diff --git a/compiler/testData/codegen/boxAgainstJava/recursiveRawTypes/kt16639.kt b/compiler/testData/codegen/box/recursiveRawTypes/kt16639.kt similarity index 77% rename from compiler/testData/codegen/boxAgainstJava/recursiveRawTypes/kt16639.kt rename to compiler/testData/codegen/box/recursiveRawTypes/kt16639.kt index 41a21c41c7c..67fc49df7b8 100644 --- a/compiler/testData/codegen/boxAgainstJava/recursiveRawTypes/kt16639.kt +++ b/compiler/testData/codegen/box/recursiveRawTypes/kt16639.kt @@ -1,4 +1,7 @@ +// IGNORE_BACKEND_FIR: JVM_IR +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE // WITH_RUNTIME +// MODULE: lib // FILE: Device.java import java.util.Collection; @@ -13,6 +16,7 @@ public class Device { public class Service { } +// MODULE: main(lib) // FILE: loop.kt fun box(): String { diff --git a/compiler/testData/codegen/box/reflection/annotations/onTypes/classLiteralWithExpectedType.kt b/compiler/testData/codegen/box/reflection/annotations/onTypes/classLiteralWithExpectedType.kt index 43923fce2a6..0e66c2c9f4b 100644 --- a/compiler/testData/codegen/box/reflection/annotations/onTypes/classLiteralWithExpectedType.kt +++ b/compiler/testData/codegen/box/reflection/annotations/onTypes/classLiteralWithExpectedType.kt @@ -1,6 +1,7 @@ // IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM // WITH_REFLECT + package test import kotlin.reflect.KClass @@ -23,4 +24,4 @@ fun box(): String { ) return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxAgainstJava/reflection/classLiterals/javaClassLiteral.kt b/compiler/testData/codegen/box/reflection/classLiterals/javaClassLiteral.kt similarity index 65% rename from compiler/testData/codegen/boxAgainstJava/reflection/classLiterals/javaClassLiteral.kt rename to compiler/testData/codegen/box/reflection/classLiterals/javaClassLiteral.kt index 283af7f8ce5..514659455aa 100644 --- a/compiler/testData/codegen/boxAgainstJava/reflection/classLiterals/javaClassLiteral.kt +++ b/compiler/testData/codegen/box/reflection/classLiterals/javaClassLiteral.kt @@ -1,9 +1,12 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE // WITH_REFLECT +// MODULE: lib // FILE: J.java public class J { } +// MODULE: main(lib) // FILE: 1.kt fun box(): String { diff --git a/compiler/testData/codegen/boxAgainstJava/reflection/mapping/jClass2kClass.kt b/compiler/testData/codegen/box/reflection/mapping/jClass2kClass.kt similarity index 61% rename from compiler/testData/codegen/boxAgainstJava/reflection/mapping/jClass2kClass.kt rename to compiler/testData/codegen/box/reflection/mapping/jClass2kClass.kt index 82d511f7988..32b2d34705b 100644 --- a/compiler/testData/codegen/boxAgainstJava/reflection/mapping/jClass2kClass.kt +++ b/compiler/testData/codegen/box/reflection/mapping/jClass2kClass.kt @@ -1,8 +1,12 @@ +// IGNORE_BACKEND_FIR: JVM_IR +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE // WITH_RUNTIME +// MODULE: lib // FILE: J.java public class J {} +// MODULE: main(lib) // FILE: 1.kt import kotlin.test.assertEquals diff --git a/compiler/testData/codegen/boxAgainstJava/reflection/mapping/javaConstructor.kt b/compiler/testData/codegen/box/reflection/mapping/javaConstructor.kt similarity index 81% rename from compiler/testData/codegen/boxAgainstJava/reflection/mapping/javaConstructor.kt rename to compiler/testData/codegen/box/reflection/mapping/javaConstructor.kt index ac7213fdb7e..47c95361880 100644 --- a/compiler/testData/codegen/boxAgainstJava/reflection/mapping/javaConstructor.kt +++ b/compiler/testData/codegen/box/reflection/mapping/javaConstructor.kt @@ -1,4 +1,7 @@ +// IGNORE_BACKEND_FIR: JVM_IR +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE // WITH_REFLECT +// MODULE: lib // FILE: J.java public class J { @@ -9,6 +12,7 @@ public class J { } } +// MODULE: main(lib) // FILE: 1.kt import kotlin.reflect.* diff --git a/compiler/testData/codegen/boxAgainstJava/reflection/mapping/javaFields.kt b/compiler/testData/codegen/box/reflection/mapping/javaFields.kt similarity index 93% rename from compiler/testData/codegen/boxAgainstJava/reflection/mapping/javaFields.kt rename to compiler/testData/codegen/box/reflection/mapping/javaFields.kt index 2d85dc1ec3e..61fd5f5b490 100644 --- a/compiler/testData/codegen/boxAgainstJava/reflection/mapping/javaFields.kt +++ b/compiler/testData/codegen/box/reflection/mapping/javaFields.kt @@ -1,5 +1,8 @@ +// IGNORE_BACKEND_FIR: JVM_IR +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE // WITH_REFLECT // FULL_JDK +// MODULE: lib // FILE: J.java public class J { @@ -12,6 +15,7 @@ public class J { } } +// MODULE: main(lib) // FILE: 1.kt import java.lang.reflect.* diff --git a/compiler/testData/codegen/boxAgainstJava/reflection/mapping/javaMethods.kt b/compiler/testData/codegen/box/reflection/mapping/javaMethods.kt similarity index 88% rename from compiler/testData/codegen/boxAgainstJava/reflection/mapping/javaMethods.kt rename to compiler/testData/codegen/box/reflection/mapping/javaMethods.kt index c86dfe3cdd9..4f0ab11574c 100644 --- a/compiler/testData/codegen/boxAgainstJava/reflection/mapping/javaMethods.kt +++ b/compiler/testData/codegen/box/reflection/mapping/javaMethods.kt @@ -1,4 +1,6 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE // WITH_REFLECT +// MODULE: lib // FILE: J.java public class J { @@ -11,6 +13,7 @@ public class J { } } +// MODULE: main(lib) // FILE: 1.kt import kotlin.reflect.* diff --git a/compiler/testData/codegen/boxAgainstJava/reflection/properties/equalsHashCodeToString.kt b/compiler/testData/codegen/box/reflection/properties/equalsHashCodeToString.kt similarity index 85% rename from compiler/testData/codegen/boxAgainstJava/reflection/properties/equalsHashCodeToString.kt rename to compiler/testData/codegen/box/reflection/properties/equalsHashCodeToString.kt index d3edbc773f3..2ccf9e635bd 100644 --- a/compiler/testData/codegen/boxAgainstJava/reflection/properties/equalsHashCodeToString.kt +++ b/compiler/testData/codegen/box/reflection/properties/equalsHashCodeToString.kt @@ -1,4 +1,6 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE // WITH_REFLECT +// MODULE: lib // FILE: test/J.java package test; @@ -13,6 +15,7 @@ public class J { } } +// MODULE: main(lib) // FILE: 1.kt package test diff --git a/compiler/testData/codegen/box/reified/kt16445.kt b/compiler/testData/codegen/box/reified/kt16445.kt new file mode 100644 index 00000000000..1c4245916ab --- /dev/null +++ b/compiler/testData/codegen/box/reified/kt16445.kt @@ -0,0 +1,11 @@ +interface SomeInterface + +object Container { + private inline fun someMethod() = object : SomeInterface { } + class SomeClass : SomeInterface by someMethod() +} + +fun box(): String { + Container.SomeClass() + return "OK" +} diff --git a/compiler/testData/codegen/boxAgainstJava/sam/adapters/bridgesForOverridden.kt b/compiler/testData/codegen/box/sam/adapters/bridgesForOverridden.kt similarity index 88% rename from compiler/testData/codegen/boxAgainstJava/sam/adapters/bridgesForOverridden.kt rename to compiler/testData/codegen/box/sam/adapters/bridgesForOverridden.kt index d19569ddc10..f52b417924e 100644 --- a/compiler/testData/codegen/boxAgainstJava/sam/adapters/bridgesForOverridden.kt +++ b/compiler/testData/codegen/box/sam/adapters/bridgesForOverridden.kt @@ -1,3 +1,5 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: JavaClass.java class JavaClass { @@ -20,6 +22,7 @@ class JavaClass { } } +// MODULE: main(lib) // FILE: 1.kt fun box(): String? { diff --git a/compiler/testData/codegen/boxAgainstJava/sam/adapters/bridgesForOverriddenComplex.kt b/compiler/testData/codegen/box/sam/adapters/bridgesForOverriddenComplex.kt similarity index 83% rename from compiler/testData/codegen/boxAgainstJava/sam/adapters/bridgesForOverriddenComplex.kt rename to compiler/testData/codegen/box/sam/adapters/bridgesForOverriddenComplex.kt index a05139d7960..7840b3b5088 100644 --- a/compiler/testData/codegen/boxAgainstJava/sam/adapters/bridgesForOverriddenComplex.kt +++ b/compiler/testData/codegen/box/sam/adapters/bridgesForOverriddenComplex.kt @@ -1,3 +1,5 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: JavaClass.java // KT-5912 @@ -18,6 +20,7 @@ class JavaClass { } } +// MODULE: main(lib) // FILE: 1.kt // KT-5912 diff --git a/compiler/testData/codegen/boxAgainstJava/sam/adapters/callAbstractAdapter.kt b/compiler/testData/codegen/box/sam/adapters/callAbstractAdapter.kt similarity index 73% rename from compiler/testData/codegen/boxAgainstJava/sam/adapters/callAbstractAdapter.kt rename to compiler/testData/codegen/box/sam/adapters/callAbstractAdapter.kt index e392c8708c6..4e3eae4dd3c 100644 --- a/compiler/testData/codegen/boxAgainstJava/sam/adapters/callAbstractAdapter.kt +++ b/compiler/testData/codegen/box/sam/adapters/callAbstractAdapter.kt @@ -1,9 +1,12 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: JavaInterface.java interface JavaInterface { void run(Runnable r); } +// MODULE: main(lib) // FILE: 1.kt class Impl: JavaInterface { diff --git a/compiler/testData/codegen/boxAgainstJava/sam/adapters/comparator.kt b/compiler/testData/codegen/box/sam/adapters/comparator.kt similarity index 83% rename from compiler/testData/codegen/boxAgainstJava/sam/adapters/comparator.kt rename to compiler/testData/codegen/box/sam/adapters/comparator.kt index f039b302190..0e653cbcc42 100644 --- a/compiler/testData/codegen/boxAgainstJava/sam/adapters/comparator.kt +++ b/compiler/testData/codegen/box/sam/adapters/comparator.kt @@ -1,3 +1,5 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: JavaClass.java import java.util.*; @@ -8,6 +10,7 @@ class JavaClass { } } +// MODULE: main(lib) // FILE: 1.kt import java.util.* diff --git a/compiler/testData/codegen/boxAgainstJava/sam/adapters/constructor.kt b/compiler/testData/codegen/box/sam/adapters/constructor.kt similarity index 74% rename from compiler/testData/codegen/boxAgainstJava/sam/adapters/constructor.kt rename to compiler/testData/codegen/box/sam/adapters/constructor.kt index 17b6734a918..89e05eb5674 100644 --- a/compiler/testData/codegen/boxAgainstJava/sam/adapters/constructor.kt +++ b/compiler/testData/codegen/box/sam/adapters/constructor.kt @@ -1,3 +1,5 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: JavaClass.java class JavaClass { @@ -12,6 +14,7 @@ class JavaClass { } } +// MODULE: main(lib) // FILE: 1.kt fun box(): String { diff --git a/compiler/testData/codegen/boxAgainstJava/sam/adapters/doubleLongParameters.kt b/compiler/testData/codegen/box/sam/adapters/doubleLongParameters.kt similarity index 76% rename from compiler/testData/codegen/boxAgainstJava/sam/adapters/doubleLongParameters.kt rename to compiler/testData/codegen/box/sam/adapters/doubleLongParameters.kt index b873863d384..461f621903a 100644 --- a/compiler/testData/codegen/boxAgainstJava/sam/adapters/doubleLongParameters.kt +++ b/compiler/testData/codegen/box/sam/adapters/doubleLongParameters.kt @@ -1,9 +1,12 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: GenericInterface.java interface GenericInterface { public T foo(double d, int i, long j, short s); } +// MODULE: main(lib) // FILE: 1.kt internal fun getInterface(): GenericInterface { diff --git a/compiler/testData/codegen/boxAgainstJava/sam/adapters/fileFilter.kt b/compiler/testData/codegen/box/sam/adapters/fileFilter.kt similarity index 84% rename from compiler/testData/codegen/boxAgainstJava/sam/adapters/fileFilter.kt rename to compiler/testData/codegen/box/sam/adapters/fileFilter.kt index 30316e61a28..03a5d374750 100644 --- a/compiler/testData/codegen/boxAgainstJava/sam/adapters/fileFilter.kt +++ b/compiler/testData/codegen/box/sam/adapters/fileFilter.kt @@ -1,3 +1,5 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: JavaClass.java import java.io.*; @@ -8,6 +10,7 @@ class JavaClass { } } +// MODULE: main(lib) // FILE: 1.kt import java.io.* diff --git a/compiler/testData/codegen/boxAgainstJava/sam/adapters/genericSignature.kt b/compiler/testData/codegen/box/sam/adapters/genericSignature.kt similarity index 82% rename from compiler/testData/codegen/boxAgainstJava/sam/adapters/genericSignature.kt rename to compiler/testData/codegen/box/sam/adapters/genericSignature.kt index 45d70951104..3cc49d4db5b 100644 --- a/compiler/testData/codegen/boxAgainstJava/sam/adapters/genericSignature.kt +++ b/compiler/testData/codegen/box/sam/adapters/genericSignature.kt @@ -1,3 +1,5 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: JavaClass.java import java.util.Arrays; @@ -9,6 +11,7 @@ class JavaClass { } } +// MODULE: main(lib) // FILE: 1.kt fun box(): String { diff --git a/compiler/testData/codegen/boxAgainstJava/sam/adapters/implementAdapter.kt b/compiler/testData/codegen/box/sam/adapters/implementAdapter.kt similarity index 75% rename from compiler/testData/codegen/boxAgainstJava/sam/adapters/implementAdapter.kt rename to compiler/testData/codegen/box/sam/adapters/implementAdapter.kt index b628af9941b..73fc3078f7a 100644 --- a/compiler/testData/codegen/boxAgainstJava/sam/adapters/implementAdapter.kt +++ b/compiler/testData/codegen/box/sam/adapters/implementAdapter.kt @@ -1,10 +1,14 @@ +// IGNORE_BACKEND_FIR: JVM_IR +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE // WITH_RUNTIME +// MODULE: lib // FILE: JavaInterface.java interface JavaInterface { void foo(Runnable r); } +// MODULE: main(lib) // FILE: 1.kt class Impl: JavaInterface { diff --git a/compiler/testData/codegen/boxAgainstJava/sam/adapters/inheritedInKotlin.kt b/compiler/testData/codegen/box/sam/adapters/inheritedInKotlin.kt similarity index 72% rename from compiler/testData/codegen/boxAgainstJava/sam/adapters/inheritedInKotlin.kt rename to compiler/testData/codegen/box/sam/adapters/inheritedInKotlin.kt index 7f27754b2fd..ab4da28d97d 100644 --- a/compiler/testData/codegen/boxAgainstJava/sam/adapters/inheritedInKotlin.kt +++ b/compiler/testData/codegen/box/sam/adapters/inheritedInKotlin.kt @@ -1,3 +1,5 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: JavaClass.java class JavaClass { @@ -6,6 +8,7 @@ class JavaClass { } } +// MODULE: main(lib) // FILE: 1.kt internal class KotlinSubclass: JavaClass() { diff --git a/compiler/testData/codegen/boxAgainstJava/sam/adapters/inheritedOverriddenAdapter.kt b/compiler/testData/codegen/box/sam/adapters/inheritedOverriddenAdapter.kt similarity index 87% rename from compiler/testData/codegen/boxAgainstJava/sam/adapters/inheritedOverriddenAdapter.kt rename to compiler/testData/codegen/box/sam/adapters/inheritedOverriddenAdapter.kt index cbe4aff429f..56464fa2950 100644 --- a/compiler/testData/codegen/boxAgainstJava/sam/adapters/inheritedOverriddenAdapter.kt +++ b/compiler/testData/codegen/box/sam/adapters/inheritedOverriddenAdapter.kt @@ -1,5 +1,7 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE // IGNORE_BACKEND_FIR: JVM_IR // WITH_RUNTIME +// MODULE: lib // FILE: Super.java class Super { @@ -21,6 +23,7 @@ class Sub extends Super { } } +// MODULE: main(lib) // FILE: 1.kt fun box(): String { diff --git a/compiler/testData/codegen/boxAgainstJava/sam/adapters/inheritedSimple.kt b/compiler/testData/codegen/box/sam/adapters/inheritedSimple.kt similarity index 74% rename from compiler/testData/codegen/boxAgainstJava/sam/adapters/inheritedSimple.kt rename to compiler/testData/codegen/box/sam/adapters/inheritedSimple.kt index fe0d0d1d8a5..2bcba1ee0c1 100644 --- a/compiler/testData/codegen/boxAgainstJava/sam/adapters/inheritedSimple.kt +++ b/compiler/testData/codegen/box/sam/adapters/inheritedSimple.kt @@ -1,3 +1,5 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: Sub.java class Super { @@ -9,6 +11,7 @@ class Super { class Sub extends Super { } +// MODULE: main(lib) // FILE: 1.kt fun box(): String { diff --git a/compiler/testData/codegen/boxAgainstJava/sam/adapters/localClass.kt b/compiler/testData/codegen/box/sam/adapters/localClass.kt similarity index 80% rename from compiler/testData/codegen/boxAgainstJava/sam/adapters/localClass.kt rename to compiler/testData/codegen/box/sam/adapters/localClass.kt index ac4f86668b9..953e14dcf40 100644 --- a/compiler/testData/codegen/boxAgainstJava/sam/adapters/localClass.kt +++ b/compiler/testData/codegen/box/sam/adapters/localClass.kt @@ -1,3 +1,5 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: JavaClass.java class JavaClass { @@ -12,6 +14,7 @@ class JavaClass { } } +// MODULE: main(lib) // FILE: 1.kt var status: String = "fail" // global property to avoid issues with accessing closure from local class (KT-4174) diff --git a/compiler/testData/codegen/boxAgainstJava/sam/adapters/localObjectConstructor.kt b/compiler/testData/codegen/box/sam/adapters/localObjectConstructor.kt similarity index 76% rename from compiler/testData/codegen/boxAgainstJava/sam/adapters/localObjectConstructor.kt rename to compiler/testData/codegen/box/sam/adapters/localObjectConstructor.kt index d7436c4ec21..9114370e409 100644 --- a/compiler/testData/codegen/boxAgainstJava/sam/adapters/localObjectConstructor.kt +++ b/compiler/testData/codegen/box/sam/adapters/localObjectConstructor.kt @@ -1,3 +1,5 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: JavaClass.java class JavaClass { @@ -12,6 +14,7 @@ class JavaClass { } } +// MODULE: main(lib) // FILE: 1.kt fun box(): String { diff --git a/compiler/testData/codegen/boxAgainstJava/sam/adapters/localObjectConstructorWithFnValue.kt b/compiler/testData/codegen/box/sam/adapters/localObjectConstructorWithFnValue.kt similarity index 76% rename from compiler/testData/codegen/boxAgainstJava/sam/adapters/localObjectConstructorWithFnValue.kt rename to compiler/testData/codegen/box/sam/adapters/localObjectConstructorWithFnValue.kt index adee29d9fe9..3d28d40f4e7 100644 --- a/compiler/testData/codegen/boxAgainstJava/sam/adapters/localObjectConstructorWithFnValue.kt +++ b/compiler/testData/codegen/box/sam/adapters/localObjectConstructorWithFnValue.kt @@ -1,3 +1,5 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: JavaClass.java class JavaClass { @@ -12,6 +14,7 @@ class JavaClass { } } +// MODULE: main(lib) // FILE: 1.kt fun box(): String { diff --git a/compiler/testData/codegen/boxAgainstJava/sam/adapters/nonLiteralAndLiteralRunnable.kt b/compiler/testData/codegen/box/sam/adapters/nonLiteralAndLiteralRunnable.kt similarity index 73% rename from compiler/testData/codegen/boxAgainstJava/sam/adapters/nonLiteralAndLiteralRunnable.kt rename to compiler/testData/codegen/box/sam/adapters/nonLiteralAndLiteralRunnable.kt index 32205c28768..55d37c3f52e 100644 --- a/compiler/testData/codegen/boxAgainstJava/sam/adapters/nonLiteralAndLiteralRunnable.kt +++ b/compiler/testData/codegen/box/sam/adapters/nonLiteralAndLiteralRunnable.kt @@ -1,3 +1,5 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: JavaClass.java class JavaClass { @@ -7,6 +9,7 @@ class JavaClass { } } +// MODULE: main(lib) // FILE: 1.kt fun box(): String { diff --git a/compiler/testData/codegen/boxAgainstJava/sam/adapters/nonLiteralComparator.kt b/compiler/testData/codegen/box/sam/adapters/nonLiteralComparator.kt similarity index 84% rename from compiler/testData/codegen/boxAgainstJava/sam/adapters/nonLiteralComparator.kt rename to compiler/testData/codegen/box/sam/adapters/nonLiteralComparator.kt index 7ff57f31114..a04e01a0b58 100644 --- a/compiler/testData/codegen/boxAgainstJava/sam/adapters/nonLiteralComparator.kt +++ b/compiler/testData/codegen/box/sam/adapters/nonLiteralComparator.kt @@ -1,3 +1,5 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: JavaClass.java import java.util.*; @@ -8,6 +10,7 @@ class JavaClass { } } +// MODULE: main(lib) // FILE: 1.kt import java.util.* diff --git a/compiler/testData/codegen/boxAgainstJava/sam/adapters/nonLiteralInConstructor.kt b/compiler/testData/codegen/box/sam/adapters/nonLiteralInConstructor.kt similarity index 75% rename from compiler/testData/codegen/boxAgainstJava/sam/adapters/nonLiteralInConstructor.kt rename to compiler/testData/codegen/box/sam/adapters/nonLiteralInConstructor.kt index 2d15f8acc86..9cc2761137e 100644 --- a/compiler/testData/codegen/boxAgainstJava/sam/adapters/nonLiteralInConstructor.kt +++ b/compiler/testData/codegen/box/sam/adapters/nonLiteralInConstructor.kt @@ -1,3 +1,5 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: JavaClass.java class JavaClass { @@ -12,6 +14,7 @@ class JavaClass { } } +// MODULE: main(lib) // FILE: 1.kt fun box(): String { diff --git a/compiler/testData/codegen/boxAgainstJava/sam/adapters/nonLiteralNull.kt b/compiler/testData/codegen/box/sam/adapters/nonLiteralNull.kt similarity index 70% rename from compiler/testData/codegen/boxAgainstJava/sam/adapters/nonLiteralNull.kt rename to compiler/testData/codegen/box/sam/adapters/nonLiteralNull.kt index 3a379f8cbd1..7e142c45ae0 100644 --- a/compiler/testData/codegen/boxAgainstJava/sam/adapters/nonLiteralNull.kt +++ b/compiler/testData/codegen/box/sam/adapters/nonLiteralNull.kt @@ -1,3 +1,5 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: JavaClass.java class JavaClass { @@ -6,6 +8,7 @@ class JavaClass { } } +// MODULE: main(lib) // FILE: 1.kt fun box(): String { diff --git a/compiler/testData/codegen/boxAgainstJava/sam/adapters/nonLiteralRunnable.kt b/compiler/testData/codegen/box/sam/adapters/nonLiteralRunnable.kt similarity index 69% rename from compiler/testData/codegen/boxAgainstJava/sam/adapters/nonLiteralRunnable.kt rename to compiler/testData/codegen/box/sam/adapters/nonLiteralRunnable.kt index c7085e2ef61..ca3e5cd9c3b 100644 --- a/compiler/testData/codegen/boxAgainstJava/sam/adapters/nonLiteralRunnable.kt +++ b/compiler/testData/codegen/box/sam/adapters/nonLiteralRunnable.kt @@ -1,3 +1,5 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: JavaClass.java class JavaClass { @@ -6,6 +8,7 @@ class JavaClass { } } +// MODULE: main(lib) // FILE: 1.kt fun box(): String { diff --git a/compiler/testData/codegen/boxAgainstJava/sam/adapters/operators/augmentedAssignmentPure.kt b/compiler/testData/codegen/box/sam/adapters/operators/augmentedAssignmentPure.kt similarity index 89% rename from compiler/testData/codegen/boxAgainstJava/sam/adapters/operators/augmentedAssignmentPure.kt rename to compiler/testData/codegen/box/sam/adapters/operators/augmentedAssignmentPure.kt index 22d19205acb..37dce51f6a2 100644 --- a/compiler/testData/codegen/boxAgainstJava/sam/adapters/operators/augmentedAssignmentPure.kt +++ b/compiler/testData/codegen/box/sam/adapters/operators/augmentedAssignmentPure.kt @@ -1,3 +1,5 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: JavaClass.java class JavaClass { @@ -22,6 +24,7 @@ class JavaClass { } } +// MODULE: main(lib) // FILE: 1.kt fun box(): String { diff --git a/compiler/testData/codegen/boxAgainstJava/sam/adapters/operators/augmentedAssignmentViaSimpleBinary.kt b/compiler/testData/codegen/box/sam/adapters/operators/augmentedAssignmentViaSimpleBinary.kt similarity index 91% rename from compiler/testData/codegen/boxAgainstJava/sam/adapters/operators/augmentedAssignmentViaSimpleBinary.kt rename to compiler/testData/codegen/box/sam/adapters/operators/augmentedAssignmentViaSimpleBinary.kt index f58a96c9272..79fbb2c8864 100644 --- a/compiler/testData/codegen/boxAgainstJava/sam/adapters/operators/augmentedAssignmentViaSimpleBinary.kt +++ b/compiler/testData/codegen/box/sam/adapters/operators/augmentedAssignmentViaSimpleBinary.kt @@ -1,3 +1,5 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: JavaClass.java import org.jetbrains.annotations.NotNull; @@ -29,6 +31,7 @@ class JavaClass { } } +// MODULE: main(lib) // FILE: 1.kt fun box(): String { diff --git a/compiler/testData/codegen/boxAgainstJava/sam/adapters/operators/binary.kt b/compiler/testData/codegen/box/sam/adapters/operators/binary.kt similarity index 91% rename from compiler/testData/codegen/boxAgainstJava/sam/adapters/operators/binary.kt rename to compiler/testData/codegen/box/sam/adapters/operators/binary.kt index dc065243317..0932680a095 100644 --- a/compiler/testData/codegen/boxAgainstJava/sam/adapters/operators/binary.kt +++ b/compiler/testData/codegen/box/sam/adapters/operators/binary.kt @@ -1,3 +1,5 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: JavaClass.java class JavaClass { @@ -32,6 +34,7 @@ class JavaClass { } } +// MODULE: main(lib) // FILE: 1.kt fun box(): String { diff --git a/compiler/testData/codegen/boxAgainstJava/sam/adapters/operators/compareTo.kt b/compiler/testData/codegen/box/sam/adapters/operators/compareTo.kt similarity index 84% rename from compiler/testData/codegen/boxAgainstJava/sam/adapters/operators/compareTo.kt rename to compiler/testData/codegen/box/sam/adapters/operators/compareTo.kt index 8010a965092..3f9ea336de2 100644 --- a/compiler/testData/codegen/boxAgainstJava/sam/adapters/operators/compareTo.kt +++ b/compiler/testData/codegen/box/sam/adapters/operators/compareTo.kt @@ -1,3 +1,5 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: JavaClass.java class JavaClass { @@ -7,6 +9,7 @@ class JavaClass { } } +// MODULE: main(lib) // FILE: 1.kt fun box(): String { diff --git a/compiler/testData/codegen/boxAgainstJava/sam/adapters/operators/contains.kt b/compiler/testData/codegen/box/sam/adapters/operators/contains.kt similarity index 73% rename from compiler/testData/codegen/boxAgainstJava/sam/adapters/operators/contains.kt rename to compiler/testData/codegen/box/sam/adapters/operators/contains.kt index c091691ef1c..679064770b6 100644 --- a/compiler/testData/codegen/boxAgainstJava/sam/adapters/operators/contains.kt +++ b/compiler/testData/codegen/box/sam/adapters/operators/contains.kt @@ -1,3 +1,5 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: JavaClass.java class JavaClass { @@ -7,6 +9,7 @@ class JavaClass { } } +// MODULE: main(lib) // FILE: 1.kt fun box(): String { diff --git a/compiler/testData/codegen/boxAgainstJava/sam/adapters/operators/get.kt b/compiler/testData/codegen/box/sam/adapters/operators/get.kt similarity index 70% rename from compiler/testData/codegen/boxAgainstJava/sam/adapters/operators/get.kt rename to compiler/testData/codegen/box/sam/adapters/operators/get.kt index a5a2e75de06..64810e93907 100644 --- a/compiler/testData/codegen/boxAgainstJava/sam/adapters/operators/get.kt +++ b/compiler/testData/codegen/box/sam/adapters/operators/get.kt @@ -1,3 +1,5 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: JavaClass.java class JavaClass { @@ -7,6 +9,7 @@ class JavaClass { } } +// MODULE: main(lib) // FILE: 1.kt fun box(): String { diff --git a/compiler/testData/codegen/boxAgainstJava/sam/adapters/operators/invoke.kt b/compiler/testData/codegen/box/sam/adapters/operators/invoke.kt similarity index 70% rename from compiler/testData/codegen/boxAgainstJava/sam/adapters/operators/invoke.kt rename to compiler/testData/codegen/box/sam/adapters/operators/invoke.kt index dbe29715072..44eae363f6c 100644 --- a/compiler/testData/codegen/boxAgainstJava/sam/adapters/operators/invoke.kt +++ b/compiler/testData/codegen/box/sam/adapters/operators/invoke.kt @@ -1,3 +1,5 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: JavaClass.java class JavaClass { @@ -6,6 +8,7 @@ class JavaClass { } } +// MODULE: main(lib) // FILE: 1.kt fun box(): String { diff --git a/compiler/testData/codegen/boxAgainstJava/sam/adapters/operators/legacyModOperator.kt b/compiler/testData/codegen/box/sam/adapters/operators/legacyModOperator.kt similarity index 91% rename from compiler/testData/codegen/boxAgainstJava/sam/adapters/operators/legacyModOperator.kt rename to compiler/testData/codegen/box/sam/adapters/operators/legacyModOperator.kt index 84fc6a235c3..aad574b9490 100644 --- a/compiler/testData/codegen/boxAgainstJava/sam/adapters/operators/legacyModOperator.kt +++ b/compiler/testData/codegen/box/sam/adapters/operators/legacyModOperator.kt @@ -1,5 +1,7 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE // !LANGUAGE: -ProhibitOperatorMod // IGNORE_BACKEND_FIR: JVM_IR +// MODULE: lib // FILE: Java.java import org.jetbrains.annotations.NotNull; @@ -24,6 +26,7 @@ class Binary { } } +// MODULE: main(lib) // FILE: 1.kt fun box(): String { @@ -43,4 +46,4 @@ fun box(): String { if (v3 != "OK") return "binary: $v3" return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxAgainstJava/sam/adapters/operators/multiGetSet.kt b/compiler/testData/codegen/box/sam/adapters/operators/multiGetSet.kt similarity index 85% rename from compiler/testData/codegen/boxAgainstJava/sam/adapters/operators/multiGetSet.kt rename to compiler/testData/codegen/box/sam/adapters/operators/multiGetSet.kt index cfc68e2234d..17839dd61f9 100644 --- a/compiler/testData/codegen/boxAgainstJava/sam/adapters/operators/multiGetSet.kt +++ b/compiler/testData/codegen/box/sam/adapters/operators/multiGetSet.kt @@ -1,3 +1,5 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: JavaClass.java class JavaClass { @@ -14,6 +16,7 @@ class JavaClass { } } +// MODULE: main(lib) // FILE: 1.kt fun box(): String { diff --git a/compiler/testData/codegen/boxAgainstJava/sam/adapters/operators/multiInvoke.kt b/compiler/testData/codegen/box/sam/adapters/operators/multiInvoke.kt similarity index 73% rename from compiler/testData/codegen/boxAgainstJava/sam/adapters/operators/multiInvoke.kt rename to compiler/testData/codegen/box/sam/adapters/operators/multiInvoke.kt index 57789699b0f..4143e115ef9 100644 --- a/compiler/testData/codegen/boxAgainstJava/sam/adapters/operators/multiInvoke.kt +++ b/compiler/testData/codegen/box/sam/adapters/operators/multiInvoke.kt @@ -1,3 +1,5 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: JavaClass.java class JavaClass { @@ -7,6 +9,7 @@ class JavaClass { } } +// MODULE: main(lib) // FILE: 1.kt fun box(): String { diff --git a/compiler/testData/codegen/boxAgainstJava/sam/adapters/operators/set.kt b/compiler/testData/codegen/box/sam/adapters/operators/set.kt similarity index 73% rename from compiler/testData/codegen/boxAgainstJava/sam/adapters/operators/set.kt rename to compiler/testData/codegen/box/sam/adapters/operators/set.kt index 86fb0a0e1e4..e95fb081911 100644 --- a/compiler/testData/codegen/boxAgainstJava/sam/adapters/operators/set.kt +++ b/compiler/testData/codegen/box/sam/adapters/operators/set.kt @@ -1,3 +1,5 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: JavaClass.java class JavaClass { @@ -7,6 +9,7 @@ class JavaClass { } } +// MODULE: main(lib) // FILE: 1.kt fun box(): String { diff --git a/compiler/testData/codegen/boxAgainstJava/sam/adapters/protectedFromBase.kt b/compiler/testData/codegen/box/sam/adapters/protectedFromBase.kt similarity index 79% rename from compiler/testData/codegen/boxAgainstJava/sam/adapters/protectedFromBase.kt rename to compiler/testData/codegen/box/sam/adapters/protectedFromBase.kt index 005c322782e..ae88547cd4c 100644 --- a/compiler/testData/codegen/boxAgainstJava/sam/adapters/protectedFromBase.kt +++ b/compiler/testData/codegen/box/sam/adapters/protectedFromBase.kt @@ -1,3 +1,5 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: JavaClass.java class JavaClass { @@ -6,6 +8,7 @@ class JavaClass { } } +// MODULE: main(lib) // FILE: 1.kt internal class KotlinClass : JavaClass() { diff --git a/compiler/testData/codegen/boxAgainstJava/sam/adapters/severalSamParameters.kt b/compiler/testData/codegen/box/sam/adapters/severalSamParameters.kt similarity index 84% rename from compiler/testData/codegen/boxAgainstJava/sam/adapters/severalSamParameters.kt rename to compiler/testData/codegen/box/sam/adapters/severalSamParameters.kt index b56b1b6e332..e0d29c290d5 100644 --- a/compiler/testData/codegen/boxAgainstJava/sam/adapters/severalSamParameters.kt +++ b/compiler/testData/codegen/box/sam/adapters/severalSamParameters.kt @@ -1,3 +1,5 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: JavaClass.java import java.util.*; @@ -10,6 +12,7 @@ class JavaClass { } } +// MODULE: main(lib) // FILE: 1.kt fun box(): String { diff --git a/compiler/testData/codegen/boxAgainstJava/sam/adapters/simplest.kt b/compiler/testData/codegen/box/sam/adapters/simplest.kt similarity index 68% rename from compiler/testData/codegen/boxAgainstJava/sam/adapters/simplest.kt rename to compiler/testData/codegen/box/sam/adapters/simplest.kt index 31c251d821c..3b03e954434 100644 --- a/compiler/testData/codegen/boxAgainstJava/sam/adapters/simplest.kt +++ b/compiler/testData/codegen/box/sam/adapters/simplest.kt @@ -1,3 +1,5 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: JavaClass.java class JavaClass { @@ -6,6 +8,7 @@ class JavaClass { } } +// MODULE: main(lib) // FILE: 1.kt fun box(): String { diff --git a/compiler/testData/codegen/boxAgainstJava/sam/adapters/superInSecondaryConstructor.kt b/compiler/testData/codegen/box/sam/adapters/superInSecondaryConstructor.kt similarity index 80% rename from compiler/testData/codegen/boxAgainstJava/sam/adapters/superInSecondaryConstructor.kt rename to compiler/testData/codegen/box/sam/adapters/superInSecondaryConstructor.kt index 82f991af8bb..f14d5830fac 100644 --- a/compiler/testData/codegen/boxAgainstJava/sam/adapters/superInSecondaryConstructor.kt +++ b/compiler/testData/codegen/box/sam/adapters/superInSecondaryConstructor.kt @@ -1,10 +1,5 @@ -// FILE: test.kt -class Test : Base { - constructor(f: () -> String) : super(f) -} - -fun box() = Test({ "OK" }).get() - +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: Supplier.java public interface Supplier { T get(); @@ -21,4 +16,12 @@ public class Base { public String get() { return supplier.get(); } -} \ No newline at end of file +} + +// MODULE: main(lib) +// FILE: test.kt +class Test : Base { + constructor(f: () -> String) : super(f) +} + +fun box() = Test({ "OK" }).get() diff --git a/compiler/testData/codegen/boxAgainstJava/sam/adapters/superconstructor.kt b/compiler/testData/codegen/box/sam/adapters/superconstructor.kt similarity index 70% rename from compiler/testData/codegen/boxAgainstJava/sam/adapters/superconstructor.kt rename to compiler/testData/codegen/box/sam/adapters/superconstructor.kt index 3acda61b1bb..a91ab9c5ad0 100644 --- a/compiler/testData/codegen/boxAgainstJava/sam/adapters/superconstructor.kt +++ b/compiler/testData/codegen/box/sam/adapters/superconstructor.kt @@ -1,3 +1,5 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: JavaClass.java class JavaClass { @@ -6,6 +8,7 @@ class JavaClass { } } +// MODULE: main(lib) // FILE: 1.kt internal class KotlinClass(): JavaClass(null) { diff --git a/compiler/testData/codegen/boxAgainstJava/sam/adapters/superconstructorWithClosure.kt b/compiler/testData/codegen/box/sam/adapters/superconstructorWithClosure.kt similarity index 78% rename from compiler/testData/codegen/boxAgainstJava/sam/adapters/superconstructorWithClosure.kt rename to compiler/testData/codegen/box/sam/adapters/superconstructorWithClosure.kt index e0624e72936..4d48eba1c6e 100644 --- a/compiler/testData/codegen/boxAgainstJava/sam/adapters/superconstructorWithClosure.kt +++ b/compiler/testData/codegen/box/sam/adapters/superconstructorWithClosure.kt @@ -1,3 +1,5 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: JavaClass.java class JavaClass { @@ -6,6 +8,7 @@ class JavaClass { } } +// MODULE: main(lib) // FILE: 1.kt var status: String = "fail" // global property to avoid issues with accessing closure from local class (KT-4174) diff --git a/compiler/testData/codegen/boxAgainstJava/sam/adapters/typeParameterOfClass.kt b/compiler/testData/codegen/box/sam/adapters/typeParameterOfClass.kt similarity index 82% rename from compiler/testData/codegen/boxAgainstJava/sam/adapters/typeParameterOfClass.kt rename to compiler/testData/codegen/box/sam/adapters/typeParameterOfClass.kt index a539ef61169..94d9d428586 100644 --- a/compiler/testData/codegen/boxAgainstJava/sam/adapters/typeParameterOfClass.kt +++ b/compiler/testData/codegen/box/sam/adapters/typeParameterOfClass.kt @@ -1,3 +1,5 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: WeirdComparator.java import java.util.*; @@ -8,6 +10,7 @@ class WeirdComparator { } } +// MODULE: main(lib) // FILE: 1.kt fun box(): String { diff --git a/compiler/testData/codegen/boxAgainstJava/sam/adapters/typeParameterOfMethod.kt b/compiler/testData/codegen/box/sam/adapters/typeParameterOfMethod.kt similarity index 88% rename from compiler/testData/codegen/boxAgainstJava/sam/adapters/typeParameterOfMethod.kt rename to compiler/testData/codegen/box/sam/adapters/typeParameterOfMethod.kt index 16b00976a01..8fe16a73cca 100644 --- a/compiler/testData/codegen/boxAgainstJava/sam/adapters/typeParameterOfMethod.kt +++ b/compiler/testData/codegen/box/sam/adapters/typeParameterOfMethod.kt @@ -1,3 +1,5 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: WeirdComparator.java import java.util.*; @@ -12,6 +14,7 @@ class WeirdComparator { } } +// MODULE: main(lib) // FILE: 1.kt fun box(): String { diff --git a/compiler/testData/codegen/boxAgainstJava/sam/adapters/typeParameterOfOuterClass.kt b/compiler/testData/codegen/box/sam/adapters/typeParameterOfOuterClass.kt similarity index 85% rename from compiler/testData/codegen/boxAgainstJava/sam/adapters/typeParameterOfOuterClass.kt rename to compiler/testData/codegen/box/sam/adapters/typeParameterOfOuterClass.kt index 330c8fdf11d..9f585880bc6 100644 --- a/compiler/testData/codegen/boxAgainstJava/sam/adapters/typeParameterOfOuterClass.kt +++ b/compiler/testData/codegen/box/sam/adapters/typeParameterOfOuterClass.kt @@ -1,3 +1,5 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: WeirdComparator.java import java.util.*; @@ -14,6 +16,7 @@ class WeirdComparator { } } +// MODULE: main(lib) // FILE: 1.kt fun box(): String { diff --git a/compiler/testData/codegen/boxAgainstJava/sam/differentFqNames.kt b/compiler/testData/codegen/box/sam/differentFqNames.kt similarity index 71% rename from compiler/testData/codegen/boxAgainstJava/sam/differentFqNames.kt rename to compiler/testData/codegen/box/sam/differentFqNames.kt index bf96e14533b..7275656809f 100644 --- a/compiler/testData/codegen/boxAgainstJava/sam/differentFqNames.kt +++ b/compiler/testData/codegen/box/sam/differentFqNames.kt @@ -1,4 +1,7 @@ +// IGNORE_BACKEND_FIR: JVM_IR +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE // WITH_RUNTIME +// MODULE: lib // FILE: Custom.java class Custom { @@ -7,6 +10,7 @@ class Custom { } } +// MODULE: main(lib) // FILE: 1.kt fun box(): String { diff --git a/compiler/testData/codegen/boxAgainstJava/sam/kt11519.kt b/compiler/testData/codegen/box/sam/kt11519.kt similarity index 89% rename from compiler/testData/codegen/boxAgainstJava/sam/kt11519.kt rename to compiler/testData/codegen/box/sam/kt11519.kt index b24379fa5a3..6555291dbbf 100644 --- a/compiler/testData/codegen/boxAgainstJava/sam/kt11519.kt +++ b/compiler/testData/codegen/box/sam/kt11519.kt @@ -1,5 +1,7 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE // IGNORE_BACKEND_FIR: JVM_IR // SKIP_JDK6 +// MODULE: lib // FILE: Custom.java class Custom { @@ -21,6 +23,7 @@ class Custom { } } +// MODULE: main(lib) // FILE: 1.kt import java.util.Arrays diff --git a/compiler/testData/codegen/boxAgainstJava/sam/kt11519Constructor.kt b/compiler/testData/codegen/box/sam/kt11519Constructor.kt similarity index 89% rename from compiler/testData/codegen/boxAgainstJava/sam/kt11519Constructor.kt rename to compiler/testData/codegen/box/sam/kt11519Constructor.kt index f1139009d1c..b95218669ed 100644 --- a/compiler/testData/codegen/boxAgainstJava/sam/kt11519Constructor.kt +++ b/compiler/testData/codegen/box/sam/kt11519Constructor.kt @@ -1,4 +1,6 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE // SKIP_JDK6 +// MODULE: lib // FILE: Custom.java class Custom { @@ -20,6 +22,7 @@ class Custom { } } +// MODULE: main(lib) // FILE: 1.kt import java.util.Arrays diff --git a/compiler/testData/codegen/boxAgainstJava/sam/kt11696.kt b/compiler/testData/codegen/box/sam/kt11696.kt similarity index 89% rename from compiler/testData/codegen/boxAgainstJava/sam/kt11696.kt rename to compiler/testData/codegen/box/sam/kt11696.kt index 8ec8075223e..3559f916600 100644 --- a/compiler/testData/codegen/boxAgainstJava/sam/kt11696.kt +++ b/compiler/testData/codegen/box/sam/kt11696.kt @@ -1,5 +1,7 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE // IGNORE_BACKEND_FIR: JVM_IR // WITH_RUNTIME +// MODULE: lib // FILE: Promise.java import org.jetbrains.annotations.NotNull; @@ -12,6 +14,7 @@ public abstract class Promise { public abstract Promise done(@NotNull Consumer done); } +// MODULE: main(lib) // FILE: 1.kt class User { fun use(promise: Promise<*>): Promise<*> { diff --git a/compiler/testData/codegen/boxAgainstJava/sam/kt4753.kt b/compiler/testData/codegen/box/sam/kt4753.kt similarity index 70% rename from compiler/testData/codegen/boxAgainstJava/sam/kt4753.kt rename to compiler/testData/codegen/box/sam/kt4753.kt index 83c3e40cfbe..5bbd44163d5 100644 --- a/compiler/testData/codegen/boxAgainstJava/sam/kt4753.kt +++ b/compiler/testData/codegen/box/sam/kt4753.kt @@ -1,3 +1,5 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: Base.java interface Base { @@ -9,6 +11,7 @@ interface Base { interface Derived extends Base { } +// MODULE: main(lib) // FILE: 1.kt fun box(): String { diff --git a/compiler/testData/codegen/boxAgainstJava/sam/kt4753_2.kt b/compiler/testData/codegen/box/sam/kt4753_2.kt similarity index 74% rename from compiler/testData/codegen/boxAgainstJava/sam/kt4753_2.kt rename to compiler/testData/codegen/box/sam/kt4753_2.kt index 9434c9a894e..1bd5047a377 100644 --- a/compiler/testData/codegen/boxAgainstJava/sam/kt4753_2.kt +++ b/compiler/testData/codegen/box/sam/kt4753_2.kt @@ -1,3 +1,5 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: ParamBase.java class ParamBase {} @@ -13,6 +15,7 @@ interface FBase { void call(T t); } +// MODULE: main(lib) // FILE: 1.kt fun box(): String { diff --git a/compiler/testData/codegen/boxAgainstJava/sam/propertyReference.kt b/compiler/testData/codegen/box/sam/propertyReference.kt similarity index 67% rename from compiler/testData/codegen/boxAgainstJava/sam/propertyReference.kt rename to compiler/testData/codegen/box/sam/propertyReference.kt index e61f8a3add8..815e979e639 100644 --- a/compiler/testData/codegen/boxAgainstJava/sam/propertyReference.kt +++ b/compiler/testData/codegen/box/sam/propertyReference.kt @@ -1,9 +1,12 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: Base.java interface Interface { String call(String t); } +// MODULE: main(lib) // FILE: 1.kt val String.property: String diff --git a/compiler/testData/codegen/boxAgainstJava/sam/samConstructorGenericSignature.kt b/compiler/testData/codegen/box/sam/samConstructorGenericSignature.kt similarity index 81% rename from compiler/testData/codegen/boxAgainstJava/sam/samConstructorGenericSignature.kt rename to compiler/testData/codegen/box/sam/samConstructorGenericSignature.kt index c6ee83081fa..4c9ebf2da56 100644 --- a/compiler/testData/codegen/boxAgainstJava/sam/samConstructorGenericSignature.kt +++ b/compiler/testData/codegen/box/sam/samConstructorGenericSignature.kt @@ -1,5 +1,8 @@ +// IGNORE_BACKEND_FIR: JVM_IR +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE // SKIP_JDK6 // WITH_RUNTIME +// MODULE: lib // FILE: JavaClass.java class JavaClass { @@ -12,6 +15,7 @@ class JavaClass { } } +// MODULE: main(lib) // FILE: 1.kt import java.util.Arrays diff --git a/compiler/testData/codegen/boxAgainstJava/sam/smartCastSamConversion.kt b/compiler/testData/codegen/box/sam/smartCastSamConversion.kt similarity index 76% rename from compiler/testData/codegen/boxAgainstJava/sam/smartCastSamConversion.kt rename to compiler/testData/codegen/box/sam/smartCastSamConversion.kt index 563ecbc76a8..ae47f814af1 100644 --- a/compiler/testData/codegen/boxAgainstJava/sam/smartCastSamConversion.kt +++ b/compiler/testData/codegen/box/sam/smartCastSamConversion.kt @@ -1,14 +1,5 @@ -// FILE: test.kt -fun test(a: Any) { - a as (String) -> String - J.use(a) -} - -fun box(): String { - test({s: String? -> s}) - return "OK" -} - +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: JFoo.java public interface JFoo { T foo(T x); @@ -20,3 +11,16 @@ public class J { jfoo.foo(null); } } + + +// MODULE: main(lib) +// FILE: test.kt +fun test(a: Any) { + a as (String) -> String + J.use(a) +} + +fun box(): String { + test({s: String? -> s}) + return "OK" +} diff --git a/compiler/testData/codegen/boxAgainstJava/specialBuiltins/charBuffer.kt b/compiler/testData/codegen/box/specialBuiltins/charBuffer.kt similarity index 90% rename from compiler/testData/codegen/boxAgainstJava/specialBuiltins/charBuffer.kt rename to compiler/testData/codegen/box/specialBuiltins/charBuffer.kt index 4c5410fd6fa..62b84ccfb10 100644 --- a/compiler/testData/codegen/boxAgainstJava/specialBuiltins/charBuffer.kt +++ b/compiler/testData/codegen/box/specialBuiltins/charBuffer.kt @@ -1,5 +1,7 @@ -// FILE: CharBuffer.java +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE // IGNORE_BACKEND_FIR: JVM_IR +// MODULE: lib +// FILE: CharBuffer.java public abstract class CharBuffer implements CharSequence { public final int length() { @@ -29,6 +31,7 @@ public abstract class CharBuffer implements CharSequence { } } +// MODULE: main(lib) // FILE: 1.kt fun box(): String { diff --git a/compiler/testData/codegen/boxAgainstJava/staticFun/classWithNestedEnum.kt b/compiler/testData/codegen/box/staticFun/classWithNestedEnum.kt similarity index 70% rename from compiler/testData/codegen/boxAgainstJava/staticFun/classWithNestedEnum.kt rename to compiler/testData/codegen/box/staticFun/classWithNestedEnum.kt index 4b5b614455f..6bc026cda5a 100644 --- a/compiler/testData/codegen/boxAgainstJava/staticFun/classWithNestedEnum.kt +++ b/compiler/testData/codegen/box/staticFun/classWithNestedEnum.kt @@ -1,3 +1,5 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: test/JavaClass.java package test; @@ -8,6 +10,7 @@ public class JavaClass { public static String foo() { return "OK"; } } +// MODULE: main(lib) // FILE: 1.kt package test diff --git a/compiler/testData/codegen/box/statics/protectedStatic2.kt b/compiler/testData/codegen/box/statics/protectedStatic2.kt index 1a8f42273bf..5b584a702a4 100644 --- a/compiler/testData/codegen/box/statics/protectedStatic2.kt +++ b/compiler/testData/codegen/box/statics/protectedStatic2.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM // FILE: Base.java diff --git a/compiler/testData/codegen/box/statics/simpleStaticInJavaSuperChain.kt b/compiler/testData/codegen/box/statics/simpleStaticInJavaSuperChain.kt new file mode 100644 index 00000000000..85f6fdfa2ed --- /dev/null +++ b/compiler/testData/codegen/box/statics/simpleStaticInJavaSuperChain.kt @@ -0,0 +1,31 @@ +// TARGET_BACKEND: JVM + +// FILE: A.java + +public class A { + public static String s = "A.s: NOT OK"; + public static String f() { + return "A.f: NOT OK"; + } + + public static class B extends A { + public static String s = "OK"; + public static String f() { + return "OK"; + } + } +} + + +// FILE: Kotlin.kt + +class Kotlin: A.B() { + fun getS() = s + fun callF() = f() +} + +fun box(): String { + val kotlin = Kotlin() + if (kotlin.getS() != "OK") return "fail1" + return kotlin.callF() +} diff --git a/compiler/testData/codegen/box/super/interfaceHashCode.kt b/compiler/testData/codegen/box/super/interfaceHashCode.kt index 7a6aeff7fa3..c88e69af2cf 100644 --- a/compiler/testData/codegen/box/super/interfaceHashCode.kt +++ b/compiler/testData/codegen/box/super/interfaceHashCode.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR interface I class C : I { fun foo() = super.hashCode() } diff --git a/compiler/testData/codegen/boxAgainstJava/syntheticExtensions/fromTwoBases.kt b/compiler/testData/codegen/box/syntheticExtensions/fromTwoBases.kt similarity index 76% rename from compiler/testData/codegen/boxAgainstJava/syntheticExtensions/fromTwoBases.kt rename to compiler/testData/codegen/box/syntheticExtensions/fromTwoBases.kt index 62682c70cc4..6b3e9685b13 100644 --- a/compiler/testData/codegen/boxAgainstJava/syntheticExtensions/fromTwoBases.kt +++ b/compiler/testData/codegen/box/syntheticExtensions/fromTwoBases.kt @@ -1,3 +1,5 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: C.java interface A { @@ -17,6 +19,7 @@ class JavaClass implements C { public String getOk() { return "OK"; } } +// MODULE: main(lib) // FILE: 1.kt fun box(): String { diff --git a/compiler/testData/codegen/boxAgainstJava/syntheticExtensions/getter.kt b/compiler/testData/codegen/box/syntheticExtensions/getter.kt similarity index 61% rename from compiler/testData/codegen/boxAgainstJava/syntheticExtensions/getter.kt rename to compiler/testData/codegen/box/syntheticExtensions/getter.kt index eebe2d3d855..8ff171d1ad5 100644 --- a/compiler/testData/codegen/boxAgainstJava/syntheticExtensions/getter.kt +++ b/compiler/testData/codegen/box/syntheticExtensions/getter.kt @@ -1,9 +1,12 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: JavaClass.java class JavaClass { public String getOk() { return "OK"; } } +// MODULE: main(lib) // FILE: 1.kt fun box(): String { diff --git a/compiler/testData/codegen/boxAgainstJava/syntheticExtensions/implicitReceiver.kt b/compiler/testData/codegen/box/syntheticExtensions/implicitReceiver.kt similarity index 76% rename from compiler/testData/codegen/boxAgainstJava/syntheticExtensions/implicitReceiver.kt rename to compiler/testData/codegen/box/syntheticExtensions/implicitReceiver.kt index 165afb33d56..43fa48fbd87 100644 --- a/compiler/testData/codegen/boxAgainstJava/syntheticExtensions/implicitReceiver.kt +++ b/compiler/testData/codegen/box/syntheticExtensions/implicitReceiver.kt @@ -1,3 +1,5 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: JavaClass.java class JavaClass { @@ -12,6 +14,7 @@ class JavaClass { } } +// MODULE: main(lib) // FILE: 1.kt fun box(): String { diff --git a/compiler/testData/codegen/boxAgainstJava/syntheticExtensions/overrideOnlyGetter.kt b/compiler/testData/codegen/box/syntheticExtensions/overrideOnlyGetter.kt similarity index 81% rename from compiler/testData/codegen/boxAgainstJava/syntheticExtensions/overrideOnlyGetter.kt rename to compiler/testData/codegen/box/syntheticExtensions/overrideOnlyGetter.kt index b257e7ae6a0..1f950690ccb 100644 --- a/compiler/testData/codegen/boxAgainstJava/syntheticExtensions/overrideOnlyGetter.kt +++ b/compiler/testData/codegen/box/syntheticExtensions/overrideOnlyGetter.kt @@ -1,3 +1,5 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: JavaClass2.java class JavaClass1 { @@ -11,6 +13,7 @@ class JavaClass2 extends JavaClass1 { public String getSomething() { return (String)value; } } +// MODULE: main(lib) // FILE: 1.kt fun box(): String { diff --git a/compiler/testData/codegen/boxAgainstJava/syntheticExtensions/plusPlus.kt b/compiler/testData/codegen/box/syntheticExtensions/plusPlus.kt similarity index 76% rename from compiler/testData/codegen/boxAgainstJava/syntheticExtensions/plusPlus.kt rename to compiler/testData/codegen/box/syntheticExtensions/plusPlus.kt index bbd1d6928b8..6641dcbbe1e 100644 --- a/compiler/testData/codegen/boxAgainstJava/syntheticExtensions/plusPlus.kt +++ b/compiler/testData/codegen/box/syntheticExtensions/plusPlus.kt @@ -1,3 +1,5 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: JavaClass.java class JavaClass { @@ -12,6 +14,7 @@ class JavaClass { } } +// MODULE: main(lib) // FILE: 1.kt fun box(): String { diff --git a/compiler/testData/codegen/boxAgainstJava/syntheticExtensions/protected.kt b/compiler/testData/codegen/box/syntheticExtensions/protected.kt similarity index 72% rename from compiler/testData/codegen/boxAgainstJava/syntheticExtensions/protected.kt rename to compiler/testData/codegen/box/syntheticExtensions/protected.kt index 855120c7143..5c4431b90cf 100644 --- a/compiler/testData/codegen/boxAgainstJava/syntheticExtensions/protected.kt +++ b/compiler/testData/codegen/box/syntheticExtensions/protected.kt @@ -1,9 +1,12 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: JavaClass.java public class JavaClass { protected String getOk() { return "OK"; } } +// MODULE: main(lib) // FILE: 1.kt package p diff --git a/compiler/testData/codegen/boxAgainstJava/syntheticExtensions/protectedSetter.kt b/compiler/testData/codegen/box/syntheticExtensions/protectedSetter.kt similarity index 79% rename from compiler/testData/codegen/boxAgainstJava/syntheticExtensions/protectedSetter.kt rename to compiler/testData/codegen/box/syntheticExtensions/protectedSetter.kt index 259ce8e0735..28a038e9f0c 100644 --- a/compiler/testData/codegen/boxAgainstJava/syntheticExtensions/protectedSetter.kt +++ b/compiler/testData/codegen/box/syntheticExtensions/protectedSetter.kt @@ -1,3 +1,5 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: JavaClass.java public class JavaClass { @@ -7,6 +9,7 @@ public class JavaClass { protected void setX(String x) { this.x = x; } } +// MODULE: main(lib) // FILE: 1.kt package p diff --git a/compiler/testData/codegen/boxAgainstJava/syntheticExtensions/setter.kt b/compiler/testData/codegen/box/syntheticExtensions/setter.kt similarity index 75% rename from compiler/testData/codegen/boxAgainstJava/syntheticExtensions/setter.kt rename to compiler/testData/codegen/box/syntheticExtensions/setter.kt index 9d1ce3b4f55..d1ac49da876 100644 --- a/compiler/testData/codegen/boxAgainstJava/syntheticExtensions/setter.kt +++ b/compiler/testData/codegen/box/syntheticExtensions/setter.kt @@ -1,3 +1,5 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: JavaClass.java class JavaClass { @@ -12,6 +14,7 @@ class JavaClass { } } +// MODULE: main(lib) // FILE: 1.kt fun box(): String { diff --git a/compiler/testData/codegen/boxAgainstJava/syntheticExtensions/setterNonVoid1.kt b/compiler/testData/codegen/box/syntheticExtensions/setterNonVoid1.kt similarity index 79% rename from compiler/testData/codegen/boxAgainstJava/syntheticExtensions/setterNonVoid1.kt rename to compiler/testData/codegen/box/syntheticExtensions/setterNonVoid1.kt index 353b0dcd215..213a6fa9ee8 100644 --- a/compiler/testData/codegen/boxAgainstJava/syntheticExtensions/setterNonVoid1.kt +++ b/compiler/testData/codegen/box/syntheticExtensions/setterNonVoid1.kt @@ -1,3 +1,5 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: JavaClass.java class JavaClass { @@ -13,6 +15,7 @@ class JavaClass { } } +// MODULE: main(lib) // FILE: 1.kt fun box(): String { diff --git a/compiler/testData/codegen/boxAgainstJava/syntheticExtensions/setterNonVoid2.kt b/compiler/testData/codegen/box/syntheticExtensions/setterNonVoid2.kt similarity index 78% rename from compiler/testData/codegen/boxAgainstJava/syntheticExtensions/setterNonVoid2.kt rename to compiler/testData/codegen/box/syntheticExtensions/setterNonVoid2.kt index ff4e643ff69..406d49a590e 100644 --- a/compiler/testData/codegen/boxAgainstJava/syntheticExtensions/setterNonVoid2.kt +++ b/compiler/testData/codegen/box/syntheticExtensions/setterNonVoid2.kt @@ -1,3 +1,5 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: JavaClass.java class JavaClass { @@ -13,6 +15,7 @@ class JavaClass { } } +// MODULE: main(lib) // FILE: 1.kt fun box(): String { diff --git a/compiler/testData/codegen/boxAgainstJava/throws/delegationAndThrows.kt b/compiler/testData/codegen/box/throws/delegationAndThrows_AgainstCompiled.kt similarity index 75% rename from compiler/testData/codegen/boxAgainstJava/throws/delegationAndThrows.kt rename to compiler/testData/codegen/box/throws/delegationAndThrows_AgainstCompiled.kt index fff6cb67ef1..1eb77a3d5aa 100644 --- a/compiler/testData/codegen/boxAgainstJava/throws/delegationAndThrows.kt +++ b/compiler/testData/codegen/box/throws/delegationAndThrows_AgainstCompiled.kt @@ -1,5 +1,8 @@ +// IGNORE_BACKEND_FIR: JVM_IR +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE // TARGET_BACKEND: JVM // WITH_RUNTIME +// MODULE: lib // FILE: A.java import java.io.IOException; @@ -8,6 +11,7 @@ public interface A { void foo() throws IOException; } +// MODULE: main(lib) // FILE: B.kt class B(a: A) : A by a diff --git a/compiler/testData/codegen/boxAgainstJava/typealias/javaStaticMembersViaTypeAlias.kt b/compiler/testData/codegen/box/typealias/javaStaticMembersViaTypeAlias.kt similarity index 55% rename from compiler/testData/codegen/boxAgainstJava/typealias/javaStaticMembersViaTypeAlias.kt rename to compiler/testData/codegen/box/typealias/javaStaticMembersViaTypeAlias.kt index 75067cb964d..a6ddbf38509 100644 --- a/compiler/testData/codegen/boxAgainstJava/typealias/javaStaticMembersViaTypeAlias.kt +++ b/compiler/testData/codegen/box/typealias/javaStaticMembersViaTypeAlias.kt @@ -1,10 +1,13 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: JTest.java public class JTest { public static String o() { return "O"; } public static final String K = "K"; } +// MODULE: main(lib) // FILE: 1.kt typealias JT = JTest -fun box(): String = JT.o() + JT.K \ No newline at end of file +fun box(): String = JT.o() + JT.K diff --git a/compiler/testData/codegen/box/typealias/typeAliasFunction.kt b/compiler/testData/codegen/box/typealias/typeAliasFunction.kt new file mode 100644 index 00000000000..a585b5a2fef --- /dev/null +++ b/compiler/testData/codegen/box/typealias/typeAliasFunction.kt @@ -0,0 +1,5 @@ +typealias F = (X?) -> X + +fun invoke(f: F) = f(null) + +fun box() = invoke { it ?: "OK" } diff --git a/compiler/testData/codegen/box/unsignedTypes/unsignedRangeIterator.kt b/compiler/testData/codegen/box/unsignedTypes/unsignedRangeIterator.kt index 4932f2971e6..231ed35f7a1 100644 --- a/compiler/testData/codegen/box/unsignedTypes/unsignedRangeIterator.kt +++ b/compiler/testData/codegen/box/unsignedTypes/unsignedRangeIterator.kt @@ -1,6 +1,6 @@ // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME -// KOTLIN_CONFIGURATION_FLAGS: +JVM.USE_OLD_INLINE_CLASSES_MANGLING_SCHEME +// USE_OLD_INLINE_CLASSES_MANGLING_SCHEME fun testUIntRangeForEach() { var s = 0 @@ -42,4 +42,4 @@ fun box(): String { testULongProgressionForEach() return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/box/valueClasses/jvmInline.kt b/compiler/testData/codegen/box/valueClasses/jvmInline.kt index e5dda1f3c98..dbe7ca8d057 100644 --- a/compiler/testData/codegen/box/valueClasses/jvmInline.kt +++ b/compiler/testData/codegen/box/valueClasses/jvmInline.kt @@ -2,6 +2,7 @@ // KJS_WITH_FULL_RUNTIME // IGNORE_DEXING // IGNORE_BACKEND: WASM +// IGNORE_BACKEND_FIR: JVM_IR // IGNORE_BACKEND: ANDROID // FILE: 1.kt @@ -994,7 +995,9 @@ suspend fun test() { } fun builder(c: suspend () -> Unit) { - c.startCoroutine(Continuation(EmptyCoroutineContext) {}) + c.startCoroutine(Continuation(EmptyCoroutineContext) { + it.getOrThrow() + }) } fun box(): String { diff --git a/compiler/testData/codegen/boxAgainstJava/varargs/varargsOverride.kt b/compiler/testData/codegen/box/varargs/varargsOverride.kt similarity index 77% rename from compiler/testData/codegen/boxAgainstJava/varargs/varargsOverride.kt rename to compiler/testData/codegen/box/varargs/varargsOverride.kt index f0bd8bceb3c..d7d2e7e597f 100644 --- a/compiler/testData/codegen/boxAgainstJava/varargs/varargsOverride.kt +++ b/compiler/testData/codegen/box/varargs/varargsOverride.kt @@ -1,3 +1,5 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: A.java public abstract class A { @@ -8,6 +10,7 @@ public abstract class A { } } +// MODULE: main(lib) // FILE: 1.kt val a: A = diff --git a/compiler/testData/codegen/boxAgainstJava/varargs/varargsOverride2.kt b/compiler/testData/codegen/box/varargs/varargsOverride2.kt similarity index 79% rename from compiler/testData/codegen/boxAgainstJava/varargs/varargsOverride2.kt rename to compiler/testData/codegen/box/varargs/varargsOverride2.kt index 68e8a7e1704..b2909813085 100644 --- a/compiler/testData/codegen/boxAgainstJava/varargs/varargsOverride2.kt +++ b/compiler/testData/codegen/box/varargs/varargsOverride2.kt @@ -1,3 +1,5 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: A.java public abstract class A { @@ -8,6 +10,7 @@ public abstract class A { } } +// MODULE: main(lib) // FILE: 1.kt open class Super diff --git a/compiler/testData/codegen/boxAgainstJava/varargs/varargsOverride3.kt b/compiler/testData/codegen/box/varargs/varargsOverride3.kt similarity index 85% rename from compiler/testData/codegen/boxAgainstJava/varargs/varargsOverride3.kt rename to compiler/testData/codegen/box/varargs/varargsOverride3.kt index 643002804b5..8a6bf4d028c 100644 --- a/compiler/testData/codegen/boxAgainstJava/varargs/varargsOverride3.kt +++ b/compiler/testData/codegen/box/varargs/varargsOverride3.kt @@ -1,3 +1,6 @@ +// IGNORE_BACKEND_FIR: JVM_IR +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: A.java public abstract class A { @@ -18,6 +21,7 @@ public abstract class A { } } +// MODULE: main(lib) // FILE: 1.kt open class Super diff --git a/compiler/testData/codegen/boxAgainstJava/visibility/package/kt2781.kt b/compiler/testData/codegen/box/visibility/package/kt2781.kt similarity index 63% rename from compiler/testData/codegen/boxAgainstJava/visibility/package/kt2781.kt rename to compiler/testData/codegen/box/visibility/package/kt2781.kt index f3c423b1d70..ec34c6e66ca 100644 --- a/compiler/testData/codegen/boxAgainstJava/visibility/package/kt2781.kt +++ b/compiler/testData/codegen/box/visibility/package/kt2781.kt @@ -1,3 +1,5 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: J.java import java.lang.String; @@ -10,6 +12,7 @@ class J { } } +// MODULE: main(lib) // FILE: 1.kt fun box() = J("OK").value diff --git a/compiler/testData/codegen/boxAgainstJava/visibility/package/packageClass.kt b/compiler/testData/codegen/box/visibility/package/packageClass.kt similarity index 67% rename from compiler/testData/codegen/boxAgainstJava/visibility/package/packageClass.kt rename to compiler/testData/codegen/box/visibility/package/packageClass.kt index a637d077e6e..4b03690b936 100644 --- a/compiler/testData/codegen/boxAgainstJava/visibility/package/packageClass.kt +++ b/compiler/testData/codegen/box/visibility/package/packageClass.kt @@ -1,3 +1,5 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: protectedPack/J.java package protectedPack; @@ -8,6 +10,7 @@ class J { } } +// MODULE: main(lib) // FILE: 1.kt package protectedPack diff --git a/compiler/testData/codegen/boxAgainstJava/visibility/package/packageFun.kt b/compiler/testData/codegen/box/visibility/package/packageFun.kt similarity index 67% rename from compiler/testData/codegen/boxAgainstJava/visibility/package/packageFun.kt rename to compiler/testData/codegen/box/visibility/package/packageFun.kt index d860abd5307..10412c05620 100644 --- a/compiler/testData/codegen/boxAgainstJava/visibility/package/packageFun.kt +++ b/compiler/testData/codegen/box/visibility/package/packageFun.kt @@ -1,3 +1,5 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: protectedPack/J.java package protectedPack; @@ -8,6 +10,7 @@ public class J { } } +// MODULE: main(lib) // FILE: 1.kt package protectedPack diff --git a/compiler/testData/codegen/boxAgainstJava/visibility/package/packageProperty.kt b/compiler/testData/codegen/box/visibility/package/packageProperty.kt similarity index 65% rename from compiler/testData/codegen/boxAgainstJava/visibility/package/packageProperty.kt rename to compiler/testData/codegen/box/visibility/package/packageProperty.kt index 478ed01a79c..ba65f653ce7 100644 --- a/compiler/testData/codegen/boxAgainstJava/visibility/package/packageProperty.kt +++ b/compiler/testData/codegen/box/visibility/package/packageProperty.kt @@ -1,3 +1,5 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: protectedPack/J.java package protectedPack; @@ -6,6 +8,7 @@ public class J { String test = "OK"; } +// MODULE: main(lib) // FILE: 1.kt package protectedPack diff --git a/compiler/testData/codegen/boxAgainstJava/visibility/protectedAndPackage/overrideProtectedFunInPackage.kt b/compiler/testData/codegen/box/visibility/protectedAndPackage/overrideProtectedFunInPackage.kt similarity index 80% rename from compiler/testData/codegen/boxAgainstJava/visibility/protectedAndPackage/overrideProtectedFunInPackage.kt rename to compiler/testData/codegen/box/visibility/protectedAndPackage/overrideProtectedFunInPackage.kt index 30048a67dce..174cfff96cf 100644 --- a/compiler/testData/codegen/boxAgainstJava/visibility/protectedAndPackage/overrideProtectedFunInPackage.kt +++ b/compiler/testData/codegen/box/visibility/protectedAndPackage/overrideProtectedFunInPackage.kt @@ -1,3 +1,5 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: protectedPack/J.java package protectedPack; @@ -8,6 +10,7 @@ public class J { } } +// MODULE: main(lib) // FILE: 1.kt package protectedPackKotlin diff --git a/compiler/testData/codegen/boxAgainstJava/visibility/protectedAndPackage/protectedAccessor.kt b/compiler/testData/codegen/box/visibility/protectedAndPackage/protectedAccessor.kt similarity index 78% rename from compiler/testData/codegen/boxAgainstJava/visibility/protectedAndPackage/protectedAccessor.kt rename to compiler/testData/codegen/box/visibility/protectedAndPackage/protectedAccessor.kt index 8ce1d0ad8d3..79e9aa03726 100644 --- a/compiler/testData/codegen/boxAgainstJava/visibility/protectedAndPackage/protectedAccessor.kt +++ b/compiler/testData/codegen/box/visibility/protectedAndPackage/protectedAccessor.kt @@ -1,3 +1,5 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: protectedPack/A.java package protectedPack; @@ -9,6 +11,7 @@ public class A { } } +// MODULE: main(lib) // FILE: B.kt import protectedPack.A diff --git a/compiler/testData/codegen/boxAgainstJava/visibility/protectedAndPackage/protectedFunInPackage.kt b/compiler/testData/codegen/box/visibility/protectedAndPackage/protectedFunInPackage.kt similarity index 68% rename from compiler/testData/codegen/boxAgainstJava/visibility/protectedAndPackage/protectedFunInPackage.kt rename to compiler/testData/codegen/box/visibility/protectedAndPackage/protectedFunInPackage.kt index 21c46b6ef48..92a936309c8 100644 --- a/compiler/testData/codegen/boxAgainstJava/visibility/protectedAndPackage/protectedFunInPackage.kt +++ b/compiler/testData/codegen/box/visibility/protectedAndPackage/protectedFunInPackage.kt @@ -1,3 +1,5 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: protectedPack/J.java package protectedPack; @@ -8,6 +10,7 @@ public class J { } } +// MODULE: main(lib) // FILE: 1.kt package protectedPack diff --git a/compiler/testData/codegen/boxAgainstJava/visibility/protectedAndPackage/protectedPropertyInPackage.kt b/compiler/testData/codegen/box/visibility/protectedAndPackage/protectedPropertyInPackage.kt similarity index 66% rename from compiler/testData/codegen/boxAgainstJava/visibility/protectedAndPackage/protectedPropertyInPackage.kt rename to compiler/testData/codegen/box/visibility/protectedAndPackage/protectedPropertyInPackage.kt index ea30a93af3a..6896423e4c7 100644 --- a/compiler/testData/codegen/boxAgainstJava/visibility/protectedAndPackage/protectedPropertyInPackage.kt +++ b/compiler/testData/codegen/box/visibility/protectedAndPackage/protectedPropertyInPackage.kt @@ -1,3 +1,5 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: protectedPack/J.java package protectedPack; @@ -6,6 +8,7 @@ public class J { protected String foo = "OK"; } +// MODULE: main(lib) // FILE: 1.kt package protectedPack diff --git a/compiler/testData/codegen/boxAgainstJava/visibility/protectedAndPackage/protectedPropertyInPackageFromCrossinline.kt b/compiler/testData/codegen/box/visibility/protectedAndPackage/protectedPropertyInPackageFromCrossinline.kt similarity index 74% rename from compiler/testData/codegen/boxAgainstJava/visibility/protectedAndPackage/protectedPropertyInPackageFromCrossinline.kt rename to compiler/testData/codegen/box/visibility/protectedAndPackage/protectedPropertyInPackageFromCrossinline.kt index c02c9e17f76..a75780cbd8c 100644 --- a/compiler/testData/codegen/boxAgainstJava/visibility/protectedAndPackage/protectedPropertyInPackageFromCrossinline.kt +++ b/compiler/testData/codegen/box/visibility/protectedAndPackage/protectedPropertyInPackageFromCrossinline.kt @@ -1,3 +1,5 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: protectedPack/J.java package protectedPack; @@ -6,6 +8,7 @@ public class J { protected String foo = "OK"; } +// MODULE: main(lib) // FILE: 1.kt package protectedPack diff --git a/compiler/testData/codegen/boxAgainstJava/visibility/protectedAndPackage/protectedStaticClass.kt b/compiler/testData/codegen/box/visibility/protectedAndPackage/protectedStaticClass.kt similarity index 78% rename from compiler/testData/codegen/boxAgainstJava/visibility/protectedAndPackage/protectedStaticClass.kt rename to compiler/testData/codegen/box/visibility/protectedAndPackage/protectedStaticClass.kt index 0f54fc2519a..dc1df0a5e34 100644 --- a/compiler/testData/codegen/boxAgainstJava/visibility/protectedAndPackage/protectedStaticClass.kt +++ b/compiler/testData/codegen/box/visibility/protectedAndPackage/protectedStaticClass.kt @@ -1,3 +1,5 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: protectedPack/J.java package protectedPack; @@ -10,6 +12,7 @@ public class J { } } +// MODULE: main(lib) // FILE: 1.kt package protectedPack diff --git a/compiler/testData/codegen/boxAgainstJava/visibility/protectedAndPackage/protectedSuperField.kt b/compiler/testData/codegen/box/visibility/protectedAndPackage/protectedSuperField.kt similarity index 74% rename from compiler/testData/codegen/boxAgainstJava/visibility/protectedAndPackage/protectedSuperField.kt rename to compiler/testData/codegen/box/visibility/protectedAndPackage/protectedSuperField.kt index 36a7f4fdac4..bc06cce9e35 100644 --- a/compiler/testData/codegen/boxAgainstJava/visibility/protectedAndPackage/protectedSuperField.kt +++ b/compiler/testData/codegen/box/visibility/protectedAndPackage/protectedSuperField.kt @@ -1,3 +1,5 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: test/Foo.java package test; @@ -9,6 +11,7 @@ public class Foo { } } +// MODULE: main(lib) // FILE: test.kt import test.Foo diff --git a/compiler/testData/codegen/boxAgainstJava/visibility/protectedAndPackage/protectedSuperMethod.kt b/compiler/testData/codegen/box/visibility/protectedAndPackage/protectedSuperMethod.kt similarity index 81% rename from compiler/testData/codegen/boxAgainstJava/visibility/protectedAndPackage/protectedSuperMethod.kt rename to compiler/testData/codegen/box/visibility/protectedAndPackage/protectedSuperMethod.kt index 330c6ebfeca..3b85752789e 100644 --- a/compiler/testData/codegen/boxAgainstJava/visibility/protectedAndPackage/protectedSuperMethod.kt +++ b/compiler/testData/codegen/box/visibility/protectedAndPackage/protectedSuperMethod.kt @@ -1,3 +1,5 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: test/Foo.java package test; @@ -8,6 +10,7 @@ public class Foo { } } +// MODULE: main(lib) // FILE: test.kt package other diff --git a/compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/funCallInConstructor.kt b/compiler/testData/codegen/box/visibility/protectedStatic/funCallInConstructor.kt similarity index 79% rename from compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/funCallInConstructor.kt rename to compiler/testData/codegen/box/visibility/protectedStatic/funCallInConstructor.kt index f9af830d907..99d915b7bdc 100644 --- a/compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/funCallInConstructor.kt +++ b/compiler/testData/codegen/box/visibility/protectedStatic/funCallInConstructor.kt @@ -1,3 +1,5 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: J.java public class J { @@ -12,6 +14,7 @@ public class J { } } +// MODULE: main(lib) // FILE: 1.kt class A : J(J.protectedFun()) { diff --git a/compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/funClassObject.kt b/compiler/testData/codegen/box/visibility/protectedStatic/funClassObject.kt similarity index 75% rename from compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/funClassObject.kt rename to compiler/testData/codegen/box/visibility/protectedStatic/funClassObject.kt index 76054694c40..3faa4ead481 100644 --- a/compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/funClassObject.kt +++ b/compiler/testData/codegen/box/visibility/protectedStatic/funClassObject.kt @@ -1,3 +1,5 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: J.java public class J { @@ -6,6 +8,7 @@ public class J { } } +// MODULE: main(lib) // FILE: 1.kt class A { diff --git a/compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/funGenericClass.kt b/compiler/testData/codegen/box/visibility/protectedStatic/funGenericClass.kt similarity index 73% rename from compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/funGenericClass.kt rename to compiler/testData/codegen/box/visibility/protectedStatic/funGenericClass.kt index 774e47b8899..51a0e30ad91 100644 --- a/compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/funGenericClass.kt +++ b/compiler/testData/codegen/box/visibility/protectedStatic/funGenericClass.kt @@ -1,3 +1,5 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: J.java public class J { @@ -6,6 +8,7 @@ public class J { } } +// MODULE: main(lib) // FILE: 1.kt class Derived : J() { diff --git a/compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/funNestedStaticClass.kt b/compiler/testData/codegen/box/visibility/protectedStatic/funNestedStaticClass.kt similarity index 77% rename from compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/funNestedStaticClass.kt rename to compiler/testData/codegen/box/visibility/protectedStatic/funNestedStaticClass.kt index 1a1f11fca35..e0efe3bdd65 100644 --- a/compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/funNestedStaticClass.kt +++ b/compiler/testData/codegen/box/visibility/protectedStatic/funNestedStaticClass.kt @@ -1,3 +1,5 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: J.java public class J { @@ -8,6 +10,7 @@ public class J { } } +// MODULE: main(lib) // FILE: 1.kt class Derived : J.Inner() { diff --git a/compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/funNestedStaticClass2.kt b/compiler/testData/codegen/box/visibility/protectedStatic/funNestedStaticClass2.kt similarity index 79% rename from compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/funNestedStaticClass2.kt rename to compiler/testData/codegen/box/visibility/protectedStatic/funNestedStaticClass2.kt index 7c2868a1ac0..32a9cdf90c7 100644 --- a/compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/funNestedStaticClass2.kt +++ b/compiler/testData/codegen/box/visibility/protectedStatic/funNestedStaticClass2.kt @@ -1,3 +1,5 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: J.java public class J { @@ -10,6 +12,7 @@ public class J { } } +// MODULE: main(lib) // FILE: 1.kt class Derived : J.A.B() { diff --git a/compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/funNestedStaticGenericClass.kt b/compiler/testData/codegen/box/visibility/protectedStatic/funNestedStaticGenericClass.kt similarity index 77% rename from compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/funNestedStaticGenericClass.kt rename to compiler/testData/codegen/box/visibility/protectedStatic/funNestedStaticGenericClass.kt index 3b13d4d9212..5560c5be150 100644 --- a/compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/funNestedStaticGenericClass.kt +++ b/compiler/testData/codegen/box/visibility/protectedStatic/funNestedStaticGenericClass.kt @@ -1,3 +1,5 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: J.java public class J { @@ -8,6 +10,7 @@ public class J { } } +// MODULE: main(lib) // FILE: 1.kt class Derived : J.Inner() { diff --git a/compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/funNotDirectSuperClass.kt b/compiler/testData/codegen/box/visibility/protectedStatic/funNotDirectSuperClass.kt similarity index 74% rename from compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/funNotDirectSuperClass.kt rename to compiler/testData/codegen/box/visibility/protectedStatic/funNotDirectSuperClass.kt index b467ac75a02..03135d378d7 100644 --- a/compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/funNotDirectSuperClass.kt +++ b/compiler/testData/codegen/box/visibility/protectedStatic/funNotDirectSuperClass.kt @@ -1,3 +1,5 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: J.java public class J { @@ -6,6 +8,7 @@ public class J { } } +// MODULE: main(lib) // FILE: 1.kt open class A : J() {} diff --git a/compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/funObject.kt b/compiler/testData/codegen/box/visibility/protectedStatic/funObject.kt similarity index 72% rename from compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/funObject.kt rename to compiler/testData/codegen/box/visibility/protectedStatic/funObject.kt index dad18a9f3c1..4b5dadf113c 100644 --- a/compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/funObject.kt +++ b/compiler/testData/codegen/box/visibility/protectedStatic/funObject.kt @@ -1,3 +1,5 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: J.java public class J { @@ -6,6 +8,7 @@ public class J { } } +// MODULE: main(lib) // FILE: 1.kt object A : J() { diff --git a/compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/simpleClass.kt b/compiler/testData/codegen/box/visibility/protectedStatic/simpleClass.kt similarity index 77% rename from compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/simpleClass.kt rename to compiler/testData/codegen/box/visibility/protectedStatic/simpleClass.kt index d96ced04cd1..65ad32a8258 100644 --- a/compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/simpleClass.kt +++ b/compiler/testData/codegen/box/visibility/protectedStatic/simpleClass.kt @@ -1,3 +1,5 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: Base.java public class Base { @@ -9,6 +11,7 @@ public class Base { } } +// MODULE: main(lib) // FILE: 1.kt class Derived : Base() { diff --git a/compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/simpleClass2.kt b/compiler/testData/codegen/box/visibility/protectedStatic/simpleClass2.kt similarity index 80% rename from compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/simpleClass2.kt rename to compiler/testData/codegen/box/visibility/protectedStatic/simpleClass2.kt index b424a86e23c..772826f66eb 100644 --- a/compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/simpleClass2.kt +++ b/compiler/testData/codegen/box/visibility/protectedStatic/simpleClass2.kt @@ -1,3 +1,5 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: Base.java public class Base { @@ -13,6 +15,7 @@ public class Base { } } +// MODULE: main(lib) // FILE: 1.kt class Derived : Base.A() { diff --git a/compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/simpleFun.kt b/compiler/testData/codegen/box/visibility/protectedStatic/simpleFun.kt similarity index 73% rename from compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/simpleFun.kt rename to compiler/testData/codegen/box/visibility/protectedStatic/simpleFun.kt index 41dc7c34ac0..6bb2c889f85 100644 --- a/compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/simpleFun.kt +++ b/compiler/testData/codegen/box/visibility/protectedStatic/simpleFun.kt @@ -1,3 +1,5 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: Base.java public class Base { @@ -6,6 +8,7 @@ public class Base { } } +// MODULE: main(lib) // FILE: 1.kt class Derived : Base() { diff --git a/compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/simpleProperty.kt b/compiler/testData/codegen/box/visibility/protectedStatic/simpleProperty.kt similarity index 73% rename from compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/simpleProperty.kt rename to compiler/testData/codegen/box/visibility/protectedStatic/simpleProperty.kt index 516d168d325..31d02054642 100644 --- a/compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/simpleProperty.kt +++ b/compiler/testData/codegen/box/visibility/protectedStatic/simpleProperty.kt @@ -1,9 +1,12 @@ +// DONT_TARGET_EXACT_BACKEND: JS JS_IR JS_IR_ES6 WASM NATIVE +// MODULE: lib // FILE: Base.java public class Base { protected static final String protectedProperty = "OK"; } +// MODULE: main(lib) // FILE: 1.kt class Derived : Base() { diff --git a/compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnCallSite.kt b/compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnCallSite.kt index 7a81294a751..27dc6cd2224 100644 --- a/compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnCallSite.kt +++ b/compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnCallSite.kt @@ -1,3 +1,4 @@ +// NO_CHECK_LAMBDA_INLINING // FILE: 1.kt package test @@ -15,7 +16,6 @@ inline fun doWork(job: ()-> R) : R { // FILE: 2.kt -//NO_CHECK_LAMBDA_INLINING import test.* fun box() : String { diff --git a/compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnCallSiteSuperParams.kt b/compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnCallSiteSuperParams.kt index bfbbb44d282..698b018e5ac 100644 --- a/compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnCallSiteSuperParams.kt +++ b/compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnCallSiteSuperParams.kt @@ -1,3 +1,4 @@ +// NO_CHECK_LAMBDA_INLINING // FILE: 1.kt package test @@ -15,7 +16,6 @@ inline fun doWork(job: ()-> R) : R { // FILE: 2.kt -//NO_CHECK_LAMBDA_INLINING import test.* fun box() : String { diff --git a/compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnDeclarationSite.kt b/compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnDeclarationSite.kt index 9a8d1f21d2f..c0b9a0e37af 100644 --- a/compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnDeclarationSite.kt +++ b/compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnDeclarationSite.kt @@ -1,3 +1,4 @@ +// NO_CHECK_LAMBDA_INLINING // FILE: 1.kt package test @@ -53,7 +54,6 @@ inline fun doWorkInConstructor(crossinline jobO: ()-> R, crossinline jobK: ( // FILE: 2.kt -//NO_CHECK_LAMBDA_INLINING import test.* fun test1(): String { diff --git a/compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnDeclarationSiteSuperParams.kt b/compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnDeclarationSiteSuperParams.kt index 9344cbacd75..63c12e71632 100644 --- a/compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnDeclarationSiteSuperParams.kt +++ b/compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnDeclarationSiteSuperParams.kt @@ -1,3 +1,4 @@ +// NO_CHECK_LAMBDA_INLINING // FILE: 1.kt package test @@ -40,7 +41,6 @@ inline fun doWorkInConstructor(crossinline jobO: ()-> R, crossinline jobK: ( // FILE: 2.kt -//NO_CHECK_LAMBDA_INLINING import test.* fun test1(): String { diff --git a/compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInline.kt b/compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInline.kt index e93b5834074..f2efe4b2595 100644 --- a/compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInline.kt +++ b/compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInline.kt @@ -1,3 +1,4 @@ +// NO_CHECK_LAMBDA_INLINING // FILE: 1.kt package test @@ -10,7 +11,6 @@ public inline fun call(f: () -> T): T = f() // FILE: 2.kt -//NO_CHECK_LAMBDA_INLINING import test.* fun box(): String { diff --git a/compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInline2.kt b/compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInline2.kt index 65bd20276ef..0d83d5346c3 100644 --- a/compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInline2.kt +++ b/compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInline2.kt @@ -1,3 +1,4 @@ +// NO_CHECK_LAMBDA_INLINING // FILE: 1.kt package test @@ -10,7 +11,6 @@ public inline fun call(f: () -> T): T = f() // FILE: 2.kt -//NO_CHECK_LAMBDA_INLINING import test.* fun box(): String { diff --git a/compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInline3.kt b/compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInline3.kt index c8ad1f3620a..db1605835d3 100644 --- a/compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInline3.kt +++ b/compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInline3.kt @@ -1,3 +1,4 @@ +// NO_CHECK_LAMBDA_INLINING // FILE: 1.kt package test @@ -10,7 +11,6 @@ public inline fun call(crossinline f: () -> T): T = {{ f() }()}() // FILE: 2.kt -//NO_CHECK_LAMBDA_INLINING import test.* fun box(): String { diff --git a/compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInlineObject.kt b/compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInlineObject.kt index 575323aa02a..fbdc4bd5d2f 100644 --- a/compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInlineObject.kt +++ b/compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInlineObject.kt @@ -1,3 +1,4 @@ +// NO_CHECK_LAMBDA_INLINING // FILE: 1.kt package test @@ -20,7 +21,6 @@ public inline fun call(crossinline f: () -> T): T = object : A { // FILE: 2.kt -//NO_CHECK_LAMBDA_INLINING import test.* fun box(): String { diff --git a/compiler/testData/codegen/boxInline/anonymousObject/changingReturnType.kt b/compiler/testData/codegen/boxInline/anonymousObject/changingReturnType.kt index 7f115210d1e..6ec999b6ed5 100644 --- a/compiler/testData/codegen/boxInline/anonymousObject/changingReturnType.kt +++ b/compiler/testData/codegen/boxInline/anonymousObject/changingReturnType.kt @@ -1,3 +1,4 @@ +// NO_CHECK_LAMBDA_INLINING // FILE: 1.kt package test @@ -21,7 +22,6 @@ inline fun Self.directed(): Task = // FILE: 2.kt -//NO_CHECK_LAMBDA_INLINING //KT-7490 import test.* diff --git a/compiler/testData/codegen/boxInline/anonymousObject/inlineCallInsideInlineLambda.kt b/compiler/testData/codegen/boxInline/anonymousObject/inlineCallInsideInlineLambda.kt index f8d3d179c08..fb13f42a35a 100644 --- a/compiler/testData/codegen/boxInline/anonymousObject/inlineCallInsideInlineLambda.kt +++ b/compiler/testData/codegen/boxInline/anonymousObject/inlineCallInsideInlineLambda.kt @@ -1,3 +1,5 @@ +// DUMP_SMAP +// NO_CHECK_LAMBDA_INLINING // FILE: 1.kt package test @@ -15,7 +17,6 @@ object B { } // FILE: 2.kt -// NO_CHECK_LAMBDA_INLINING import test.* @@ -32,45 +33,3 @@ fun box(): String { return z; } -// FILE: 1.smap - -// FILE: 2.smap -SMAP -2.kt -Kotlin -*S Kotlin -*F -+ 1 2.kt -_2Kt -+ 2 1.kt -test/B -*L -1#1,19:1 -13#2,2:20 -*S KotlinDebug -*F -+ 1 2.kt -_2Kt -*L -9#1:20,2 -*E - -SMAP -2.kt -Kotlin -*S Kotlin -*F -+ 1 2.kt -_2Kt$box$1$1 -+ 2 1.kt -test/A -*L -1#1,19:1 -7#2,2:20 -*S KotlinDebug -*F -+ 1 2.kt -_2Kt$box$1$1 -*L -11#1:20,2 -*E diff --git a/compiler/testData/codegen/boxInline/anonymousObject/inlineCallInsideInlineLambda.smap b/compiler/testData/codegen/boxInline/anonymousObject/inlineCallInsideInlineLambda.smap new file mode 100644 index 00000000000..61545021938 --- /dev/null +++ b/compiler/testData/codegen/boxInline/anonymousObject/inlineCallInsideInlineLambda.smap @@ -0,0 +1,43 @@ +// FILE: 1.kt + +// FILE: 2.kt +SMAP +2.kt +Kotlin +*S Kotlin +*F ++ 1 2.kt +_2Kt ++ 2 1.kt +test/B +*L +1#1,36:1 +15#2,2:37 +*S KotlinDebug +*F ++ 1 2.kt +_2Kt +*L +26#1:37,2 +*E + +SMAP +2.kt +Kotlin +*S Kotlin +*F ++ 1 2.kt +_2Kt$box$1$1 ++ 2 1.kt +test/A +*L +1#1,36:1 +9#2,2:37 +*S KotlinDebug +*F ++ 1 2.kt +_2Kt$box$1$1 +*L +28#1:37,2 +*E + diff --git a/compiler/testData/codegen/boxInline/anonymousObject/kt13133.kt b/compiler/testData/codegen/boxInline/anonymousObject/kt13133.kt index 02aa42afd34..43705f544cf 100644 --- a/compiler/testData/codegen/boxInline/anonymousObject/kt13133.kt +++ b/compiler/testData/codegen/boxInline/anonymousObject/kt13133.kt @@ -31,4 +31,3 @@ fun box(): String { return "OK" } - diff --git a/compiler/testData/codegen/boxInline/anonymousObject/kt13182.kt b/compiler/testData/codegen/boxInline/anonymousObject/kt13182.kt index 91d42494a12..012d6a2ae86 100644 --- a/compiler/testData/codegen/boxInline/anonymousObject/kt13182.kt +++ b/compiler/testData/codegen/boxInline/anonymousObject/kt13182.kt @@ -22,4 +22,3 @@ fun box(): String { }() } } - diff --git a/compiler/testData/codegen/boxInline/anonymousObject/kt13374.kt b/compiler/testData/codegen/boxInline/anonymousObject/kt13374.kt index 5db8f48053e..dd611500ec2 100644 --- a/compiler/testData/codegen/boxInline/anonymousObject/kt13374.kt +++ b/compiler/testData/codegen/boxInline/anonymousObject/kt13374.kt @@ -34,4 +34,3 @@ fun box(): String { zz.zz() return result } - diff --git a/compiler/testData/codegen/boxInline/anonymousObject/kt14011.kt b/compiler/testData/codegen/boxInline/anonymousObject/kt14011.kt index 1e8e1ab579c..c3998dbd9e3 100644 --- a/compiler/testData/codegen/boxInline/anonymousObject/kt14011.kt +++ b/compiler/testData/codegen/boxInline/anonymousObject/kt14011.kt @@ -18,4 +18,3 @@ fun box(): String { return result } - diff --git a/compiler/testData/codegen/boxInline/anonymousObject/kt14011_2.kt b/compiler/testData/codegen/boxInline/anonymousObject/kt14011_2.kt index 3997d2aa02f..075ce50b76b 100644 --- a/compiler/testData/codegen/boxInline/anonymousObject/kt14011_2.kt +++ b/compiler/testData/codegen/boxInline/anonymousObject/kt14011_2.kt @@ -18,4 +18,3 @@ fun box(): String { return result } - diff --git a/compiler/testData/codegen/boxInline/anonymousObject/kt14011_3.kt b/compiler/testData/codegen/boxInline/anonymousObject/kt14011_3.kt index 77cf8a653b5..f9ffa64c370 100644 --- a/compiler/testData/codegen/boxInline/anonymousObject/kt14011_3.kt +++ b/compiler/testData/codegen/boxInline/anonymousObject/kt14011_3.kt @@ -22,4 +22,3 @@ fun box(): String { return result } - diff --git a/compiler/testData/codegen/boxInline/anonymousObject/kt15751.kt b/compiler/testData/codegen/boxInline/anonymousObject/kt15751.kt index be971af9fd7..45850deea27 100644 --- a/compiler/testData/codegen/boxInline/anonymousObject/kt15751.kt +++ b/compiler/testData/codegen/boxInline/anonymousObject/kt15751.kt @@ -1,5 +1,5 @@ -// FILE: 1.kt // NO_CHECK_LAMBDA_INLINING +// FILE: 1.kt package test class A { @@ -32,4 +32,4 @@ fun box(): String { var result = "fail" A().foo { result = "OK" } return result -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/anonymousObject/kt16193.kt b/compiler/testData/codegen/boxInline/anonymousObject/kt16193.kt index 7f612614e5a..926e006294d 100644 --- a/compiler/testData/codegen/boxInline/anonymousObject/kt16193.kt +++ b/compiler/testData/codegen/boxInline/anonymousObject/kt16193.kt @@ -1,5 +1,5 @@ // TARGET_BACKEND: JVM -//WITH_RUNTIME +// WITH_RUNTIME //FULL_JDK // FILE: 1.kt package test @@ -27,4 +27,4 @@ fun box(): String { crashMe.invoke() return result -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/anonymousObject/kt17972.kt b/compiler/testData/codegen/boxInline/anonymousObject/kt17972.kt index 42272555489..45acc89773e 100644 --- a/compiler/testData/codegen/boxInline/anonymousObject/kt17972.kt +++ b/compiler/testData/codegen/boxInline/anonymousObject/kt17972.kt @@ -1,3 +1,4 @@ +// NO_CHECK_LAMBDA_INLINING // FILE: 1.kt package test @@ -24,10 +25,9 @@ fun noInline(init: () -> T): T { } // FILE: 2.kt -//NO_CHECK_LAMBDA_INLINING import test.* fun box(): String { return Test().test() -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/anonymousObject/kt17972_2.kt b/compiler/testData/codegen/boxInline/anonymousObject/kt17972_2.kt index 04ac09e1f8e..671ac0d51f2 100644 --- a/compiler/testData/codegen/boxInline/anonymousObject/kt17972_2.kt +++ b/compiler/testData/codegen/boxInline/anonymousObject/kt17972_2.kt @@ -1,3 +1,4 @@ +// NO_CHECK_LAMBDA_INLINING // FILE: 1.kt package test @@ -24,10 +25,9 @@ inline fun inlineFun2(init: () -> T): T { } // FILE: 2.kt -//NO_CHECK_LAMBDA_INLINING import test.* fun box(): String { return Test().test() -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/anonymousObject/kt17972_3.kt b/compiler/testData/codegen/boxInline/anonymousObject/kt17972_3.kt index d5550708d35..6d3e705a32b 100644 --- a/compiler/testData/codegen/boxInline/anonymousObject/kt17972_3.kt +++ b/compiler/testData/codegen/boxInline/anonymousObject/kt17972_3.kt @@ -1,3 +1,4 @@ +// NO_CHECK_LAMBDA_INLINING // FILE: 1.kt package test @@ -26,10 +27,9 @@ fun noInline(init: () -> T): T { } // FILE: 2.kt -//NO_CHECK_LAMBDA_INLINING import test.* fun box(): String { return Test().test() -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/anonymousObject/kt17972_4.kt b/compiler/testData/codegen/boxInline/anonymousObject/kt17972_4.kt index 63a24a7a48c..43d6b45c7d1 100644 --- a/compiler/testData/codegen/boxInline/anonymousObject/kt17972_4.kt +++ b/compiler/testData/codegen/boxInline/anonymousObject/kt17972_4.kt @@ -1,3 +1,4 @@ +// NO_CHECK_LAMBDA_INLINING // FILE: 1.kt package test @@ -28,10 +29,9 @@ fun noInline(init: () -> T): T { } // FILE: 2.kt -//NO_CHECK_LAMBDA_INLINING import test.* fun box(): String { return Test().test() -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/anonymousObject/kt17972_5.kt b/compiler/testData/codegen/boxInline/anonymousObject/kt17972_5.kt index e244855dd3d..a4b2106bd0b 100644 --- a/compiler/testData/codegen/boxInline/anonymousObject/kt17972_5.kt +++ b/compiler/testData/codegen/boxInline/anonymousObject/kt17972_5.kt @@ -1,3 +1,4 @@ +// NO_CHECK_LAMBDA_INLINING // FILE: 1.kt package test @@ -26,10 +27,9 @@ fun noInline(init: () -> T): T { } // FILE: 2.kt -//NO_CHECK_LAMBDA_INLINING import test.* fun box(): String { return Test().test() -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/anonymousObject/kt17972_super.kt b/compiler/testData/codegen/boxInline/anonymousObject/kt17972_super.kt index 81121ef7928..877156d4a40 100644 --- a/compiler/testData/codegen/boxInline/anonymousObject/kt17972_super.kt +++ b/compiler/testData/codegen/boxInline/anonymousObject/kt17972_super.kt @@ -1,3 +1,4 @@ +// NO_CHECK_LAMBDA_INLINING // FILE: 1.kt package test @@ -26,10 +27,9 @@ fun noInline(init: () -> T): T { } // FILE: 2.kt -//NO_CHECK_LAMBDA_INLINING import test.* fun box(): String { return Test().test() -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/anonymousObject/kt17972_super2.kt b/compiler/testData/codegen/boxInline/anonymousObject/kt17972_super2.kt index 8f07e0d611e..4a7564954d0 100644 --- a/compiler/testData/codegen/boxInline/anonymousObject/kt17972_super2.kt +++ b/compiler/testData/codegen/boxInline/anonymousObject/kt17972_super2.kt @@ -1,3 +1,4 @@ +// NO_CHECK_LAMBDA_INLINING // FILE: 1.kt package test @@ -28,10 +29,9 @@ fun noInline(init: () -> T): T { } // FILE: 2.kt -//NO_CHECK_LAMBDA_INLINING import test.* fun box(): String { return Test().test() -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/anonymousObject/kt17972_super3.kt b/compiler/testData/codegen/boxInline/anonymousObject/kt17972_super3.kt index 2e6ec71e3f4..f77a584ad1d 100644 --- a/compiler/testData/codegen/boxInline/anonymousObject/kt17972_super3.kt +++ b/compiler/testData/codegen/boxInline/anonymousObject/kt17972_super3.kt @@ -1,3 +1,4 @@ +// NO_CHECK_LAMBDA_INLINING // FILE: 1.kt package test @@ -30,10 +31,9 @@ fun noInline(init: () -> T): T { } // FILE: 2.kt -//NO_CHECK_LAMBDA_INLINING import test.* fun box(): String { return Test().test() -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/anonymousObject/kt19389.kt b/compiler/testData/codegen/boxInline/anonymousObject/kt19389.kt index 17cd0a8fc78..dbb70055413 100644 --- a/compiler/testData/codegen/boxInline/anonymousObject/kt19389.kt +++ b/compiler/testData/codegen/boxInline/anonymousObject/kt19389.kt @@ -1,10 +1,10 @@ +// NO_CHECK_LAMBDA_INLINING // FILE: 1.kt public inline fun myWith(receiver: T, block: T.() -> R): R { return receiver.block() } // FILE: 2.kt -//NO_CHECK_LAMBDA_INLINING object Foo2 { operator fun Any?.get(key: String) = "OK" } @@ -21,4 +21,4 @@ object Main { fun box(): String { return Main.bar() -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/anonymousObject/kt19399.kt b/compiler/testData/codegen/boxInline/anonymousObject/kt19399.kt index be7f1378341..77d72c38bdb 100644 --- a/compiler/testData/codegen/boxInline/anonymousObject/kt19399.kt +++ b/compiler/testData/codegen/boxInline/anonymousObject/kt19399.kt @@ -1,4 +1,4 @@ -//WITH_RUNTIME +// WITH_RUNTIME // FILE: 1.kt class Foo { var bar = "" @@ -38,4 +38,4 @@ fun box(): String { foo.start() return foo.bar -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/anonymousObject/kt19434.kt b/compiler/testData/codegen/boxInline/anonymousObject/kt19434.kt index 88cfdd9de98..895c8db2cdb 100644 --- a/compiler/testData/codegen/boxInline/anonymousObject/kt19434.kt +++ b/compiler/testData/codegen/boxInline/anonymousObject/kt19434.kt @@ -1,6 +1,6 @@ +// WITH_RUNTIME // TARGET_BACKEND: JVM // FILE: 1.kt -//WITH_RUNTIME package test annotation class MethodAnnotation @@ -21,4 +21,4 @@ import test.* fun box(): String { return reproduceIssue { "OK" } -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/anonymousObject/kt19434_2.kt b/compiler/testData/codegen/boxInline/anonymousObject/kt19434_2.kt index 7f397cb3469..0852e8f7dd3 100644 --- a/compiler/testData/codegen/boxInline/anonymousObject/kt19434_2.kt +++ b/compiler/testData/codegen/boxInline/anonymousObject/kt19434_2.kt @@ -1,6 +1,6 @@ +// WITH_RUNTIME // TARGET_BACKEND: JVM // FILE: 1.kt -//WITH_RUNTIME package test annotation class FieldAnnotation @@ -22,4 +22,4 @@ import test.* fun box(): String { return reproduceIssue { "K" } -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/anonymousObject/kt19723.kt b/compiler/testData/codegen/boxInline/anonymousObject/kt19723.kt index b02b61375c8..fe04838910f 100644 --- a/compiler/testData/codegen/boxInline/anonymousObject/kt19723.kt +++ b/compiler/testData/codegen/boxInline/anonymousObject/kt19723.kt @@ -1,3 +1,4 @@ +// NO_CHECK_LAMBDA_INLINING // FILE: 1.kt package test @@ -6,7 +7,6 @@ inline fun String.fire(message: String? = null) { } // FILE: 2.kt -// NO_CHECK_LAMBDA_INLINING import test.* @@ -18,4 +18,4 @@ fun box(): String { } } return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/anonymousObject/kt29595.kt b/compiler/testData/codegen/boxInline/anonymousObject/kt29595.kt new file mode 100644 index 00000000000..f9139f084ce --- /dev/null +++ b/compiler/testData/codegen/boxInline/anonymousObject/kt29595.kt @@ -0,0 +1,38 @@ +// TARGET_BACKEND: JVM +// NO_CHECK_LAMBDA_INLINING +// WITH_RUNTIME +// IGNORE_BACKEND: JVM +// IGNORE_BACKEND_MULTI_MODULE: JVM, JVM_MULTI_MODULE_OLD_AGAINST_IR +// FILE: 1.kt + +package test + +inline fun foo(crossinline function: () -> T) { + T::class.java.name + + object { + fun bar() { + function() + } + + init { + bar() + } + } +} + +// FILE: 2.kt + +import test.* + +fun box(): String { + var result = "Fail" + foo { + object { + init { + result = "OK" + } + } + } + return result +} diff --git a/compiler/testData/codegen/boxInline/anonymousObject/kt34656.kt b/compiler/testData/codegen/boxInline/anonymousObject/kt34656.kt index 9e6aa1d1bd1..b58c2daf3d1 100644 --- a/compiler/testData/codegen/boxInline/anonymousObject/kt34656.kt +++ b/compiler/testData/codegen/boxInline/anonymousObject/kt34656.kt @@ -18,4 +18,4 @@ val x = f { "O" } fun box() : String { return x.call() -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/anonymousObject/kt38197.kt b/compiler/testData/codegen/boxInline/anonymousObject/kt38197.kt index aa9e6933b1e..4ab0e602cc1 100644 --- a/compiler/testData/codegen/boxInline/anonymousObject/kt38197.kt +++ b/compiler/testData/codegen/boxInline/anonymousObject/kt38197.kt @@ -1,6 +1,6 @@ -// FILE: test.kt -// WITH_RUNTIME // WITH_COROUTINES +// WITH_RUNTIME +// FILE: test.kt var result = "Fail" diff --git a/compiler/testData/codegen/boxInline/anonymousObject/kt42815.kt b/compiler/testData/codegen/boxInline/anonymousObject/kt42815.kt index 9590ce4726f..a515aefe61e 100644 --- a/compiler/testData/codegen/boxInline/anonymousObject/kt42815.kt +++ b/compiler/testData/codegen/boxInline/anonymousObject/kt42815.kt @@ -1,10 +1,10 @@ +// NO_CHECK_LAMBDA_INLINING // FILE: 1.kt package test inline fun myRun(x: () -> String) = x() // FILE: 2.kt -// NO_CHECK_LAMBDA_INLINING import test.* class C { @@ -18,4 +18,4 @@ class C { constructor(y: String) } -fun box(): String = C("").x \ No newline at end of file +fun box(): String = C("").x diff --git a/compiler/testData/codegen/boxInline/anonymousObject/kt42815_delegated.kt b/compiler/testData/codegen/boxInline/anonymousObject/kt42815_delegated.kt index 15051795575..a01a5cb1309 100644 --- a/compiler/testData/codegen/boxInline/anonymousObject/kt42815_delegated.kt +++ b/compiler/testData/codegen/boxInline/anonymousObject/kt42815_delegated.kt @@ -27,4 +27,4 @@ class C { constructor(y: String) } -fun box(): String = C("").x \ No newline at end of file +fun box(): String = C("").x diff --git a/compiler/testData/codegen/boxInline/anonymousObject/kt6007.kt b/compiler/testData/codegen/boxInline/anonymousObject/kt6007.kt new file mode 100644 index 00000000000..e944f22b853 --- /dev/null +++ b/compiler/testData/codegen/boxInline/anonymousObject/kt6007.kt @@ -0,0 +1,27 @@ +// NO_CHECK_LAMBDA_INLINING +// IGNORE_BACKEND: JVM +// IGNORE_BACKEND_MULTI_MODULE: JVM, JVM_MULTI_MODULE_OLD_AGAINST_IR +// FILE: 1.kt + +package test + +open class A + +inline fun call(lambda: () -> T): T { + return lambda() +} + +// FILE: 2.kt + +import test.* + +fun box(): String { + val x = "OK" + val result = call { + object : A() { + val p = x + } + } + + return result.p +} diff --git a/compiler/testData/codegen/boxInline/anonymousObject/kt9064.kt b/compiler/testData/codegen/boxInline/anonymousObject/kt9064.kt index d5a4c742c58..48568a9827b 100644 --- a/compiler/testData/codegen/boxInline/anonymousObject/kt9064.kt +++ b/compiler/testData/codegen/boxInline/anonymousObject/kt9064.kt @@ -1,3 +1,4 @@ +// NO_CHECK_LAMBDA_INLINING // FILE: 1.kt package test @@ -20,7 +21,6 @@ inline fun test(s: () -> Z): Z { // FILE: 2.kt -//NO_CHECK_LAMBDA_INLINING import test.* fun box(): String { diff --git a/compiler/testData/codegen/boxInline/anonymousObject/kt9064v2.kt b/compiler/testData/codegen/boxInline/anonymousObject/kt9064v2.kt index c68ac612b04..d5dadb7fa2a 100644 --- a/compiler/testData/codegen/boxInline/anonymousObject/kt9064v2.kt +++ b/compiler/testData/codegen/boxInline/anonymousObject/kt9064v2.kt @@ -1,3 +1,4 @@ +// NO_CHECK_LAMBDA_INLINING // FILE: 1.kt package test @@ -24,7 +25,6 @@ inline fun test(s: () -> Z): Z { // FILE: 2.kt -//NO_CHECK_LAMBDA_INLINING import test.* fun box(): String { diff --git a/compiler/testData/codegen/boxInline/anonymousObject/objectInLambdaCapturesAnotherObject.kt b/compiler/testData/codegen/boxInline/anonymousObject/objectInLambdaCapturesAnotherObject.kt index 165d34191c8..5d89009247c 100644 --- a/compiler/testData/codegen/boxInline/anonymousObject/objectInLambdaCapturesAnotherObject.kt +++ b/compiler/testData/codegen/boxInline/anonymousObject/objectInLambdaCapturesAnotherObject.kt @@ -1,3 +1,4 @@ +// NO_CHECK_LAMBDA_INLINING // FILE: 1.kt package test @@ -7,7 +8,6 @@ public inline fun myRun(block: () -> Unit) { // FILE: 2.kt -//NO_CHECK_LAMBDA_INLINING import test.* fun box(): String { diff --git a/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/inlinelambdaChain.kt b/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/inlinelambdaChain.kt index 2d1ad3de754..99175772043 100644 --- a/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/inlinelambdaChain.kt +++ b/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/inlinelambdaChain.kt @@ -1,3 +1,4 @@ +// NO_CHECK_LAMBDA_INLINING // FILE: 1.kt package test @@ -33,7 +34,6 @@ class A { // FILE: 2.kt -//NO_CHECK_LAMBDA_INLINING import test.* fun box(): String { diff --git a/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChain.kt b/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChain.kt index e9a6f6be895..fd2de6c7348 100644 --- a/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChain.kt +++ b/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChain.kt @@ -1,3 +1,4 @@ +// NO_CHECK_LAMBDA_INLINING // FILE: 1.kt package test @@ -31,7 +32,6 @@ class A { // FILE: 2.kt -//NO_CHECK_LAMBDA_INLINING import test.* fun box(): String { diff --git a/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChainSimple.kt b/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChainSimple.kt index 6a46172ff5c..805e2f35db2 100644 --- a/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChainSimple.kt +++ b/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChainSimple.kt @@ -1,3 +1,4 @@ +// NO_CHECK_LAMBDA_INLINING // FILE: 1.kt package test @@ -27,7 +28,6 @@ class A { // FILE: 2.kt -//NO_CHECK_LAMBDA_INLINING import test.* fun box(): String { diff --git a/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChainSimple_2.kt b/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChainSimple_2.kt index 2229d03b306..5b10abfcb76 100644 --- a/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChainSimple_2.kt +++ b/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChainSimple_2.kt @@ -1,3 +1,4 @@ +// NO_CHECK_LAMBDA_INLINING // FILE: 1.kt package test @@ -29,7 +30,6 @@ class A { // FILE: 2.kt -//NO_CHECK_LAMBDA_INLINING import test.* fun box(): String { diff --git a/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChain_2.kt b/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChain_2.kt index 52e6faed839..b71f39b14dc 100644 --- a/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChain_2.kt +++ b/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChain_2.kt @@ -1,3 +1,4 @@ +// NO_CHECK_LAMBDA_INLINING // FILE: 1.kt package test @@ -32,7 +33,6 @@ class A { // FILE: 2.kt -//NO_CHECK_LAMBDA_INLINING import test.* fun box(): String { diff --git a/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChain_3.kt b/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChain_3.kt index 94cfc46759f..1c9b689beb6 100644 --- a/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChain_3.kt +++ b/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChain_3.kt @@ -1,3 +1,4 @@ +// NO_CHECK_LAMBDA_INLINING // FILE: 1.kt package test @@ -32,7 +33,6 @@ class A { // FILE: 2.kt -//NO_CHECK_LAMBDA_INLINING import test.* fun box(): String { diff --git a/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/noInlineLambda.kt b/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/noInlineLambda.kt index fa95495148c..72c687a32c5 100644 --- a/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/noInlineLambda.kt +++ b/compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/noInlineLambda.kt @@ -1,3 +1,4 @@ +// NO_CHECK_LAMBDA_INLINING // FILE: 1.kt package test @@ -25,7 +26,6 @@ class B(val o: String, val k: String) { // FILE: 2.kt -//NO_CHECK_LAMBDA_INLINING import test.* fun box(): String { diff --git a/compiler/testData/codegen/boxInline/anonymousObject/sam.kt b/compiler/testData/codegen/boxInline/anonymousObject/sam.kt index d11940a5afb..004211257a2 100644 --- a/compiler/testData/codegen/boxInline/anonymousObject/sam.kt +++ b/compiler/testData/codegen/boxInline/anonymousObject/sam.kt @@ -17,4 +17,3 @@ fun box(): String { return result } - diff --git a/compiler/testData/codegen/boxInline/anonymousObject/sam/kt17091.kt b/compiler/testData/codegen/boxInline/anonymousObject/sam/kt17091.kt index 2c817aedeff..6db6c12e32b 100644 --- a/compiler/testData/codegen/boxInline/anonymousObject/sam/kt17091.kt +++ b/compiler/testData/codegen/boxInline/anonymousObject/sam/kt17091.kt @@ -1,6 +1,6 @@ +// FULL_JDK // TARGET_BACKEND: JVM // FILE: 1.kt -// FULL_JDK package test diff --git a/compiler/testData/codegen/boxInline/anonymousObject/sam/kt21671.kt b/compiler/testData/codegen/boxInline/anonymousObject/sam/kt21671.kt index 02177766d3c..f5c1f4dd4b9 100644 --- a/compiler/testData/codegen/boxInline/anonymousObject/sam/kt21671.kt +++ b/compiler/testData/codegen/boxInline/anonymousObject/sam/kt21671.kt @@ -1,7 +1,7 @@ +// FULL_JDK // IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM // FILE: 1.kt -// FULL_JDK package test import java.util.concurrent.Executors diff --git a/compiler/testData/codegen/boxInline/anonymousObject/sam/kt21671_2.kt b/compiler/testData/codegen/boxInline/anonymousObject/sam/kt21671_2.kt index 80c3f78b55c..549e17b6621 100644 --- a/compiler/testData/codegen/boxInline/anonymousObject/sam/kt21671_2.kt +++ b/compiler/testData/codegen/boxInline/anonymousObject/sam/kt21671_2.kt @@ -1,7 +1,7 @@ +// FULL_JDK // IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM // FILE: 1.kt -// FULL_JDK package test import java.util.concurrent.Executors diff --git a/compiler/testData/codegen/boxInline/anonymousObject/sam/kt21671_3.kt b/compiler/testData/codegen/boxInline/anonymousObject/sam/kt21671_3.kt index 85bce2e68a1..b1b9f8ff0c9 100644 --- a/compiler/testData/codegen/boxInline/anonymousObject/sam/kt21671_3.kt +++ b/compiler/testData/codegen/boxInline/anonymousObject/sam/kt21671_3.kt @@ -1,7 +1,7 @@ +// FULL_JDK // IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM // FILE: 1.kt -// FULL_JDK package test import java.util.concurrent.Executors diff --git a/compiler/testData/codegen/boxInline/anonymousObject/sam/kt22304.kt b/compiler/testData/codegen/boxInline/anonymousObject/sam/kt22304.kt index 55ad5290480..84b94ee69ad 100644 --- a/compiler/testData/codegen/boxInline/anonymousObject/sam/kt22304.kt +++ b/compiler/testData/codegen/boxInline/anonymousObject/sam/kt22304.kt @@ -1,6 +1,6 @@ +// FULL_JDK // TARGET_BACKEND: JVM // FILE: 1.kt -// FULL_JDK package test @@ -24,4 +24,3 @@ fun box() : String { } } } - diff --git a/compiler/testData/codegen/boxInline/anonymousObject/sam/samOnCallSite.kt b/compiler/testData/codegen/boxInline/anonymousObject/sam/samOnCallSite.kt index e42883e304c..3d1cdf7812d 100644 --- a/compiler/testData/codegen/boxInline/anonymousObject/sam/samOnCallSite.kt +++ b/compiler/testData/codegen/boxInline/anonymousObject/sam/samOnCallSite.kt @@ -1,7 +1,8 @@ +// FULL_JDK +// NO_CHECK_LAMBDA_INLINING // IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM // FILE: 1.kt -// FULL_JDK package test @@ -11,7 +12,6 @@ inline fun doWork(job: ()-> Unit) { // FILE: 2.kt -//NO_CHECK_LAMBDA_INLINING import test.* import java.util.concurrent.Executors diff --git a/compiler/testData/codegen/boxInline/anonymousObject/sharedFromCrossinline.kt b/compiler/testData/codegen/boxInline/anonymousObject/sharedFromCrossinline.kt index ca3bfb93949..4f8e83e9483 100644 --- a/compiler/testData/codegen/boxInline/anonymousObject/sharedFromCrossinline.kt +++ b/compiler/testData/codegen/boxInline/anonymousObject/sharedFromCrossinline.kt @@ -26,4 +26,4 @@ import test.* fun box(): String { return test() -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668.kt b/compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668.kt index 6aabb90b5b5..fc112e9a37d 100644 --- a/compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668.kt +++ b/compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668.kt @@ -1,3 +1,4 @@ +// NO_CHECK_LAMBDA_INLINING // FILE: 1.kt package test @@ -23,7 +24,6 @@ class A { // FILE: 2.kt -//NO_CHECK_LAMBDA_INLINING import test.* fun box(): String { diff --git a/compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668_2.kt b/compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668_2.kt index fd874aa8b4b..1aa15ecd316 100644 --- a/compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668_2.kt +++ b/compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668_2.kt @@ -1,3 +1,4 @@ +// NO_CHECK_LAMBDA_INLINING // IGNORE_BACKEND: JS // FILE: 1.kt @@ -18,7 +19,6 @@ class Person(val name: String) { // FILE: 2.kt -//NO_CHECK_LAMBDA_INLINING import test.* fun box(): String { diff --git a/compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668_3.kt b/compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668_3.kt index 72954a802db..00bf2d328e0 100644 --- a/compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668_3.kt +++ b/compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668_3.kt @@ -1,3 +1,4 @@ +// NO_CHECK_LAMBDA_INLINING // IGNORE_BACKEND: JS // FILE: 1.kt @@ -18,7 +19,6 @@ class Person(val name: String) { // FILE: 2.kt -//NO_CHECK_LAMBDA_INLINING import test.* fun box(): String { diff --git a/compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/twoDifferentDispatchReceivers.kt b/compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/twoDifferentDispatchReceivers.kt index 6262b59f8e7..f43a9df08f2 100644 --- a/compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/twoDifferentDispatchReceivers.kt +++ b/compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/twoDifferentDispatchReceivers.kt @@ -1,3 +1,4 @@ +// NO_CHECK_LAMBDA_INLINING // IGNORE_BACKEND: JS // FILE: 1.kt @@ -21,7 +22,6 @@ class Person(val name: String) { // FILE: 2.kt -//NO_CHECK_LAMBDA_INLINING import test.* fun box(): String { diff --git a/compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/twoExtensionReceivers.kt b/compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/twoExtensionReceivers.kt index 6a3117bc503..6030c0268fb 100644 --- a/compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/twoExtensionReceivers.kt +++ b/compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/twoExtensionReceivers.kt @@ -1,3 +1,4 @@ +// NO_CHECK_LAMBDA_INLINING // IGNORE_BACKEND: JS // FILE: 1.kt @@ -17,7 +18,6 @@ fun Person.companyName(call: () -> String) = call() // FILE: 2.kt -//NO_CHECK_LAMBDA_INLINING import test.* fun box(): String { diff --git a/compiler/testData/codegen/boxInline/argumentOrder/boundFunctionReference.kt b/compiler/testData/codegen/boxInline/argumentOrder/boundFunctionReference.kt index 0607fff5303..965184f2ecc 100644 --- a/compiler/testData/codegen/boxInline/argumentOrder/boundFunctionReference.kt +++ b/compiler/testData/codegen/boxInline/argumentOrder/boundFunctionReference.kt @@ -38,4 +38,3 @@ fun box(): String { return "OK" } - diff --git a/compiler/testData/codegen/boxInline/argumentOrder/boundFunctionReference2.kt b/compiler/testData/codegen/boxInline/argumentOrder/boundFunctionReference2.kt index afeec54fea1..0dc1e28cf75 100644 --- a/compiler/testData/codegen/boxInline/argumentOrder/boundFunctionReference2.kt +++ b/compiler/testData/codegen/boxInline/argumentOrder/boundFunctionReference2.kt @@ -38,4 +38,3 @@ fun box(): String { return "OK" } - diff --git a/compiler/testData/codegen/boxInline/argumentOrder/defaultParametersAndLastVararg.kt b/compiler/testData/codegen/boxInline/argumentOrder/defaultParametersAndLastVararg.kt index 09cc2734835..71d393c6b70 100644 --- a/compiler/testData/codegen/boxInline/argumentOrder/defaultParametersAndLastVararg.kt +++ b/compiler/testData/codegen/boxInline/argumentOrder/defaultParametersAndLastVararg.kt @@ -1,9 +1,9 @@ +// WITH_RUNTIME // !LANGUAGE: -UseCorrectExecutionOrderForVarargArguments // IGNORE_BACKEND: JS // IGNORE_BACKEND_FIR: JVM_IR // NO_CHECK_LAMBDA_INLINING // FILE: 1.kt -// WITH_RUNTIME // KJS_WITH_FULL_RUNTIME package test @@ -54,4 +54,3 @@ fun box(): String { return "OK" } - diff --git a/compiler/testData/codegen/boxInline/argumentOrder/defaultParametersAndLastVarargWithCorrectOrder.kt b/compiler/testData/codegen/boxInline/argumentOrder/defaultParametersAndLastVarargWithCorrectOrder.kt index fd92edb8b60..d9103906060 100644 --- a/compiler/testData/codegen/boxInline/argumentOrder/defaultParametersAndLastVarargWithCorrectOrder.kt +++ b/compiler/testData/codegen/boxInline/argumentOrder/defaultParametersAndLastVarargWithCorrectOrder.kt @@ -1,7 +1,7 @@ +// WITH_RUNTIME // !LANGUAGE: +UseCorrectExecutionOrderForVarargArguments // NO_CHECK_LAMBDA_INLINING // FILE: 1.kt -// WITH_RUNTIME // KJS_WITH_FULL_RUNTIME package test @@ -52,4 +52,3 @@ fun box(): String { return "OK" } - diff --git a/compiler/testData/codegen/boxInline/argumentOrder/extensionInClass.kt b/compiler/testData/codegen/boxInline/argumentOrder/extensionInClass.kt index 6d9a45da4c5..d51974ebbe7 100644 --- a/compiler/testData/codegen/boxInline/argumentOrder/extensionInClass.kt +++ b/compiler/testData/codegen/boxInline/argumentOrder/extensionInClass.kt @@ -1,6 +1,6 @@ +// WITH_RUNTIME // NO_CHECK_LAMBDA_INLINING // FILE: 1.kt -// WITH_RUNTIME package test class Z { diff --git a/compiler/testData/codegen/boxInline/argumentOrder/varargAndDefaultParameters.kt b/compiler/testData/codegen/boxInline/argumentOrder/varargAndDefaultParameters.kt index 43223e68c0a..65186240ef6 100644 --- a/compiler/testData/codegen/boxInline/argumentOrder/varargAndDefaultParameters.kt +++ b/compiler/testData/codegen/boxInline/argumentOrder/varargAndDefaultParameters.kt @@ -1,3 +1,5 @@ +// IGNORE_BACKEND: NATIVE +// WITH_RUNTIME // !LANGUAGE: -UseCorrectExecutionOrderForVarargArguments // IGNORE_BACKEND: JVM_IR // IGNORE_BACKEND: JS, JS_IR @@ -6,9 +8,7 @@ // IGNORE_BACKEND_FIR: JVM_IR // NO_CHECK_LAMBDA_INLINING // FILE: 1.kt -// WITH_RUNTIME // KJS_WITH_FULL_RUNTIME -// IGNORE_BACKEND: NATIVE package test open class A(val value: String) @@ -57,4 +57,3 @@ fun box(): String { return "OK" } - diff --git a/compiler/testData/codegen/boxInline/argumentOrder/varargAndDefaultParametersWithCorrectOrder.kt b/compiler/testData/codegen/boxInline/argumentOrder/varargAndDefaultParametersWithCorrectOrder.kt index 44b4ee8548d..edaf2dcef51 100644 --- a/compiler/testData/codegen/boxInline/argumentOrder/varargAndDefaultParametersWithCorrectOrder.kt +++ b/compiler/testData/codegen/boxInline/argumentOrder/varargAndDefaultParametersWithCorrectOrder.kt @@ -1,7 +1,7 @@ +// WITH_RUNTIME // !LANGUAGE: +UseCorrectExecutionOrderForVarargArguments // NO_CHECK_LAMBDA_INLINING // FILE: 1.kt -// WITH_RUNTIME // KJS_WITH_FULL_RUNTIME package test @@ -51,4 +51,3 @@ fun box(): String { return "OK" } - diff --git a/compiler/testData/codegen/boxInline/arrayConvention/simpleAccessInClass.kt b/compiler/testData/codegen/boxInline/arrayConvention/simpleAccessInClass.kt index 98947d35b34..dc03fde71b2 100644 --- a/compiler/testData/codegen/boxInline/arrayConvention/simpleAccessInClass.kt +++ b/compiler/testData/codegen/boxInline/arrayConvention/simpleAccessInClass.kt @@ -1,5 +1,5 @@ -// FILE: 1.kt // WITH_RUNTIME +// FILE: 1.kt package test var res = 1 diff --git a/compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithDefaultInClass.kt b/compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithDefaultInClass.kt index 974b843f626..5e9debf1c8d 100644 --- a/compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithDefaultInClass.kt +++ b/compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithDefaultInClass.kt @@ -1,5 +1,5 @@ -// FILE: 1.kt // WITH_RUNTIME +// FILE: 1.kt package test var res = 1 diff --git a/compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithLambdaInClass.kt b/compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithLambdaInClass.kt index 550aa88fa5d..981e33051f0 100644 --- a/compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithLambdaInClass.kt +++ b/compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithLambdaInClass.kt @@ -1,5 +1,5 @@ -// FILE: 1.kt // WITH_RUNTIME +// FILE: 1.kt package test var res = 1 diff --git a/compiler/testData/codegen/boxInline/assert/jvmAssertInlineFunctionAssertionsDisabled.kt b/compiler/testData/codegen/boxInline/assert/jvmAssertInlineFunctionAssertionsDisabled.kt index 90f80821001..0072e60d236 100644 --- a/compiler/testData/codegen/boxInline/assert/jvmAssertInlineFunctionAssertionsDisabled.kt +++ b/compiler/testData/codegen/boxInline/assert/jvmAssertInlineFunctionAssertionsDisabled.kt @@ -1,7 +1,7 @@ -// KOTLIN_CONFIGURATION_FLAGS: ASSERTIONS_MODE=jvm -// FILE: inline.kt -// WITH_RUNTIME // FULL_JDK +// WITH_RUNTIME +// ASSERTIONS_MODE: jvm +// FILE: inline.kt // TARGET_BACKEND: JVM package test @@ -35,4 +35,4 @@ fun box(): String { var c = disableAssertions() c.check() return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/assert/jvmAssertInlineFunctionAssertionsEnabled.kt b/compiler/testData/codegen/boxInline/assert/jvmAssertInlineFunctionAssertionsEnabled.kt index 5a3c2e7cd52..b492b5b88da 100644 --- a/compiler/testData/codegen/boxInline/assert/jvmAssertInlineFunctionAssertionsEnabled.kt +++ b/compiler/testData/codegen/boxInline/assert/jvmAssertInlineFunctionAssertionsEnabled.kt @@ -1,8 +1,8 @@ -// TARGET_BACKEND: JVM -// FILE: inline.kt -// KOTLIN_CONFIGURATION_FLAGS: ASSERTIONS_MODE=jvm -// WITH_RUNTIME // FULL_JDK +// WITH_RUNTIME +// TARGET_BACKEND: JVM +// ASSERTIONS_MODE: jvm +// FILE: inline.kt package test @@ -38,4 +38,4 @@ fun box(): String { return "FAIL 2" } catch (ignore: AssertionError) {} return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/assert/jvmAssertInlineLambda.kt b/compiler/testData/codegen/boxInline/assert/jvmAssertInlineLambda.kt index 236cc73f0d7..3a1e02e703b 100644 --- a/compiler/testData/codegen/boxInline/assert/jvmAssertInlineLambda.kt +++ b/compiler/testData/codegen/boxInline/assert/jvmAssertInlineLambda.kt @@ -1,8 +1,8 @@ -// TARGET_BACKEND: JVM -// KOTLIN_CONFIGURATION_FLAGS: ASSERTIONS_MODE=jvm -// FILE: inline.kt -// WITH_RUNTIME // NO_CHECK_LAMBDA_INLINING +// WITH_RUNTIME +// TARGET_BACKEND: JVM +// ASSERTIONS_MODE: jvm +// FILE: inline.kt package test @@ -125,4 +125,4 @@ fun box(): String { } catch (ignore: AssertionError) { } return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/assert/jvmClassInitializer.kt b/compiler/testData/codegen/boxInline/assert/jvmClassInitializer.kt index a8f683ca521..e83146e2a39 100644 --- a/compiler/testData/codegen/boxInline/assert/jvmClassInitializer.kt +++ b/compiler/testData/codegen/boxInline/assert/jvmClassInitializer.kt @@ -1,8 +1,8 @@ -// TARGET_BACKEND: JVM -// FILE: inline.kt -// KOTLIN_CONFIGURATION_FLAGS: ASSERTIONS_MODE=jvm -// WITH_RUNTIME // FULL_JDK +// WITH_RUNTIME +// TARGET_BACKEND: JVM +// ASSERTIONS_MODE: jvm +// FILE: inline.kt package test class A { diff --git a/compiler/testData/codegen/boxInline/assert/jvmCompanion.kt b/compiler/testData/codegen/boxInline/assert/jvmCompanion.kt index 5a9cc78e9be..3f62e91cc10 100644 --- a/compiler/testData/codegen/boxInline/assert/jvmCompanion.kt +++ b/compiler/testData/codegen/boxInline/assert/jvmCompanion.kt @@ -1,8 +1,8 @@ -// TARGET_BACKEND: JVM -// FILE: inline.kt -// KOTLIN_CONFIGURATION_FLAGS: ASSERTIONS_MODE=jvm -// WITH_RUNTIME // FULL_JDK +// WITH_RUNTIME +// TARGET_BACKEND: JVM +// ASSERTIONS_MODE: jvm +// FILE: inline.kt package test var result = "OK" diff --git a/compiler/testData/codegen/boxInline/assert/jvmCrossinlineLambda.kt b/compiler/testData/codegen/boxInline/assert/jvmCrossinlineLambda.kt index eaec865e991..f435c0513cd 100644 --- a/compiler/testData/codegen/boxInline/assert/jvmCrossinlineLambda.kt +++ b/compiler/testData/codegen/boxInline/assert/jvmCrossinlineLambda.kt @@ -1,8 +1,8 @@ -// TARGET_BACKEND: JVM -// KOTLIN_CONFIGURATION_FLAGS: ASSERTIONS_MODE=jvm -// FILE: inline.kt -// WITH_RUNTIME // NO_CHECK_LAMBDA_INLINING +// WITH_RUNTIME +// TARGET_BACKEND: JVM +// ASSERTIONS_MODE: jvm +// FILE: inline.kt package test @@ -128,4 +128,4 @@ fun box(): String { } return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/assert/jvmCrossinlineLambda2.kt b/compiler/testData/codegen/boxInline/assert/jvmCrossinlineLambda2.kt index a18624e0d19..7ed04b99e98 100644 --- a/compiler/testData/codegen/boxInline/assert/jvmCrossinlineLambda2.kt +++ b/compiler/testData/codegen/boxInline/assert/jvmCrossinlineLambda2.kt @@ -1,8 +1,8 @@ -// TARGET_BACKEND: JVM -// KOTLIN_CONFIGURATION_FLAGS: ASSERTIONS_MODE=jvm -// FILE: inline.kt -// WITH_RUNTIME // NO_CHECK_LAMBDA_INLINING +// WITH_RUNTIME +// TARGET_BACKEND: JVM +// ASSERTIONS_MODE: jvm +// FILE: inline.kt package test @@ -232,4 +232,4 @@ fun box(): String { } return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/assert/jvmCrossinlineLambdaDeclarationSite.kt b/compiler/testData/codegen/boxInline/assert/jvmCrossinlineLambdaDeclarationSite.kt index 0433feeaea0..9eec178e5f0 100644 --- a/compiler/testData/codegen/boxInline/assert/jvmCrossinlineLambdaDeclarationSite.kt +++ b/compiler/testData/codegen/boxInline/assert/jvmCrossinlineLambdaDeclarationSite.kt @@ -1,8 +1,8 @@ -// TARGET_BACKEND: JVM -// KOTLIN_CONFIGURATION_FLAGS: ASSERTIONS_MODE=jvm -// FILE: inline.kt -// WITH_RUNTIME // NO_CHECK_LAMBDA_INLINING +// WITH_RUNTIME +// TARGET_BACKEND: JVM +// ASSERTIONS_MODE: jvm +// FILE: inline.kt package test @@ -228,4 +228,4 @@ fun box(): String { } catch (ignore: AssertionError) {} return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/assert/jvmCrossinlineLambdaDeclarationSiteOnly.kt b/compiler/testData/codegen/boxInline/assert/jvmCrossinlineLambdaDeclarationSiteOnly.kt index 9c5503be500..7769099a2c8 100644 --- a/compiler/testData/codegen/boxInline/assert/jvmCrossinlineLambdaDeclarationSiteOnly.kt +++ b/compiler/testData/codegen/boxInline/assert/jvmCrossinlineLambdaDeclarationSiteOnly.kt @@ -1,8 +1,8 @@ -// TARGET_BACKEND: JVM -// FILE: inline.kt -// KOTLIN_CONFIGURATION_FLAGS: ASSERTIONS_MODE=jvm -// WITH_RUNTIME // NO_CHECK_LAMBDA_INLINING +// WITH_RUNTIME +// TARGET_BACKEND: JVM +// ASSERTIONS_MODE: jvm +// FILE: inline.kt package test diff --git a/compiler/testData/codegen/boxInline/assert/jvmCrossinlineSAMDeclarationSite.kt b/compiler/testData/codegen/boxInline/assert/jvmCrossinlineSAMDeclarationSite.kt index c1e7be54172..0b5c4d110ea 100644 --- a/compiler/testData/codegen/boxInline/assert/jvmCrossinlineSAMDeclarationSite.kt +++ b/compiler/testData/codegen/boxInline/assert/jvmCrossinlineSAMDeclarationSite.kt @@ -1,8 +1,8 @@ -// TARGET_BACKEND: JVM -// FILE: inline.kt -// KOTLIN_CONFIGURATION_FLAGS: ASSERTIONS_MODE=jvm -// WITH_RUNTIME // NO_CHECK_LAMBDA_INLINING +// WITH_RUNTIME +// TARGET_BACKEND: JVM +// ASSERTIONS_MODE: jvm +// FILE: inline.kt package test diff --git a/compiler/testData/codegen/boxInline/assert/jvmDoubleInline.kt b/compiler/testData/codegen/boxInline/assert/jvmDoubleInline.kt index 76954785e4e..3e02a0a66a3 100644 --- a/compiler/testData/codegen/boxInline/assert/jvmDoubleInline.kt +++ b/compiler/testData/codegen/boxInline/assert/jvmDoubleInline.kt @@ -1,8 +1,8 @@ -// TARGET_BACKEND: JVM -// FILE: inline.kt -// KOTLIN_CONFIGURATION_FLAGS: ASSERTIONS_MODE=jvm -// WITH_RUNTIME // FULL_JDK +// WITH_RUNTIME +// TARGET_BACKEND: JVM +// ASSERTIONS_MODE: jvm +// FILE: inline.kt package test class A { diff --git a/compiler/testData/codegen/boxInline/assert/jvmInlineUsedAsNoinline.kt b/compiler/testData/codegen/boxInline/assert/jvmInlineUsedAsNoinline.kt index 4e94b54888c..adb740393c9 100644 --- a/compiler/testData/codegen/boxInline/assert/jvmInlineUsedAsNoinline.kt +++ b/compiler/testData/codegen/boxInline/assert/jvmInlineUsedAsNoinline.kt @@ -1,10 +1,10 @@ +// FULL_JDK +// WITH_RUNTIME // Not a multi-module test. // TARGET_BACKEND: JVM // IGNORE_BACKEND_MULTI_MODULE: JVM, JVM_IR, JVM_MULTI_MODULE_OLD_AGAINST_IR, JVM_MULTI_MODULE_IR_AGAINST_OLD +// ASSERTIONS_MODE: jvm // FILE: A.kt -// KOTLIN_CONFIGURATION_FLAGS: ASSERTIONS_MODE=jvm -// WITH_RUNTIME -// FULL_JDK class A { inline fun inlineMe(crossinline c : () -> String) = { diff --git a/compiler/testData/codegen/boxInline/builders/builders.kt b/compiler/testData/codegen/boxInline/builders/builders.kt index bec67f420a3..b65a5ccfcd1 100644 --- a/compiler/testData/codegen/boxInline/builders/builders.kt +++ b/compiler/testData/codegen/boxInline/builders/builders.kt @@ -1,6 +1,7 @@ +// WITH_RUNTIME +// NO_CHECK_LAMBDA_INLINING // TARGET_BACKEND: JVM // FILE: 1.kt -// WITH_RUNTIME package builders import java.util.ArrayList @@ -112,7 +113,6 @@ fun htmlNoInline(init: HTML.() -> Unit): HTML { // FILE: 2.kt -//NO_CHECK_LAMBDA_INLINING import builders.* fun testAllInline() : String { diff --git a/compiler/testData/codegen/boxInline/builders/buildersAndLambdaCapturing.kt b/compiler/testData/codegen/boxInline/builders/buildersAndLambdaCapturing.kt index eaf608e3da0..bbae10dc907 100644 --- a/compiler/testData/codegen/boxInline/builders/buildersAndLambdaCapturing.kt +++ b/compiler/testData/codegen/boxInline/builders/buildersAndLambdaCapturing.kt @@ -1,6 +1,7 @@ +// WITH_RUNTIME +// NO_CHECK_LAMBDA_INLINING // TARGET_BACKEND: JVM // FILE: 1.kt -// WITH_RUNTIME package builders import java.util.ArrayList @@ -112,7 +113,6 @@ fun htmlNoInline(init: HTML.() -> Unit): HTML { // FILE: 2.kt -//NO_CHECK_LAMBDA_INLINING import builders.* inline fun testAllInline(f: () -> String) : String { diff --git a/compiler/testData/codegen/boxInline/bytecodePreprocessing/apiVersionAtLeast1.kt b/compiler/testData/codegen/boxInline/bytecodePreprocessing/apiVersionAtLeast1.kt index b7c6ea35ca0..0f90a108ae2 100644 --- a/compiler/testData/codegen/boxInline/bytecodePreprocessing/apiVersionAtLeast1.kt +++ b/compiler/testData/codegen/boxInline/bytecodePreprocessing/apiVersionAtLeast1.kt @@ -42,4 +42,4 @@ fun box(): String { if (!properFunctionWasClled) return "Fail 1" return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/callableReference/bound/classProperty.kt b/compiler/testData/codegen/boxInline/callableReference/bound/classProperty.kt index d005b752b41..8f3fc8659bc 100644 --- a/compiler/testData/codegen/boxInline/callableReference/bound/classProperty.kt +++ b/compiler/testData/codegen/boxInline/callableReference/bound/classProperty.kt @@ -14,4 +14,4 @@ import test.* fun box(): String { return test(Foo("OK")::a) -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/callableReference/bound/extensionReceiver.kt b/compiler/testData/codegen/boxInline/callableReference/bound/extensionReceiver.kt index c031c5192d7..80546076c9c 100644 --- a/compiler/testData/codegen/boxInline/callableReference/bound/extensionReceiver.kt +++ b/compiler/testData/codegen/boxInline/callableReference/bound/extensionReceiver.kt @@ -17,4 +17,4 @@ fun String.test() : String { fun box() : String { return "O".test() -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/callableReference/bound/filter.kt b/compiler/testData/codegen/boxInline/callableReference/bound/filter.kt index d088e2d624d..5bcb842d45b 100644 --- a/compiler/testData/codegen/boxInline/callableReference/bound/filter.kt +++ b/compiler/testData/codegen/boxInline/callableReference/bound/filter.kt @@ -19,4 +19,4 @@ fun box(): String { val a = A("OK") val s = arrayOf("OK") return s.filter(a::filter).first() -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/callableReference/bound/inlineValueParameterInsteadOfReceiver.kt b/compiler/testData/codegen/boxInline/callableReference/bound/inlineValueParameterInsteadOfReceiver.kt index e6b566216ba..ebc8b0f8aa7 100644 --- a/compiler/testData/codegen/boxInline/callableReference/bound/inlineValueParameterInsteadOfReceiver.kt +++ b/compiler/testData/codegen/boxInline/callableReference/bound/inlineValueParameterInsteadOfReceiver.kt @@ -12,4 +12,4 @@ import test.* fun box(): String { return Z().run(Q()::f) -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/callableReference/bound/kt18728.kt b/compiler/testData/codegen/boxInline/callableReference/bound/kt18728.kt index 8da9f6097a1..7c2ad04f717 100644 --- a/compiler/testData/codegen/boxInline/callableReference/bound/kt18728.kt +++ b/compiler/testData/codegen/boxInline/callableReference/bound/kt18728.kt @@ -13,4 +13,4 @@ import test.* fun box(): String { val result = 1.map(2::plus) return if (result == 3) "OK" else "fail $result" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/callableReference/bound/kt18728_2.kt b/compiler/testData/codegen/boxInline/callableReference/bound/kt18728_2.kt index 164bc0ee3ec..69f522815bc 100644 --- a/compiler/testData/codegen/boxInline/callableReference/bound/kt18728_2.kt +++ b/compiler/testData/codegen/boxInline/callableReference/bound/kt18728_2.kt @@ -13,4 +13,4 @@ import test.* fun box(): String { val result = 1.map(3L::plus) return if (result == 4L) "OK" else "fail $result" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/callableReference/bound/kt18728_3.kt b/compiler/testData/codegen/boxInline/callableReference/bound/kt18728_3.kt index 40df3101338..ee848b6af20 100644 --- a/compiler/testData/codegen/boxInline/callableReference/bound/kt18728_3.kt +++ b/compiler/testData/codegen/boxInline/callableReference/bound/kt18728_3.kt @@ -16,4 +16,4 @@ val Int.myInc fun box(): String { val result = map(2::myInc) return if (result == 3) "OK" else "fail $result" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/callableReference/bound/kt18728_4.kt b/compiler/testData/codegen/boxInline/callableReference/bound/kt18728_4.kt index 0bcc8fd80d4..b5892928e79 100644 --- a/compiler/testData/codegen/boxInline/callableReference/bound/kt18728_4.kt +++ b/compiler/testData/codegen/boxInline/callableReference/bound/kt18728_4.kt @@ -15,4 +15,4 @@ val Long.myInc fun box(): String { val result = map(2L::myInc) return if (result == 3L) "OK" else "fail $result" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/callableReference/bound/lambdaOnLhs.kt b/compiler/testData/codegen/boxInline/callableReference/bound/lambdaOnLhs.kt new file mode 100644 index 00000000000..fa911721e27 --- /dev/null +++ b/compiler/testData/codegen/boxInline/callableReference/bound/lambdaOnLhs.kt @@ -0,0 +1,31 @@ +// NO_CHECK_LAMBDA_INLINING +// IGNORE_BACKEND: JVM +// IGNORE_BACKEND_MULTI_MODULE: JVM, JVM_MULTI_MODULE_OLD_AGAINST_IR +// KT-28042 +// FILE: 1.kt + +package test + +fun supplier(f: () -> T) = f + +inline fun consumer1(c: (Unit) -> Unit) = c(Unit) + +// FILE: 2.kt + +import test.* + +class A { + fun f() { + consumer1 { + supplier { + consumer1(consumer2()) + }::apply + } + } + fun consumer2(): (Unit) -> Unit = {} +} + +fun box(): String { + A().f() + return "OK" +} diff --git a/compiler/testData/codegen/boxInline/callableReference/bound/map.kt b/compiler/testData/codegen/boxInline/callableReference/bound/map.kt index 0141e93a7f6..7b8f43e10d2 100644 --- a/compiler/testData/codegen/boxInline/callableReference/bound/map.kt +++ b/compiler/testData/codegen/boxInline/callableReference/bound/map.kt @@ -19,4 +19,4 @@ fun box(): String { val a = A("O") val s = arrayOf("K") return s.map(a::map).first() -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/callableReference/bound/mixed.kt b/compiler/testData/codegen/boxInline/callableReference/bound/mixed.kt index 426984d7d1e..bf18025a278 100644 --- a/compiler/testData/codegen/boxInline/callableReference/bound/mixed.kt +++ b/compiler/testData/codegen/boxInline/callableReference/bound/mixed.kt @@ -20,4 +20,4 @@ private val foo = Foo() fun box(): String { val result = inlineFn("a", foo::foo, 5, foo::foo2, "end") return if (result == "aOK5OK2end") "OK" else "fail: $result" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/callableReference/bound/objectProperty.kt b/compiler/testData/codegen/boxInline/callableReference/bound/objectProperty.kt index 4400cd85b8d..982b87307fc 100644 --- a/compiler/testData/codegen/boxInline/callableReference/bound/objectProperty.kt +++ b/compiler/testData/codegen/boxInline/callableReference/bound/objectProperty.kt @@ -16,4 +16,4 @@ import test.* fun box(): String { return test(Foo::a) -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/callableReference/bound/propertyImportedFromObject.kt b/compiler/testData/codegen/boxInline/callableReference/bound/propertyImportedFromObject.kt index c08e617e2b1..a56d4199610 100644 --- a/compiler/testData/codegen/boxInline/callableReference/bound/propertyImportedFromObject.kt +++ b/compiler/testData/codegen/boxInline/callableReference/bound/propertyImportedFromObject.kt @@ -17,4 +17,4 @@ import test.test fun box(): String { return test(::a) -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/callableReference/bound/sideEffect.kt b/compiler/testData/codegen/boxInline/callableReference/bound/sideEffect.kt index 006c8a1fbd3..a09e78ab929 100644 --- a/compiler/testData/codegen/boxInline/callableReference/bound/sideEffect.kt +++ b/compiler/testData/codegen/boxInline/callableReference/bound/sideEffect.kt @@ -27,4 +27,4 @@ fun box(): String { if (result != effects) return "fail 1: $effects != $result" return if (result == "ABCD") "OK" else "fail 2: $result" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/callableReference/bound/topLevelExtensionProperty.kt b/compiler/testData/codegen/boxInline/callableReference/bound/topLevelExtensionProperty.kt index ad0438b07f4..3b3b29fb7e8 100644 --- a/compiler/testData/codegen/boxInline/callableReference/bound/topLevelExtensionProperty.kt +++ b/compiler/testData/codegen/boxInline/callableReference/bound/topLevelExtensionProperty.kt @@ -17,4 +17,4 @@ import test.* fun box(): String { return test(Foo("OK")::a) -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/callableReference/kt15449.kt b/compiler/testData/codegen/boxInline/callableReference/kt15449.kt index 265fe026478..9dc7865787b 100644 --- a/compiler/testData/codegen/boxInline/callableReference/kt15449.kt +++ b/compiler/testData/codegen/boxInline/callableReference/kt15449.kt @@ -1,3 +1,4 @@ +// NO_CHECK_LAMBDA_INLINING // FILE: 1.kt package test @@ -14,7 +15,6 @@ class X { } // FILE: 2.kt -//NO_CHECK_LAMBDA_INLINING import test.* class A { diff --git a/compiler/testData/codegen/boxInline/callableReference/kt15751_2.kt b/compiler/testData/codegen/boxInline/callableReference/kt15751_2.kt index c4ec3fdcb42..c418555e93e 100644 --- a/compiler/testData/codegen/boxInline/callableReference/kt15751_2.kt +++ b/compiler/testData/codegen/boxInline/callableReference/kt15751_2.kt @@ -1,6 +1,7 @@ -// FILE: 1.kt // IGNORE_BACKEND: JS // WITH_RUNTIME +// NO_CHECK_LAMBDA_INLINING +// FILE: 1.kt // KJS_WITH_FULL_RUNTIME package test @@ -14,7 +15,6 @@ public inline fun Iterable.mymapNotNull(transform: (T) -> R?): L } // FILE: 2.kt -// NO_CHECK_LAMBDA_INLINING import test.* var result = -1; @@ -36,4 +36,4 @@ fun fff(): Int { fun something(increase: (Int) -> Int, x: Int): Int? { return increase(x) -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/callableReference/kt16411.kt b/compiler/testData/codegen/boxInline/callableReference/kt16411.kt index d9465d269b3..e60965c87e0 100644 --- a/compiler/testData/codegen/boxInline/callableReference/kt16411.kt +++ b/compiler/testData/codegen/boxInline/callableReference/kt16411.kt @@ -14,4 +14,4 @@ object Foo { fun box(): String { return startFlow(Foo::Requester).dealToBeOffered -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/callableReference/kt35101.kt b/compiler/testData/codegen/boxInline/callableReference/kt35101.kt index 601fa365d5e..6fbcc6fab9c 100644 --- a/compiler/testData/codegen/boxInline/callableReference/kt35101.kt +++ b/compiler/testData/codegen/boxInline/callableReference/kt35101.kt @@ -11,4 +11,4 @@ import test.* fun box(): String { val result = true.let2(Boolean::not) return if (!result) "OK" else "fail" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/callableReference/propertyReference.kt b/compiler/testData/codegen/boxInline/callableReference/propertyReference.kt index 8a1091e81c6..57d505b6a72 100644 --- a/compiler/testData/codegen/boxInline/callableReference/propertyReference.kt +++ b/compiler/testData/codegen/boxInline/callableReference/propertyReference.kt @@ -14,4 +14,4 @@ import test.* fun box(): String { return test(Foo("OK"), Foo::a) -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/callableReference/topLevelProperty.kt b/compiler/testData/codegen/boxInline/callableReference/topLevelProperty.kt index ae31ab979ce..3246f7ac1a6 100644 --- a/compiler/testData/codegen/boxInline/callableReference/topLevelProperty.kt +++ b/compiler/testData/codegen/boxInline/callableReference/topLevelProperty.kt @@ -15,4 +15,4 @@ import test.* fun box(): String { return test(::a) -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/capture/captureInlinable.kt b/compiler/testData/codegen/boxInline/capture/captureInlinable.kt index 0e55f8165c5..a7052c5d163 100644 --- a/compiler/testData/codegen/boxInline/capture/captureInlinable.kt +++ b/compiler/testData/codegen/boxInline/capture/captureInlinable.kt @@ -1,3 +1,4 @@ +// NO_CHECK_LAMBDA_INLINING // FILE: 1.kt package test @@ -13,7 +14,6 @@ fun notInline(job: ()-> R) : R { // FILE: 2.kt -//NO_CHECK_LAMBDA_INLINING import test.* fun box(): String { diff --git a/compiler/testData/codegen/boxInline/capture/captureInlinableAndOther.kt b/compiler/testData/codegen/boxInline/capture/captureInlinableAndOther.kt index 222c0cabea3..d50c2039755 100644 --- a/compiler/testData/codegen/boxInline/capture/captureInlinableAndOther.kt +++ b/compiler/testData/codegen/boxInline/capture/captureInlinableAndOther.kt @@ -1,3 +1,4 @@ +// NO_CHECK_LAMBDA_INLINING // FILE: 1.kt package test @@ -14,7 +15,6 @@ fun notInline(job: ()-> R) : R { // FILE: 2.kt -//NO_CHECK_LAMBDA_INLINING import test.* fun box(): String { diff --git a/compiler/testData/codegen/boxInline/complex/forEachLine.kt b/compiler/testData/codegen/boxInline/complex/forEachLine.kt index 46583110d88..f0954f9d27f 100644 --- a/compiler/testData/codegen/boxInline/complex/forEachLine.kt +++ b/compiler/testData/codegen/boxInline/complex/forEachLine.kt @@ -1,6 +1,6 @@ +// WITH_RUNTIME // TARGET_BACKEND: JVM // FILE: 1.kt -// WITH_RUNTIME package test public class Input(val s1: String, val s2: String) { diff --git a/compiler/testData/codegen/boxInline/complex/kt44429.kt b/compiler/testData/codegen/boxInline/complex/kt44429.kt index ad0f79ce0d9..6a1f6d97966 100644 --- a/compiler/testData/codegen/boxInline/complex/kt44429.kt +++ b/compiler/testData/codegen/boxInline/complex/kt44429.kt @@ -1,14 +1,14 @@ +// NO_CHECK_LAMBDA_INLINING // FILE: 1.kt package test inline fun takeT(t: T) {} // FILE: 2.kt -// NO_CHECK_LAMBDA_INLINING import test.* fun box(): String { val f = { null } as () -> Int takeT(f()) return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/complex/lambdaInLambda.kt b/compiler/testData/codegen/boxInline/complex/lambdaInLambda.kt index dc34b8598f2..e4456efc697 100644 --- a/compiler/testData/codegen/boxInline/complex/lambdaInLambda.kt +++ b/compiler/testData/codegen/boxInline/complex/lambdaInLambda.kt @@ -1,6 +1,6 @@ +// WITH_RUNTIME // TARGET_BACKEND: JVM // FILE: 1.kt -// WITH_RUNTIME package test public class Input(val s1: String, val s2: String) { diff --git a/compiler/testData/codegen/boxInline/complex/swapAndWith.kt b/compiler/testData/codegen/boxInline/complex/swapAndWith.kt index 0c1f2a7c6ed..2f3ef1a05de 100644 --- a/compiler/testData/codegen/boxInline/complex/swapAndWith.kt +++ b/compiler/testData/codegen/boxInline/complex/swapAndWith.kt @@ -17,4 +17,4 @@ fun box(): String { return test("O") { this + "K" } -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/complex/swapAndWith2.kt b/compiler/testData/codegen/boxInline/complex/swapAndWith2.kt index bd914e909a6..7060a7f9775 100644 --- a/compiler/testData/codegen/boxInline/complex/swapAndWith2.kt +++ b/compiler/testData/codegen/boxInline/complex/swapAndWith2.kt @@ -16,4 +16,4 @@ fun box(): String { return test("O") { this + "K" } -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/complex/with.kt b/compiler/testData/codegen/boxInline/complex/with.kt index 54e147cfeeb..ae66986c3ed 100644 --- a/compiler/testData/codegen/boxInline/complex/with.kt +++ b/compiler/testData/codegen/boxInline/complex/with.kt @@ -1,5 +1,6 @@ -// FILE: 1.kt // WITH_RUNTIME +// NO_CHECK_LAMBDA_INLINING +// FILE: 1.kt package test @@ -34,7 +35,6 @@ public inline fun with2(receiver : T, crossinline body : T.() -> Unit) : Un // FILE: 2.kt -//NO_CHECK_LAMBDA_INLINING import test.* fun Data.test1(d: Data) : Long { diff --git a/compiler/testData/codegen/boxInline/complexStack/asCheck.kt b/compiler/testData/codegen/boxInline/complexStack/asCheck.kt index 7f7e24c804a..4999f9438d7 100644 --- a/compiler/testData/codegen/boxInline/complexStack/asCheck.kt +++ b/compiler/testData/codegen/boxInline/complexStack/asCheck.kt @@ -1,5 +1,5 @@ -// FILE: 1.kt // WITH_RUNTIME +// FILE: 1.kt // KJS_WITH_FULL_RUNTIME package test diff --git a/compiler/testData/codegen/boxInline/complexStack/spillConstructorArgumentsAndInlineLambdaParameter.kt b/compiler/testData/codegen/boxInline/complexStack/spillConstructorArgumentsAndInlineLambdaParameter.kt index f13a8c588b6..e26a1145b36 100644 --- a/compiler/testData/codegen/boxInline/complexStack/spillConstructorArgumentsAndInlineLambdaParameter.kt +++ b/compiler/testData/codegen/boxInline/complexStack/spillConstructorArgumentsAndInlineLambdaParameter.kt @@ -1,3 +1,4 @@ +// IGNORE_FIR_DIAGNOSTICS // FILE: 1.kt class A(val s: String) @@ -19,4 +20,4 @@ inline fun inlineMe(limit: Int, c: (String) -> String): A { // FILE: 2.kt fun box(): String { return inlineMe(1) { "OK" }.s -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/contracts/crossinlineCallableReference.kt b/compiler/testData/codegen/boxInline/contracts/crossinlineCallableReference.kt index 485f8045b9f..e5c8e4e94ac 100644 --- a/compiler/testData/codegen/boxInline/contracts/crossinlineCallableReference.kt +++ b/compiler/testData/codegen/boxInline/contracts/crossinlineCallableReference.kt @@ -1,3 +1,4 @@ +// IGNORE_FIR_DIAGNOSTICS // !USE_EXPERIMENTAL: kotlin.contracts.ExperimentalContracts // IGNORE_BACKEND: NATIVE // NO_CHECK_LAMBDA_INLINING diff --git a/compiler/testData/codegen/boxInline/contracts/exactlyOnceCrossinline.kt b/compiler/testData/codegen/boxInline/contracts/exactlyOnceCrossinline.kt index 6feee24df46..d78329407c8 100644 --- a/compiler/testData/codegen/boxInline/contracts/exactlyOnceCrossinline.kt +++ b/compiler/testData/codegen/boxInline/contracts/exactlyOnceCrossinline.kt @@ -1,3 +1,4 @@ +// IGNORE_FIR_DIAGNOSTICS // !USE_EXPERIMENTAL: kotlin.contracts.ExperimentalContracts // IGNORE_BACKEND: NATIVE diff --git a/compiler/testData/codegen/boxInline/contracts/exactlyOnceCrossinline2.kt b/compiler/testData/codegen/boxInline/contracts/exactlyOnceCrossinline2.kt index 0146cf341ae..04e3a7f91d9 100644 --- a/compiler/testData/codegen/boxInline/contracts/exactlyOnceCrossinline2.kt +++ b/compiler/testData/codegen/boxInline/contracts/exactlyOnceCrossinline2.kt @@ -1,3 +1,4 @@ +// IGNORE_FIR_DIAGNOSTICS // !USE_EXPERIMENTAL: kotlin.contracts.ExperimentalContracts // IGNORE_BACKEND: NATIVE // FILE: 1.kt diff --git a/compiler/testData/codegen/boxInline/contracts/valInitializationAndUsageInNestedLambda.kt b/compiler/testData/codegen/boxInline/contracts/valInitializationAndUsageInNestedLambda.kt index 077d52c72c1..3150b557fa2 100644 --- a/compiler/testData/codegen/boxInline/contracts/valInitializationAndUsageInNestedLambda.kt +++ b/compiler/testData/codegen/boxInline/contracts/valInitializationAndUsageInNestedLambda.kt @@ -1,3 +1,4 @@ +// NO_CHECK_LAMBDA_INLINING // !USE_EXPERIMENTAL: kotlin.contracts.ExperimentalContracts // IGNORE_BACKEND: NATIVE @@ -15,7 +16,6 @@ public inline fun myrun(block: () -> R): R { } // FILE: 2.kt -// NO_CHECK_LAMBDA_INLINING import test.* diff --git a/compiler/testData/codegen/boxInline/defaultValues/33Parameters.kt b/compiler/testData/codegen/boxInline/defaultValues/33Parameters.kt index 50a8bbc1fa4..f699cc43f11 100644 --- a/compiler/testData/codegen/boxInline/defaultValues/33Parameters.kt +++ b/compiler/testData/codegen/boxInline/defaultValues/33Parameters.kt @@ -50,4 +50,4 @@ import test.* fun box(): String { return test() -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/defaultValues/33ParametersInConstructor.kt b/compiler/testData/codegen/boxInline/defaultValues/33ParametersInConstructor.kt index e0d10b91911..81e673c333a 100644 --- a/compiler/testData/codegen/boxInline/defaultValues/33ParametersInConstructor.kt +++ b/compiler/testData/codegen/boxInline/defaultValues/33ParametersInConstructor.kt @@ -48,4 +48,4 @@ import test.* fun box(): String { val test = Test() return test.p14 + test.p33 -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/defaultValues/defaultInExtension.kt b/compiler/testData/codegen/boxInline/defaultValues/defaultInExtension.kt index c48b83e2365..c17f2205ac2 100644 --- a/compiler/testData/codegen/boxInline/defaultValues/defaultInExtension.kt +++ b/compiler/testData/codegen/boxInline/defaultValues/defaultInExtension.kt @@ -1,5 +1,5 @@ -// FILE: 1.kt // WITH_RUNTIME +// FILE: 1.kt package test inline public fun String.run(p1: String? = null): String { diff --git a/compiler/testData/codegen/boxInline/defaultValues/inlineLambdaInNoInlineDefault.kt b/compiler/testData/codegen/boxInline/defaultValues/inlineLambdaInNoInlineDefault.kt index f34c22c551e..e52c19e30d9 100644 --- a/compiler/testData/codegen/boxInline/defaultValues/inlineLambdaInNoInlineDefault.kt +++ b/compiler/testData/codegen/boxInline/defaultValues/inlineLambdaInNoInlineDefault.kt @@ -1,5 +1,6 @@ -// FILE: 1.kt // SKIP_INLINE_CHECK_IN: inlineFun$default +// NO_CHECK_LAMBDA_INLINING +// FILE: 1.kt package test inline fun inlineFun(crossinline inlineLambda: () -> String, noinline noInlineLambda: () -> String = { inlineLambda() }): String { @@ -7,7 +8,6 @@ inline fun inlineFun(crossinline inlineLambda: () -> String, noinline noInlineLa } // FILE: 2.kt -//NO_CHECK_LAMBDA_INLINING import test.* fun box(): String { diff --git a/compiler/testData/codegen/boxInline/defaultValues/kt11479.kt b/compiler/testData/codegen/boxInline/defaultValues/kt11479.kt index 9c757fcfdab..eb13179e0c7 100644 --- a/compiler/testData/codegen/boxInline/defaultValues/kt11479.kt +++ b/compiler/testData/codegen/boxInline/defaultValues/kt11479.kt @@ -22,4 +22,4 @@ fun box(): String { getOrCreate { z = "OK"; z } return z -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/defaultValues/kt11479InlinedDefaultParameter.kt b/compiler/testData/codegen/boxInline/defaultValues/kt11479InlinedDefaultParameter.kt index 65308a1fd16..1750543f610 100644 --- a/compiler/testData/codegen/boxInline/defaultValues/kt11479InlinedDefaultParameter.kt +++ b/compiler/testData/codegen/boxInline/defaultValues/kt11479InlinedDefaultParameter.kt @@ -27,4 +27,4 @@ fun box(): String { getOrCreate { z = "OK"; z } return z -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/defaultValues/kt14564.kt b/compiler/testData/codegen/boxInline/defaultValues/kt14564.kt index c9a422774fc..875bab02e4d 100644 --- a/compiler/testData/codegen/boxInline/defaultValues/kt14564.kt +++ b/compiler/testData/codegen/boxInline/defaultValues/kt14564.kt @@ -1,5 +1,5 @@ +// NO_CHECK_LAMBDA_INLINING // FILE: 1.kt -//NO_CHECK_LAMBDA_INLINING package test @@ -33,4 +33,4 @@ fun box(): String { } }) return result -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/defaultValues/kt16496.kt b/compiler/testData/codegen/boxInline/defaultValues/kt16496.kt index ba75a44799b..84934845def 100644 --- a/compiler/testData/codegen/boxInline/defaultValues/kt16496.kt +++ b/compiler/testData/codegen/boxInline/defaultValues/kt16496.kt @@ -22,4 +22,4 @@ fun box(): String { return f { x++ } -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/defaultValues/kt18689.kt b/compiler/testData/codegen/boxInline/defaultValues/kt18689.kt index f64cd2306d2..4af89575ce7 100644 --- a/compiler/testData/codegen/boxInline/defaultValues/kt18689.kt +++ b/compiler/testData/codegen/boxInline/defaultValues/kt18689.kt @@ -18,4 +18,4 @@ private val foo = Foo() fun box(): String { return inlineFn(foo::foo) -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/defaultValues/kt18689_2.kt b/compiler/testData/codegen/boxInline/defaultValues/kt18689_2.kt index 5ad6a07bf34..2c4b9f1368d 100644 --- a/compiler/testData/codegen/boxInline/defaultValues/kt18689_2.kt +++ b/compiler/testData/codegen/boxInline/defaultValues/kt18689_2.kt @@ -18,4 +18,4 @@ private val foo = Foo() fun box(): String { return inlineFn(foo::foo) -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/defaultValues/kt18689_3.kt b/compiler/testData/codegen/boxInline/defaultValues/kt18689_3.kt index 137eaa4138d..3376515e6a5 100644 --- a/compiler/testData/codegen/boxInline/defaultValues/kt18689_3.kt +++ b/compiler/testData/codegen/boxInline/defaultValues/kt18689_3.kt @@ -18,4 +18,4 @@ private val foo = Foo() fun box(): String { return inlineFn(foo::foo, "K") -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/defaultValues/kt18689_4.kt b/compiler/testData/codegen/boxInline/defaultValues/kt18689_4.kt index 23c19b4b11d..e74b60c4611 100644 --- a/compiler/testData/codegen/boxInline/defaultValues/kt18689_4.kt +++ b/compiler/testData/codegen/boxInline/defaultValues/kt18689_4.kt @@ -18,4 +18,4 @@ private val foo = Foo() fun box(): String { return inlineFn(foo::foo) -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundFunctionReference.kt b/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundFunctionReference.kt index 703220a40c2..536b2967fdb 100644 --- a/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundFunctionReference.kt +++ b/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundFunctionReference.kt @@ -1,5 +1,5 @@ -// FILE: 1.kt // SKIP_INLINE_CHECK_IN: inlineFun$default +// FILE: 1.kt package test class A(val value: String) { diff --git a/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundFunctionReferenceOnInt.kt b/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundFunctionReferenceOnInt.kt index f23f5089438..d805cd164de 100644 --- a/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundFunctionReferenceOnInt.kt +++ b/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundFunctionReferenceOnInt.kt @@ -1,5 +1,5 @@ -// FILE: 1.kt // SKIP_INLINE_CHECK_IN: inlineFun$default +// FILE: 1.kt package test inline fun inlineFun(a: Int, lambda: (Int) -> Int = 1::plus): Int { diff --git a/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundFunctionReferenceOnLong.kt b/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundFunctionReferenceOnLong.kt index f23f5089438..d805cd164de 100644 --- a/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundFunctionReferenceOnLong.kt +++ b/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundFunctionReferenceOnLong.kt @@ -1,5 +1,5 @@ -// FILE: 1.kt // SKIP_INLINE_CHECK_IN: inlineFun$default +// FILE: 1.kt package test inline fun inlineFun(a: Int, lambda: (Int) -> Int = 1::plus): Int { diff --git a/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundPropertyReference.kt b/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundPropertyReference.kt index 1645f590258..dcf3c089a7a 100644 --- a/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundPropertyReference.kt +++ b/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundPropertyReference.kt @@ -1,5 +1,5 @@ -// FILE: 1.kt // SKIP_INLINE_CHECK_IN: inlineFun$default +// FILE: 1.kt package test class A(val ok: String) diff --git a/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundPropertyReferenceOnInt.kt b/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundPropertyReferenceOnInt.kt index 3b2d0b580c2..971a34cfeba 100644 --- a/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundPropertyReferenceOnInt.kt +++ b/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundPropertyReferenceOnInt.kt @@ -1,5 +1,5 @@ -// FILE: 1.kt // SKIP_INLINE_CHECK_IN: inlineFun$default +// FILE: 1.kt package test val Int.myInc diff --git a/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundPropertyReferenceOnLong.kt b/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundPropertyReferenceOnLong.kt index a9740fca74e..5d4034581db 100644 --- a/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundPropertyReferenceOnLong.kt +++ b/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundPropertyReferenceOnLong.kt @@ -1,5 +1,5 @@ -// FILE: 1.kt // SKIP_INLINE_CHECK_IN: inlineFun$default +// FILE: 1.kt package test val Long.myInc diff --git a/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/constuctorReference.kt b/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/constuctorReference.kt index 0de4aa09ebf..f8435c3bf4f 100644 --- a/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/constuctorReference.kt +++ b/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/constuctorReference.kt @@ -1,5 +1,5 @@ -// FILE: 1.kt // SKIP_INLINE_CHECK_IN: inlineFun$default +// FILE: 1.kt package test class A(val value: String) { diff --git a/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/differentInvokeSignature.kt b/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/differentInvokeSignature.kt index 7f8648be1b2..ede1ae0132e 100644 --- a/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/differentInvokeSignature.kt +++ b/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/differentInvokeSignature.kt @@ -1,5 +1,5 @@ -// FILE: 1.kt // SKIP_INLINE_CHECK_IN: inlineFun$default +// FILE: 1.kt package test open class Base @@ -18,4 +18,4 @@ import test.* fun box(): String { return (inlineFun() as Child).value -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/differentInvokeSignature2.kt b/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/differentInvokeSignature2.kt index aaa780dbd2e..db325f80f60 100644 --- a/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/differentInvokeSignature2.kt +++ b/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/differentInvokeSignature2.kt @@ -1,5 +1,5 @@ -// FILE: 1.kt // SKIP_INLINE_CHECK_IN: inlineFun$default +// FILE: 1.kt package test fun foo(a: Number): String = "OK" @@ -13,4 +13,4 @@ import test.* fun box(): String { return inlineFun() -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/functionImportedFromObject.kt b/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/functionImportedFromObject.kt index 377813e4227..28480455689 100644 --- a/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/functionImportedFromObject.kt +++ b/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/functionImportedFromObject.kt @@ -1,3 +1,4 @@ +// SKIP_INLINE_CHECK_IN: inlineFun$default // FILE: 1.kt package test @@ -11,7 +12,6 @@ inline fun stub() {} // FILE: 2.kt -// SKIP_INLINE_CHECK_IN: inlineFun$default import test.A.ok inline fun inlineFun(lambda: () -> String = ::ok): String { diff --git a/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/functionReference.kt b/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/functionReference.kt index fc4a641273b..330ce0a14b1 100644 --- a/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/functionReference.kt +++ b/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/functionReference.kt @@ -1,5 +1,5 @@ -// FILE: 1.kt // SKIP_INLINE_CHECK_IN: inlineFun$default +// FILE: 1.kt package test fun ok() = "OK" diff --git a/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/functionReferenceFromClass.kt b/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/functionReferenceFromClass.kt index b30f6c8800b..9601111557d 100644 --- a/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/functionReferenceFromClass.kt +++ b/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/functionReferenceFromClass.kt @@ -1,5 +1,5 @@ -// FILE: 1.kt // SKIP_INLINE_CHECK_IN: inlineFun$default +// FILE: 1.kt package test class A(val value: String) { diff --git a/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/functionReferenceFromObject.kt b/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/functionReferenceFromObject.kt index 71b571dd5e8..bc723a1d120 100644 --- a/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/functionReferenceFromObject.kt +++ b/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/functionReferenceFromObject.kt @@ -1,5 +1,5 @@ -// FILE: 1.kt // SKIP_INLINE_CHECK_IN: inlineFun$default +// FILE: 1.kt package test fun ok() = "OK" diff --git a/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/innerClassConstuctorReference.kt b/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/innerClassConstuctorReference.kt index 4402e747e1b..8e93f851e98 100644 --- a/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/innerClassConstuctorReference.kt +++ b/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/innerClassConstuctorReference.kt @@ -1,5 +1,5 @@ -// FILE: 1.kt // SKIP_INLINE_CHECK_IN: inlineFun$default +// FILE: 1.kt package test class A(val value: String) { diff --git a/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/mutableBoundPropertyReferenceFromClass.kt b/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/mutableBoundPropertyReferenceFromClass.kt index f240eec619d..37c1e66b6dd 100644 --- a/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/mutableBoundPropertyReferenceFromClass.kt +++ b/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/mutableBoundPropertyReferenceFromClass.kt @@ -1,5 +1,5 @@ -// FILE: 1.kt // SKIP_INLINE_CHECK_IN: inlineFun$default +// FILE: 1.kt package test class A { diff --git a/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/mutablePropertyReferenceFromClass.kt b/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/mutablePropertyReferenceFromClass.kt index 98a4f3a9ac7..bbf26481d83 100644 --- a/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/mutablePropertyReferenceFromClass.kt +++ b/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/mutablePropertyReferenceFromClass.kt @@ -1,5 +1,5 @@ -// FILE: 1.kt // SKIP_INLINE_CHECK_IN: inlineFun$default +// FILE: 1.kt package test class A { diff --git a/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/privateFunctionReference.kt b/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/privateFunctionReference.kt index b02e2936d06..01445da6948 100644 --- a/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/privateFunctionReference.kt +++ b/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/privateFunctionReference.kt @@ -1,5 +1,5 @@ -// FILE: 1.kt // SKIP_INLINE_CHECK_IN: inlineFun$default +// FILE: 1.kt package test private fun ok() = "OK" diff --git a/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/privatePropertyReference.kt b/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/privatePropertyReference.kt index 37b283777ce..176926e7702 100644 --- a/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/privatePropertyReference.kt +++ b/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/privatePropertyReference.kt @@ -1,5 +1,5 @@ -// FILE: 1.kt // SKIP_INLINE_CHECK_IN: inlineFun$default +// FILE: 1.kt package test private val ok = "OK" diff --git a/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/propertyImportedFromObject.kt b/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/propertyImportedFromObject.kt index ee6db8b4d9f..3a2bdfa64d9 100644 --- a/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/propertyImportedFromObject.kt +++ b/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/propertyImportedFromObject.kt @@ -1,3 +1,4 @@ +// SKIP_INLINE_CHECK_IN: inlineFun$default // FILE: 1.kt package test @@ -8,7 +9,6 @@ inline fun stub() {} // FILE: 2.kt -// SKIP_INLINE_CHECK_IN: inlineFun$default import test.A.ok inline fun inlineFun(lambda: () -> String = ::ok): String { diff --git a/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/propertyReference.kt b/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/propertyReference.kt index 2d2f32305f4..deab72d47c4 100644 --- a/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/propertyReference.kt +++ b/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/propertyReference.kt @@ -1,5 +1,5 @@ -// FILE: 1.kt // SKIP_INLINE_CHECK_IN: inlineFun$default +// FILE: 1.kt package test val ok = "OK" diff --git a/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/propertyReferenceFromClass.kt b/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/propertyReferenceFromClass.kt index c58b8d70e09..78fee3cfe15 100644 --- a/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/propertyReferenceFromClass.kt +++ b/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/propertyReferenceFromClass.kt @@ -1,5 +1,5 @@ -// FILE: 1.kt // SKIP_INLINE_CHECK_IN: inlineFun$default +// FILE: 1.kt package test class A(val ok: String) diff --git a/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/propertyReferenceFromObject.kt b/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/propertyReferenceFromObject.kt index 10f829fbb35..1d2cceaf958 100644 --- a/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/propertyReferenceFromObject.kt +++ b/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/propertyReferenceFromObject.kt @@ -1,5 +1,5 @@ -// FILE: 1.kt // SKIP_INLINE_CHECK_IN: inlineFun$default +// FILE: 1.kt package test object A { diff --git a/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/defaultCallInDefaultLambda.kt b/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/defaultCallInDefaultLambda.kt index d63787b9e0d..bfbeb9c76ca 100644 --- a/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/defaultCallInDefaultLambda.kt +++ b/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/defaultCallInDefaultLambda.kt @@ -12,4 +12,3 @@ inline fun foo(f: () -> String = { bar() }) = f() fun box(): String { return foo() } - diff --git a/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/defaultLambdaInNoInline.kt b/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/defaultLambdaInNoInline.kt index 1b40fffadb8..bfebf8d7b28 100644 --- a/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/defaultLambdaInNoInline.kt +++ b/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/defaultLambdaInNoInline.kt @@ -1,5 +1,6 @@ -// FILE: 1.kt // SKIP_INLINE_CHECK_IN: inlineFun$default +// NO_CHECK_LAMBDA_INLINING +// FILE: 1.kt package test inline fun inlineFun(crossinline inlineLambda: () -> String = { "OK" }, noinline noInlineLambda: () -> String = { inlineLambda() }): String { @@ -7,7 +8,6 @@ inline fun inlineFun(crossinline inlineLambda: () -> String = { "OK" }, noinline } // FILE: 2.kt -//NO_CHECK_LAMBDA_INLINING // CHECK_CALLED_IN_SCOPE: function=inlineFun$lambda_0 scope=box import test.* diff --git a/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/differentInvokeSignature.kt b/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/differentInvokeSignature.kt index d4ce1284679..a23736994d8 100644 --- a/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/differentInvokeSignature.kt +++ b/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/differentInvokeSignature.kt @@ -1,5 +1,5 @@ -// FILE: 1.kt // SKIP_INLINE_CHECK_IN: inlineFun$default +// FILE: 1.kt package test @@ -15,4 +15,4 @@ import test.* fun box(): String { return (inlineFun() as Child).value -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/instanceCapturedInClass.kt b/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/instanceCapturedInClass.kt index 897f9f4a392..23c85415305 100644 --- a/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/instanceCapturedInClass.kt +++ b/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/instanceCapturedInClass.kt @@ -1,5 +1,5 @@ -// FILE: 1.kt // SKIP_INLINE_CHECK_IN: inlineFun$default +// FILE: 1.kt package test class A(val value: String) { diff --git a/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/instanceCapturedInInterface.kt b/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/instanceCapturedInInterface.kt index 3916a7bd0ef..3ebc7165c81 100644 --- a/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/instanceCapturedInInterface.kt +++ b/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/instanceCapturedInInterface.kt @@ -1,5 +1,5 @@ -// FILE: 1.kt // SKIP_INLINE_CHECK_IN: inlineFun$default +// FILE: 1.kt // CHECK_CONTAINS_NO_CALLS: test package test diff --git a/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/jvmStaticDefault.kt b/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/jvmStaticDefault.kt index e3ea90f24dc..bc6f33a7187 100644 --- a/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/jvmStaticDefault.kt +++ b/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/jvmStaticDefault.kt @@ -1,7 +1,7 @@ -// FILE: 1.kt // SKIP_INLINE_CHECK_IN: inlineFun$default +// WITH_RUNTIME +// FILE: 1.kt // TARGET_BACKEND: JVM -//WITH_RUNTIME package test object X { diff --git a/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/kt21827.kt b/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/kt21827.kt index bcb63c5cc0f..baee63484a6 100644 --- a/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/kt21827.kt +++ b/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/kt21827.kt @@ -1,5 +1,5 @@ -// FILE: 1.kt // SKIP_INLINE_CHECK_IN: lParams$default +// FILE: 1.kt package test //A lot of blank lines [Don't delete] @@ -39,4 +39,3 @@ fun box(): String { lParams() } } - diff --git a/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/kt21946.kt b/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/kt21946.kt index b843e6e6a55..ead76228865 100644 --- a/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/kt21946.kt +++ b/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/kt21946.kt @@ -1,5 +1,5 @@ -// FILE: 1.kt // NO_CHECK_LAMBDA_INLINING +// FILE: 1.kt package test interface Call { @@ -17,4 +17,4 @@ import test.* fun box(): String { return test("OK").run() -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/kt24477.kt b/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/kt24477.kt index d093fc4c95f..15d5dd84785 100644 --- a/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/kt24477.kt +++ b/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/kt24477.kt @@ -1,5 +1,5 @@ -// FILE: 1.kt // SKIP_INLINE_CHECK_IN: inlineFun$default +// FILE: 1.kt package test class Item @@ -13,4 +13,4 @@ import test.* fun box(): String { return inlineFun("OK") -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/kt25106.kt b/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/kt25106.kt index 192c79daabe..72633eb8446 100644 --- a/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/kt25106.kt +++ b/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/kt25106.kt @@ -1,5 +1,5 @@ -// FILE: 1.kt // SKIP_INLINE_CHECK_IN: inlineFun$default +// FILE: 1.kt package test inline fun inlineFun(action: () -> Any = { "OK" }): Any { @@ -11,4 +11,4 @@ import test.* fun box(): String { return inlineFun() as String -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/kt26636.kt b/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/kt26636.kt index 3a8a5257d27..8d30e802be8 100644 --- a/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/kt26636.kt +++ b/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/kt26636.kt @@ -1,7 +1,7 @@ +// SKIP_INLINE_CHECK_IN: enumOrThrow$default // TARGET_BACKEND: JVM // WITH_RUNTIME // FILE: 1.kt -// SKIP_INLINE_CHECK_IN: enumOrThrow$default package test enum class TarEnum { @@ -21,4 +21,4 @@ import test.* fun box(): String { return "OK".enumOrThrow()!!.name -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/noInline.kt b/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/noInline.kt index 2f9c2618cc3..7e2a4620c07 100644 --- a/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/noInline.kt +++ b/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/noInline.kt @@ -1,3 +1,4 @@ +// NO_CHECK_LAMBDA_INLINING // FILE: 1.kt package test @@ -8,11 +9,10 @@ inline fun inlineFun(capturedParam: String, noinline lambda: () -> String = { ca fun call(lambda: () -> String ) = lambda() // FILE: 2.kt -//NO_CHECK_LAMBDA_INLINING // CHECK_CALLED_IN_SCOPE: function=inlineFun$lambda scope=box // CHECK_CALLED_IN_SCOPE: function=call scope=box import test.* fun box(): String { return inlineFun("OK") -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/nonDefaultInlineInNoInline.kt b/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/nonDefaultInlineInNoInline.kt index 5d5d8f59341..3ad8d956d3a 100644 --- a/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/nonDefaultInlineInNoInline.kt +++ b/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/nonDefaultInlineInNoInline.kt @@ -1,5 +1,6 @@ -// FILE: 1.kt // SKIP_INLINE_CHECK_IN: inlineFun$default +// NO_CHECK_LAMBDA_INLINING +// FILE: 1.kt package test inline fun inlineFun(crossinline inlineLambda: () -> String, noinline noInlineLambda: () -> String = { inlineLambda() }): String { @@ -7,7 +8,6 @@ inline fun inlineFun(crossinline inlineLambda: () -> String, noinline noInlineLa } // FILE: 2.kt -//NO_CHECK_LAMBDA_INLINING // CHECK_CALLED_IN_SCOPE: function=inlineFun$lambda scope=inlineFun import test.* diff --git a/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/receiverClash.kt b/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/receiverClash.kt index 5b3a4f122fb..1d509a34873 100644 --- a/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/receiverClash.kt +++ b/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/receiverClash.kt @@ -1,5 +1,5 @@ -// FILE: 1.kt // SKIP_INLINE_CHECK_IN: inlineFun$default +// FILE: 1.kt package test inline fun String.inlineFun(crossinline lambda: () -> String = { this }): String { diff --git a/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/receiverClash2.kt b/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/receiverClash2.kt index 458a717c608..eb1aaacfa86 100644 --- a/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/receiverClash2.kt +++ b/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/receiverClash2.kt @@ -1,5 +1,5 @@ -// FILE: 1.kt // SKIP_INLINE_CHECK_IN: inlineFun$default +// FILE: 1.kt package test inline fun String.inlineFun(crossinline lambda: () -> String, crossinline dlambda: () -> String = { this }): String { diff --git a/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/receiverClashInClass.kt b/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/receiverClashInClass.kt index f7366dbfe05..cf8b2298fc6 100644 --- a/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/receiverClashInClass.kt +++ b/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/receiverClashInClass.kt @@ -1,5 +1,6 @@ -// FILE: 1.kt // SKIP_INLINE_CHECK_IN: inlineFun$default +// WITH_RUNTIME +// FILE: 1.kt package test class A(val value: String) { @@ -12,7 +13,6 @@ class A(val value: String) { } // FILE: 2.kt -//WITH_RUNTIME // CHECK_CALLED_IN_SCOPE: function=A$inlineFun$lambda scope=box // CHECK_CALLED_IN_SCOPE: function=A$inlineFun$lambda_0 scope=box import test.* diff --git a/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/receiverClashInClass2.kt b/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/receiverClashInClass2.kt index f497af6035a..d2d45f33b9f 100644 --- a/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/receiverClashInClass2.kt +++ b/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/receiverClashInClass2.kt @@ -1,5 +1,5 @@ -// FILE: 1.kt // SKIP_INLINE_CHECK_IN: inlineFun$default +// FILE: 1.kt package test class A(val value: String) { diff --git a/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simple.kt b/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simple.kt index 087d6396a7e..54a94ccda3e 100644 --- a/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simple.kt +++ b/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simple.kt @@ -1,5 +1,5 @@ -// FILE: 1.kt // SKIP_INLINE_CHECK_IN: inlineFun$default +// FILE: 1.kt package test inline fun inlineFun(capturedParam: String, lambda: () -> String = { capturedParam }): String { diff --git a/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simpleErased.kt b/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simpleErased.kt index 06c34bf8e5f..04e288789b3 100644 --- a/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simpleErased.kt +++ b/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simpleErased.kt @@ -1,5 +1,5 @@ -// FILE: 1.kt // SKIP_INLINE_CHECK_IN: inlineFun$default +// FILE: 1.kt package test inline fun inlineFun(capturedParam: String, lambda: () -> Any = { capturedParam as Any }): Any { diff --git a/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simpleErasedStaticInstance.kt b/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simpleErasedStaticInstance.kt index bc091c6b80f..80c1829de84 100644 --- a/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simpleErasedStaticInstance.kt +++ b/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simpleErasedStaticInstance.kt @@ -1,5 +1,5 @@ -// FILE: 1.kt // SKIP_INLINE_CHECK_IN: inlineFun$default +// FILE: 1.kt package test inline fun inlineFun(lambda: () -> Any = { "OK" as Any }): Any { diff --git a/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simpleExtension.kt b/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simpleExtension.kt index 012d29a9e6d..3d3a8575301 100644 --- a/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simpleExtension.kt +++ b/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simpleExtension.kt @@ -1,5 +1,5 @@ -// FILE: 1.kt // SKIP_INLINE_CHECK_IN: inlineFun$default +// FILE: 1.kt package test inline fun inlineFun(param: String, lambda: String.() -> String = { this }): String { diff --git a/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simpleGeneric.kt b/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simpleGeneric.kt index 8a5c76bffdb..6859fe86654 100644 --- a/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simpleGeneric.kt +++ b/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simpleGeneric.kt @@ -1,5 +1,5 @@ -// FILE: 1.kt // SKIP_INLINE_CHECK_IN: inlineFun$default +// FILE: 1.kt package test open class A(val value: String) diff --git a/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simpleStaticInstance.kt b/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simpleStaticInstance.kt index 9a70f87d40f..17dddc3eed3 100644 --- a/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simpleStaticInstance.kt +++ b/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simpleStaticInstance.kt @@ -1,5 +1,5 @@ -// FILE: 1.kt // SKIP_INLINE_CHECK_IN: inlineFun$default +// FILE: 1.kt package test inline fun inlineFun(lambda: () -> String = { "OK" }): String { diff --git a/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/thisClash.kt b/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/thisClash.kt index 4ce52bb364e..58da56c9a72 100644 --- a/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/thisClash.kt +++ b/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/thisClash.kt @@ -1,5 +1,5 @@ -// FILE: 1.kt // SKIP_INLINE_CHECK_IN: inlineFun$default +// FILE: 1.kt package test inline fun String.inlineFun(crossinline lambda: () -> String = { { this }() }): String { diff --git a/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/thisClashInClass.kt b/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/thisClashInClass.kt index 6c899fd9157..e29ff68c7ca 100644 --- a/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/thisClashInClass.kt +++ b/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/thisClashInClass.kt @@ -1,5 +1,6 @@ -// FILE: 1.kt // SKIP_INLINE_CHECK_IN: inlineFun$default +// WITH_RUNTIME +// FILE: 1.kt package test class A(val value: String) { @@ -13,7 +14,6 @@ class A(val value: String) { } // FILE: 2.kt -//WITH_RUNTIME // CHECK_CALLED_IN_SCOPE: function=A$inlineFun$lambda scope=box // CHECK_CALLED_IN_SCOPE: function=A$inlineFun$lambda_0 scope=box import test.* diff --git a/compiler/testData/codegen/boxInline/defaultValues/maskElimination/32Parameters.kt b/compiler/testData/codegen/boxInline/defaultValues/maskElimination/32Parameters.kt index 5ec5e8be2a5..997f9c24aa0 100644 --- a/compiler/testData/codegen/boxInline/defaultValues/maskElimination/32Parameters.kt +++ b/compiler/testData/codegen/boxInline/defaultValues/maskElimination/32Parameters.kt @@ -63,4 +63,4 @@ fun box(): String { return "fail 4: ${test(p20 = "O", p22 = "K", p32 = "23")}" return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/defaultValues/maskElimination/33Parameters.kt b/compiler/testData/codegen/boxInline/defaultValues/maskElimination/33Parameters.kt index 70b89a7c6d2..c70fc9e903e 100644 --- a/compiler/testData/codegen/boxInline/defaultValues/maskElimination/33Parameters.kt +++ b/compiler/testData/codegen/boxInline/defaultValues/maskElimination/33Parameters.kt @@ -67,4 +67,4 @@ fun box(): String { return "fail 4: ${test(p20 = "O", p22 = "K", p32 = "33", p33 ="32")}" return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/defaultValues/maskElimination/kt18792.kt b/compiler/testData/codegen/boxInline/defaultValues/maskElimination/kt18792.kt index 24ea76ce57c..b2e2206fb42 100644 --- a/compiler/testData/codegen/boxInline/defaultValues/maskElimination/kt18792.kt +++ b/compiler/testData/codegen/boxInline/defaultValues/maskElimination/kt18792.kt @@ -1,5 +1,5 @@ +// WITH_RUNTIME // FILE: 1.kt -//WITH_RUNTIME package test diff --git a/compiler/testData/codegen/boxInline/defaultValues/maskElimination/kt19679.kt b/compiler/testData/codegen/boxInline/defaultValues/maskElimination/kt19679.kt index 046b61f6bd1..3126af1726d 100644 --- a/compiler/testData/codegen/boxInline/defaultValues/maskElimination/kt19679.kt +++ b/compiler/testData/codegen/boxInline/defaultValues/maskElimination/kt19679.kt @@ -16,4 +16,4 @@ fun box(): String { build({ result = "OK" }) return result -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/defaultValues/maskElimination/kt19679_2.kt b/compiler/testData/codegen/boxInline/defaultValues/maskElimination/kt19679_2.kt index 001a65f8d62..bb90a3dca20 100644 --- a/compiler/testData/codegen/boxInline/defaultValues/maskElimination/kt19679_2.kt +++ b/compiler/testData/codegen/boxInline/defaultValues/maskElimination/kt19679_2.kt @@ -12,4 +12,4 @@ import test.* fun box(): String { build () return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/defaultValues/maskElimination/kt19679_3.kt b/compiler/testData/codegen/boxInline/defaultValues/maskElimination/kt19679_3.kt index 8a8385a6857..43bdfcbf558 100644 --- a/compiler/testData/codegen/boxInline/defaultValues/maskElimination/kt19679_3.kt +++ b/compiler/testData/codegen/boxInline/defaultValues/maskElimination/kt19679_3.kt @@ -17,4 +17,4 @@ fun box(): String { build ({ result = "OK" }) return result -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/defaultValues/maskElimination/simple.kt b/compiler/testData/codegen/boxInline/defaultValues/maskElimination/simple.kt index bca4b1fd4a8..6de5f843e28 100644 --- a/compiler/testData/codegen/boxInline/defaultValues/maskElimination/simple.kt +++ b/compiler/testData/codegen/boxInline/defaultValues/maskElimination/simple.kt @@ -33,4 +33,4 @@ fun box() : String { if (A().test("KK") != "KK") return "fail 3: ${A().test("KK")}" return A().test() -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/defaultValues/varArgNoInline.kt b/compiler/testData/codegen/boxInline/defaultValues/varArgNoInline.kt index bfd1c940bc5..fc2824e553b 100644 --- a/compiler/testData/codegen/boxInline/defaultValues/varArgNoInline.kt +++ b/compiler/testData/codegen/boxInline/defaultValues/varArgNoInline.kt @@ -1,5 +1,6 @@ +// WITH_RUNTIME +// NO_CHECK_LAMBDA_INLINING // FILE: 1.kt -//WITH_RUNTIME package test var res = "" @@ -11,10 +12,9 @@ inline fun inlineFun(vararg s : () -> String = arrayOf({ "OK" })) { } // FILE: 2.kt -//NO_CHECK_LAMBDA_INLINING import test.* fun box(): String { inlineFun() return res -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/delegatedProperty/kt16864.kt b/compiler/testData/codegen/boxInline/delegatedProperty/kt16864.kt index 0261b5f3b00..11b21806041 100644 --- a/compiler/testData/codegen/boxInline/delegatedProperty/kt16864.kt +++ b/compiler/testData/codegen/boxInline/delegatedProperty/kt16864.kt @@ -1,3 +1,4 @@ +// NO_CHECK_LAMBDA_INLINING // FILE: 1.kt package test @@ -6,7 +7,6 @@ inline fun mrun(lambda: () -> T): T = lambda() // FILE: 2.kt -// NO_CHECK_LAMBDA_INLINING import test.* object Whatever { @@ -20,4 +20,4 @@ fun box(): String { val keys = key }.keys } -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/enclosingInfo/inlineChain.kt b/compiler/testData/codegen/boxInline/enclosingInfo/inlineChain.kt index 0cd603b46d5..61daf66375e 100644 --- a/compiler/testData/codegen/boxInline/enclosingInfo/inlineChain.kt +++ b/compiler/testData/codegen/boxInline/enclosingInfo/inlineChain.kt @@ -1,6 +1,6 @@ +// WITH_REFLECT // TARGET_BACKEND: JVM // FILE: 1.kt -// WITH_REFLECT package test inline fun call(s: () -> R) = s() diff --git a/compiler/testData/codegen/boxInline/enclosingInfo/objectInInlineFun.kt b/compiler/testData/codegen/boxInline/enclosingInfo/objectInInlineFun.kt index aaf8ff5d5d9..5f933d3a5d3 100644 --- a/compiler/testData/codegen/boxInline/enclosingInfo/objectInInlineFun.kt +++ b/compiler/testData/codegen/boxInline/enclosingInfo/objectInInlineFun.kt @@ -1,6 +1,6 @@ +// WITH_REFLECT // TARGET_BACKEND: JVM // FILE: 1.kt -// WITH_REFLECT package test interface Z { diff --git a/compiler/testData/codegen/boxInline/enclosingInfo/transformedConstructorWithAdditionalObject.kt b/compiler/testData/codegen/boxInline/enclosingInfo/transformedConstructorWithAdditionalObject.kt index b453fa0cf19..13677fd9150 100644 --- a/compiler/testData/codegen/boxInline/enclosingInfo/transformedConstructorWithAdditionalObject.kt +++ b/compiler/testData/codegen/boxInline/enclosingInfo/transformedConstructorWithAdditionalObject.kt @@ -1,6 +1,6 @@ +// WITH_REFLECT // TARGET_BACKEND: JVM // FILE: 1.kt -// WITH_REFLECT package test interface Z { diff --git a/compiler/testData/codegen/boxInline/enum/kt10569.kt b/compiler/testData/codegen/boxInline/enum/kt10569.kt index 2ffd30c8ad8..e0471e976bf 100644 --- a/compiler/testData/codegen/boxInline/enum/kt10569.kt +++ b/compiler/testData/codegen/boxInline/enum/kt10569.kt @@ -1,5 +1,5 @@ -// FILE: 1.kt // WITH_RUNTIME +// FILE: 1.kt package test var result = "" @@ -28,4 +28,3 @@ fun box(): String { } return result } - diff --git a/compiler/testData/codegen/boxInline/enum/kt18254.kt b/compiler/testData/codegen/boxInline/enum/kt18254.kt index eb5cf04573c..3c838a25634 100644 --- a/compiler/testData/codegen/boxInline/enum/kt18254.kt +++ b/compiler/testData/codegen/boxInline/enum/kt18254.kt @@ -1,5 +1,6 @@ -// FILE: 1.kt // WITH_RUNTIME +// NO_CHECK_LAMBDA_INLINING +// FILE: 1.kt package test inline fun stub() {} @@ -9,7 +10,6 @@ enum class Z { } // FILE: 2.kt -// NO_CHECK_LAMBDA_INLINING import test.* fun box(): String { diff --git a/compiler/testData/codegen/boxInline/enum/valueOf.kt b/compiler/testData/codegen/boxInline/enum/valueOf.kt index 5a9f2420163..298c3fc4c73 100644 --- a/compiler/testData/codegen/boxInline/enum/valueOf.kt +++ b/compiler/testData/codegen/boxInline/enum/valueOf.kt @@ -1,5 +1,5 @@ -// FILE: 1.kt // WITH_RUNTIME +// FILE: 1.kt package test inline fun > myValueOf(): String { diff --git a/compiler/testData/codegen/boxInline/enum/valueOfCapturedType.kt b/compiler/testData/codegen/boxInline/enum/valueOfCapturedType.kt index c0519a81e3e..e56ad3a6c54 100644 --- a/compiler/testData/codegen/boxInline/enum/valueOfCapturedType.kt +++ b/compiler/testData/codegen/boxInline/enum/valueOfCapturedType.kt @@ -1,5 +1,5 @@ -// FILE: 1.kt // WITH_RUNTIME +// FILE: 1.kt package test inline fun > myValueOf(): String { diff --git a/compiler/testData/codegen/boxInline/enum/valueOfChain.kt b/compiler/testData/codegen/boxInline/enum/valueOfChain.kt index 15d240b28c5..48c25e8d07b 100644 --- a/compiler/testData/codegen/boxInline/enum/valueOfChain.kt +++ b/compiler/testData/codegen/boxInline/enum/valueOfChain.kt @@ -1,5 +1,5 @@ -// FILE: 1.kt // WITH_RUNTIME +// FILE: 1.kt package test inline fun > myValueOf(): String { diff --git a/compiler/testData/codegen/boxInline/enum/valueOfChainCapturedType.kt b/compiler/testData/codegen/boxInline/enum/valueOfChainCapturedType.kt index 74b5f0f3bb5..428054afc22 100644 --- a/compiler/testData/codegen/boxInline/enum/valueOfChainCapturedType.kt +++ b/compiler/testData/codegen/boxInline/enum/valueOfChainCapturedType.kt @@ -1,5 +1,5 @@ -// FILE: 1.kt // WITH_RUNTIME +// FILE: 1.kt package test inline fun > myValueOf(): String { diff --git a/compiler/testData/codegen/boxInline/enum/valueOfNonReified.kt b/compiler/testData/codegen/boxInline/enum/valueOfNonReified.kt index 761813faec2..e84f2760272 100644 --- a/compiler/testData/codegen/boxInline/enum/valueOfNonReified.kt +++ b/compiler/testData/codegen/boxInline/enum/valueOfNonReified.kt @@ -1,5 +1,5 @@ -// FILE: 1.kt // WITH_RUNTIME +// FILE: 1.kt package test inline fun myValueOf(): String { diff --git a/compiler/testData/codegen/boxInline/enum/values.kt b/compiler/testData/codegen/boxInline/enum/values.kt index 81c0954c4de..7cd9aa6966e 100644 --- a/compiler/testData/codegen/boxInline/enum/values.kt +++ b/compiler/testData/codegen/boxInline/enum/values.kt @@ -1,5 +1,5 @@ -// FILE: 1.kt // WITH_RUNTIME +// FILE: 1.kt // KJS_WITH_FULL_RUNTIME package test diff --git a/compiler/testData/codegen/boxInline/enum/valuesAsArray.kt b/compiler/testData/codegen/boxInline/enum/valuesAsArray.kt index 57dd9b4f6e0..65e31b37664 100644 --- a/compiler/testData/codegen/boxInline/enum/valuesAsArray.kt +++ b/compiler/testData/codegen/boxInline/enum/valuesAsArray.kt @@ -1,5 +1,5 @@ -// FILE: 1.kt // WITH_RUNTIME +// FILE: 1.kt // KJS_WITH_FULL_RUNTIME package test diff --git a/compiler/testData/codegen/boxInline/enum/valuesCapturedType.kt b/compiler/testData/codegen/boxInline/enum/valuesCapturedType.kt index de5782e0353..a336b0c641a 100644 --- a/compiler/testData/codegen/boxInline/enum/valuesCapturedType.kt +++ b/compiler/testData/codegen/boxInline/enum/valuesCapturedType.kt @@ -1,5 +1,5 @@ -// FILE: 1.kt // WITH_RUNTIME +// FILE: 1.kt // KJS_WITH_FULL_RUNTIME package test diff --git a/compiler/testData/codegen/boxInline/enum/valuesChain.kt b/compiler/testData/codegen/boxInline/enum/valuesChain.kt index 05742940ef7..6d3da298793 100644 --- a/compiler/testData/codegen/boxInline/enum/valuesChain.kt +++ b/compiler/testData/codegen/boxInline/enum/valuesChain.kt @@ -1,5 +1,5 @@ -// FILE: 1.kt // WITH_RUNTIME +// FILE: 1.kt // KJS_WITH_FULL_RUNTIME package test diff --git a/compiler/testData/codegen/boxInline/enum/valuesChainCapturedType.kt b/compiler/testData/codegen/boxInline/enum/valuesChainCapturedType.kt index ef372571afc..a04127ad7da 100644 --- a/compiler/testData/codegen/boxInline/enum/valuesChainCapturedType.kt +++ b/compiler/testData/codegen/boxInline/enum/valuesChainCapturedType.kt @@ -1,5 +1,5 @@ -// FILE: 1.kt // WITH_RUNTIME +// FILE: 1.kt // KJS_WITH_FULL_RUNTIME package test diff --git a/compiler/testData/codegen/boxInline/enum/valuesNonReified.kt b/compiler/testData/codegen/boxInline/enum/valuesNonReified.kt index 6b161a6f9b2..696b058943e 100644 --- a/compiler/testData/codegen/boxInline/enum/valuesNonReified.kt +++ b/compiler/testData/codegen/boxInline/enum/valuesNonReified.kt @@ -1,5 +1,5 @@ -// FILE: 1.kt // WITH_RUNTIME +// FILE: 1.kt // KJS_WITH_FULL_RUNTIME package test diff --git a/compiler/testData/codegen/boxInline/functionExpression/extension.kt b/compiler/testData/codegen/boxInline/functionExpression/extension.kt index 747e96a6b61..9ca257477e9 100644 --- a/compiler/testData/codegen/boxInline/functionExpression/extension.kt +++ b/compiler/testData/codegen/boxInline/functionExpression/extension.kt @@ -1,5 +1,5 @@ -// FILE: 1.kt // WITH_RUNTIME +// FILE: 1.kt inline fun Inline.calcExt(s: (Int) -> Int, p: Int) : Int { return s(p) } diff --git a/compiler/testData/codegen/boxInline/inlineClasses/inlineClassWithInlineValReturningInlineClass.kt b/compiler/testData/codegen/boxInline/inlineClasses/inlineClassWithInlineValReturningInlineClass.kt index 8fca27fd435..f85510a0aa4 100644 --- a/compiler/testData/codegen/boxInline/inlineClasses/inlineClassWithInlineValReturningInlineClass.kt +++ b/compiler/testData/codegen/boxInline/inlineClasses/inlineClassWithInlineValReturningInlineClass.kt @@ -1,3 +1,4 @@ +// NO_CHECK_LAMBDA_INLINING // !LANGUAGE: +InlineClasses // FILE: 1.kt @@ -12,9 +13,8 @@ inline class IC2(val x: String) // FILE: 2.kt -// NO_CHECK_LAMBDA_INLINING import test.* fun box() : String = - IC1("OK").test.x \ No newline at end of file + IC1("OK").test.x diff --git a/compiler/testData/codegen/boxInline/inlineClasses/inlineFunctionInsideInlineClassesBox.kt b/compiler/testData/codegen/boxInline/inlineClasses/inlineFunctionInsideInlineClassesBox.kt index a138e428a0a..6031ebf82de 100644 --- a/compiler/testData/codegen/boxInline/inlineClasses/inlineFunctionInsideInlineClassesBox.kt +++ b/compiler/testData/codegen/boxInline/inlineClasses/inlineFunctionInsideInlineClassesBox.kt @@ -1,3 +1,4 @@ +// NO_CHECK_LAMBDA_INLINING // !LANGUAGE: +InlineClasses // FILE: 1.kt @@ -13,7 +14,6 @@ inline class A(val x: Int) { inline fun stub() {} // FILE: 2.kt -// NO_CHECK_LAMBDA_INLINING // ^ TODO import test.* diff --git a/compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/any.kt b/compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/any.kt index 7658fec1fb2..f1131a72a6e 100644 --- a/compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/any.kt +++ b/compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/any.kt @@ -1,3 +1,4 @@ +// NO_CHECK_LAMBDA_INLINING // !LANGUAGE: +InlineClasses // FILE: inline.kt @@ -11,7 +12,6 @@ inline fun IC.extensionInline(): T = value as T inline fun normalInline(a: IC): T = a.value as T // FILE: box.kt -// NO_CHECK_LAMBDA_INLINING fun extension(a: IC): T = bar(a) { it.extensionInline() @@ -44,4 +44,4 @@ fun box(): String { if (res != 45) return "FAIL 4: $res" return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/anyN.kt b/compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/anyN.kt index 7080acab31c..f5b99dc75cf 100644 --- a/compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/anyN.kt +++ b/compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/anyN.kt @@ -1,3 +1,4 @@ +// NO_CHECK_LAMBDA_INLINING // !LANGUAGE: +InlineClasses // FILE: inline.kt @@ -11,7 +12,6 @@ inline fun IC.extensionInline(): T = value as T inline fun normalInline(a: IC): T = a.value as T // FILE: box.kt -// NO_CHECK_LAMBDA_INLINING fun extension(a: IC): T = bar(a) { it.extensionInline() @@ -44,4 +44,4 @@ fun box(): String { if (res != 45) return "FAIL 4: $res" return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/iface.kt b/compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/iface.kt index abf2462a71f..5e170886739 100644 --- a/compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/iface.kt +++ b/compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/iface.kt @@ -1,3 +1,4 @@ +// NO_CHECK_LAMBDA_INLINING // !LANGUAGE: +InlineClasses // FILE: inline.kt @@ -15,7 +16,6 @@ inline fun IC.extensionInline(): T = (value as FooHolder).value as T inline fun normalInline(a: IC): T = (a.value as FooHolder).value as T // FILE: box.kt -// NO_CHECK_LAMBDA_INLINING fun extension(a: IC): T = bar(a) { it.extensionInline() @@ -48,4 +48,4 @@ fun box(): String { if (res != 45) return "FAIL 4: $res" return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/ifaceChild.kt b/compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/ifaceChild.kt index 8b0829224b3..253a95c70b4 100644 --- a/compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/ifaceChild.kt +++ b/compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/ifaceChild.kt @@ -1,3 +1,4 @@ +// NO_CHECK_LAMBDA_INLINING // !LANGUAGE: +InlineClasses // FILE: inline.kt @@ -15,7 +16,6 @@ inline fun IC.extensionInline(): T = (value as FooHolder).value as T inline fun normalInline(a: IC): T = (a.value as FooHolder).value as T // FILE: box.kt -// NO_CHECK_LAMBDA_INLINING fun extension(a: IC): T = bar(a) { it.extensionInline() @@ -48,4 +48,4 @@ fun box(): String { if (res != 45) return "FAIL 4: $res" return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/primitive.kt b/compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/primitive.kt index 9841750ba54..dcbf96086a3 100644 --- a/compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/primitive.kt +++ b/compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/primitive.kt @@ -1,3 +1,4 @@ +// NO_CHECK_LAMBDA_INLINING // !LANGUAGE: +InlineClasses // FILE: inline.kt @@ -11,7 +12,6 @@ inline fun IC.extensionInline(): T = value as T inline fun normalInline(a: IC): T = a.value as T // FILE: box.kt -// NO_CHECK_LAMBDA_INLINING fun extension(a: IC): T = bar(a) { it.extensionInline() @@ -44,4 +44,4 @@ fun box(): String { if (res != 45) return "FAIL 4: $res" return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/string.kt b/compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/string.kt index 7cb7cea35e1..288fd64f14b 100644 --- a/compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/string.kt +++ b/compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/string.kt @@ -1,3 +1,4 @@ +// NO_CHECK_LAMBDA_INLINING // !LANGUAGE: +InlineClasses // FILE: inline.kt @@ -10,7 +11,6 @@ inline fun IC.extensionInline(): T = value as T inline fun normalInline(a: IC): T = a.value as T // FILE: box.kt -// NO_CHECK_LAMBDA_INLINING fun extension(a: IC): T = bar(a) { it.extensionInline() diff --git a/compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/any.kt b/compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/any.kt index 3ed119240ab..e2f3c343bbb 100644 --- a/compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/any.kt +++ b/compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/any.kt @@ -1,3 +1,4 @@ +// NO_CHECK_LAMBDA_INLINING // !LANGUAGE: +InlineClasses // FILE: inline.kt @@ -11,7 +12,6 @@ inline fun IC.extensionInline(): T = value as T inline fun normalInline(a: IC): T = a.value as T // FILE: box.kt -// NO_CHECK_LAMBDA_INLINING fun extension(a: IC): T = bar(a) { it.extensionInline() @@ -40,4 +40,4 @@ fun box(): String { if (res != 45) return "FAIL 4: $res" return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/anyN.kt b/compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/anyN.kt index ae83caa6fa4..904732c438e 100644 --- a/compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/anyN.kt +++ b/compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/anyN.kt @@ -1,3 +1,4 @@ +// NO_CHECK_LAMBDA_INLINING // !LANGUAGE: +InlineClasses // FILE: inline.kt @@ -11,7 +12,6 @@ inline fun IC.extensionInline(): T = value as T inline fun normalInline(a: IC): T = a.value as T // FILE: box.kt -// NO_CHECK_LAMBDA_INLINING fun extension(a: IC): T = bar(a) { it.extensionInline() @@ -40,4 +40,4 @@ fun box(): String { if (res != 45) return "FAIL 4: $res" return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/iface.kt b/compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/iface.kt index 016b8d8434d..e1ca8c53d5f 100644 --- a/compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/iface.kt +++ b/compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/iface.kt @@ -1,3 +1,4 @@ +// NO_CHECK_LAMBDA_INLINING // !LANGUAGE: +InlineClasses // FILE: inline.kt @@ -15,7 +16,6 @@ inline fun IC.extensionInline(): T = (value as FooHolder).value as T inline fun normalInline(a: IC): T = (a.value as FooHolder).value as T // FILE: box.kt -// NO_CHECK_LAMBDA_INLINING fun extension(a: IC): T = bar(a) { it.extensionInline() @@ -44,4 +44,4 @@ fun box(): String { if (res != 45) return "FAIL 4: $res" return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/ifaceChild.kt b/compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/ifaceChild.kt index f718726117f..0024e2185cc 100644 --- a/compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/ifaceChild.kt +++ b/compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/ifaceChild.kt @@ -1,3 +1,4 @@ +// NO_CHECK_LAMBDA_INLINING // !LANGUAGE: +InlineClasses // FILE: inline.kt @@ -15,7 +16,6 @@ inline fun IC.extensionInline(): T = (value as FooHolder).value as T inline fun normalInline(a: IC): T = (a.value as FooHolder).value as T // FILE: box.kt -// NO_CHECK_LAMBDA_INLINING fun extension(a: IC): T = bar(a) { it.extensionInline() @@ -44,4 +44,4 @@ fun box(): String { if (res != 45) return "FAIL 4: $res" return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/primitive.kt b/compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/primitive.kt index d3a9e4085e6..2cfceffe81d 100644 --- a/compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/primitive.kt +++ b/compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/primitive.kt @@ -1,3 +1,4 @@ +// NO_CHECK_LAMBDA_INLINING // !LANGUAGE: +InlineClasses // FILE: inline.kt @@ -11,7 +12,6 @@ inline fun IC.extensionInline(): T = value as T inline fun normalInline(a: IC): T = a.value as T // FILE: box.kt -// NO_CHECK_LAMBDA_INLINING fun extension(a: IC): T = bar(a) { it.extensionInline() @@ -40,4 +40,4 @@ fun box(): String { if (res != 45) return "FAIL 4: $res" return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/string.kt b/compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/string.kt index 0072106d1cc..4d97374fbbf 100644 --- a/compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/string.kt +++ b/compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/string.kt @@ -1,3 +1,4 @@ +// NO_CHECK_LAMBDA_INLINING // !LANGUAGE: +InlineClasses // FILE: inline.kt @@ -10,7 +11,6 @@ inline fun IC.extensionInline(): T = value as T inline fun normalInline(a: IC): T = a.value as T // FILE: box.kt -// NO_CHECK_LAMBDA_INLINING fun extension(a: IC): T = bar(a) { it.extensionInline() diff --git a/compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/any.kt b/compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/any.kt index 069c28fa678..8d582e17f6b 100644 --- a/compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/any.kt +++ b/compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/any.kt @@ -1,3 +1,4 @@ +// NO_CHECK_LAMBDA_INLINING // !LANGUAGE: +InlineClasses // FILE: inline.kt @@ -11,7 +12,6 @@ inline fun IC.extensionInline(): T = value as T inline fun normalInline(a: IC): T = a.value as T // FILE: box.kt -// NO_CHECK_LAMBDA_INLINING fun extension(a: IC): T = bar(a, object : IFace { override fun call(it: IC): T = it.extensionInline() @@ -44,4 +44,4 @@ fun box(): String { if (res != 45) return "FAIL 4: $res" return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/anyN.kt b/compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/anyN.kt index 6e47f095e6c..ed0fc096f9f 100644 --- a/compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/anyN.kt +++ b/compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/anyN.kt @@ -1,3 +1,4 @@ +// NO_CHECK_LAMBDA_INLINING // !LANGUAGE: +InlineClasses // FILE: inline.kt @@ -11,7 +12,6 @@ inline fun IC.extensionInline(): T = value as T inline fun normalInline(a: IC): T = a.value as T // FILE: box.kt -// NO_CHECK_LAMBDA_INLINING fun extension(a: IC): T = bar(a, object : IFace { override fun call(it: IC): T = it.extensionInline() @@ -44,4 +44,4 @@ fun box(): String { if (res != 45) return "FAIL 4: $res" return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/iface.kt b/compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/iface.kt index b7a307b2761..ff7e0526c76 100644 --- a/compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/iface.kt +++ b/compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/iface.kt @@ -1,3 +1,4 @@ +// NO_CHECK_LAMBDA_INLINING // !LANGUAGE: +InlineClasses // FILE: inline.kt @@ -15,7 +16,6 @@ inline fun IC.extensionInline(): T = (value as FooHolder).value as T inline fun normalInline(a: IC): T = (a.value as FooHolder).value as T // FILE: box.kt -// NO_CHECK_LAMBDA_INLINING fun extension(a: IC): T = bar(a, object : IFace { override fun call(it: IC): T = it.extensionInline() @@ -48,4 +48,4 @@ fun box(): String { if (res != 45) return "FAIL 4: $res" return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/ifaceChild.kt b/compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/ifaceChild.kt index 90d922c8bd4..43603e03684 100644 --- a/compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/ifaceChild.kt +++ b/compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/ifaceChild.kt @@ -1,3 +1,4 @@ +// NO_CHECK_LAMBDA_INLINING // !LANGUAGE: +InlineClasses // FILE: inline.kt @@ -15,7 +16,6 @@ inline fun IC.extensionInline(): T = (value as FooHolder).value as T inline fun normalInline(a: IC): T = (a.value as FooHolder).value as T // FILE: box.kt -// NO_CHECK_LAMBDA_INLINING fun extension(a: IC): T = bar(a, object : IFace { override fun call(it: IC): T = it.extensionInline() @@ -48,4 +48,4 @@ fun box(): String { if (res != 45) return "FAIL 4: $res" return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/primitive.kt b/compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/primitive.kt index 3caa1af2e78..b36c8a35b7b 100644 --- a/compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/primitive.kt +++ b/compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/primitive.kt @@ -1,3 +1,4 @@ +// NO_CHECK_LAMBDA_INLINING // !LANGUAGE: +InlineClasses // FILE: inline.kt @@ -11,7 +12,6 @@ inline fun IC.extensionInline(): T = value as T inline fun normalInline(a: IC): T = a.value as T // FILE: box.kt -// NO_CHECK_LAMBDA_INLINING fun extension(a: IC): T = bar(a, object : IFace { override fun call(it: IC): T = it.extensionInline() @@ -44,4 +44,4 @@ fun box(): String { if (res != 45) return "FAIL 4: $res" return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/string.kt b/compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/string.kt index bdf6307c30c..bae96b42ec8 100644 --- a/compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/string.kt +++ b/compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/string.kt @@ -1,3 +1,4 @@ +// NO_CHECK_LAMBDA_INLINING // !LANGUAGE: +InlineClasses // FILE: inline.kt @@ -10,7 +11,6 @@ inline fun IC.extensionInline(): T = value as T inline fun normalInline(a: IC): T = a.value as T // FILE: box.kt -// NO_CHECK_LAMBDA_INLINING fun extension(a: IC): T = bar(a, object : IFace { override fun call(it: IC): T = it.extensionInline() diff --git a/compiler/testData/codegen/boxInline/innerClasses/innerLambda.kt b/compiler/testData/codegen/boxInline/innerClasses/innerLambda.kt index 1ca55eb4619..9288a1b52ae 100644 --- a/compiler/testData/codegen/boxInline/innerClasses/innerLambda.kt +++ b/compiler/testData/codegen/boxInline/innerClasses/innerLambda.kt @@ -1,6 +1,6 @@ +// WITH_RUNTIME // TARGET_BACKEND: JVM // FILE: 1.kt -// WITH_RUNTIME package test inline fun foo1() = run { diff --git a/compiler/testData/codegen/boxInline/invokedynamic/lambdas/crossinlineLambda1.kt b/compiler/testData/codegen/boxInline/invokedynamic/lambdas/crossinlineLambda1.kt new file mode 100644 index 00000000000..438ae34742e --- /dev/null +++ b/compiler/testData/codegen/boxInline/invokedynamic/lambdas/crossinlineLambda1.kt @@ -0,0 +1,16 @@ +// TARGET_BACKEND: JVM +// JVM_TARGET: 1.8 +// LAMBDAS: INDY +// FILE: 1.kt +inline fun cross(crossinline fn: () -> String) : Any = + object { + override fun toString(): String = fn() + } + +fun foo(fn: () -> String) = fn() + +// FILE: 2.kt +fun box() = + cross { + foo { "OK" } + }.toString() \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/invokedynamic/lambdas/crossinlineLambda2.kt b/compiler/testData/codegen/boxInline/invokedynamic/lambdas/crossinlineLambda2.kt new file mode 100644 index 00000000000..deec869c487 --- /dev/null +++ b/compiler/testData/codegen/boxInline/invokedynamic/lambdas/crossinlineLambda2.kt @@ -0,0 +1,22 @@ +// TARGET_BACKEND: JVM +// JVM_TARGET: 1.8 +// LAMBDAS: INDY +// FILE: 1.kt +class C { + fun test() = + cross { + foo { "OK" } + }.toString() +} + +inline fun cross(crossinline fn: () -> String) : Any = + object { + override fun toString(): String = fn() + } + +fun foo(fn: () -> String) = fn() + +// FILE: 2.kt +fun box() = + C().test() + diff --git a/compiler/testData/codegen/boxInline/invokedynamic/lambdas/inlineFunInDifferentPackage.kt b/compiler/testData/codegen/boxInline/invokedynamic/lambdas/inlineFunInDifferentPackage.kt new file mode 100644 index 00000000000..880765e662f --- /dev/null +++ b/compiler/testData/codegen/boxInline/invokedynamic/lambdas/inlineFunInDifferentPackage.kt @@ -0,0 +1,16 @@ +// TARGET_BACKEND: JVM +// JVM_TARGET: 1.8 +// LAMBDAS: INDY +// WITH_RUNTIME +// FILE: 1.kt +package a + +fun fooK(fn: (String) -> String) = fn("K") + +inline fun test(crossinline lambda: (String) -> String) = + fooK { k -> lambda(k) } + +// FILE: 2.kt +import a.* + +fun box() = test { k -> "O" + k } diff --git a/compiler/testData/codegen/boxInline/invokedynamic/lambdas/inlineLambda1.kt b/compiler/testData/codegen/boxInline/invokedynamic/lambdas/inlineLambda1.kt new file mode 100644 index 00000000000..9cd74080685 --- /dev/null +++ b/compiler/testData/codegen/boxInline/invokedynamic/lambdas/inlineLambda1.kt @@ -0,0 +1,25 @@ +// TARGET_BACKEND: JVM +// JVM_TARGET: 1.8 +// LAMBDAS: INDY +// WITH_RUNTIME +// NO_CHECK_LAMBDA_INLINING +// FILE: 1.kt + +fun foo(fn: () -> Unit) = fn() + +inline fun twice(fn: () -> Unit) { + fn() + fn() +} + +// FILE: 2.kt +fun box(): String { + var test = 0 + twice { + foo { test += 1 } + } + if (test != 2) + return "Failed: test=$test" + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/invokedynamic/sam/inline/crossinlineLambda1.kt b/compiler/testData/codegen/boxInline/invokedynamic/sam/crossinlineLambda1.kt similarity index 100% rename from compiler/testData/codegen/box/invokedynamic/sam/inline/crossinlineLambda1.kt rename to compiler/testData/codegen/boxInline/invokedynamic/sam/crossinlineLambda1.kt diff --git a/compiler/testData/codegen/box/invokedynamic/sam/inline/crossinlineLambda2.kt b/compiler/testData/codegen/boxInline/invokedynamic/sam/crossinlineLambda2.kt similarity index 100% rename from compiler/testData/codegen/box/invokedynamic/sam/inline/crossinlineLambda2.kt rename to compiler/testData/codegen/boxInline/invokedynamic/sam/crossinlineLambda2.kt diff --git a/compiler/testData/codegen/box/invokedynamic/sam/inline/inlineFunInDifferentPackage.kt b/compiler/testData/codegen/boxInline/invokedynamic/sam/inlineFunInDifferentPackage.kt similarity index 91% rename from compiler/testData/codegen/box/invokedynamic/sam/inline/inlineFunInDifferentPackage.kt rename to compiler/testData/codegen/boxInline/invokedynamic/sam/inlineFunInDifferentPackage.kt index 29b1ef040c9..5fb23904608 100644 --- a/compiler/testData/codegen/box/invokedynamic/sam/inline/inlineFunInDifferentPackage.kt +++ b/compiler/testData/codegen/boxInline/invokedynamic/sam/inlineFunInDifferentPackage.kt @@ -2,11 +2,6 @@ // JVM_TARGET: 1.8 // SAM_CONVERSIONS: INDY // WITH_RUNTIME -// FILE: 2.kt -import a.* - -fun box() = test { k -> "O" + k } - // FILE: 1.kt package a @@ -17,4 +12,9 @@ fun interface IFoo { fun fooK(iFoo: IFoo) = iFoo.foo("K") inline fun test(crossinline lambda: (String) -> String) = - fooK { k -> lambda(k) } \ No newline at end of file + fooK { k -> lambda(k) } + +// FILE: 2.kt +import a.* + +fun box() = test { k -> "O" + k } diff --git a/compiler/testData/codegen/box/invokedynamic/sam/inline/inlineLambda1.kt b/compiler/testData/codegen/boxInline/invokedynamic/sam/inlineLambda1.kt similarity index 93% rename from compiler/testData/codegen/box/invokedynamic/sam/inline/inlineLambda1.kt rename to compiler/testData/codegen/boxInline/invokedynamic/sam/inlineLambda1.kt index d025660c159..b2b16edf519 100644 --- a/compiler/testData/codegen/box/invokedynamic/sam/inline/inlineLambda1.kt +++ b/compiler/testData/codegen/boxInline/invokedynamic/sam/inlineLambda1.kt @@ -2,6 +2,7 @@ // JVM_TARGET: 1.8 // SAM_CONVERSIONS: INDY // WITH_RUNTIME +// NO_CHECK_LAMBDA_INLINING // FILE: 1.kt fun interface IFoo { fun foo() diff --git a/compiler/testData/codegen/boxInline/jvmPackageName/simple.kt b/compiler/testData/codegen/boxInline/jvmPackageName/simple.kt index f4e2d6ab848..58527113836 100644 --- a/compiler/testData/codegen/boxInline/jvmPackageName/simple.kt +++ b/compiler/testData/codegen/boxInline/jvmPackageName/simple.kt @@ -1,3 +1,4 @@ +// IGNORE_FIR_DIAGNOSTICS // TARGET_BACKEND: JVM // WITH_RUNTIME // FILE: 1.kt diff --git a/compiler/testData/codegen/boxInline/lambdaClassClash/lambdaClassClash.kt b/compiler/testData/codegen/boxInline/lambdaClassClash/lambdaClassClash.kt index 6b77f48e346..eab8722d15a 100644 --- a/compiler/testData/codegen/boxInline/lambdaClassClash/lambdaClassClash.kt +++ b/compiler/testData/codegen/boxInline/lambdaClassClash/lambdaClassClash.kt @@ -1,3 +1,4 @@ +// NO_CHECK_LAMBDA_INLINING // FILE: 1.kt package zzz @@ -13,7 +14,6 @@ fun doCalc(lambda2: () -> Int): Int { // FILE: 2.kt -//NO_CHECK_LAMBDA_INLINING import zzz.* fun box(): String { diff --git a/compiler/testData/codegen/boxInline/lambdaClassClash/noInlineLambdaX2.kt b/compiler/testData/codegen/boxInline/lambdaClassClash/noInlineLambdaX2.kt index 97ac05955d3..0a8cb8dd274 100644 --- a/compiler/testData/codegen/boxInline/lambdaClassClash/noInlineLambdaX2.kt +++ b/compiler/testData/codegen/boxInline/lambdaClassClash/noInlineLambdaX2.kt @@ -1,3 +1,4 @@ +// NO_CHECK_LAMBDA_INLINING // FILE: 1.kt package test @@ -12,7 +13,6 @@ inline fun Int.noInlineLambda() = { s++ } () // FILE: 2.kt -//NO_CHECK_LAMBDA_INLINING import test.* fun test1(): Int { return 1.inlineMethod() diff --git a/compiler/testData/codegen/boxInline/lambdaTransformation/lambdaCloning.kt b/compiler/testData/codegen/boxInline/lambdaTransformation/lambdaCloning.kt index 0d4a9e06dba..5a4c427b89c 100644 --- a/compiler/testData/codegen/boxInline/lambdaTransformation/lambdaCloning.kt +++ b/compiler/testData/codegen/boxInline/lambdaTransformation/lambdaCloning.kt @@ -1,3 +1,4 @@ +// NO_CHECK_LAMBDA_INLINING // FILE: 1.kt package test @@ -12,7 +13,6 @@ inline fun doSmth2(a: T) : String { // FILE: 2.kt -//NO_CHECK_LAMBDA_INLINING import test.* fun test1(s: Long): String { diff --git a/compiler/testData/codegen/boxInline/lambdaTransformation/lambdaInLambda2.kt b/compiler/testData/codegen/boxInline/lambdaTransformation/lambdaInLambda2.kt index ac0f4a222d6..63d5659aa32 100644 --- a/compiler/testData/codegen/boxInline/lambdaTransformation/lambdaInLambda2.kt +++ b/compiler/testData/codegen/boxInline/lambdaTransformation/lambdaInLambda2.kt @@ -1,6 +1,7 @@ +// WITH_RUNTIME +// NO_CHECK_LAMBDA_INLINING // TARGET_BACKEND: JVM // FILE: 1.kt -// WITH_RUNTIME package test inline fun mfun(f: () -> R) { @@ -13,7 +14,6 @@ fun noInline(suffix: String, l: (s: String) -> Unit) { // FILE: 2.kt -//NO_CHECK_LAMBDA_INLINING import test.* import java.util.* diff --git a/compiler/testData/codegen/boxInline/lambdaTransformation/lambdaInLambdaNoInline.kt b/compiler/testData/codegen/boxInline/lambdaTransformation/lambdaInLambdaNoInline.kt index 86aab34cb6d..c14d3bf90a1 100644 --- a/compiler/testData/codegen/boxInline/lambdaTransformation/lambdaInLambdaNoInline.kt +++ b/compiler/testData/codegen/boxInline/lambdaTransformation/lambdaInLambdaNoInline.kt @@ -1,3 +1,4 @@ +// NO_CHECK_LAMBDA_INLINING // FILE: 1.kt package test @@ -16,7 +17,6 @@ inline fun doSmth(a: String): String { // FILE: 2.kt -//NO_CHECK_LAMBDA_INLINING import test.* fun test1(param: String): String { diff --git a/compiler/testData/codegen/boxInline/lambdaTransformation/regeneratedLambdaName.kt b/compiler/testData/codegen/boxInline/lambdaTransformation/regeneratedLambdaName.kt index 80e630ccc3b..98826899e95 100644 --- a/compiler/testData/codegen/boxInline/lambdaTransformation/regeneratedLambdaName.kt +++ b/compiler/testData/codegen/boxInline/lambdaTransformation/regeneratedLambdaName.kt @@ -1,3 +1,4 @@ +// NO_CHECK_LAMBDA_INLINING // FILE: 1.kt package test @@ -9,7 +10,6 @@ inline fun call(crossinline f: () -> R) : R { // FILE: 2.kt -//NO_CHECK_LAMBDA_INLINING import test.* fun sameName(s: Long): Long { diff --git a/compiler/testData/codegen/boxInline/lambdaTransformation/regeneratedLambdaName2.kt b/compiler/testData/codegen/boxInline/lambdaTransformation/regeneratedLambdaName2.kt index bfebbf8816a..44b199d52c1 100644 --- a/compiler/testData/codegen/boxInline/lambdaTransformation/regeneratedLambdaName2.kt +++ b/compiler/testData/codegen/boxInline/lambdaTransformation/regeneratedLambdaName2.kt @@ -1,3 +1,4 @@ +// NO_CHECK_LAMBDA_INLINING // CHECK_BYTECODE_LISTING // FILE: 1.kt package test @@ -7,7 +8,6 @@ inline fun call(crossinline f: () -> R) : R { } // FILE: 2.kt -//NO_CHECK_LAMBDA_INLINING import test.* inline fun sameName(s: Long): String = call { "FAIL" } @@ -17,4 +17,4 @@ fun box(): String { val result = sameName(1) sameName(1L) return result -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/lambdaTransformation/sameCaptured.kt b/compiler/testData/codegen/boxInline/lambdaTransformation/sameCaptured.kt index 3cdd3687bf2..81ab734fca0 100644 --- a/compiler/testData/codegen/boxInline/lambdaTransformation/sameCaptured.kt +++ b/compiler/testData/codegen/boxInline/lambdaTransformation/sameCaptured.kt @@ -1,3 +1,4 @@ +// NO_CHECK_LAMBDA_INLINING // FILE: 1.kt package test @@ -19,7 +20,6 @@ fun notInline(job: ()-> R) : R { // FILE: 2.kt -//NO_CHECK_LAMBDA_INLINING import test.* fun testSameCaptured() : String { diff --git a/compiler/testData/codegen/boxInline/localFunInLambda/defaultParam.kt b/compiler/testData/codegen/boxInline/localFunInLambda/defaultParam.kt index aaa80a83e67..a9efb6e2195 100644 --- a/compiler/testData/codegen/boxInline/localFunInLambda/defaultParam.kt +++ b/compiler/testData/codegen/boxInline/localFunInLambda/defaultParam.kt @@ -1,9 +1,9 @@ +// NO_CHECK_LAMBDA_INLINING // FILE: 1.kt inline fun run(c: () -> T): T = c() // FILE: 2.kt -// NO_CHECK_LAMBDA_INLINING interface Runnable { fun run(): String diff --git a/compiler/testData/codegen/boxInline/localFunInLambda/lambdaInLambdaCapturesAnotherFun.kt b/compiler/testData/codegen/boxInline/localFunInLambda/lambdaInLambdaCapturesAnotherFun.kt index ba32dcfee23..9c5eb1a069e 100644 --- a/compiler/testData/codegen/boxInline/localFunInLambda/lambdaInLambdaCapturesAnotherFun.kt +++ b/compiler/testData/codegen/boxInline/localFunInLambda/lambdaInLambdaCapturesAnotherFun.kt @@ -1,3 +1,4 @@ +// NO_CHECK_LAMBDA_INLINING // FILE: 1.kt package test @@ -7,7 +8,6 @@ public inline fun myRun(block: () -> Unit) { // FILE: 2.kt -//NO_CHECK_LAMBDA_INLINING import test.* fun box(): String { diff --git a/compiler/testData/codegen/boxInline/localFunInLambda/localFunInLambda.kt b/compiler/testData/codegen/boxInline/localFunInLambda/localFunInLambda.kt index aef72d1f305..981322fb0d6 100644 --- a/compiler/testData/codegen/boxInline/localFunInLambda/localFunInLambda.kt +++ b/compiler/testData/codegen/boxInline/localFunInLambda/localFunInLambda.kt @@ -1,5 +1,6 @@ -// FILE: 1.kt // WITH_RUNTIME +// NO_CHECK_LAMBDA_INLINING +// FILE: 1.kt package test public class Data(val value: Int) @@ -14,7 +15,6 @@ public inline fun use(block: ()-> R) : R { // FILE: 2.kt -//NO_CHECK_LAMBDA_INLINING import test.* fun test1(d: Data): Int { diff --git a/compiler/testData/codegen/boxInline/localFunInLambda/localFunInLambdaCapturesAnotherFun.kt b/compiler/testData/codegen/boxInline/localFunInLambda/localFunInLambdaCapturesAnotherFun.kt index f5ae9ebb3db..eff2d539dd1 100644 --- a/compiler/testData/codegen/boxInline/localFunInLambda/localFunInLambdaCapturesAnotherFun.kt +++ b/compiler/testData/codegen/boxInline/localFunInLambda/localFunInLambdaCapturesAnotherFun.kt @@ -1,3 +1,4 @@ +// NO_CHECK_LAMBDA_INLINING // FILE: 1.kt package test @@ -7,7 +8,6 @@ public inline fun myRun(block: () -> Unit) { // FILE: 2.kt -//NO_CHECK_LAMBDA_INLINING import test.* fun box(): String { diff --git a/compiler/testData/codegen/boxInline/multiModule/tryCatchWithRecursiveInline.kt b/compiler/testData/codegen/boxInline/multiModule/tryCatchWithRecursiveInline.kt index 4eb4e712acb..37a14120126 100644 --- a/compiler/testData/codegen/boxInline/multiModule/tryCatchWithRecursiveInline.kt +++ b/compiler/testData/codegen/boxInline/multiModule/tryCatchWithRecursiveInline.kt @@ -1,5 +1,4 @@ // IGNORE_BACKEND: NATIVE -// MODULE: lib // FILE: lib.kt inline fun T.andAlso(block: (T) -> Unit): T { block(this) @@ -14,7 +13,6 @@ inline fun tryCatch(block: () -> T, onSuccess: (T) -> Unit) { }.andAlso { onSuccess(it) } } -// MODULE: main(lib) // FILE: main.kt fun box(): String { var result = false diff --git a/compiler/testData/codegen/boxInline/multifileClasses/inlineFromOtherPackage.kt b/compiler/testData/codegen/boxInline/multifileClasses/inlineFromOtherPackage.kt index 4071a3fa702..32ec13cc615 100644 --- a/compiler/testData/codegen/boxInline/multifileClasses/inlineFromOtherPackage.kt +++ b/compiler/testData/codegen/boxInline/multifileClasses/inlineFromOtherPackage.kt @@ -1,6 +1,6 @@ +// WITH_RUNTIME // TARGET_BACKEND: JVM // FILE: 1.kt -// WITH_RUNTIME @file:[JvmName("MultifileClass") JvmMultifileClass] package a diff --git a/compiler/testData/codegen/boxInline/noInline/extensionReceiver.kt b/compiler/testData/codegen/boxInline/noInline/extensionReceiver.kt index 40555a42091..b42489e9975 100644 --- a/compiler/testData/codegen/boxInline/noInline/extensionReceiver.kt +++ b/compiler/testData/codegen/boxInline/noInline/extensionReceiver.kt @@ -1,3 +1,4 @@ +// NO_CHECK_LAMBDA_INLINING // FILE: 1.kt inline fun (() -> String).test(): (() -> String) = { invoke() + this.invoke() + this() } @@ -7,7 +8,6 @@ inline fun (() -> String).extensionNoInline(): String = this() + (this.hashCode( // FILE: 2.kt -//NO_CHECK_LAMBDA_INLINING fun box(): String { val res = { "OK" }.test()() diff --git a/compiler/testData/codegen/boxInline/noInline/lambdaAsGeneric.kt b/compiler/testData/codegen/boxInline/noInline/lambdaAsGeneric.kt index fa760a238c1..868f75c9f18 100644 --- a/compiler/testData/codegen/boxInline/noInline/lambdaAsGeneric.kt +++ b/compiler/testData/codegen/boxInline/noInline/lambdaAsGeneric.kt @@ -1,3 +1,4 @@ +// NO_CHECK_LAMBDA_INLINING // FILE: 1.kt inline fun test(p: T) { @@ -6,7 +7,6 @@ inline fun test(p: T) { // FILE: 2.kt -//NO_CHECK_LAMBDA_INLINING fun box() : String { test {"123"} diff --git a/compiler/testData/codegen/boxInline/noInline/lambdaAsNonFunction.kt b/compiler/testData/codegen/boxInline/noInline/lambdaAsNonFunction.kt index 98751109cac..088358060ff 100644 --- a/compiler/testData/codegen/boxInline/noInline/lambdaAsNonFunction.kt +++ b/compiler/testData/codegen/boxInline/noInline/lambdaAsNonFunction.kt @@ -1,3 +1,4 @@ +// NO_CHECK_LAMBDA_INLINING // FILE: 1.kt inline fun test(p: Any) { @@ -6,7 +7,6 @@ inline fun test(p: Any) { // FILE: 2.kt -//NO_CHECK_LAMBDA_INLINING fun box() : String { test {"123"} diff --git a/compiler/testData/codegen/boxInline/noInline/noInline.kt b/compiler/testData/codegen/boxInline/noInline/noInline.kt index 8c313f6bba9..fe9b209d305 100644 --- a/compiler/testData/codegen/boxInline/noInline/noInline.kt +++ b/compiler/testData/codegen/boxInline/noInline/noInline.kt @@ -1,3 +1,4 @@ +// NO_CHECK_LAMBDA_INLINING // FILE: 1.kt inline fun calc(s: (Int) -> Int, noinline p: (Int) -> Int) : Int { @@ -9,7 +10,6 @@ inline fun extensionLambda(noinline bar: Int.() -> Int) = 10.bar() // FILE: 2.kt -//NO_CHECK_LAMBDA_INLINING fun test1(): Int { return calc( { l: Int -> 2*l}, { l: Int -> 4*l}) } diff --git a/compiler/testData/codegen/boxInline/noInline/noInlineLambdaChain.kt b/compiler/testData/codegen/boxInline/noInline/noInlineLambdaChain.kt index 541efe7cbf3..00b697703a9 100644 --- a/compiler/testData/codegen/boxInline/noInline/noInlineLambdaChain.kt +++ b/compiler/testData/codegen/boxInline/noInline/noInlineLambdaChain.kt @@ -1,3 +1,4 @@ +// NO_CHECK_LAMBDA_INLINING // FILE: 1.kt package test @@ -8,7 +9,6 @@ inline fun inlineFun(arg: T, f: (T) -> Unit) { // FILE: 2.kt -//NO_CHECK_LAMBDA_INLINING import test.* fun test1(param: String): String { diff --git a/compiler/testData/codegen/boxInline/noInline/noInlineLambdaChainWithCapturedInline.kt b/compiler/testData/codegen/boxInline/noInline/noInlineLambdaChainWithCapturedInline.kt index 133f57d8324..e13b49aea6a 100644 --- a/compiler/testData/codegen/boxInline/noInline/noInlineLambdaChainWithCapturedInline.kt +++ b/compiler/testData/codegen/boxInline/noInline/noInlineLambdaChainWithCapturedInline.kt @@ -1,3 +1,4 @@ +// NO_CHECK_LAMBDA_INLINING // FILE: 1.kt package test @@ -8,7 +9,6 @@ inline fun inlineFun(arg: T, f: (T) -> Unit) { // FILE: 2.kt -//NO_CHECK_LAMBDA_INLINING import test.* inline fun test1(crossinline param: () -> String): String { diff --git a/compiler/testData/codegen/boxInline/noInline/withoutInline.kt b/compiler/testData/codegen/boxInline/noInline/withoutInline.kt index 7508473e98b..24944c2a3ca 100644 --- a/compiler/testData/codegen/boxInline/noInline/withoutInline.kt +++ b/compiler/testData/codegen/boxInline/noInline/withoutInline.kt @@ -1,3 +1,4 @@ +// NO_CHECK_LAMBDA_INLINING // FILE: 1.kt class Inline { @@ -9,7 +10,6 @@ class Inline { // FILE: 2.kt -//NO_CHECK_LAMBDA_INLINING fun test1(): Int { val inlineX = Inline() var p = { l : Int -> l}; diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/fromArrayGenerator.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/fromArrayGenerator.kt new file mode 100644 index 00000000000..79b5d8d118d --- /dev/null +++ b/compiler/testData/codegen/boxInline/nonLocalReturns/fromArrayGenerator.kt @@ -0,0 +1,5 @@ +// FILE: 1.kt +inline fun runReturning(f: () -> Nothing): Nothing = f() + +// FILE: 2.kt +fun box() = Array(1) { runReturning { return@Array "OK" } }[0] diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/fromArrayGeneratorCatch.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/fromArrayGeneratorCatch.kt new file mode 100644 index 00000000000..68a4b1488c0 --- /dev/null +++ b/compiler/testData/codegen/boxInline/nonLocalReturns/fromArrayGeneratorCatch.kt @@ -0,0 +1,24 @@ +// FILE: 1.kt +inline fun runReturning(f: () -> Nothing): Nothing = f() + +// FILE: 2.kt +fun box(): String { + var r = "" + val x = Array(1) ext@{ + try { + Array(1) { + try { + runReturning { throw RuntimeException() } + } catch (e: Throwable) { + r += "1" + return@ext "OK" + } finally { + r += "2" + } + }[0] + } finally { + r += "3" + } + }[0] + return if (r == "123") x else r +} diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/fromArrayGeneratorNested.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/fromArrayGeneratorNested.kt new file mode 100644 index 00000000000..a121048e30f --- /dev/null +++ b/compiler/testData/codegen/boxInline/nonLocalReturns/fromArrayGeneratorNested.kt @@ -0,0 +1,5 @@ +// FILE: 1.kt +inline fun runReturning(f: () -> Nothing): Nothing = f() + +// FILE: 2.kt +fun box() = Array(1) { run { runReturning { return@Array "OK" } } }[0] diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/fromArrayGeneratorWithCapture.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/fromArrayGeneratorWithCapture.kt new file mode 100644 index 00000000000..88a7fa26696 --- /dev/null +++ b/compiler/testData/codegen/boxInline/nonLocalReturns/fromArrayGeneratorWithCapture.kt @@ -0,0 +1,8 @@ +// FILE: 1.kt +inline fun runReturning(f: () -> Nothing): Nothing = f() + +// FILE: 2.kt +fun box(): String { + val result = "OK" + return Array(1) { run { runReturning { return@Array result } } }[0] +} diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/fromArrayGeneratorWithCatch.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/fromArrayGeneratorWithCatch.kt new file mode 100644 index 00000000000..8153ab263b0 --- /dev/null +++ b/compiler/testData/codegen/boxInline/nonLocalReturns/fromArrayGeneratorWithCatch.kt @@ -0,0 +1,22 @@ +// FILE: 1.kt +inline fun runReturning(f: () -> Nothing): Nothing = f() + +// FILE: 2.kt +fun box(): String { + var r = "" + val x = try { + Array(1) { + try { + runReturning { throw RuntimeException() } + } finally { + r += "1" + } + }[0] + } catch (e: Throwable) { + r += "2" + "OK" + } finally { + r += "3" + } + return if (r == "123") x else r +} diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/fromArrayGeneratorWithFinally.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/fromArrayGeneratorWithFinally.kt new file mode 100644 index 00000000000..7b750cace35 --- /dev/null +++ b/compiler/testData/codegen/boxInline/nonLocalReturns/fromArrayGeneratorWithFinally.kt @@ -0,0 +1,19 @@ +// FILE: 1.kt +inline fun runReturning(f: () -> Nothing): Nothing = f() + +// FILE: 2.kt +fun box(): String { + var r = "" + val x = try { + Array(1) { + try { + runReturning { return@Array "OK" } + } finally { + r += "O" + } + }[0] + } finally { + r += "K" + } + return r +} diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/fromArrayGeneratorWithFinallyX2.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/fromArrayGeneratorWithFinallyX2.kt new file mode 100644 index 00000000000..da8cef6c7e9 --- /dev/null +++ b/compiler/testData/codegen/boxInline/nonLocalReturns/fromArrayGeneratorWithFinallyX2.kt @@ -0,0 +1,25 @@ +// FILE: 1.kt +inline fun runReturning(f: () -> Nothing): Nothing = f() + +// FILE: 2.kt +fun box(): String { + var r = "" + val x = try { + Array(1) ext@{ + try { + Array(1) { + try { + runReturning { return@ext "OK" } + } finally { + r += "1" + } + }[0] + } finally { + r += "2" + } + }[0] + } finally { + r += "3" + } + return if (r == "123") x else r +} diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/fromArrayGeneratorWithFinallyX2_2.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/fromArrayGeneratorWithFinallyX2_2.kt new file mode 100644 index 00000000000..89c0e47d0ad --- /dev/null +++ b/compiler/testData/codegen/boxInline/nonLocalReturns/fromArrayGeneratorWithFinallyX2_2.kt @@ -0,0 +1,25 @@ +// FILE: 1.kt +inline fun runReturning(f: () -> Nothing): Nothing = f() + +// FILE: 2.kt +fun box(): String { + var r = "" + val x = try { + Array(1) ext@{ + try { + Array(1) { + try { + runReturning { return@Array "OK" } + } finally { + r += "1" + } + }[0] + } finally { + r += "2" + } + }[0] + } finally { + r += "3" + } + return if (r == "123") x else r +} diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/noInlineLocalReturn.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/noInlineLocalReturn.kt index cc2c560762a..1556391ce4c 100644 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/noInlineLocalReturn.kt +++ b/compiler/testData/codegen/boxInline/nonLocalReturns/noInlineLocalReturn.kt @@ -1,3 +1,4 @@ +// NO_CHECK_LAMBDA_INLINING // FILE: 1.kt package test @@ -11,8 +12,6 @@ public inline fun notUsed(block: ()-> R) : R { } // FILE: 2.kt - -//NO_CHECK_LAMBDA_INLINING import test.* fun test1(b: Boolean): String { diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/nonLocalReturnFromOuterLambda.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/nonLocalReturnFromOuterLambda.kt index af6f1e3d223..e6ee69c4578 100644 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/nonLocalReturnFromOuterLambda.kt +++ b/compiler/testData/codegen/boxInline/nonLocalReturns/nonLocalReturnFromOuterLambda.kt @@ -1,3 +1,4 @@ +// NO_CHECK_LAMBDA_INLINING // FILE: 1.kt package test @@ -11,9 +12,6 @@ inline fun test(l: () -> String): String { } // FILE: 2.kt - -//NO_CHECK_LAMBDA_INLINING - import test.* fun test1() : String { diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/returnFromFunctionExpr.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/returnFromFunctionExpr.kt index d053ea76bcf..a23d95a76db 100644 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/returnFromFunctionExpr.kt +++ b/compiler/testData/codegen/boxInline/nonLocalReturns/returnFromFunctionExpr.kt @@ -1,3 +1,4 @@ +// NO_CHECK_LAMBDA_INLINING // IGNORE_BACKEND_FIR: JVM_IR // FILE: 1.kt @@ -7,7 +8,6 @@ inline fun foo(f: () -> Unit) { // FILE: 2.kt -//NO_CHECK_LAMBDA_INLINING fun test(): String = fun (): String { foo { return "OK" } return "fail" diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/exceptionTableSplit.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/exceptionTableSplit.kt index 772ed7e18e3..1db5f2f8c97 100644 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/exceptionTableSplit.kt +++ b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/exceptionTableSplit.kt @@ -1,5 +1,5 @@ -// FILE: 1.kt // WITH_RUNTIME +// FILE: 1.kt package test public class Holder(var value: String = "") { diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/exceptionTableSplitNoReturn.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/exceptionTableSplitNoReturn.kt index 0144754000f..408b61f0373 100644 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/exceptionTableSplitNoReturn.kt +++ b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/exceptionTableSplitNoReturn.kt @@ -1,5 +1,5 @@ -// FILE: 1.kt // WITH_RUNTIME +// FILE: 1.kt package test public class Holder(var value: String = "") { diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/exceptionInFinally.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/exceptionInFinally.kt index baa08eed3be..d56ca90cd31 100644 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/exceptionInFinally.kt +++ b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/exceptionInFinally.kt @@ -1,5 +1,5 @@ -// FILE: 1.kt // WITH_RUNTIME +// FILE: 1.kt package test public interface MCloseable { diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/kt31653.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/kt31653.kt index 886bc6502e3..9a8f4826bf6 100644 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/kt31653.kt +++ b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/kt31653.kt @@ -1,4 +1,5 @@ // !LANGUAGE: +ProperFinally +// NO_CHECK_LAMBDA_INLINING // FILE: 1.kt package test @@ -26,7 +27,6 @@ fun main(args: Array) { } // FILE: 2.kt -// NO_CHECK_LAMBDA_INLINING import test.* @@ -39,4 +39,4 @@ fun box(): String { } return result -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/kt31653_2.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/kt31653_2.kt index 5cc01c86878..0e023cc3d10 100644 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/kt31653_2.kt +++ b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/kt31653_2.kt @@ -1,4 +1,5 @@ // !LANGUAGE: +ProperFinally +// NO_CHECK_LAMBDA_INLINING // FILE: 1.kt package test @@ -24,7 +25,6 @@ class A { } // FILE: 2.kt -// NO_CHECK_LAMBDA_INLINING import test.* @@ -34,4 +34,4 @@ fun box(): String { if (a.field != -1) return "fail: -1 != ${a.field}" return result -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/kt31923.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/kt31923.kt index 181ebd431ef..aeb60bf3f49 100644 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/kt31923.kt +++ b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/kt31923.kt @@ -41,4 +41,4 @@ fun box(): String { } return if (result == "lambda finally") "OK" else "fail: $result" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/kt31923_2.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/kt31923_2.kt index 3e0a0277b7a..55d776f297d 100644 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/kt31923_2.kt +++ b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/kt31923_2.kt @@ -40,4 +40,4 @@ fun box(): String { } return if (result == "lambda finally") "OK" else "fail: $result" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/kt31923_wrong.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/kt31923_wrong.kt index 7032bc1d1cd..281fba6d29f 100644 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/kt31923_wrong.kt +++ b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/kt31923_wrong.kt @@ -42,4 +42,4 @@ fun box(): String { } return if (result == "lambda finally catch finally") "OK" else "fail: $result" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt16417.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt16417.kt index f0c0cf98472..59ed142bef9 100644 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt16417.kt +++ b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt16417.kt @@ -1,3 +1,4 @@ +// NO_CHECK_LAMBDA_INLINING // !LANGUAGE: +ProperFinally // FILE: 1.kt package test @@ -29,7 +30,6 @@ class A { } // FILE: 2.kt -// NO_CHECK_LAMBDA_INLINING import test.* @@ -47,4 +47,4 @@ fun box(): String { } return a.c ({ "OK" }) as String -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt20433.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt20433.kt index fe95b3d1f13..c6fedd4b991 100644 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt20433.kt +++ b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt20433.kt @@ -1,5 +1,5 @@ +// WITH_RUNTIME // FILE: 1.kt -//WITH_RUNTIME package test public inline fun T.mylet(block: (T) -> R): R { diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt20433_2.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt20433_2.kt index 1214eb64235..63d3a3f32ac 100644 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt20433_2.kt +++ b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt20433_2.kt @@ -1,5 +1,5 @@ +// WITH_RUNTIME // FILE: 1.kt -//WITH_RUNTIME package test public inline fun T.mylet(block: (T) -> R): R { diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt20433_2_void.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt20433_2_void.kt index 2988a95f25b..12ce9285160 100644 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt20433_2_void.kt +++ b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt20433_2_void.kt @@ -1,5 +1,5 @@ +// WITH_RUNTIME // FILE: 1.kt -//WITH_RUNTIME package test public inline fun T.mylet(block: (T) -> R): R { diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt20433_void.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt20433_void.kt index c8be6a91d48..4a4e743b8b1 100644 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt20433_void.kt +++ b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt20433_void.kt @@ -1,5 +1,5 @@ +// WITH_RUNTIME // FILE: 1.kt -//WITH_RUNTIME package test public inline fun T.mylet(block: (T) -> R): R { diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt26384.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt26384.kt index b0c09676d00..681fca58c3e 100644 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt26384.kt +++ b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt26384.kt @@ -32,4 +32,4 @@ class Test(val value: () -> String) { fun box(): String { return Test { "OK" }.test() -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt26384_2.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt26384_2.kt index 4e363c62c1a..7ca3d20c0c0 100644 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt26384_2.kt +++ b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt26384_2.kt @@ -51,4 +51,4 @@ fun box(): String { return "fail 3: $globalResult" } return result -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt28546.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt28546.kt index ec00c945eed..56e865f10d8 100644 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt28546.kt +++ b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt28546.kt @@ -31,4 +31,4 @@ fun box(): String { } return "fail" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/nonLocalReturnFromCatchBlock.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/nonLocalReturnFromCatchBlock.kt index 240ec77b316..965e17f9296 100644 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/nonLocalReturnFromCatchBlock.kt +++ b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/nonLocalReturnFromCatchBlock.kt @@ -1,4 +1,3 @@ -// MODULE: lib // FILE: lib.kt package utils @@ -31,8 +30,6 @@ fun log(s: String): String { inline fun myRun(f: () -> Unit) = f() - -// MODULE: main(lib) // FILE: main.kt import utils.* @@ -51,4 +48,4 @@ fun box(): String { LOG = "" return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/nonLocalReturnFromOuterLambda.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/nonLocalReturnFromOuterLambda.kt index 90ad2de9c7c..9084756e932 100644 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/nonLocalReturnFromOuterLambda.kt +++ b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/nonLocalReturnFromOuterLambda.kt @@ -1,3 +1,4 @@ +// NO_CHECK_LAMBDA_INLINING // FILE: 1.kt package test @@ -11,9 +12,6 @@ inline fun test(l: () -> String): String { } // FILE: 2.kt - -//NO_CHECK_LAMBDA_INLINING - import test.* fun test1(): String { diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/nonLocalReturnToCatchBlock.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/nonLocalReturnToCatchBlock.kt index 319213c08c8..a2de409455b 100644 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/nonLocalReturnToCatchBlock.kt +++ b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/nonLocalReturnToCatchBlock.kt @@ -1,4 +1,3 @@ -// MODULE: lib // FILE: lib.kt package utils @@ -30,7 +29,6 @@ fun log(s: String): String { inline fun myRun(f: () -> Unit) = f() -// MODULE: main(lib) // FILE: main.kt import utils.* @@ -48,4 +46,4 @@ fun box(): String { if (LOG != "bar(2) #1;") return "fail3: $LOG" return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/optimizations/kt20844.kt b/compiler/testData/codegen/boxInline/optimizations/kt20844.kt index 7775771039c..159b08be858 100644 --- a/compiler/testData/codegen/boxInline/optimizations/kt20844.kt +++ b/compiler/testData/codegen/boxInline/optimizations/kt20844.kt @@ -1,5 +1,5 @@ +// WITH_RUNTIME // FILE: 1.kt -//WITH_RUNTIME package test data class Address( @@ -24,4 +24,4 @@ fun box(): String { ) return result.firstName + result.lastName -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/private/privateInInlineInMultiFileFacade.kt b/compiler/testData/codegen/boxInline/private/privateInInlineInMultiFileFacade.kt index e5a4efe858c..9a0c3b95fe8 100644 --- a/compiler/testData/codegen/boxInline/private/privateInInlineInMultiFileFacade.kt +++ b/compiler/testData/codegen/boxInline/private/privateInInlineInMultiFileFacade.kt @@ -1,6 +1,6 @@ +// WITH_RUNTIME // TARGET_BACKEND: JVM // FILE: 1.kt -// WITH_RUNTIME @file:kotlin.jvm.JvmMultifileClass @file:kotlin.jvm.JvmName("TestKt") package test diff --git a/compiler/testData/codegen/boxInline/property/augAssignmentAndInc.kt b/compiler/testData/codegen/boxInline/property/augAssignmentAndInc.kt index ca1708d8003..4fcebc290ff 100644 --- a/compiler/testData/codegen/boxInline/property/augAssignmentAndInc.kt +++ b/compiler/testData/codegen/boxInline/property/augAssignmentAndInc.kt @@ -25,4 +25,4 @@ fun box(): String { if (p != 4) return "fail 5: $p" return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/property/augAssignmentAndIncInClass.kt b/compiler/testData/codegen/boxInline/property/augAssignmentAndIncInClass.kt index 036922d341c..6de336068e0 100644 --- a/compiler/testData/codegen/boxInline/property/augAssignmentAndIncInClass.kt +++ b/compiler/testData/codegen/boxInline/property/augAssignmentAndIncInClass.kt @@ -29,4 +29,4 @@ fun box(): String { if (p != 4) return "fail 5: $p" return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/property/augAssignmentAndIncInClassViaConvention.kt b/compiler/testData/codegen/boxInline/property/augAssignmentAndIncInClassViaConvention.kt index 502ba5a9892..2fe6644607d 100644 --- a/compiler/testData/codegen/boxInline/property/augAssignmentAndIncInClassViaConvention.kt +++ b/compiler/testData/codegen/boxInline/property/augAssignmentAndIncInClassViaConvention.kt @@ -39,4 +39,4 @@ fun box(): String { if (p.result != 4) return "fail 5: ${p.result}" return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/property/augAssignmentAndIncOnExtension.kt b/compiler/testData/codegen/boxInline/property/augAssignmentAndIncOnExtension.kt index db7b05756a2..d5a98942c4e 100644 --- a/compiler/testData/codegen/boxInline/property/augAssignmentAndIncOnExtension.kt +++ b/compiler/testData/codegen/boxInline/property/augAssignmentAndIncOnExtension.kt @@ -26,4 +26,4 @@ fun box(): String { if (p != 6) return "fail 5: $p" return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/property/augAssignmentAndIncOnExtensionInClass.kt b/compiler/testData/codegen/boxInline/property/augAssignmentAndIncOnExtensionInClass.kt index 22c34128acf..881ac90a4f7 100644 --- a/compiler/testData/codegen/boxInline/property/augAssignmentAndIncOnExtensionInClass.kt +++ b/compiler/testData/codegen/boxInline/property/augAssignmentAndIncOnExtensionInClass.kt @@ -32,4 +32,4 @@ fun box(): String { } return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/property/augAssignmentAndIncViaConvention.kt b/compiler/testData/codegen/boxInline/property/augAssignmentAndIncViaConvention.kt index b02eef4c149..e9febc9ac44 100644 --- a/compiler/testData/codegen/boxInline/property/augAssignmentAndIncViaConvention.kt +++ b/compiler/testData/codegen/boxInline/property/augAssignmentAndIncViaConvention.kt @@ -36,4 +36,4 @@ fun box(): String { if (p.result != 4) return "fail 5: ${p.result}" return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/property/fromObject.kt b/compiler/testData/codegen/boxInline/property/fromObject.kt index 92b99c1cf97..c06ac1d7ca4 100644 --- a/compiler/testData/codegen/boxInline/property/fromObject.kt +++ b/compiler/testData/codegen/boxInline/property/fromObject.kt @@ -1,5 +1,5 @@ -// FILE: 1.kt // WITH_RUNTIME +// FILE: 1.kt package test open class A(var result: String) { diff --git a/compiler/testData/codegen/boxInline/property/kt22649.kt b/compiler/testData/codegen/boxInline/property/kt22649.kt index 0f2f73b6dee..c5f4af454f6 100644 --- a/compiler/testData/codegen/boxInline/property/kt22649.kt +++ b/compiler/testData/codegen/boxInline/property/kt22649.kt @@ -14,4 +14,4 @@ fun test(s: Int?) { fun box() : String { test(1) return result -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/property/property.kt b/compiler/testData/codegen/boxInline/property/property.kt index 3265987a72b..fd8cceb92c6 100644 --- a/compiler/testData/codegen/boxInline/property/property.kt +++ b/compiler/testData/codegen/boxInline/property/property.kt @@ -159,4 +159,4 @@ fun box(): String { if (a.p15 != 151515) return "test15: ${a.p15}" return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/property/reifiedVal.kt b/compiler/testData/codegen/boxInline/property/reifiedVal.kt index f88d11b18fc..767eeef5bb3 100644 --- a/compiler/testData/codegen/boxInline/property/reifiedVal.kt +++ b/compiler/testData/codegen/boxInline/property/reifiedVal.kt @@ -13,4 +13,4 @@ class OK fun box(): String { return OK().value ?: "fail" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/property/reifiedVar.kt b/compiler/testData/codegen/boxInline/property/reifiedVar.kt index ace575f220f..3cc151b6573 100644 --- a/compiler/testData/codegen/boxInline/property/reifiedVar.kt +++ b/compiler/testData/codegen/boxInline/property/reifiedVar.kt @@ -23,4 +23,4 @@ fun box(): String { o.value = "K" return o.value -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/property/simple.kt b/compiler/testData/codegen/boxInline/property/simple.kt index c8a6f4dff07..c94c65fb7d3 100644 --- a/compiler/testData/codegen/boxInline/property/simple.kt +++ b/compiler/testData/codegen/boxInline/property/simple.kt @@ -22,4 +22,4 @@ fun box(): String { if (value != 4) return "fail 3: $value" return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/property/simpleExtension.kt b/compiler/testData/codegen/boxInline/property/simpleExtension.kt index 5a9db92386c..6dc5bdeaf59 100644 --- a/compiler/testData/codegen/boxInline/property/simpleExtension.kt +++ b/compiler/testData/codegen/boxInline/property/simpleExtension.kt @@ -22,4 +22,4 @@ fun box(): String { if (p != 37) return "fail 3: $p" return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/reified/capturedLambda.kt b/compiler/testData/codegen/boxInline/reified/capturedLambda.kt index baab480f19f..571110e6dd6 100644 --- a/compiler/testData/codegen/boxInline/reified/capturedLambda.kt +++ b/compiler/testData/codegen/boxInline/reified/capturedLambda.kt @@ -1,5 +1,6 @@ -// FILE: 1.kt // WITH_RUNTIME +// NO_CHECK_LAMBDA_INLINING +// FILE: 1.kt package test inline fun foo() = bar() {"OK"} @@ -12,7 +13,6 @@ public inline fun call(f: () -> T): T = f() // FILE: 2.kt -//NO_CHECK_LAMBDA_INLINING import test.* val x: () -> String = foo() diff --git a/compiler/testData/codegen/boxInline/reified/capturedLambda2.kt b/compiler/testData/codegen/boxInline/reified/capturedLambda2.kt index dcc09a82265..fc52afb7ee8 100644 --- a/compiler/testData/codegen/boxInline/reified/capturedLambda2.kt +++ b/compiler/testData/codegen/boxInline/reified/capturedLambda2.kt @@ -1,5 +1,6 @@ -// FILE: 1.kt // WITH_REFLECT +// NO_CHECK_LAMBDA_INLINING +// FILE: 1.kt package test inline fun bar(crossinline tasksFactory: () -> T) = { @@ -11,7 +12,6 @@ public inline fun call(f: () -> T): T = f() // FILE: 2.kt -//NO_CHECK_LAMBDA_INLINING import test.* inline fun foo() = bar() {"OK"} diff --git a/compiler/testData/codegen/boxInline/reified/checkCast/chain.kt b/compiler/testData/codegen/boxInline/reified/checkCast/chain.kt index 68c84679224..393582ccc4d 100644 --- a/compiler/testData/codegen/boxInline/reified/checkCast/chain.kt +++ b/compiler/testData/codegen/boxInline/reified/checkCast/chain.kt @@ -1,6 +1,6 @@ +// WITH_RUNTIME // IGNORE_BACKEND: JS // FILE: 1.kt -// WITH_RUNTIME package test class A diff --git a/compiler/testData/codegen/boxInline/reified/checkCast/kt26435.kt b/compiler/testData/codegen/boxInline/reified/checkCast/kt26435.kt index fa41a95c1db..d9aed0bac33 100644 --- a/compiler/testData/codegen/boxInline/reified/checkCast/kt26435.kt +++ b/compiler/testData/codegen/boxInline/reified/checkCast/kt26435.kt @@ -1,5 +1,5 @@ -// FILE: 1.kt // WITH_RUNTIME +// FILE: 1.kt package test enum class Id { @@ -34,4 +34,4 @@ fun box(): String { val a = doSth(A(Id.OK))!! return a.id.name -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/reified/checkCast/kt26435_2.kt b/compiler/testData/codegen/boxInline/reified/checkCast/kt26435_2.kt index 6d8e446a808..e82a6aaf7b0 100644 --- a/compiler/testData/codegen/boxInline/reified/checkCast/kt26435_2.kt +++ b/compiler/testData/codegen/boxInline/reified/checkCast/kt26435_2.kt @@ -1,5 +1,5 @@ -// FILE: 1.kt // WITH_RUNTIME +// FILE: 1.kt package test @@ -31,4 +31,4 @@ fun box(): String { process(A("OK")) return result -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/reified/checkCast/kt26435_3.kt b/compiler/testData/codegen/boxInline/reified/checkCast/kt26435_3.kt index 13ba4ed9a16..9ff625a679d 100644 --- a/compiler/testData/codegen/boxInline/reified/checkCast/kt26435_3.kt +++ b/compiler/testData/codegen/boxInline/reified/checkCast/kt26435_3.kt @@ -1,5 +1,5 @@ -// FILE: 1.kt // WITH_RUNTIME +// FILE: 1.kt package test @@ -29,4 +29,4 @@ import test.* fun box(): String { return process(A("OK")).name -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/reified/checkCast/kt8043.kt b/compiler/testData/codegen/boxInline/reified/checkCast/kt8043.kt index f667157c6e7..42f02572d77 100644 --- a/compiler/testData/codegen/boxInline/reified/checkCast/kt8043.kt +++ b/compiler/testData/codegen/boxInline/reified/checkCast/kt8043.kt @@ -1,8 +1,8 @@ +// WITH_RUNTIME // TODO: Reified generics required some design to unify behavior across all backends // IGNORE_BACKEND: JS, JS_IR // IGNORE_BACKEND: JS_IR_ES6 // FILE: 1.kt -// WITH_RUNTIME package test inline fun T.castTo(): R = this as R diff --git a/compiler/testData/codegen/boxInline/reified/checkCast/nullable.kt b/compiler/testData/codegen/boxInline/reified/checkCast/nullable.kt index f36bc591125..2aa76d75006 100644 --- a/compiler/testData/codegen/boxInline/reified/checkCast/nullable.kt +++ b/compiler/testData/codegen/boxInline/reified/checkCast/nullable.kt @@ -1,5 +1,5 @@ -// FILE: 1.kt // WITH_RUNTIME +// FILE: 1.kt package test class A diff --git a/compiler/testData/codegen/boxInline/reified/checkCast/simple.kt b/compiler/testData/codegen/boxInline/reified/checkCast/simple.kt index a7905ee70c5..c1fc04a1a7d 100644 --- a/compiler/testData/codegen/boxInline/reified/checkCast/simple.kt +++ b/compiler/testData/codegen/boxInline/reified/checkCast/simple.kt @@ -1,8 +1,8 @@ +// WITH_RUNTIME // TODO: Reified generics required some design to unify behavior across all backends // IGNORE_BACKEND: JS, JS_IR // IGNORE_BACKEND: JS_IR_ES6 // FILE: 1.kt -// WITH_RUNTIME package test class A diff --git a/compiler/testData/codegen/boxInline/reified/checkCast/simpleSafe.kt b/compiler/testData/codegen/boxInline/reified/checkCast/simpleSafe.kt index 268f0dfc9ad..29e66dc5433 100644 --- a/compiler/testData/codegen/boxInline/reified/checkCast/simpleSafe.kt +++ b/compiler/testData/codegen/boxInline/reified/checkCast/simpleSafe.kt @@ -1,5 +1,5 @@ -// FILE: 1.kt // WITH_RUNTIME +// FILE: 1.kt package test class A diff --git a/compiler/testData/codegen/boxInline/reified/checkCast/simple_1_3.kt b/compiler/testData/codegen/boxInline/reified/checkCast/simple_1_3.kt index ab0802369aa..ab0a88e0b46 100644 --- a/compiler/testData/codegen/boxInline/reified/checkCast/simple_1_3.kt +++ b/compiler/testData/codegen/boxInline/reified/checkCast/simple_1_3.kt @@ -1,7 +1,7 @@ +// WITH_RUNTIME // KOTLIN_CONFIGURATION_FLAGS: +JVM.NO_UNIFIED_NULL_CHECKS // TARGET_BACKEND: JVM // FILE: 1.kt -// WITH_RUNTIME package test class A diff --git a/compiler/testData/codegen/boxInline/reified/defaultLambda/chain.kt b/compiler/testData/codegen/boxInline/reified/defaultLambda/chain.kt index f1d5d5da942..464830f676f 100644 --- a/compiler/testData/codegen/boxInline/reified/defaultLambda/chain.kt +++ b/compiler/testData/codegen/boxInline/reified/defaultLambda/chain.kt @@ -1,7 +1,7 @@ -// TARGET_BACKEND: JVM -// FILE: 1.kt // SKIP_INLINE_CHECK_IN: inlineFun$default // WITH_RUNTIME +// TARGET_BACKEND: JVM +// FILE: 1.kt package test class OK diff --git a/compiler/testData/codegen/boxInline/reified/defaultLambda/nested.kt b/compiler/testData/codegen/boxInline/reified/defaultLambda/nested.kt index 5b8159e93e9..d5ba2771359 100644 --- a/compiler/testData/codegen/boxInline/reified/defaultLambda/nested.kt +++ b/compiler/testData/codegen/boxInline/reified/defaultLambda/nested.kt @@ -1,7 +1,8 @@ -// TARGET_BACKEND: JVM -// FILE: 1.kt // SKIP_INLINE_CHECK_IN: inlineFun$default // WITH_RUNTIME +// NO_CHECK_LAMBDA_INLINING +// TARGET_BACKEND: JVM +// FILE: 1.kt package test inline fun inlineFun(p: String, lambda: () -> String = { { p + T::class.java.simpleName } () }): String { @@ -9,7 +10,6 @@ inline fun inlineFun(p: String, lambda: () -> String = { { p + T::cl } // FILE: 2.kt -//NO_CHECK_LAMBDA_INLINING import test.* class K diff --git a/compiler/testData/codegen/boxInline/reified/defaultLambda/nested2.kt b/compiler/testData/codegen/boxInline/reified/defaultLambda/nested2.kt index 8ec501bb4bd..ab22289c243 100644 --- a/compiler/testData/codegen/boxInline/reified/defaultLambda/nested2.kt +++ b/compiler/testData/codegen/boxInline/reified/defaultLambda/nested2.kt @@ -1,7 +1,7 @@ -// TARGET_BACKEND: JVM -// FILE: 1.kt // SKIP_INLINE_CHECK_IN: inlineFun$default // WITH_RUNTIME +// TARGET_BACKEND: JVM +// FILE: 1.kt package test inline fun inlineFun(p: String, crossinline lambda: () -> String = { { p + T::class.java.simpleName } () }): String { diff --git a/compiler/testData/codegen/boxInline/reified/defaultLambda/nested2Static.kt b/compiler/testData/codegen/boxInline/reified/defaultLambda/nested2Static.kt index 4156c4365fa..0359a407217 100644 --- a/compiler/testData/codegen/boxInline/reified/defaultLambda/nested2Static.kt +++ b/compiler/testData/codegen/boxInline/reified/defaultLambda/nested2Static.kt @@ -1,7 +1,7 @@ -// TARGET_BACKEND: JVM -// FILE: 1.kt // SKIP_INLINE_CHECK_IN: inlineFun$default // WITH_RUNTIME +// TARGET_BACKEND: JVM +// FILE: 1.kt package test inline fun inlineFun(crossinline lambda: () -> String = { { T::class.java.simpleName } () }): String { diff --git a/compiler/testData/codegen/boxInline/reified/defaultLambda/nestedStatic.kt b/compiler/testData/codegen/boxInline/reified/defaultLambda/nestedStatic.kt index ba3540939dc..9de9aaa8bc1 100644 --- a/compiler/testData/codegen/boxInline/reified/defaultLambda/nestedStatic.kt +++ b/compiler/testData/codegen/boxInline/reified/defaultLambda/nestedStatic.kt @@ -1,7 +1,8 @@ -// TARGET_BACKEND: JVM -// FILE: 1.kt // SKIP_INLINE_CHECK_IN: inlineFun$default // WITH_RUNTIME +// NO_CHECK_LAMBDA_INLINING +// TARGET_BACKEND: JVM +// FILE: 1.kt package test inline fun inlineFun(lambda: () -> String = { { T::class.java.simpleName } () }): String { @@ -9,7 +10,6 @@ inline fun inlineFun(lambda: () -> String = { { T::class.java.simple } // FILE: 2.kt -//NO_CHECK_LAMBDA_INLINING import test.* class OK diff --git a/compiler/testData/codegen/boxInline/reified/defaultLambda/simple.kt b/compiler/testData/codegen/boxInline/reified/defaultLambda/simple.kt index e4e9095672f..10162d73dc4 100644 --- a/compiler/testData/codegen/boxInline/reified/defaultLambda/simple.kt +++ b/compiler/testData/codegen/boxInline/reified/defaultLambda/simple.kt @@ -1,7 +1,7 @@ -// TARGET_BACKEND: JVM -// FILE: 1.kt // SKIP_INLINE_CHECK_IN: inlineFun$default // WITH_RUNTIME +// TARGET_BACKEND: JVM +// FILE: 1.kt package test inline fun inlineFun(lambda: () -> String = { T::class.java.simpleName }): String { diff --git a/compiler/testData/codegen/boxInline/reified/defaultLambda/transitiveChain.kt b/compiler/testData/codegen/boxInline/reified/defaultLambda/transitiveChain.kt index 5125aedda2b..be8839cad11 100644 --- a/compiler/testData/codegen/boxInline/reified/defaultLambda/transitiveChain.kt +++ b/compiler/testData/codegen/boxInline/reified/defaultLambda/transitiveChain.kt @@ -1,7 +1,7 @@ -// TARGET_BACKEND: JVM -// FILE: 1.kt // SKIP_INLINE_CHECK_IN: inlineFun$default // WITH_RUNTIME +// TARGET_BACKEND: JVM +// FILE: 1.kt package test class K diff --git a/compiler/testData/codegen/boxInline/reified/defaultLambda/transitiveChainStatic.kt b/compiler/testData/codegen/boxInline/reified/defaultLambda/transitiveChainStatic.kt index 45a2764dc40..6a9e21a3487 100644 --- a/compiler/testData/codegen/boxInline/reified/defaultLambda/transitiveChainStatic.kt +++ b/compiler/testData/codegen/boxInline/reified/defaultLambda/transitiveChainStatic.kt @@ -1,7 +1,7 @@ -// TARGET_BACKEND: JVM -// FILE: 1.kt // SKIP_INLINE_CHECK_IN: inlineFun$default // WITH_RUNTIME +// TARGET_BACKEND: JVM +// FILE: 1.kt package test class OK diff --git a/compiler/testData/codegen/boxInline/reified/dontSubstituteNonReified.kt b/compiler/testData/codegen/boxInline/reified/dontSubstituteNonReified.kt index 0d7dc844be6..2bf9fb7da44 100644 --- a/compiler/testData/codegen/boxInline/reified/dontSubstituteNonReified.kt +++ b/compiler/testData/codegen/boxInline/reified/dontSubstituteNonReified.kt @@ -1,3 +1,4 @@ +// NO_CHECK_LAMBDA_INLINING // FILE: 1.kt package test @@ -7,7 +8,6 @@ class B : A inline fun foo(a: Any) = (a as? T != null).toString()[0] // FILE: 2.kt -// NO_CHECK_LAMBDA_INLINING import test.* fun box(): String { @@ -15,4 +15,3 @@ fun box(): String { if (s != "ftt") return "fail: $s" return "OK" } - diff --git a/compiler/testData/codegen/boxInline/reified/kt11081.kt b/compiler/testData/codegen/boxInline/reified/kt11081.kt index 76132d061a6..245fa659014 100644 --- a/compiler/testData/codegen/boxInline/reified/kt11081.kt +++ b/compiler/testData/codegen/boxInline/reified/kt11081.kt @@ -1,6 +1,6 @@ +// WITH_REFLECT // TARGET_BACKEND: JVM // FILE: 1.kt -// WITH_REFLECT package test open class TypeRef { diff --git a/compiler/testData/codegen/boxInline/reified/kt11677.kt b/compiler/testData/codegen/boxInline/reified/kt11677.kt index 49ce1597496..1dbc51787fa 100644 --- a/compiler/testData/codegen/boxInline/reified/kt11677.kt +++ b/compiler/testData/codegen/boxInline/reified/kt11677.kt @@ -1,7 +1,7 @@ +// WITH_REFLECT +// FULL_JDK // TARGET_BACKEND: JVM // FILE: 1.kt -// FULL_JDK -// WITH_REFLECT package test diff --git a/compiler/testData/codegen/boxInline/reified/kt15956.kt b/compiler/testData/codegen/boxInline/reified/kt15956.kt index d0456a2afb5..1406d92527a 100644 --- a/compiler/testData/codegen/boxInline/reified/kt15956.kt +++ b/compiler/testData/codegen/boxInline/reified/kt15956.kt @@ -1,8 +1,8 @@ -// FILE: 1.kt -// WITH_REFLECT -// IGNORE_BACKEND: JS, JS_IR -// IGNORE_BACKEND: NATIVE // IGNORE_BACKEND: JS_IR_ES6 +// IGNORE_BACKEND: NATIVE +// IGNORE_BACKEND: JS, JS_IR +// WITH_REFLECT +// FILE: 1.kt package foo @@ -23,4 +23,4 @@ class A(val O: Int, val K: Int) fun box(): String { return f() -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/reified/kt15997.kt b/compiler/testData/codegen/boxInline/reified/kt15997.kt index d5e316774ee..f136c8e5347 100644 --- a/compiler/testData/codegen/boxInline/reified/kt15997.kt +++ b/compiler/testData/codegen/boxInline/reified/kt15997.kt @@ -1,6 +1,6 @@ -// FILE: 1.kt -// FULL_JDK // WITH_REFLECT +// FULL_JDK +// FILE: 1.kt // TARGET_BACKEND: JVM package test @@ -25,4 +25,4 @@ class OK { fun box(): String { OK().value = Unit return result -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/reified/kt15997_2.kt b/compiler/testData/codegen/boxInline/reified/kt15997_2.kt index 8124757b654..197643d32f9 100644 --- a/compiler/testData/codegen/boxInline/reified/kt15997_2.kt +++ b/compiler/testData/codegen/boxInline/reified/kt15997_2.kt @@ -1,6 +1,6 @@ -// FILE: 1.kt -// FULL_JDK // WITH_REFLECT +// FULL_JDK +// FILE: 1.kt // TARGET_BACKEND: JVM package test @@ -34,4 +34,4 @@ class OK { fun box(): String { OK().value = Unit return result -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/reified/kt35511.kt b/compiler/testData/codegen/boxInline/reified/kt35511.kt new file mode 100644 index 00000000000..e64db2af450 --- /dev/null +++ b/compiler/testData/codegen/boxInline/reified/kt35511.kt @@ -0,0 +1,35 @@ +// JVM_TARGET: 1.8 +// WITH_RUNTIME +// FILE: 1.kt + +package test + +open class Base(val name: String) +class A(name: String) : Base(name) +class B(name: String) : Base(name) + +var result = "fail" + +fun foo(base: Array) { + result = base[0].name +} + +fun cond() = true + +inline fun process(a: Base) { + val z = if (cond()) + arrayOf(a as T) + else + arrayOf(a as Y) + foo(z) +} + + +// FILE: 2.kt +import test.* + +fun box(): String { + process(A("OK")) + + return result +} diff --git a/compiler/testData/codegen/boxInline/reified/kt35511_try.kt b/compiler/testData/codegen/boxInline/reified/kt35511_try.kt new file mode 100644 index 00000000000..19369a4e017 --- /dev/null +++ b/compiler/testData/codegen/boxInline/reified/kt35511_try.kt @@ -0,0 +1,37 @@ +// JVM_TARGET: 1.8 +// WITH_RUNTIME +// FILE: 1.kt + +package test + +open class Base(val name: String) +class A(name: String) : Base(name) +class B(name: String) : Base(name) + +var result = "fail" + +fun foo(base: Array) { + result = base[0].name +} + +fun cond() = true + +inline fun process(a: Base) { + val z = try { + arrayOf(a as T) + } catch (e: Exception) { + arrayOf(a as Y) + } + + foo(z) +} + + +// FILE: 2.kt +import test.* + +fun box(): String { + process(B("OK")) + + return result +} diff --git a/compiler/testData/codegen/boxInline/reified/kt35511_try_valueOf.kt b/compiler/testData/codegen/boxInline/reified/kt35511_try_valueOf.kt new file mode 100644 index 00000000000..896923e2b35 --- /dev/null +++ b/compiler/testData/codegen/boxInline/reified/kt35511_try_valueOf.kt @@ -0,0 +1,42 @@ +// JVM_TARGET: 1.8 +// WITH_RUNTIME +// FILE: 1.kt + +package test + +enum class Base(val value: String) { + OK("OK"), + B("FAIL"); +} + +enum class Base2(val value: String) { + A("OK2"), + B("FAIL2"); +} + +var result = "fail" + +fun foo(base: Enum<*>) { + result = base.name +} + +fun cond() = true + +inline fun , reified Y : Enum> process(name: String) { + val z = try { + enumValueOf(name) + } catch (e: Exception) { + enumValueOf(name) + } + + foo(z) +} + +// FILE: 2.kt +import test.* + +fun box(): String { + process("OK") + + return result +} diff --git a/compiler/testData/codegen/boxInline/reified/kt35511_try_values.kt b/compiler/testData/codegen/boxInline/reified/kt35511_try_values.kt new file mode 100644 index 00000000000..45aa1beacc0 --- /dev/null +++ b/compiler/testData/codegen/boxInline/reified/kt35511_try_values.kt @@ -0,0 +1,46 @@ +// JVM_TARGET: 1.8 +// WITH_RUNTIME +// FILE: 1.kt + +package test + +enum class Base(val value: String) { + OK("OK"), + B("FAIL"); +} + +enum class Base2(val value: String) { + A("OK2"), + B("FAIL2"); +} + +var result = "fail" + +fun foo(base: Enum<*>) { + result = base.name +} + +fun foo(base: Array>) { + result = base[0].name +} + +fun cond() = true + +inline fun , reified Y : Enum> process(a: String) { + val z = try { + enumValues() + } catch (e: Exception) { + enumValues() + } + + foo(z) +} + +// FILE: 2.kt +import test.* + +fun box(): String { + process("OK") + + return result +} diff --git a/compiler/testData/codegen/boxInline/reified/kt6988.kt b/compiler/testData/codegen/boxInline/reified/kt6988.kt index 43c3fe42e2d..00596b7c1a8 100644 --- a/compiler/testData/codegen/boxInline/reified/kt6988.kt +++ b/compiler/testData/codegen/boxInline/reified/kt6988.kt @@ -1,6 +1,6 @@ +// WITH_REFLECT // TARGET_BACKEND: JVM // FILE: 1.kt -// WITH_REFLECT package test interface Call { diff --git a/compiler/testData/codegen/boxInline/reified/kt6988_2.kt b/compiler/testData/codegen/boxInline/reified/kt6988_2.kt index 669fa7e0897..84bad0cb25c 100644 --- a/compiler/testData/codegen/boxInline/reified/kt6988_2.kt +++ b/compiler/testData/codegen/boxInline/reified/kt6988_2.kt @@ -1,6 +1,6 @@ +// WITH_REFLECT // TARGET_BACKEND: JVM // FILE: 1.kt -// WITH_REFLECT package test diff --git a/compiler/testData/codegen/boxInline/reified/kt6990.kt b/compiler/testData/codegen/boxInline/reified/kt6990.kt index c3f4f9ea17f..4b39aa8ad9e 100644 --- a/compiler/testData/codegen/boxInline/reified/kt6990.kt +++ b/compiler/testData/codegen/boxInline/reified/kt6990.kt @@ -1,8 +1,8 @@ +// WITH_REFLECT // TARGET_BACKEND: JVM // IGNORE_BACKEND: ANDROID // FILE: 1.kt -// WITH_REFLECT package test public inline fun inlineMeIfYouCan(): String? = diff --git a/compiler/testData/codegen/boxInline/reified/kt9637.kt b/compiler/testData/codegen/boxInline/reified/kt9637.kt index 42ade47a265..8d9b3cf92e6 100644 --- a/compiler/testData/codegen/boxInline/reified/kt9637.kt +++ b/compiler/testData/codegen/boxInline/reified/kt9637.kt @@ -1,6 +1,7 @@ +// WITH_REFLECT +// NO_CHECK_LAMBDA_INLINING // TARGET_BACKEND: JVM // FILE: 1.kt -// WITH_REFLECT package test import java.util.* @@ -20,7 +21,6 @@ public class Box // FILE: 2.kt -//NO_CHECK_LAMBDA_INLINING import test.* class Boxer { diff --git a/compiler/testData/codegen/boxInline/reified/packages.kt b/compiler/testData/codegen/boxInline/reified/packages.kt index 508bff65a38..d9249ef1bc6 100644 --- a/compiler/testData/codegen/boxInline/reified/packages.kt +++ b/compiler/testData/codegen/boxInline/reified/packages.kt @@ -1,6 +1,7 @@ +// WITH_REFLECT +// NO_CHECK_LAMBDA_INLINING // TARGET_BACKEND: JVM // FILE: 1.kt -// WITH_REFLECT package test public abstract class A @@ -23,7 +24,6 @@ inline fun foo3(x: Any, y: Any): Boolean { // FILE: 2.kt -//NO_CHECK_LAMBDA_INLINING import test.* fun box(): String { diff --git a/compiler/testData/codegen/boxInline/signature/inProjectionSubstitution.kt b/compiler/testData/codegen/boxInline/signature/inProjectionSubstitution.kt index ca3f588d679..c59db9712ed 100644 --- a/compiler/testData/codegen/boxInline/signature/inProjectionSubstitution.kt +++ b/compiler/testData/codegen/boxInline/signature/inProjectionSubstitution.kt @@ -1,6 +1,7 @@ +// WITH_REFLECT +// NO_CHECK_LAMBDA_INLINING // TARGET_BACKEND: JVM // FILE: 1.kt -// WITH_REFLECT package test interface F { @@ -16,7 +17,6 @@ inline fun Array.copyOfRange1(crossinline toIndex: () -> Int) = // FILE: 2.kt -//NO_CHECK_LAMBDA_INLINING import test.* import java.util.* diff --git a/compiler/testData/codegen/boxInline/signature/outProjectionSubstitution.kt b/compiler/testData/codegen/boxInline/signature/outProjectionSubstitution.kt index dc05def5a23..cfdacba9e8a 100644 --- a/compiler/testData/codegen/boxInline/signature/outProjectionSubstitution.kt +++ b/compiler/testData/codegen/boxInline/signature/outProjectionSubstitution.kt @@ -1,6 +1,7 @@ +// WITH_REFLECT +// NO_CHECK_LAMBDA_INLINING // TARGET_BACKEND: JVM // FILE: 1.kt -// WITH_REFLECT package test interface F { @@ -16,7 +17,6 @@ inline fun Array.copyOfRange1(crossinline toIndex: () -> Int) = // FILE: 2.kt -//NO_CHECK_LAMBDA_INLINING import test.* import java.util.* diff --git a/compiler/testData/codegen/boxInline/signature/recursion.kt b/compiler/testData/codegen/boxInline/signature/recursion.kt index 4b394b9ca04..5787136a28c 100644 --- a/compiler/testData/codegen/boxInline/signature/recursion.kt +++ b/compiler/testData/codegen/boxInline/signature/recursion.kt @@ -1,6 +1,7 @@ +// WITH_REFLECT +// NO_CHECK_LAMBDA_INLINING // TARGET_BACKEND: JVM // FILE: 1.kt -// WITH_REFLECT package test @@ -10,7 +11,6 @@ inline fun stub() { // FILE: 2.kt -//NO_CHECK_LAMBDA_INLINING import test.* import java.util.* diff --git a/compiler/testData/codegen/boxInline/signature/sameFormalParameterName.kt b/compiler/testData/codegen/boxInline/signature/sameFormalParameterName.kt index 2c58a9da41b..ec4bced980e 100644 --- a/compiler/testData/codegen/boxInline/signature/sameFormalParameterName.kt +++ b/compiler/testData/codegen/boxInline/signature/sameFormalParameterName.kt @@ -1,6 +1,8 @@ +// WITH_REFLECT +// FULL_JDK +// NO_CHECK_LAMBDA_INLINING // TARGET_BACKEND: JVM // FILE: 1.kt -// WITH_REFLECT package test class B @@ -23,8 +25,6 @@ open class Test { // FILE: 2.kt -// NO_CHECK_LAMBDA_INLINING -// FULL_JDK import test.* import java.util.* diff --git a/compiler/testData/codegen/boxInline/signature/sameReifiedFormalParameterName.kt b/compiler/testData/codegen/boxInline/signature/sameReifiedFormalParameterName.kt index 22c8776122e..1c1426dd93f 100644 --- a/compiler/testData/codegen/boxInline/signature/sameReifiedFormalParameterName.kt +++ b/compiler/testData/codegen/boxInline/signature/sameReifiedFormalParameterName.kt @@ -1,6 +1,8 @@ +// WITH_REFLECT +// FULL_JDK +// NO_CHECK_LAMBDA_INLINING // TARGET_BACKEND: JVM // FILE: 1.kt -// WITH_REFLECT package test class B @@ -23,8 +25,6 @@ open class Test { // FILE: 2.kt -// NO_CHECK_LAMBDA_INLINING -// FULL_JDK import test.* import java.util.* diff --git a/compiler/testData/codegen/boxInline/signature/starProjectionSubstitution.kt b/compiler/testData/codegen/boxInline/signature/starProjectionSubstitution.kt index b795b338486..d21eb211b78 100644 --- a/compiler/testData/codegen/boxInline/signature/starProjectionSubstitution.kt +++ b/compiler/testData/codegen/boxInline/signature/starProjectionSubstitution.kt @@ -1,6 +1,7 @@ +// WITH_REFLECT +// NO_CHECK_LAMBDA_INLINING // TARGET_BACKEND: JVM // FILE: 1.kt -// WITH_REFLECT package test interface F { @@ -16,7 +17,6 @@ inline fun Array.copyOfRange1(crossinline toIndex: () -> Int) = // FILE: 2.kt -//NO_CHECK_LAMBDA_INLINING import test.* import java.util.* diff --git a/compiler/testData/codegen/boxInline/signature/typeParameterInLambda.kt b/compiler/testData/codegen/boxInline/signature/typeParameterInLambda.kt index 255f1c05722..a7104afdefc 100644 --- a/compiler/testData/codegen/boxInline/signature/typeParameterInLambda.kt +++ b/compiler/testData/codegen/boxInline/signature/typeParameterInLambda.kt @@ -1,6 +1,8 @@ +// WITH_REFLECT +// FULL_JDK +// NO_CHECK_LAMBDA_INLINING // TARGET_BACKEND: JVM // FILE: 1.kt -// WITH_REFLECT package test open class Test { @@ -16,8 +18,6 @@ open class Test { // FILE: 2.kt -// NO_CHECK_LAMBDA_INLINING -// FULL_JDK import test.* import java.util.* diff --git a/compiler/testData/codegen/boxInline/signature/typeParametersSubstitution.kt b/compiler/testData/codegen/boxInline/signature/typeParametersSubstitution.kt index 06d63ce0a21..24d25bca09b 100644 --- a/compiler/testData/codegen/boxInline/signature/typeParametersSubstitution.kt +++ b/compiler/testData/codegen/boxInline/signature/typeParametersSubstitution.kt @@ -1,6 +1,7 @@ +// WITH_REFLECT +// NO_CHECK_LAMBDA_INLINING // TARGET_BACKEND: JVM // FILE: 1.kt -// WITH_REFLECT package test import java.util.* @@ -27,7 +28,6 @@ open class CustomerService { // FILE: 2.kt -//NO_CHECK_LAMBDA_INLINING import test.* import java.util.* diff --git a/compiler/testData/codegen/boxInline/signature/typeParametersSubstitution2.kt b/compiler/testData/codegen/boxInline/signature/typeParametersSubstitution2.kt index 143856ebb2f..7adf449f0c4 100644 --- a/compiler/testData/codegen/boxInline/signature/typeParametersSubstitution2.kt +++ b/compiler/testData/codegen/boxInline/signature/typeParametersSubstitution2.kt @@ -1,6 +1,7 @@ +// WITH_REFLECT +// NO_CHECK_LAMBDA_INLINING // TARGET_BACKEND: JVM // FILE: 1.kt -// WITH_REFLECT package test interface MComparator { @@ -28,7 +29,6 @@ open class CustomerService { // FILE: 2.kt -//NO_CHECK_LAMBDA_INLINING import test.* fun box(): String { diff --git a/compiler/testData/codegen/boxInline/simple/destructuring.kt b/compiler/testData/codegen/boxInline/simple/destructuring.kt index ea489b8e8d7..59b19014167 100644 --- a/compiler/testData/codegen/boxInline/simple/destructuring.kt +++ b/compiler/testData/codegen/boxInline/simple/destructuring.kt @@ -17,4 +17,4 @@ import test.* fun box(): String { foo { i, (a1, a2, a3) -> i + a3 } return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/simple/destructuringIndexClash.kt b/compiler/testData/codegen/boxInline/simple/destructuringIndexClash.kt index eeb9f2bfefb..24e7b61a534 100644 --- a/compiler/testData/codegen/boxInline/simple/destructuringIndexClash.kt +++ b/compiler/testData/codegen/boxInline/simple/destructuringIndexClash.kt @@ -32,4 +32,4 @@ fun box(): String { foo { i, (a1, a2, a3) -> a3 + i } foo2 { i, (a1, a2, a3) -> i + a3 } return res -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/simple/extension.kt b/compiler/testData/codegen/boxInline/simple/extension.kt index ad48f1b993f..0a990fe114a 100644 --- a/compiler/testData/codegen/boxInline/simple/extension.kt +++ b/compiler/testData/codegen/boxInline/simple/extension.kt @@ -1,5 +1,5 @@ -// FILE: 1.kt // WITH_RUNTIME +// FILE: 1.kt inline fun Inline.calcExt(s: (Int) -> Int, p: Int) : Int { return s(p) } diff --git a/compiler/testData/codegen/boxInline/simple/kt28547.kt b/compiler/testData/codegen/boxInline/simple/kt28547.kt index 6960b6f3663..cd6a19aa033 100644 --- a/compiler/testData/codegen/boxInline/simple/kt28547.kt +++ b/compiler/testData/codegen/boxInline/simple/kt28547.kt @@ -49,4 +49,4 @@ fun box(): String { ) return result -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/simple/rootConstructor.kt b/compiler/testData/codegen/boxInline/simple/rootConstructor.kt index 1af43ae7c06..7cd01cc4e77 100644 --- a/compiler/testData/codegen/boxInline/simple/rootConstructor.kt +++ b/compiler/testData/codegen/boxInline/simple/rootConstructor.kt @@ -1,3 +1,4 @@ +// NO_CHECK_LAMBDA_INLINING // FILE: 1.kt package test @@ -13,7 +14,6 @@ fun notInline(job: ()-> R) : R { // FILE: 2.kt -//NO_CHECK_LAMBDA_INLINING import test.* val s = doWork({11}) diff --git a/compiler/testData/codegen/boxInline/simple/vararg.kt b/compiler/testData/codegen/boxInline/simple/vararg.kt index 9297265eb7b..76b278d8ad7 100644 --- a/compiler/testData/codegen/boxInline/simple/vararg.kt +++ b/compiler/testData/codegen/boxInline/simple/vararg.kt @@ -1,5 +1,5 @@ -// FILE: 1.kt // WITH_RUNTIME +// FILE: 1.kt // KJS_WITH_FULL_RUNTIME package test diff --git a/compiler/testData/codegen/boxInline/smap/anonymous/kt19175.kt b/compiler/testData/codegen/boxInline/smap/anonymous/kt19175.kt index e7aeaec4f71..5a673bf38c3 100644 --- a/compiler/testData/codegen/boxInline/smap/anonymous/kt19175.kt +++ b/compiler/testData/codegen/boxInline/smap/anonymous/kt19175.kt @@ -27,53 +27,3 @@ fun box(): String { return result } - - -// FILE: 1.smap - -SMAP -1.kt -Kotlin -*S Kotlin -*F -+ 1 1.kt -test/Introspector$SchemaRetriever$inSchema$1 -*L -1#1,12:1 -*E - -// FILE: 2.smap - -SMAP -2.kt -Kotlin -*S Kotlin -*F -+ 1 2.kt -IntrospectorImpl$SchemaRetriever -+ 2 1.kt -test/Introspector$SchemaRetriever -*L -1#1,21:1 -8#2:22 -*S KotlinDebug -*F -+ 1 2.kt -IntrospectorImpl$SchemaRetriever -*L -9#1:22 -*E - -SMAP -1.kt -Kotlin -*S Kotlin -*F -+ 1 1.kt -test/Introspector$SchemaRetriever$inSchema$1 -+ 2 2.kt -IntrospectorImpl$SchemaRetriever -*L -1#1,12:1 -9#2:13 -*E diff --git a/compiler/testData/codegen/boxInline/smap/anonymous/kt19175.smap b/compiler/testData/codegen/boxInline/smap/anonymous/kt19175.smap new file mode 100644 index 00000000000..cac2acf0a38 --- /dev/null +++ b/compiler/testData/codegen/boxInline/smap/anonymous/kt19175.smap @@ -0,0 +1,47 @@ +// FILE: 1.kt +SMAP +1.kt +Kotlin +*S Kotlin +*F ++ 1 1.kt +test/Introspector$SchemaRetriever$inSchema$1 +*L +1#1,12:1 +*E + +// FILE: 2.kt +SMAP +2.kt +Kotlin +*S Kotlin +*F ++ 1 2.kt +IntrospectorImpl$SchemaRetriever ++ 2 1.kt +test/Introspector$SchemaRetriever +*L +1#1,30:1 +8#2:31 +*S KotlinDebug +*F ++ 1 2.kt +IntrospectorImpl$SchemaRetriever +*L +20#1:31 +*E + +SMAP +1.kt +Kotlin +*S Kotlin +*F ++ 1 1.kt +test/Introspector$SchemaRetriever$inSchema$1 ++ 2 2.kt +IntrospectorImpl$SchemaRetriever +*L +1#1,12:1 +20#2:13 +*E + diff --git a/compiler/testData/codegen/boxInline/smap/anonymous/lambda.kt b/compiler/testData/codegen/boxInline/smap/anonymous/lambda.kt index 1690def94fa..9a35ec2e9dc 100644 --- a/compiler/testData/codegen/boxInline/smap/anonymous/lambda.kt +++ b/compiler/testData/codegen/boxInline/smap/anonymous/lambda.kt @@ -1,3 +1,4 @@ +// NO_CHECK_LAMBDA_INLINING // FILE: 1.kt @@ -13,7 +14,6 @@ inline fun call(crossinline init: () -> Unit) { import builders.* -//NO_CHECK_LAMBDA_INLINING fun test(): String { var res = "Fail" @@ -28,52 +28,3 @@ fun test(): String { fun box(): String { return test() } - -// FILE: 1.smap - -SMAP -1.kt -Kotlin -*S Kotlin -*F -+ 1 1.kt -builders/_1Kt$call$1 -*L -1#1,12:1 -*E - -// FILE: 2.smap - -SMAP -2.kt -Kotlin -*S Kotlin -*F -+ 1 2.kt -_2Kt -+ 2 1.kt -builders/_1Kt -*L -1#1,21:1 -7#2:22 -*S KotlinDebug -*F -+ 1 2.kt -_2Kt -*L -9#1:22 -*E - -SMAP -1.kt -Kotlin -*S Kotlin -*F -+ 1 1.kt -builders/_1Kt$call$1 -+ 2 2.kt -_2Kt -*L -1#1,12:1 -10#2,2:13 -*E diff --git a/compiler/testData/codegen/boxInline/smap/anonymous/lambda.smap b/compiler/testData/codegen/boxInline/smap/anonymous/lambda.smap new file mode 100644 index 00000000000..133f8d6dee6 --- /dev/null +++ b/compiler/testData/codegen/boxInline/smap/anonymous/lambda.smap @@ -0,0 +1,47 @@ +// FILE: 1.kt +SMAP +1.kt +Kotlin +*S Kotlin +*F ++ 1 1.kt +builders/_1Kt$call$1 +*L +1#1,13:1 +*E + +// FILE: 2.kt +SMAP +2.kt +Kotlin +*S Kotlin +*F ++ 1 2.kt +_2Kt ++ 2 1.kt +builders/_1Kt +*L +1#1,31:1 +8#2:32 +*S KotlinDebug +*F ++ 1 2.kt +_2Kt +*L +20#1:32 +*E + +SMAP +1.kt +Kotlin +*S Kotlin +*F ++ 1 1.kt +builders/_1Kt$call$1 ++ 2 2.kt +_2Kt +*L +1#1,13:1 +21#2,2:14 +*E + diff --git a/compiler/testData/codegen/boxInline/smap/anonymous/lambdaOnCallSite.kt b/compiler/testData/codegen/boxInline/smap/anonymous/lambdaOnCallSite.kt index 53e46025ae0..20b1a1be810 100644 --- a/compiler/testData/codegen/boxInline/smap/anonymous/lambdaOnCallSite.kt +++ b/compiler/testData/codegen/boxInline/smap/anonymous/lambdaOnCallSite.kt @@ -1,3 +1,4 @@ +// NO_CHECK_LAMBDA_INLINING // FILE: 1.kt @@ -6,7 +7,6 @@ package builders inline fun call(crossinline init: () -> Unit) { return init() } -//NO_CHECK_LAMBDA_INLINING // FILE: 2.kt @@ -29,27 +29,3 @@ fun test(): String { fun box(): String { return test() } - -// FILE: 1.smap - -// FILE: 2.smap - -SMAP -2.kt -Kotlin -*S Kotlin -*F -+ 1 2.kt -_2Kt -+ 2 1.kt -builders/_1Kt -*L -1#1,23:1 -7#2:24 -*S KotlinDebug -*F -+ 1 2.kt -_2Kt -*L -9#1:24 -*E diff --git a/compiler/testData/codegen/boxInline/smap/anonymous/lambdaOnCallSite.smap b/compiler/testData/codegen/boxInline/smap/anonymous/lambdaOnCallSite.smap new file mode 100644 index 00000000000..e5c475cd021 --- /dev/null +++ b/compiler/testData/codegen/boxInline/smap/anonymous/lambdaOnCallSite.smap @@ -0,0 +1,23 @@ +// FILE: 1.kt + +// FILE: 2.kt +SMAP +2.kt +Kotlin +*S Kotlin +*F ++ 1 2.kt +_2Kt ++ 2 1.kt +builders/_1Kt +*L +1#1,32:1 +8#2:33 +*S KotlinDebug +*F ++ 1 2.kt +_2Kt +*L +19#1:33 +*E + diff --git a/compiler/testData/codegen/boxInline/smap/anonymous/lambdaOnInlineCallSite.kt b/compiler/testData/codegen/boxInline/smap/anonymous/lambdaOnInlineCallSite.kt index 949f01e9968..78e960f23ba 100644 --- a/compiler/testData/codegen/boxInline/smap/anonymous/lambdaOnInlineCallSite.kt +++ b/compiler/testData/codegen/boxInline/smap/anonymous/lambdaOnInlineCallSite.kt @@ -1,7 +1,8 @@ // IGNORE_BACKEND_MULTI_MODULE: JVM_IR, JVM_MULTI_MODULE_IR_AGAINST_OLD -// FILE: 1.kt +// NO_CHECK_LAMBDA_INLINING // IGNORE_BACKEND: JVM_IR // IGNORE_BACKEND_FIR: JVM_IR +// FILE: 1.kt package builders inline fun call(crossinline init: () -> Unit) { return init() @@ -28,60 +29,3 @@ inline fun test(): String { fun box(): String { return test() } -//NO_CHECK_LAMBDA_INLINING - -// FILE: 1.smap - -// FILE: 2.smap - -//TODO -//7#1,3:26 -//10#1,6:30 - could be merged in one big interval due preprocessing of inline function - -SMAP -2.kt -Kotlin -*S Kotlin -*F -+ 1 2.kt -_2Kt -+ 2 1.kt -builders/_1Kt -*L -1#1,24:1 -7#1,3:26 -10#1,6:30 -7#2:25 -7#2:29 -*S KotlinDebug -*F -+ 1 2.kt -_2Kt -*L -20#1:26,3 -20#1:30,6 -9#1:25 -20#1:29 -*E - -SMAP -2.kt -Kotlin -*S Kotlin -*F -+ 1 2.kt -_2Kt$test$1$1 -*L -1#1,24:1 -*E - -SMAP -2.kt -Kotlin -*S Kotlin -*F -+ 1 2.kt -_2Kt$test$1$1 -*L -1#1,24:1 -*E diff --git a/compiler/testData/codegen/boxInline/smap/anonymous/lambdaOnInlineCallSite.smap b/compiler/testData/codegen/boxInline/smap/anonymous/lambdaOnInlineCallSite.smap new file mode 100644 index 00000000000..cb3869e00a4 --- /dev/null +++ b/compiler/testData/codegen/boxInline/smap/anonymous/lambdaOnInlineCallSite.smap @@ -0,0 +1,51 @@ +// FILE: 1.kt + +// FILE: 2.kt +SMAP +2.kt +Kotlin +*S Kotlin +*F ++ 1 2.kt +_2Kt ++ 2 1.kt +builders/_1Kt +*L +1#1,32:1 +17#1,3:34 +20#1,6:38 +8#2:33 +8#2:37 +*S KotlinDebug +*F ++ 1 2.kt +_2Kt +*L +30#1:34,3 +30#1:38,6 +19#1:33 +30#1:37 +*E + +SMAP +2.kt +Kotlin +*S Kotlin +*F ++ 1 2.kt +_2Kt$test$1$1 +*L +1#1,32:1 +*E + +SMAP +2.kt +Kotlin +*S Kotlin +*F ++ 1 2.kt +_2Kt$test$1$1 +*L +1#1,32:1 +*E + diff --git a/compiler/testData/codegen/boxInline/smap/anonymous/object.kt b/compiler/testData/codegen/boxInline/smap/anonymous/object.kt index 5e410c30c0a..ae92844e2de 100644 --- a/compiler/testData/codegen/boxInline/smap/anonymous/object.kt +++ b/compiler/testData/codegen/boxInline/smap/anonymous/object.kt @@ -1,3 +1,4 @@ +// NO_CHECK_LAMBDA_INLINING // FILE: 1.kt @@ -30,53 +31,3 @@ fun test(): String { fun box(): String { return test() } -//NO_CHECK_LAMBDA_INLINING - -// FILE: 1.smap - -SMAP -1.kt -Kotlin -*S Kotlin -*F -+ 1 1.kt -builders/_1Kt$call$1 -*L -1#1,14:1 -*E - -// FILE: 2.smap - -SMAP -2.kt -Kotlin -*S Kotlin -*F -+ 1 2.kt -_2Kt -+ 2 1.kt -builders/_1Kt -*L -1#1,22:1 -7#2,5:23 -*S KotlinDebug -*F -+ 1 2.kt -_2Kt -*L -9#1:23,5 -*E - -SMAP -1.kt -Kotlin -*S Kotlin -*F -+ 1 1.kt -builders/_1Kt$call$1 -+ 2 2.kt -_2Kt -*L -1#1,14:1 -10#2,2:15 -*E diff --git a/compiler/testData/codegen/boxInline/smap/anonymous/object.smap b/compiler/testData/codegen/boxInline/smap/anonymous/object.smap new file mode 100644 index 00000000000..5b38bce24d9 --- /dev/null +++ b/compiler/testData/codegen/boxInline/smap/anonymous/object.smap @@ -0,0 +1,47 @@ +// FILE: 1.kt +SMAP +1.kt +Kotlin +*S Kotlin +*F ++ 1 1.kt +builders/_1Kt$call$1 +*L +1#1,15:1 +*E + +// FILE: 2.kt +SMAP +2.kt +Kotlin +*S Kotlin +*F ++ 1 2.kt +_2Kt ++ 2 1.kt +builders/_1Kt +*L +1#1,34:1 +8#2,5:35 +*S KotlinDebug +*F ++ 1 2.kt +_2Kt +*L +23#1:35,5 +*E + +SMAP +1.kt +Kotlin +*S Kotlin +*F ++ 1 1.kt +builders/_1Kt$call$1 ++ 2 2.kt +_2Kt +*L +1#1,15:1 +24#2,2:16 +*E + diff --git a/compiler/testData/codegen/boxInline/smap/anonymous/objectOnCallSite.kt b/compiler/testData/codegen/boxInline/smap/anonymous/objectOnCallSite.kt index eabbb2ea24c..80a01496734 100644 --- a/compiler/testData/codegen/boxInline/smap/anonymous/objectOnCallSite.kt +++ b/compiler/testData/codegen/boxInline/smap/anonymous/objectOnCallSite.kt @@ -1,3 +1,4 @@ +// NO_CHECK_LAMBDA_INLINING // FILE: 1.kt @@ -30,29 +31,3 @@ fun test(): String { fun box(): String { return test() } -//NO_CHECK_LAMBDA_INLINING - -// FILE: 1.smap - -// FILE: 2.smap - -//SMAP -SMAP -2.kt -Kotlin -*S Kotlin -*F -+ 1 2.kt -_2Kt -+ 2 1.kt -builders/_1Kt -*L -1#1,26:1 -7#2:27 -*S KotlinDebug -*F -+ 1 2.kt -_2Kt -*L -9#1:27 -*E diff --git a/compiler/testData/codegen/boxInline/smap/anonymous/objectOnCallSite.smap b/compiler/testData/codegen/boxInline/smap/anonymous/objectOnCallSite.smap new file mode 100644 index 00000000000..190a3327f86 --- /dev/null +++ b/compiler/testData/codegen/boxInline/smap/anonymous/objectOnCallSite.smap @@ -0,0 +1,23 @@ +// FILE: 1.kt + +// FILE: 2.kt +SMAP +2.kt +Kotlin +*S Kotlin +*F ++ 1 2.kt +_2Kt ++ 2 1.kt +builders/_1Kt +*L +1#1,34:1 +8#2:35 +*S KotlinDebug +*F ++ 1 2.kt +_2Kt +*L +19#1:35 +*E + diff --git a/compiler/testData/codegen/boxInline/smap/anonymous/objectOnInlineCallSite.kt b/compiler/testData/codegen/boxInline/smap/anonymous/objectOnInlineCallSite.kt index fae9a58df06..a895e30838a 100644 --- a/compiler/testData/codegen/boxInline/smap/anonymous/objectOnInlineCallSite.kt +++ b/compiler/testData/codegen/boxInline/smap/anonymous/objectOnInlineCallSite.kt @@ -1,7 +1,8 @@ // IGNORE_BACKEND_MULTI_MODULE: JVM_IR, JVM_MULTI_MODULE_IR_AGAINST_OLD -// FILE: 1.kt // IGNORE_BACKEND: JVM_IR // IGNORE_BACKEND_FIR: JVM_IR +// NO_CHECK_LAMBDA_INLINING +// FILE: 1.kt package builders inline fun call(crossinline init: () -> Unit) { return init() @@ -30,59 +31,3 @@ inline fun test(): String { fun box(): String { return test() } -//NO_CHECK_LAMBDA_INLINING - -// FILE: 1.smap - -// FILE: 2.smap - -//7#1,3:28 -//10#1,8:32 - could be merged in one big interval due preprocessing of inline function - -SMAP -2.kt -Kotlin -*S Kotlin -*F -+ 1 2.kt -_2Kt -+ 2 1.kt -builders/_1Kt -*L -1#1,26:1 -7#1,3:28 -10#1,8:32 -7#2:27 -7#2:31 -*S KotlinDebug -*F -+ 1 2.kt -_2Kt -*L -22#1:28,3 -22#1:32,8 -9#1:27 -22#1:31 -*E - -SMAP -2.kt -Kotlin -*S Kotlin -*F -+ 1 2.kt -_2Kt$test$1$1 -*L -1#1,26:1 -*E - -SMAP -2.kt -Kotlin -*S Kotlin -*F -+ 1 2.kt -_2Kt$test$1$1 -*L -1#1,26:1 -*E diff --git a/compiler/testData/codegen/boxInline/smap/anonymous/objectOnInlineCallSite.smap b/compiler/testData/codegen/boxInline/smap/anonymous/objectOnInlineCallSite.smap new file mode 100644 index 00000000000..d123ab534ff --- /dev/null +++ b/compiler/testData/codegen/boxInline/smap/anonymous/objectOnInlineCallSite.smap @@ -0,0 +1,51 @@ +// FILE: 1.kt + +// FILE: 2.kt +SMAP +2.kt +Kotlin +*S Kotlin +*F ++ 1 2.kt +_2Kt ++ 2 1.kt +builders/_1Kt +*L +1#1,34:1 +17#1,3:36 +20#1,8:40 +8#2:35 +8#2:39 +*S KotlinDebug +*F ++ 1 2.kt +_2Kt +*L +32#1:36,3 +32#1:40,8 +19#1:35 +32#1:39 +*E + +SMAP +2.kt +Kotlin +*S Kotlin +*F ++ 1 2.kt +_2Kt$test$1$1 +*L +1#1,34:1 +*E + +SMAP +2.kt +Kotlin +*S Kotlin +*F ++ 1 2.kt +_2Kt$test$1$1 +*L +1#1,34:1 +*E + diff --git a/compiler/testData/codegen/boxInline/smap/anonymous/objectOnInlineCallSite2.kt b/compiler/testData/codegen/boxInline/smap/anonymous/objectOnInlineCallSite2.kt index 5e91d05e299..840b21c7cdb 100644 --- a/compiler/testData/codegen/boxInline/smap/anonymous/objectOnInlineCallSite2.kt +++ b/compiler/testData/codegen/boxInline/smap/anonymous/objectOnInlineCallSite2.kt @@ -1,4 +1,8 @@ +// IGNORE +// NO_CHECK_LAMBDA_INLINING +// IGNORE_BACKEND_MULTI_MODULE: JVM, JVM_IR, JVM_MULTI_MODULE_OLD_AGAINST_IR, JVM_MULTI_MODULE_IR_AGAINST_OLD // FILE: 1.kt +// NO_SMAP_DUMP package builders @@ -28,57 +32,3 @@ import builders.* fun box(): String { return test() } -//NO_CHECK_LAMBDA_INLINING - -// FILE: 1.sxmap - -//TODO SHOULD BE LESS - -SXMAP -objectOnInlineCallSite2.2.kt -Kotlin -*S Kotlin -*F -+ 1 objectOnInlineCallSite2.2.kt -builders/BuildersPackage -*L -1#1,42:1 -*E - -SXMAP -objectOnInlineCallSite2.2.kt -Kotlin -*S Kotlin -*F -+ 1 objectOnInlineCallSite2.2.kt -builders/BuildersPackage$objectOnInlineCallSite2_2$HASH$test$1$1 -*L -1#1,42:1 -*E - -// FILE: 2.sxmap - -SXMAP -objectOnInlineCallSite2.1.kt -Kotlin -*S Kotlin -*F -+ 1 objectOnInlineCallSite2.1.kt -_DefaultPackage -+ 2 objectOnInlineCallSite2.2.kt -builders/BuildersPackage -*L -1#1,32:1 -8#2,11:33 -*E - -SXMAP -objectOnInlineCallSite2.2.kt -Kotlin -*S Kotlin -*F -+ 1 objectOnInlineCallSite2.2.kt -builders/BuildersPackage$objectOnInlineCallSite2_2$HASH$test$1$1 -*L -1#1,42:1 -*E diff --git a/compiler/testData/codegen/boxInline/smap/anonymous/objectOnInlineCallSite2.smap b/compiler/testData/codegen/boxInline/smap/anonymous/objectOnInlineCallSite2.smap new file mode 100644 index 00000000000..b47ee8e448e --- /dev/null +++ b/compiler/testData/codegen/boxInline/smap/anonymous/objectOnInlineCallSite2.smap @@ -0,0 +1,23 @@ +// FILE: 2.kt +SMAP +2.kt +Kotlin +*S Kotlin +*F ++ 1 2.kt +_2Kt ++ 2 1.kt +builders/_1Kt +*L +1#1,35:1 +14#2,3:36 +10#2,15:39 +*S KotlinDebug +*F ++ 1 2.kt +_2Kt +*L +33#1:36,3 +33#1:39,15 +*E + diff --git a/compiler/testData/codegen/boxInline/smap/anonymous/objectOnInlineCallSiteWithCapture.kt b/compiler/testData/codegen/boxInline/smap/anonymous/objectOnInlineCallSiteWithCapture.kt index 41b7502d7d0..294ce31ba4c 100644 --- a/compiler/testData/codegen/boxInline/smap/anonymous/objectOnInlineCallSiteWithCapture.kt +++ b/compiler/testData/codegen/boxInline/smap/anonymous/objectOnInlineCallSiteWithCapture.kt @@ -1,5 +1,6 @@ +// NO_CHECK_LAMBDA_INLINING // FILE: 1.kt - +// NO_SMAP_DUMP package builders //TODO there is a bug in asm it's skips linenumber on same line on reading bytecode @@ -20,7 +21,6 @@ inline fun test(crossinline p: () -> String): String { return res } -//TODO SHOULD BE LESS // FILE: 2.kt @@ -30,6 +30,4 @@ import builders.* fun box(): String { return test{"OK"} } -//NO_CHECK_LAMBDA_INLINING -//TODO diff --git a/compiler/testData/codegen/boxInline/smap/anonymous/objectOnInlineCallSiteWithCapture.smap b/compiler/testData/codegen/boxInline/smap/anonymous/objectOnInlineCallSiteWithCapture.smap new file mode 100644 index 00000000000..41e420e11ae --- /dev/null +++ b/compiler/testData/codegen/boxInline/smap/anonymous/objectOnInlineCallSiteWithCapture.smap @@ -0,0 +1,37 @@ +// FILE: 2.kt +SMAP +2.kt +Kotlin +*S Kotlin +*F ++ 1 2.kt +_2Kt ++ 2 1.kt +builders/_1Kt +*L +1#1,34:1 +12#2,3:35 +8#2,15:38 +*S KotlinDebug +*F ++ 1 2.kt +_2Kt +*L +31#1:35,3 +31#1:38,15 +*E + +SMAP +1.kt +Kotlin +*S Kotlin +*F ++ 1 1.kt +builders/_1Kt$test$1$1 ++ 2 2.kt +_2Kt +*L +1#1,25:1 +31#2:26 +*E + diff --git a/compiler/testData/codegen/boxInline/smap/anonymous/severalMappingsForDefaultFile.kt b/compiler/testData/codegen/boxInline/smap/anonymous/severalMappingsForDefaultFile.kt index 544454d615c..e3050bde68d 100644 --- a/compiler/testData/codegen/boxInline/smap/anonymous/severalMappingsForDefaultFile.kt +++ b/compiler/testData/codegen/boxInline/smap/anonymous/severalMappingsForDefaultFile.kt @@ -1,4 +1,5 @@ -//FILE: 1.kt +// FILE: 1.kt +// NO_SMAP_DUMP package test @@ -15,7 +16,7 @@ inline fun any(s: () -> Boolean) { } -//FILE: 2.kt +// FILE: 2.kt import test.* fun box(): String { @@ -31,52 +32,3 @@ inline fun test(z: () -> Unit) { z() } - -// FILE: 2.smap -SMAP -2.kt -Kotlin -*S Kotlin -*F -+ 1 2.kt -_2Kt -+ 2 1.kt -test/_1Kt -*L -1#1,18:1 -10#2:19 -6#2:20 -*S KotlinDebug -*F -+ 1 2.kt -_2Kt -*L -7#1:19 -7#1:20 -*E - -SMAP -1.kt -Kotlin -*S Kotlin -*F -+ 1 1.kt -test/_1Kt$annotatedWith2$1 -+ 2 1.kt -test/_1Kt -+ 3 2.kt -_2Kt -*L -1#1,18:1 -14#2:19 -10#2:20 -15#2:22 -7#3:21 -*S KotlinDebug -*F -+ 1 1.kt -test/_1Kt$annotatedWith2$1 -*L -6#1:19 -6#1:22 -*E diff --git a/compiler/testData/codegen/boxInline/smap/anonymous/severalMappingsForDefaultFile.smap b/compiler/testData/codegen/boxInline/smap/anonymous/severalMappingsForDefaultFile.smap new file mode 100644 index 00000000000..6838dd6dbc8 --- /dev/null +++ b/compiler/testData/codegen/boxInline/smap/anonymous/severalMappingsForDefaultFile.smap @@ -0,0 +1,49 @@ +// FILE: 2.kt +SMAP +2.kt +Kotlin +*S Kotlin +*F ++ 1 2.kt +_2Kt ++ 2 1.kt +test/_1Kt +*L +1#1,35:1 +11#2:36 +7#2:37 +*S KotlinDebug +*F ++ 1 2.kt +_2Kt +*L +25#1:36 +25#1:37 +*E + +SMAP +1.kt +Kotlin +*S Kotlin +*F ++ 1 1.kt +test/_1Kt$annotatedWith2$1 ++ 2 1.kt +test/_1Kt ++ 3 2.kt +_2Kt +*L +1#1,19:1 +15#2:20 +11#2:21 +16#2:23 +25#3:22 +*S KotlinDebug +*F ++ 1 1.kt +test/_1Kt$annotatedWith2$1 +*L +7#1:20 +7#1:23 +*E + diff --git a/compiler/testData/codegen/boxInline/smap/assertion.kt b/compiler/testData/codegen/boxInline/smap/assertion.kt index 779611b7b2c..0336a2c853f 100644 --- a/compiler/testData/codegen/boxInline/smap/assertion.kt +++ b/compiler/testData/codegen/boxInline/smap/assertion.kt @@ -35,29 +35,3 @@ fun box(): String { return "OK" } - -// FILE: 1.smap - -// FILE: 2.smap - -SMAP -2.kt -Kotlin -*S Kotlin -*F -+ 1 2.kt -_2Kt -+ 2 1.kt -test/_1Kt -*L -1#1,14:1 -18#2,7:15 -9#2,7:22 -*S KotlinDebug -*F -+ 1 2.kt -_2Kt -*L -6#1:15,7 -7#1:22,7 -*E diff --git a/compiler/testData/codegen/boxInline/smap/assertion.smap b/compiler/testData/codegen/boxInline/smap/assertion.smap new file mode 100644 index 00000000000..387c0ab04ea --- /dev/null +++ b/compiler/testData/codegen/boxInline/smap/assertion.smap @@ -0,0 +1,25 @@ +// FILE: 1.kt + +// FILE: 2.kt +SMAP +2.kt +Kotlin +*S Kotlin +*F ++ 1 2.kt +_2Kt ++ 2 1.kt +test/_1Kt +*L +1#1,38:1 +18#2,7:39 +9#2,7:46 +*S KotlinDebug +*F ++ 1 2.kt +_2Kt +*L +31#1:39,7 +32#1:46,7 +*E + diff --git a/compiler/testData/codegen/boxInline/smap/classCycle.kt b/compiler/testData/codegen/boxInline/smap/classCycle.kt index 7c6f7ac5bf9..c1b9e2f7564 100644 --- a/compiler/testData/codegen/boxInline/smap/classCycle.kt +++ b/compiler/testData/codegen/boxInline/smap/classCycle.kt @@ -15,81 +15,3 @@ class B { import test.* fun box() = A().a() - -// FILE: 1.smap -SMAP -1.kt -Kotlin -*S Kotlin -*F -+ 1 1.kt -test/B -+ 2 1.kt -test/A -*L -1#1,14:1 -11#1:16 -6#2:15 -*S KotlinDebug -*F -+ 1 1.kt -test/B -*L -10#1:16 -10#1:15 -*E - -SMAP -1.kt -Kotlin -*S Kotlin -*F -+ 1 1.kt -test/A -+ 2 1.kt -test/B -*L -1#1,14:1 -6#1:16 -10#2:15 -11#2:17 -11#2:18 -*S KotlinDebug -*F -+ 1 1.kt -test/A -*L -5#1:16 -5#1:15 -5#1:17 -6#1:18 -*E - -// FILE: 2.smap -SMAP -2.kt -Kotlin -*S Kotlin -*F -+ 1 2.kt -_2Kt -+ 2 1.kt -test/A -+ 3 1.kt -test/B -*L -1#1,6:1 -5#2:7 -6#2:9 -10#3:8 -11#3:10 -*S KotlinDebug -*F -+ 1 2.kt -_2Kt -*L -4#1:7 -4#1:9 -4#1:8 -4#1:10 -*E diff --git a/compiler/testData/codegen/boxInline/smap/classCycle.smap b/compiler/testData/codegen/boxInline/smap/classCycle.smap new file mode 100644 index 00000000000..d823e997e6f --- /dev/null +++ b/compiler/testData/codegen/boxInline/smap/classCycle.smap @@ -0,0 +1,78 @@ +// FILE: 1.kt +SMAP +1.kt +Kotlin +*S Kotlin +*F ++ 1 1.kt +test/B ++ 2 1.kt +test/A +*L +1#1,14:1 +11#1:16 +6#2:15 +*S KotlinDebug +*F ++ 1 1.kt +test/B +*L +10#1:16 +10#1:15 +*E + +SMAP +1.kt +Kotlin +*S Kotlin +*F ++ 1 1.kt +test/A ++ 2 1.kt +test/B +*L +1#1,14:1 +6#1:16 +10#2:15 +11#2:17 +11#2:18 +*S KotlinDebug +*F ++ 1 1.kt +test/A +*L +5#1:16 +5#1:15 +5#1:17 +6#1:18 +*E + +// FILE: 2.kt +SMAP +2.kt +Kotlin +*S Kotlin +*F ++ 1 2.kt +_2Kt ++ 2 1.kt +test/A ++ 3 1.kt +test/B +*L +1#1,18:1 +5#2:19 +6#2:21 +10#3:20 +11#3:22 +*S KotlinDebug +*F ++ 1 2.kt +_2Kt +*L +17#1:19 +17#1:21 +17#1:20 +17#1:22 +*E + diff --git a/compiler/testData/codegen/boxInline/smap/classFromDefaultPackage.kt b/compiler/testData/codegen/boxInline/smap/classFromDefaultPackage.kt index fe9b11919d2..8ae59ef3043 100644 --- a/compiler/testData/codegen/boxInline/smap/classFromDefaultPackage.kt +++ b/compiler/testData/codegen/boxInline/smap/classFromDefaultPackage.kt @@ -11,25 +11,3 @@ fun box(): String { return "OK" } - -// FILE: 2.smap - -SMAP -2.kt -Kotlin -*S Kotlin -*F -+ 1 2.kt -_2Kt -+ 2 1.kt -A -*L -1#1,9:1 -4#2:10 -*S KotlinDebug -*F -+ 1 2.kt -_2Kt -*L -4#1:10 -*E diff --git a/compiler/testData/codegen/boxInline/smap/classFromDefaultPackage.smap b/compiler/testData/codegen/boxInline/smap/classFromDefaultPackage.smap new file mode 100644 index 00000000000..1edb2509174 --- /dev/null +++ b/compiler/testData/codegen/boxInline/smap/classFromDefaultPackage.smap @@ -0,0 +1,23 @@ +// FILE: 1.kt + +// FILE: 2.kt +SMAP +2.kt +Kotlin +*S Kotlin +*F ++ 1 2.kt +_2Kt ++ 2 1.kt +A +*L +1#1,14:1 +4#2:15 +*S KotlinDebug +*F ++ 1 2.kt +_2Kt +*L +10#1:15 +*E + diff --git a/compiler/testData/codegen/boxInline/smap/crossroutines.kt b/compiler/testData/codegen/boxInline/smap/crossroutines.kt index 23b3608f04c..24080f49f5d 100644 --- a/compiler/testData/codegen/boxInline/smap/crossroutines.kt +++ b/compiler/testData/codegen/boxInline/smap/crossroutines.kt @@ -1,7 +1,7 @@ // This test depends on line numbers // WITH_RUNTIME -// FILE: 1.kt // IGNORE_BACKEND_FIR: JVM_IR +// FILE: 1.kt package test interface SuspendRunnable { @@ -48,87 +48,3 @@ fun box(): String { return res } -// FILE: 1.smap -SMAP -1.kt -Kotlin -*S Kotlin -*F -+ 1 1.kt -test/_1Kt$inlineMe2$2 -*L -1#1,23:1 -*E - -SMAP -1.kt -Kotlin -*S Kotlin -*F -+ 1 1.kt -test/_1Kt$inlineMe1$2 -*L -1#1,23:1 -*E - -SMAP -1.kt -Kotlin -*S Kotlin -*F -+ 1 1.kt -test/_1Kt$inlineMe1$2$run$1 -*L -1#1,23:1 -*E - -// FILE: 2.smap -SMAP -2.kt -Kotlin -*S Kotlin -*F -+ 1 2.kt -_2Kt$box$1 -+ 2 1.kt -test/_1Kt -*L -1#1,29:1 -12#2,5:30 -19#2,3:35 -*S KotlinDebug -*F -+ 1 2.kt -_2Kt$box$1 -*L -19#1:30,5 -22#1:35,3 -*E - -SMAP -1.kt -Kotlin -*S Kotlin -*F -+ 1 1.kt -test/_1Kt$inlineMe2$2 -+ 2 2.kt -_2Kt$box$1 -*L -1#1,23:1 -23#2,2:24 -*E - -SMAP -1.kt -Kotlin -*S Kotlin -*F -+ 1 1.kt -test/_1Kt$inlineMe1$2 -+ 2 2.kt -_2Kt$box$1 -*L -1#1,23:1 -20#2,2:24 -*E diff --git a/compiler/testData/codegen/boxInline/smap/crossroutines.smap b/compiler/testData/codegen/boxInline/smap/crossroutines.smap new file mode 100644 index 00000000000..dcc6a864d97 --- /dev/null +++ b/compiler/testData/codegen/boxInline/smap/crossroutines.smap @@ -0,0 +1,85 @@ +// FILE: 1.kt +SMAP +1.kt +Kotlin +*S Kotlin +*F ++ 1 1.kt +test/_1Kt$inlineMe2$2 +*L +1#1,23:1 +*E + +SMAP +1.kt +Kotlin +*S Kotlin +*F ++ 1 1.kt +test/_1Kt$inlineMe1$2 +*L +1#1,23:1 +*E + +SMAP +1.kt +Kotlin +*S Kotlin +*F ++ 1 1.kt +test/_1Kt$inlineMe1$2$run$1 +*L +1#1,23:1 +*E + +// FILE: 2.kt +SMAP +2.kt +Kotlin +*S Kotlin +*F ++ 1 2.kt +_2Kt$box$1 ++ 2 1.kt +test/_1Kt +*L +1#1,51:1 +12#2,5:52 +19#2,3:57 +*S KotlinDebug +*F ++ 1 2.kt +_2Kt$box$1 +*L +41#1:52,5 +44#1:57,3 +*E + +SMAP +1.kt +Kotlin +*S Kotlin +*F ++ 1 1.kt +test/_1Kt$inlineMe2$2 ++ 2 2.kt +_2Kt$box$1 +*L +1#1,23:1 +45#2,2:24 +*E + +SMAP +1.kt +Kotlin +*S Kotlin +*F ++ 1 1.kt +test/_1Kt$inlineMe1$2 ++ 2 2.kt +_2Kt$box$1 +*L +1#1,23:1 +42#2,2:24 +*E + diff --git a/compiler/testData/codegen/boxInline/smap/defaultFunction.kt b/compiler/testData/codegen/boxInline/smap/defaultFunction.kt index b0a216e0368..99527ea8e88 100644 --- a/compiler/testData/codegen/boxInline/smap/defaultFunction.kt +++ b/compiler/testData/codegen/boxInline/smap/defaultFunction.kt @@ -1,3 +1,4 @@ +// NO_CHECK_LAMBDA_INLINING // FILE: 1.kt @@ -7,23 +8,10 @@ inline fun inlineFun(capturedParam: String, noinline lambda: () -> String = { ca } // FILE: 2.kt -//NO_CHECK_LAMBDA_INLINING +// NO_SMAP_DUMP import test.* fun box(): String { return inlineFun("OK") } -// FILE: 1.smap -SMAP -1.kt -Kotlin -*S Kotlin -*F -+ 1 1.kt -test/_1Kt$inlineFun$1 -*L -1#1,9:1 -*E - -// FILE: 2.TODO \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/smap/defaultFunction.smap b/compiler/testData/codegen/boxInline/smap/defaultFunction.smap new file mode 100644 index 00000000000..381bfe1c877 --- /dev/null +++ b/compiler/testData/codegen/boxInline/smap/defaultFunction.smap @@ -0,0 +1,12 @@ +// FILE: 1.kt +SMAP +1.kt +Kotlin +*S Kotlin +*F ++ 1 1.kt +test/_1Kt$inlineFun$1 +*L +1#1,10:1 +*E + diff --git a/compiler/testData/codegen/boxInline/smap/defaultFunctionWithInlineCall.kt b/compiler/testData/codegen/boxInline/smap/defaultFunctionWithInlineCall.kt index cab3ac62c0d..bbcef2f7295 100644 --- a/compiler/testData/codegen/boxInline/smap/defaultFunctionWithInlineCall.kt +++ b/compiler/testData/codegen/boxInline/smap/defaultFunctionWithInlineCall.kt @@ -18,44 +18,3 @@ fun box(): String { return inlineFun() } -// FILE: 1.smap -SMAP -1.kt -Kotlin -*S Kotlin -*F -+ 1 1.kt -test/_1Kt -*L -1#1,14:1 -5#1:15 -*S KotlinDebug -*F -+ 1 1.kt -test/_1Kt -*L -11#1:15 -*E - -// FILE: 2.smap -SMAP -2.kt -Kotlin -*S Kotlin -*F -+ 1 2.kt -_2Kt -+ 2 1.kt -test/_1Kt -*L -1#1,8:1 -8#2,4:9 -5#2:13 -*S KotlinDebug -*F -+ 1 2.kt -_2Kt -*L -5#1:9,4 -5#1:13 -*E diff --git a/compiler/testData/codegen/boxInline/smap/defaultFunctionWithInlineCall.smap b/compiler/testData/codegen/boxInline/smap/defaultFunctionWithInlineCall.smap new file mode 100644 index 00000000000..621f609502b --- /dev/null +++ b/compiler/testData/codegen/boxInline/smap/defaultFunctionWithInlineCall.smap @@ -0,0 +1,42 @@ +// FILE: 1.kt +SMAP +1.kt +Kotlin +*S Kotlin +*F ++ 1 1.kt +test/_1Kt +*L +1#1,14:1 +5#1:15 +*S KotlinDebug +*F ++ 1 1.kt +test/_1Kt +*L +11#1:15 +*E + +// FILE: 2.kt +SMAP +2.kt +Kotlin +*S Kotlin +*F ++ 1 2.kt +_2Kt ++ 2 1.kt +test/_1Kt +*L +1#1,21:1 +8#2,4:22 +5#2:26 +*S KotlinDebug +*F ++ 1 2.kt +_2Kt +*L +18#1:22,4 +18#1:26 +*E + diff --git a/compiler/testData/codegen/boxInline/smap/defaultLambda/defaultLambdaInAnonymous.kt b/compiler/testData/codegen/boxInline/smap/defaultLambda/defaultLambdaInAnonymous.kt index c06c6e1ecb2..635ffe33422 100644 --- a/compiler/testData/codegen/boxInline/smap/defaultLambda/defaultLambdaInAnonymous.kt +++ b/compiler/testData/codegen/boxInline/smap/defaultLambda/defaultLambdaInAnonymous.kt @@ -1,6 +1,7 @@ +// SEPARATE_SMAP_DUMPS +// SKIP_INLINE_CHECK_IN: lParams$default // FILE: 1.kt -// SKIP_INLINE_CHECK_IN: lParams$default package test //A lot of blank lines [Don't delete] @@ -42,146 +43,3 @@ import test.* fun box(): String { return lParams() } - -// FILE: 1.smap -SMAP -1.kt -Kotlin -*S Kotlin -*F -+ 1 1.kt -test/_1Kt$lParams$1 -*L -1#1,39:1 -*E - -SMAP -1.kt -Kotlin -*S Kotlin -*F -+ 1 1.kt -test/_1Kt$lParams$1$1 -+ 2 1.kt -test/_1Kt -*L -1#1,39:1 -30#2:40 -*S KotlinDebug -*F -+ 1 1.kt -test/_1Kt$lParams$1$1 -*L -33#1:40 -*E - -SMAP -1.kt -Kotlin -*S Kotlin -*F -+ 1 1.kt -test/_1Kt$kValue$1 -+ 2 1.kt -test/_1Kt$lParams$1$1 -*L -1#1,39:1 -33#2:40 -*E - -SMAP -1.kt -Kotlin -*S Kotlin -*F -+ 1 1.kt -test/_1Kt$kValue$1 -*L -1#1,39:1 -*E - -// FILE: 2.smap-nonseparate-compilation - -SMAP -2.kt -Kotlin -*S Kotlin -*F -+ 1 2.kt -_2Kt -+ 2 1.kt -test/_1Kt -+ 3 1.kt -test/_1Kt$lParams$1 -*L -1#1,8:1 -32#2,5:9 -33#3:14 -*S KotlinDebug -*F -+ 1 2.kt -_2Kt -*L -5#1:9,5 -5#1:14 -*E - -// FILE: 2.smap-separate-compilation - -SMAP -2.kt -Kotlin -*S Kotlin -*F -+ 1 2.kt -_2Kt -+ 2 1.kt -test/_1Kt -+ 3 1.kt -test/_1Kt$lParams$1 -*L -1#1,8:1 -32#2,5:9 -33#3:14 -*S KotlinDebug -*F -+ 1 2.kt -_2Kt -*L -5#1:9,5 -5#1:14 -*E - -SMAP -1.kt -Kotlin -*S Kotlin -*F -+ 1 1.kt -test/_1Kt$lParams$1$1 -+ 2 1.kt -test/_1Kt -*L -1#1,39:1 -30#2:40 -*S KotlinDebug -*F -+ 1 1.kt -test/_1Kt$lParams$1$1 -*L -33#1:40 -*E - -SMAP -1.kt -Kotlin -*S Kotlin -*F -+ 1 1.kt -test/_1Kt$kValue$1 -+ 2 1.kt -test/_1Kt$lParams$1$1 -*L -1#1,39:1 -33#2:40 -*E diff --git a/compiler/testData/codegen/boxInline/smap/defaultLambda/defaultLambdaInAnonymous.smap-nonseparate-compilation b/compiler/testData/codegen/boxInline/smap/defaultLambda/defaultLambdaInAnonymous.smap-nonseparate-compilation new file mode 100644 index 00000000000..aedfd40148c --- /dev/null +++ b/compiler/testData/codegen/boxInline/smap/defaultLambda/defaultLambdaInAnonymous.smap-nonseparate-compilation @@ -0,0 +1,82 @@ +// FILE: 1.kt +SMAP +1.kt +Kotlin +*S Kotlin +*F ++ 1 1.kt +test/_1Kt$lParams$1 +*L +1#1,40:1 +*E + +SMAP +1.kt +Kotlin +*S Kotlin +*F ++ 1 1.kt +test/_1Kt$lParams$1$1 ++ 2 1.kt +test/_1Kt +*L +1#1,40:1 +31#2:41 +*S KotlinDebug +*F ++ 1 1.kt +test/_1Kt$lParams$1$1 +*L +34#1:41 +*E + +SMAP +1.kt +Kotlin +*S Kotlin +*F ++ 1 1.kt +test/_1Kt$kValue$1 ++ 2 1.kt +test/_1Kt$lParams$1$1 +*L +1#1,40:1 +34#2:41 +*E + +SMAP +1.kt +Kotlin +*S Kotlin +*F ++ 1 1.kt +test/_1Kt$kValue$1 +*L +1#1,40:1 +*E + +// FILE: 2.kt +SMAP +2.kt +Kotlin +*S Kotlin +*F ++ 1 2.kt +_2Kt ++ 2 1.kt +test/_1Kt ++ 3 1.kt +test/_1Kt$lParams$1 +*L +1#1,46:1 +33#2,5:47 +34#3:52 +*S KotlinDebug +*F ++ 1 2.kt +_2Kt +*L +44#1:47,5 +44#1:52 +*E + diff --git a/compiler/testData/codegen/boxInline/smap/defaultLambda/defaultLambdaInAnonymous.smap-separate-compilation b/compiler/testData/codegen/boxInline/smap/defaultLambda/defaultLambdaInAnonymous.smap-separate-compilation new file mode 100644 index 00000000000..1cb7c6ea776 --- /dev/null +++ b/compiler/testData/codegen/boxInline/smap/defaultLambda/defaultLambdaInAnonymous.smap-separate-compilation @@ -0,0 +1,116 @@ +// FILE: 1.kt +SMAP +1.kt +Kotlin +*S Kotlin +*F ++ 1 1.kt +test/_1Kt$lParams$1 +*L +1#1,40:1 +*E + +SMAP +1.kt +Kotlin +*S Kotlin +*F ++ 1 1.kt +test/_1Kt$lParams$1$1 ++ 2 1.kt +test/_1Kt +*L +1#1,40:1 +31#2:41 +*S KotlinDebug +*F ++ 1 1.kt +test/_1Kt$lParams$1$1 +*L +34#1:41 +*E + +SMAP +1.kt +Kotlin +*S Kotlin +*F ++ 1 1.kt +test/_1Kt$kValue$1 ++ 2 1.kt +test/_1Kt$lParams$1$1 +*L +1#1,40:1 +34#2:41 +*E + +SMAP +1.kt +Kotlin +*S Kotlin +*F ++ 1 1.kt +test/_1Kt$kValue$1 +*L +1#1,40:1 +*E + +// FILE: 2.kt +SMAP +2.kt +Kotlin +*S Kotlin +*F ++ 1 2.kt +_2Kt ++ 2 1.kt +test/_1Kt ++ 3 1.kt +test/_1Kt$lParams$1 +*L +1#1,46:1 +33#2,5:47 +34#3:52 +*S KotlinDebug +*F ++ 1 2.kt +_2Kt +*L +44#1:47,5 +44#1:52 +*E + +SMAP +1.kt +Kotlin +*S Kotlin +*F ++ 1 1.kt +test/_1Kt$lParams$1$1 ++ 2 1.kt +test/_1Kt +*L +1#1,40:1 +31#2:41 +*S KotlinDebug +*F ++ 1 1.kt +test/_1Kt$lParams$1$1 +*L +34#1:41 +*E + +SMAP +1.kt +Kotlin +*S Kotlin +*F ++ 1 1.kt +test/_1Kt$kValue$1 ++ 2 1.kt +test/_1Kt$lParams$1$1 +*L +1#1,40:1 +34#2:41 +*E + diff --git a/compiler/testData/codegen/boxInline/smap/defaultLambda/inlinInDefault.kt b/compiler/testData/codegen/boxInline/smap/defaultLambda/inlinInDefault.kt index b6925a7206a..7c33590e546 100644 --- a/compiler/testData/codegen/boxInline/smap/defaultLambda/inlinInDefault.kt +++ b/compiler/testData/codegen/boxInline/smap/defaultLambda/inlinInDefault.kt @@ -1,6 +1,6 @@ +// SKIP_INLINE_CHECK_IN: lParams$default // FILE: 1.kt -// SKIP_INLINE_CHECK_IN: lParams$default package test //A lot of blank lines [Don't delete] @@ -44,52 +44,3 @@ fun box(): String { lParams() } } - -// FILE: 1.smap -SMAP -1.kt -Kotlin -*S Kotlin -*F -+ 1 1.kt -test/_1Kt$lParams$1 -+ 2 1.kt -test/_1Kt -*L -1#1,39:1 -30#2:40 -*S KotlinDebug -*F -+ 1 1.kt -test/_1Kt$lParams$1 -*L -33#1:40 -*E - -// FILE: 2.smap - -SMAP -2.kt -Kotlin -*S Kotlin -*F -+ 1 2.kt -_2Kt -+ 2 1.kt -test/_1Kt -+ 3 1.kt -test/_1Kt$lParams$1 -*L -1#1,10:1 -32#2,5:11 -30#2:17 -33#3:16 -*S KotlinDebug -*F -+ 1 2.kt -_2Kt -*L -6#1:11,5 -6#1:17 -6#1:16 -*E diff --git a/compiler/testData/codegen/boxInline/smap/defaultLambda/inlinInDefault.smap b/compiler/testData/codegen/boxInline/smap/defaultLambda/inlinInDefault.smap new file mode 100644 index 00000000000..ada13ad7614 --- /dev/null +++ b/compiler/testData/codegen/boxInline/smap/defaultLambda/inlinInDefault.smap @@ -0,0 +1,48 @@ +// FILE: 1.kt +SMAP +1.kt +Kotlin +*S Kotlin +*F ++ 1 1.kt +test/_1Kt$lParams$1 ++ 2 1.kt +test/_1Kt +*L +1#1,39:1 +30#2:40 +*S KotlinDebug +*F ++ 1 1.kt +test/_1Kt$lParams$1 +*L +33#1:40 +*E + +// FILE: 2.kt +SMAP +2.kt +Kotlin +*S Kotlin +*F ++ 1 2.kt +_2Kt ++ 2 1.kt +test/_1Kt ++ 3 1.kt +test/_1Kt$lParams$1 +*L +1#1,47:1 +32#2,5:48 +30#2:54 +33#3:53 +*S KotlinDebug +*F ++ 1 2.kt +_2Kt +*L +44#1:48,5 +44#1:54 +44#1:53 +*E + diff --git a/compiler/testData/codegen/boxInline/smap/defaultLambda/inlinInDefault2.kt b/compiler/testData/codegen/boxInline/smap/defaultLambda/inlinInDefault2.kt index 9deda9047a2..3419026722b 100644 --- a/compiler/testData/codegen/boxInline/smap/defaultLambda/inlinInDefault2.kt +++ b/compiler/testData/codegen/boxInline/smap/defaultLambda/inlinInDefault2.kt @@ -1,5 +1,5 @@ -// FILE: 1.kt // SKIP_INLINE_CHECK_IN: lParams$default +// FILE: 1.kt package test @@ -80,54 +80,3 @@ fun box(): String { lParams() } } - -// FILE: 1.smap -SMAP -1.kt -Kotlin -*S Kotlin -*F -+ 1 1.kt -test/_1Kt$lParams$1 -+ 2 1.kt -test/_1Kt -*L -1#1,75:1 -30#2:76 -*S KotlinDebug -*F -+ 1 1.kt -test/_1Kt$lParams$1 -*L -51#1:76 -*E - -// FILE: 2.smap - -SMAP -2.kt -Kotlin -*S Kotlin -*F -+ 1 2.kt -_2Kt -+ 2 1.kt -test/_1Kt -+ 3 1.kt -test/_1Kt$lParams$1 -*L -1#1,10:1 -32#2:11 -71#2,2:12 -30#2:15 -51#3:14 -*S KotlinDebug -*F -+ 1 2.kt -_2Kt -*L -6#1:11 -6#1:12,2 -6#1:15 -6#1:14 -*E diff --git a/compiler/testData/codegen/boxInline/smap/defaultLambda/inlinInDefault2.smap b/compiler/testData/codegen/boxInline/smap/defaultLambda/inlinInDefault2.smap new file mode 100644 index 00000000000..75af98ee40a --- /dev/null +++ b/compiler/testData/codegen/boxInline/smap/defaultLambda/inlinInDefault2.smap @@ -0,0 +1,50 @@ +// FILE: 1.kt +SMAP +1.kt +Kotlin +*S Kotlin +*F ++ 1 1.kt +test/_1Kt$lParams$1 ++ 2 1.kt +test/_1Kt +*L +1#1,75:1 +30#2:76 +*S KotlinDebug +*F ++ 1 1.kt +test/_1Kt$lParams$1 +*L +51#1:76 +*E + +// FILE: 2.kt +SMAP +2.kt +Kotlin +*S Kotlin +*F ++ 1 2.kt +_2Kt ++ 2 1.kt +test/_1Kt ++ 3 1.kt +test/_1Kt$lParams$1 +*L +1#1,83:1 +32#2:84 +71#2,2:85 +30#2:88 +51#3:87 +*S KotlinDebug +*F ++ 1 2.kt +_2Kt +*L +80#1:84 +80#1:85,2 +80#1:88 +80#1:87 +*E + diff --git a/compiler/testData/codegen/boxInline/smap/defaultLambda/inlineAnonymousInDefault.kt b/compiler/testData/codegen/boxInline/smap/defaultLambda/inlineAnonymousInDefault.kt index a5496dd3c34..496d4812b0f 100644 --- a/compiler/testData/codegen/boxInline/smap/defaultLambda/inlineAnonymousInDefault.kt +++ b/compiler/testData/codegen/boxInline/smap/defaultLambda/inlineAnonymousInDefault.kt @@ -1,7 +1,8 @@ +// SEPARATE_SMAP_DUMPS +// SKIP_INLINE_CHECK_IN: lParams$default // IGNORE_BACKEND: JS // FILE: 1.kt -// SKIP_INLINE_CHECK_IN: lParams$default package test //A lot of blank lines [Don't delete] @@ -43,119 +44,3 @@ import test.* fun box(): String { return lParams() } - -// FILE: 1.smap -SMAP -1.kt -Kotlin -*S Kotlin -*F -+ 1 1.kt -test/_1Kt$lParams$1 -+ 2 1.kt -test/_1Kt -*L -1#1,40:1 -31#2:41 -*S KotlinDebug -*F -+ 1 1.kt -test/_1Kt$lParams$1 -*L -34#1:41 -*E - -SMAP -1.kt -Kotlin -*S Kotlin -*F -+ 1 1.kt -test/_1Kt$kValue$1 -+ 2 1.kt -test/_1Kt$lParams$1 -*L -1#1,40:1 -34#2:41 -*E - -SMAP -1.kt -Kotlin -*S Kotlin -*F -+ 1 1.kt -test/_1Kt$kValue$1 -*L -1#1,40:1 -*E - -// FILE: 2.smap-nonseparate-compilation - -SMAP -2.kt -Kotlin -*S Kotlin -*F -+ 1 2.kt -_2Kt -+ 2 1.kt -test/_1Kt -+ 3 1.kt -test/_1Kt$lParams$1 -*L -1#1,8:1 -33#2,5:9 -31#2:15 -34#3:14 -*S KotlinDebug -*F -+ 1 2.kt -_2Kt -*L -5#1:9,5 -5#1:15 -5#1:14 -*E - -// FILE: 2.smap-separate-compilation - -SMAP -2.kt -Kotlin -*S Kotlin -*F -+ 1 2.kt -_2Kt -+ 2 1.kt -test/_1Kt -+ 3 1.kt -test/_1Kt$lParams$1 -*L -1#1,8:1 -33#2,5:9 -31#2:15 -34#3:14 -*S KotlinDebug -*F -+ 1 2.kt -_2Kt -*L -5#1:9,5 -5#1:15 -5#1:14 -*E - -SMAP -1.kt -Kotlin -*S Kotlin -*F -+ 1 1.kt -test/_1Kt$kValue$1 -+ 2 1.kt -test/_1Kt$lParams$1 -*L -1#1,40:1 -34#2:41 -*E diff --git a/compiler/testData/codegen/boxInline/smap/defaultLambda/inlineAnonymousInDefault.smap-nonseparate-compilation b/compiler/testData/codegen/boxInline/smap/defaultLambda/inlineAnonymousInDefault.smap-nonseparate-compilation new file mode 100644 index 00000000000..0fad28d53a7 --- /dev/null +++ b/compiler/testData/codegen/boxInline/smap/defaultLambda/inlineAnonymousInDefault.smap-nonseparate-compilation @@ -0,0 +1,73 @@ +// FILE: 1.kt +SMAP +1.kt +Kotlin +*S Kotlin +*F ++ 1 1.kt +test/_1Kt$lParams$1 ++ 2 1.kt +test/_1Kt +*L +1#1,41:1 +32#2:42 +*S KotlinDebug +*F ++ 1 1.kt +test/_1Kt$lParams$1 +*L +35#1:42 +*E + +SMAP +1.kt +Kotlin +*S Kotlin +*F ++ 1 1.kt +test/_1Kt$kValue$1 ++ 2 1.kt +test/_1Kt$lParams$1 +*L +1#1,41:1 +35#2:42 +*E + +SMAP +1.kt +Kotlin +*S Kotlin +*F ++ 1 1.kt +test/_1Kt$kValue$1 +*L +1#1,41:1 +*E + +// FILE: 2.kt +SMAP +2.kt +Kotlin +*S Kotlin +*F ++ 1 2.kt +_2Kt ++ 2 1.kt +test/_1Kt ++ 3 1.kt +test/_1Kt$lParams$1 +*L +1#1,47:1 +34#2,5:48 +32#2:54 +35#3:53 +*S KotlinDebug +*F ++ 1 2.kt +_2Kt +*L +45#1:48,5 +45#1:54 +45#1:53 +*E + diff --git a/compiler/testData/codegen/boxInline/smap/defaultLambda/inlineAnonymousInDefault.smap-separate-compilation b/compiler/testData/codegen/boxInline/smap/defaultLambda/inlineAnonymousInDefault.smap-separate-compilation new file mode 100644 index 00000000000..de4af09ebf8 --- /dev/null +++ b/compiler/testData/codegen/boxInline/smap/defaultLambda/inlineAnonymousInDefault.smap-separate-compilation @@ -0,0 +1,87 @@ +// FILE: 1.kt +SMAP +1.kt +Kotlin +*S Kotlin +*F ++ 1 1.kt +test/_1Kt$lParams$1 ++ 2 1.kt +test/_1Kt +*L +1#1,41:1 +32#2:42 +*S KotlinDebug +*F ++ 1 1.kt +test/_1Kt$lParams$1 +*L +35#1:42 +*E + +SMAP +1.kt +Kotlin +*S Kotlin +*F ++ 1 1.kt +test/_1Kt$kValue$1 ++ 2 1.kt +test/_1Kt$lParams$1 +*L +1#1,41:1 +35#2:42 +*E + +SMAP +1.kt +Kotlin +*S Kotlin +*F ++ 1 1.kt +test/_1Kt$kValue$1 +*L +1#1,41:1 +*E + +// FILE: 2.kt +SMAP +2.kt +Kotlin +*S Kotlin +*F ++ 1 2.kt +_2Kt ++ 2 1.kt +test/_1Kt ++ 3 1.kt +test/_1Kt$lParams$1 +*L +1#1,47:1 +34#2,5:48 +32#2:54 +35#3:53 +*S KotlinDebug +*F ++ 1 2.kt +_2Kt +*L +45#1:48,5 +45#1:54 +45#1:53 +*E + +SMAP +1.kt +Kotlin +*S Kotlin +*F ++ 1 1.kt +test/_1Kt$kValue$1 ++ 2 1.kt +test/_1Kt$lParams$1 +*L +1#1,41:1 +35#2:42 +*E + diff --git a/compiler/testData/codegen/boxInline/smap/defaultLambda/inlineAnonymousInDefault2.kt b/compiler/testData/codegen/boxInline/smap/defaultLambda/inlineAnonymousInDefault2.kt index e4a0d619da3..54ad48f24e1 100644 --- a/compiler/testData/codegen/boxInline/smap/defaultLambda/inlineAnonymousInDefault2.kt +++ b/compiler/testData/codegen/boxInline/smap/defaultLambda/inlineAnonymousInDefault2.kt @@ -1,7 +1,8 @@ +// SEPARATE_SMAP_DUMPS +// SKIP_INLINE_CHECK_IN: lParams$default // IGNORE_BACKEND: JS // FILE: 1.kt -// SKIP_INLINE_CHECK_IN: lParams$default package test //A lot of blank lines [Don't delete] @@ -45,118 +46,3 @@ fun box(): String { lParams() } } - -// FILE: 1.smap -SMAP -1.kt -Kotlin -*S Kotlin -*F -+ 1 1.kt -test/_1Kt$lParams$1 -+ 2 1.kt -test/_1Kt -*L -1#1,40:1 -31#2:41 -*S KotlinDebug -*F -+ 1 1.kt -test/_1Kt$lParams$1 -*L -34#1:41 -*E - -SMAP -1.kt -Kotlin -*S Kotlin -*F -+ 1 1.kt -test/_1Kt$kValue$1 -+ 2 1.kt -test/_1Kt$lParams$1 -*L -1#1,40:1 -34#2:41 -*E - -SMAP -1.kt -Kotlin -*S Kotlin -*F -+ 1 1.kt -test/_1Kt$kValue$1 -*L -1#1,40:1 -*E - -// FILE: 2.smap-nonseparate-compilation - -SMAP -2.kt -Kotlin -*S Kotlin -*F -+ 1 2.kt -_2Kt -+ 2 1.kt -test/_1Kt -+ 3 1.kt -test/_1Kt$lParams$1 -*L -1#1,10:1 -33#2,5:11 -31#2:17 -34#3:16 -*S KotlinDebug -*F -+ 1 2.kt -_2Kt -*L -6#1:11,5 -6#1:17 -6#1:16 -*E - -// FILE: 2.smap-separate-compilation -SMAP -2.kt -Kotlin -*S Kotlin -*F -+ 1 2.kt -_2Kt -+ 2 1.kt -test/_1Kt -+ 3 1.kt -test/_1Kt$lParams$1 -*L -1#1,10:1 -33#2,5:11 -31#2:17 -34#3:16 -*S KotlinDebug -*F -+ 1 2.kt -_2Kt -*L -6#1:11,5 -6#1:17 -6#1:16 -*E - -SMAP -1.kt -Kotlin -*S Kotlin -*F -+ 1 1.kt -test/_1Kt$kValue$1 -+ 2 1.kt -test/_1Kt$lParams$1 -*L -1#1,40:1 -34#2:41 -*E diff --git a/compiler/testData/codegen/boxInline/smap/defaultLambda/inlineAnonymousInDefault2.smap-nonseparate-compilation b/compiler/testData/codegen/boxInline/smap/defaultLambda/inlineAnonymousInDefault2.smap-nonseparate-compilation new file mode 100644 index 00000000000..4cf0e7993a8 --- /dev/null +++ b/compiler/testData/codegen/boxInline/smap/defaultLambda/inlineAnonymousInDefault2.smap-nonseparate-compilation @@ -0,0 +1,73 @@ +// FILE: 1.kt +SMAP +1.kt +Kotlin +*S Kotlin +*F ++ 1 1.kt +test/_1Kt$lParams$1 ++ 2 1.kt +test/_1Kt +*L +1#1,41:1 +32#2:42 +*S KotlinDebug +*F ++ 1 1.kt +test/_1Kt$lParams$1 +*L +35#1:42 +*E + +SMAP +1.kt +Kotlin +*S Kotlin +*F ++ 1 1.kt +test/_1Kt$kValue$1 ++ 2 1.kt +test/_1Kt$lParams$1 +*L +1#1,41:1 +35#2:42 +*E + +SMAP +1.kt +Kotlin +*S Kotlin +*F ++ 1 1.kt +test/_1Kt$kValue$1 +*L +1#1,41:1 +*E + +// FILE: 2.kt +SMAP +2.kt +Kotlin +*S Kotlin +*F ++ 1 2.kt +_2Kt ++ 2 1.kt +test/_1Kt ++ 3 1.kt +test/_1Kt$lParams$1 +*L +1#1,49:1 +34#2,5:50 +32#2:56 +35#3:55 +*S KotlinDebug +*F ++ 1 2.kt +_2Kt +*L +46#1:50,5 +46#1:56 +46#1:55 +*E + diff --git a/compiler/testData/codegen/boxInline/smap/defaultLambda/inlineAnonymousInDefault2.smap-separate-compilation b/compiler/testData/codegen/boxInline/smap/defaultLambda/inlineAnonymousInDefault2.smap-separate-compilation new file mode 100644 index 00000000000..4cac326cfa2 --- /dev/null +++ b/compiler/testData/codegen/boxInline/smap/defaultLambda/inlineAnonymousInDefault2.smap-separate-compilation @@ -0,0 +1,87 @@ +// FILE: 1.kt +SMAP +1.kt +Kotlin +*S Kotlin +*F ++ 1 1.kt +test/_1Kt$lParams$1 ++ 2 1.kt +test/_1Kt +*L +1#1,41:1 +32#2:42 +*S KotlinDebug +*F ++ 1 1.kt +test/_1Kt$lParams$1 +*L +35#1:42 +*E + +SMAP +1.kt +Kotlin +*S Kotlin +*F ++ 1 1.kt +test/_1Kt$kValue$1 ++ 2 1.kt +test/_1Kt$lParams$1 +*L +1#1,41:1 +35#2:42 +*E + +SMAP +1.kt +Kotlin +*S Kotlin +*F ++ 1 1.kt +test/_1Kt$kValue$1 +*L +1#1,41:1 +*E + +// FILE: 2.kt +SMAP +2.kt +Kotlin +*S Kotlin +*F ++ 1 2.kt +_2Kt ++ 2 1.kt +test/_1Kt ++ 3 1.kt +test/_1Kt$lParams$1 +*L +1#1,49:1 +34#2,5:50 +32#2:56 +35#3:55 +*S KotlinDebug +*F ++ 1 2.kt +_2Kt +*L +46#1:50,5 +46#1:56 +46#1:55 +*E + +SMAP +1.kt +Kotlin +*S Kotlin +*F ++ 1 1.kt +test/_1Kt$kValue$1 ++ 2 1.kt +test/_1Kt$lParams$1 +*L +1#1,41:1 +35#2:42 +*E + diff --git a/compiler/testData/codegen/boxInline/smap/defaultLambda/kt21827.kt b/compiler/testData/codegen/boxInline/smap/defaultLambda/kt21827.kt index 793f1f6f49d..968cb053ee1 100644 --- a/compiler/testData/codegen/boxInline/smap/defaultLambda/kt21827.kt +++ b/compiler/testData/codegen/boxInline/smap/defaultLambda/kt21827.kt @@ -1,6 +1,6 @@ +// SKIP_INLINE_CHECK_IN: lParams$default // FILE: 1.kt -// SKIP_INLINE_CHECK_IN: lParams$default package test //A lot of blank lines [Don't delete] @@ -43,41 +43,3 @@ fun box(): String { lParams() } } - -// FILE: 1.smap -SMAP -1.kt -Kotlin -*S Kotlin -*F -+ 1 1.kt -test/_1Kt$lParams$1 -*L -1#1,38:1 -*E - -// FILE: 2.smap - -SMAP -2.kt -Kotlin -*S Kotlin -*F -+ 1 2.kt -_2Kt -+ 2 1.kt -test/_1Kt -+ 3 1.kt -test/_1Kt$lParams$1 -*L -1#1,10:1 -31#2,5:11 -32#3:16 -*S KotlinDebug -*F -+ 1 2.kt -_2Kt -*L -6#1:11,5 -6#1:16 -*E diff --git a/compiler/testData/codegen/boxInline/smap/defaultLambda/kt21827.smap b/compiler/testData/codegen/boxInline/smap/defaultLambda/kt21827.smap new file mode 100644 index 00000000000..dc5b3ef1fde --- /dev/null +++ b/compiler/testData/codegen/boxInline/smap/defaultLambda/kt21827.smap @@ -0,0 +1,37 @@ +// FILE: 1.kt +SMAP +1.kt +Kotlin +*S Kotlin +*F ++ 1 1.kt +test/_1Kt$lParams$1 +*L +1#1,38:1 +*E + +// FILE: 2.kt +SMAP +2.kt +Kotlin +*S Kotlin +*F ++ 1 2.kt +_2Kt ++ 2 1.kt +test/_1Kt ++ 3 1.kt +test/_1Kt$lParams$1 +*L +1#1,46:1 +31#2,5:47 +32#3:52 +*S KotlinDebug +*F ++ 1 2.kt +_2Kt +*L +43#1:47,5 +43#1:52 +*E + diff --git a/compiler/testData/codegen/boxInline/smap/defaultLambda/nested.kt b/compiler/testData/codegen/boxInline/smap/defaultLambda/nested.kt index ba04e586364..3e6db989d49 100644 --- a/compiler/testData/codegen/boxInline/smap/defaultLambda/nested.kt +++ b/compiler/testData/codegen/boxInline/smap/defaultLambda/nested.kt @@ -1,6 +1,6 @@ +// SKIP_INLINE_CHECK_IN: inlineFun$default // FILE: 1.kt -// SKIP_INLINE_CHECK_IN: inlineFun$default package test @@ -17,62 +17,3 @@ import test.* fun box(): String { return inlineFun("OK") } - -// FILE: 1.smap -SMAP -1.kt -Kotlin -*S Kotlin -*F -+ 1 1.kt -test/_1Kt$inlineFun$2 -*L -1#1,13:1 -*E - -SMAP -1.kt -Kotlin -*S Kotlin -*F -+ 1 1.kt -test/_1Kt$inlineFun$1 -*L -1#1,13:1 -*E - -// FILE: 2.smap - -SMAP -2.kt -Kotlin -*S Kotlin -*F -+ 1 2.kt -_2Kt -+ 2 1.kt -test/_1Kt -*L -1#1,9:1 -7#2,2:10 -*S KotlinDebug -*F -+ 1 2.kt -_2Kt -*L -6#1:10,2 -*E - -SMAP -1.kt -Kotlin -*S Kotlin -*F -+ 1 1.kt -test/_1Kt$inlineFun$2 -+ 2 1.kt -test/_1Kt$inlineFun$1 -*L -1#1,13:1 -7#2:14 -*E diff --git a/compiler/testData/codegen/boxInline/smap/defaultLambda/nested.smap b/compiler/testData/codegen/boxInline/smap/defaultLambda/nested.smap new file mode 100644 index 00000000000..cbebe8d2951 --- /dev/null +++ b/compiler/testData/codegen/boxInline/smap/defaultLambda/nested.smap @@ -0,0 +1,58 @@ +// FILE: 1.kt +SMAP +1.kt +Kotlin +*S Kotlin +*F ++ 1 1.kt +test/_1Kt$inlineFun$2 +*L +1#1,13:1 +*E + +SMAP +1.kt +Kotlin +*S Kotlin +*F ++ 1 1.kt +test/_1Kt$inlineFun$1 +*L +1#1,13:1 +*E + +// FILE: 2.kt +SMAP +2.kt +Kotlin +*S Kotlin +*F ++ 1 2.kt +_2Kt ++ 2 1.kt +test/_1Kt +*L +1#1,20:1 +7#2,2:21 +*S KotlinDebug +*F ++ 1 2.kt +_2Kt +*L +18#1:21,2 +*E + +SMAP +1.kt +Kotlin +*S Kotlin +*F ++ 1 1.kt +test/_1Kt$inlineFun$2 ++ 2 1.kt +test/_1Kt$inlineFun$1 +*L +1#1,13:1 +7#2:14 +*E + diff --git a/compiler/testData/codegen/boxInline/smap/defaultLambda/simple.kt b/compiler/testData/codegen/boxInline/smap/defaultLambda/simple.kt index e54918f3aaa..4aa15847380 100644 --- a/compiler/testData/codegen/boxInline/smap/defaultLambda/simple.kt +++ b/compiler/testData/codegen/boxInline/smap/defaultLambda/simple.kt @@ -1,6 +1,6 @@ +// SKIP_INLINE_CHECK_IN: inlineFun$default // FILE: 1.kt -// SKIP_INLINE_CHECK_IN: inlineFun$default package test @@ -15,41 +15,3 @@ import test.* fun box(): String { return inlineFun("OK") } - -// FILE: 1.smap -SMAP -1.kt -Kotlin -*S Kotlin -*F -+ 1 1.kt -test/_1Kt$inlineFun$1 -*L -1#1,11:1 -*E - -// FILE: 2.smap - -SMAP -2.kt -Kotlin -*S Kotlin -*F -+ 1 2.kt -_2Kt -+ 2 1.kt -test/_1Kt -+ 3 1.kt -test/_1Kt$inlineFun$1 -*L -1#1,9:1 -7#2,2:10 -7#3:12 -*S KotlinDebug -*F -+ 1 2.kt -_2Kt -*L -6#1:10,2 -6#1:12 -*E diff --git a/compiler/testData/codegen/boxInline/smap/defaultLambda/simple.smap b/compiler/testData/codegen/boxInline/smap/defaultLambda/simple.smap new file mode 100644 index 00000000000..795617691f5 --- /dev/null +++ b/compiler/testData/codegen/boxInline/smap/defaultLambda/simple.smap @@ -0,0 +1,37 @@ +// FILE: 1.kt +SMAP +1.kt +Kotlin +*S Kotlin +*F ++ 1 1.kt +test/_1Kt$inlineFun$1 +*L +1#1,11:1 +*E + +// FILE: 2.kt +SMAP +2.kt +Kotlin +*S Kotlin +*F ++ 1 2.kt +_2Kt ++ 2 1.kt +test/_1Kt ++ 3 1.kt +test/_1Kt$inlineFun$1 +*L +1#1,18:1 +7#2,2:19 +7#3:21 +*S KotlinDebug +*F ++ 1 2.kt +_2Kt +*L +16#1:19,2 +16#1:21 +*E + diff --git a/compiler/testData/codegen/boxInline/smap/defaultLambda/simple2.kt b/compiler/testData/codegen/boxInline/smap/defaultLambda/simple2.kt index 82d37489a0e..da3c51de878 100644 --- a/compiler/testData/codegen/boxInline/smap/defaultLambda/simple2.kt +++ b/compiler/testData/codegen/boxInline/smap/defaultLambda/simple2.kt @@ -1,6 +1,6 @@ +// SKIP_INLINE_CHECK_IN: lParams$default // FILE: 1.kt -// SKIP_INLINE_CHECK_IN: lParams$default package test //A lot of blank lines [Don't delete] @@ -41,41 +41,3 @@ import test.* fun box(): String { return lParams() } - -// FILE: 1.smap -SMAP -1.kt -Kotlin -*S Kotlin -*F -+ 1 1.kt -test/_1Kt$lParams$1 -*L -1#1,38:1 -*E - -// FILE: 2.smap - -SMAP -2.kt -Kotlin -*S Kotlin -*F -+ 1 2.kt -_2Kt -+ 2 1.kt -test/_1Kt -+ 3 1.kt -test/_1Kt$lParams$1 -*L -1#1,8:1 -31#2,5:9 -32#3:14 -*S KotlinDebug -*F -+ 1 2.kt -_2Kt -*L -5#1:9,5 -5#1:14 -*E diff --git a/compiler/testData/codegen/boxInline/smap/defaultLambda/simple2.smap b/compiler/testData/codegen/boxInline/smap/defaultLambda/simple2.smap new file mode 100644 index 00000000000..7b1f7f7ee59 --- /dev/null +++ b/compiler/testData/codegen/boxInline/smap/defaultLambda/simple2.smap @@ -0,0 +1,37 @@ +// FILE: 1.kt +SMAP +1.kt +Kotlin +*S Kotlin +*F ++ 1 1.kt +test/_1Kt$lParams$1 +*L +1#1,38:1 +*E + +// FILE: 2.kt +SMAP +2.kt +Kotlin +*S Kotlin +*F ++ 1 2.kt +_2Kt ++ 2 1.kt +test/_1Kt ++ 3 1.kt +test/_1Kt$lParams$1 +*L +1#1,44:1 +31#2,5:45 +32#3:50 +*S KotlinDebug +*F ++ 1 2.kt +_2Kt +*L +42#1:45,5 +42#1:50 +*E + diff --git a/compiler/testData/codegen/boxInline/smap/forInline.kt b/compiler/testData/codegen/boxInline/smap/forInline.kt index 67840ef676f..52080658ba9 100644 --- a/compiler/testData/codegen/boxInline/smap/forInline.kt +++ b/compiler/testData/codegen/boxInline/smap/forInline.kt @@ -35,27 +35,3 @@ class SomeIterator { return "OK" } } - - -// FILE: 1.smap - -// FILE: 2.smap -SMAP -2.kt -Kotlin -*S Kotlin -*F -+ 1 2.kt -_2Kt -+ 2 2.kt -SomeIterator -*L -1#1,31:1 -21#2,6:32 -*S KotlinDebug -*F -+ 1 2.kt -_2Kt -*L -5#1:32,6 -*E \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/smap/forInline.smap b/compiler/testData/codegen/boxInline/smap/forInline.smap new file mode 100644 index 00000000000..338ddf0a9d0 --- /dev/null +++ b/compiler/testData/codegen/boxInline/smap/forInline.smap @@ -0,0 +1,22 @@ +// FILE: 1.kt + +// FILE: 2.kt +SMAP +2.kt +Kotlin +*S Kotlin +*F ++ 1 2.kt +_2Kt ++ 2 2.kt +SomeIterator +*L +1#1,38:1 +30#2,6:39 +*S KotlinDebug +*F ++ 1 2.kt +_2Kt +*L +14#1:39,6 +*E diff --git a/compiler/testData/codegen/boxInline/smap/inlineOnly/noSmap.kt b/compiler/testData/codegen/boxInline/smap/inlineOnly/noSmap.kt index a8668f4f105..0eb0b514c47 100644 --- a/compiler/testData/codegen/boxInline/smap/inlineOnly/noSmap.kt +++ b/compiler/testData/codegen/boxInline/smap/inlineOnly/noSmap.kt @@ -1,5 +1,5 @@ -// FILE: 1.kt // WITH_RUNTIME +// FILE: 1.kt // KJS_WITH_FULL_RUNTIME package test inline fun stub() { @@ -11,5 +11,3 @@ inline fun stub() { fun box(): String { return "KO".reversed() } - -// FILE: 2.smap diff --git a/compiler/testData/codegen/boxInline/smap/inlineOnly/noSmap.smap b/compiler/testData/codegen/boxInline/smap/inlineOnly/noSmap.smap new file mode 100644 index 00000000000..7d422a985bc --- /dev/null +++ b/compiler/testData/codegen/boxInline/smap/inlineOnly/noSmap.smap @@ -0,0 +1,3 @@ +// FILE: 1.kt + +// FILE: 2.kt diff --git a/compiler/testData/codegen/boxInline/smap/inlineOnly/noSmapWithProperty.kt b/compiler/testData/codegen/boxInline/smap/inlineOnly/noSmapWithProperty.kt index 16a2e6e5eb7..f04188277c9 100644 --- a/compiler/testData/codegen/boxInline/smap/inlineOnly/noSmapWithProperty.kt +++ b/compiler/testData/codegen/boxInline/smap/inlineOnly/noSmapWithProperty.kt @@ -1,5 +1,6 @@ -// FILE: 1.kt +// IGNORE_FIR_DIAGNOSTICS // WITH_RUNTIME +// FILE: 1.kt package test inline fun stub() { @@ -16,5 +17,3 @@ import test.* fun box(): String { return prop } - -// FILE: 2.smap diff --git a/compiler/testData/codegen/boxInline/smap/inlineOnly/noSmapWithProperty.smap b/compiler/testData/codegen/boxInline/smap/inlineOnly/noSmapWithProperty.smap new file mode 100644 index 00000000000..7d422a985bc --- /dev/null +++ b/compiler/testData/codegen/boxInline/smap/inlineOnly/noSmapWithProperty.smap @@ -0,0 +1,3 @@ +// FILE: 1.kt + +// FILE: 2.kt diff --git a/compiler/testData/codegen/boxInline/smap/inlineOnly/reified.kt b/compiler/testData/codegen/boxInline/smap/inlineOnly/reified.kt index c12d2cdc6bf..3b6195aad79 100644 --- a/compiler/testData/codegen/boxInline/smap/inlineOnly/reified.kt +++ b/compiler/testData/codegen/boxInline/smap/inlineOnly/reified.kt @@ -1,6 +1,6 @@ +// WITH_REFLECT // TARGET_BACKEND: JVM // FILE: 1.kt -// WITH_REFLECT package test inline fun className() = T::class.java.simpleName @@ -15,25 +15,3 @@ fun box(): String { return "OK" } - -// FILE: 2.smap - -SMAP -2.kt -Kotlin -*S Kotlin -*F -+ 1 2.kt -_2Kt -+ 2 1.kt -test/_1Kt -*L -1#1,12:1 -6#2:13 -*S KotlinDebug -*F -+ 1 2.kt -_2Kt -*L -6#1:13 -*E diff --git a/compiler/testData/codegen/boxInline/smap/inlineOnly/reified.smap b/compiler/testData/codegen/boxInline/smap/inlineOnly/reified.smap new file mode 100644 index 00000000000..240a3a64407 --- /dev/null +++ b/compiler/testData/codegen/boxInline/smap/inlineOnly/reified.smap @@ -0,0 +1,22 @@ +// FILE: 1.kt + +// FILE: 2.kt +SMAP +2.kt +Kotlin +*S Kotlin +*F ++ 1 2.kt +_2Kt ++ 2 1.kt +test/_1Kt +*L +1#1,18:1 +6#2:19 +*S KotlinDebug +*F ++ 1 2.kt +_2Kt +*L +13#1:19 +*E diff --git a/compiler/testData/codegen/boxInline/smap/inlineOnly/reifiedProperty.kt b/compiler/testData/codegen/boxInline/smap/inlineOnly/reifiedProperty.kt index cee0ed27120..53789be38bc 100644 --- a/compiler/testData/codegen/boxInline/smap/inlineOnly/reifiedProperty.kt +++ b/compiler/testData/codegen/boxInline/smap/inlineOnly/reifiedProperty.kt @@ -1,6 +1,6 @@ +// WITH_REFLECT // TARGET_BACKEND: JVM // FILE: 1.kt -// WITH_REFLECT package test inline val T.className: String; get() = T::class.java.simpleName @@ -15,25 +15,3 @@ fun box(): String { return "OK" } - -// FILE: 2.smap - -SMAP -2.kt -Kotlin -*S Kotlin -*F -+ 1 2.kt -_2Kt -+ 2 1.kt -test/_1Kt -*L -1#1,12:1 -6#2:13 -*S KotlinDebug -*F -+ 1 2.kt -_2Kt -*L -6#1:13 -*E diff --git a/compiler/testData/codegen/boxInline/smap/inlineOnly/reifiedProperty.smap b/compiler/testData/codegen/boxInline/smap/inlineOnly/reifiedProperty.smap new file mode 100644 index 00000000000..cee1589aa7f --- /dev/null +++ b/compiler/testData/codegen/boxInline/smap/inlineOnly/reifiedProperty.smap @@ -0,0 +1,23 @@ +// FILE: 1.kt + +// FILE: 2.kt +SMAP +2.kt +Kotlin +*S Kotlin +*F ++ 1 2.kt +_2Kt ++ 2 1.kt +test/_1Kt +*L +1#1,18:1 +6#2:19 +*S KotlinDebug +*F ++ 1 2.kt +_2Kt +*L +13#1:19 +*E + diff --git a/compiler/testData/codegen/boxInline/smap/inlineOnly/stdlibInlineOnly.kt b/compiler/testData/codegen/boxInline/smap/inlineOnly/stdlibInlineOnly.kt index 476266b4e50..18874b70d92 100644 --- a/compiler/testData/codegen/boxInline/smap/inlineOnly/stdlibInlineOnly.kt +++ b/compiler/testData/codegen/boxInline/smap/inlineOnly/stdlibInlineOnly.kt @@ -1,3 +1,4 @@ +// IGNORE_FIR_DIAGNOSTICS // FILE: 1.kt package test @@ -18,6 +19,5 @@ fun box(): String { }) } -// FILE: 2.smap // See KT-23064 for the problem, InlineOnlySmapSkipper for an explanation, and // `stdlibInlineOnlyOneLine.kt` for the case where something should actually happen. diff --git a/compiler/testData/codegen/boxInline/smap/inlineOnly/stdlibInlineOnly.smap b/compiler/testData/codegen/boxInline/smap/inlineOnly/stdlibInlineOnly.smap new file mode 100644 index 00000000000..7d422a985bc --- /dev/null +++ b/compiler/testData/codegen/boxInline/smap/inlineOnly/stdlibInlineOnly.smap @@ -0,0 +1,3 @@ +// FILE: 1.kt + +// FILE: 2.kt diff --git a/compiler/testData/codegen/boxInline/smap/inlineOnly/stdlibInlineOnlyOneLine.kt b/compiler/testData/codegen/boxInline/smap/inlineOnly/stdlibInlineOnlyOneLine.kt index f5d8378e8b3..8c19968808c 100644 --- a/compiler/testData/codegen/boxInline/smap/inlineOnly/stdlibInlineOnlyOneLine.kt +++ b/compiler/testData/codegen/boxInline/smap/inlineOnly/stdlibInlineOnlyOneLine.kt @@ -1,3 +1,4 @@ +// IGNORE_FIR_DIAGNOSTICS // FILE: 1.kt package test @@ -13,18 +14,4 @@ fun box(): String { return "O".myLet(fun (it: String): String { return it + k }) } -// FILE: 2.smap // See KT-23064 for the problem and InlineOnlySmapSkipper for an explanation. -SMAP -2.kt -Kotlin -*S Kotlin -*F -+ 1 2.kt -_2Kt -+ 2 fake.kt -kotlin/jvm/internal/FakeKt -*L -1#1,9:1 -1#2:10 -*E diff --git a/compiler/testData/codegen/boxInline/smap/inlineOnly/stdlibInlineOnlyOneLine.smap b/compiler/testData/codegen/boxInline/smap/inlineOnly/stdlibInlineOnlyOneLine.smap new file mode 100644 index 00000000000..e567c5c3c4a --- /dev/null +++ b/compiler/testData/codegen/boxInline/smap/inlineOnly/stdlibInlineOnlyOneLine.smap @@ -0,0 +1,16 @@ +// FILE: 1.kt + +// FILE: 2.kt +SMAP +2.kt +Kotlin +*S Kotlin +*F ++ 1 2.kt +_2Kt ++ 2 fake.kt +kotlin/jvm/internal/FakeKt +*L +1#1,18:1 +1#2:19 +*E diff --git a/compiler/testData/codegen/boxInline/smap/interleavedFiles.kt b/compiler/testData/codegen/boxInline/smap/interleavedFiles.kt index 0ad34b218a5..179dbcc4995 100644 --- a/compiler/testData/codegen/boxInline/smap/interleavedFiles.kt +++ b/compiler/testData/codegen/boxInline/smap/interleavedFiles.kt @@ -19,37 +19,3 @@ fun box(): String { return "OK" } -// FILE: 1.smap - -// FILE: 2.smap -SMAP -2.kt -Kotlin -*S Kotlin -*F -+ 1 2.kt -_2Kt -+ 2 1.kt -test/_1Kt -*L -1#1,17:1 -4#1:19 -7#1:21 -8#1:23 -4#1,7:24 -4#2:18 -4#2:20 -4#2:22 -*S KotlinDebug -*F -+ 1 2.kt -_2Kt -*L -8#1:19 -13#1:21 -13#1:23 -13#1:24,7 -7#1:18 -9#1:20 -13#1:22 -*E diff --git a/compiler/testData/codegen/boxInline/smap/interleavedFiles.smap b/compiler/testData/codegen/boxInline/smap/interleavedFiles.smap new file mode 100644 index 00000000000..4faa5cbf2ff --- /dev/null +++ b/compiler/testData/codegen/boxInline/smap/interleavedFiles.smap @@ -0,0 +1,35 @@ +// FILE: 1.kt + +// FILE: 2.kt +SMAP +2.kt +Kotlin +*S Kotlin +*F ++ 1 2.kt +_2Kt ++ 2 1.kt +test/_1Kt +*L +1#1,22:1 +9#1:24 +12#1:26 +13#1:28 +9#1,7:29 +4#2:23 +4#2:25 +4#2:27 +*S KotlinDebug +*F ++ 1 2.kt +_2Kt +*L +13#1:24 +18#1:26 +18#1:28 +18#1:29,7 +12#1:23 +14#1:25 +18#1:27 +*E + diff --git a/compiler/testData/codegen/boxInline/smap/kt23369.kt b/compiler/testData/codegen/boxInline/smap/kt23369.kt index ad4dc7aacb1..bf35526cf27 100644 --- a/compiler/testData/codegen/boxInline/smap/kt23369.kt +++ b/compiler/testData/codegen/boxInline/smap/kt23369.kt @@ -1,4 +1,3 @@ - // FILE: 1+a.kt package test @@ -13,27 +12,3 @@ import test.* fun box(): String { return inlineFun { "OK" } } - -// FILE: 1+a.smap - -// FILE: 2.smap - -SMAP -2.kt -Kotlin -*S Kotlin -*F -+ 1 2.kt -_2Kt -+ 2 1+a.kt -test/_1_aKt -*L -1#1,8:1 -7#2:9 -*S KotlinDebug -*F -+ 1 2.kt -_2Kt -*L -5#1:9 -*E diff --git a/compiler/testData/codegen/boxInline/smap/kt23369.smap b/compiler/testData/codegen/boxInline/smap/kt23369.smap new file mode 100644 index 00000000000..62b73bef34c --- /dev/null +++ b/compiler/testData/codegen/boxInline/smap/kt23369.smap @@ -0,0 +1,23 @@ +// FILE: 1+a.kt + +// FILE: 2.kt +SMAP +2.kt +Kotlin +*S Kotlin +*F ++ 1 2.kt +_2Kt ++ 2 1+a.kt +test/_1_aKt +*L +1#1,15:1 +6#2:16 +*S KotlinDebug +*F ++ 1 2.kt +_2Kt +*L +13#1:16 +*E + diff --git a/compiler/testData/codegen/boxInline/smap/kt23369_2.kt b/compiler/testData/codegen/boxInline/smap/kt23369_2.kt index 5056bf17280..4d5c889eaa7 100644 --- a/compiler/testData/codegen/boxInline/smap/kt23369_2.kt +++ b/compiler/testData/codegen/boxInline/smap/kt23369_2.kt @@ -1,5 +1,4 @@ - -// FILE: 1+ a.kt +// FILE: a.kt package test @@ -13,27 +12,3 @@ import test.* fun box(): String { return inlineFun { "OK" } } - -// FILE: 1+ a.smap - -// FILE: 2.smap - -SMAP -2.kt -Kotlin -*S Kotlin -*F -+ 1 2.kt -_2Kt -+ 2 1+ a.kt -test/_1__aKt -*L -1#1,8:1 -7#2:9 -*S KotlinDebug -*F -+ 1 2.kt -_2Kt -*L -5#1:9 -*E diff --git a/compiler/testData/codegen/boxInline/smap/kt23369_2.smap b/compiler/testData/codegen/boxInline/smap/kt23369_2.smap new file mode 100644 index 00000000000..24cfad8d562 --- /dev/null +++ b/compiler/testData/codegen/boxInline/smap/kt23369_2.smap @@ -0,0 +1,23 @@ +// FILE: a.kt + +// FILE: 2.kt +SMAP +2.kt +Kotlin +*S Kotlin +*F ++ 1 2.kt +_2Kt ++ 2 a.kt +test/AKt +*L +1#1,15:1 +6#2:16 +*S KotlinDebug +*F ++ 1 2.kt +_2Kt +*L +13#1:16 +*E + diff --git a/compiler/testData/codegen/boxInline/smap/kt23369_3.kt b/compiler/testData/codegen/boxInline/smap/kt23369_3.kt index 9cdb1363488..4d5c889eaa7 100644 --- a/compiler/testData/codegen/boxInline/smap/kt23369_3.kt +++ b/compiler/testData/codegen/boxInline/smap/kt23369_3.kt @@ -1,5 +1,4 @@ - -// FILE: + a.kt +// FILE: a.kt package test @@ -13,27 +12,3 @@ import test.* fun box(): String { return inlineFun { "OK" } } - -// FILE: + a.smap - -// FILE: 2.smap - -SMAP -2.kt -Kotlin -*S Kotlin -*F -+ 1 2.kt -_2Kt -+ 2 + a.kt -test/__aKt -*L -1#1,8:1 -7#2:9 -*S KotlinDebug -*F -+ 1 2.kt -_2Kt -*L -5#1:9 -*E diff --git a/compiler/testData/codegen/boxInline/smap/kt23369_3.smap b/compiler/testData/codegen/boxInline/smap/kt23369_3.smap new file mode 100644 index 00000000000..24cfad8d562 --- /dev/null +++ b/compiler/testData/codegen/boxInline/smap/kt23369_3.smap @@ -0,0 +1,23 @@ +// FILE: a.kt + +// FILE: 2.kt +SMAP +2.kt +Kotlin +*S Kotlin +*F ++ 1 2.kt +_2Kt ++ 2 a.kt +test/AKt +*L +1#1,15:1 +6#2:16 +*S KotlinDebug +*F ++ 1 2.kt +_2Kt +*L +13#1:16 +*E + diff --git a/compiler/testData/codegen/boxInline/smap/kt35006.kt b/compiler/testData/codegen/boxInline/smap/kt35006.kt index 6c4480ed3f8..43a843d5fb4 100644 --- a/compiler/testData/codegen/boxInline/smap/kt35006.kt +++ b/compiler/testData/codegen/boxInline/smap/kt35006.kt @@ -14,30 +14,3 @@ fun box(): String { // KotlinDebug: "OK" } } - -// FILE: 1.smap - -// FILE: 2.smap -SMAP -2.kt -Kotlin -*S Kotlin -*F -+ 1 2.kt -_2Kt -+ 2 1.kt -test/_1Kt -*L -1#1,12:1 -5#2:13 -4#2:14 -4#2:15 -*S KotlinDebug -*F -+ 1 2.kt -_2Kt -*L -5#1:13 -6#1:14 -7#1:15 -*E diff --git a/compiler/testData/codegen/boxInline/smap/kt35006.smap b/compiler/testData/codegen/boxInline/smap/kt35006.smap new file mode 100644 index 00000000000..6c40aa2d1cb --- /dev/null +++ b/compiler/testData/codegen/boxInline/smap/kt35006.smap @@ -0,0 +1,27 @@ +// FILE: 1.kt + +// FILE: 2.kt +SMAP +2.kt +Kotlin +*S Kotlin +*F ++ 1 2.kt +_2Kt ++ 2 1.kt +test/_1Kt +*L +1#1,17:1 +5#2:18 +4#2:19 +4#2:20 +*S KotlinDebug +*F ++ 1 2.kt +_2Kt +*L +11#1:18 +12#1:19 +13#1:20 +*E + diff --git a/compiler/testData/codegen/boxInline/smap/multiFileFacade.kt b/compiler/testData/codegen/boxInline/smap/multiFileFacade.kt index 257424317e4..e9de5ba6c8e 100644 --- a/compiler/testData/codegen/boxInline/smap/multiFileFacade.kt +++ b/compiler/testData/codegen/boxInline/smap/multiFileFacade.kt @@ -13,43 +13,3 @@ inline fun foo2(l: () -> String): String = foo(l) // FILE: 2.kt fun box(): String = foo { "OK" } - -// FILE: 1.smap -SMAP -1.kt -Kotlin -*S Kotlin -*F -+ 1 1.kt -Facade___1Kt -*L -1#1,13:1 -8#1:14 -*S KotlinDebug -*F -+ 1 1.kt -Facade___1Kt -*L -10#1:14 -*E - -// FILE: 2.smap -SMAP -2.kt -Kotlin -*S Kotlin -*F -+ 1 2.kt -_2Kt -+ 2 1.kt -Facade___1Kt -*L -1#1,5:1 -8#2:6 -*S KotlinDebug -*F -+ 1 2.kt -_2Kt -*L -3#1:6 -*E diff --git a/compiler/testData/codegen/boxInline/smap/multiFileFacade.smap b/compiler/testData/codegen/boxInline/smap/multiFileFacade.smap new file mode 100644 index 00000000000..27954fbe5af --- /dev/null +++ b/compiler/testData/codegen/boxInline/smap/multiFileFacade.smap @@ -0,0 +1,40 @@ +// FILE: 1.kt +SMAP +1.kt +Kotlin +*S Kotlin +*F ++ 1 1.kt +Facade___1Kt +*L +1#1,13:1 +8#1:14 +*S KotlinDebug +*F ++ 1 1.kt +Facade___1Kt +*L +10#1:14 +*E + +// FILE: 2.kt +SMAP +2.kt +Kotlin +*S Kotlin +*F ++ 1 2.kt +_2Kt ++ 2 1.kt +Facade___1Kt +*L +1#1,16:1 +8#2:17 +*S KotlinDebug +*F ++ 1 2.kt +_2Kt +*L +15#1:17 +*E + diff --git a/compiler/testData/codegen/boxInline/smap/newsmap/differentMapping.kt b/compiler/testData/codegen/boxInline/smap/newsmap/differentMapping.kt index 6806931d187..b49e4f8e9fc 100644 --- a/compiler/testData/codegen/boxInline/smap/newsmap/differentMapping.kt +++ b/compiler/testData/codegen/boxInline/smap/newsmap/differentMapping.kt @@ -1,4 +1,3 @@ - // FILE: 1.kt package test @@ -26,29 +25,3 @@ fun box(): String { return result } - -// FILE: 1.smap - -// FILE: 2.smap - -SMAP -2.kt -Kotlin -*S Kotlin -*F -+ 1 2.kt -_2Kt -+ 2 1.kt -test/_1Kt -*L -1#1,18:1 -7#2,4:19 -7#2,4:23 -*S KotlinDebug -*F -+ 1 2.kt -_2Kt -*L -7#1:19,4 -11#1:23,4 -*E diff --git a/compiler/testData/codegen/boxInline/smap/newsmap/differentMapping.smap b/compiler/testData/codegen/boxInline/smap/newsmap/differentMapping.smap new file mode 100644 index 00000000000..d8e74dd03d6 --- /dev/null +++ b/compiler/testData/codegen/boxInline/smap/newsmap/differentMapping.smap @@ -0,0 +1,25 @@ +// FILE: 1.kt + +// FILE: 2.kt +SMAP +2.kt +Kotlin +*S Kotlin +*F ++ 1 2.kt +_2Kt ++ 2 1.kt +test/_1Kt +*L +1#1,28:1 +6#2,4:29 +6#2,4:33 +*S KotlinDebug +*F ++ 1 2.kt +_2Kt +*L +18#1:29,4 +22#1:33,4 +*E + diff --git a/compiler/testData/codegen/boxInline/smap/newsmap/mappingInInlineFunLambda.kt b/compiler/testData/codegen/boxInline/smap/newsmap/mappingInInlineFunLambda.kt index 605f24a02ad..d4529a58e90 100644 --- a/compiler/testData/codegen/boxInline/smap/newsmap/mappingInInlineFunLambda.kt +++ b/compiler/testData/codegen/boxInline/smap/newsmap/mappingInInlineFunLambda.kt @@ -1,4 +1,3 @@ - // FILE: 1.kt package test @@ -29,73 +28,3 @@ fun box(): String { return result } - - -// FILE: 1.smap -SMAP -1.kt -Kotlin -*S Kotlin -*F -+ 1 1.kt -test/_1Kt$test$1 -+ 2 1.kt -test/_1Kt -*L -1#1,19:1 -7#2,3:20 -*S KotlinDebug -*F -+ 1 1.kt -test/_1Kt$test$1 -*L -14#1:20,3 -*E - - -// FILE: 2.smap - -SMAP -2.kt -Kotlin -*S Kotlin -*F -+ 1 2.kt -_2Kt -+ 2 1.kt -test/_1Kt -*L -1#1,16:1 -12#2,6:17 -*S KotlinDebug -*F -+ 1 2.kt -_2Kt -*L -8#1:17,6 -*E - -SMAP -1.kt -Kotlin -*S Kotlin -*F -+ 1 1.kt -test/_1Kt$test$1 -+ 2 1.kt -test/_1Kt -+ 3 2.kt -_2Kt -*L -1#1,19:1 -7#2,2:20 -9#2:24 -9#3,2:22 -*S KotlinDebug -*F -+ 1 1.kt -test/_1Kt$test$1 -*L -14#1:20,2 -14#1:24 -*E diff --git a/compiler/testData/codegen/boxInline/smap/newsmap/mappingInInlineFunLambda.smap b/compiler/testData/codegen/boxInline/smap/newsmap/mappingInInlineFunLambda.smap new file mode 100644 index 00000000000..9aa907d6c45 --- /dev/null +++ b/compiler/testData/codegen/boxInline/smap/newsmap/mappingInInlineFunLambda.smap @@ -0,0 +1,67 @@ +// FILE: 1.kt +SMAP +1.kt +Kotlin +*S Kotlin +*F ++ 1 1.kt +test/_1Kt$test$1 ++ 2 1.kt +test/_1Kt +*L +1#1,18:1 +6#2,3:19 +*S KotlinDebug +*F ++ 1 1.kt +test/_1Kt$test$1 +*L +13#1:19,3 +*E + +// FILE: 2.kt +SMAP +2.kt +Kotlin +*S Kotlin +*F ++ 1 2.kt +_2Kt ++ 2 1.kt +test/_1Kt +*L +1#1,31:1 +11#2,6:32 +*S KotlinDebug +*F ++ 1 2.kt +_2Kt +*L +25#1:32,6 +*E + +SMAP +1.kt +Kotlin +*S Kotlin +*F ++ 1 1.kt +test/_1Kt$test$1 ++ 2 1.kt +test/_1Kt ++ 3 2.kt +_2Kt +*L +1#1,18:1 +6#2,2:19 +8#2:23 +26#3,2:21 +*S KotlinDebug +*F ++ 1 1.kt +test/_1Kt$test$1 +*L +13#1:19,2 +13#1:23 +*E + diff --git a/compiler/testData/codegen/boxInline/smap/newsmap/mappingInSubInlineLambda.kt b/compiler/testData/codegen/boxInline/smap/newsmap/mappingInSubInlineLambda.kt index 7f7c70cc6f6..b53a141a4a5 100644 --- a/compiler/testData/codegen/boxInline/smap/newsmap/mappingInSubInlineLambda.kt +++ b/compiler/testData/codegen/boxInline/smap/newsmap/mappingInSubInlineLambda.kt @@ -1,4 +1,3 @@ - // NO_CHECK_LAMBDA_INLINING // FILE: 1.kt package test @@ -32,48 +31,3 @@ fun box(): String { return result } - - -// FILE: 1.smap - -// FILE: 2.smap - -SMAP -2.kt -Kotlin -*S Kotlin -*F -+ 1 2.kt -_2Kt -+ 2 1.kt -test/_1Kt -*L -1#1,20:1 -7#2,4:21 -*S KotlinDebug -*F -+ 1 2.kt -_2Kt -*L -8#1:21,4 -*E - -SMAP -2.kt -Kotlin -*S Kotlin -*F -+ 1 2.kt -_2Kt$box$1$1 -+ 2 1.kt -test/_1Kt -*L -1#1,20:1 -13#2,3:21 -*S KotlinDebug -*F -+ 1 2.kt -_2Kt$box$1$1 -*L -10#1:21,3 -*E diff --git a/compiler/testData/codegen/boxInline/smap/newsmap/mappingInSubInlineLambda.smap b/compiler/testData/codegen/boxInline/smap/newsmap/mappingInSubInlineLambda.smap new file mode 100644 index 00000000000..5740242bf9c --- /dev/null +++ b/compiler/testData/codegen/boxInline/smap/newsmap/mappingInSubInlineLambda.smap @@ -0,0 +1,43 @@ +// FILE: 1.kt + +// FILE: 2.kt +SMAP +2.kt +Kotlin +*S Kotlin +*F ++ 1 2.kt +_2Kt ++ 2 1.kt +test/_1Kt +*L +1#1,34:1 +6#2,4:35 +*S KotlinDebug +*F ++ 1 2.kt +_2Kt +*L +24#1:35,4 +*E + +SMAP +2.kt +Kotlin +*S Kotlin +*F ++ 1 2.kt +_2Kt$box$1$1 ++ 2 1.kt +test/_1Kt +*L +1#1,34:1 +12#2,3:35 +*S KotlinDebug +*F ++ 1 2.kt +_2Kt$box$1$1 +*L +26#1:35,3 +*E + diff --git a/compiler/testData/codegen/boxInline/smap/newsmap/mappingInSubInlineLambdaSameFileInline.kt b/compiler/testData/codegen/boxInline/smap/newsmap/mappingInSubInlineLambdaSameFileInline.kt index 22e52e09da1..df77eecc24d 100644 --- a/compiler/testData/codegen/boxInline/smap/newsmap/mappingInSubInlineLambdaSameFileInline.kt +++ b/compiler/testData/codegen/boxInline/smap/newsmap/mappingInSubInlineLambdaSameFileInline.kt @@ -1,4 +1,3 @@ - // NO_CHECK_LAMBDA_INLINING // FILE: 1.kt package test @@ -32,48 +31,3 @@ fun box(): String { return result } - - -// FILE: 1.smap - -// FILE: 2.smap - -SMAP -2.kt -Kotlin -*S Kotlin -*F -+ 1 2.kt -_2Kt -+ 2 1.kt -test/_1Kt -*L -1#1,26:1 -7#2,4:27 -*S KotlinDebug -*F -+ 1 2.kt -_2Kt -*L -14#1:27,4 -*E - -SMAP -2.kt -Kotlin -*S Kotlin -*F -+ 1 2.kt -_2Kt$box$1$1 -+ 2 2.kt -_2Kt -*L -1#1,26:1 -6#2,3:27 -*S KotlinDebug -*F -+ 1 2.kt -_2Kt$box$1$1 -*L -16#1:27,3 -*E diff --git a/compiler/testData/codegen/boxInline/smap/newsmap/mappingInSubInlineLambdaSameFileInline.smap b/compiler/testData/codegen/boxInline/smap/newsmap/mappingInSubInlineLambdaSameFileInline.smap new file mode 100644 index 00000000000..4510273b380 --- /dev/null +++ b/compiler/testData/codegen/boxInline/smap/newsmap/mappingInSubInlineLambdaSameFileInline.smap @@ -0,0 +1,43 @@ +// FILE: 1.kt + +// FILE: 2.kt +SMAP +2.kt +Kotlin +*S Kotlin +*F ++ 1 2.kt +_2Kt ++ 2 1.kt +test/_1Kt +*L +1#1,34:1 +6#2,4:35 +*S KotlinDebug +*F ++ 1 2.kt +_2Kt +*L +24#1:35,4 +*E + +SMAP +2.kt +Kotlin +*S Kotlin +*F ++ 1 2.kt +_2Kt$box$1$1 ++ 2 2.kt +_2Kt +*L +1#1,34:1 +16#2,3:35 +*S KotlinDebug +*F ++ 1 2.kt +_2Kt$box$1$1 +*L +26#1:35,3 +*E + diff --git a/compiler/testData/codegen/boxInline/smap/oneFile.kt b/compiler/testData/codegen/boxInline/smap/oneFile.kt index df2e0247903..3726efd7a06 100644 --- a/compiler/testData/codegen/boxInline/smap/oneFile.kt +++ b/compiler/testData/codegen/boxInline/smap/oneFile.kt @@ -1,4 +1,3 @@ - // FILE: 1.kt package zzz @@ -18,26 +17,3 @@ inline fun test(p: () -> String): String { pd = "O" return pd + p() } - -// FILE: 1.smap - -// FILE: 2.smap - -//TODO should be empty -SMAP -2.kt -Kotlin -*S Kotlin -*F -+ 1 2.kt -_2Kt -*L -1#1,15:1 -10#1,3:16 -*S KotlinDebug -*F -+ 1 2.kt -_2Kt -*L -4#1:16,3 -*E diff --git a/compiler/testData/codegen/boxInline/smap/oneFile.smap b/compiler/testData/codegen/boxInline/smap/oneFile.smap new file mode 100644 index 00000000000..1815d297196 --- /dev/null +++ b/compiler/testData/codegen/boxInline/smap/oneFile.smap @@ -0,0 +1,21 @@ +// FILE: 1.kt + +// FILE: 2.kt +SMAP +2.kt +Kotlin +*S Kotlin +*F ++ 1 2.kt +_2Kt +*L +1#1,20:1 +16#1,3:21 +*S KotlinDebug +*F ++ 1 2.kt +_2Kt +*L +10#1:21,3 +*E + diff --git a/compiler/testData/codegen/boxInline/smap/rangeFolding.kt b/compiler/testData/codegen/boxInline/smap/rangeFolding.kt index 6856000760d..95b62a5afd2 100644 --- a/compiler/testData/codegen/boxInline/smap/rangeFolding.kt +++ b/compiler/testData/codegen/boxInline/smap/rangeFolding.kt @@ -26,49 +26,3 @@ fun box(): String { together() return "OK" } - -// FILE: 1.smap -SMAP -1.kt -Kotlin -*S Kotlin -*F -+ 1 1.kt -test/_1Kt -*L -1#1,14:1 -4#1:15 -6#1:16 -5#1:17 -*S KotlinDebug -*F -+ 1 1.kt -test/_1Kt -*L -9#1:15 -10#1:16 -11#1:17 -*E - -// FILE: 2.smap -SMAP -2.kt -Kotlin -*S Kotlin -*F -+ 1 2.kt -_2Kt -+ 2 1.kt -test/_1Kt -*L -1#1,17:1 -9#2:18 -4#2,9:19 -*S KotlinDebug -*F -+ 1 2.kt -_2Kt -*L -13#1:18 -13#1:19,9 -*E diff --git a/compiler/testData/codegen/boxInline/smap/rangeFolding.smap b/compiler/testData/codegen/boxInline/smap/rangeFolding.smap new file mode 100644 index 00000000000..87c98b01cb1 --- /dev/null +++ b/compiler/testData/codegen/boxInline/smap/rangeFolding.smap @@ -0,0 +1,46 @@ +// FILE: 1.kt +SMAP +1.kt +Kotlin +*S Kotlin +*F ++ 1 1.kt +test/_1Kt +*L +1#1,14:1 +4#1:15 +6#1:16 +5#1:17 +*S KotlinDebug +*F ++ 1 1.kt +test/_1Kt +*L +9#1:15 +10#1:16 +11#1:17 +*E + +// FILE: 2.kt +SMAP +2.kt +Kotlin +*S Kotlin +*F ++ 1 2.kt +_2Kt ++ 2 1.kt +test/_1Kt +*L +1#1,29:1 +9#2:30 +4#2,9:31 +*S KotlinDebug +*F ++ 1 2.kt +_2Kt +*L +26#1:30 +26#1:31,9 +*E + diff --git a/compiler/testData/codegen/boxInline/smap/rangeFoldingInClass.kt b/compiler/testData/codegen/boxInline/smap/rangeFoldingInClass.kt index c1112c9549b..aa9e188e39b 100644 --- a/compiler/testData/codegen/boxInline/smap/rangeFoldingInClass.kt +++ b/compiler/testData/codegen/boxInline/smap/rangeFoldingInClass.kt @@ -28,71 +28,3 @@ fun box(): String { X.foo() return "OK" } - -// FILE: 1.smap -SMAP -1.kt -Kotlin -*S Kotlin -*F -+ 1 1.kt -test/D -+ 2 1.kt -test/A -+ 3 1.kt -test/C -+ 4 1.kt -test/B -*L -1#1,16:1 -4#2:17 -6#3:18 -5#4:19 -*S KotlinDebug -*F -+ 1 1.kt -test/D -*L -10#1:17 -11#1:18 -12#1:19 -*E - -// FILE: 2.smap -SMAP -2.kt -Kotlin -*S Kotlin -*F -+ 1 2.kt -X -+ 2 1.kt -test/D -+ 3 1.kt -test/A -+ 4 1.kt -test/C -+ 5 1.kt -test/B -*L -1#1,17:1 -10#2:18 -11#2:20 -12#2:22 -13#2:24 -4#3:19 -6#4:21 -5#5:23 -*S KotlinDebug -*F -+ 1 2.kt -X -*L -9#1:18 -9#1:20 -9#1:22 -9#1:24 -9#1:19 -9#1:21 -9#1:23 -*E diff --git a/compiler/testData/codegen/boxInline/smap/rangeFoldingInClass.smap b/compiler/testData/codegen/boxInline/smap/rangeFoldingInClass.smap new file mode 100644 index 00000000000..7d0ddddb003 --- /dev/null +++ b/compiler/testData/codegen/boxInline/smap/rangeFoldingInClass.smap @@ -0,0 +1,68 @@ +// FILE: 1.kt +SMAP +1.kt +Kotlin +*S Kotlin +*F ++ 1 1.kt +test/D ++ 2 1.kt +test/A ++ 3 1.kt +test/C ++ 4 1.kt +test/B +*L +1#1,16:1 +4#2:17 +6#3:18 +5#4:19 +*S KotlinDebug +*F ++ 1 1.kt +test/D +*L +10#1:17 +11#1:18 +12#1:19 +*E + +// FILE: 2.kt +SMAP +2.kt +Kotlin +*S Kotlin +*F ++ 1 2.kt +X ++ 2 1.kt +test/D ++ 3 1.kt +test/A ++ 4 1.kt +test/C ++ 5 1.kt +test/B +*L +1#1,31:1 +10#2:32 +11#2:34 +12#2:36 +13#2:38 +4#3:33 +6#4:35 +5#5:37 +*S KotlinDebug +*F ++ 1 2.kt +X +*L +24#1:32 +24#1:34 +24#1:36 +24#1:38 +24#1:33 +24#1:35 +24#1:37 +*E + diff --git a/compiler/testData/codegen/boxInline/smap/resolve/inlineComponent.kt b/compiler/testData/codegen/boxInline/smap/resolve/inlineComponent.kt index 499cbff507e..dc3ba752d5c 100644 --- a/compiler/testData/codegen/boxInline/smap/resolve/inlineComponent.kt +++ b/compiler/testData/codegen/boxInline/smap/resolve/inlineComponent.kt @@ -17,27 +17,3 @@ fun box(): String { return if (p == 1 && l == 11) "OK" else "fail: $p" } - -// FILE: 1.smap - -// FILE: 2.smap - -SMAP -2.kt -Kotlin -*S Kotlin -*F -+ 1 2.kt -_2Kt -+ 2 1.kt -zzz/_1Kt -*L -1#1,11:1 -7#2,3:12 -*S KotlinDebug -*F -+ 1 2.kt -_2Kt -*L -6#1:12,3 -*E diff --git a/compiler/testData/codegen/boxInline/smap/resolve/inlineComponent.smap b/compiler/testData/codegen/boxInline/smap/resolve/inlineComponent.smap new file mode 100644 index 00000000000..cc5a8855a9a --- /dev/null +++ b/compiler/testData/codegen/boxInline/smap/resolve/inlineComponent.smap @@ -0,0 +1,23 @@ +// FILE: 1.kt + +// FILE: 2.kt +SMAP +2.kt +Kotlin +*S Kotlin +*F ++ 1 2.kt +_2Kt ++ 2 1.kt +zzz/_1Kt +*L +1#1,20:1 +7#2,3:21 +*S KotlinDebug +*F ++ 1 2.kt +_2Kt +*L +16#1:21,3 +*E + diff --git a/compiler/testData/codegen/boxInline/smap/resolve/inlineIterator.kt b/compiler/testData/codegen/boxInline/smap/resolve/inlineIterator.kt index 031109f2e5b..3b1f836253a 100644 --- a/compiler/testData/codegen/boxInline/smap/resolve/inlineIterator.kt +++ b/compiler/testData/codegen/boxInline/smap/resolve/inlineIterator.kt @@ -18,27 +18,3 @@ fun box(): String { return if (p == 15) "OK" else "fail: $p" } - -// FILE: 1.smap - -// FILE: 2.smap - -SMAP -2.kt -Kotlin -*S Kotlin -*F -+ 1 2.kt -_2Kt -+ 2 1.kt -zzz/_1Kt -*L -1#1,14:1 -7#2:15 -*S KotlinDebug -*F -+ 1 2.kt -_2Kt -*L -7#1:15 -*E diff --git a/compiler/testData/codegen/boxInline/smap/resolve/inlineIterator.smap b/compiler/testData/codegen/boxInline/smap/resolve/inlineIterator.smap new file mode 100644 index 00000000000..7698b306bf0 --- /dev/null +++ b/compiler/testData/codegen/boxInline/smap/resolve/inlineIterator.smap @@ -0,0 +1,23 @@ +// FILE: 1.kt + +// FILE: 2.kt +SMAP +2.kt +Kotlin +*S Kotlin +*F ++ 1 2.kt +_2Kt ++ 2 1.kt +zzz/_1Kt +*L +1#1,21:1 +7#2:22 +*S KotlinDebug +*F ++ 1 2.kt +_2Kt +*L +15#1:22 +*E + diff --git a/compiler/testData/codegen/boxInline/smap/smap.kt b/compiler/testData/codegen/boxInline/smap/smap.kt index ba121ab90b2..ee041de75c1 100644 --- a/compiler/testData/codegen/boxInline/smap/smap.kt +++ b/compiler/testData/codegen/boxInline/smap/smap.kt @@ -42,78 +42,3 @@ fun box(): String { return expected } - -// FILE: 1.smap - -SMAP -1.kt -Kotlin -*S Kotlin -*F -+ 1 1.kt -builders/_1Kt -*L -1#1,22:1 -11#1,3:23 -7#1,2:26 -*S KotlinDebug -*F -+ 1 1.kt -builders/_1Kt -*L -15#1:23,3 -19#1:26,2 -*E - -// FILE: 2.smap - - -SMAP -2.kt -Kotlin -*S Kotlin -*F -+ 1 2.kt -_2Kt -+ 2 1.kt -builders/_1Kt -*L -1#1,25:1 -7#1,3:33 -10#1:38 -11#1,2:42 -13#1:45 -15#1:47 -19#2:26 -7#2:27 -15#2:28 -11#2,3:29 -8#2:32 -19#2:36 -7#2:37 -15#2:39 -11#2,2:40 -13#2:44 -8#2:46 -*S KotlinDebug -*F -+ 1 2.kt -_2Kt -*L -20#1:33,3 -20#1:38 -20#1:42,2 -20#1:45 -20#1:47 -9#1:26 -9#1:27 -10#1:28 -10#1:29,3 -9#1:32 -20#1:36 -20#1:37 -20#1:39 -20#1:40,2 -20#1:44 -20#1:46 -*E diff --git a/compiler/testData/codegen/boxInline/smap/smap.smap b/compiler/testData/codegen/boxInline/smap/smap.smap new file mode 100644 index 00000000000..dfcb64f0cfc --- /dev/null +++ b/compiler/testData/codegen/boxInline/smap/smap.smap @@ -0,0 +1,72 @@ +// FILE: 1.kt +SMAP +1.kt +Kotlin +*S Kotlin +*F ++ 1 1.kt +builders/_1Kt +*L +1#1,22:1 +11#1,3:23 +7#1,2:26 +*S KotlinDebug +*F ++ 1 1.kt +builders/_1Kt +*L +15#1:23,3 +19#1:26,2 +*E + +// FILE: 2.kt +SMAP +2.kt +Kotlin +*S Kotlin +*F ++ 1 2.kt +_2Kt ++ 2 1.kt +builders/_1Kt +*L +1#1,45:1 +28#1,3:53 +31#1:58 +32#1,2:62 +34#1:65 +36#1:67 +19#2:46 +7#2:47 +15#2:48 +11#2,3:49 +8#2:52 +19#2:56 +7#2:57 +15#2:59 +11#2,2:60 +13#2:64 +8#2:66 +*S KotlinDebug +*F ++ 1 2.kt +_2Kt +*L +41#1:53,3 +41#1:58 +41#1:62,2 +41#1:65 +41#1:67 +30#1:46 +30#1:47 +31#1:48 +31#1:49,3 +30#1:52 +41#1:56 +41#1:57 +41#1:59 +41#1:60,2 +41#1:64 +41#1:66 +*E + diff --git a/compiler/testData/codegen/boxInline/smap/smapWithNewSyntax.kt b/compiler/testData/codegen/boxInline/smap/smapWithNewSyntax.kt index 990c428c0bc..3700972236d 100644 --- a/compiler/testData/codegen/boxInline/smap/smapWithNewSyntax.kt +++ b/compiler/testData/codegen/boxInline/smap/smapWithNewSyntax.kt @@ -18,45 +18,3 @@ import test.* fun box(): String { return inlineFun() } - -// FILE: 1.smap -SMAP -1.kt -Kotlin -*S Kotlin -*F -+ 1 1.kt -test/_1Kt -*L -1#1,15:1 -6#1:16 -*S KotlinDebug -*F -+ 1 1.kt -test/_1Kt -*L -10#1:16 -*E - -// FILE: 2.smap -SMAP -2.kt -Kotlin -*S Kotlin -*F -+ 1 2.kt -_2Kt -+ 2 1.kt -test/_1Kt -*L -1#1,8:1 -10#2:9 -6#2,6:10 -*S KotlinDebug -*F -+ 1 2.kt -_2Kt -*L -5#1:9 -5#1:10,6 -*E diff --git a/compiler/testData/codegen/boxInline/smap/smapWithNewSyntax.smap b/compiler/testData/codegen/boxInline/smap/smapWithNewSyntax.smap new file mode 100644 index 00000000000..8ce6a92c6aa --- /dev/null +++ b/compiler/testData/codegen/boxInline/smap/smapWithNewSyntax.smap @@ -0,0 +1,41 @@ +// FILE: 1.kt +SMAP +1.kt +Kotlin +*S Kotlin +*F ++ 1 1.kt +test/_1Kt +*L +1#1,15:1 +6#1:16 +*S KotlinDebug +*F ++ 1 1.kt +test/_1Kt +*L +10#1:16 +*E + +// FILE: 2.kt +SMAP +2.kt +Kotlin +*S Kotlin +*F ++ 1 2.kt +_2Kt ++ 2 1.kt +test/_1Kt +*L +1#1,21:1 +10#2:22 +6#2,6:23 +*S KotlinDebug +*F ++ 1 2.kt +_2Kt +*L +19#1:22 +19#1:23,6 +*E diff --git a/compiler/testData/codegen/boxInline/smap/smapWithOldSyntax.kt b/compiler/testData/codegen/boxInline/smap/smapWithOldSyntax.kt index 46ba2cb2991..1e14e462a6a 100644 --- a/compiler/testData/codegen/boxInline/smap/smapWithOldSyntax.kt +++ b/compiler/testData/codegen/boxInline/smap/smapWithOldSyntax.kt @@ -18,47 +18,3 @@ import test.* fun box(): String { return inlineFun() } - -// FILE: 1.smap -SMAP -1.kt -Kotlin -*S Kotlin -*F -+ 1 1.kt -test/_1Kt -*L -1#1,15:1 -6#1:16 -*E -*S KotlinDebug -*F -+ 1 1.kt -test/_1Kt -*L -10#1:16 -*E - -// FILE: 2.smap -SMAP -2.kt -Kotlin -*S Kotlin -*F -+ 1 2.kt -_2Kt -+ 2 1.kt -test/_1Kt -*L -1#1,8:1 -10#2:9 -6#2,6:10 -*E -*S KotlinDebug -*F -+ 1 2.kt -_2Kt -*L -5#1:9 -5#1,6:10 -*E diff --git a/compiler/testData/codegen/boxInline/smap/smapWithOldSyntax.smap b/compiler/testData/codegen/boxInline/smap/smapWithOldSyntax.smap new file mode 100644 index 00000000000..6ea43a0c918 --- /dev/null +++ b/compiler/testData/codegen/boxInline/smap/smapWithOldSyntax.smap @@ -0,0 +1,43 @@ +// FILE: 1.kt +SMAP +1.kt +Kotlin +*S Kotlin +*F ++ 1 1.kt +test/_1Kt +*L +1#1,15:1 +6#1:16 +*E +*S KotlinDebug +*F ++ 1 1.kt +test/_1Kt +*L +10#1:16 +*E + +// FILE: 2.kt +SMAP +2.kt +Kotlin +*S Kotlin +*F ++ 1 2.kt +_2Kt ++ 2 1.kt +test/_1Kt +*L +1#1,21:1 +10#2:22 +6#2,6:23 +*E +*S KotlinDebug +*F ++ 1 2.kt +_2Kt +*L +19#1:22 +19#1,6:23 +*E diff --git a/compiler/testData/codegen/boxInline/special/loopInStoreLoadChains.kt b/compiler/testData/codegen/boxInline/special/loopInStoreLoadChains.kt index 1d368d6595e..1fc9c6b9f59 100644 --- a/compiler/testData/codegen/boxInline/special/loopInStoreLoadChains.kt +++ b/compiler/testData/codegen/boxInline/special/loopInStoreLoadChains.kt @@ -16,4 +16,4 @@ inline fun test(noinline foo: () -> String, noinline bar: () -> String): String // FILE: 2.kt fun box(): String = - test({ "OK" }, { "wrong lambda" }) \ No newline at end of file + test({ "OK" }, { "wrong lambda" }) diff --git a/compiler/testData/codegen/boxInline/special/loopInStoreLoadChains2.kt b/compiler/testData/codegen/boxInline/special/loopInStoreLoadChains2.kt index 9e0289e38d0..1bf35f4f44d 100644 --- a/compiler/testData/codegen/boxInline/special/loopInStoreLoadChains2.kt +++ b/compiler/testData/codegen/boxInline/special/loopInStoreLoadChains2.kt @@ -22,4 +22,4 @@ inline fun test(crossinline foo: String.() -> String): String { // FILE: 2.kt -fun box(): String = test { "OK" } \ No newline at end of file +fun box(): String = test { "OK" } diff --git a/compiler/testData/codegen/boxInline/stackOnReturn/elvis.kt b/compiler/testData/codegen/boxInline/stackOnReturn/elvis.kt index 6e4d98a72b9..296cd377044 100644 --- a/compiler/testData/codegen/boxInline/stackOnReturn/elvis.kt +++ b/compiler/testData/codegen/boxInline/stackOnReturn/elvis.kt @@ -7,4 +7,4 @@ inline fun test(value: Any?): String? { // FILE: 2.kt fun box(): String = - test(null) ?: "OK" \ No newline at end of file + test(null) ?: "OK" diff --git a/compiler/testData/codegen/boxInline/stackOnReturn/ifThenElse.kt b/compiler/testData/codegen/boxInline/stackOnReturn/ifThenElse.kt index 0e59babfb80..dc4efbbc0e1 100644 --- a/compiler/testData/codegen/boxInline/stackOnReturn/ifThenElse.kt +++ b/compiler/testData/codegen/boxInline/stackOnReturn/ifThenElse.kt @@ -7,4 +7,4 @@ inline fun test(value: Any?): String? { // FILE: 2.kt fun box(): String = - test(null) ?: "OK" \ No newline at end of file + test(null) ?: "OK" diff --git a/compiler/testData/codegen/boxInline/stackOnReturn/kt17591.kt b/compiler/testData/codegen/boxInline/stackOnReturn/kt17591.kt index c9a891f0e7d..07dc2cf1425 100644 --- a/compiler/testData/codegen/boxInline/stackOnReturn/kt17591.kt +++ b/compiler/testData/codegen/boxInline/stackOnReturn/kt17591.kt @@ -4,4 +4,4 @@ inline fun alwaysOk(s: String, fn: (String) -> String): String { } // FILE: 2.kt -fun box() = alwaysOk("what?") { it } \ No newline at end of file +fun box() = alwaysOk("what?") { it } diff --git a/compiler/testData/codegen/boxInline/stackOnReturn/kt17591a.kt b/compiler/testData/codegen/boxInline/stackOnReturn/kt17591a.kt index adb5010e8c7..79980c7076a 100644 --- a/compiler/testData/codegen/boxInline/stackOnReturn/kt17591a.kt +++ b/compiler/testData/codegen/boxInline/stackOnReturn/kt17591a.kt @@ -4,4 +4,4 @@ inline fun alwaysOk(s: String, fn: (String) -> String): String { } // FILE: 2.kt -fun box() = alwaysOk("what?") { it } \ No newline at end of file +fun box() = alwaysOk("what?") { it } diff --git a/compiler/testData/codegen/boxInline/stackOnReturn/kt17591b.kt b/compiler/testData/codegen/boxInline/stackOnReturn/kt17591b.kt index 672946db11d..ec5d2d49f0b 100644 --- a/compiler/testData/codegen/boxInline/stackOnReturn/kt17591b.kt +++ b/compiler/testData/codegen/boxInline/stackOnReturn/kt17591b.kt @@ -12,4 +12,4 @@ inline fun alwaysOk(s: String, fn: (String) -> String): String { } // FILE: 2.kt -fun box() = alwaysOk("what?") { it } \ No newline at end of file +fun box() = alwaysOk("what?") { it } diff --git a/compiler/testData/codegen/boxInline/stackOnReturn/mixedTypesOnStack1.kt b/compiler/testData/codegen/boxInline/stackOnReturn/mixedTypesOnStack1.kt index 08d6a84c259..5913cc47992 100644 --- a/compiler/testData/codegen/boxInline/stackOnReturn/mixedTypesOnStack1.kt +++ b/compiler/testData/codegen/boxInline/stackOnReturn/mixedTypesOnStack1.kt @@ -7,4 +7,4 @@ inline fun test1(value: Any?): String? { // FILE: 2.kt fun box(): String = - test1(null) ?: "OK" \ No newline at end of file + test1(null) ?: "OK" diff --git a/compiler/testData/codegen/boxInline/stackOnReturn/mixedTypesOnStack2.kt b/compiler/testData/codegen/boxInline/stackOnReturn/mixedTypesOnStack2.kt index 22268ac2f98..a01c77ba33a 100644 --- a/compiler/testData/codegen/boxInline/stackOnReturn/mixedTypesOnStack2.kt +++ b/compiler/testData/codegen/boxInline/stackOnReturn/mixedTypesOnStack2.kt @@ -7,4 +7,4 @@ inline fun test2(value: Any?): String? { // FILE: 2.kt fun box(): String = - test2(null) ?: "OK" \ No newline at end of file + test2(null) ?: "OK" diff --git a/compiler/testData/codegen/boxInline/stackOnReturn/mixedTypesOnStack3.kt b/compiler/testData/codegen/boxInline/stackOnReturn/mixedTypesOnStack3.kt index 64a61b6f014..596fe6a9c2b 100644 --- a/compiler/testData/codegen/boxInline/stackOnReturn/mixedTypesOnStack3.kt +++ b/compiler/testData/codegen/boxInline/stackOnReturn/mixedTypesOnStack3.kt @@ -7,4 +7,4 @@ inline fun test3(value: Any?): String? { // FILE: 2.kt fun box(): String = - test3(null) ?: "OK" \ No newline at end of file + test3(null) ?: "OK" diff --git a/compiler/testData/codegen/boxInline/stackOnReturn/nonLocalReturn1.kt b/compiler/testData/codegen/boxInline/stackOnReturn/nonLocalReturn1.kt index be2436f1741..563753dd36d 100644 --- a/compiler/testData/codegen/boxInline/stackOnReturn/nonLocalReturn1.kt +++ b/compiler/testData/codegen/boxInline/stackOnReturn/nonLocalReturn1.kt @@ -13,4 +13,4 @@ fun box(): String { } } return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/stackOnReturn/nonLocalReturn2.kt b/compiler/testData/codegen/boxInline/stackOnReturn/nonLocalReturn2.kt index 940085bab29..7a4ce064b4f 100644 --- a/compiler/testData/codegen/boxInline/stackOnReturn/nonLocalReturn2.kt +++ b/compiler/testData/codegen/boxInline/stackOnReturn/nonLocalReturn2.kt @@ -13,4 +13,4 @@ fun box(): String { } } return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/stackOnReturn/nonLocalReturn3.kt b/compiler/testData/codegen/boxInline/stackOnReturn/nonLocalReturn3.kt index 8453f9f606f..0350fcdb5b3 100644 --- a/compiler/testData/codegen/boxInline/stackOnReturn/nonLocalReturn3.kt +++ b/compiler/testData/codegen/boxInline/stackOnReturn/nonLocalReturn3.kt @@ -15,4 +15,4 @@ fun box(): String { } } return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/stackOnReturn/poppedLocalReturn.kt b/compiler/testData/codegen/boxInline/stackOnReturn/poppedLocalReturn.kt index af4d4e66a47..191250dd50c 100644 --- a/compiler/testData/codegen/boxInline/stackOnReturn/poppedLocalReturn.kt +++ b/compiler/testData/codegen/boxInline/stackOnReturn/poppedLocalReturn.kt @@ -12,4 +12,4 @@ inline fun inlineMe2(fn: (String) -> String): String { } // FILE: 2.kt -fun box() = inlineMe1 { _, _ -> "FAIL1" } + inlineMe2 { it } \ No newline at end of file +fun box() = inlineMe1 { _, _ -> "FAIL1" } + inlineMe2 { it } diff --git a/compiler/testData/codegen/boxInline/stackOnReturn/poppedLocalReturn2.kt b/compiler/testData/codegen/boxInline/stackOnReturn/poppedLocalReturn2.kt index 5a65c3db3da..e08146b4a46 100644 --- a/compiler/testData/codegen/boxInline/stackOnReturn/poppedLocalReturn2.kt +++ b/compiler/testData/codegen/boxInline/stackOnReturn/poppedLocalReturn2.kt @@ -7,4 +7,4 @@ inline fun alwaysOk(s: String, fn: (String) -> String): String { }) } // FILE: 2.kt -fun box() = alwaysOk("what?") { it } \ No newline at end of file +fun box() = alwaysOk("what?") { it } diff --git a/compiler/testData/codegen/boxInline/stackOnReturn/returnLong.kt b/compiler/testData/codegen/boxInline/stackOnReturn/returnLong.kt index 2f5cdbc9a0a..ff02cb10288 100644 --- a/compiler/testData/codegen/boxInline/stackOnReturn/returnLong.kt +++ b/compiler/testData/codegen/boxInline/stackOnReturn/returnLong.kt @@ -9,4 +9,4 @@ inline fun test(value: Any?): Long { fun box(): String { val t = test(null) return if (t == 1L) "OK" else "fail: t=$t" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/stackOnReturn/tryFinally.kt b/compiler/testData/codegen/boxInline/stackOnReturn/tryFinally.kt index 6b5b4ec2f30..fdff170830c 100644 --- a/compiler/testData/codegen/boxInline/stackOnReturn/tryFinally.kt +++ b/compiler/testData/codegen/boxInline/stackOnReturn/tryFinally.kt @@ -14,4 +14,4 @@ inline fun test(value: Any?): String? { // FILE: 2.kt fun box(): String = - test(null) ?: if (finallyFlag) "OK" else "finallyFlag not set" \ No newline at end of file + test(null) ?: if (finallyFlag) "OK" else "finallyFlag not set" diff --git a/compiler/testData/codegen/boxInline/suspend/callableReference/isAsReified.kt b/compiler/testData/codegen/boxInline/suspend/callableReference/isAsReified.kt index e013e9714b0..aed11016e5f 100644 --- a/compiler/testData/codegen/boxInline/suspend/callableReference/isAsReified.kt +++ b/compiler/testData/codegen/boxInline/suspend/callableReference/isAsReified.kt @@ -28,4 +28,4 @@ fun box(): String { res = if (isSuspend(::callMe)) callSuspend(::callMe) else "!isSuspend" } return res -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/suspend/callableReference/isAsReified2.kt b/compiler/testData/codegen/boxInline/suspend/callableReference/isAsReified2.kt index 85254e64c69..3e510df660f 100644 --- a/compiler/testData/codegen/boxInline/suspend/callableReference/isAsReified2.kt +++ b/compiler/testData/codegen/boxInline/suspend/callableReference/isAsReified2.kt @@ -31,4 +31,4 @@ fun box(): String { res = if (adapted.isSuspend()) adapted.callSuspend() else "!isSuspend" } return res -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/suspend/callableReference/simple.kt b/compiler/testData/codegen/boxInline/suspend/callableReference/simple.kt index 071bd8d88dc..760637d1bf3 100644 --- a/compiler/testData/codegen/boxInline/suspend/callableReference/simple.kt +++ b/compiler/testData/codegen/boxInline/suspend/callableReference/simple.kt @@ -1,3 +1,5 @@ +// WITH_COROUTINES +// WITH_RUNTIME // !LANGUAGE: +ReleaseCoroutines // NO_CHECK_LAMBDA_INLINING // FILE: test.kt @@ -5,8 +7,6 @@ inline suspend fun foo(x: suspend () -> String) = x() // FILE: box.kt -// WITH_RUNTIME -// WITH_COROUTINES import helpers.ContinuationAdapter import kotlin.coroutines.* diff --git a/compiler/testData/codegen/boxInline/suspend/capturedVariables.kt b/compiler/testData/codegen/boxInline/suspend/capturedVariables.kt index d916a116d42..72b6343a18d 100644 --- a/compiler/testData/codegen/boxInline/suspend/capturedVariables.kt +++ b/compiler/testData/codegen/boxInline/suspend/capturedVariables.kt @@ -1,6 +1,6 @@ -// FILE: test.kt -// WITH_RUNTIME // WITH_COROUTINES +// WITH_RUNTIME +// FILE: test.kt import kotlin.coroutines.* import helpers.* diff --git a/compiler/testData/codegen/boxInline/suspend/crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt b/compiler/testData/codegen/boxInline/suspend/crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt index 5b00ac8e5a2..ee3ee7ee296 100644 --- a/compiler/testData/codegen/boxInline/suspend/crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt +++ b/compiler/testData/codegen/boxInline/suspend/crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt @@ -1,6 +1,6 @@ -// FILE: test.kt -// WITH_RUNTIME // WITH_COROUTINES +// WITH_RUNTIME +// FILE: test.kt import kotlin.coroutines.* import helpers.* diff --git a/compiler/testData/codegen/boxInline/suspend/debugMetadataCrossinline.kt b/compiler/testData/codegen/boxInline/suspend/debugMetadataCrossinline.kt index 1abfca2af49..572681604b2 100644 --- a/compiler/testData/codegen/boxInline/suspend/debugMetadataCrossinline.kt +++ b/compiler/testData/codegen/boxInline/suspend/debugMetadataCrossinline.kt @@ -9,7 +9,9 @@ import kotlin.coroutines.* import kotlin.coroutines.intrinsics.* fun runBlocking(c: suspend () -> Unit) { - c.startCoroutine(Continuation(EmptyCoroutineContext){}) + c.startCoroutine(Continuation(EmptyCoroutineContext){ + it.getOrThrow() + }) } inline fun foo(noinline block: (String) -> Unit) = runBlocking { @@ -33,4 +35,4 @@ fun box(): String { res = it } return if (res.contains(".invokeSuspend(inline.kt:")) "OK" else res -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueCrossinline.kt b/compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueCrossinline.kt index 911f9ebd0d5..31d6a4ec144 100644 --- a/compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueCrossinline.kt +++ b/compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueCrossinline.kt @@ -1,7 +1,7 @@ -// FILE: test.kt -// WITH_RUNTIME // WITH_COROUTINES // NO_CHECK_LAMBDA_INLINING +// WITH_RUNTIME +// FILE: test.kt import kotlin.coroutines.* import helpers.* diff --git a/compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInClass.kt b/compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInClass.kt index 7613e3e4e85..4fdc593bad6 100644 --- a/compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInClass.kt +++ b/compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInClass.kt @@ -1,7 +1,7 @@ -// FILE: test.kt -// WITH_RUNTIME // WITH_COROUTINES // NO_CHECK_LAMBDA_INLINING +// WITH_RUNTIME +// FILE: test.kt class C { suspend inline fun test(default: C = this, lambda: suspend () -> String) = lambda() } diff --git a/compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInline.kt b/compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInline.kt index 644d74c3e4f..34a30a26446 100644 --- a/compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInline.kt +++ b/compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInline.kt @@ -1,7 +1,7 @@ -// FILE: test.kt -// WITH_RUNTIME // WITH_COROUTINES // NO_CHECK_LAMBDA_INLINING +// WITH_RUNTIME +// FILE: test.kt import kotlin.coroutines.* import helpers.* diff --git a/compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInlineFromMultiFileFacade.kt b/compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInlineFromMultiFileFacade.kt index 22633a69837..f2ca770d8ac 100644 --- a/compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInlineFromMultiFileFacade.kt +++ b/compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInlineFromMultiFileFacade.kt @@ -1,7 +1,7 @@ -// FILE: test.kt -// WITH_RUNTIME // WITH_COROUTINES // NO_CHECK_LAMBDA_INLINING +// WITH_RUNTIME +// FILE: test.kt import kotlin.coroutines.* import helpers.* diff --git a/compiler/testData/codegen/boxInline/suspend/delegatedProperties.kt b/compiler/testData/codegen/boxInline/suspend/delegatedProperties.kt index 79dd8b581f6..b5e929608c4 100644 --- a/compiler/testData/codegen/boxInline/suspend/delegatedProperties.kt +++ b/compiler/testData/codegen/boxInline/suspend/delegatedProperties.kt @@ -1,7 +1,7 @@ -// FILE: test.kt -// WITH_RUNTIME -// WITH_COROUTINES // WITH_REFLECT +// WITH_COROUTINES +// WITH_RUNTIME +// FILE: test.kt import kotlin.coroutines.* import helpers.* diff --git a/compiler/testData/codegen/boxInline/suspend/doubleRegenerationWithNonSuspendingLambda.kt b/compiler/testData/codegen/boxInline/suspend/doubleRegenerationWithNonSuspendingLambda.kt index ac7ca97eb5d..91eb9d7943f 100644 --- a/compiler/testData/codegen/boxInline/suspend/doubleRegenerationWithNonSuspendingLambda.kt +++ b/compiler/testData/codegen/boxInline/suspend/doubleRegenerationWithNonSuspendingLambda.kt @@ -1,6 +1,6 @@ -// FILE: test.kt -// WITH_RUNTIME // WITH_COROUTINES +// WITH_RUNTIME +// FILE: test.kt interface Flow { abstract suspend fun collect(collector: FlowCollector) diff --git a/compiler/testData/codegen/boxInline/suspend/enclodingMethod.kt b/compiler/testData/codegen/boxInline/suspend/enclodingMethod.kt index d0975166d0e..a84ff393a51 100644 --- a/compiler/testData/codegen/boxInline/suspend/enclodingMethod.kt +++ b/compiler/testData/codegen/boxInline/suspend/enclodingMethod.kt @@ -1,8 +1,8 @@ +// WITH_COROUTINES +// WITH_RUNTIME +// FULL_JDK // TARGET_BACKEND: JVM // FILE: flow.kt -// FULL_JDK -// WITH_RUNTIME -// WITH_COROUTINES package flow diff --git a/compiler/testData/codegen/boxInline/suspend/fileNameInMetadata.kt b/compiler/testData/codegen/boxInline/suspend/fileNameInMetadata.kt index 1d2b33952bf..be5e5c7fd3b 100644 --- a/compiler/testData/codegen/boxInline/suspend/fileNameInMetadata.kt +++ b/compiler/testData/codegen/boxInline/suspend/fileNameInMetadata.kt @@ -57,4 +57,4 @@ fun box(): String { } if ("(Test.kt:" !in str) return str return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfCrossinlineSuspend.kt b/compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfCrossinlineSuspend.kt index a5521b9c995..2b5a0159903 100644 --- a/compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfCrossinlineSuspend.kt +++ b/compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfCrossinlineSuspend.kt @@ -1,6 +1,6 @@ -// FILE: test.kt -// WITH_RUNTIME // WITH_COROUTINES +// WITH_RUNTIME +// FILE: test.kt import kotlin.coroutines.* import helpers.* diff --git a/compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfNoinlineSuspend.kt b/compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfNoinlineSuspend.kt index 1d256ff2ae7..f9da1df8875 100644 --- a/compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfNoinlineSuspend.kt +++ b/compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfNoinlineSuspend.kt @@ -1,6 +1,6 @@ -// FILE: test.kt -// WITH_RUNTIME // WITH_COROUTINES +// WITH_RUNTIME +// FILE: test.kt import kotlin.coroutines.* import helpers.* diff --git a/compiler/testData/codegen/boxInline/suspend/inlineSuspendContinuation.kt b/compiler/testData/codegen/boxInline/suspend/inlineSuspendContinuation.kt index 2272e155a1c..29a62b9688a 100644 --- a/compiler/testData/codegen/boxInline/suspend/inlineSuspendContinuation.kt +++ b/compiler/testData/codegen/boxInline/suspend/inlineSuspendContinuation.kt @@ -1,7 +1,7 @@ -// FILE: test.kt -// WITH_RUNTIME // WITH_COROUTINES // NO_CHECK_LAMBDA_INLINING +// WITH_RUNTIME +// FILE: test.kt // TARGET_BACKEND: JVM suspend inline fun test1(c: () -> Unit) { diff --git a/compiler/testData/codegen/boxInline/suspend/inlineSuspendInMultifileClass.kt b/compiler/testData/codegen/boxInline/suspend/inlineSuspendInMultifileClass.kt index 65b84089576..694f75ec49a 100644 --- a/compiler/testData/codegen/boxInline/suspend/inlineSuspendInMultifileClass.kt +++ b/compiler/testData/codegen/boxInline/suspend/inlineSuspendInMultifileClass.kt @@ -1,13 +1,13 @@ -// FILE: test.kt -// WITH_RUNTIME +// TARGET_BACKEND: JVM +// IGNORE_BACKEND_MULTI_MODULE: JVM, JVM_MULTI_MODULE_OLD_AGAINST_IR +// IGNORE_BACKEND: JVM // WITH_COROUTINES // NO_CHECK_LAMBDA_INLINING -// TARGET_BACKEND: JVM -// !INHERIT_MULTIFILE_PARTS +// WITH_RUNTIME +// INHERIT_MULTIFILE_PARTS +// FILE: test.kt // The lambda in box() attempts to store the result in a null Ref for some reason. -// IGNORE_BACKEND: JVM -// IGNORE_BACKEND_MULTI_MODULE: JVM, JVM_MULTI_MODULE_OLD_AGAINST_IR @file:JvmMultifileClass @file:JvmName("XKt") diff --git a/compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineOrdinary.kt b/compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineOrdinary.kt index 202ff0ace90..7ccbf8b2f3c 100644 --- a/compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineOrdinary.kt +++ b/compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineOrdinary.kt @@ -1,6 +1,6 @@ -// FILE: test.kt -// WITH_RUNTIME // WITH_COROUTINES +// WITH_RUNTIME +// FILE: test.kt import kotlin.coroutines.* import helpers.* diff --git a/compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineSuspend.kt b/compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineSuspend.kt index 96ea53cf6c1..d73acb961cc 100644 --- a/compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineSuspend.kt +++ b/compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineSuspend.kt @@ -1,6 +1,6 @@ -// FILE: test.kt -// WITH_RUNTIME // WITH_COROUTINES +// WITH_RUNTIME +// FILE: test.kt import kotlin.coroutines.* import helpers.* diff --git a/compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineOrdinary.kt b/compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineOrdinary.kt index 97d3a8bd5e3..8df83d3fd6f 100644 --- a/compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineOrdinary.kt +++ b/compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineOrdinary.kt @@ -1,6 +1,6 @@ -// FILE: test.kt -// WITH_RUNTIME // WITH_COROUTINES +// WITH_RUNTIME +// FILE: test.kt import kotlin.coroutines.* import helpers.* diff --git a/compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineSuspend.kt b/compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineSuspend.kt index b0567dab7c2..c65fdf3b87a 100644 --- a/compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineSuspend.kt +++ b/compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineSuspend.kt @@ -1,6 +1,6 @@ -// FILE: test.kt -// WITH_RUNTIME // WITH_COROUTINES +// WITH_RUNTIME +// FILE: test.kt import kotlin.coroutines.* import helpers.* diff --git a/compiler/testData/codegen/boxInline/suspend/inlineSuspendOfOrdinary.kt b/compiler/testData/codegen/boxInline/suspend/inlineSuspendOfOrdinary.kt index b3c16a7b24f..6488173c648 100644 --- a/compiler/testData/codegen/boxInline/suspend/inlineSuspendOfOrdinary.kt +++ b/compiler/testData/codegen/boxInline/suspend/inlineSuspendOfOrdinary.kt @@ -1,7 +1,7 @@ -// FILE: test.kt -// WITH_RUNTIME // WITH_COROUTINES // NO_CHECK_LAMBDA_INLINING +// WITH_RUNTIME +// FILE: test.kt import kotlin.coroutines.* import helpers.* diff --git a/compiler/testData/codegen/boxInline/suspend/inlineSuspendOfSuspend.kt b/compiler/testData/codegen/boxInline/suspend/inlineSuspendOfSuspend.kt index dd34e3ca116..8b583103923 100644 --- a/compiler/testData/codegen/boxInline/suspend/inlineSuspendOfSuspend.kt +++ b/compiler/testData/codegen/boxInline/suspend/inlineSuspendOfSuspend.kt @@ -1,7 +1,7 @@ -// FILE: test.kt -// WITH_RUNTIME // WITH_COROUTINES // NO_CHECK_LAMBDA_INLINING +// WITH_RUNTIME +// FILE: test.kt import kotlin.coroutines.* import helpers.* diff --git a/compiler/testData/codegen/boxInline/suspend/inlineUsedAsNoinline/inlineOnly.kt b/compiler/testData/codegen/boxInline/suspend/inlineUsedAsNoinline/inlineOnly.kt index d85373238fd..d193875de66 100644 --- a/compiler/testData/codegen/boxInline/suspend/inlineUsedAsNoinline/inlineOnly.kt +++ b/compiler/testData/codegen/boxInline/suspend/inlineUsedAsNoinline/inlineOnly.kt @@ -1,3 +1,4 @@ +// IGNORE_FIR_DIAGNOSTICS // WITH_RUNTIME // WITH_COROUTINES // NO_CHECK_LAMBDA_INLINING diff --git a/compiler/testData/codegen/boxInline/suspend/jvmName.kt b/compiler/testData/codegen/boxInline/suspend/jvmName.kt index abe9f30594e..4c512e9eb44 100644 --- a/compiler/testData/codegen/boxInline/suspend/jvmName.kt +++ b/compiler/testData/codegen/boxInline/suspend/jvmName.kt @@ -1,7 +1,7 @@ -// FILE: test.kt -// WITH_RUNTIME // WITH_COROUTINES // NO_CHECK_LAMBDA_INLINING +// WITH_RUNTIME +// FILE: test.kt // TARGET_BACKEND: JVM import kotlin.coroutines.* diff --git a/compiler/testData/codegen/boxInline/suspend/kt26658.kt b/compiler/testData/codegen/boxInline/suspend/kt26658.kt index ead8808034a..6a4708acb64 100644 --- a/compiler/testData/codegen/boxInline/suspend/kt26658.kt +++ b/compiler/testData/codegen/boxInline/suspend/kt26658.kt @@ -1,6 +1,6 @@ -// FILE: inlined.kt -// WITH_RUNTIME // NO_CHECK_LAMBDA_INLINING +// WITH_RUNTIME +// FILE: inlined.kt import kotlin.coroutines.* class Controller(val s: String) diff --git a/compiler/testData/codegen/boxInline/suspend/maxStackWithCrossinline.kt b/compiler/testData/codegen/boxInline/suspend/maxStackWithCrossinline.kt index 53a2f13b391..52c55478056 100644 --- a/compiler/testData/codegen/boxInline/suspend/maxStackWithCrossinline.kt +++ b/compiler/testData/codegen/boxInline/suspend/maxStackWithCrossinline.kt @@ -1,8 +1,8 @@ -// FILE: inlined.kt +// WITH_COROUTINES // WITH_RUNTIME // NO_CHECK_LAMBDA_INLINING // WITH_RUNTIME -// WITH_COROUTINES +// FILE: inlined.kt fun handle(f: suspend () -> Unit) {} open class Foo { diff --git a/compiler/testData/codegen/boxInline/suspend/multipleLocals.kt b/compiler/testData/codegen/boxInline/suspend/multipleLocals.kt index b0e93f73385..d5b1205751c 100644 --- a/compiler/testData/codegen/boxInline/suspend/multipleLocals.kt +++ b/compiler/testData/codegen/boxInline/suspend/multipleLocals.kt @@ -1,7 +1,7 @@ -// FILE: inlined.kt -// WITH_RUNTIME // WITH_COROUTINES // NO_CHECK_LAMBDA_INLINING +// WITH_RUNTIME +// FILE: inlined.kt object Result { var a: String = "" var b: Int = 0 diff --git a/compiler/testData/codegen/boxInline/suspend/multipleSuspensionPoints.kt b/compiler/testData/codegen/boxInline/suspend/multipleSuspensionPoints.kt index 48426297d9c..bd7d6652913 100644 --- a/compiler/testData/codegen/boxInline/suspend/multipleSuspensionPoints.kt +++ b/compiler/testData/codegen/boxInline/suspend/multipleSuspensionPoints.kt @@ -1,7 +1,7 @@ -// FILE: inlined.kt -// WITH_RUNTIME // WITH_COROUTINES // NO_CHECK_LAMBDA_INLINING +// WITH_RUNTIME +// FILE: inlined.kt suspend inline fun inlineMe(c: suspend () -> Unit) { c() diff --git a/compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfCrossinlineSuspend.kt b/compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfCrossinlineSuspend.kt index 3cacae437c4..57c08ce085c 100644 --- a/compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfCrossinlineSuspend.kt +++ b/compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfCrossinlineSuspend.kt @@ -1,6 +1,6 @@ -// FILE: test.kt -// WITH_RUNTIME // WITH_COROUTINES +// WITH_RUNTIME +// FILE: test.kt // SKIP_SOURCEMAP_REMAPPING import kotlin.coroutines.* import helpers.* diff --git a/compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfNoinlineSuspend.kt b/compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfNoinlineSuspend.kt index 86f6d390bc6..27983c09463 100644 --- a/compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfNoinlineSuspend.kt +++ b/compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfNoinlineSuspend.kt @@ -1,6 +1,6 @@ -// FILE: test.kt -// WITH_RUNTIME // WITH_COROUTINES +// WITH_RUNTIME +// FILE: test.kt // SKIP_SOURCEMAP_REMAPPING import kotlin.coroutines.* import helpers.* diff --git a/compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineOrdinary.kt b/compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineOrdinary.kt index 6f3e3ea9f39..227cf591a1a 100644 --- a/compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineOrdinary.kt +++ b/compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineOrdinary.kt @@ -1,7 +1,7 @@ -// FILE: test.kt -// WITH_RUNTIME -// WITH_COROUTINES // IGNORE_BACKEND: JS +// WITH_COROUTINES +// WITH_RUNTIME +// FILE: test.kt import kotlin.coroutines.* import helpers.* diff --git a/compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineSuspend.kt b/compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineSuspend.kt index 9b3e95addfa..c97a816e144 100644 --- a/compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineSuspend.kt +++ b/compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineSuspend.kt @@ -1,6 +1,6 @@ -// FILE: test.kt -// WITH_RUNTIME // WITH_COROUTINES +// WITH_RUNTIME +// FILE: test.kt // SKIP_SOURCEMAP_REMAPPING import kotlin.coroutines.* import helpers.* diff --git a/compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineOrdinary.kt b/compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineOrdinary.kt index 2170b31a764..60991f5f1e8 100644 --- a/compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineOrdinary.kt +++ b/compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineOrdinary.kt @@ -1,7 +1,7 @@ -// FILE: test.kt -// WITH_RUNTIME -// WITH_COROUTINES // IGNORE_BACKEND: JS +// WITH_COROUTINES +// WITH_RUNTIME +// FILE: test.kt import kotlin.coroutines.* import helpers.* diff --git a/compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineSuspend.kt b/compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineSuspend.kt index 260096b26ed..d5e10a525f7 100644 --- a/compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineSuspend.kt +++ b/compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineSuspend.kt @@ -1,6 +1,6 @@ -// FILE: test.kt -// WITH_RUNTIME // WITH_COROUTINES +// WITH_RUNTIME +// FILE: test.kt // SKIP_SOURCEMAP_REMAPPING import kotlin.coroutines.* import helpers.* diff --git a/compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfOrdinary.kt b/compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfOrdinary.kt index f9b1f99e407..d8add2a095e 100644 --- a/compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfOrdinary.kt +++ b/compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfOrdinary.kt @@ -1,7 +1,7 @@ -// FILE: test.kt -// WITH_RUNTIME // WITH_COROUTINES // NO_CHECK_LAMBDA_INLINING +// WITH_RUNTIME +// FILE: test.kt import kotlin.coroutines.* import helpers.* diff --git a/compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfSuspend.kt b/compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfSuspend.kt index 36b3072b44e..dd27ab9f67a 100644 --- a/compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfSuspend.kt +++ b/compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfSuspend.kt @@ -1,7 +1,7 @@ -// FILE: test.kt -// WITH_RUNTIME // WITH_COROUTINES // NO_CHECK_LAMBDA_INLINING +// WITH_RUNTIME +// FILE: test.kt import kotlin.coroutines.* import helpers.* diff --git a/compiler/testData/codegen/boxInline/suspend/returnValue.kt b/compiler/testData/codegen/boxInline/suspend/returnValue.kt index 817db3ecb44..6027ef9dbcb 100644 --- a/compiler/testData/codegen/boxInline/suspend/returnValue.kt +++ b/compiler/testData/codegen/boxInline/suspend/returnValue.kt @@ -1,7 +1,7 @@ -// FILE: inlined.kt -// WITH_RUNTIME // WITH_COROUTINES // NO_CHECK_LAMBDA_INLINING +// WITH_RUNTIME +// FILE: inlined.kt import kotlin.coroutines.* import kotlin.coroutines.intrinsics.* import helpers.* diff --git a/compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambda.kt b/compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambda.kt index 7677d0f4170..3bad0815fe3 100644 --- a/compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambda.kt +++ b/compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambda.kt @@ -1,8 +1,8 @@ -// FILE: inlined.kt -// WITH_RUNTIME +// CHECK_STATE_MACHINE // WITH_COROUTINES // NO_CHECK_LAMBDA_INLINING -// CHECK_STATE_MACHINE +// WITH_RUNTIME +// FILE: inlined.kt suspend inline fun crossinlineMe(crossinline c: suspend () -> Unit) { val l: suspend () -> Unit = { diff --git a/compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaInsideLambda.kt b/compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaInsideLambda.kt index d1a5918c833..dc06546ebf0 100644 --- a/compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaInsideLambda.kt +++ b/compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaInsideLambda.kt @@ -1,9 +1,9 @@ -// IGNORE_BACKEND_FIR: JVM_IR -// FILE: inlined.kt -// WITH_RUNTIME +// CHECK_STATE_MACHINE // WITH_COROUTINES // NO_CHECK_LAMBDA_INLINING -// CHECK_STATE_MACHINE +// WITH_RUNTIME +// IGNORE_BACKEND_FIR: JVM_IR +// FILE: inlined.kt suspend inline fun crossinlineMe(crossinline c: suspend () -> Unit) { val l: suspend () -> Unit = { diff --git a/compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaWithoutCrossinline.kt b/compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaWithoutCrossinline.kt index f286865f78a..7f99a38d66b 100644 --- a/compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaWithoutCrossinline.kt +++ b/compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaWithoutCrossinline.kt @@ -1,8 +1,8 @@ -// FILE: inlined.kt -// WITH_RUNTIME +// CHECK_STATE_MACHINE // WITH_COROUTINES // NO_CHECK_LAMBDA_INLINING -// CHECK_STATE_MACHINE +// WITH_RUNTIME +// FILE: inlined.kt import kotlin.coroutines.intrinsics.* import helpers.* diff --git a/compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadness.kt b/compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadness.kt index fc31a227aea..db10d94fbc6 100644 --- a/compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadness.kt +++ b/compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadness.kt @@ -1,9 +1,9 @@ -// IGNORE_BACKEND_FIR: JVM_IR -// FILE: inlined.kt -// WITH_RUNTIME +// CHECK_STATE_MACHINE // WITH_COROUTINES // NO_CHECK_LAMBDA_INLINING -// CHECK_STATE_MACHINE +// WITH_RUNTIME +// IGNORE_BACKEND_FIR: JVM_IR +// FILE: inlined.kt interface SuspendRunnable { suspend fun run() diff --git a/compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadnessCallSite.kt b/compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadnessCallSite.kt index a60a9da3935..70efa6faab8 100644 --- a/compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadnessCallSite.kt +++ b/compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadnessCallSite.kt @@ -1,9 +1,9 @@ -// IGNORE_BACKEND_FIR: JVM_IR -// FILE: inlined.kt -// WITH_RUNTIME +// CHECK_STATE_MACHINE // WITH_COROUTINES // NO_CHECK_LAMBDA_INLINING -// CHECK_STATE_MACHINE +// WITH_RUNTIME +// IGNORE_BACKEND_FIR: JVM_IR +// FILE: inlined.kt interface SuspendRunnable { suspend fun run() diff --git a/compiler/testData/codegen/boxInline/suspend/stateMachine/innerObject.kt b/compiler/testData/codegen/boxInline/suspend/stateMachine/innerObject.kt index e9912fc010d..79b9e0feb42 100644 --- a/compiler/testData/codegen/boxInline/suspend/stateMachine/innerObject.kt +++ b/compiler/testData/codegen/boxInline/suspend/stateMachine/innerObject.kt @@ -1,8 +1,8 @@ -// FILE: inlined.kt -// WITH_RUNTIME +// CHECK_STATE_MACHINE // WITH_COROUTINES // NO_CHECK_LAMBDA_INLINING -// CHECK_STATE_MACHINE +// WITH_RUNTIME +// FILE: inlined.kt interface SuspendRunnable { suspend fun run() diff --git a/compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectInsideInnerObject.kt b/compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectInsideInnerObject.kt index 47d6a5f9fc6..a06660f30c4 100644 --- a/compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectInsideInnerObject.kt +++ b/compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectInsideInnerObject.kt @@ -1,8 +1,8 @@ -// FILE: inlined.kt -// WITH_RUNTIME +// CHECK_STATE_MACHINE // WITH_COROUTINES // NO_CHECK_LAMBDA_INLINING -// CHECK_STATE_MACHINE +// WITH_RUNTIME +// FILE: inlined.kt interface SuspendRunnable { suspend fun run() diff --git a/compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectSeveralFunctions.kt b/compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectSeveralFunctions.kt index a5c6a414adb..1cfac08b35b 100644 --- a/compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectSeveralFunctions.kt +++ b/compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectSeveralFunctions.kt @@ -1,8 +1,8 @@ -// FILE: inlined.kt -// WITH_RUNTIME +// CHECK_STATE_MACHINE // WITH_COROUTINES // NO_CHECK_LAMBDA_INLINING -// CHECK_STATE_MACHINE +// WITH_RUNTIME +// FILE: inlined.kt interface SuspendRunnable { suspend fun run1() diff --git a/compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectWithoutCapturingCrossinline.kt b/compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectWithoutCapturingCrossinline.kt index 48accc627e6..9f5db6f933e 100644 --- a/compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectWithoutCapturingCrossinline.kt +++ b/compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectWithoutCapturingCrossinline.kt @@ -1,8 +1,8 @@ -// FILE: inlined.kt -// WITH_RUNTIME +// CHECK_STATE_MACHINE // WITH_COROUTINES // NO_CHECK_LAMBDA_INLINING -// CHECK_STATE_MACHINE +// WITH_RUNTIME +// FILE: inlined.kt import kotlin.coroutines.intrinsics.* import helpers.* diff --git a/compiler/testData/codegen/boxInline/suspend/stateMachine/kt30708.kt b/compiler/testData/codegen/boxInline/suspend/stateMachine/kt30708.kt new file mode 100644 index 00000000000..3c0881a6169 --- /dev/null +++ b/compiler/testData/codegen/boxInline/suspend/stateMachine/kt30708.kt @@ -0,0 +1,47 @@ +// WITH_RUNTIME +// WITH_COROUTINES +// CHECK_STATE_MACHINE +// FILE: inline.kt + +import helpers.* + +interface SuspendRunnable { + suspend fun run(): String +} + +inline fun inlineMe(crossinline c1: suspend (String) -> String) = + object : SuspendRunnable { + override suspend fun run(): String { + return c1( + return try { "OK" } catch (e: Exception) { e.message!! } + ) + } + } + + +inline fun inlineMe2(crossinline c2: suspend (String) -> String) = + inlineMe(c2) + +// FILE: box.kt + +import helpers.* +import kotlin.coroutines.* + +fun builder(c: suspend () -> Unit) { + c.startCoroutine(CheckStateMachineContinuation) +} + +fun box(): String { + val r = inlineMe2 { + StateMachineChecker.suspendHere() + it + } + + var res = "FAIL" + + builder { + res = r.run() + } + StateMachineChecker.check(numberOfSuspensions = 0) + return res +} diff --git a/compiler/testData/codegen/boxInline/suspend/stateMachine/lambdaTransformation.kt b/compiler/testData/codegen/boxInline/suspend/stateMachine/lambdaTransformation.kt index fafeea1c713..3833dbc2175 100644 --- a/compiler/testData/codegen/boxInline/suspend/stateMachine/lambdaTransformation.kt +++ b/compiler/testData/codegen/boxInline/suspend/stateMachine/lambdaTransformation.kt @@ -1,8 +1,8 @@ -// FILE: test.kt -// WITH_RUNTIME -// WITH_COROUTINES // CHECK_STATE_MACHINE +// WITH_COROUTINES // NO_CHECK_LAMBDA_INLINING +// WITH_RUNTIME +// FILE: test.kt import helpers.* import kotlin.coroutines.* @@ -47,4 +47,4 @@ fun box(): String { Sample().test() StateMachineChecker.check(0, checkFinished = false) return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/boxInline/suspend/stateMachine/normalInline.kt b/compiler/testData/codegen/boxInline/suspend/stateMachine/normalInline.kt index 6fd44fd96b6..dc9ae43c1fa 100644 --- a/compiler/testData/codegen/boxInline/suspend/stateMachine/normalInline.kt +++ b/compiler/testData/codegen/boxInline/suspend/stateMachine/normalInline.kt @@ -1,8 +1,8 @@ -// FILE: inlined.kt -// WITH_RUNTIME +// CHECK_STATE_MACHINE // WITH_COROUTINES // NO_CHECK_LAMBDA_INLINING -// CHECK_STATE_MACHINE +// WITH_RUNTIME +// FILE: inlined.kt suspend inline fun crossinlineMe(crossinline c: suspend () -> Unit) { c() diff --git a/compiler/testData/codegen/boxInline/suspend/stateMachine/numberOfSuspentions.kt b/compiler/testData/codegen/boxInline/suspend/stateMachine/numberOfSuspentions.kt index b95ad874df8..abc7caf0bd7 100644 --- a/compiler/testData/codegen/boxInline/suspend/stateMachine/numberOfSuspentions.kt +++ b/compiler/testData/codegen/boxInline/suspend/stateMachine/numberOfSuspentions.kt @@ -1,8 +1,8 @@ -// FILE: inlined.kt -// WITH_RUNTIME +// CHECK_STATE_MACHINE // WITH_COROUTINES // NO_CHECK_LAMBDA_INLINING -// CHECK_STATE_MACHINE +// WITH_RUNTIME +// FILE: inlined.kt suspend inline fun crossinlineMe(crossinline c: suspend () -> Unit) { val l: suspend () -> Unit = { c() } diff --git a/compiler/testData/codegen/boxInline/suspend/stateMachine/unreachableSuspendMarker.kt b/compiler/testData/codegen/boxInline/suspend/stateMachine/unreachableSuspendMarker.kt index 59c4e082522..5e230a600cf 100644 --- a/compiler/testData/codegen/boxInline/suspend/stateMachine/unreachableSuspendMarker.kt +++ b/compiler/testData/codegen/boxInline/suspend/stateMachine/unreachableSuspendMarker.kt @@ -1,9 +1,10 @@ -// FILE: inline.kt -// WITH_RUNTIME -// WITH_COROUTINES -// FULL_JDK -// NO_CHECK_LAMBDA_INLINING // CHECK_STATE_MACHINE +// WITH_COROUTINES +// WITH_COROUTINES +// NO_CHECK_LAMBDA_INLINING +// FULL_JDK +// WITH_RUNTIME +// FILE: inline.kt import helpers.* import kotlin.coroutines.intrinsics.* @@ -17,7 +18,6 @@ inline suspend fun inlineMe(): Unit { } // FILE: box.kt -// WITH_COROUTINES import kotlin.coroutines.* import helpers.* diff --git a/compiler/testData/codegen/boxInline/suspend/tryCatchReceiver.kt b/compiler/testData/codegen/boxInline/suspend/tryCatchReceiver.kt index e3c6e91aaee..f3035250a83 100644 --- a/compiler/testData/codegen/boxInline/suspend/tryCatchReceiver.kt +++ b/compiler/testData/codegen/boxInline/suspend/tryCatchReceiver.kt @@ -1,7 +1,7 @@ -// FILE: inlined.kt -// WITH_RUNTIME // WITH_COROUTINES // NO_CHECK_LAMBDA_INLINING +// WITH_RUNTIME +// FILE: inlined.kt interface Flow { suspend fun collect(collector: FlowCollector) diff --git a/compiler/testData/codegen/boxInline/suspend/tryCatchStackTransform.kt b/compiler/testData/codegen/boxInline/suspend/tryCatchStackTransform.kt index ce8cd56391d..ebb30f0aa42 100644 --- a/compiler/testData/codegen/boxInline/suspend/tryCatchStackTransform.kt +++ b/compiler/testData/codegen/boxInline/suspend/tryCatchStackTransform.kt @@ -1,7 +1,7 @@ -// FILE: inlined.kt -// WITH_RUNTIME // WITH_COROUTINES // NO_CHECK_LAMBDA_INLINING +// WITH_RUNTIME +// FILE: inlined.kt suspend inline fun inlineMe(c: suspend (String) -> String, d: suspend () -> String): String { return c(try { d() } catch (e: Exception) { "Exception 1 ${e.message}" }) diff --git a/compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/directFieldAccessInCrossInline.kt b/compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/directFieldAccessInCrossInline.kt index ff03266a302..03ba10fb886 100644 --- a/compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/directFieldAccessInCrossInline.kt +++ b/compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/directFieldAccessInCrossInline.kt @@ -1,3 +1,4 @@ +// NO_CHECK_LAMBDA_INLINING // FILE: 1.kt package test @@ -7,8 +8,6 @@ inline fun call(crossinline s: () -> String): String { } // FILE: 2.kt - -//NO_CHECK_LAMBDA_INLINING import test.* class A { diff --git a/compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/privateInCrossInline.kt b/compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/privateInCrossInline.kt index 4bf507eea06..601ff564e81 100644 --- a/compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/privateInCrossInline.kt +++ b/compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/privateInCrossInline.kt @@ -1,3 +1,4 @@ +// NO_CHECK_LAMBDA_INLINING // FILE: 1.kt package test @@ -9,8 +10,6 @@ inline fun call(crossinline s: () -> String): String { } // FILE: 2.kt - -//NO_CHECK_LAMBDA_INLINING import test.* class A { diff --git a/compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/superInCrossInline.kt b/compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/superInCrossInline.kt index 4c5559410c1..8ba4ec259d5 100644 --- a/compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/superInCrossInline.kt +++ b/compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/superInCrossInline.kt @@ -1,5 +1,6 @@ -// FILE: 1.kt +// NO_CHECK_LAMBDA_INLINING +// FILE: 1.kt package test inline fun call(crossinline s: () -> String): String { @@ -16,8 +17,6 @@ open class Base { } // FILE: 2.kt - -//NO_CHECK_LAMBDA_INLINING import test.* class A : Base() { diff --git a/compiler/testData/codegen/boxInline/tryCatchFinally/tryCatch.kt b/compiler/testData/codegen/boxInline/tryCatchFinally/tryCatch.kt index 2a7cce314b1..0667e62e7eb 100644 --- a/compiler/testData/codegen/boxInline/tryCatchFinally/tryCatch.kt +++ b/compiler/testData/codegen/boxInline/tryCatchFinally/tryCatch.kt @@ -1,6 +1,6 @@ -// FILE: 1.kt // WITH_RUNTIME // KJS_WITH_FULL_RUNTIME +// FILE: 1.kt class My(val value: Int) diff --git a/compiler/testData/codegen/boxInline/tryCatchFinally/tryCatch2.kt b/compiler/testData/codegen/boxInline/tryCatchFinally/tryCatch2.kt index ce2bdba99aa..b7e45eb1b1f 100644 --- a/compiler/testData/codegen/boxInline/tryCatchFinally/tryCatch2.kt +++ b/compiler/testData/codegen/boxInline/tryCatchFinally/tryCatch2.kt @@ -1,6 +1,6 @@ -// FILE: 1.kt // WITH_RUNTIME // KJS_WITH_FULL_RUNTIME +// FILE: 1.kt class My(val value: Int) diff --git a/compiler/testData/codegen/boxInline/tryCatchFinally/tryCatchFinally.kt b/compiler/testData/codegen/boxInline/tryCatchFinally/tryCatchFinally.kt index 15020c02fc8..a824368c775 100644 --- a/compiler/testData/codegen/boxInline/tryCatchFinally/tryCatchFinally.kt +++ b/compiler/testData/codegen/boxInline/tryCatchFinally/tryCatchFinally.kt @@ -1,6 +1,6 @@ -// FILE: 1.kt // WITH_RUNTIME // KJS_WITH_FULL_RUNTIME +// FILE: 1.kt class My(val value: Int) diff --git a/compiler/testData/codegen/boxInline/varargs/kt17653.kt b/compiler/testData/codegen/boxInline/varargs/kt17653.kt index c5b4c61339e..e6c48fdc149 100644 --- a/compiler/testData/codegen/boxInline/varargs/kt17653.kt +++ b/compiler/testData/codegen/boxInline/varargs/kt17653.kt @@ -15,4 +15,3 @@ fun box(): String { this + "K" } } - diff --git a/compiler/testData/codegen/boxInline/varargs/varargAndDefaultParameters.kt b/compiler/testData/codegen/boxInline/varargs/varargAndDefaultParameters.kt index 4e4f5cbd8df..9a0a8351d20 100644 --- a/compiler/testData/codegen/boxInline/varargs/varargAndDefaultParameters.kt +++ b/compiler/testData/codegen/boxInline/varargs/varargAndDefaultParameters.kt @@ -15,4 +15,3 @@ fun box(): String { this + "K" } } - diff --git a/compiler/testData/codegen/boxInline/varargs/varargAndDefaultParameters2.kt b/compiler/testData/codegen/boxInline/varargs/varargAndDefaultParameters2.kt index 6de05961739..59de2f06ff8 100644 --- a/compiler/testData/codegen/boxInline/varargs/varargAndDefaultParameters2.kt +++ b/compiler/testData/codegen/boxInline/varargs/varargAndDefaultParameters2.kt @@ -1,5 +1,5 @@ -// FILE: 1.kt // WITH_RUNTIME +// FILE: 1.kt // KJS_WITH_FULL_RUNTIME package test @@ -16,4 +16,3 @@ fun box(): String { this } } - diff --git a/compiler/testData/codegen/bytecodeListing/accessorsForProtectedStaticJavaFieldInOtherPackage.kt b/compiler/testData/codegen/bytecodeListing/accessorsForProtectedStaticJavaFieldInOtherPackage.kt new file mode 100644 index 00000000000..1b4cc64ff53 --- /dev/null +++ b/compiler/testData/codegen/bytecodeListing/accessorsForProtectedStaticJavaFieldInOtherPackage.kt @@ -0,0 +1,22 @@ +// FILE: C.kt +package test + +class C: A.B() { + // For binary compatibility, two accessibility bridges should be generated in C: + // one for A.x and one for A.B.x. + // Otherwise, if a static 'x' field is added to A.B either A.x or A.B.x will be ignored. + // The JVM backend generates accessibility bridges for setters as well which is not necessary. + fun f() = ({ A.x + x })() + // Similarly for static functions. Two bridges should be generated for binary compatibility. + fun g() = ({ A.h() + h() }) +} + +// FILE: A.java +public class A { + protected static String x = "O"; + protected static String h() { return "O"; } + public static class B extends A { + + } +} + diff --git a/compiler/testData/codegen/bytecodeListing/accessorsForProtectedStaticJavaFieldInOtherPackage.txt b/compiler/testData/codegen/bytecodeListing/accessorsForProtectedStaticJavaFieldInOtherPackage.txt new file mode 100644 index 00000000000..df53b286d3c --- /dev/null +++ b/compiler/testData/codegen/bytecodeListing/accessorsForProtectedStaticJavaFieldInOtherPackage.txt @@ -0,0 +1,39 @@ +@kotlin.Metadata +final class test/C$f$1 { + // source: 'C.kt' + enclosing method test/C.f()Ljava/lang/String; + public final static field INSTANCE: test.C$f$1 + inner (anonymous) class test/C$f$1 + static method (): void + method (): void + public synthetic bridge method invoke(): java.lang.Object + public final @org.jetbrains.annotations.NotNull method invoke(): java.lang.String +} + +@kotlin.Metadata +final class test/C$g$1 { + // source: 'C.kt' + enclosing method test/C.g()Lkotlin/jvm/functions/Function0; + public final static field INSTANCE: test.C$g$1 + inner (anonymous) class test/C$g$1 + static method (): void + method (): void + public synthetic bridge method invoke(): java.lang.Object + public final @org.jetbrains.annotations.NotNull method invoke(): java.lang.String +} + +@kotlin.Metadata +public final class test/C { + // source: 'C.kt' + inner (anonymous) class test/C$f$1 + inner (anonymous) class test/C$g$1 + public method (): void + public synthetic final static method access$getX$p$s65(): java.lang.String + public synthetic final static method access$getX$p$s66(): java.lang.String + public synthetic final static method access$h$s65(): java.lang.String + public synthetic final static method access$h$s66(): java.lang.String + public synthetic final static method access$setX$p$s65(p0: java.lang.String): void + public synthetic final static method access$setX$p$s66(p0: java.lang.String): void + public final @org.jetbrains.annotations.NotNull method f(): java.lang.String + public final @org.jetbrains.annotations.NotNull method g(): kotlin.jvm.functions.Function0 +} diff --git a/compiler/testData/codegen/bytecodeListing/accessorsForProtectedStaticJavaFieldInOtherPackage_ir.txt b/compiler/testData/codegen/bytecodeListing/accessorsForProtectedStaticJavaFieldInOtherPackage_ir.txt new file mode 100644 index 00000000000..757bed47689 --- /dev/null +++ b/compiler/testData/codegen/bytecodeListing/accessorsForProtectedStaticJavaFieldInOtherPackage_ir.txt @@ -0,0 +1,37 @@ +@kotlin.Metadata +final class test/C$f$1 { + // source: 'C.kt' + enclosing method test/C.f()Ljava/lang/String; + public final static field INSTANCE: test.C$f$1 + inner (anonymous) class test/C$f$1 + static method (): void + method (): void + public synthetic bridge method invoke(): java.lang.Object + public final @org.jetbrains.annotations.NotNull method invoke(): java.lang.String +} + +@kotlin.Metadata +final class test/C$g$1 { + // source: 'C.kt' + enclosing method test/C.g()Lkotlin/jvm/functions/Function0; + public final static field INSTANCE: test.C$g$1 + inner (anonymous) class test/C$g$1 + static method (): void + method (): void + public synthetic bridge method invoke(): java.lang.Object + public final @org.jetbrains.annotations.NotNull method invoke(): java.lang.String +} + +@kotlin.Metadata +public final class test/C { + // source: 'C.kt' + inner (anonymous) class test/C$f$1 + inner (anonymous) class test/C$g$1 + public method (): void + public synthetic final static method access$getX$p$s65(): java.lang.String + public synthetic final static method access$getX$p$s66(): java.lang.String + public synthetic final static method access$h$s65(): java.lang.String + public synthetic final static method access$h$s66(): java.lang.String + public final @org.jetbrains.annotations.NotNull method f(): java.lang.String + public final @org.jetbrains.annotations.NotNull method g(): kotlin.jvm.functions.Function0 +} diff --git a/compiler/testData/codegen/bytecodeListing/inlineClasses/inlineCollection/UIntArrayWithFullJdk_ir.txt b/compiler/testData/codegen/bytecodeListing/inlineClasses/inlineCollection/UIntArrayWithFullJdk_ir.txt index 44b3d3082ac..0c1b909eada 100644 --- a/compiler/testData/codegen/bytecodeListing/inlineClasses/inlineCollection/UIntArrayWithFullJdk_ir.txt +++ b/compiler/testData/codegen/bytecodeListing/inlineClasses/inlineCollection/UIntArrayWithFullJdk_ir.txt @@ -29,7 +29,7 @@ public final class UIntArray { public synthetic final static method box-impl(p0: int[]): UIntArray public method clear(): void public static @org.jetbrains.annotations.NotNull method constructor-impl(@org.jetbrains.annotations.NotNull p0: int[]): int[] - public synthetic bridge method contains(p0: java.lang.Object): boolean + public bridge final method contains(p0: java.lang.Object): boolean public method contains-fLmw4x8(p0: int): boolean public static method contains-fLmw4x8(p0: int[], p1: int): boolean public method containsAll(@org.jetbrains.annotations.NotNull p0: java.util.Collection): boolean diff --git a/compiler/testData/codegen/bytecodeListing/inlineClasses/inlineCollectionOfInlineClass/collection_ir.txt b/compiler/testData/codegen/bytecodeListing/inlineClasses/inlineCollectionOfInlineClass/collection_ir.txt index 120be8748b7..c10951b8475 100644 --- a/compiler/testData/codegen/bytecodeListing/inlineClasses/inlineCollectionOfInlineClass/collection_ir.txt +++ b/compiler/testData/codegen/bytecodeListing/inlineClasses/inlineCollectionOfInlineClass/collection_ir.txt @@ -25,7 +25,7 @@ public final class InlineCollection { public synthetic final static method box-impl(p0: java.util.Collection): InlineCollection public method clear(): void public static method constructor-impl(p0: java.util.Collection): java.util.Collection - public synthetic bridge method contains(p0: java.lang.Object): boolean + public bridge final method contains(p0: java.lang.Object): boolean public method contains-jHY5zpA(p0: int): boolean public static method contains-jHY5zpA(p0: java.util.Collection, p1: int): boolean public method containsAll(p0: java.util.Collection): boolean diff --git a/compiler/testData/codegen/bytecodeListing/inlineClasses/inlineCollectionOfInlineClass/list_ir.txt b/compiler/testData/codegen/bytecodeListing/inlineClasses/inlineCollectionOfInlineClass/list_ir.txt index 40a3cd61795..e8f71deff56 100644 --- a/compiler/testData/codegen/bytecodeListing/inlineClasses/inlineCollectionOfInlineClass/list_ir.txt +++ b/compiler/testData/codegen/bytecodeListing/inlineClasses/inlineCollectionOfInlineClass/list_ir.txt @@ -28,7 +28,7 @@ public final class InlineList { public synthetic final static method box-impl(p0: java.util.List): InlineList public method clear(): void public static method constructor-impl(p0: java.util.List): java.util.List - public synthetic bridge method contains(p0: java.lang.Object): boolean + public bridge final method contains(p0: java.lang.Object): boolean public method contains-jHY5zpA(p0: int): boolean public static method contains-jHY5zpA(p0: java.util.List, p1: int): boolean public method containsAll(p0: java.util.Collection): boolean @@ -43,14 +43,14 @@ public final class InlineList { public static method getSize-impl(p0: java.util.List): int public method hashCode(): int public static method hashCode-impl(p0: java.util.List): int - public synthetic bridge method indexOf(p0: java.lang.Object): int + public bridge final method indexOf(p0: java.lang.Object): int public method indexOf-jHY5zpA(p0: int): int public static method indexOf-jHY5zpA(p0: java.util.List, p1: int): int public method isEmpty(): boolean public static method isEmpty-impl(p0: java.util.List): boolean public method iterator(): java.util.Iterator public static method iterator-impl(p0: java.util.List): java.util.Iterator - public synthetic bridge method lastIndexOf(p0: java.lang.Object): int + public bridge final method lastIndexOf(p0: java.lang.Object): int public method lastIndexOf-jHY5zpA(p0: int): int public static method lastIndexOf-jHY5zpA(p0: java.util.List, p1: int): int public method listIterator(): java.util.ListIterator diff --git a/compiler/testData/codegen/bytecodeListing/inlineClasses/inlineCollectionOfInlineClass/map_ir.txt b/compiler/testData/codegen/bytecodeListing/inlineClasses/inlineCollectionOfInlineClass/map_ir.txt index 8e8a274d498..da9c4407692 100644 --- a/compiler/testData/codegen/bytecodeListing/inlineClasses/inlineCollectionOfInlineClass/map_ir.txt +++ b/compiler/testData/codegen/bytecodeListing/inlineClasses/inlineCollectionOfInlineClass/map_ir.txt @@ -39,16 +39,17 @@ public final class InlineMap { public synthetic final static method box-impl(p0: java.util.Map): InlineMap public method clear(): void public static method constructor-impl(p0: java.util.Map): java.util.Map - public synthetic bridge method containsKey(p0: java.lang.Object): boolean + public bridge final method containsKey(p0: java.lang.Object): boolean public method containsKey-FSIWiWE(p0: int): boolean public static method containsKey-FSIWiWE(p0: java.util.Map, p1: int): boolean - public synthetic bridge method containsValue(p0: java.lang.Object): boolean + public bridge final method containsValue(p0: java.lang.Object): boolean public method containsValue-jbX5DO8(p0: double): boolean public static method containsValue-jbX5DO8(p0: java.util.Map, p1: double): boolean public synthetic bridge method entrySet(): java.util.Set public method equals(p0: java.lang.Object): boolean public static method equals-impl(p0: java.util.Map, p1: java.lang.Object): boolean public final static method equals-impl0(p0: java.util.Map, p1: java.util.Map): boolean + public bridge final method get(p0: java.lang.Object): IV public synthetic bridge method get(p0: java.lang.Object): java.lang.Object public method get-qgyy0Jc(p0: int): IV public static method get-qgyy0Jc(p0: java.util.Map, p1: int): IV diff --git a/compiler/testData/codegen/bytecodeListing/inlineClasses/inlineCollectionOfInlineClass/mutableCollection_ir.txt b/compiler/testData/codegen/bytecodeListing/inlineClasses/inlineCollectionOfInlineClass/mutableCollection_ir.txt index 73a1c6a8a28..575f2f46d03 100644 --- a/compiler/testData/codegen/bytecodeListing/inlineClasses/inlineCollectionOfInlineClass/mutableCollection_ir.txt +++ b/compiler/testData/codegen/bytecodeListing/inlineClasses/inlineCollectionOfInlineClass/mutableCollection_ir.txt @@ -28,7 +28,7 @@ public final class InlineMutableCollection { public method clear(): void public static method clear-impl(p0: java.util.Collection): void public static method constructor-impl(p0: java.util.Collection): java.util.Collection - public synthetic bridge method contains(p0: java.lang.Object): boolean + public bridge final method contains(p0: java.lang.Object): boolean public method contains-jHY5zpA(p0: int): boolean public static method contains-jHY5zpA(p0: java.util.Collection, p1: int): boolean public method containsAll(p0: java.util.Collection): boolean diff --git a/compiler/testData/codegen/bytecodeListing/inlineClasses/inlineCollectionOfInlineClass/mutableList_ir.txt b/compiler/testData/codegen/bytecodeListing/inlineClasses/inlineCollectionOfInlineClass/mutableList_ir.txt index e95e8ff4ae3..7af209ff5cc 100644 --- a/compiler/testData/codegen/bytecodeListing/inlineClasses/inlineCollectionOfInlineClass/mutableList_ir.txt +++ b/compiler/testData/codegen/bytecodeListing/inlineClasses/inlineCollectionOfInlineClass/mutableList_ir.txt @@ -33,7 +33,7 @@ public final class InlineMutableList { public method clear(): void public static method clear-impl(p0: java.util.List): void public static method constructor-impl(p0: java.util.List): java.util.List - public synthetic bridge method contains(p0: java.lang.Object): boolean + public bridge final method contains(p0: java.lang.Object): boolean public static method contains-jHY5zpA(p0: java.util.List, p1: long): boolean public method contains-jHY5zpA(p0: long): boolean public method containsAll(p0: java.util.Collection): boolean @@ -48,14 +48,14 @@ public final class InlineMutableList { public static method getSize-impl(p0: java.util.List): int public method hashCode(): int public static method hashCode-impl(p0: java.util.List): int - public synthetic bridge method indexOf(p0: java.lang.Object): int + public bridge final method indexOf(p0: java.lang.Object): int public static method indexOf-jHY5zpA(p0: java.util.List, p1: long): int public method indexOf-jHY5zpA(p0: long): int public method isEmpty(): boolean public static method isEmpty-impl(p0: java.util.List): boolean public method iterator(): java.util.Iterator public static method iterator-impl(p0: java.util.List): java.util.Iterator - public synthetic bridge method lastIndexOf(p0: java.lang.Object): int + public bridge final method lastIndexOf(p0: java.lang.Object): int public static method lastIndexOf-jHY5zpA(p0: java.util.List, p1: long): int public method lastIndexOf-jHY5zpA(p0: long): int public method listIterator(): java.util.ListIterator diff --git a/compiler/testData/codegen/bytecodeListing/inlineClasses/inlineCollectionOfInlineClass/mutableMap_ir.txt b/compiler/testData/codegen/bytecodeListing/inlineClasses/inlineCollectionOfInlineClass/mutableMap_ir.txt index 3cd6ac061ca..c879e3ba8fe 100644 --- a/compiler/testData/codegen/bytecodeListing/inlineClasses/inlineCollectionOfInlineClass/mutableMap_ir.txt +++ b/compiler/testData/codegen/bytecodeListing/inlineClasses/inlineCollectionOfInlineClass/mutableMap_ir.txt @@ -40,16 +40,17 @@ public final class InlineMutableMap { public method clear(): void public static method clear-impl(p0: java.util.Map): void public static method constructor-impl(p0: java.util.Map): java.util.Map - public synthetic bridge method containsKey(p0: java.lang.Object): boolean + public bridge final method containsKey(p0: java.lang.Object): boolean public method containsKey-FSIWiWE(p0: int): boolean public static method containsKey-FSIWiWE(p0: java.util.Map, p1: int): boolean - public synthetic bridge method containsValue(p0: java.lang.Object): boolean + public bridge final method containsValue(p0: java.lang.Object): boolean public method containsValue-jbX5DO8(p0: double): boolean public static method containsValue-jbX5DO8(p0: java.util.Map, p1: double): boolean public synthetic bridge method entrySet(): java.util.Set public method equals(p0: java.lang.Object): boolean public static method equals-impl(p0: java.util.Map, p1: java.lang.Object): boolean public final static method equals-impl0(p0: java.util.Map, p1: java.util.Map): boolean + public bridge final method get(p0: java.lang.Object): IV public synthetic bridge method get(p0: java.lang.Object): java.lang.Object public method get-qgyy0Jc(p0: int): IV public static method get-qgyy0Jc(p0: java.util.Map, p1: int): IV diff --git a/compiler/testData/codegen/bytecodeListing/inlineClasses/inlineCollectionOfInlineClass/mutableSet2_ir.txt b/compiler/testData/codegen/bytecodeListing/inlineClasses/inlineCollectionOfInlineClass/mutableSet2_ir.txt index 2b408cd103b..c68d863467e 100644 --- a/compiler/testData/codegen/bytecodeListing/inlineClasses/inlineCollectionOfInlineClass/mutableSet2_ir.txt +++ b/compiler/testData/codegen/bytecodeListing/inlineClasses/inlineCollectionOfInlineClass/mutableSet2_ir.txt @@ -45,7 +45,7 @@ public final class InlineMutableSet2 { public method clear(): void public static method clear-impl(p0: java.util.Set): void public static method constructor-impl(p0: java.util.Set): java.util.Set - public synthetic bridge method contains(p0: java.lang.Object): boolean + public bridge final method contains(p0: java.lang.Object): boolean public method contains-C2ZI6mw(p0: int): boolean public static method contains-C2ZI6mw(p0: java.util.Set, p1: int): boolean public method containsAll(p0: java.util.Collection): boolean diff --git a/compiler/testData/codegen/bytecodeListing/inlineClasses/inlineCollectionOfInlineClass/mutableSet_ir.txt b/compiler/testData/codegen/bytecodeListing/inlineClasses/inlineCollectionOfInlineClass/mutableSet_ir.txt index 0724572ec0e..4fc590cc770 100644 --- a/compiler/testData/codegen/bytecodeListing/inlineClasses/inlineCollectionOfInlineClass/mutableSet_ir.txt +++ b/compiler/testData/codegen/bytecodeListing/inlineClasses/inlineCollectionOfInlineClass/mutableSet_ir.txt @@ -28,7 +28,7 @@ public final class InlineMutableSet { public method clear(): void public static method clear-impl(p0: java.util.Set): void public static method constructor-impl(p0: java.util.Set): java.util.Set - public synthetic bridge method contains(p0: java.lang.Object): boolean + public bridge final method contains(p0: java.lang.Object): boolean public method contains-jHY5zpA(p0: int): boolean public static method contains-jHY5zpA(p0: java.util.Set, p1: int): boolean public method containsAll(p0: java.util.Collection): boolean diff --git a/compiler/testData/codegen/bytecodeListing/inlineClasses/inlineCollectionOfInlineClass/set_ir.txt b/compiler/testData/codegen/bytecodeListing/inlineClasses/inlineCollectionOfInlineClass/set_ir.txt index 598f2a92f7c..377d4e338dc 100644 --- a/compiler/testData/codegen/bytecodeListing/inlineClasses/inlineCollectionOfInlineClass/set_ir.txt +++ b/compiler/testData/codegen/bytecodeListing/inlineClasses/inlineCollectionOfInlineClass/set_ir.txt @@ -25,7 +25,7 @@ public final class InlineSet { public synthetic final static method box-impl(p0: java.util.Set): InlineSet public method clear(): void public static method constructor-impl(p0: java.util.Set): java.util.Set - public synthetic bridge method contains(p0: java.lang.Object): boolean + public bridge final method contains(p0: java.lang.Object): boolean public method contains-jHY5zpA(p0: int): boolean public static method contains-jHY5zpA(p0: java.util.Set, p1: int): boolean public method containsAll(p0: java.util.Collection): boolean diff --git a/compiler/testData/codegen/bytecodeListing/inlineClasses/publishedApiAnnotationOnInlineClassConstructor.kt b/compiler/testData/codegen/bytecodeListing/inlineClasses/publishedApiAnnotationOnInlineClassConstructor.kt index 0f122f258d6..7aca9a1fa4b 100644 --- a/compiler/testData/codegen/bytecodeListing/inlineClasses/publishedApiAnnotationOnInlineClassConstructor.kt +++ b/compiler/testData/codegen/bytecodeListing/inlineClasses/publishedApiAnnotationOnInlineClassConstructor.kt @@ -1,4 +1,3 @@ // !LANGUAGE: +InlineClasses -@Suppress("NON_PUBLIC_PRIMARY_CONSTRUCTOR_OF_INLINE_CLASS") inline class Z @PublishedApi internal constructor(val value: Int) \ No newline at end of file diff --git a/compiler/testData/codegen/bytecodeListing/specialBridges/unsignedArray_ir.txt b/compiler/testData/codegen/bytecodeListing/specialBridges/unsignedArray_ir.txt index a42fe476c10..e5962c29b60 100644 --- a/compiler/testData/codegen/bytecodeListing/specialBridges/unsignedArray_ir.txt +++ b/compiler/testData/codegen/bytecodeListing/specialBridges/unsignedArray_ir.txt @@ -8,7 +8,7 @@ public final class UIntArray { public synthetic final static method box-impl(p0: int[]): UIntArray public method clear(): void public static method constructor-impl(p0: int[]): int[] - public synthetic bridge method contains(p0: java.lang.Object): boolean + public bridge final method contains(p0: java.lang.Object): boolean public method contains-WZ4Q5Ns(p0: int): boolean public static method contains-WZ4Q5Ns(p0: int[], p1: int): boolean public method containsAll(p0: java.util.Collection): boolean diff --git a/compiler/testData/codegen/bytecodeText/boxingOptimization/hashCodeOnNonNull.kt b/compiler/testData/codegen/bytecodeText/boxingOptimization/hashCodeOnNonNull.kt new file mode 100644 index 00000000000..4553487d949 --- /dev/null +++ b/compiler/testData/codegen/bytecodeText/boxingOptimization/hashCodeOnNonNull.kt @@ -0,0 +1,11 @@ +// IGNORE_BACKEND: JVM_IR +// IGNORE_BACKEND_FIR: JVM_IR + +fun foo() { + val x: Int? = 6 + val hc = x!!.hashCode() +} + +// 1 java/lang/Integer.hashCode \(I\)I +// 0 java/lang/Integer.valueOf +// 0 intValue diff --git a/compiler/testData/codegen/bytecodeText/boxingOptimization/kt7224.kt b/compiler/testData/codegen/bytecodeText/boxingOptimization/kt7224.kt index ec6fa03d080..b0f044f0422 100644 --- a/compiler/testData/codegen/bytecodeText/boxingOptimization/kt7224.kt +++ b/compiler/testData/codegen/bytecodeText/boxingOptimization/kt7224.kt @@ -1,7 +1,9 @@ +// IGNORE_BACKEND_FIR: JVM_IR + fun box(): String { 230?.hashCode() return "OK" } -// 1 INVOKESTATIC java/lang/Integer.valueOf \ No newline at end of file +// 0 INVOKESTATIC java/lang/Integer.valueOf diff --git a/compiler/testData/codegen/bytecodeText/boxingOptimization/unsafeRemoving.kt b/compiler/testData/codegen/bytecodeText/boxingOptimization/unsafeRemoving.kt index 0c211227755..7d9625025f8 100644 --- a/compiler/testData/codegen/bytecodeText/boxingOptimization/unsafeRemoving.kt +++ b/compiler/testData/codegen/bytecodeText/boxingOptimization/unsafeRemoving.kt @@ -15,9 +15,6 @@ fun foo() { val b = arrayOfNulls(4) b[100] = 5 - val x: Int? = 6 - val hc = x!!.hashCode() - val y: Int? = 7 val z: Int? = 8 val res = y === z @@ -26,5 +23,5 @@ fun foo() { val c2: Any = if (1 != one) 0 else "abc" } -// 9 java/lang/Integer.valueOf +// 8 java/lang/Integer.valueOf // 0 intValue diff --git a/compiler/testData/codegen/bytecodeText/capturedVarsOptimization/returnValueOfArrayConstructor.kt b/compiler/testData/codegen/bytecodeText/capturedVarsOptimization/returnValueOfArrayConstructor.kt new file mode 100644 index 00000000000..2887fa456fc --- /dev/null +++ b/compiler/testData/codegen/bytecodeText/capturedVarsOptimization/returnValueOfArrayConstructor.kt @@ -0,0 +1,5 @@ +fun f() = IntArray(1) { run { return@IntArray 1 } } + +// On JVM_IR, the return is an assignment to a captured var followed by +// a non-local `break` from a `do ... while (false)`. The var should be optimized. +// 0 IntRef diff --git a/compiler/testData/codegen/bytecodeText/hashCode/hashCode.kt b/compiler/testData/codegen/bytecodeText/hashCode/hashCode_1_6.kt similarity index 93% rename from compiler/testData/codegen/bytecodeText/hashCode/hashCode.kt rename to compiler/testData/codegen/bytecodeText/hashCode/hashCode_1_6.kt index 19a7de41578..6bec2e9f0b0 100644 --- a/compiler/testData/codegen/bytecodeText/hashCode/hashCode.kt +++ b/compiler/testData/codegen/bytecodeText/hashCode/hashCode_1_6.kt @@ -1,3 +1,5 @@ +// JVM_TARGET: 1.6 + fun box(): String { true.hashCode() 1.toByte().hashCode() diff --git a/compiler/testData/codegen/bytecodeText/inlineClasses/skipCallToUnderlyingValueOfInlineClass.kt b/compiler/testData/codegen/bytecodeText/inlineClasses/skipCallToUnderlyingValueOfInlineClass.kt index 644a4d128e9..a45f8f0f14c 100644 --- a/compiler/testData/codegen/bytecodeText/inlineClasses/skipCallToUnderlyingValueOfInlineClass.kt +++ b/compiler/testData/codegen/bytecodeText/inlineClasses/skipCallToUnderlyingValueOfInlineClass.kt @@ -1,4 +1,5 @@ // !LANGUAGE: +InlineClasses +// IGNORE_BACKEND_FIR: JVM_IR // FILE: utils.kt @@ -9,7 +10,7 @@ inline class UInt(val value: Int) fun test(u1: UInt, u2: UInt) { val a = u1.value - val b = u1.value.hashCode() // box int to call hashCode + val b = u1.value.hashCode() val c = u1.value + u2.value } @@ -18,5 +19,5 @@ fun test(u1: UInt, u2: UInt) { // 0 INVOKESTATIC UInt\$Erased.box // 0 INVOKEVIRTUAL UInt.unbox -// 1 valueOf -// 0 intValue \ No newline at end of file +// 0 valueOf +// 0 intValue diff --git a/compiler/testData/codegen/bytecodeText/invokedynamic/lambdas.kt b/compiler/testData/codegen/bytecodeText/invokedynamic/lambdas.kt new file mode 100644 index 00000000000..847147f71c3 --- /dev/null +++ b/compiler/testData/codegen/bytecodeText/invokedynamic/lambdas.kt @@ -0,0 +1,14 @@ +// TARGET_BACKEND: JVM +// IGNORE_LIGHT_ANALYSIS +// JVM_TARGET: 1.8 +// LAMBDAS: INDY + +fun test() = { { "O" }() + { "K" }() }() + +// JVM_IR_TEMPLATES +// 3 INVOKEDYNAMIC +// 0 class LambdasKt\$test\$ + +// JVM_TEMPLATES +// 0 INVOKEDYNAMIC +// 3 class LambdasKt\$test\$ \ No newline at end of file diff --git a/compiler/testData/codegen/bytecodeText/jvm8/hashCode/hashCode.kt b/compiler/testData/codegen/bytecodeText/jvm8/hashCode/hashCode.kt index bffb0fbd2fa..fdbac019ff0 100644 --- a/compiler/testData/codegen/bytecodeText/jvm8/hashCode/hashCode.kt +++ b/compiler/testData/codegen/bytecodeText/jvm8/hashCode/hashCode.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND_FIR: JVM_IR // JVM_TARGET: 1.8 fun box(): String { diff --git a/compiler/testData/codegen/bytecodeText/nullCheckOptimization/noNullCheckAfterCast.kt b/compiler/testData/codegen/bytecodeText/nullCheckOptimization/noNullCheckAfterCast.kt new file mode 100644 index 00000000000..1213e12832d --- /dev/null +++ b/compiler/testData/codegen/bytecodeText/nullCheckOptimization/noNullCheckAfterCast.kt @@ -0,0 +1,34 @@ +// KT-27427 + +interface A { + fun foo() +} + +class B : A { + override fun foo() { + } +} + +fun test1() { + val b = B() + (b as A).foo() +} + +fun test2() { + val b = getB() + (b as A).foo() +} + +fun test3() { + val b = getB() + b.foo() +} + +fun getB(): B = B() + +// JVM_TEMPLATES +// 1 IFNONNULL + +// There should be no null checks in the bytecode. +// JVM_IR_TEMPLATES +// 0 IFNONNULL diff --git a/compiler/testData/codegen/bytecodeText/unsignedTypes/unsignedIntCompare_before.kt b/compiler/testData/codegen/bytecodeText/unsignedTypes/unsignedIntCompare_before.kt index d08c93ab158..9c9f26a2f4e 100644 --- a/compiler/testData/codegen/bytecodeText/unsignedTypes/unsignedIntCompare_before.kt +++ b/compiler/testData/codegen/bytecodeText/unsignedTypes/unsignedIntCompare_before.kt @@ -1,4 +1,5 @@ // WITH_RUNTIME +// JVM_TARGET: 1.6 val ua = 1234U val ub = 5678U diff --git a/compiler/testData/compileKotlinAgainstCustomBinaries/anonymousObjectTypeMetadataKlib/anonymousObjectTypeMetadata.kt b/compiler/testData/compileKotlinAgainstCustomBinaries/anonymousObjectTypeMetadataKlib/anonymousObjectTypeMetadata.kt new file mode 100644 index 00000000000..67f75708502 --- /dev/null +++ b/compiler/testData/compileKotlinAgainstCustomBinaries/anonymousObjectTypeMetadataKlib/anonymousObjectTypeMetadata.kt @@ -0,0 +1,13 @@ +package test + +import lib.* + +val w = W() +val v1 = fn() +val v2 = O.o() +val v3 = w.w() + +// private +val e1 = o3 +val e2 = w.o7 +val e3 = O.o10 diff --git a/compiler/testData/compileKotlinAgainstCustomBinaries/anonymousObjectTypeMetadataKlib/library/privateObjects.kt b/compiler/testData/compileKotlinAgainstCustomBinaries/anonymousObjectTypeMetadataKlib/library/privateObjects.kt new file mode 100644 index 00000000000..55d262d7c5b --- /dev/null +++ b/compiler/testData/compileKotlinAgainstCustomBinaries/anonymousObjectTypeMetadataKlib/library/privateObjects.kt @@ -0,0 +1,154 @@ +package lib + +interface I1 { + fun i1() {} +} + +interface I2 { + fun i2() {} +} + +interface I3 : I2, I1 + +open class C { + fun c() {} +} + +open class G { + fun g() {} +} + +private val o1 = object { fun foo() {} } +private val o2 = object : I1 {} +private val o3 = object : I1, I2 {} +private val o4 = object : I3 {} +private val o5 = object : C() {} +private val o6 = object : C(), I1, I2 {} +private val o7 = object : C(), I3 {} +private val o8 = object : G() {} +private val o9 = object : G(), I1, I2 {} +private val o10 = object : G(), I3 {} + +private val o11 = object { + inner class D { + fun df() {} + } + fun d(): D = D() +}.d() + +private val o12 = { + class L { + fun l() {} + } + L() +}() + +private val o13 = { + class L { + inner class L1 { + inner class L2 { + fun l2() {} + } + } + } + + L().L1().L2() +}() + +fun fn() { + o1.foo() + o2.i1() + o3.i1() + o3.i2() + o4.i1() + o4.i2() + o5.c() + o6.c() + o6.i1() + o6.i2() + o7.c() + o7.i1() + o7.i2() + o8.g() + o9.g() + o9.i1() + o9.i2() + o10.g() + o10.i1() + o10.i2() + o11.df() + o12.l() + o13.l2() +} + +class W { + private val o1 = object { fun foo() {} } + private val o2 = object : I1 {} + private val o3 = object : I1, I2 {} + private val o4 = object : I3 {} + private val o5 = object : C() {} + private val o6 = object : C(), I1, I2 {} + private val o7 = object : C(), I3 {} + private val o8 = object : G() {} + private val o9 = object : G(), I1, I2 {} + private val o10 = object : G(), I3 {} + + fun w() { + o1.foo() + o2.i1() + o3.i1() + o3.i2() + o4.i1() + o4.i2() + o5.c() + o6.c() + o6.i1() + o6.i2() + o7.c() + o7.i1() + o7.i2() + o8.g() + o9.g() + o9.i1() + o9.i2() + o10.g() + o10.i1() + o10.i2() + } +} + +object O { + private val o1 = object { fun foo() {} } + private val o2 = object : I1 {} + private val o3 = object : I1, I2 {} + private val o4 = object : I3 {} + private val o5 = object : C() {} + private val o6 = object : C(), I1, I2 {} + private val o7 = object : C(), I3 {} + private val o8 = object : G() {} + private val o9 = object : G(), I1, I2 {} + private val o10 = object : G(), I3 {} + + fun o() { + o1.foo() + o2.i1() + o3.i1() + o3.i2() + o4.i1() + o4.i2() + o5.c() + o6.c() + o6.i1() + o6.i2() + o7.c() + o7.i1() + o7.i2() + o8.g() + o9.g() + o9.i1() + o9.i2() + o10.g() + o10.i1() + o10.i2() + } +} diff --git a/compiler/testData/compileKotlinAgainstCustomBinaries/anonymousObjectTypeMetadataKlib/output.txt b/compiler/testData/compileKotlinAgainstCustomBinaries/anonymousObjectTypeMetadataKlib/output.txt new file mode 100644 index 00000000000..716e70f42b9 --- /dev/null +++ b/compiler/testData/compileKotlinAgainstCustomBinaries/anonymousObjectTypeMetadataKlib/output.txt @@ -0,0 +1,10 @@ +compiler/testData/compileKotlinAgainstCustomBinaries/anonymousObjectTypeMetadataKlib/anonymousObjectTypeMetadata.kt:11:10: error: cannot access 'o3': it is private in file +val e1 = o3 + ^ +compiler/testData/compileKotlinAgainstCustomBinaries/anonymousObjectTypeMetadataKlib/anonymousObjectTypeMetadata.kt:12:12: error: cannot access 'o7': it is private in 'W' +val e2 = w.o7 + ^ +compiler/testData/compileKotlinAgainstCustomBinaries/anonymousObjectTypeMetadataKlib/anonymousObjectTypeMetadata.kt:13:12: error: cannot access 'o10': it is private in 'O' +val e3 = O.o10 + ^ +COMPILATION_ERROR diff --git a/compiler/testData/compileKotlinAgainstCustomBinaries/wrongInlineTarget/output.txt b/compiler/testData/compileKotlinAgainstCustomBinaries/wrongInlineTarget/output.txt index f1948e7258a..e5f08789d19 100644 --- a/compiler/testData/compileKotlinAgainstCustomBinaries/wrongInlineTarget/output.txt +++ b/compiler/testData/compileKotlinAgainstCustomBinaries/wrongInlineTarget/output.txt @@ -1,55 +1,55 @@ -compiler/testData/compileKotlinAgainstCustomBinaries/wrongInlineTarget/source.kt:6:5: error: cannot inline bytecode built with JVM target 1.8 into bytecode that is being built with JVM target 1.6. Please specify proper '-jvm-target' option +compiler/testData/compileKotlinAgainstCustomBinaries/wrongInlineTarget/source.kt:6:5: error: cannot inline bytecode built with JVM target 11 into bytecode that is being built with JVM target 1.8. Please specify proper '-jvm-target' option inlineFun {} ^ -compiler/testData/compileKotlinAgainstCustomBinaries/wrongInlineTarget/source.kt:7:5: error: cannot inline bytecode built with JVM target 1.8 into bytecode that is being built with JVM target 1.6. Please specify proper '-jvm-target' option +compiler/testData/compileKotlinAgainstCustomBinaries/wrongInlineTarget/source.kt:7:5: error: cannot inline bytecode built with JVM target 11 into bytecode that is being built with JVM target 1.8. Please specify proper '-jvm-target' option inlineGetter ^ -compiler/testData/compileKotlinAgainstCustomBinaries/wrongInlineTarget/source.kt:8:5: error: cannot inline bytecode built with JVM target 1.8 into bytecode that is being built with JVM target 1.6. Please specify proper '-jvm-target' option +compiler/testData/compileKotlinAgainstCustomBinaries/wrongInlineTarget/source.kt:8:5: error: cannot inline bytecode built with JVM target 11 into bytecode that is being built with JVM target 1.8. Please specify proper '-jvm-target' option inlineGetter = 1 ^ -compiler/testData/compileKotlinAgainstCustomBinaries/wrongInlineTarget/source.kt:11:5: error: cannot inline bytecode built with JVM target 1.8 into bytecode that is being built with JVM target 1.6. Please specify proper '-jvm-target' option +compiler/testData/compileKotlinAgainstCustomBinaries/wrongInlineTarget/source.kt:11:5: error: cannot inline bytecode built with JVM target 11 into bytecode that is being built with JVM target 1.8. Please specify proper '-jvm-target' option inlineSetter = 1 ^ -compiler/testData/compileKotlinAgainstCustomBinaries/wrongInlineTarget/source.kt:13:5: error: cannot inline bytecode built with JVM target 1.8 into bytecode that is being built with JVM target 1.6. Please specify proper '-jvm-target' option +compiler/testData/compileKotlinAgainstCustomBinaries/wrongInlineTarget/source.kt:13:5: error: cannot inline bytecode built with JVM target 11 into bytecode that is being built with JVM target 1.8. Please specify proper '-jvm-target' option allInline ^ -compiler/testData/compileKotlinAgainstCustomBinaries/wrongInlineTarget/source.kt:14:5: error: cannot inline bytecode built with JVM target 1.8 into bytecode that is being built with JVM target 1.6. Please specify proper '-jvm-target' option +compiler/testData/compileKotlinAgainstCustomBinaries/wrongInlineTarget/source.kt:14:5: error: cannot inline bytecode built with JVM target 11 into bytecode that is being built with JVM target 1.8. Please specify proper '-jvm-target' option allInline = 1 ^ -compiler/testData/compileKotlinAgainstCustomBinaries/wrongInlineTarget/source.kt:17:10: error: cannot inline bytecode built with JVM target 1.8 into bytecode that is being built with JVM target 1.6. Please specify proper '-jvm-target' option +compiler/testData/compileKotlinAgainstCustomBinaries/wrongInlineTarget/source.kt:17:10: error: cannot inline bytecode built with JVM target 11 into bytecode that is being built with JVM target 1.8. Please specify proper '-jvm-target' option base.inlineFunBase {} ^ -compiler/testData/compileKotlinAgainstCustomBinaries/wrongInlineTarget/source.kt:18:10: error: cannot inline bytecode built with JVM target 1.8 into bytecode that is being built with JVM target 1.6. Please specify proper '-jvm-target' option +compiler/testData/compileKotlinAgainstCustomBinaries/wrongInlineTarget/source.kt:18:10: error: cannot inline bytecode built with JVM target 11 into bytecode that is being built with JVM target 1.8. Please specify proper '-jvm-target' option base.inlineGetterBase ^ -compiler/testData/compileKotlinAgainstCustomBinaries/wrongInlineTarget/source.kt:19:10: error: cannot inline bytecode built with JVM target 1.8 into bytecode that is being built with JVM target 1.6. Please specify proper '-jvm-target' option +compiler/testData/compileKotlinAgainstCustomBinaries/wrongInlineTarget/source.kt:19:10: error: cannot inline bytecode built with JVM target 11 into bytecode that is being built with JVM target 1.8. Please specify proper '-jvm-target' option base.inlineGetterBase = 1 ^ -compiler/testData/compileKotlinAgainstCustomBinaries/wrongInlineTarget/source.kt:22:10: error: cannot inline bytecode built with JVM target 1.8 into bytecode that is being built with JVM target 1.6. Please specify proper '-jvm-target' option +compiler/testData/compileKotlinAgainstCustomBinaries/wrongInlineTarget/source.kt:22:10: error: cannot inline bytecode built with JVM target 11 into bytecode that is being built with JVM target 1.8. Please specify proper '-jvm-target' option base.inlineSetterBase = 1 ^ -compiler/testData/compileKotlinAgainstCustomBinaries/wrongInlineTarget/source.kt:24:10: error: cannot inline bytecode built with JVM target 1.8 into bytecode that is being built with JVM target 1.6. Please specify proper '-jvm-target' option +compiler/testData/compileKotlinAgainstCustomBinaries/wrongInlineTarget/source.kt:24:10: error: cannot inline bytecode built with JVM target 11 into bytecode that is being built with JVM target 1.8. Please specify proper '-jvm-target' option base.allInlineBase ^ -compiler/testData/compileKotlinAgainstCustomBinaries/wrongInlineTarget/source.kt:25:10: error: cannot inline bytecode built with JVM target 1.8 into bytecode that is being built with JVM target 1.6. Please specify proper '-jvm-target' option +compiler/testData/compileKotlinAgainstCustomBinaries/wrongInlineTarget/source.kt:25:10: error: cannot inline bytecode built with JVM target 11 into bytecode that is being built with JVM target 1.8. Please specify proper '-jvm-target' option base.allInlineBase = 1 ^ -compiler/testData/compileKotlinAgainstCustomBinaries/wrongInlineTarget/source.kt:32:9: error: cannot inline bytecode built with JVM target 1.8 into bytecode that is being built with JVM target 1.6. Please specify proper '-jvm-target' option +compiler/testData/compileKotlinAgainstCustomBinaries/wrongInlineTarget/source.kt:32:9: error: cannot inline bytecode built with JVM target 11 into bytecode that is being built with JVM target 1.8. Please specify proper '-jvm-target' option inlineFunBase {} ^ -compiler/testData/compileKotlinAgainstCustomBinaries/wrongInlineTarget/source.kt:33:9: error: cannot inline bytecode built with JVM target 1.8 into bytecode that is being built with JVM target 1.6. Please specify proper '-jvm-target' option +compiler/testData/compileKotlinAgainstCustomBinaries/wrongInlineTarget/source.kt:33:9: error: cannot inline bytecode built with JVM target 11 into bytecode that is being built with JVM target 1.8. Please specify proper '-jvm-target' option inlineGetterBase ^ -compiler/testData/compileKotlinAgainstCustomBinaries/wrongInlineTarget/source.kt:34:9: error: cannot inline bytecode built with JVM target 1.8 into bytecode that is being built with JVM target 1.6. Please specify proper '-jvm-target' option +compiler/testData/compileKotlinAgainstCustomBinaries/wrongInlineTarget/source.kt:34:9: error: cannot inline bytecode built with JVM target 11 into bytecode that is being built with JVM target 1.8. Please specify proper '-jvm-target' option inlineGetterBase = 1 ^ -compiler/testData/compileKotlinAgainstCustomBinaries/wrongInlineTarget/source.kt:37:9: error: cannot inline bytecode built with JVM target 1.8 into bytecode that is being built with JVM target 1.6. Please specify proper '-jvm-target' option +compiler/testData/compileKotlinAgainstCustomBinaries/wrongInlineTarget/source.kt:37:9: error: cannot inline bytecode built with JVM target 11 into bytecode that is being built with JVM target 1.8. Please specify proper '-jvm-target' option inlineSetterBase = 1 ^ -compiler/testData/compileKotlinAgainstCustomBinaries/wrongInlineTarget/source.kt:39:9: error: cannot inline bytecode built with JVM target 1.8 into bytecode that is being built with JVM target 1.6. Please specify proper '-jvm-target' option +compiler/testData/compileKotlinAgainstCustomBinaries/wrongInlineTarget/source.kt:39:9: error: cannot inline bytecode built with JVM target 11 into bytecode that is being built with JVM target 1.8. Please specify proper '-jvm-target' option allInlineBase ^ -compiler/testData/compileKotlinAgainstCustomBinaries/wrongInlineTarget/source.kt:40:9: error: cannot inline bytecode built with JVM target 1.8 into bytecode that is being built with JVM target 1.6. Please specify proper '-jvm-target' option +compiler/testData/compileKotlinAgainstCustomBinaries/wrongInlineTarget/source.kt:40:9: error: cannot inline bytecode built with JVM target 11 into bytecode that is being built with JVM target 1.8. Please specify proper '-jvm-target' option allInlineBase = 1 ^ COMPILATION_ERROR diff --git a/compiler/testData/compileKotlinAgainstCustomBinaries/wrongInlineTarget/warningsOnly_1_3.txt b/compiler/testData/compileKotlinAgainstCustomBinaries/wrongInlineTarget/warningsOnly_1_3.txt index 451f29a417b..410b9f229b7 100644 --- a/compiler/testData/compileKotlinAgainstCustomBinaries/wrongInlineTarget/warningsOnly_1_3.txt +++ b/compiler/testData/compileKotlinAgainstCustomBinaries/wrongInlineTarget/warningsOnly_1_3.txt @@ -1,20 +1,20 @@ warning: language version 1.3 is deprecated and its support will be removed in a future version of Kotlin -compiler/testData/compileKotlinAgainstCustomBinaries/wrongInlineTarget/warningsOnly_1_3.kt:8:9: warning: cannot inline bytecode built with JVM target 1.8 into bytecode that is being built with JVM target 1.6. Please specify proper '-jvm-target' option +compiler/testData/compileKotlinAgainstCustomBinaries/wrongInlineTarget/warningsOnly_1_3.kt:8:9: warning: cannot inline bytecode built with JVM target 11 into bytecode that is being built with JVM target 1.8. Please specify proper '-jvm-target' option inlineFunBase {} ^ -compiler/testData/compileKotlinAgainstCustomBinaries/wrongInlineTarget/warningsOnly_1_3.kt:9:9: warning: cannot inline bytecode built with JVM target 1.8 into bytecode that is being built with JVM target 1.6. Please specify proper '-jvm-target' option +compiler/testData/compileKotlinAgainstCustomBinaries/wrongInlineTarget/warningsOnly_1_3.kt:9:9: warning: cannot inline bytecode built with JVM target 11 into bytecode that is being built with JVM target 1.8. Please specify proper '-jvm-target' option inlineGetterBase ^ -compiler/testData/compileKotlinAgainstCustomBinaries/wrongInlineTarget/warningsOnly_1_3.kt:10:9: warning: cannot inline bytecode built with JVM target 1.8 into bytecode that is being built with JVM target 1.6. Please specify proper '-jvm-target' option +compiler/testData/compileKotlinAgainstCustomBinaries/wrongInlineTarget/warningsOnly_1_3.kt:10:9: warning: cannot inline bytecode built with JVM target 11 into bytecode that is being built with JVM target 1.8. Please specify proper '-jvm-target' option inlineGetterBase = 1 ^ -compiler/testData/compileKotlinAgainstCustomBinaries/wrongInlineTarget/warningsOnly_1_3.kt:13:9: warning: cannot inline bytecode built with JVM target 1.8 into bytecode that is being built with JVM target 1.6. Please specify proper '-jvm-target' option +compiler/testData/compileKotlinAgainstCustomBinaries/wrongInlineTarget/warningsOnly_1_3.kt:13:9: warning: cannot inline bytecode built with JVM target 11 into bytecode that is being built with JVM target 1.8. Please specify proper '-jvm-target' option inlineSetterBase = 1 ^ -compiler/testData/compileKotlinAgainstCustomBinaries/wrongInlineTarget/warningsOnly_1_3.kt:15:9: warning: cannot inline bytecode built with JVM target 1.8 into bytecode that is being built with JVM target 1.6. Please specify proper '-jvm-target' option +compiler/testData/compileKotlinAgainstCustomBinaries/wrongInlineTarget/warningsOnly_1_3.kt:15:9: warning: cannot inline bytecode built with JVM target 11 into bytecode that is being built with JVM target 1.8. Please specify proper '-jvm-target' option allInlineBase ^ -compiler/testData/compileKotlinAgainstCustomBinaries/wrongInlineTarget/warningsOnly_1_3.kt:16:9: warning: cannot inline bytecode built with JVM target 1.8 into bytecode that is being built with JVM target 1.6. Please specify proper '-jvm-target' option +compiler/testData/compileKotlinAgainstCustomBinaries/wrongInlineTarget/warningsOnly_1_3.kt:16:9: warning: cannot inline bytecode built with JVM target 11 into bytecode that is being built with JVM target 1.8. Please specify proper '-jvm-target' option allInlineBase = 1 ^ OK diff --git a/compiler/testData/debug/stepping/constantConditions.kt b/compiler/testData/debug/stepping/constantConditions.kt new file mode 100644 index 00000000000..9c54cf805ed --- /dev/null +++ b/compiler/testData/debug/stepping/constantConditions.kt @@ -0,0 +1,25 @@ +// FILE: test.kt +// KT-22488 + +fun box() { + test() +} + +fun test(): Long { + if (1 == 1 && + 2 == 2) { + return 0 + } + + return 1 +} + +// LINENUMBERS +// test.kt:5 box +// LINENUMBERS JVM_IR +// test.kt:9 test +// LINENUMBERS +// test.kt:10 test +// test.kt:11 test +// test.kt:5 box +// test.kt:6 box diff --git a/compiler/testData/debug/stepping/multilineExpression.kt b/compiler/testData/debug/stepping/multilineExpression.kt new file mode 100644 index 00000000000..704ee35d132 --- /dev/null +++ b/compiler/testData/debug/stepping/multilineExpression.kt @@ -0,0 +1,23 @@ +// FILE: test.kt +// KT-17753 + +fun box() { + test(true, true, true) +} + +fun test(a: Boolean, b: Boolean, c: Boolean): Boolean { + return a + && b + && c +} + +// LINENUMBERS +// test.kt:5 box +// LINENUMBERS JVM_IR +// test.kt:9 test +// test.kt:10 test +// LINENUMBERS +// test.kt:11 test +// test.kt:9 test +// test.kt:5 box +// test.kt:6 box diff --git a/compiler/testData/diagnostics/ReadMe.md b/compiler/testData/diagnostics/ReadMe.md index 1e1e0428b43..1b4f8cc8615 100644 --- a/compiler/testData/diagnostics/ReadMe.md +++ b/compiler/testData/diagnostics/ReadMe.md @@ -21,19 +21,18 @@ Several directives can be added to the beginning of a test file with the followi ### 1. DIAGNOSTICS -This directive allows to exclude some irrelevant diagnostics (e.g. unused parameter) from a certain test, or to test only a specific set of diagnostics. +This directive allows to exclude some irrelevant diagnostics (e.g. unused parameter) from a certain test or to include others. The syntax is - '([ + - ! ] DIAGNOSTIC_FACTORY_NAME | ERROR | WARNING | INFO ) +' + '([ + - ] DIAGNOSTIC_FACTORY_NAME | ERROR | WARNING | INFO ) +' where * `+` means 'include'; -* `-` means 'exclude'; -* `!` means 'exclude everything but this'. +* `-` means 'exclude'. - Directives are applied in the order of appearance, i.e. `!FOO +BAR` means include only `FOO` and `BAR`. + Directives are applied in the order of appearance, i.e. `+FOO -BAR` means include `FOO` but not `BAR`. #### Usage: diff --git a/compiler/testData/diagnostics/tests/CovariantOverrideType.fir.kt b/compiler/testData/diagnostics/tests/CovariantOverrideType.fir.kt deleted file mode 100644 index fa0be88d003..00000000000 --- a/compiler/testData/diagnostics/tests/CovariantOverrideType.fir.kt +++ /dev/null @@ -1,26 +0,0 @@ -interface A { - fun foo() : Int = 1 - fun foo2() : Int = 1 - fun foo1() : Int = 1 - val a : Int - val a1 : Int - val g : Iterator - - fun g() : T - fun g1() : T -} - -abstract class B() : A { - override fun foo() { - } - override fun foo2() : Unit { - } - - override val a : Double = 1.toDouble() - override val a1 = 1.toDouble() - - abstract override fun g() : Int - abstract override fun g1() : List - - abstract override val g : Iterator -} \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/CovariantOverrideType.kt b/compiler/testData/diagnostics/tests/CovariantOverrideType.kt index edfdda26a12..8cc69aadb01 100644 --- a/compiler/testData/diagnostics/tests/CovariantOverrideType.kt +++ b/compiler/testData/diagnostics/tests/CovariantOverrideType.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL interface A { fun foo() : Int = 1 fun foo2() : Int = 1 diff --git a/compiler/testData/diagnostics/tests/OverridingVarByVal.fir.kt b/compiler/testData/diagnostics/tests/OverridingVarByVal.fir.kt deleted file mode 100644 index 6ad543c6d65..00000000000 --- a/compiler/testData/diagnostics/tests/OverridingVarByVal.fir.kt +++ /dev/null @@ -1,15 +0,0 @@ -open class Var() { - open var v : Int = 1 -} - -interface VarT { - var v : Int -} - -class Val() : Var(), VarT { - override val v : Int = 1 -} - -class Var2() : Var() { - override var v : Int = 1 -} diff --git a/compiler/testData/diagnostics/tests/OverridingVarByVal.kt b/compiler/testData/diagnostics/tests/OverridingVarByVal.kt index c18a525c9e6..7e63c772458 100644 --- a/compiler/testData/diagnostics/tests/OverridingVarByVal.kt +++ b/compiler/testData/diagnostics/tests/OverridingVarByVal.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL open class Var() { open var v : Int = 1 } diff --git a/compiler/testData/diagnostics/tests/SafeCallUnknownType.fir.kt b/compiler/testData/diagnostics/tests/SafeCallUnknownType.fir.kt new file mode 100644 index 00000000000..b341e164a90 --- /dev/null +++ b/compiler/testData/diagnostics/tests/SafeCallUnknownType.fir.kt @@ -0,0 +1,7 @@ +// !WITH_NEW_INFERENCE +import com.unknown + +fun ff() { + val a = unknown() + val b = a?.plus(42) +} \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/SafeCallUnknownType.kt b/compiler/testData/diagnostics/tests/SafeCallUnknownType.kt new file mode 100644 index 00000000000..5bec3fc2fb1 --- /dev/null +++ b/compiler/testData/diagnostics/tests/SafeCallUnknownType.kt @@ -0,0 +1,7 @@ +// !WITH_NEW_INFERENCE +import com.unknown + +fun ff() { + val a = unknown() + val b = a?.plus(42) +} \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/SafeCallUnknownType.txt b/compiler/testData/diagnostics/tests/SafeCallUnknownType.txt new file mode 100644 index 00000000000..99c7d67ddd4 --- /dev/null +++ b/compiler/testData/diagnostics/tests/SafeCallUnknownType.txt @@ -0,0 +1,3 @@ +package + +public fun ff(): kotlin.Unit diff --git a/compiler/testData/diagnostics/tests/StarsInFunctionCalls.fir.kt b/compiler/testData/diagnostics/tests/StarsInFunctionCalls.fir.kt index d3fff3880a5..00c3c14227e 100644 --- a/compiler/testData/diagnostics/tests/StarsInFunctionCalls.fir.kt +++ b/compiler/testData/diagnostics/tests/StarsInFunctionCalls.fir.kt @@ -7,7 +7,7 @@ fun foo(a : Any?) {} public fun main() { getT<*>() - ggetT<*>() + ggetT<*>() getTT<*, *>() getTT<*, Int>() getTT*>() diff --git a/compiler/testData/diagnostics/tests/TraitOverrideObjectMethods.fir.kt b/compiler/testData/diagnostics/tests/TraitOverrideObjectMethods.fir.kt index a7c50ea9086..bdac51dc5c4 100644 --- a/compiler/testData/diagnostics/tests/TraitOverrideObjectMethods.fir.kt +++ b/compiler/testData/diagnostics/tests/TraitOverrideObjectMethods.fir.kt @@ -2,5 +2,5 @@ interface MyTrait: Object { override fun toString(): String public override fun finalize() - public override fun wait() + public override fun wait() } diff --git a/compiler/testData/diagnostics/tests/annotations/rendering/typeMismatchOnOverride.fir.kt b/compiler/testData/diagnostics/tests/annotations/rendering/typeMismatchOnOverride.fir.kt index d297a3f996a..0b1634aeb75 100644 --- a/compiler/testData/diagnostics/tests/annotations/rendering/typeMismatchOnOverride.fir.kt +++ b/compiler/testData/diagnostics/tests/annotations/rendering/typeMismatchOnOverride.fir.kt @@ -17,7 +17,7 @@ interface A { interface B : A { override val p1: Int @An - override val p2: @An String + override val p2: @An String override fun test(arg: String): Int } diff --git a/compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/deadCodeDifferentExamples.fir.kt b/compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/deadCodeDifferentExamples.fir.kt index 9da253daa3b..5d076cdc2e1 100644 --- a/compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/deadCodeDifferentExamples.fir.kt +++ b/compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/deadCodeDifferentExamples.fir.kt @@ -109,7 +109,7 @@ fun t7() : Int { return 1 2 } - catch (e : Any) { + catch (e : Any) { 2 } return 1 // this is OK, like in Java @@ -120,7 +120,7 @@ fun t8() : Int { return 1 2 } - catch (e : Any) { + catch (e : Any) { return 1 2 } diff --git a/compiler/testData/diagnostics/tests/controlStructures/catchGenerics.fir.kt b/compiler/testData/diagnostics/tests/controlStructures/catchGenerics.fir.kt index 44d55d0b17a..b85711fc51e 100644 --- a/compiler/testData/diagnostics/tests/controlStructures/catchGenerics.fir.kt +++ b/compiler/testData/diagnostics/tests/controlStructures/catchGenerics.fir.kt @@ -2,11 +2,11 @@ // See KT-9816, KT-9742 // Not allowed in Java -class ZException(val p: T) : Exception() +class ZException<T>(val p: T) : Exception() -class YException(val p: T): java.lang.RuntimeException() +class YException<T>(val p: T): java.lang.RuntimeException() -class XException(val p: T): Throwable() +class XException<T>(val p: T): Throwable() fun bar() { try { @@ -17,10 +17,10 @@ fun bar() { inline fun tryCatch(lazy: () -> R, failure: (E) -> R): R = try { lazy() - } catch (e: E) { + } catch (e: E) { failure(e) } fun tryCatch() { - try { } catch (e: T) { } -} \ No newline at end of file + try { } catch (e: T) { } +} diff --git a/compiler/testData/diagnostics/tests/controlStructures/catchInnerClassesOfGenerics.fir.kt b/compiler/testData/diagnostics/tests/controlStructures/catchInnerClassesOfGenerics.fir.kt deleted file mode 100644 index 7f3299674df..00000000000 --- a/compiler/testData/diagnostics/tests/controlStructures/catchInnerClassesOfGenerics.fir.kt +++ /dev/null @@ -1,41 +0,0 @@ -// !LANGUAGE: +ProhibitInnerClassesOfGenericClassExtendingThrowable -// !DIAGNOSTICS: -UNUSED_VARIABLE -// JAVAC_EXPECTED_FILE - -class OuterGeneric { - inner class ErrorInnerExn : Exception() - - inner class InnerA { - inner class ErrorInnerExn2 : Exception() - } - - class OkNestedExn : Exception() - - val errorAnonymousObjectExn = object : Exception() {} - - fun foo() { - class OkLocalExn : Exception() - - val errorAnonymousObjectExn = object : Exception() {} - } - - fun genericFoo() { - class OkLocalExn : Exception() - - class LocalGeneric { - inner class ErrorInnerExnOfLocalGeneric : Exception() - } - } -} - -class Outer { - inner class InnerGeneric { - inner class ErrorInnerExn : Exception() - } -} - -fun genericFoo() { - class ErrorLocalExnInGenericFun : Exception() - - val errorkAnonymousObjectExnInGenericFun = object : Exception() {} -} diff --git a/compiler/testData/diagnostics/tests/controlStructures/catchInnerClassesOfGenerics.kt b/compiler/testData/diagnostics/tests/controlStructures/catchInnerClassesOfGenerics.kt index b07acdf6afa..337224ac30c 100644 --- a/compiler/testData/diagnostics/tests/controlStructures/catchInnerClassesOfGenerics.kt +++ b/compiler/testData/diagnostics/tests/controlStructures/catchInnerClassesOfGenerics.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // !LANGUAGE: +ProhibitInnerClassesOfGenericClassExtendingThrowable // !DIAGNOSTICS: -UNUSED_VARIABLE // JAVAC_EXPECTED_FILE diff --git a/compiler/testData/diagnostics/tests/controlStructures/catchInnerClassesOfGenerics_deprecation.fir.kt b/compiler/testData/diagnostics/tests/controlStructures/catchInnerClassesOfGenerics_deprecation.fir.kt index cbe8d725b61..e2ea4ac52a6 100644 --- a/compiler/testData/diagnostics/tests/controlStructures/catchInnerClassesOfGenerics_deprecation.fir.kt +++ b/compiler/testData/diagnostics/tests/controlStructures/catchInnerClassesOfGenerics_deprecation.fir.kt @@ -3,39 +3,39 @@ // JAVAC_EXPECTED_FILE class OuterGeneric { - inner class ErrorInnerExn : Exception() + inner class ErrorInnerExn : Exception() inner class InnerA { - inner class ErrorInnerExn2 : Exception() + inner class ErrorInnerExn2 : Exception() } class OkNestedExn : Exception() - val errorAnonymousObjectExn = object : Exception() {} + val errorAnonymousObjectExn = object : Exception() {} fun foo() { - class OkLocalExn : Exception() + class OkLocalExn : Exception() - val errorAnonymousObjectExn = object : Exception() {} + val errorAnonymousObjectExn = object : Exception() {} } fun genericFoo() { - class OkLocalExn : Exception() + class OkLocalExn : Exception() class LocalGeneric { - inner class ErrorInnerExnOfLocalGeneric : Exception() + inner class ErrorInnerExnOfLocalGeneric : Exception() } } } class Outer { inner class InnerGeneric { - inner class ErrorInnerExn : Exception() + inner class ErrorInnerExn : Exception() } } fun genericFoo() { - class ErrorLocalExnInGenericFun : Exception() + class ErrorLocalExnInGenericFun : Exception() - val errorkAnonymousObjectExnInGenericFun = object : Exception() {} + val errorkAnonymousObjectExnInGenericFun = object : Exception() {} } diff --git a/compiler/testData/diagnostics/tests/controlStructures/catchWithDefault.fir.kt b/compiler/testData/diagnostics/tests/controlStructures/catchWithDefault.fir.kt index 8e568f28604..bac12215b6a 100644 --- a/compiler/testData/diagnostics/tests/controlStructures/catchWithDefault.fir.kt +++ b/compiler/testData/diagnostics/tests/controlStructures/catchWithDefault.fir.kt @@ -1,3 +1,3 @@ fun test() { - try { } catch (e: Exception = Exception()) { } -} \ No newline at end of file + try { } catch (e: Exception = Exception()) { } +} diff --git a/compiler/testData/diagnostics/tests/controlStructures/catchingLocalClassesCapturingTypeParameters.fir.kt b/compiler/testData/diagnostics/tests/controlStructures/catchingLocalClassesCapturingTypeParameters.fir.kt deleted file mode 100644 index 39925d38fef..00000000000 --- a/compiler/testData/diagnostics/tests/controlStructures/catchingLocalClassesCapturingTypeParameters.fir.kt +++ /dev/null @@ -1,27 +0,0 @@ -// !LANGUAGE: +ProhibitInnerClassesOfGenericClassExtendingThrowable -package test - -var global: Throwable? = null - -fun foo(x: Throwable, z: T, b: (T) -> Unit) { - class A(val y : T) : Exception() - - try { - throw x - } catch (a: A) { - b(a.y) - } catch (e: Throwable) { - global = A(z) - } -} - -fun main() { - foo(RuntimeException(), 1) { throw IllegalStateException() } - foo(global!!, "") { it.length } // (*) -} - -// (*): -//Exception in thread "main" java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String -// at test.TestKt$main$2.invoke(test.kt) -// at test.TestKt.foo(test.kt:12) -// at test.TestKt.main(test.kt:21) \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/controlStructures/catchingLocalClassesCapturingTypeParameters.kt b/compiler/testData/diagnostics/tests/controlStructures/catchingLocalClassesCapturingTypeParameters.kt index 98948b108d9..f7cdbf4ea93 100644 --- a/compiler/testData/diagnostics/tests/controlStructures/catchingLocalClassesCapturingTypeParameters.kt +++ b/compiler/testData/diagnostics/tests/controlStructures/catchingLocalClassesCapturingTypeParameters.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // !LANGUAGE: +ProhibitInnerClassesOfGenericClassExtendingThrowable package test diff --git a/compiler/testData/diagnostics/tests/delegatedProperty/delegatedPropertyOverridedInTraitTypeMismatch.fir.kt b/compiler/testData/diagnostics/tests/delegatedProperty/delegatedPropertyOverridedInTraitTypeMismatch.fir.kt deleted file mode 100644 index 8e963287db2..00000000000 --- a/compiler/testData/diagnostics/tests/delegatedProperty/delegatedPropertyOverridedInTraitTypeMismatch.fir.kt +++ /dev/null @@ -1,21 +0,0 @@ -// !DIAGNOSTICS: -UNUSED_PARAMETER - -import kotlin.reflect.KProperty - -interface A { - val prop: Int -} - -class AImpl: A { - override val prop by Delegate() -} - -fun foo() { - AImpl().prop -} - -class Delegate { - operator fun getValue(t: Any?, p: KProperty<*>): String { - return "" - } -} diff --git a/compiler/testData/diagnostics/tests/delegatedProperty/delegatedPropertyOverridedInTraitTypeMismatch.kt b/compiler/testData/diagnostics/tests/delegatedProperty/delegatedPropertyOverridedInTraitTypeMismatch.kt index 81552ad084d..a2c4e193527 100644 --- a/compiler/testData/diagnostics/tests/delegatedProperty/delegatedPropertyOverridedInTraitTypeMismatch.kt +++ b/compiler/testData/diagnostics/tests/delegatedProperty/delegatedPropertyOverridedInTraitTypeMismatch.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // !DIAGNOSTICS: -UNUSED_PARAMETER import kotlin.reflect.KProperty diff --git a/compiler/testData/diagnostics/tests/enum/kt8972_cloneNotAllowed.fir.kt b/compiler/testData/diagnostics/tests/enum/kt8972_cloneNotAllowed.fir.kt index b37092ccccf..0a93180d2f3 100644 --- a/compiler/testData/diagnostics/tests/enum/kt8972_cloneNotAllowed.fir.kt +++ b/compiler/testData/diagnostics/tests/enum/kt8972_cloneNotAllowed.fir.kt @@ -1,7 +1,7 @@ // !WITH_NEW_INFERENCE enum class E : Cloneable { A; - override fun clone(): Any { + override fun clone(): Any { return super.clone() } } diff --git a/compiler/testData/diagnostics/tests/enum/overrideFinalEnumMethods.fir.kt b/compiler/testData/diagnostics/tests/enum/overrideFinalEnumMethods.fir.kt index 69b11a657d8..56a79f9ed22 100644 --- a/compiler/testData/diagnostics/tests/enum/overrideFinalEnumMethods.fir.kt +++ b/compiler/testData/diagnostics/tests/enum/overrideFinalEnumMethods.fir.kt @@ -4,8 +4,8 @@ enum class E { override val name: String = "lol" override val ordinal: Int = 0 - override fun compareTo(other: E) = -1 + override fun compareTo(other: E) = -1 - override fun equals(other: Any?) = true - override fun hashCode() = -1 + override fun equals(other: Any?) = true + override fun hashCode() = -1 } diff --git a/compiler/testData/diagnostics/tests/generics/kt9203.fir.kt b/compiler/testData/diagnostics/tests/generics/kt9203.fir.kt deleted file mode 100644 index dffc4eb33e4..00000000000 --- a/compiler/testData/diagnostics/tests/generics/kt9203.fir.kt +++ /dev/null @@ -1,11 +0,0 @@ -// !WITH_NEW_INFERENCE -// FULL_JDK - -import java.util.stream.Collectors -import java.util.stream.IntStream - -fun main() { - val xs = IntStream.range(0, 10).mapToObj { it.toString() } - .collect(Collectors.toList()) - xs[0] -} diff --git a/compiler/testData/diagnostics/tests/generics/kt9203.kt b/compiler/testData/diagnostics/tests/generics/kt9203.kt index 93fcc651c8a..1ca1e4242b3 100644 --- a/compiler/testData/diagnostics/tests/generics/kt9203.kt +++ b/compiler/testData/diagnostics/tests/generics/kt9203.kt @@ -1,11 +1,11 @@ -// !WITH_NEW_INFERENCE +// FIR_IDENTICAL // FULL_JDK import java.util.stream.Collectors import java.util.stream.IntStream fun main() { - val xs = IntStream.range(0, 10).mapToObj { it.toString() } + val xs = IntStream.range(0, 10).mapToObj { it.toString() } .collect(Collectors.toList()) xs[0] } diff --git a/compiler/testData/diagnostics/tests/j+k/defaultMethods.fir.kt b/compiler/testData/diagnostics/tests/j+k/defaultMethods.fir.kt index d0eeee7ed9c..fb89c234e71 100644 --- a/compiler/testData/diagnostics/tests/j+k/defaultMethods.fir.kt +++ b/compiler/testData/diagnostics/tests/j+k/defaultMethods.fir.kt @@ -1,3 +1,4 @@ +// !JVM_TARGET: 1.6 // FILE: JavaInterface.java public interface JavaInterface { diff --git a/compiler/testData/diagnostics/tests/j+k/defaultMethods.kt b/compiler/testData/diagnostics/tests/j+k/defaultMethods.kt index 1c9e5b23dfe..dd18837b387 100644 --- a/compiler/testData/diagnostics/tests/j+k/defaultMethods.kt +++ b/compiler/testData/diagnostics/tests/j+k/defaultMethods.kt @@ -1,3 +1,4 @@ +// !JVM_TARGET: 1.6 // FILE: JavaInterface.java public interface JavaInterface { diff --git a/compiler/testData/diagnostics/tests/j+k/defaultMethodsIndirectInheritance.fir.kt b/compiler/testData/diagnostics/tests/j+k/defaultMethodsIndirectInheritance.fir.kt index 6aafef0fac0..45be799023e 100644 --- a/compiler/testData/diagnostics/tests/j+k/defaultMethodsIndirectInheritance.fir.kt +++ b/compiler/testData/diagnostics/tests/j+k/defaultMethodsIndirectInheritance.fir.kt @@ -1,3 +1,4 @@ +// !JVM_TARGET: 1.6 // FILE: JavaInterfaceBase.java public interface JavaInterfaceBase { diff --git a/compiler/testData/diagnostics/tests/j+k/defaultMethodsIndirectInheritance.kt b/compiler/testData/diagnostics/tests/j+k/defaultMethodsIndirectInheritance.kt index c4b862e0bba..d10532a2fd1 100644 --- a/compiler/testData/diagnostics/tests/j+k/defaultMethodsIndirectInheritance.kt +++ b/compiler/testData/diagnostics/tests/j+k/defaultMethodsIndirectInheritance.kt @@ -1,3 +1,4 @@ +// !JVM_TARGET: 1.6 // FILE: JavaInterfaceBase.java public interface JavaInterfaceBase { diff --git a/compiler/testData/diagnostics/tests/j+k/defaultMethods_warning.fir.kt b/compiler/testData/diagnostics/tests/j+k/defaultMethods_warning.fir.kt index 298332fb21a..00e24b30071 100644 --- a/compiler/testData/diagnostics/tests/j+k/defaultMethods_warning.fir.kt +++ b/compiler/testData/diagnostics/tests/j+k/defaultMethods_warning.fir.kt @@ -1,4 +1,5 @@ -//!LANGUAGE: -DefaultMethodsCallFromJava6TargetError +// !LANGUAGE: -DefaultMethodsCallFromJava6TargetError +// !JVM_TARGET: 1.6 // FILE: JavaInterface.java public interface JavaInterface { diff --git a/compiler/testData/diagnostics/tests/j+k/defaultMethods_warning.kt b/compiler/testData/diagnostics/tests/j+k/defaultMethods_warning.kt index 24b07f902fc..dd2e491be89 100644 --- a/compiler/testData/diagnostics/tests/j+k/defaultMethods_warning.kt +++ b/compiler/testData/diagnostics/tests/j+k/defaultMethods_warning.kt @@ -1,4 +1,5 @@ -//!LANGUAGE: -DefaultMethodsCallFromJava6TargetError +// !LANGUAGE: -DefaultMethodsCallFromJava6TargetError +// !JVM_TARGET: 1.6 // FILE: JavaInterface.java public interface JavaInterface { diff --git a/compiler/testData/diagnostics/tests/j+k/inheritanceStaticMethodFromInterface.fir.kt b/compiler/testData/diagnostics/tests/j+k/inheritanceStaticMethodFromInterface.fir.kt deleted file mode 100644 index 28d47637209..00000000000 --- a/compiler/testData/diagnostics/tests/j+k/inheritanceStaticMethodFromInterface.fir.kt +++ /dev/null @@ -1,32 +0,0 @@ -// FILE: I.java - -public interface I { - int a = 1; - static void foo() {} -} - -// FILE: C.java - -public class C implements I { - static int b = 1; - static void bar() {} -} - -// FILE: test.kt - -class K : C() - -fun main() { - I.a - I.foo() - - C.a - C.b - C.foo() - C.bar() - - K.a - K.b - K.foo() - K.bar() -} diff --git a/compiler/testData/diagnostics/tests/j+k/inheritanceStaticMethodFromInterface.kt b/compiler/testData/diagnostics/tests/j+k/inheritanceStaticMethodFromInterface.kt index 4abe3f79e7f..eeef118f7dc 100644 --- a/compiler/testData/diagnostics/tests/j+k/inheritanceStaticMethodFromInterface.kt +++ b/compiler/testData/diagnostics/tests/j+k/inheritanceStaticMethodFromInterface.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FILE: I.java public interface I { @@ -18,7 +19,7 @@ class K : C() fun main() { I.a - I.foo() + I.foo() C.a C.b diff --git a/compiler/testData/diagnostics/tests/j+k/supertypeUsesNested.kt b/compiler/testData/diagnostics/tests/j+k/supertypeUsesNested.kt new file mode 100644 index 00000000000..86610986ba3 --- /dev/null +++ b/compiler/testData/diagnostics/tests/j+k/supertypeUsesNested.kt @@ -0,0 +1,23 @@ +// FIR_IDENTICAL +// SKIP_TXT +// FILE: JavaClass.java +public class JavaClass extends ContainerType> { + public static class Nested extends Container {} +} + +// FILE: ContainerType.java +public class ContainerType {} + +// FILE: Container.java +public class Container {} + +// FILE: Usage.java +public class Usage { + public static JavaClass.Nested foo() { return null; } +} + +// FILE: main.kt + +fun main() { + Usage.foo().hashCode() +} diff --git a/compiler/testData/diagnostics/tests/j+k/traitDefaultCall.fir.kt b/compiler/testData/diagnostics/tests/j+k/traitDefaultCall.fir.kt index e49d86b7fc5..0dc00cfd49a 100644 --- a/compiler/testData/diagnostics/tests/j+k/traitDefaultCall.fir.kt +++ b/compiler/testData/diagnostics/tests/j+k/traitDefaultCall.fir.kt @@ -1,3 +1,4 @@ +// !JVM_TARGET: 1.6 // FILE: Test.java public interface Test { default String test() { diff --git a/compiler/testData/diagnostics/tests/j+k/traitDefaultCall.kt b/compiler/testData/diagnostics/tests/j+k/traitDefaultCall.kt index 6531848b7c6..ebe5049641c 100644 --- a/compiler/testData/diagnostics/tests/j+k/traitDefaultCall.kt +++ b/compiler/testData/diagnostics/tests/j+k/traitDefaultCall.kt @@ -1,3 +1,4 @@ +// !JVM_TARGET: 1.6 // FILE: Test.java public interface Test { default String test() { diff --git a/compiler/testData/diagnostics/tests/override/OverridingFinalMember.fir.kt b/compiler/testData/diagnostics/tests/override/OverridingFinalMember.fir.kt deleted file mode 100644 index 95f20afd171..00000000000 --- a/compiler/testData/diagnostics/tests/override/OverridingFinalMember.fir.kt +++ /dev/null @@ -1,7 +0,0 @@ -open class A { - final fun foo() {} -} - -class B : A() { - override fun foo() {} -} diff --git a/compiler/testData/diagnostics/tests/override/OverridingFinalMember.kt b/compiler/testData/diagnostics/tests/override/OverridingFinalMember.kt index 1d90924753d..6dbf09585d8 100644 --- a/compiler/testData/diagnostics/tests/override/OverridingFinalMember.kt +++ b/compiler/testData/diagnostics/tests/override/OverridingFinalMember.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL open class A { final fun foo() {} } diff --git a/compiler/testData/diagnostics/tests/override/overrideMemberFromFinalClass.fir.kt b/compiler/testData/diagnostics/tests/override/overrideMemberFromFinalClass.fir.kt index c0430ca06a2..6585b36718a 100644 --- a/compiler/testData/diagnostics/tests/override/overrideMemberFromFinalClass.fir.kt +++ b/compiler/testData/diagnostics/tests/override/overrideMemberFromFinalClass.fir.kt @@ -5,7 +5,7 @@ class Foo { class Bar : Foo() { override fun openFoo() {} - override fun finalFoo() {} + override fun finalFoo() {} } diff --git a/compiler/testData/diagnostics/tests/platformTypes/propagateFlexibilityFromOtherConstraints.fir.kt b/compiler/testData/diagnostics/tests/platformTypes/propagateFlexibilityFromOtherConstraints.fir.kt deleted file mode 100644 index 4cbcd0abc0a..00000000000 --- a/compiler/testData/diagnostics/tests/platformTypes/propagateFlexibilityFromOtherConstraints.fir.kt +++ /dev/null @@ -1,32 +0,0 @@ -// FULL_JDK -// FILE: test.kt - -@file:Suppress("UNUSED_PARAMETER") - -import java.util.Comparator - -abstract class DataView { - abstract val presentationName: String -} - -fun comboBox( - model: SortedComboBoxModel, - graphProperty: GraphProperty, -) {} - -class GraphProperty - -fun test() { - val presentationName: (DataView) -> String = { it.presentationName } - val parentComboBoxModel/*: SortedComboBoxModel*/ = SortedComboBoxModel(Comparator.comparing(presentationName)) - comboBox(parentComboBoxModel, GraphProperty()) -} - -// FILE: SortedComboBoxModel.java - -import java.util.Comparator; - -public class SortedComboBoxModel { - public SortedComboBoxModel(Comparator comparator) { - } -} \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/platformTypes/propagateFlexibilityFromOtherConstraints.kt b/compiler/testData/diagnostics/tests/platformTypes/propagateFlexibilityFromOtherConstraints.kt index de37642cfb4..5f79bc7bbf8 100644 --- a/compiler/testData/diagnostics/tests/platformTypes/propagateFlexibilityFromOtherConstraints.kt +++ b/compiler/testData/diagnostics/tests/platformTypes/propagateFlexibilityFromOtherConstraints.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FULL_JDK // FILE: test.kt @@ -18,7 +19,7 @@ class GraphProperty fun test() { val presentationName: (DataView) -> String = { it.presentationName } - val parentComboBoxModel/*: SortedComboBoxModel*/ = SortedComboBoxModel(Comparator.comparing(presentationName)) + val parentComboBoxModel/*: SortedComboBoxModel*/ = SortedComboBoxModel(Comparator.comparing(presentationName)) comboBox(parentComboBoxModel, GraphProperty()) } @@ -29,4 +30,4 @@ import java.util.Comparator; public class SortedComboBoxModel { public SortedComboBoxModel(Comparator comparator) { } -} \ No newline at end of file +} diff --git a/compiler/testData/diagnostics/tests/regressions/kt3810.fir.kt b/compiler/testData/diagnostics/tests/regressions/kt3810.fir.kt deleted file mode 100644 index a9b163040e9..00000000000 --- a/compiler/testData/diagnostics/tests/regressions/kt3810.fir.kt +++ /dev/null @@ -1,5 +0,0 @@ -interface A { - var foo: String -} - -class B(override val foo: String) : A diff --git a/compiler/testData/diagnostics/tests/regressions/kt3810.kt b/compiler/testData/diagnostics/tests/regressions/kt3810.kt index 180c1dfc550..1b6a8957b92 100644 --- a/compiler/testData/diagnostics/tests/regressions/kt3810.kt +++ b/compiler/testData/diagnostics/tests/regressions/kt3810.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL interface A { var foo: String } diff --git a/compiler/testData/diagnostics/tests/resolve/resolveTypeArgsForUnresolvedCall.fir.kt b/compiler/testData/diagnostics/tests/resolve/resolveTypeArgsForUnresolvedCall.fir.kt index 6baf4a9ebe5..4994cdbaeba 100644 --- a/compiler/testData/diagnostics/tests/resolve/resolveTypeArgsForUnresolvedCall.fir.kt +++ b/compiler/testData/diagnostics/tests/resolve/resolveTypeArgsForUnresolvedCall.fir.kt @@ -1,4 +1,4 @@ fun foo() { - x.yyy() + x.yyy<XXX>() x.yyy() } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/scopes/VisibilityInheritModifier.fir.kt b/compiler/testData/diagnostics/tests/scopes/VisibilityInheritModifier.fir.kt index bde07b70546..fe0830c44b9 100644 --- a/compiler/testData/diagnostics/tests/scopes/VisibilityInheritModifier.fir.kt +++ b/compiler/testData/diagnostics/tests/scopes/VisibilityInheritModifier.fir.kt @@ -65,7 +65,7 @@ open class L : T { } class M : L() { - internal override fun foo() {} + internal override fun foo() {} } //--------------- interface R { @@ -81,5 +81,5 @@ interface Q : R { } class S : P, Q { - internal override fun foo() {} + internal override fun foo() {} } diff --git a/compiler/testData/diagnostics/tests/scopes/kt1248.fir.kt b/compiler/testData/diagnostics/tests/scopes/kt1248.fir.kt deleted file mode 100644 index a083534a2b3..00000000000 --- a/compiler/testData/diagnostics/tests/scopes/kt1248.fir.kt +++ /dev/null @@ -1,12 +0,0 @@ -//KT-1248 Control visibility of overrides needed -package kt1248 - -interface ParseResult { - public val success : Boolean - public val value : T -} - -class Success(internal override val value : T) : ParseResult { - internal override val success : Boolean = true -} - diff --git a/compiler/testData/diagnostics/tests/scopes/kt1248.kt b/compiler/testData/diagnostics/tests/scopes/kt1248.kt index d7d37268638..3f800bfb141 100644 --- a/compiler/testData/diagnostics/tests/scopes/kt1248.kt +++ b/compiler/testData/diagnostics/tests/scopes/kt1248.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL //KT-1248 Control visibility of overrides needed package kt1248 diff --git a/compiler/testData/diagnostics/tests/scopes/kt151.fir.kt b/compiler/testData/diagnostics/tests/scopes/kt151.fir.kt index 3cf914f2bb4..6b2b2ef4735 100644 --- a/compiler/testData/diagnostics/tests/scopes/kt151.fir.kt +++ b/compiler/testData/diagnostics/tests/scopes/kt151.fir.kt @@ -28,11 +28,11 @@ class D : C(), T { } class E : C(), T { - internal override fun foo() {} + internal override fun foo() {} } class F : C(), T { - private override fun foo() {} + private override fun foo() {} } class G : C(), T { diff --git a/compiler/testData/diagnostics/tests/scopes/kt323.fir.kt b/compiler/testData/diagnostics/tests/scopes/kt323.fir.kt index e1cf65d75ec..497022d7652 100644 --- a/compiler/testData/diagnostics/tests/scopes/kt323.fir.kt +++ b/compiler/testData/diagnostics/tests/scopes/kt323.fir.kt @@ -6,7 +6,7 @@ open class A { } class B : A() { - override val a = 34 + override val a = 34 var b : Int public get() = 23 diff --git a/compiler/testData/diagnostics/tests/targetedBuiltIns/stream.fir.kt b/compiler/testData/diagnostics/tests/targetedBuiltIns/stream.fir.kt deleted file mode 100644 index 0073efb8034..00000000000 --- a/compiler/testData/diagnostics/tests/targetedBuiltIns/stream.fir.kt +++ /dev/null @@ -1,13 +0,0 @@ -// !WITH_NEW_INFERENCE -// FULL_JDK - -import java.util.stream.* - -interface A : Collection { - override fun stream(): Stream = Stream.of() -} - -fun foo(x: List, y: A) { - x.stream().filter { it.length > 0 }.collect(Collectors.toList()) - y.stream().filter { it.length > 0 } -} diff --git a/compiler/testData/diagnostics/tests/targetedBuiltIns/stream.kt b/compiler/testData/diagnostics/tests/targetedBuiltIns/stream.kt index 678abf38109..5848f2ca42f 100644 --- a/compiler/testData/diagnostics/tests/targetedBuiltIns/stream.kt +++ b/compiler/testData/diagnostics/tests/targetedBuiltIns/stream.kt @@ -1,10 +1,10 @@ -// !WITH_NEW_INFERENCE +// FIR_IDENTICAL // FULL_JDK import java.util.stream.* interface A : Collection { - override fun stream(): Stream = Stream.of() + override fun stream(): Stream = Stream.of() } fun foo(x: List, y: A) { diff --git a/compiler/testData/diagnostics/tests/typealias/parameterRestrictions.fir.kt b/compiler/testData/diagnostics/tests/typealias/parameterRestrictions.fir.kt index d8e6cad4ce7..09ef7d29798 100644 --- a/compiler/testData/diagnostics/tests/typealias/parameterRestrictions.fir.kt +++ b/compiler/testData/diagnostics/tests/typealias/parameterRestrictions.fir.kt @@ -1,6 +1,6 @@ // !DIAGNOSTICS: -UNUSED_TYPEALIAS_PARAMETER -typealias WithVariance<in X, out Y> = Int +typealias WithVariance<in X, out Y> = Int typealias WithBounds1 = Int typealias WithBounds2 = Int diff --git a/compiler/testData/diagnostics/testsWithStdLib/annotations/jvmStatic/functions_LL13.kt b/compiler/testData/diagnostics/testsWithStdLib/annotations/jvmStatic/functions_LL13.kt index 7acdbf84d90..621f6dc93c7 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/annotations/jvmStatic/functions_LL13.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/annotations/jvmStatic/functions_LL13.kt @@ -28,7 +28,7 @@ class A { interface B { companion object { - @JvmStatic fun a1() { + @JvmStatic fun a1() { } } diff --git a/compiler/testData/diagnostics/testsWithStdLib/annotations/jvmStatic/interfaceCompanion_LL13_16.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/annotations/jvmStatic/interfaceCompanion_LL13_16.fir.kt index 073edc66c0f..be8b42471bc 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/annotations/jvmStatic/interfaceCompanion_LL13_16.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/annotations/jvmStatic/interfaceCompanion_LL13_16.fir.kt @@ -1,5 +1,7 @@ // !DIAGNOSTICS: -UNUSED_VARIABLE // !LANGUAGE: +JvmStaticInInterface +// !JVM_TARGET: 1.6 + interface B { companion object { @JvmStatic fun a1() { diff --git a/compiler/testData/diagnostics/testsWithStdLib/annotations/jvmStatic/interfaceCompanion_LL13_16.kt b/compiler/testData/diagnostics/testsWithStdLib/annotations/jvmStatic/interfaceCompanion_LL13_16.kt index 15b17fc94ef..a0837b30a80 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/annotations/jvmStatic/interfaceCompanion_LL13_16.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/annotations/jvmStatic/interfaceCompanion_LL13_16.kt @@ -1,5 +1,7 @@ // !DIAGNOSTICS: -UNUSED_VARIABLE // !LANGUAGE: +JvmStaticInInterface +// !JVM_TARGET: 1.6 + interface B { companion object { @JvmStatic fun a1() { diff --git a/compiler/testData/diagnostics/testsWithStdLib/builderInference/completeIrrelevantCalls.kt b/compiler/testData/diagnostics/testsWithStdLib/builderInference/completeIrrelevantCalls.kt new file mode 100644 index 00000000000..61e430dd75f --- /dev/null +++ b/compiler/testData/diagnostics/testsWithStdLib/builderInference/completeIrrelevantCalls.kt @@ -0,0 +1,16 @@ +// FIR_IDENTICAL +// SKIP_TXT + +class A { + lateinit var m: Map + + @ExperimentalStdlibApi + fun foo(xs: Collection>) { + m = buildMap { + // flatMap calls might be completed on early phase + for (x in xs.flatMap { it.toList() }) { + put(x, x.length) + } + } + } +} diff --git a/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/kt41308.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/kt41308.fir.kt deleted file mode 100644 index f31747fa9b1..00000000000 --- a/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/kt41308.fir.kt +++ /dev/null @@ -1,9 +0,0 @@ -// ISSUE: KT-41308 - -fun main() { - sequence { - val list: List? = null - val outputList = ")!>list ?: listOf() - yieldAll(outputList) - } -} diff --git a/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/kt41308.kt b/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/kt41308.kt index 14e081cacc7..f866bcfc5eb 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/kt41308.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/kt41308.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // ISSUE: KT-41308 fun main() { diff --git a/compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendFunctionType/lambdaInOverriddenValInitializer.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendFunctionType/lambdaInOverriddenValInitializer.fir.kt deleted file mode 100644 index b5bd1cae554..00000000000 --- a/compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendFunctionType/lambdaInOverriddenValInitializer.fir.kt +++ /dev/null @@ -1,23 +0,0 @@ -interface Foo { - val foo: suspend () -> Unit -} - -interface Bar { - val bar: T -} - -class Test1 : Foo { - override val foo = {} -} - -class Test2 : Foo { - override val foo: suspend () -> Unit = {} -} - -class Test3 : Bar Unit> { - override val bar = {} -} - -class Test4 : Bar Unit> { - override val bar: suspend () -> Unit = {} -} \ No newline at end of file diff --git a/compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendFunctionType/lambdaInOverriddenValInitializer.kt b/compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendFunctionType/lambdaInOverriddenValInitializer.kt index 1cdd795aa1c..aca37d452cf 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendFunctionType/lambdaInOverriddenValInitializer.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendFunctionType/lambdaInOverriddenValInitializer.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL interface Foo { val foo: suspend () -> Unit } diff --git a/compiler/testData/diagnostics/testsWithStdLib/reflection/classArrayInAnnotation.kt b/compiler/testData/diagnostics/testsWithStdLib/reflection/classArrayInAnnotation.kt new file mode 100644 index 00000000000..cbf4c0cbf49 --- /dev/null +++ b/compiler/testData/diagnostics/testsWithStdLib/reflection/classArrayInAnnotation.kt @@ -0,0 +1,22 @@ +// FIR_IDENTICAL +// SKIP_TXT +// FILE: MyAnn.java +import java.lang.annotation.ElementType; +import java.lang.annotation.Inherited; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.TYPE) +public @interface MyAnn { + /** + * @return the classes to be run + */ + public Class[] value(); +} +// FILE: main.kt + +fun foo(y: MyAnn?): List>? { + return y?.value?.map { it.java } +} diff --git a/compiler/testData/diagnostics/testsWithStdLib/regression/ea66827_dataClassWrongToString.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/regression/ea66827_dataClassWrongToString.fir.kt deleted file mode 100644 index 9cc1a6bf83d..00000000000 --- a/compiler/testData/diagnostics/testsWithStdLib/regression/ea66827_dataClassWrongToString.fir.kt +++ /dev/null @@ -1,7 +0,0 @@ -data class A(val x: Int) { - fun toArray(): IntArray = - intArrayOf(x) - - override fun toString() = - toArray().takeWhile { it != -1 } // .joinToString() -} diff --git a/compiler/testData/diagnostics/testsWithStdLib/regression/ea66827_dataClassWrongToString.kt b/compiler/testData/diagnostics/testsWithStdLib/regression/ea66827_dataClassWrongToString.kt index e39b5976a9b..1ec1b26931f 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/regression/ea66827_dataClassWrongToString.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/regression/ea66827_dataClassWrongToString.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL data class A(val x: Int) { fun toArray(): IntArray = intArrayOf(x) diff --git a/compiler/testData/diagnostics/testsWithStdLib/resolve/sameNameClassesFromSupertypes.kt b/compiler/testData/diagnostics/testsWithStdLib/resolve/sameNameClassesFromSupertypes.kt new file mode 100644 index 00000000000..3874d549007 --- /dev/null +++ b/compiler/testData/diagnostics/testsWithStdLib/resolve/sameNameClassesFromSupertypes.kt @@ -0,0 +1,22 @@ +// FIR_IDENTICAL +// SKIP_TXT + +abstract class MostBase { + inner class Inner( + val bad: String, + ) +} + +abstract class Base : MostBase() { + inner class Inner( + val name: String?, + val res: Int, + ) +} + +class A : Base() { + fun foo(l: List) { + val m = l.groupBy(Inner::name) + m[""]!![0].res + } +} diff --git a/compiler/testData/diagnostics/testsWithStdLib/targetedBuiltIns/blackListed.kt b/compiler/testData/diagnostics/testsWithStdLib/targetedBuiltIns/blackListed.kt index 5738db9fc65..45bb362072c 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/targetedBuiltIns/blackListed.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/targetedBuiltIns/blackListed.kt @@ -2,7 +2,7 @@ abstract class A : MutableList { override fun sort(/*0*/ p0: java.util.Comparator) { - super.sort(p0) + super.sort(p0) } } diff --git a/compiler/testData/integration/smoke/noReflect/noReflect.compile.expected b/compiler/testData/integration/smoke/noReflect/noReflect.compile.expected new file mode 100644 index 00000000000..43f7acbc168 --- /dev/null +++ b/compiler/testData/integration/smoke/noReflect/noReflect.compile.expected @@ -0,0 +1,6 @@ +ERR: +noReflect.kt:5:23: warning: call uses reflection API which is not found in compilation classpath. Make sure you have kotlin-reflect.jar in the classpath + String::class.annotations + ^ + +Return code: 0 diff --git a/compiler/testData/integration/smoke/noReflect/noReflect.kt b/compiler/testData/integration/smoke/noReflect/noReflect.kt new file mode 100644 index 00000000000..b1cdc504e49 --- /dev/null +++ b/compiler/testData/integration/smoke/noReflect/noReflect.kt @@ -0,0 +1,9 @@ +package noReflect + +fun main() { + try { + String::class.annotations + } catch (e: KotlinReflectionNotSupportedError) { + println("KotlinReflectionNotSupportedError has been caught") + } +} \ No newline at end of file diff --git a/compiler/testData/integration/smoke/noReflect/noReflect.run.expected b/compiler/testData/integration/smoke/noReflect/noReflect.run.expected new file mode 100644 index 00000000000..f2c45d486ed --- /dev/null +++ b/compiler/testData/integration/smoke/noReflect/noReflect.run.expected @@ -0,0 +1,4 @@ +OUT: +KotlinReflectionNotSupportedError has been caught + +Return code: 0 diff --git a/compiler/testData/integration/smoke/reflect/reflect.compile.expected b/compiler/testData/integration/smoke/reflect/reflect.compile.expected new file mode 100644 index 00000000000..a14ac74940f --- /dev/null +++ b/compiler/testData/integration/smoke/reflect/reflect.compile.expected @@ -0,0 +1 @@ +Return code: 0 diff --git a/compiler/testData/integration/smoke/reflect/reflect.kt b/compiler/testData/integration/smoke/reflect/reflect.kt new file mode 100644 index 00000000000..4fb5c0b80cf --- /dev/null +++ b/compiler/testData/integration/smoke/reflect/reflect.kt @@ -0,0 +1,5 @@ +package reflect + +fun main() { + String::class.annotations +} \ No newline at end of file diff --git a/compiler/testData/integration/smoke/reflect/reflect.run.expected b/compiler/testData/integration/smoke/reflect/reflect.run.expected new file mode 100644 index 00000000000..a14ac74940f --- /dev/null +++ b/compiler/testData/integration/smoke/reflect/reflect.run.expected @@ -0,0 +1 @@ +Return code: 0 diff --git a/compiler/testData/ir/irText/classes/enumWithMultipleCtors.fir.txt b/compiler/testData/ir/irText/classes/enumWithMultipleCtors.fir.txt index b47a5b26cad..cef61fee30f 100644 --- a/compiler/testData/ir/irText/classes/enumWithMultipleCtors.fir.txt +++ b/compiler/testData/ir/irText/classes/enumWithMultipleCtors.fir.txt @@ -149,7 +149,7 @@ FILE fqName: fileName:/enumWithMultipleCtors.kt VALUE_PARAMETER name:x index:0 type:kotlin.Int BLOCK_BODY ENUM_CONSTRUCTOR_CALL 'private constructor (arg: kotlin.String) declared in .A' - arg: CALL 'public open fun toString (): kotlin.String [fake_override] declared in kotlin.Int' type=kotlin.String origin=null + arg: CALL 'public open fun toString (): kotlin.String declared in kotlin.Any' type=kotlin.String origin=null $this: GET_VAR 'x: kotlin.Int declared in .A.' type=kotlin.Int origin=null CALL 'public final fun (: kotlin.String): kotlin.Unit declared in .A' type=kotlin.Unit origin=EQ $this: GET_VAR ': .A declared in .A' type=.A origin=null @@ -159,15 +159,15 @@ FILE fqName: fileName:/enumWithMultipleCtors.kt BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun f (): kotlin.String declared in .A' STRING_CONCATENATION type=kotlin.String - CALL 'public open fun toString (): kotlin.String [fake_override] declared in kotlin.String' type=kotlin.String origin=null + CALL 'public open fun toString (): kotlin.String declared in kotlin.Any' type=kotlin.String origin=null $this: CALL 'public final fun (): kotlin.String declared in .A' type=kotlin.String origin=GET_PROPERTY $this: GET_VAR ': .A declared in .A.f' type=.A origin=null CONST String type=kotlin.String value="#" - CALL 'public open fun toString (): kotlin.String [fake_override] declared in kotlin.String' type=kotlin.String origin=null + CALL 'public open fun toString (): kotlin.String declared in kotlin.Any' type=kotlin.String origin=null $this: CALL 'public final fun (): kotlin.String declared in .A' type=kotlin.String origin=GET_PROPERTY $this: GET_VAR ': .A declared in .A.f' type=.A origin=null CONST String type=kotlin.String value="#" - CALL 'public open fun toString (): kotlin.String [fake_override] declared in kotlin.String' type=kotlin.String origin=null + CALL 'public open fun toString (): kotlin.String declared in kotlin.Any' type=kotlin.String origin=null $this: CALL 'public final fun (): kotlin.String declared in .A' type=kotlin.String origin=GET_PROPERTY $this: GET_VAR ': .A declared in .A.f' type=.A origin=null FUN ENUM_CLASS_SPECIAL_MEMBER name:values visibility:public modality:FINAL <> () returnType:kotlin.Array<.A> diff --git a/compiler/testData/ir/irText/expressions/breakContinueInWhen.fir.txt b/compiler/testData/ir/irText/expressions/breakContinueInWhen.fir.txt index 68ace031716..fa2946013ce 100644 --- a/compiler/testData/ir/irText/expressions/breakContinueInWhen.fir.txt +++ b/compiler/testData/ir/irText/expressions/breakContinueInWhen.fir.txt @@ -124,7 +124,7 @@ FILE fqName: fileName:/breakContinueInWhen.kt CALL 'public final fun plus (other: kotlin.Any?): kotlin.String [operator] declared in kotlin.String' type=kotlin.String origin=null $this: GET_VAR 'var s: kotlin.String [var] declared in .testContinueDoWhile' type=kotlin.String origin=null other: STRING_CONCATENATION type=kotlin.String - CALL 'public open fun toString (): kotlin.String [fake_override] declared in kotlin.Int' type=kotlin.String origin=null + CALL 'public open fun toString (): kotlin.String declared in kotlin.Any' type=kotlin.String origin=null $this: GET_VAR 'var k: kotlin.Int [var] declared in .testContinueDoWhile' type=kotlin.Int origin=null CONST String type=kotlin.String value=";" condition: CALL 'public final fun less (arg0: kotlin.Int, arg1: kotlin.Int): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=LT diff --git a/compiler/testData/ir/irText/expressions/callableReferences/adaptedExtensionFunctions.kt.txt b/compiler/testData/ir/irText/expressions/callableReferences/adaptedExtensionFunctions.kt.txt index 59c4b5eb534..b28c2fbf482 100644 --- a/compiler/testData/ir/irText/expressions/callableReferences/adaptedExtensionFunctions.kt.txt +++ b/compiler/testData/ir/irText/expressions/callableReferences/adaptedExtensionFunctions.kt.txt @@ -20,23 +20,32 @@ fun C.extensionBoth(i: Int, s: String = "", vararg t: String) { } fun testExtensionVararg() { - use(f = local fun extensionVararg(p0: C, p1: Int) { - p0.extensionVararg(i = p1) - } -) + use(f = { // BLOCK + local fun extensionVararg(p0: C, p1: Int) { + p0.extensionVararg(i = p1) + } + + ::extensionVararg + }) } fun testExtensionDefault() { - use(f = local fun extensionDefault(p0: C, p1: Int) { - p0.extensionDefault(i = p1) - } -) + use(f = { // BLOCK + local fun extensionDefault(p0: C, p1: Int) { + p0.extensionDefault(i = p1) + } + + ::extensionDefault + }) } fun testExtensionBoth() { - use(f = local fun extensionBoth(p0: C, p1: Int) { - p0.extensionBoth(i = p1) - } -) + use(f = { // BLOCK + local fun extensionBoth(p0: C, p1: Int) { + p0.extensionBoth(i = p1) + } + + ::extensionBoth + }) } diff --git a/compiler/testData/ir/irText/expressions/callableReferences/adaptedExtensionFunctions.txt b/compiler/testData/ir/irText/expressions/callableReferences/adaptedExtensionFunctions.txt index 318a0636e69..524ec3aa4ce 100644 --- a/compiler/testData/ir/irText/expressions/callableReferences/adaptedExtensionFunctions.txt +++ b/compiler/testData/ir/irText/expressions/callableReferences/adaptedExtensionFunctions.txt @@ -44,7 +44,7 @@ FILE fqName: fileName:/adaptedExtensionFunctions.kt FUN name:testExtensionVararg visibility:public modality:FINAL <> () returnType:kotlin.Unit BLOCK_BODY CALL 'public final fun use (f: @[ExtensionFunctionType] kotlin.Function2<.C, kotlin.Int, kotlin.Unit>): kotlin.Unit declared in ' type=kotlin.Unit origin=null - f: FUN_EXPR type=kotlin.Function2<.C, kotlin.Int, kotlin.Unit> origin=ADAPTED_FUNCTION_REFERENCE + f: BLOCK type=kotlin.Function2<.C, kotlin.Int, kotlin.Unit> origin=ADAPTED_FUNCTION_REFERENCE FUN ADAPTER_FOR_CALLABLE_REFERENCE name:extensionVararg visibility:local modality:FINAL <> (p0:.C, p1:kotlin.Int) returnType:kotlin.Unit VALUE_PARAMETER ADAPTER_PARAMETER_FOR_CALLABLE_REFERENCE name:p0 index:0 type:.C VALUE_PARAMETER ADAPTER_PARAMETER_FOR_CALLABLE_REFERENCE name:p1 index:1 type:kotlin.Int @@ -52,10 +52,11 @@ FILE fqName: fileName:/adaptedExtensionFunctions.kt CALL 'public final fun extensionVararg (i: kotlin.Int, vararg s: kotlin.String): kotlin.Unit declared in ' type=kotlin.Unit origin=null $receiver: GET_VAR 'p0: .C declared in .testExtensionVararg.extensionVararg' type=.C origin=null i: GET_VAR 'p1: kotlin.Int declared in .testExtensionVararg.extensionVararg' type=kotlin.Int origin=null + FUNCTION_REFERENCE 'local final fun extensionVararg (p0: .C, p1: kotlin.Int): kotlin.Unit declared in .testExtensionVararg' type=kotlin.Function2<.C, kotlin.Int, kotlin.Unit> origin=ADAPTED_FUNCTION_REFERENCE reflectionTarget=public final fun extensionVararg (i: kotlin.Int, vararg s: kotlin.String): kotlin.Unit declared in FUN name:testExtensionDefault visibility:public modality:FINAL <> () returnType:kotlin.Unit BLOCK_BODY CALL 'public final fun use (f: @[ExtensionFunctionType] kotlin.Function2<.C, kotlin.Int, kotlin.Unit>): kotlin.Unit declared in ' type=kotlin.Unit origin=null - f: FUN_EXPR type=kotlin.Function2<.C, kotlin.Int, kotlin.Unit> origin=ADAPTED_FUNCTION_REFERENCE + f: BLOCK type=kotlin.Function2<.C, kotlin.Int, kotlin.Unit> origin=ADAPTED_FUNCTION_REFERENCE FUN ADAPTER_FOR_CALLABLE_REFERENCE name:extensionDefault visibility:local modality:FINAL <> (p0:.C, p1:kotlin.Int) returnType:kotlin.Unit VALUE_PARAMETER ADAPTER_PARAMETER_FOR_CALLABLE_REFERENCE name:p0 index:0 type:.C VALUE_PARAMETER ADAPTER_PARAMETER_FOR_CALLABLE_REFERENCE name:p1 index:1 type:kotlin.Int @@ -63,10 +64,11 @@ FILE fqName: fileName:/adaptedExtensionFunctions.kt CALL 'public final fun extensionDefault (i: kotlin.Int, s: kotlin.String): kotlin.Unit declared in ' type=kotlin.Unit origin=null $receiver: GET_VAR 'p0: .C declared in .testExtensionDefault.extensionDefault' type=.C origin=null i: GET_VAR 'p1: kotlin.Int declared in .testExtensionDefault.extensionDefault' type=kotlin.Int origin=null + FUNCTION_REFERENCE 'local final fun extensionDefault (p0: .C, p1: kotlin.Int): kotlin.Unit declared in .testExtensionDefault' type=kotlin.Function2<.C, kotlin.Int, kotlin.Unit> origin=ADAPTED_FUNCTION_REFERENCE reflectionTarget=public final fun extensionDefault (i: kotlin.Int, s: kotlin.String): kotlin.Unit declared in FUN name:testExtensionBoth visibility:public modality:FINAL <> () returnType:kotlin.Unit BLOCK_BODY CALL 'public final fun use (f: @[ExtensionFunctionType] kotlin.Function2<.C, kotlin.Int, kotlin.Unit>): kotlin.Unit declared in ' type=kotlin.Unit origin=null - f: FUN_EXPR type=kotlin.Function2<.C, kotlin.Int, kotlin.Unit> origin=ADAPTED_FUNCTION_REFERENCE + f: BLOCK type=kotlin.Function2<.C, kotlin.Int, kotlin.Unit> origin=ADAPTED_FUNCTION_REFERENCE FUN ADAPTER_FOR_CALLABLE_REFERENCE name:extensionBoth visibility:local modality:FINAL <> (p0:.C, p1:kotlin.Int) returnType:kotlin.Unit VALUE_PARAMETER ADAPTER_PARAMETER_FOR_CALLABLE_REFERENCE name:p0 index:0 type:.C VALUE_PARAMETER ADAPTER_PARAMETER_FOR_CALLABLE_REFERENCE name:p1 index:1 type:kotlin.Int @@ -74,3 +76,4 @@ FILE fqName: fileName:/adaptedExtensionFunctions.kt CALL 'public final fun extensionBoth (i: kotlin.Int, s: kotlin.String, vararg t: kotlin.String): kotlin.Unit declared in ' type=kotlin.Unit origin=null $receiver: GET_VAR 'p0: .C declared in .testExtensionBoth.extensionBoth' type=.C origin=null i: GET_VAR 'p1: kotlin.Int declared in .testExtensionBoth.extensionBoth' type=kotlin.Int origin=null + FUNCTION_REFERENCE 'local final fun extensionBoth (p0: .C, p1: kotlin.Int): kotlin.Unit declared in .testExtensionBoth' type=kotlin.Function2<.C, kotlin.Int, kotlin.Unit> origin=ADAPTED_FUNCTION_REFERENCE reflectionTarget=public final fun extensionBoth (i: kotlin.Int, s: kotlin.String, vararg t: kotlin.String): kotlin.Unit declared in diff --git a/compiler/testData/ir/irText/expressions/callableReferences/adaptedWithCoercionToUnit.kt.txt b/compiler/testData/ir/irText/expressions/callableReferences/adaptedWithCoercionToUnit.kt.txt index 856a06456a7..c50ccf7abca 100644 --- a/compiler/testData/ir/irText/expressions/callableReferences/adaptedWithCoercionToUnit.kt.txt +++ b/compiler/testData/ir/irText/expressions/callableReferences/adaptedWithCoercionToUnit.kt.txt @@ -17,30 +17,42 @@ fun fnv(vararg xs: Int): Int { } fun test0() { - return useUnit0(fn = local fun fn0() { - fn0() /*~> Unit */ - } -) + return useUnit0(fn = { // BLOCK + local fun fn0() { + fn0() /*~> Unit */ + } + + ::fn0 + }) } fun test1() { - return useUnit1(fn = local fun fn1(p0: Int) { - fn1(x = p0) /*~> Unit */ - } -) + return useUnit1(fn = { // BLOCK + local fun fn1(p0: Int) { + fn1(x = p0) /*~> Unit */ + } + + ::fn1 + }) } fun testV0() { - return useUnit0(fn = local fun fnv() { - fnv() /*~> Unit */ - } -) + return useUnit0(fn = { // BLOCK + local fun fnv() { + fnv() /*~> Unit */ + } + + ::fnv + }) } fun testV1() { - return useUnit1(fn = local fun fnv(p0: Int) { - fnv(xs = [p0]) /*~> Unit */ - } -) + return useUnit1(fn = { // BLOCK + local fun fnv(p0: Int) { + fnv(xs = [p0]) /*~> Unit */ + } + + ::fnv + }) } diff --git a/compiler/testData/ir/irText/expressions/callableReferences/adaptedWithCoercionToUnit.txt b/compiler/testData/ir/irText/expressions/callableReferences/adaptedWithCoercionToUnit.txt index e70b3788e54..f7701b314e0 100644 --- a/compiler/testData/ir/irText/expressions/callableReferences/adaptedWithCoercionToUnit.txt +++ b/compiler/testData/ir/irText/expressions/callableReferences/adaptedWithCoercionToUnit.txt @@ -23,36 +23,39 @@ FILE fqName: fileName:/adaptedWithCoercionToUnit.kt BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun test0 (): kotlin.Unit declared in ' CALL 'public final fun useUnit0 (fn: kotlin.Function0): kotlin.Unit declared in ' type=kotlin.Unit origin=null - fn: FUN_EXPR type=kotlin.Function0 origin=ADAPTED_FUNCTION_REFERENCE + fn: BLOCK type=kotlin.Function0 origin=ADAPTED_FUNCTION_REFERENCE FUN ADAPTER_FOR_CALLABLE_REFERENCE name:fn0 visibility:local modality:FINAL <> () returnType:kotlin.Unit BLOCK_BODY TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit CALL 'public final fun fn0 (): kotlin.Int declared in ' type=kotlin.Int origin=null + FUNCTION_REFERENCE 'local final fun fn0 (): kotlin.Unit declared in .test0' type=kotlin.Function0 origin=ADAPTED_FUNCTION_REFERENCE reflectionTarget=public final fun fn0 (): kotlin.Int declared in FUN name:test1 visibility:public modality:FINAL <> () returnType:kotlin.Unit BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun test1 (): kotlin.Unit declared in ' CALL 'public final fun useUnit1 (fn: kotlin.Function1): kotlin.Unit declared in ' type=kotlin.Unit origin=null - fn: FUN_EXPR type=kotlin.Function1 origin=ADAPTED_FUNCTION_REFERENCE + fn: BLOCK type=kotlin.Function1 origin=ADAPTED_FUNCTION_REFERENCE FUN ADAPTER_FOR_CALLABLE_REFERENCE name:fn1 visibility:local modality:FINAL <> (p0:kotlin.Int) returnType:kotlin.Unit VALUE_PARAMETER ADAPTER_PARAMETER_FOR_CALLABLE_REFERENCE name:p0 index:0 type:kotlin.Int BLOCK_BODY TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit CALL 'public final fun fn1 (x: kotlin.Int): kotlin.Int declared in ' type=kotlin.Int origin=null x: GET_VAR 'p0: kotlin.Int declared in .test1.fn1' type=kotlin.Int origin=null + FUNCTION_REFERENCE 'local final fun fn1 (p0: kotlin.Int): kotlin.Unit declared in .test1' type=kotlin.Function1 origin=ADAPTED_FUNCTION_REFERENCE reflectionTarget=public final fun fn1 (x: kotlin.Int): kotlin.Int declared in FUN name:testV0 visibility:public modality:FINAL <> () returnType:kotlin.Unit BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun testV0 (): kotlin.Unit declared in ' CALL 'public final fun useUnit0 (fn: kotlin.Function0): kotlin.Unit declared in ' type=kotlin.Unit origin=null - fn: FUN_EXPR type=kotlin.Function0 origin=ADAPTED_FUNCTION_REFERENCE + fn: BLOCK type=kotlin.Function0 origin=ADAPTED_FUNCTION_REFERENCE FUN ADAPTER_FOR_CALLABLE_REFERENCE name:fnv visibility:local modality:FINAL <> () returnType:kotlin.Unit BLOCK_BODY TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit CALL 'public final fun fnv (vararg xs: kotlin.Int): kotlin.Int declared in ' type=kotlin.Int origin=null + FUNCTION_REFERENCE 'local final fun fnv (): kotlin.Unit declared in .testV0' type=kotlin.Function0 origin=ADAPTED_FUNCTION_REFERENCE reflectionTarget=public final fun fnv (vararg xs: kotlin.Int): kotlin.Int declared in FUN name:testV1 visibility:public modality:FINAL <> () returnType:kotlin.Unit BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun testV1 (): kotlin.Unit declared in ' CALL 'public final fun useUnit1 (fn: kotlin.Function1): kotlin.Unit declared in ' type=kotlin.Unit origin=null - fn: FUN_EXPR type=kotlin.Function1 origin=ADAPTED_FUNCTION_REFERENCE + fn: BLOCK type=kotlin.Function1 origin=ADAPTED_FUNCTION_REFERENCE FUN ADAPTER_FOR_CALLABLE_REFERENCE name:fnv visibility:local modality:FINAL <> (p0:kotlin.Int) returnType:kotlin.Unit VALUE_PARAMETER ADAPTER_PARAMETER_FOR_CALLABLE_REFERENCE name:p0 index:0 type:kotlin.Int BLOCK_BODY @@ -60,3 +63,4 @@ FILE fqName: fileName:/adaptedWithCoercionToUnit.kt CALL 'public final fun fnv (vararg xs: kotlin.Int): kotlin.Int declared in ' type=kotlin.Int origin=null xs: VARARG type=kotlin.IntArray varargElementType=kotlin.Int GET_VAR 'p0: kotlin.Int declared in .testV1.fnv' type=kotlin.Int origin=null + FUNCTION_REFERENCE 'local final fun fnv (p0: kotlin.Int): kotlin.Unit declared in .testV1' type=kotlin.Function1 origin=ADAPTED_FUNCTION_REFERENCE reflectionTarget=public final fun fnv (vararg xs: kotlin.Int): kotlin.Int declared in diff --git a/compiler/testData/ir/irText/expressions/callableReferences/boundInlineAdaptedReference.txt b/compiler/testData/ir/irText/expressions/callableReferences/boundInlineAdaptedReference.txt index e11e0cc7e4e..a7545077304 100644 --- a/compiler/testData/ir/irText/expressions/callableReferences/boundInlineAdaptedReference.txt +++ b/compiler/testData/ir/irText/expressions/callableReferences/boundInlineAdaptedReference.txt @@ -21,5 +21,5 @@ FILE fqName:test fileName:/boundInlineAdaptedReference.kt TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit CALL 'public final fun id (s: kotlin.String, vararg xs: kotlin.Int): kotlin.String declared in test' type=kotlin.String origin=null $receiver: GET_VAR 'receiver: kotlin.String declared in test.test.id' type=kotlin.String origin=ADAPTED_FUNCTION_REFERENCE - FUNCTION_REFERENCE 'local final fun id (): kotlin.Unit declared in test.test' type=kotlin.Function0 origin=ADAPTED_FUNCTION_REFERENCE reflectionTarget=null + FUNCTION_REFERENCE 'local final fun id (): kotlin.Unit declared in test.test' type=kotlin.Function0 origin=ADAPTED_FUNCTION_REFERENCE reflectionTarget=public final fun id (s: kotlin.String, vararg xs: kotlin.Int): kotlin.String declared in test $receiver: CONST String type=kotlin.String value="Fail" diff --git a/compiler/testData/ir/irText/expressions/callableReferences/caoWithAdaptationForSam.kt.txt b/compiler/testData/ir/irText/expressions/callableReferences/caoWithAdaptationForSam.kt.txt index 225648dd90a..180f88e39f0 100644 --- a/compiler/testData/ir/irText/expressions/callableReferences/caoWithAdaptationForSam.kt.txt +++ b/compiler/testData/ir/irText/expressions/callableReferences/caoWithAdaptationForSam.kt.txt @@ -46,10 +46,13 @@ fun withVararg(vararg xs: Int): Int { fun test1() { { // BLOCK val tmp0_array: A = A - val tmp2_sam: IFoo = local fun withVararg(p0: Int) { - withVararg(xs = [p0]) /*~> Unit */ - } - /*-> IFoo */ + val tmp2_sam: IFoo = { // BLOCK + local fun withVararg(p0: Int) { + withVararg(xs = [p0]) /*~> Unit */ + } + + ::withVararg + } /*-> IFoo */ tmp0_array.set(i = tmp2_sam, newValue = tmp0_array.get(i = tmp2_sam).plus(other = 1)) } } @@ -57,10 +60,13 @@ fun test1() { fun test2() { { // BLOCK val tmp0_array: B = B - val tmp2_sam: IFoo2 = local fun withVararg(p0: Int) { - withVararg(xs = [p0]) /*~> Unit */ - } - /*-> IFoo2 */ + val tmp2_sam: IFoo2 = { // BLOCK + local fun withVararg(p0: Int) { + withVararg(xs = [p0]) /*~> Unit */ + } + + ::withVararg + } /*-> IFoo2 */ tmp0_array.set(i = tmp2_sam, newValue = tmp0_array.get(i = tmp2_sam).plus(other = 1)) } } diff --git a/compiler/testData/ir/irText/expressions/callableReferences/caoWithAdaptationForSam.txt b/compiler/testData/ir/irText/expressions/callableReferences/caoWithAdaptationForSam.txt index 46b03f58936..640f58b385d 100644 --- a/compiler/testData/ir/irText/expressions/callableReferences/caoWithAdaptationForSam.txt +++ b/compiler/testData/ir/irText/expressions/callableReferences/caoWithAdaptationForSam.txt @@ -109,7 +109,7 @@ FILE fqName: fileName:/caoWithAdaptationForSam.kt GET_OBJECT 'CLASS OBJECT name:A modality:FINAL visibility:public superTypes:[kotlin.Any]' type=.A VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:.IFoo [val] TYPE_OP type=.IFoo origin=SAM_CONVERSION typeOperand=.IFoo - FUN_EXPR type=kotlin.Function1 origin=ADAPTED_FUNCTION_REFERENCE + BLOCK type=kotlin.Function1 origin=ADAPTED_FUNCTION_REFERENCE FUN ADAPTER_FOR_CALLABLE_REFERENCE name:withVararg visibility:local modality:FINAL <> (p0:kotlin.Int) returnType:kotlin.Unit VALUE_PARAMETER ADAPTER_PARAMETER_FOR_CALLABLE_REFERENCE name:p0 index:0 type:kotlin.Int BLOCK_BODY @@ -117,6 +117,7 @@ FILE fqName: fileName:/caoWithAdaptationForSam.kt CALL 'public final fun withVararg (vararg xs: kotlin.Int): kotlin.Int declared in ' type=kotlin.Int origin=null xs: VARARG type=kotlin.IntArray varargElementType=kotlin.Int GET_VAR 'p0: kotlin.Int declared in .test1.withVararg' type=kotlin.Int origin=null + FUNCTION_REFERENCE 'local final fun withVararg (p0: kotlin.Int): kotlin.Unit declared in .test1' type=kotlin.Function1 origin=ADAPTED_FUNCTION_REFERENCE reflectionTarget=public final fun withVararg (vararg xs: kotlin.Int): kotlin.Int declared in CALL 'public final fun set (i: .IFoo, newValue: kotlin.Int): kotlin.Unit [operator] declared in ' type=kotlin.Unit origin=PLUSEQ $receiver: GET_VAR 'val tmp_0: .A [val] declared in .test1' type=.A origin=null i: GET_VAR 'val tmp_1: .IFoo [val] declared in .test1' type=.IFoo origin=null @@ -132,7 +133,7 @@ FILE fqName: fileName:/caoWithAdaptationForSam.kt GET_OBJECT 'CLASS OBJECT name:B modality:FINAL visibility:public superTypes:[kotlin.Any]' type=.B VAR IR_TEMPORARY_VARIABLE name:tmp_3 type:.IFoo2 [val] TYPE_OP type=.IFoo2 origin=SAM_CONVERSION typeOperand=.IFoo2 - FUN_EXPR type=kotlin.Function1 origin=ADAPTED_FUNCTION_REFERENCE + BLOCK type=kotlin.Function1 origin=ADAPTED_FUNCTION_REFERENCE FUN ADAPTER_FOR_CALLABLE_REFERENCE name:withVararg visibility:local modality:FINAL <> (p0:kotlin.Int) returnType:kotlin.Unit VALUE_PARAMETER ADAPTER_PARAMETER_FOR_CALLABLE_REFERENCE name:p0 index:0 type:kotlin.Int BLOCK_BODY @@ -140,6 +141,7 @@ FILE fqName: fileName:/caoWithAdaptationForSam.kt CALL 'public final fun withVararg (vararg xs: kotlin.Int): kotlin.Int declared in ' type=kotlin.Int origin=null xs: VARARG type=kotlin.IntArray varargElementType=kotlin.Int GET_VAR 'p0: kotlin.Int declared in .test2.withVararg' type=kotlin.Int origin=null + FUNCTION_REFERENCE 'local final fun withVararg (p0: kotlin.Int): kotlin.Unit declared in .test2' type=kotlin.Function1 origin=ADAPTED_FUNCTION_REFERENCE reflectionTarget=public final fun withVararg (vararg xs: kotlin.Int): kotlin.Int declared in CALL 'public final fun set (i: .IFoo2, newValue: kotlin.Int): kotlin.Unit [operator] declared in ' type=kotlin.Unit origin=PLUSEQ $receiver: GET_VAR 'val tmp_2: .B [val] declared in .test2' type=.B origin=null i: GET_VAR 'val tmp_3: .IFoo2 [val] declared in .test2' type=.IFoo2 origin=null diff --git a/compiler/testData/ir/irText/expressions/callableReferences/constructorWithAdaptedArguments.kt.txt b/compiler/testData/ir/irText/expressions/callableReferences/constructorWithAdaptedArguments.kt.txt index f0d6fc7435b..d6de3bb4cc7 100644 --- a/compiler/testData/ir/irText/expressions/callableReferences/constructorWithAdaptedArguments.kt.txt +++ b/compiler/testData/ir/irText/expressions/callableReferences/constructorWithAdaptedArguments.kt.txt @@ -30,10 +30,13 @@ class Outer { } fun testConstructor(): Any { - return use(fn = local fun (p0: Int): C { - return C(xs = [p0]) - } -) + return use(fn = { // BLOCK + local fun (p0: Int): C { + return C(xs = [p0]) + } + + :: + }) } fun testInnerClassConstructor(outer: Outer): Any { diff --git a/compiler/testData/ir/irText/expressions/callableReferences/constructorWithAdaptedArguments.txt b/compiler/testData/ir/irText/expressions/callableReferences/constructorWithAdaptedArguments.txt index 82ebbb6d5a9..f6b50e40710 100644 --- a/compiler/testData/ir/irText/expressions/callableReferences/constructorWithAdaptedArguments.txt +++ b/compiler/testData/ir/irText/expressions/callableReferences/constructorWithAdaptedArguments.txt @@ -70,7 +70,7 @@ FILE fqName: fileName:/constructorWithAdaptedArguments.kt BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun testConstructor (): kotlin.Any declared in ' CALL 'public final fun use (fn: kotlin.Function1): kotlin.Any declared in ' type=kotlin.Any origin=null - fn: FUN_EXPR type=kotlin.Function1.C> origin=ADAPTED_FUNCTION_REFERENCE + fn: BLOCK type=kotlin.Function1.C> origin=ADAPTED_FUNCTION_REFERENCE FUN ADAPTER_FOR_CALLABLE_REFERENCE name: visibility:local modality:FINAL <> (p0:kotlin.Int) returnType:.C VALUE_PARAMETER ADAPTER_PARAMETER_FOR_CALLABLE_REFERENCE name:p0 index:0 type:kotlin.Int BLOCK_BODY @@ -78,6 +78,7 @@ FILE fqName: fileName:/constructorWithAdaptedArguments.kt CONSTRUCTOR_CALL 'public constructor (vararg xs: kotlin.Int) [primary] declared in .C' type=.C origin=null xs: VARARG type=kotlin.IntArray varargElementType=kotlin.Int GET_VAR 'p0: kotlin.Int declared in .testConstructor.' type=kotlin.Int origin=null + FUNCTION_REFERENCE 'local final fun (p0: kotlin.Int): .C declared in .testConstructor' type=kotlin.Function1.C> origin=ADAPTED_FUNCTION_REFERENCE reflectionTarget=public constructor (vararg xs: kotlin.Int) [primary] declared in .C FUN name:testInnerClassConstructor visibility:public modality:FINAL <> (outer:.Outer) returnType:kotlin.Any VALUE_PARAMETER name:outer index:0 type:.Outer BLOCK_BODY @@ -93,7 +94,7 @@ FILE fqName: fileName:/constructorWithAdaptedArguments.kt $outer: GET_VAR 'receiver: .Outer declared in .testInnerClassConstructor.' type=.Outer origin=ADAPTED_FUNCTION_REFERENCE xs: VARARG type=kotlin.IntArray varargElementType=kotlin.Int GET_VAR 'p0: kotlin.Int declared in .testInnerClassConstructor.' type=kotlin.Int origin=null - FUNCTION_REFERENCE 'local final fun (p0: kotlin.Int): .Outer.Inner declared in .testInnerClassConstructor' type=kotlin.Function1.Outer.Inner> origin=ADAPTED_FUNCTION_REFERENCE reflectionTarget=null + FUNCTION_REFERENCE 'local final fun (p0: kotlin.Int): .Outer.Inner declared in .testInnerClassConstructor' type=kotlin.Function1.Outer.Inner> origin=ADAPTED_FUNCTION_REFERENCE reflectionTarget=public constructor (vararg xs: kotlin.Int) [primary] declared in .Outer.Inner $receiver: GET_VAR 'outer: .Outer declared in .testInnerClassConstructor' type=.Outer origin=null FUN name:testInnerClassConstructorCapturingOuter visibility:public modality:FINAL <> () returnType:kotlin.Any BLOCK_BODY @@ -109,5 +110,5 @@ FILE fqName: fileName:/constructorWithAdaptedArguments.kt $outer: GET_VAR 'receiver: .Outer declared in .testInnerClassConstructorCapturingOuter.' type=.Outer origin=ADAPTED_FUNCTION_REFERENCE xs: VARARG type=kotlin.IntArray varargElementType=kotlin.Int GET_VAR 'p0: kotlin.Int declared in .testInnerClassConstructorCapturingOuter.' type=kotlin.Int origin=null - FUNCTION_REFERENCE 'local final fun (p0: kotlin.Int): .Outer.Inner declared in .testInnerClassConstructorCapturingOuter' type=kotlin.Function1.Outer.Inner> origin=ADAPTED_FUNCTION_REFERENCE reflectionTarget=null + FUNCTION_REFERENCE 'local final fun (p0: kotlin.Int): .Outer.Inner declared in .testInnerClassConstructorCapturingOuter' type=kotlin.Function1.Outer.Inner> origin=ADAPTED_FUNCTION_REFERENCE reflectionTarget=public constructor (vararg xs: kotlin.Int) [primary] declared in .Outer.Inner $receiver: CONSTRUCTOR_CALL 'public constructor () [primary] declared in .Outer' type=.Outer origin=null diff --git a/compiler/testData/ir/irText/expressions/callableReferences/kt37131.kt.txt b/compiler/testData/ir/irText/expressions/callableReferences/kt37131.kt.txt index ae24664ea68..d82251e4fd9 100644 --- a/compiler/testData/ir/irText/expressions/callableReferences/kt37131.kt.txt +++ b/compiler/testData/ir/irText/expressions/callableReferences/kt37131.kt.txt @@ -20,16 +20,22 @@ fun use(fn: Function0): Any { } fun testFn(): Any { - return use(fn = local fun foo(): String { - return foo() - } -) + return use(fn = { // BLOCK + local fun foo(): String { + return foo() + } + + ::foo + }) } fun testCtor(): Any { - return use(fn = local fun (): C { - return C() - } -) + return use(fn = { // BLOCK + local fun (): C { + return C() + } + + :: + }) } diff --git a/compiler/testData/ir/irText/expressions/callableReferences/kt37131.txt b/compiler/testData/ir/irText/expressions/callableReferences/kt37131.txt index af4140b63a2..528fb8b40a9 100644 --- a/compiler/testData/ir/irText/expressions/callableReferences/kt37131.txt +++ b/compiler/testData/ir/irText/expressions/callableReferences/kt37131.txt @@ -49,17 +49,19 @@ FILE fqName: fileName:/kt37131.kt BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun testFn (): kotlin.Any declared in ' CALL 'public final fun use (fn: kotlin.Function0): kotlin.Any declared in ' type=kotlin.Any origin=null - fn: FUN_EXPR type=kotlin.Function0 origin=ADAPTED_FUNCTION_REFERENCE + fn: BLOCK type=kotlin.Function0 origin=ADAPTED_FUNCTION_REFERENCE FUN ADAPTER_FOR_CALLABLE_REFERENCE name:foo visibility:local modality:FINAL <> () returnType:kotlin.String BLOCK_BODY RETURN type=kotlin.Nothing from='local final fun foo (): kotlin.String declared in .testFn' CALL 'public final fun foo (x: kotlin.String): kotlin.String declared in ' type=kotlin.String origin=null + FUNCTION_REFERENCE 'local final fun foo (): kotlin.String declared in .testFn' type=kotlin.Function0 origin=ADAPTED_FUNCTION_REFERENCE reflectionTarget=public final fun foo (x: kotlin.String): kotlin.String declared in FUN name:testCtor visibility:public modality:FINAL <> () returnType:kotlin.Any BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun testCtor (): kotlin.Any declared in ' CALL 'public final fun use (fn: kotlin.Function0): kotlin.Any declared in ' type=kotlin.Any origin=null - fn: FUN_EXPR type=kotlin.Function0<.C> origin=ADAPTED_FUNCTION_REFERENCE + fn: BLOCK type=kotlin.Function0<.C> origin=ADAPTED_FUNCTION_REFERENCE FUN ADAPTER_FOR_CALLABLE_REFERENCE name: visibility:local modality:FINAL <> () returnType:.C BLOCK_BODY RETURN type=kotlin.Nothing from='local final fun (): .C declared in .testCtor' CONSTRUCTOR_CALL 'public constructor (x: kotlin.String) [primary] declared in .C' type=.C origin=null + FUNCTION_REFERENCE 'local final fun (): .C declared in .testCtor' type=kotlin.Function0<.C> origin=ADAPTED_FUNCTION_REFERENCE reflectionTarget=public constructor (x: kotlin.String) [primary] declared in .C diff --git a/compiler/testData/ir/irText/expressions/callableReferences/suspendConversion.kt.txt b/compiler/testData/ir/irText/expressions/callableReferences/suspendConversion.kt.txt index 819654386de..4d38f21ca77 100644 --- a/compiler/testData/ir/irText/expressions/callableReferences/suspendConversion.kt.txt +++ b/compiler/testData/ir/irText/expressions/callableReferences/suspendConversion.kt.txt @@ -47,45 +47,63 @@ fun testNoCoversion() { } fun testSuspendPlain() { - useSuspend(fn = local suspend fun foo1() { - foo1() - } -) + useSuspend(fn = { // BLOCK + local suspend fun foo1() { + foo1() + } + + ::foo1 + }) } fun testSuspendWithArgs() { - useSuspendInt(fn = local suspend fun fooInt(p0: Int) { - fooInt(x = p0) - } -) + useSuspendInt(fn = { // BLOCK + local suspend fun fooInt(p0: Int) { + fooInt(x = p0) + } + + ::fooInt + }) } fun testWithVararg() { - useSuspend(fn = local suspend fun foo2() { - foo2() - } -) + useSuspend(fn = { // BLOCK + local suspend fun foo2() { + foo2() + } + + ::foo2 + }) } fun testWithVarargMapped() { - useSuspendInt(fn = local suspend fun foo2(p0: Int) { - foo2(xs = [p0]) - } -) + useSuspendInt(fn = { // BLOCK + local suspend fun foo2(p0: Int) { + foo2(xs = [p0]) + } + + ::foo2 + }) } fun testWithCoercionToUnit() { - useSuspend(fn = local suspend fun foo3() { - foo3() /*~> Unit */ - } -) + useSuspend(fn = { // BLOCK + local suspend fun foo3() { + foo3() /*~> Unit */ + } + + ::foo3 + }) } fun testWithDefaults() { - useSuspend(fn = local suspend fun foo4() { - foo4() - } -) + useSuspend(fn = { // BLOCK + local suspend fun foo4() { + foo4() + } + + ::foo4 + }) } fun testWithBoundReceiver() { diff --git a/compiler/testData/ir/irText/expressions/callableReferences/suspendConversion.txt b/compiler/testData/ir/irText/expressions/callableReferences/suspendConversion.txt index f851b2796da..7683500d480 100644 --- a/compiler/testData/ir/irText/expressions/callableReferences/suspendConversion.txt +++ b/compiler/testData/ir/irText/expressions/callableReferences/suspendConversion.txt @@ -60,51 +60,57 @@ FILE fqName: fileName:/suspendConversion.kt FUN name:testSuspendPlain visibility:public modality:FINAL <> () returnType:kotlin.Unit BLOCK_BODY CALL 'public final fun useSuspend (fn: kotlin.coroutines.SuspendFunction0): kotlin.Unit declared in ' type=kotlin.Unit origin=null - fn: FUN_EXPR type=kotlin.coroutines.SuspendFunction0 origin=ADAPTED_FUNCTION_REFERENCE + fn: BLOCK type=kotlin.coroutines.SuspendFunction0 origin=ADAPTED_FUNCTION_REFERENCE FUN ADAPTER_FOR_CALLABLE_REFERENCE name:foo1 visibility:local modality:FINAL <> () returnType:kotlin.Unit [suspend] BLOCK_BODY CALL 'public final fun foo1 (): kotlin.Unit declared in ' type=kotlin.Unit origin=null + FUNCTION_REFERENCE 'local final fun foo1 (): kotlin.Unit [suspend] declared in .testSuspendPlain' type=kotlin.coroutines.SuspendFunction0 origin=ADAPTED_FUNCTION_REFERENCE reflectionTarget=public final fun foo1 (): kotlin.Unit declared in FUN name:testSuspendWithArgs visibility:public modality:FINAL <> () returnType:kotlin.Unit BLOCK_BODY CALL 'public final fun useSuspendInt (fn: kotlin.coroutines.SuspendFunction1): kotlin.Unit declared in ' type=kotlin.Unit origin=null - fn: FUN_EXPR type=kotlin.coroutines.SuspendFunction1 origin=ADAPTED_FUNCTION_REFERENCE + fn: BLOCK type=kotlin.coroutines.SuspendFunction1 origin=ADAPTED_FUNCTION_REFERENCE FUN ADAPTER_FOR_CALLABLE_REFERENCE name:fooInt visibility:local modality:FINAL <> (p0:kotlin.Int) returnType:kotlin.Unit [suspend] VALUE_PARAMETER ADAPTER_PARAMETER_FOR_CALLABLE_REFERENCE name:p0 index:0 type:kotlin.Int BLOCK_BODY CALL 'public final fun fooInt (x: kotlin.Int): kotlin.Unit declared in ' type=kotlin.Unit origin=null x: GET_VAR 'p0: kotlin.Int declared in .testSuspendWithArgs.fooInt' type=kotlin.Int origin=null + FUNCTION_REFERENCE 'local final fun fooInt (p0: kotlin.Int): kotlin.Unit [suspend] declared in .testSuspendWithArgs' type=kotlin.coroutines.SuspendFunction1 origin=ADAPTED_FUNCTION_REFERENCE reflectionTarget=public final fun fooInt (x: kotlin.Int): kotlin.Unit declared in FUN name:testWithVararg visibility:public modality:FINAL <> () returnType:kotlin.Unit BLOCK_BODY CALL 'public final fun useSuspend (fn: kotlin.coroutines.SuspendFunction0): kotlin.Unit declared in ' type=kotlin.Unit origin=null - fn: FUN_EXPR type=kotlin.coroutines.SuspendFunction0 origin=ADAPTED_FUNCTION_REFERENCE + fn: BLOCK type=kotlin.coroutines.SuspendFunction0 origin=ADAPTED_FUNCTION_REFERENCE FUN ADAPTER_FOR_CALLABLE_REFERENCE name:foo2 visibility:local modality:FINAL <> () returnType:kotlin.Unit [suspend] BLOCK_BODY CALL 'public final fun foo2 (vararg xs: kotlin.Int): kotlin.Unit declared in ' type=kotlin.Unit origin=null + FUNCTION_REFERENCE 'local final fun foo2 (): kotlin.Unit [suspend] declared in .testWithVararg' type=kotlin.coroutines.SuspendFunction0 origin=ADAPTED_FUNCTION_REFERENCE reflectionTarget=public final fun foo2 (vararg xs: kotlin.Int): kotlin.Unit declared in FUN name:testWithVarargMapped visibility:public modality:FINAL <> () returnType:kotlin.Unit BLOCK_BODY CALL 'public final fun useSuspendInt (fn: kotlin.coroutines.SuspendFunction1): kotlin.Unit declared in ' type=kotlin.Unit origin=null - fn: FUN_EXPR type=kotlin.coroutines.SuspendFunction1 origin=ADAPTED_FUNCTION_REFERENCE + fn: BLOCK type=kotlin.coroutines.SuspendFunction1 origin=ADAPTED_FUNCTION_REFERENCE FUN ADAPTER_FOR_CALLABLE_REFERENCE name:foo2 visibility:local modality:FINAL <> (p0:kotlin.Int) returnType:kotlin.Unit [suspend] VALUE_PARAMETER ADAPTER_PARAMETER_FOR_CALLABLE_REFERENCE name:p0 index:0 type:kotlin.Int BLOCK_BODY CALL 'public final fun foo2 (vararg xs: kotlin.Int): kotlin.Unit declared in ' type=kotlin.Unit origin=null xs: VARARG type=kotlin.IntArray varargElementType=kotlin.Int GET_VAR 'p0: kotlin.Int declared in .testWithVarargMapped.foo2' type=kotlin.Int origin=null + FUNCTION_REFERENCE 'local final fun foo2 (p0: kotlin.Int): kotlin.Unit [suspend] declared in .testWithVarargMapped' type=kotlin.coroutines.SuspendFunction1 origin=ADAPTED_FUNCTION_REFERENCE reflectionTarget=public final fun foo2 (vararg xs: kotlin.Int): kotlin.Unit declared in FUN name:testWithCoercionToUnit visibility:public modality:FINAL <> () returnType:kotlin.Unit BLOCK_BODY CALL 'public final fun useSuspend (fn: kotlin.coroutines.SuspendFunction0): kotlin.Unit declared in ' type=kotlin.Unit origin=null - fn: FUN_EXPR type=kotlin.coroutines.SuspendFunction0 origin=ADAPTED_FUNCTION_REFERENCE + fn: BLOCK type=kotlin.coroutines.SuspendFunction0 origin=ADAPTED_FUNCTION_REFERENCE FUN ADAPTER_FOR_CALLABLE_REFERENCE name:foo3 visibility:local modality:FINAL <> () returnType:kotlin.Unit [suspend] BLOCK_BODY TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit CALL 'public final fun foo3 (): kotlin.Int declared in ' type=kotlin.Int origin=null + FUNCTION_REFERENCE 'local final fun foo3 (): kotlin.Unit [suspend] declared in .testWithCoercionToUnit' type=kotlin.coroutines.SuspendFunction0 origin=ADAPTED_FUNCTION_REFERENCE reflectionTarget=public final fun foo3 (): kotlin.Int declared in FUN name:testWithDefaults visibility:public modality:FINAL <> () returnType:kotlin.Unit BLOCK_BODY CALL 'public final fun useSuspend (fn: kotlin.coroutines.SuspendFunction0): kotlin.Unit declared in ' type=kotlin.Unit origin=null - fn: FUN_EXPR type=kotlin.coroutines.SuspendFunction0 origin=ADAPTED_FUNCTION_REFERENCE + fn: BLOCK type=kotlin.coroutines.SuspendFunction0 origin=ADAPTED_FUNCTION_REFERENCE FUN ADAPTER_FOR_CALLABLE_REFERENCE name:foo4 visibility:local modality:FINAL <> () returnType:kotlin.Unit [suspend] BLOCK_BODY CALL 'public final fun foo4 (i: kotlin.Int): kotlin.Unit declared in ' type=kotlin.Unit origin=null + FUNCTION_REFERENCE 'local final fun foo4 (): kotlin.Unit [suspend] declared in .testWithDefaults' type=kotlin.coroutines.SuspendFunction0 origin=ADAPTED_FUNCTION_REFERENCE reflectionTarget=public final fun foo4 (i: kotlin.Int): kotlin.Unit declared in FUN name:testWithBoundReceiver visibility:public modality:FINAL <> () returnType:kotlin.Unit BLOCK_BODY CALL 'public final fun useSuspend (fn: kotlin.coroutines.SuspendFunction0): kotlin.Unit declared in ' type=kotlin.Unit origin=null @@ -114,5 +120,5 @@ FILE fqName: fileName:/suspendConversion.kt BLOCK_BODY CALL 'public final fun bar (): kotlin.Unit declared in .C' type=kotlin.Unit origin=null $this: GET_VAR 'receiver: .C declared in .testWithBoundReceiver.bar' type=.C origin=ADAPTED_FUNCTION_REFERENCE - FUNCTION_REFERENCE 'local final fun bar (): kotlin.Unit [suspend] declared in .testWithBoundReceiver' type=kotlin.coroutines.SuspendFunction0 origin=ADAPTED_FUNCTION_REFERENCE reflectionTarget=null + FUNCTION_REFERENCE 'local final fun bar (): kotlin.Unit [suspend] declared in .testWithBoundReceiver' type=kotlin.coroutines.SuspendFunction0 origin=ADAPTED_FUNCTION_REFERENCE reflectionTarget=public final fun bar (): kotlin.Unit declared in .C $receiver: CONSTRUCTOR_CALL 'public constructor () [primary] declared in .C' type=.C origin=null diff --git a/compiler/testData/ir/irText/expressions/callableReferences/unboundMemberReferenceWithAdaptedArguments.kt.txt b/compiler/testData/ir/irText/expressions/callableReferences/unboundMemberReferenceWithAdaptedArguments.kt.txt index 0c62925f2bd..f5f6b2fd767 100644 --- a/compiler/testData/ir/irText/expressions/callableReferences/unboundMemberReferenceWithAdaptedArguments.kt.txt +++ b/compiler/testData/ir/irText/expressions/callableReferences/unboundMemberReferenceWithAdaptedArguments.kt.txt @@ -31,10 +31,13 @@ object Obj : A { } fun testUnbound() { - use1(fn = local fun foo(p0: A, p1: Int) { - p0.foo(xs = [p1]) /*~> Unit */ - } -) + use1(fn = { // BLOCK + local fun foo(p0: A, p1: Int) { + p0.foo(xs = [p1]) /*~> Unit */ + } + + ::foo + }) } fun testBound(a: A) { diff --git a/compiler/testData/ir/irText/expressions/callableReferences/unboundMemberReferenceWithAdaptedArguments.txt b/compiler/testData/ir/irText/expressions/callableReferences/unboundMemberReferenceWithAdaptedArguments.txt index 981458ab0ef..533f39bbbdf 100644 --- a/compiler/testData/ir/irText/expressions/callableReferences/unboundMemberReferenceWithAdaptedArguments.txt +++ b/compiler/testData/ir/irText/expressions/callableReferences/unboundMemberReferenceWithAdaptedArguments.txt @@ -60,7 +60,7 @@ FILE fqName: fileName:/unboundMemberReferenceWithAdaptedArguments.kt FUN name:testUnbound visibility:public modality:FINAL <> () returnType:kotlin.Unit BLOCK_BODY CALL 'public final fun use1 (fn: kotlin.Function2<.A, kotlin.Int, kotlin.Unit>): kotlin.Unit declared in ' type=kotlin.Unit origin=null - fn: FUN_EXPR type=kotlin.Function2<.A, kotlin.Int, kotlin.Unit> origin=ADAPTED_FUNCTION_REFERENCE + fn: BLOCK type=kotlin.Function2<.A, kotlin.Int, kotlin.Unit> origin=ADAPTED_FUNCTION_REFERENCE FUN ADAPTER_FOR_CALLABLE_REFERENCE name:foo visibility:local modality:FINAL <> (p0:.A, p1:kotlin.Int) returnType:kotlin.Unit VALUE_PARAMETER ADAPTER_PARAMETER_FOR_CALLABLE_REFERENCE name:p0 index:0 type:.A VALUE_PARAMETER ADAPTER_PARAMETER_FOR_CALLABLE_REFERENCE name:p1 index:1 type:kotlin.Int @@ -70,6 +70,7 @@ FILE fqName: fileName:/unboundMemberReferenceWithAdaptedArguments.kt $this: GET_VAR 'p0: .A declared in .testUnbound.foo' type=.A origin=null xs: VARARG type=kotlin.IntArray varargElementType=kotlin.Int GET_VAR 'p1: kotlin.Int declared in .testUnbound.foo' type=kotlin.Int origin=null + FUNCTION_REFERENCE 'local final fun foo (p0: .A, p1: kotlin.Int): kotlin.Unit declared in .testUnbound' type=kotlin.Function2<.A, kotlin.Int, kotlin.Unit> origin=ADAPTED_FUNCTION_REFERENCE reflectionTarget=public open fun foo (vararg xs: kotlin.Int): kotlin.Int declared in .A FUN name:testBound visibility:public modality:FINAL <> (a:.A) returnType:kotlin.Unit VALUE_PARAMETER name:a index:0 type:.A BLOCK_BODY @@ -84,7 +85,7 @@ FILE fqName: fileName:/unboundMemberReferenceWithAdaptedArguments.kt $this: GET_VAR 'receiver: .A declared in .testBound.foo' type=.A origin=ADAPTED_FUNCTION_REFERENCE xs: VARARG type=kotlin.IntArray varargElementType=kotlin.Int GET_VAR 'p0: kotlin.Int declared in .testBound.foo' type=kotlin.Int origin=null - FUNCTION_REFERENCE 'local final fun foo (p0: kotlin.Int): kotlin.Unit declared in .testBound' type=kotlin.Function1 origin=ADAPTED_FUNCTION_REFERENCE reflectionTarget=null + FUNCTION_REFERENCE 'local final fun foo (p0: kotlin.Int): kotlin.Unit declared in .testBound' type=kotlin.Function1 origin=ADAPTED_FUNCTION_REFERENCE reflectionTarget=public open fun foo (vararg xs: kotlin.Int): kotlin.Int declared in .A $receiver: GET_VAR 'a: .A declared in .testBound' type=.A origin=null FUN name:testObject visibility:public modality:FINAL <> () returnType:kotlin.Unit BLOCK_BODY @@ -99,5 +100,5 @@ FILE fqName: fileName:/unboundMemberReferenceWithAdaptedArguments.kt $this: GET_VAR 'receiver: .Obj declared in .testObject.foo' type=.Obj origin=ADAPTED_FUNCTION_REFERENCE xs: VARARG type=kotlin.IntArray varargElementType=kotlin.Int GET_VAR 'p0: kotlin.Int declared in .testObject.foo' type=kotlin.Int origin=null - FUNCTION_REFERENCE 'local final fun foo (p0: kotlin.Int): kotlin.Unit declared in .testObject' type=kotlin.Function1 origin=ADAPTED_FUNCTION_REFERENCE reflectionTarget=null + FUNCTION_REFERENCE 'local final fun foo (p0: kotlin.Int): kotlin.Unit declared in .testObject' type=kotlin.Function1 origin=ADAPTED_FUNCTION_REFERENCE reflectionTarget=public open fun foo (vararg xs: kotlin.Int): kotlin.Int declared in .Obj $receiver: GET_OBJECT 'CLASS OBJECT name:Obj modality:FINAL visibility:public superTypes:[.A]' type=.Obj diff --git a/compiler/testData/ir/irText/expressions/callableReferences/withAdaptationForSam.kt.txt b/compiler/testData/ir/irText/expressions/callableReferences/withAdaptationForSam.kt.txt index 968be6d330d..eb62bd54da5 100644 --- a/compiler/testData/ir/irText/expressions/callableReferences/withAdaptationForSam.kt.txt +++ b/compiler/testData/ir/irText/expressions/callableReferences/withAdaptationForSam.kt.txt @@ -11,9 +11,12 @@ fun withVararg(vararg xs: Int): Int { } fun test() { - useFoo(foo = local fun withVararg(p0: Int) { - withVararg(xs = [p0]) /*~> Unit */ - } - /*-> IFoo */) + useFoo(foo = { // BLOCK + local fun withVararg(p0: Int) { + withVararg(xs = [p0]) /*~> Unit */ + } + + ::withVararg + } /*-> IFoo */) } diff --git a/compiler/testData/ir/irText/expressions/callableReferences/withAdaptationForSam.txt b/compiler/testData/ir/irText/expressions/callableReferences/withAdaptationForSam.txt index 890de177a47..8a109b9a2dd 100644 --- a/compiler/testData/ir/irText/expressions/callableReferences/withAdaptationForSam.txt +++ b/compiler/testData/ir/irText/expressions/callableReferences/withAdaptationForSam.txt @@ -29,7 +29,7 @@ FILE fqName: fileName:/withAdaptationForSam.kt BLOCK_BODY CALL 'public final fun useFoo (foo: .IFoo): kotlin.Unit declared in ' type=kotlin.Unit origin=null foo: TYPE_OP type=.IFoo origin=SAM_CONVERSION typeOperand=.IFoo - FUN_EXPR type=kotlin.Function1 origin=ADAPTED_FUNCTION_REFERENCE + BLOCK type=kotlin.Function1 origin=ADAPTED_FUNCTION_REFERENCE FUN ADAPTER_FOR_CALLABLE_REFERENCE name:withVararg visibility:local modality:FINAL <> (p0:kotlin.Int) returnType:kotlin.Unit VALUE_PARAMETER ADAPTER_PARAMETER_FOR_CALLABLE_REFERENCE name:p0 index:0 type:kotlin.Int BLOCK_BODY @@ -37,3 +37,4 @@ FILE fqName: fileName:/withAdaptationForSam.kt CALL 'public final fun withVararg (vararg xs: kotlin.Int): kotlin.Int declared in ' type=kotlin.Int origin=null xs: VARARG type=kotlin.IntArray varargElementType=kotlin.Int GET_VAR 'p0: kotlin.Int declared in .test.withVararg' type=kotlin.Int origin=null + FUNCTION_REFERENCE 'local final fun withVararg (p0: kotlin.Int): kotlin.Unit declared in .test' type=kotlin.Function1 origin=ADAPTED_FUNCTION_REFERENCE reflectionTarget=public final fun withVararg (vararg xs: kotlin.Int): kotlin.Int declared in diff --git a/compiler/testData/ir/irText/expressions/callableReferences/withAdaptedArguments.kt.txt b/compiler/testData/ir/irText/expressions/callableReferences/withAdaptedArguments.kt.txt index da3f88aa6d4..79c979ac54c 100644 --- a/compiler/testData/ir/irText/expressions/callableReferences/withAdaptedArguments.kt.txt +++ b/compiler/testData/ir/irText/expressions/callableReferences/withAdaptedArguments.kt.txt @@ -35,24 +35,33 @@ object Host { } fun testDefault(): String { - return use(fn = local fun fnWithDefault(p0: Int): String { - return fnWithDefault(a = p0) - } -) + return use(fn = { // BLOCK + local fun fnWithDefault(p0: Int): String { + return fnWithDefault(a = p0) + } + + ::fnWithDefault + }) } fun testVararg(): String { - return use(fn = local fun fnWithVarargs(p0: Int): String { - return fnWithVarargs(xs = [p0]) - } -) + return use(fn = { // BLOCK + local fun fnWithVarargs(p0: Int): String { + return fnWithVarargs(xs = [p0]) + } + + ::fnWithVarargs + }) } fun testCoercionToUnit() { - return coerceToUnit(fn = local fun fnWithDefault(p0: Int) { - fnWithDefault(a = p0) /*~> Unit */ - } -) + return coerceToUnit(fn = { // BLOCK + local fun fnWithDefault(p0: Int) { + fnWithDefault(a = p0) /*~> Unit */ + } + + ::fnWithDefault + }) } fun testImportedObjectMember(): String { @@ -66,16 +75,22 @@ fun testImportedObjectMember(): String { } fun testDefault0(): String { - return use0(fn = local fun fnWithDefaults(): String { - return fnWithDefaults() - } -) + return use0(fn = { // BLOCK + local fun fnWithDefaults(): String { + return fnWithDefaults() + } + + ::fnWithDefaults + }) } fun testVararg0(): String { - return use0(fn = local fun fnWithVarargs(): String { - return fnWithVarargs() - } -) + return use0(fn = { // BLOCK + local fun fnWithVarargs(): String { + return fnWithVarargs() + } + + ::fnWithVarargs + }) } diff --git a/compiler/testData/ir/irText/expressions/callableReferences/withAdaptedArguments.txt b/compiler/testData/ir/irText/expressions/callableReferences/withAdaptedArguments.txt index ee0ca71d123..fcfdf40e20c 100644 --- a/compiler/testData/ir/irText/expressions/callableReferences/withAdaptedArguments.txt +++ b/compiler/testData/ir/irText/expressions/callableReferences/withAdaptedArguments.txt @@ -67,18 +67,19 @@ FILE fqName: fileName:/withAdaptedArguments.kt BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun testDefault (): kotlin.String declared in ' CALL 'public final fun use (fn: kotlin.Function1): kotlin.String declared in ' type=kotlin.String origin=null - fn: FUN_EXPR type=kotlin.Function1 origin=ADAPTED_FUNCTION_REFERENCE + fn: BLOCK type=kotlin.Function1 origin=ADAPTED_FUNCTION_REFERENCE FUN ADAPTER_FOR_CALLABLE_REFERENCE name:fnWithDefault visibility:local modality:FINAL <> (p0:kotlin.Int) returnType:kotlin.String VALUE_PARAMETER ADAPTER_PARAMETER_FOR_CALLABLE_REFERENCE name:p0 index:0 type:kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='local final fun fnWithDefault (p0: kotlin.Int): kotlin.String declared in .testDefault' CALL 'public final fun fnWithDefault (a: kotlin.Int, b: kotlin.Int): kotlin.String declared in ' type=kotlin.String origin=null a: GET_VAR 'p0: kotlin.Int declared in .testDefault.fnWithDefault' type=kotlin.Int origin=null + FUNCTION_REFERENCE 'local final fun fnWithDefault (p0: kotlin.Int): kotlin.String declared in .testDefault' type=kotlin.Function1 origin=ADAPTED_FUNCTION_REFERENCE reflectionTarget=public final fun fnWithDefault (a: kotlin.Int, b: kotlin.Int): kotlin.String declared in FUN name:testVararg visibility:public modality:FINAL <> () returnType:kotlin.String BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun testVararg (): kotlin.String declared in ' CALL 'public final fun use (fn: kotlin.Function1): kotlin.String declared in ' type=kotlin.String origin=null - fn: FUN_EXPR type=kotlin.Function1 origin=ADAPTED_FUNCTION_REFERENCE + fn: BLOCK type=kotlin.Function1 origin=ADAPTED_FUNCTION_REFERENCE FUN ADAPTER_FOR_CALLABLE_REFERENCE name:fnWithVarargs visibility:local modality:FINAL <> (p0:kotlin.Int) returnType:kotlin.String VALUE_PARAMETER ADAPTER_PARAMETER_FOR_CALLABLE_REFERENCE name:p0 index:0 type:kotlin.Int BLOCK_BODY @@ -86,17 +87,19 @@ FILE fqName: fileName:/withAdaptedArguments.kt CALL 'public final fun fnWithVarargs (vararg xs: kotlin.Int): kotlin.String declared in ' type=kotlin.String origin=null xs: VARARG type=kotlin.IntArray varargElementType=kotlin.Int GET_VAR 'p0: kotlin.Int declared in .testVararg.fnWithVarargs' type=kotlin.Int origin=null + FUNCTION_REFERENCE 'local final fun fnWithVarargs (p0: kotlin.Int): kotlin.String declared in .testVararg' type=kotlin.Function1 origin=ADAPTED_FUNCTION_REFERENCE reflectionTarget=public final fun fnWithVarargs (vararg xs: kotlin.Int): kotlin.String declared in FUN name:testCoercionToUnit visibility:public modality:FINAL <> () returnType:kotlin.Unit BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun testCoercionToUnit (): kotlin.Unit declared in ' CALL 'public final fun coerceToUnit (fn: kotlin.Function1): kotlin.Unit declared in ' type=kotlin.Unit origin=null - fn: FUN_EXPR type=kotlin.Function1 origin=ADAPTED_FUNCTION_REFERENCE + fn: BLOCK type=kotlin.Function1 origin=ADAPTED_FUNCTION_REFERENCE FUN ADAPTER_FOR_CALLABLE_REFERENCE name:fnWithDefault visibility:local modality:FINAL <> (p0:kotlin.Int) returnType:kotlin.Unit VALUE_PARAMETER ADAPTER_PARAMETER_FOR_CALLABLE_REFERENCE name:p0 index:0 type:kotlin.Int BLOCK_BODY TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit CALL 'public final fun fnWithDefault (a: kotlin.Int, b: kotlin.Int): kotlin.String declared in ' type=kotlin.String origin=null a: GET_VAR 'p0: kotlin.Int declared in .testCoercionToUnit.fnWithDefault' type=kotlin.Int origin=null + FUNCTION_REFERENCE 'local final fun fnWithDefault (p0: kotlin.Int): kotlin.Unit declared in .testCoercionToUnit' type=kotlin.Function1 origin=ADAPTED_FUNCTION_REFERENCE reflectionTarget=public final fun fnWithDefault (a: kotlin.Int, b: kotlin.Int): kotlin.String declared in FUN name:testImportedObjectMember visibility:public modality:FINAL <> () returnType:kotlin.String BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun testImportedObjectMember (): kotlin.String declared in ' @@ -109,23 +112,25 @@ FILE fqName: fileName:/withAdaptedArguments.kt CALL 'public final fun importedObjectMemberWithVarargs (vararg xs: kotlin.Int): kotlin.String declared in .Host' type=kotlin.String origin=null xs: VARARG type=kotlin.IntArray varargElementType=kotlin.Int GET_VAR 'p0: kotlin.Int declared in .testImportedObjectMember.importedObjectMemberWithVarargs' type=kotlin.Int origin=null - FUNCTION_REFERENCE 'local final fun importedObjectMemberWithVarargs (p0: kotlin.Int): kotlin.String declared in .testImportedObjectMember' type=kotlin.Function1 origin=ADAPTED_FUNCTION_REFERENCE reflectionTarget=null + FUNCTION_REFERENCE 'local final fun importedObjectMemberWithVarargs (p0: kotlin.Int): kotlin.String declared in .testImportedObjectMember' type=kotlin.Function1 origin=ADAPTED_FUNCTION_REFERENCE reflectionTarget=public final fun importedObjectMemberWithVarargs (vararg xs: kotlin.Int): kotlin.String declared in .Host $receiver: GET_OBJECT 'CLASS OBJECT name:Host modality:FINAL visibility:public superTypes:[kotlin.Any]' type=.Host FUN name:testDefault0 visibility:public modality:FINAL <> () returnType:kotlin.String BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun testDefault0 (): kotlin.String declared in ' CALL 'public final fun use0 (fn: kotlin.Function0): kotlin.String declared in ' type=kotlin.String origin=null - fn: FUN_EXPR type=kotlin.Function0 origin=ADAPTED_FUNCTION_REFERENCE + fn: BLOCK type=kotlin.Function0 origin=ADAPTED_FUNCTION_REFERENCE FUN ADAPTER_FOR_CALLABLE_REFERENCE name:fnWithDefaults visibility:local modality:FINAL <> () returnType:kotlin.String BLOCK_BODY RETURN type=kotlin.Nothing from='local final fun fnWithDefaults (): kotlin.String declared in .testDefault0' CALL 'public final fun fnWithDefaults (a: kotlin.Int, b: kotlin.Int): kotlin.String declared in ' type=kotlin.String origin=null + FUNCTION_REFERENCE 'local final fun fnWithDefaults (): kotlin.String declared in .testDefault0' type=kotlin.Function0 origin=ADAPTED_FUNCTION_REFERENCE reflectionTarget=public final fun fnWithDefaults (a: kotlin.Int, b: kotlin.Int): kotlin.String declared in FUN name:testVararg0 visibility:public modality:FINAL <> () returnType:kotlin.String BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun testVararg0 (): kotlin.String declared in ' CALL 'public final fun use0 (fn: kotlin.Function0): kotlin.String declared in ' type=kotlin.String origin=null - fn: FUN_EXPR type=kotlin.Function0 origin=ADAPTED_FUNCTION_REFERENCE + fn: BLOCK type=kotlin.Function0 origin=ADAPTED_FUNCTION_REFERENCE FUN ADAPTER_FOR_CALLABLE_REFERENCE name:fnWithVarargs visibility:local modality:FINAL <> () returnType:kotlin.String BLOCK_BODY RETURN type=kotlin.Nothing from='local final fun fnWithVarargs (): kotlin.String declared in .testVararg0' CALL 'public final fun fnWithVarargs (vararg xs: kotlin.Int): kotlin.String declared in ' type=kotlin.String origin=null + FUNCTION_REFERENCE 'local final fun fnWithVarargs (): kotlin.String declared in .testVararg0' type=kotlin.Function0 origin=ADAPTED_FUNCTION_REFERENCE reflectionTarget=public final fun fnWithVarargs (vararg xs: kotlin.Int): kotlin.String declared in diff --git a/compiler/testData/ir/irText/expressions/callableReferences/withArgumentAdaptationAndReceiver.txt b/compiler/testData/ir/irText/expressions/callableReferences/withArgumentAdaptationAndReceiver.txt index 9c7a9388e33..f5053154d12 100644 --- a/compiler/testData/ir/irText/expressions/callableReferences/withArgumentAdaptationAndReceiver.txt +++ b/compiler/testData/ir/irText/expressions/callableReferences/withArgumentAdaptationAndReceiver.txt @@ -31,7 +31,7 @@ FILE fqName: fileName:/withArgumentAdaptationAndReceiver.kt $this: GET_VAR 'receiver: .Host declared in .Host.testImplicitThis.withVararg' type=.Host origin=ADAPTED_FUNCTION_REFERENCE xs: VARARG type=kotlin.IntArray varargElementType=kotlin.Int GET_VAR 'p0: kotlin.Int declared in .Host.testImplicitThis.withVararg' type=kotlin.Int origin=null - FUNCTION_REFERENCE 'local final fun withVararg (p0: kotlin.Int): kotlin.Unit declared in .Host.testImplicitThis' type=kotlin.Function1 origin=ADAPTED_FUNCTION_REFERENCE reflectionTarget=null + FUNCTION_REFERENCE 'local final fun withVararg (p0: kotlin.Int): kotlin.Unit declared in .Host.testImplicitThis' type=kotlin.Function1 origin=ADAPTED_FUNCTION_REFERENCE reflectionTarget=public final fun withVararg (vararg xs: kotlin.Int): kotlin.String declared in .Host $receiver: GET_VAR ': .Host declared in .Host.testImplicitThis' type=.Host origin=null FUN name:testBoundReceiverLocalVal visibility:public modality:FINAL <> ($this:.Host) returnType:kotlin.Unit $this: VALUE_PARAMETER name: type:.Host @@ -49,7 +49,7 @@ FILE fqName: fileName:/withArgumentAdaptationAndReceiver.kt $this: GET_VAR 'receiver: .Host declared in .Host.testBoundReceiverLocalVal.withVararg' type=.Host origin=ADAPTED_FUNCTION_REFERENCE xs: VARARG type=kotlin.IntArray varargElementType=kotlin.Int GET_VAR 'p0: kotlin.Int declared in .Host.testBoundReceiverLocalVal.withVararg' type=kotlin.Int origin=null - FUNCTION_REFERENCE 'local final fun withVararg (p0: kotlin.Int): kotlin.Unit declared in .Host.testBoundReceiverLocalVal' type=kotlin.Function1 origin=ADAPTED_FUNCTION_REFERENCE reflectionTarget=null + FUNCTION_REFERENCE 'local final fun withVararg (p0: kotlin.Int): kotlin.Unit declared in .Host.testBoundReceiverLocalVal' type=kotlin.Function1 origin=ADAPTED_FUNCTION_REFERENCE reflectionTarget=public final fun withVararg (vararg xs: kotlin.Int): kotlin.String declared in .Host $receiver: GET_VAR 'val h: .Host [val] declared in .Host.testBoundReceiverLocalVal' type=.Host origin=null FUN name:testBoundReceiverLocalVar visibility:public modality:FINAL <> ($this:.Host) returnType:kotlin.Unit $this: VALUE_PARAMETER name: type:.Host @@ -67,7 +67,7 @@ FILE fqName: fileName:/withArgumentAdaptationAndReceiver.kt $this: GET_VAR 'receiver: .Host declared in .Host.testBoundReceiverLocalVar.withVararg' type=.Host origin=ADAPTED_FUNCTION_REFERENCE xs: VARARG type=kotlin.IntArray varargElementType=kotlin.Int GET_VAR 'p0: kotlin.Int declared in .Host.testBoundReceiverLocalVar.withVararg' type=kotlin.Int origin=null - FUNCTION_REFERENCE 'local final fun withVararg (p0: kotlin.Int): kotlin.Unit declared in .Host.testBoundReceiverLocalVar' type=kotlin.Function1 origin=ADAPTED_FUNCTION_REFERENCE reflectionTarget=null + FUNCTION_REFERENCE 'local final fun withVararg (p0: kotlin.Int): kotlin.Unit declared in .Host.testBoundReceiverLocalVar' type=kotlin.Function1 origin=ADAPTED_FUNCTION_REFERENCE reflectionTarget=public final fun withVararg (vararg xs: kotlin.Int): kotlin.String declared in .Host $receiver: GET_VAR 'var h: .Host [var] declared in .Host.testBoundReceiverLocalVar' type=.Host origin=null FUN name:testBoundReceiverParameter visibility:public modality:FINAL <> ($this:.Host, h:.Host) returnType:kotlin.Unit $this: VALUE_PARAMETER name: type:.Host @@ -84,7 +84,7 @@ FILE fqName: fileName:/withArgumentAdaptationAndReceiver.kt $this: GET_VAR 'receiver: .Host declared in .Host.testBoundReceiverParameter.withVararg' type=.Host origin=ADAPTED_FUNCTION_REFERENCE xs: VARARG type=kotlin.IntArray varargElementType=kotlin.Int GET_VAR 'p0: kotlin.Int declared in .Host.testBoundReceiverParameter.withVararg' type=kotlin.Int origin=null - FUNCTION_REFERENCE 'local final fun withVararg (p0: kotlin.Int): kotlin.Unit declared in .Host.testBoundReceiverParameter' type=kotlin.Function1 origin=ADAPTED_FUNCTION_REFERENCE reflectionTarget=null + FUNCTION_REFERENCE 'local final fun withVararg (p0: kotlin.Int): kotlin.Unit declared in .Host.testBoundReceiverParameter' type=kotlin.Function1 origin=ADAPTED_FUNCTION_REFERENCE reflectionTarget=public final fun withVararg (vararg xs: kotlin.Int): kotlin.String declared in .Host $receiver: GET_VAR 'h: .Host declared in .Host.testBoundReceiverParameter' type=.Host origin=null FUN name:testBoundReceiverExpression visibility:public modality:FINAL <> ($this:.Host) returnType:kotlin.Unit $this: VALUE_PARAMETER name: type:.Host @@ -100,7 +100,7 @@ FILE fqName: fileName:/withArgumentAdaptationAndReceiver.kt $this: GET_VAR 'receiver: .Host declared in .Host.testBoundReceiverExpression.withVararg' type=.Host origin=ADAPTED_FUNCTION_REFERENCE xs: VARARG type=kotlin.IntArray varargElementType=kotlin.Int GET_VAR 'p0: kotlin.Int declared in .Host.testBoundReceiverExpression.withVararg' type=kotlin.Int origin=null - FUNCTION_REFERENCE 'local final fun withVararg (p0: kotlin.Int): kotlin.Unit declared in .Host.testBoundReceiverExpression' type=kotlin.Function1 origin=ADAPTED_FUNCTION_REFERENCE reflectionTarget=null + FUNCTION_REFERENCE 'local final fun withVararg (p0: kotlin.Int): kotlin.Unit declared in .Host.testBoundReceiverExpression' type=kotlin.Function1 origin=ADAPTED_FUNCTION_REFERENCE reflectionTarget=public final fun withVararg (vararg xs: kotlin.Int): kotlin.String declared in .Host $receiver: CONSTRUCTOR_CALL 'public constructor () [primary] declared in .Host' type=.Host origin=null FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] overridden: diff --git a/compiler/testData/ir/irText/expressions/callableReferences/withVarargViewedAsArray.kt.txt b/compiler/testData/ir/irText/expressions/callableReferences/withVarargViewedAsArray.kt.txt index 90a6f0853cd..70f290515ea 100644 --- a/compiler/testData/ir/irText/expressions/callableReferences/withVarargViewedAsArray.kt.txt +++ b/compiler/testData/ir/irText/expressions/callableReferences/withVarargViewedAsArray.kt.txt @@ -33,10 +33,13 @@ fun useStringArray(fn: Function1, Unit>) { } fun testPlainArgs() { - usePlainArgs(fn = local fun sum(p0: Int, p1: Int): Int { - return sum(args = [p0, p1]) - } -) + usePlainArgs(fn = { // BLOCK + local fun sum(p0: Int, p1: Int): Int { + return sum(args = [p0, p1]) + } + + ::sum + }) } fun testPrimitiveArrayAsVararg() { @@ -48,9 +51,12 @@ fun testArrayAsVararg() { } fun testArrayAndDefaults() { - useStringArray(fn = local fun zap(p0: Array) { - zap(b = [*p0]) - } -) + useStringArray(fn = { // BLOCK + local fun zap(p0: Array) { + zap(b = [*p0]) + } + + ::zap + }) } diff --git a/compiler/testData/ir/irText/expressions/callableReferences/withVarargViewedAsArray.txt b/compiler/testData/ir/irText/expressions/callableReferences/withVarargViewedAsArray.txt index 10137266efc..684f8df7dc6 100644 --- a/compiler/testData/ir/irText/expressions/callableReferences/withVarargViewedAsArray.txt +++ b/compiler/testData/ir/irText/expressions/callableReferences/withVarargViewedAsArray.txt @@ -61,7 +61,7 @@ FILE fqName: fileName:/withVarargViewedAsArray.kt FUN name:testPlainArgs visibility:public modality:FINAL <> () returnType:kotlin.Unit BLOCK_BODY CALL 'public final fun usePlainArgs (fn: kotlin.Function2): kotlin.Unit declared in ' type=kotlin.Unit origin=null - fn: FUN_EXPR type=kotlin.Function2 origin=ADAPTED_FUNCTION_REFERENCE + fn: BLOCK type=kotlin.Function2 origin=ADAPTED_FUNCTION_REFERENCE FUN ADAPTER_FOR_CALLABLE_REFERENCE name:sum visibility:local modality:FINAL <> (p0:kotlin.Int, p1:kotlin.Int) returnType:kotlin.Int VALUE_PARAMETER ADAPTER_PARAMETER_FOR_CALLABLE_REFERENCE name:p0 index:0 type:kotlin.Int VALUE_PARAMETER ADAPTER_PARAMETER_FOR_CALLABLE_REFERENCE name:p1 index:1 type:kotlin.Int @@ -71,6 +71,7 @@ FILE fqName: fileName:/withVarargViewedAsArray.kt args: VARARG type=kotlin.IntArray varargElementType=kotlin.Int GET_VAR 'p0: kotlin.Int declared in .testPlainArgs.sum' type=kotlin.Int origin=null GET_VAR 'p1: kotlin.Int declared in .testPlainArgs.sum' type=kotlin.Int origin=null + FUNCTION_REFERENCE 'local final fun sum (p0: kotlin.Int, p1: kotlin.Int): kotlin.Int declared in .testPlainArgs' type=kotlin.Function2 origin=ADAPTED_FUNCTION_REFERENCE reflectionTarget=public final fun sum (vararg args: kotlin.Int): kotlin.Int declared in FUN name:testPrimitiveArrayAsVararg visibility:public modality:FINAL <> () returnType:kotlin.Unit BLOCK_BODY CALL 'public final fun usePrimitiveArray (fn: kotlin.Function1): kotlin.Unit declared in ' type=kotlin.Unit origin=null @@ -82,7 +83,7 @@ FILE fqName: fileName:/withVarargViewedAsArray.kt FUN name:testArrayAndDefaults visibility:public modality:FINAL <> () returnType:kotlin.Unit BLOCK_BODY CALL 'public final fun useStringArray (fn: kotlin.Function1, kotlin.Unit>): kotlin.Unit declared in ' type=kotlin.Unit origin=null - fn: FUN_EXPR type=kotlin.Function1, kotlin.Unit> origin=ADAPTED_FUNCTION_REFERENCE + fn: BLOCK type=kotlin.Function1, kotlin.Unit> origin=ADAPTED_FUNCTION_REFERENCE FUN ADAPTER_FOR_CALLABLE_REFERENCE name:zap visibility:local modality:FINAL <> (p0:kotlin.Array) returnType:kotlin.Unit VALUE_PARAMETER ADAPTER_PARAMETER_FOR_CALLABLE_REFERENCE name:p0 index:0 type:kotlin.Array BLOCK_BODY @@ -90,3 +91,4 @@ FILE fqName: fileName:/withVarargViewedAsArray.kt b: VARARG type=kotlin.Array varargElementType=kotlin.String SPREAD_ELEMENT GET_VAR 'p0: kotlin.Array declared in .testArrayAndDefaults.zap' type=kotlin.Array origin=null + FUNCTION_REFERENCE 'local final fun zap (p0: kotlin.Array): kotlin.Unit declared in .testArrayAndDefaults' type=kotlin.Function1, kotlin.Unit> origin=ADAPTED_FUNCTION_REFERENCE reflectionTarget=public final fun zap (vararg b: kotlin.String, k: kotlin.Int): kotlin.Unit declared in diff --git a/compiler/testData/ir/irText/expressions/equals.fir.txt b/compiler/testData/ir/irText/expressions/equals.fir.txt index 0d6adbd0703..3685c376256 100644 --- a/compiler/testData/ir/irText/expressions/equals.fir.txt +++ b/compiler/testData/ir/irText/expressions/equals.fir.txt @@ -12,7 +12,7 @@ FILE fqName: fileName:/equals.kt VALUE_PARAMETER name:b index:1 type:kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun testEquals (a: kotlin.Int, b: kotlin.Int): kotlin.Boolean declared in ' - CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in kotlin.Int' type=kotlin.Boolean origin=null + CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any' type=kotlin.Boolean origin=null $this: GET_VAR 'a: kotlin.Int declared in .testEquals' type=kotlin.Int origin=null other: GET_VAR 'b: kotlin.Int declared in .testEquals' type=kotlin.Int origin=null FUN name:testJEqeqNull visibility:public modality:FINAL <> () returnType:kotlin.Boolean @@ -24,6 +24,6 @@ FILE fqName: fileName:/equals.kt FUN name:testJEqualsNull visibility:public modality:FINAL <> () returnType:kotlin.Boolean BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun testJEqualsNull (): kotlin.Boolean declared in ' - CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in kotlin.Int' type=kotlin.Boolean origin=null + CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any' type=kotlin.Boolean origin=null $this: GET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:INT_NULL type:kotlin.Int? visibility:public [static]' type=kotlin.Int? origin=GET_PROPERTY other: CONST Null type=kotlin.Nothing? value=null diff --git a/compiler/testData/ir/irText/expressions/floatingPointComparisons/floatingPointEquals.fir.txt b/compiler/testData/ir/irText/expressions/floatingPointComparisons/floatingPointEquals.fir.txt index f294256fc58..f55cf0a5762 100644 --- a/compiler/testData/ir/irText/expressions/floatingPointComparisons/floatingPointEquals.fir.txt +++ b/compiler/testData/ir/irText/expressions/floatingPointComparisons/floatingPointEquals.fir.txt @@ -4,7 +4,7 @@ FILE fqName: fileName:/floatingPointEquals.kt VALUE_PARAMETER name:y index:1 type:kotlin.Double BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun test1d (x: kotlin.Double, y: kotlin.Double): kotlin.Boolean declared in ' - CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in kotlin.Double' type=kotlin.Boolean origin=null + CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any' type=kotlin.Boolean origin=null $this: GET_VAR 'x: kotlin.Double declared in .test1d' type=kotlin.Double origin=null other: GET_VAR 'y: kotlin.Double declared in .test1d' type=kotlin.Double origin=null FUN name:test2d visibility:public modality:FINAL <> (x:kotlin.Double, y:kotlin.Double?) returnType:kotlin.Boolean @@ -12,7 +12,7 @@ FILE fqName: fileName:/floatingPointEquals.kt VALUE_PARAMETER name:y index:1 type:kotlin.Double? BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun test2d (x: kotlin.Double, y: kotlin.Double?): kotlin.Boolean declared in ' - CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in kotlin.Double' type=kotlin.Boolean origin=null + CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any' type=kotlin.Boolean origin=null $this: GET_VAR 'x: kotlin.Double declared in .test2d' type=kotlin.Double origin=null other: GET_VAR 'y: kotlin.Double? declared in .test2d' type=kotlin.Double? origin=null FUN name:test3d visibility:public modality:FINAL <> (x:kotlin.Double, y:kotlin.Any) returnType:kotlin.Boolean @@ -20,7 +20,7 @@ FILE fqName: fileName:/floatingPointEquals.kt VALUE_PARAMETER name:y index:1 type:kotlin.Any BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun test3d (x: kotlin.Double, y: kotlin.Any): kotlin.Boolean declared in ' - CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in kotlin.Double' type=kotlin.Boolean origin=null + CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any' type=kotlin.Boolean origin=null $this: GET_VAR 'x: kotlin.Double declared in .test3d' type=kotlin.Double origin=null other: GET_VAR 'y: kotlin.Any declared in .test3d' type=kotlin.Any origin=null FUN name:test4d visibility:public modality:FINAL <> (x:kotlin.Double, y:kotlin.Number) returnType:kotlin.Boolean @@ -28,7 +28,7 @@ FILE fqName: fileName:/floatingPointEquals.kt VALUE_PARAMETER name:y index:1 type:kotlin.Number BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun test4d (x: kotlin.Double, y: kotlin.Number): kotlin.Boolean declared in ' - CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in kotlin.Double' type=kotlin.Boolean origin=null + CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any' type=kotlin.Boolean origin=null $this: GET_VAR 'x: kotlin.Double declared in .test4d' type=kotlin.Double origin=null other: GET_VAR 'y: kotlin.Number declared in .test4d' type=kotlin.Number origin=null FUN name:test5d visibility:public modality:FINAL <> (x:kotlin.Double, y:kotlin.Any) returnType:kotlin.Boolean @@ -40,7 +40,7 @@ FILE fqName: fileName:/floatingPointEquals.kt BRANCH if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=kotlin.Double GET_VAR 'y: kotlin.Any declared in .test5d' type=kotlin.Any origin=null - then: CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in kotlin.Double' type=kotlin.Boolean origin=null + then: CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any' type=kotlin.Boolean origin=null $this: GET_VAR 'x: kotlin.Double declared in .test5d' type=kotlin.Double origin=null other: TYPE_OP type=kotlin.Double origin=IMPLICIT_CAST typeOperand=kotlin.Double GET_VAR 'y: kotlin.Any declared in .test5d' type=kotlin.Any origin=null @@ -63,7 +63,7 @@ FILE fqName: fileName:/floatingPointEquals.kt BRANCH if: CONST Boolean type=kotlin.Boolean value=true then: CONST Boolean type=kotlin.Boolean value=false - then: CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in kotlin.Double' type=kotlin.Boolean origin=null + then: CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any' type=kotlin.Boolean origin=null $this: TYPE_OP type=kotlin.Double origin=IMPLICIT_CAST typeOperand=kotlin.Double GET_VAR 'x: kotlin.Any declared in .test6d' type=kotlin.Any origin=null other: TYPE_OP type=kotlin.Double origin=IMPLICIT_CAST typeOperand=kotlin.Double @@ -76,7 +76,7 @@ FILE fqName: fileName:/floatingPointEquals.kt VALUE_PARAMETER name:y index:1 type:kotlin.Float BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun test1f (x: kotlin.Float, y: kotlin.Float): kotlin.Boolean declared in ' - CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in kotlin.Float' type=kotlin.Boolean origin=null + CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any' type=kotlin.Boolean origin=null $this: GET_VAR 'x: kotlin.Float declared in .test1f' type=kotlin.Float origin=null other: GET_VAR 'y: kotlin.Float declared in .test1f' type=kotlin.Float origin=null FUN name:test2f visibility:public modality:FINAL <> (x:kotlin.Float, y:kotlin.Float?) returnType:kotlin.Boolean @@ -84,7 +84,7 @@ FILE fqName: fileName:/floatingPointEquals.kt VALUE_PARAMETER name:y index:1 type:kotlin.Float? BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun test2f (x: kotlin.Float, y: kotlin.Float?): kotlin.Boolean declared in ' - CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in kotlin.Float' type=kotlin.Boolean origin=null + CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any' type=kotlin.Boolean origin=null $this: GET_VAR 'x: kotlin.Float declared in .test2f' type=kotlin.Float origin=null other: GET_VAR 'y: kotlin.Float? declared in .test2f' type=kotlin.Float? origin=null FUN name:test3f visibility:public modality:FINAL <> (x:kotlin.Float, y:kotlin.Any) returnType:kotlin.Boolean @@ -92,7 +92,7 @@ FILE fqName: fileName:/floatingPointEquals.kt VALUE_PARAMETER name:y index:1 type:kotlin.Any BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun test3f (x: kotlin.Float, y: kotlin.Any): kotlin.Boolean declared in ' - CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in kotlin.Float' type=kotlin.Boolean origin=null + CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any' type=kotlin.Boolean origin=null $this: GET_VAR 'x: kotlin.Float declared in .test3f' type=kotlin.Float origin=null other: GET_VAR 'y: kotlin.Any declared in .test3f' type=kotlin.Any origin=null FUN name:test4f visibility:public modality:FINAL <> (x:kotlin.Float, y:kotlin.Number) returnType:kotlin.Boolean @@ -100,7 +100,7 @@ FILE fqName: fileName:/floatingPointEquals.kt VALUE_PARAMETER name:y index:1 type:kotlin.Number BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun test4f (x: kotlin.Float, y: kotlin.Number): kotlin.Boolean declared in ' - CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in kotlin.Float' type=kotlin.Boolean origin=null + CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any' type=kotlin.Boolean origin=null $this: GET_VAR 'x: kotlin.Float declared in .test4f' type=kotlin.Float origin=null other: GET_VAR 'y: kotlin.Number declared in .test4f' type=kotlin.Number origin=null FUN name:test5f visibility:public modality:FINAL <> (x:kotlin.Float, y:kotlin.Any) returnType:kotlin.Boolean @@ -112,7 +112,7 @@ FILE fqName: fileName:/floatingPointEquals.kt BRANCH if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=kotlin.Float GET_VAR 'y: kotlin.Any declared in .test5f' type=kotlin.Any origin=null - then: CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in kotlin.Float' type=kotlin.Boolean origin=null + then: CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any' type=kotlin.Boolean origin=null $this: GET_VAR 'x: kotlin.Float declared in .test5f' type=kotlin.Float origin=null other: TYPE_OP type=kotlin.Float origin=IMPLICIT_CAST typeOperand=kotlin.Float GET_VAR 'y: kotlin.Any declared in .test5f' type=kotlin.Any origin=null @@ -135,7 +135,7 @@ FILE fqName: fileName:/floatingPointEquals.kt BRANCH if: CONST Boolean type=kotlin.Boolean value=true then: CONST Boolean type=kotlin.Boolean value=false - then: CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in kotlin.Float' type=kotlin.Boolean origin=null + then: CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any' type=kotlin.Boolean origin=null $this: TYPE_OP type=kotlin.Float origin=IMPLICIT_CAST typeOperand=kotlin.Float GET_VAR 'x: kotlin.Any declared in .test6f' type=kotlin.Any origin=null other: TYPE_OP type=kotlin.Float origin=IMPLICIT_CAST typeOperand=kotlin.Float @@ -159,7 +159,7 @@ FILE fqName: fileName:/floatingPointEquals.kt BRANCH if: CONST Boolean type=kotlin.Boolean value=true then: CONST Boolean type=kotlin.Boolean value=false - then: CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in kotlin.Float' type=kotlin.Boolean origin=null + then: CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any' type=kotlin.Boolean origin=null $this: TYPE_OP type=kotlin.Float origin=IMPLICIT_CAST typeOperand=kotlin.Float GET_VAR 'x: kotlin.Any declared in .testFD' type=kotlin.Any origin=null other: TYPE_OP type=kotlin.Double origin=IMPLICIT_CAST typeOperand=kotlin.Double @@ -183,7 +183,7 @@ FILE fqName: fileName:/floatingPointEquals.kt BRANCH if: CONST Boolean type=kotlin.Boolean value=true then: CONST Boolean type=kotlin.Boolean value=false - then: CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in kotlin.Double' type=kotlin.Boolean origin=null + then: CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any' type=kotlin.Boolean origin=null $this: TYPE_OP type=kotlin.Double origin=IMPLICIT_CAST typeOperand=kotlin.Double GET_VAR 'x: kotlin.Any declared in .testDF' type=kotlin.Any origin=null other: TYPE_OP type=kotlin.Float origin=IMPLICIT_CAST typeOperand=kotlin.Float @@ -196,7 +196,7 @@ FILE fqName: fileName:/floatingPointEquals.kt VALUE_PARAMETER name:x index:0 type:kotlin.Float BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun test1fr (x: kotlin.Float): kotlin.Boolean declared in ' - CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in kotlin.Float' type=kotlin.Boolean origin=null + CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any' type=kotlin.Boolean origin=null $this: GET_VAR ': kotlin.Float declared in .test1fr' type=kotlin.Float origin=null other: GET_VAR 'x: kotlin.Float declared in .test1fr' type=kotlin.Float origin=null FUN name:test2fr visibility:public modality:FINAL <> ($receiver:kotlin.Float, x:kotlin.Float?) returnType:kotlin.Boolean @@ -204,7 +204,7 @@ FILE fqName: fileName:/floatingPointEquals.kt VALUE_PARAMETER name:x index:0 type:kotlin.Float? BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun test2fr (x: kotlin.Float?): kotlin.Boolean declared in ' - CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in kotlin.Float' type=kotlin.Boolean origin=null + CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any' type=kotlin.Boolean origin=null $this: GET_VAR ': kotlin.Float declared in .test2fr' type=kotlin.Float origin=null other: GET_VAR 'x: kotlin.Float? declared in .test2fr' type=kotlin.Float? origin=null FUN name:test3fr visibility:public modality:FINAL <> ($receiver:kotlin.Float, x:kotlin.Any) returnType:kotlin.Boolean @@ -212,7 +212,7 @@ FILE fqName: fileName:/floatingPointEquals.kt VALUE_PARAMETER name:x index:0 type:kotlin.Any BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun test3fr (x: kotlin.Any): kotlin.Boolean declared in ' - CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in kotlin.Float' type=kotlin.Boolean origin=null + CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any' type=kotlin.Boolean origin=null $this: GET_VAR ': kotlin.Float declared in .test3fr' type=kotlin.Float origin=null other: GET_VAR 'x: kotlin.Any declared in .test3fr' type=kotlin.Any origin=null FUN name:test4fr visibility:public modality:FINAL <> ($receiver:kotlin.Float, x:kotlin.Number) returnType:kotlin.Boolean @@ -220,7 +220,7 @@ FILE fqName: fileName:/floatingPointEquals.kt VALUE_PARAMETER name:x index:0 type:kotlin.Number BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun test4fr (x: kotlin.Number): kotlin.Boolean declared in ' - CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in kotlin.Float' type=kotlin.Boolean origin=null + CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any' type=kotlin.Boolean origin=null $this: GET_VAR ': kotlin.Float declared in .test4fr' type=kotlin.Float origin=null other: GET_VAR 'x: kotlin.Number declared in .test4fr' type=kotlin.Number origin=null FUN name:test5fr visibility:public modality:FINAL <> ($receiver:kotlin.Float, x:kotlin.Any) returnType:kotlin.Boolean @@ -232,7 +232,7 @@ FILE fqName: fileName:/floatingPointEquals.kt BRANCH if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=kotlin.Float GET_VAR 'x: kotlin.Any declared in .test5fr' type=kotlin.Any origin=null - then: CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in kotlin.Float' type=kotlin.Boolean origin=null + then: CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any' type=kotlin.Boolean origin=null $this: GET_VAR ': kotlin.Float declared in .test5fr' type=kotlin.Float origin=null other: TYPE_OP type=kotlin.Float origin=IMPLICIT_CAST typeOperand=kotlin.Float GET_VAR 'x: kotlin.Any declared in .test5fr' type=kotlin.Any origin=null @@ -248,7 +248,7 @@ FILE fqName: fileName:/floatingPointEquals.kt BRANCH if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=kotlin.Double GET_VAR 'x: kotlin.Any declared in .test6fr' type=kotlin.Any origin=null - then: CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in kotlin.Float' type=kotlin.Boolean origin=null + then: CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any' type=kotlin.Boolean origin=null $this: GET_VAR ': kotlin.Float declared in .test6fr' type=kotlin.Float origin=null other: TYPE_OP type=kotlin.Double origin=IMPLICIT_CAST typeOperand=kotlin.Double GET_VAR 'x: kotlin.Any declared in .test6fr' type=kotlin.Any origin=null diff --git a/compiler/testData/ir/irText/expressions/funInterface/samConversionInVarargs.kt.txt b/compiler/testData/ir/irText/expressions/funInterface/samConversionInVarargs.kt.txt index 2374a0e3e50..b1b65db1e08 100644 --- a/compiler/testData/ir/irText/expressions/funInterface/samConversionInVarargs.kt.txt +++ b/compiler/testData/ir/irText/expressions/funInterface/samConversionInVarargs.kt.txt @@ -31,9 +31,12 @@ fun withVarargOfInt(vararg xs: Int): String { } fun testAdaptedCR() { - useVararg(foos = [local fun withVarargOfInt(p0: Int) { - withVarargOfInt(xs = [p0]) /*~> Unit */ - } - /*-> IFoo */]) + useVararg(foos = [{ // BLOCK + local fun withVarargOfInt(p0: Int) { + withVarargOfInt(xs = [p0]) /*~> Unit */ + } + + ::withVarargOfInt + } /*-> IFoo */]) } diff --git a/compiler/testData/ir/irText/expressions/funInterface/samConversionInVarargs.txt b/compiler/testData/ir/irText/expressions/funInterface/samConversionInVarargs.txt index df7093b1723..1c3922a785f 100644 --- a/compiler/testData/ir/irText/expressions/funInterface/samConversionInVarargs.txt +++ b/compiler/testData/ir/irText/expressions/funInterface/samConversionInVarargs.txt @@ -66,7 +66,7 @@ FILE fqName: fileName:/samConversionInVarargs.kt CALL 'public final fun useVararg (vararg foos: .IFoo): kotlin.Unit declared in ' type=kotlin.Unit origin=null foos: VARARG type=kotlin.Array.IFoo> varargElementType=.IFoo TYPE_OP type=.IFoo origin=SAM_CONVERSION typeOperand=.IFoo - FUN_EXPR type=kotlin.Function1 origin=ADAPTED_FUNCTION_REFERENCE + BLOCK type=kotlin.Function1 origin=ADAPTED_FUNCTION_REFERENCE FUN ADAPTER_FOR_CALLABLE_REFERENCE name:withVarargOfInt visibility:local modality:FINAL <> (p0:kotlin.Int) returnType:kotlin.Unit VALUE_PARAMETER ADAPTER_PARAMETER_FOR_CALLABLE_REFERENCE name:p0 index:0 type:kotlin.Int BLOCK_BODY @@ -74,3 +74,4 @@ FILE fqName: fileName:/samConversionInVarargs.kt CALL 'public final fun withVarargOfInt (vararg xs: kotlin.Int): kotlin.String declared in ' type=kotlin.String origin=null xs: VARARG type=kotlin.IntArray varargElementType=kotlin.Int GET_VAR 'p0: kotlin.Int declared in .testAdaptedCR.withVarargOfInt' type=kotlin.Int origin=null + FUNCTION_REFERENCE 'local final fun withVarargOfInt (p0: kotlin.Int): kotlin.Unit declared in .testAdaptedCR' type=kotlin.Function1 origin=ADAPTED_FUNCTION_REFERENCE reflectionTarget=public final fun withVarargOfInt (vararg xs: kotlin.Int): kotlin.String declared in diff --git a/compiler/testData/ir/irText/expressions/funInterface/samConversionOnCallableReference.kt.txt b/compiler/testData/ir/irText/expressions/funInterface/samConversionOnCallableReference.kt.txt index 4efa141094d..08502590341 100644 --- a/compiler/testData/ir/irText/expressions/funInterface/samConversionOnCallableReference.kt.txt +++ b/compiler/testData/ir/irText/expressions/funInterface/samConversionOnCallableReference.kt.txt @@ -18,10 +18,13 @@ fun testSamConstructor(): KRunnable { } fun testSamCosntructorOnAdapted(): KRunnable { - return local fun foo1() { - foo1() /*~> Unit */ - } - /*-> KRunnable */ + return { // BLOCK + local fun foo1() { + foo1() /*~> Unit */ + } + + ::foo1 + } /*-> KRunnable */ } fun testSamConversion() { @@ -29,9 +32,12 @@ fun testSamConversion() { } fun testSamConversionOnAdapted() { - use(r = local fun foo1() { - foo1() /*~> Unit */ - } - /*-> KRunnable */) + use(r = { // BLOCK + local fun foo1() { + foo1() /*~> Unit */ + } + + ::foo1 + } /*-> KRunnable */) } diff --git a/compiler/testData/ir/irText/expressions/funInterface/samConversionOnCallableReference.txt b/compiler/testData/ir/irText/expressions/funInterface/samConversionOnCallableReference.txt index d4c0fa43c6f..4e955691a7e 100644 --- a/compiler/testData/ir/irText/expressions/funInterface/samConversionOnCallableReference.txt +++ b/compiler/testData/ir/irText/expressions/funInterface/samConversionOnCallableReference.txt @@ -35,11 +35,12 @@ FILE fqName: fileName:/samConversionOnCallableReference.kt BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun testSamCosntructorOnAdapted (): .KRunnable declared in ' TYPE_OP type=.KRunnable origin=SAM_CONVERSION typeOperand=.KRunnable - FUN_EXPR type=kotlin.Function0 origin=ADAPTED_FUNCTION_REFERENCE + BLOCK type=kotlin.Function0 origin=ADAPTED_FUNCTION_REFERENCE FUN ADAPTER_FOR_CALLABLE_REFERENCE name:foo1 visibility:local modality:FINAL <> () returnType:kotlin.Unit BLOCK_BODY TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit CALL 'public final fun foo1 (vararg xs: kotlin.Int): kotlin.Int declared in ' type=kotlin.Int origin=null + FUNCTION_REFERENCE 'local final fun foo1 (): kotlin.Unit declared in .testSamCosntructorOnAdapted' type=kotlin.Function0 origin=ADAPTED_FUNCTION_REFERENCE reflectionTarget=public final fun foo1 (vararg xs: kotlin.Int): kotlin.Int declared in FUN name:testSamConversion visibility:public modality:FINAL <> () returnType:kotlin.Unit BLOCK_BODY CALL 'public final fun use (r: .KRunnable): kotlin.Unit declared in ' type=kotlin.Unit origin=null @@ -49,8 +50,9 @@ FILE fqName: fileName:/samConversionOnCallableReference.kt BLOCK_BODY CALL 'public final fun use (r: .KRunnable): kotlin.Unit declared in ' type=kotlin.Unit origin=null r: TYPE_OP type=.KRunnable origin=SAM_CONVERSION typeOperand=.KRunnable - FUN_EXPR type=kotlin.Function0 origin=ADAPTED_FUNCTION_REFERENCE + BLOCK type=kotlin.Function0 origin=ADAPTED_FUNCTION_REFERENCE FUN ADAPTER_FOR_CALLABLE_REFERENCE name:foo1 visibility:local modality:FINAL <> () returnType:kotlin.Unit BLOCK_BODY TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit CALL 'public final fun foo1 (vararg xs: kotlin.Int): kotlin.Int declared in ' type=kotlin.Int origin=null + FUNCTION_REFERENCE 'local final fun foo1 (): kotlin.Unit declared in .testSamConversionOnAdapted' type=kotlin.Function0 origin=ADAPTED_FUNCTION_REFERENCE reflectionTarget=public final fun foo1 (vararg xs: kotlin.Int): kotlin.Int declared in diff --git a/compiler/testData/ir/irText/expressions/kt28006.fir.txt b/compiler/testData/ir/irText/expressions/kt28006.fir.txt index 7e5f072c732..2df56df1066 100644 --- a/compiler/testData/ir/irText/expressions/kt28006.fir.txt +++ b/compiler/testData/ir/irText/expressions/kt28006.fir.txt @@ -60,14 +60,14 @@ FILE fqName: fileName:/kt28006.kt STRING_CONCATENATION type=kotlin.String CONST String type=kotlin.String value="\uD83E" CONST String type=kotlin.String value="\uDD17" - CALL 'public open fun toString (): kotlin.String [fake_override] declared in kotlin.Int' type=kotlin.String origin=null + CALL 'public open fun toString (): kotlin.String declared in kotlin.Any' type=kotlin.String origin=null $this: GET_VAR 'x: kotlin.Int declared in .test1' type=kotlin.Int origin=null FUN name:test2 visibility:public modality:FINAL <> (x:kotlin.Int) returnType:kotlin.String VALUE_PARAMETER name:x index:0 type:kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun test2 (x: kotlin.Int): kotlin.String declared in ' STRING_CONCATENATION type=kotlin.String - CALL 'public open fun toString (): kotlin.String [fake_override] declared in kotlin.Int' type=kotlin.String origin=null + CALL 'public open fun toString (): kotlin.String declared in kotlin.Any' type=kotlin.String origin=null $this: GET_VAR 'x: kotlin.Int declared in .test2' type=kotlin.Int origin=null CONST String type=kotlin.String value="\uD83E" CONST String type=kotlin.String value="\uDD17" @@ -76,9 +76,9 @@ FILE fqName: fileName:/kt28006.kt BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun test3 (x: kotlin.Int): kotlin.String declared in ' STRING_CONCATENATION type=kotlin.String - CALL 'public open fun toString (): kotlin.String [fake_override] declared in kotlin.Int' type=kotlin.String origin=null + CALL 'public open fun toString (): kotlin.String declared in kotlin.Any' type=kotlin.String origin=null $this: GET_VAR 'x: kotlin.Int declared in .test3' type=kotlin.Int origin=null CONST String type=kotlin.String value="\uD83E" CONST String type=kotlin.String value="\uDD17" - CALL 'public open fun toString (): kotlin.String [fake_override] declared in kotlin.Int' type=kotlin.String origin=null + CALL 'public open fun toString (): kotlin.String declared in kotlin.Any' type=kotlin.String origin=null $this: GET_VAR 'x: kotlin.Int declared in .test3' type=kotlin.Int origin=null diff --git a/compiler/testData/ir/irText/expressions/kt30020.fir.txt b/compiler/testData/ir/irText/expressions/kt30020.fir.txt index 1c57f6ea4a7..d45c3e9edb3 100644 --- a/compiler/testData/ir/irText/expressions/kt30020.fir.txt +++ b/compiler/testData/ir/irText/expressions/kt30020.fir.txt @@ -240,16 +240,13 @@ FILE fqName: fileName:/kt30020.kt FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] overridden: public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any - public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in kotlin.collections.MutableCollection $this: VALUE_PARAMETER name: type:kotlin.Any VALUE_PARAMETER name:other index:0 type:kotlin.Any? FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] overridden: public open fun hashCode (): kotlin.Int declared in kotlin.Any - public open fun hashCode (): kotlin.Int [fake_override] declared in kotlin.collections.MutableCollection $this: VALUE_PARAMETER name: type:kotlin.Any FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] overridden: public open fun toString (): kotlin.String declared in kotlin.Any - public open fun toString (): kotlin.String [fake_override] declared in kotlin.collections.MutableCollection $this: VALUE_PARAMETER name: type:kotlin.Any diff --git a/compiler/testData/ir/irText/expressions/objectReferenceInFieldInitializer.fir.txt b/compiler/testData/ir/irText/expressions/objectReferenceInFieldInitializer.fir.txt index 65e3dc07cc8..8d9e4bdfe95 100644 --- a/compiler/testData/ir/irText/expressions/objectReferenceInFieldInitializer.fir.txt +++ b/compiler/testData/ir/irText/expressions/objectReferenceInFieldInitializer.fir.txt @@ -21,7 +21,7 @@ FILE fqName: fileName:/objectReferenceInFieldInitializer.kt EXPRESSION_BODY STRING_CONCATENATION type=kotlin.String CONST String type=kotlin.String value="1234" - CALL 'public open fun toString (): kotlin.String [fake_override] declared in kotlin.String' type=kotlin.String origin=null + CALL 'public open fun toString (): kotlin.String declared in kotlin.Any' type=kotlin.String origin=null $this: CALL 'private final fun (): kotlin.String declared in .A' type=kotlin.String origin=GET_PROPERTY $this: GET_VAR ': .A declared in .A' type=.A origin=null FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:private modality:FINAL <> ($this:.A) returnType:kotlin.String diff --git a/compiler/testData/ir/irText/expressions/safeCalls.fir.txt b/compiler/testData/ir/irText/expressions/safeCalls.fir.txt index 89b6504723b..0099bec0a0b 100644 --- a/compiler/testData/ir/irText/expressions/safeCalls.fir.txt +++ b/compiler/testData/ir/irText/expressions/safeCalls.fir.txt @@ -92,7 +92,7 @@ FILE fqName: fileName:/safeCalls.kt then: CONST Null type=kotlin.Nothing? value=null BRANCH if: CONST Boolean type=kotlin.Boolean value=true - then: CALL 'public open fun hashCode (): kotlin.Int [fake_override] declared in kotlin.String' type=kotlin.Int origin=null + then: CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Any' type=kotlin.Int origin=null $this: GET_VAR 'val tmp_1: kotlin.String? [val] declared in .test2' type=kotlin.String? origin=null FUN name:test3 visibility:public modality:FINAL <> (x:kotlin.String?, y:kotlin.Any?) returnType:kotlin.Boolean? VALUE_PARAMETER name:x index:0 type:kotlin.String? @@ -110,7 +110,7 @@ FILE fqName: fileName:/safeCalls.kt then: CONST Null type=kotlin.Nothing? value=null BRANCH if: CONST Boolean type=kotlin.Boolean value=true - then: CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in kotlin.String' type=kotlin.Boolean origin=null + then: CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any' type=kotlin.Boolean origin=null $this: GET_VAR 'val tmp_2: kotlin.String? [val] declared in .test3' type=kotlin.String? origin=null other: GET_VAR 'y: kotlin.Any? declared in .test3' type=kotlin.Any? origin=null FUN name:test4 visibility:public modality:FINAL <> (x:.Ref?) returnType:kotlin.Unit diff --git a/compiler/testData/ir/irText/expressions/stringTemplates.fir.txt b/compiler/testData/ir/irText/expressions/stringTemplates.fir.txt index 6101d3b3acc..ffe4eff3539 100644 --- a/compiler/testData/ir/irText/expressions/stringTemplates.fir.txt +++ b/compiler/testData/ir/irText/expressions/stringTemplates.fir.txt @@ -61,10 +61,10 @@ FILE fqName: fileName:/stringTemplates.kt FIELD PROPERTY_BACKING_FIELD name:test6 type:kotlin.String visibility:private [final,static] EXPRESSION_BODY STRING_CONCATENATION type=kotlin.String - CALL 'public open fun toString (): kotlin.String [fake_override] declared in kotlin.String' type=kotlin.String origin=null + CALL 'public open fun toString (): kotlin.String declared in kotlin.Any' type=kotlin.String origin=null $this: CALL 'public final fun (): kotlin.String declared in ' type=kotlin.String origin=GET_PROPERTY CONST String type=kotlin.String value=" " - CALL 'public open fun toString (): kotlin.String [fake_override] declared in kotlin.String' type=kotlin.String origin=null + CALL 'public open fun toString (): kotlin.String declared in kotlin.Any' type=kotlin.String origin=null $this: CALL 'public final fun foo (): kotlin.String declared in ' type=kotlin.String origin=null FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.String correspondingProperty: PROPERTY name:test6 visibility:public modality:FINAL [val] @@ -75,7 +75,7 @@ FILE fqName: fileName:/stringTemplates.kt FIELD PROPERTY_BACKING_FIELD name:test7 type:kotlin.String visibility:private [final,static] EXPRESSION_BODY STRING_CONCATENATION type=kotlin.String - CALL 'public open fun toString (): kotlin.String [fake_override] declared in kotlin.String' type=kotlin.String origin=null + CALL 'public open fun toString (): kotlin.String declared in kotlin.Any' type=kotlin.String origin=null $this: CALL 'public final fun (): kotlin.String declared in ' type=kotlin.String origin=GET_PROPERTY FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.String correspondingProperty: PROPERTY name:test7 visibility:public modality:FINAL [val] @@ -86,7 +86,7 @@ FILE fqName: fileName:/stringTemplates.kt FIELD PROPERTY_BACKING_FIELD name:test8 type:kotlin.String visibility:private [final,static] EXPRESSION_BODY STRING_CONCATENATION type=kotlin.String - CALL 'public open fun toString (): kotlin.String [fake_override] declared in kotlin.String' type=kotlin.String origin=null + CALL 'public open fun toString (): kotlin.String declared in kotlin.Any' type=kotlin.String origin=null $this: CALL 'public final fun foo (): kotlin.String declared in ' type=kotlin.String origin=null FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.String correspondingProperty: PROPERTY name:test8 visibility:public modality:FINAL [val] @@ -97,7 +97,7 @@ FILE fqName: fileName:/stringTemplates.kt FIELD PROPERTY_BACKING_FIELD name:test9 type:kotlin.String visibility:private [final,static] EXPRESSION_BODY STRING_CONCATENATION type=kotlin.String - CALL 'public open fun toString (): kotlin.String [fake_override] declared in kotlin.Int' type=kotlin.String origin=null + CALL 'public open fun toString (): kotlin.String declared in kotlin.Any' type=kotlin.String origin=null $this: CALL 'public final fun (): kotlin.Int declared in ' type=kotlin.Int origin=GET_PROPERTY FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.String correspondingProperty: PROPERTY name:test9 visibility:public modality:FINAL [val] diff --git a/compiler/testData/ir/irText/firProblems/DelegationAndInheritanceFromJava.fir.txt b/compiler/testData/ir/irText/firProblems/DelegationAndInheritanceFromJava.fir.txt index d72caa18324..9c8a43fdf46 100644 --- a/compiler/testData/ir/irText/firProblems/DelegationAndInheritanceFromJava.fir.txt +++ b/compiler/testData/ir/irText/firProblems/DelegationAndInheritanceFromJava.fir.txt @@ -126,16 +126,16 @@ FILE fqName: fileName:/DelegationAndInheritanceFromJava.kt FIELD DELEGATE name:<$$delegate_0> type:.Foo.B visibility:local [final] FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] overridden: - public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in kotlin.collections.MutableSet + public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any $this: VALUE_PARAMETER name: type:kotlin.Any VALUE_PARAMETER name:other index:0 type:kotlin.Any? FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] overridden: - public open fun hashCode (): kotlin.Int [fake_override] declared in kotlin.collections.MutableSet + public open fun hashCode (): kotlin.Int declared in kotlin.Any $this: VALUE_PARAMETER name: type:kotlin.Any FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] overridden: - public open fun toString (): kotlin.String [fake_override] declared in kotlin.collections.MutableSet + public open fun toString (): kotlin.String declared in kotlin.Any $this: VALUE_PARAMETER name: type:kotlin.Any FUN name:box visibility:public modality:FINAL <> () returnType:kotlin.String BLOCK_BODY diff --git a/compiler/testData/ir/irText/firProblems/inapplicableCollectionSet.fir.txt b/compiler/testData/ir/irText/firProblems/inapplicableCollectionSet.fir.txt index d9583317f9e..5cfce3a233f 100644 --- a/compiler/testData/ir/irText/firProblems/inapplicableCollectionSet.fir.txt +++ b/compiler/testData/ir/irText/firProblems/inapplicableCollectionSet.fir.txt @@ -50,7 +50,7 @@ FILE fqName: fileName:/inapplicableCollectionSet.kt $this: CALL 'private final fun (): kotlin.collections.MutableMap.Flaf> declared in .Flaf' type=kotlin.collections.MutableMap.Flaf> origin=GET_PROPERTY $this: GET_VAR ': .Flaf declared in .Flaf.forJavaName' type=.Flaf origin=null key: STRING_CONCATENATION type=kotlin.String - CALL 'public open fun toString (): kotlin.String [fake_override] declared in kotlin.String' type=kotlin.String origin=null + CALL 'public open fun toString (): kotlin.String declared in kotlin.Any' type=kotlin.String origin=null $this: GET_VAR 'javaName: kotlin.String declared in .Flaf.forJavaName' type=kotlin.String origin=null CONST String type=kotlin.String value="_alternative" WHEN type=kotlin.Unit origin=IF diff --git a/compiler/testData/ir/irText/regressions/coercionInLoop.fir.txt b/compiler/testData/ir/irText/regressions/coercionInLoop.fir.txt index fecdbd66787..2b17c259ea0 100644 --- a/compiler/testData/ir/irText/regressions/coercionInLoop.fir.txt +++ b/compiler/testData/ir/irText/regressions/coercionInLoop.fir.txt @@ -25,7 +25,7 @@ FILE fqName: fileName:/coercionInLoop.kt then: RETURN type=kotlin.Nothing from='public final fun box (): kotlin.String declared in ' STRING_CONCATENATION type=kotlin.String CONST String type=kotlin.String value="Fail " - CALL 'public open fun toString (): kotlin.String [fake_override] declared in kotlin.Int' type=kotlin.String origin=null + CALL 'public open fun toString (): kotlin.String declared in kotlin.Any' type=kotlin.String origin=null $this: GET_VAR 'var i: kotlin.Int [var] declared in .box' type=kotlin.Int origin=null VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:kotlin.Int [val] GET_VAR 'var i: kotlin.Int [var] declared in .box' type=kotlin.Int origin=null diff --git a/compiler/testData/ir/irText/types/nullChecks/explicitEqualsAndCompareToCallsOnPlatformTypeReceiver.fir.txt b/compiler/testData/ir/irText/types/nullChecks/explicitEqualsAndCompareToCallsOnPlatformTypeReceiver.fir.txt index 63b46434e8f..f2665698e8b 100644 --- a/compiler/testData/ir/irText/types/nullChecks/explicitEqualsAndCompareToCallsOnPlatformTypeReceiver.fir.txt +++ b/compiler/testData/ir/irText/types/nullChecks/explicitEqualsAndCompareToCallsOnPlatformTypeReceiver.fir.txt @@ -3,7 +3,7 @@ FILE fqName: fileName:/explicitEqualsAndCompareToCallsOnPlatformTypeReceiv $receiver: VALUE_PARAMETER name: type:.JavaClass BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun testPlatformEqualsPlatform (): kotlin.Boolean declared in ' - CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in kotlin.Double' type=kotlin.Boolean origin=null + CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any' type=kotlin.Boolean origin=null $this: CALL 'public open fun null0 (): kotlin.Double? declared in .JavaClass' type=kotlin.Double? origin=null $this: GET_VAR ': .JavaClass declared in .testPlatformEqualsPlatform' type=.JavaClass origin=null other: CALL 'public open fun null0 (): kotlin.Double? declared in .JavaClass' type=kotlin.Double? origin=null @@ -12,7 +12,7 @@ FILE fqName: fileName:/explicitEqualsAndCompareToCallsOnPlatformTypeReceiv $receiver: VALUE_PARAMETER name: type:.JavaClass BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun testPlatformEqualsKotlin (): kotlin.Boolean declared in ' - CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in kotlin.Double' type=kotlin.Boolean origin=null + CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any' type=kotlin.Boolean origin=null $this: CALL 'public open fun null0 (): kotlin.Double? declared in .JavaClass' type=kotlin.Double? origin=null $this: GET_VAR ': .JavaClass declared in .testPlatformEqualsKotlin' type=.JavaClass origin=null other: CONST Double type=kotlin.Double value=0.0 @@ -20,7 +20,7 @@ FILE fqName: fileName:/explicitEqualsAndCompareToCallsOnPlatformTypeReceiv $receiver: VALUE_PARAMETER name: type:.JavaClass BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun testKotlinEqualsPlatform (): kotlin.Boolean declared in ' - CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in kotlin.Double' type=kotlin.Boolean origin=null + CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any' type=kotlin.Boolean origin=null $this: CONST Double type=kotlin.Double value=0.0 other: CALL 'public open fun null0 (): kotlin.Double? declared in .JavaClass' type=kotlin.Double? origin=null $this: GET_VAR ': .JavaClass declared in .testKotlinEqualsPlatform' type=.JavaClass origin=null diff --git a/compiler/testData/ir/irText/types/nullChecks/platformTypeReceiver.fir.txt b/compiler/testData/ir/irText/types/nullChecks/platformTypeReceiver.fir.txt index a95f15b79e0..54a0a35dedb 100644 --- a/compiler/testData/ir/irText/types/nullChecks/platformTypeReceiver.fir.txt +++ b/compiler/testData/ir/irText/types/nullChecks/platformTypeReceiver.fir.txt @@ -2,12 +2,12 @@ FILE fqName: fileName:/platformTypeReceiver.kt FUN name:test1 visibility:public modality:FINAL <> () returnType:kotlin.Boolean BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun test1 (): kotlin.Boolean declared in ' - CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in kotlin.Boolean' type=kotlin.Boolean origin=null + CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any' type=kotlin.Boolean origin=null $this: GET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:BOOL_NULL type:kotlin.Boolean? visibility:public [static]' type=kotlin.Boolean? origin=GET_PROPERTY other: CONST Null type=kotlin.Nothing? value=null FUN name:test2 visibility:public modality:FINAL <> () returnType:kotlin.Boolean BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun test2 (): kotlin.Boolean declared in ' - CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in kotlin.Boolean' type=kotlin.Boolean origin=null + CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any' type=kotlin.Boolean origin=null $this: CALL 'public open fun boolNull (): kotlin.Boolean? declared in .J' type=kotlin.Boolean? origin=null other: CONST Null type=kotlin.Nothing? value=null diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/classMembers/PublishedApiAnnotationOnInlineClassCosntructor.kt b/compiler/testData/loadJava/compiledKotlin/annotations/classMembers/PublishedApiAnnotationOnInlineClassCosntructor.kt index a3fa3ee3b84..e1adaa1e3ee 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/classMembers/PublishedApiAnnotationOnInlineClassCosntructor.kt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/classMembers/PublishedApiAnnotationOnInlineClassCosntructor.kt @@ -1,6 +1,5 @@ // !LANGUAGE: +InlineClasses // NO_CHECK_SOURCE_VS_BINARY -@file:Suppress("NON_PUBLIC_PRIMARY_CONSTRUCTOR_OF_INLINE_CLASS") package test diff --git a/compiler/tests-common-jvm6/build.gradle.kts b/compiler/tests-common-jvm6/build.gradle.kts index 4b89e017aff..40e91a9afd9 100644 --- a/compiler/tests-common-jvm6/build.gradle.kts +++ b/compiler/tests-common-jvm6/build.gradle.kts @@ -1,4 +1,3 @@ - plugins { kotlin("jvm") id("jps-compatible") @@ -17,3 +16,9 @@ sourceSets { } testsJar {} + +tasks.withType().configureEach { + kotlinOptions { + freeCompilerArgs += "-Xsuppress-deprecated-jvm-target-warning" + } +} diff --git a/compiler/tests-common-new/build.gradle.kts b/compiler/tests-common-new/build.gradle.kts index d7a5f84cec3..eff15908156 100644 --- a/compiler/tests-common-new/build.gradle.kts +++ b/compiler/tests-common-new/build.gradle.kts @@ -17,22 +17,12 @@ dependencies { testImplementation(projectTests(":generators:test-generator")) - testApi(platform("org.junit:junit-bom:5.7.0")) - testApi("org.junit.jupiter:junit-jupiter") - testApi("org.junit.platform:junit-platform-commons:1.7.0") - testApi("org.junit.platform:junit-platform-launcher:1.7.0") + testApiJUnit5() testApi(projectTests(":compiler:test-infrastructure")) testApi(projectTests(":compiler:test-infrastructure-utils")) testApi(projectTests(":compiler:tests-compiler-utils")) + testApi(projectTests(":compiler:tests-common-jvm6")) - testImplementation(intellijDep()) { - // This dependency is needed only for FileComparisonFailure - includeJars("idea_rt", rootProject = rootProject) - isTransitive = false - } - - // This is needed only for using FileComparisonFailure, which relies on JUnit 3 classes - testRuntimeOnly(commonDep("junit:junit")) testRuntimeOnly(intellijDep()) { includeJars( "jps-model", diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/DiagnosticTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/DiagnosticTestGenerated.java index 9944b7b6e2c..32e1253c1d5 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/DiagnosticTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/DiagnosticTestGenerated.java @@ -20,7 +20,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests") @TestDataPath("$PROJECT_ROOT") - public class Tests extends AbstractDiagnosticTest { + public class Tests { @Test @TestMetadata("Abstract.kt") public void testAbstract() throws Exception { @@ -686,6 +686,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { runTest("compiler/testData/diagnostics/tests/SafeCallOnSuperReceiver.kt"); } + @Test + @TestMetadata("SafeCallUnknownType.kt") + public void testSafeCallUnknownType() throws Exception { + runTest("compiler/testData/diagnostics/tests/SafeCallUnknownType.kt"); + } + @Test @TestMetadata("Serializable.kt") public void testSerializable() throws Exception { @@ -905,7 +911,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/annotations") @TestDataPath("$PROJECT_ROOT") - public class Annotations extends AbstractDiagnosticTest { + public class Annotations { @Test public void testAllFilesPresentInAnnotations() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/annotations"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -1376,7 +1382,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/annotations/annotationParameterMustBeConstant") @TestDataPath("$PROJECT_ROOT") - public class AnnotationParameterMustBeConstant extends AbstractDiagnosticTest { + public class AnnotationParameterMustBeConstant { @Test public void testAllFilesPresentInAnnotationParameterMustBeConstant() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/annotations/annotationParameterMustBeConstant"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -1440,7 +1446,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/annotations/functionalTypes") @TestDataPath("$PROJECT_ROOT") - public class FunctionalTypes extends AbstractDiagnosticTest { + public class FunctionalTypes { @Test public void testAllFilesPresentInFunctionalTypes() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/annotations/functionalTypes"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -1474,7 +1480,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/annotations/options") @TestDataPath("$PROJECT_ROOT") - public class Options extends AbstractDiagnosticTest { + public class Options { @Test public void testAllFilesPresentInOptions() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/annotations/options"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -1591,7 +1597,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/annotations/options/targets") @TestDataPath("$PROJECT_ROOT") - public class Targets extends AbstractDiagnosticTest { + public class Targets { @Test @TestMetadata("accessors.kt") public void testAccessors() throws Exception { @@ -1734,7 +1740,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/annotations/rendering") @TestDataPath("$PROJECT_ROOT") - public class Rendering extends AbstractDiagnosticTest { + public class Rendering { @Test public void testAllFilesPresentInRendering() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/annotations/rendering"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -1810,7 +1816,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/annotations/withUseSiteTarget") @TestDataPath("$PROJECT_ROOT") - public class WithUseSiteTarget extends AbstractDiagnosticTest { + public class WithUseSiteTarget { @Test public void testAllFilesPresentInWithUseSiteTarget() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/annotations/withUseSiteTarget"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -1965,7 +1971,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/backingField") @TestDataPath("$PROJECT_ROOT") - public class BackingField extends AbstractDiagnosticTest { + public class BackingField { @Test public void testAllFilesPresentInBackingField() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/backingField"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -2095,7 +2101,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/callableReference") @TestDataPath("$PROJECT_ROOT") - public class CallableReference extends AbstractDiagnosticTest { + public class CallableReference { @Test public void testAllFilesPresentInCallableReference() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/callableReference"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -2386,7 +2392,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/callableReference/bound") @TestDataPath("$PROJECT_ROOT") - public class Bound extends AbstractDiagnosticTest { + public class Bound { @Test public void testAllFilesPresentInBound() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/callableReference/bound"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -2510,7 +2516,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/callableReference/function") @TestDataPath("$PROJECT_ROOT") - public class Function extends AbstractDiagnosticTest { + public class Function { @Test @TestMetadata("abstractClassConstructors.kt") public void testAbstractClassConstructors() throws Exception { @@ -2826,7 +2832,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/callableReference/generic") @TestDataPath("$PROJECT_ROOT") - public class Generic extends AbstractDiagnosticTest { + public class Generic { @Test public void testAllFilesPresentInGeneric() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/callableReference/generic"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -2938,7 +2944,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/callableReference/property") @TestDataPath("$PROJECT_ROOT") - public class Property extends AbstractDiagnosticTest { + public class Property { @Test @TestMetadata("abstractPropertyViaSubclasses.kt") public void testAbstractPropertyViaSubclasses() throws Exception { @@ -3050,7 +3056,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/callableReference/resolve") @TestDataPath("$PROJECT_ROOT") - public class Resolve extends AbstractDiagnosticTest { + public class Resolve { @Test @TestMetadata("adaptedReferenceAgainstKCallable.kt") public void testAdaptedReferenceAgainstKCallable() throws Exception { @@ -3360,7 +3366,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/callableReference/unsupported") @TestDataPath("$PROJECT_ROOT") - public class Unsupported extends AbstractDiagnosticTest { + public class Unsupported { @Test public void testAllFilesPresentInUnsupported() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/callableReference/unsupported"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -3401,7 +3407,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/cast") @TestDataPath("$PROJECT_ROOT") - public class Cast extends AbstractDiagnosticTest { + public class Cast { @Test public void testAllFilesPresentInCast() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/cast"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -3776,7 +3782,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/cast/bare") @TestDataPath("$PROJECT_ROOT") - public class Bare extends AbstractDiagnosticTest { + public class Bare { @Test public void testAllFilesPresentInBare() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/cast/bare"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -3900,7 +3906,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/cast/neverSucceeds") @TestDataPath("$PROJECT_ROOT") - public class NeverSucceeds extends AbstractDiagnosticTest { + public class NeverSucceeds { @Test public void testAllFilesPresentInNeverSucceeds() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/cast/neverSucceeds"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -3941,7 +3947,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/checkArguments") @TestDataPath("$PROJECT_ROOT") - public class CheckArguments extends AbstractDiagnosticTest { + public class CheckArguments { @Test public void testAllFilesPresentInCheckArguments() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/checkArguments"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -4011,7 +4017,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/classLiteral") @TestDataPath("$PROJECT_ROOT") - public class ClassLiteral extends AbstractDiagnosticTest { + public class ClassLiteral { @Test public void testAllFilesPresentInClassLiteral() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/classLiteral"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -4111,7 +4117,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/classObjects") @TestDataPath("$PROJECT_ROOT") - public class ClassObjects extends AbstractDiagnosticTest { + public class ClassObjects { @Test public void testAllFilesPresentInClassObjects() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/classObjects"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -4247,7 +4253,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/collectionLiterals") @TestDataPath("$PROJECT_ROOT") - public class CollectionLiterals extends AbstractDiagnosticTest { + public class CollectionLiterals { @Test public void testAllFilesPresentInCollectionLiterals() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/collectionLiterals"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -4323,7 +4329,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/constructorConsistency") @TestDataPath("$PROJECT_ROOT") - public class ConstructorConsistency extends AbstractDiagnosticTest { + public class ConstructorConsistency { @Test @TestMetadata("afterInitialization.kt") public void testAfterInitialization() throws Exception { @@ -4489,7 +4495,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis") @TestDataPath("$PROJECT_ROOT") - public class ControlFlowAnalysis extends AbstractDiagnosticTest { + public class ControlFlowAnalysis { @Test public void testAllFilesPresentInControlFlowAnalysis() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/controlFlowAnalysis"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -5014,7 +5020,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode") @TestDataPath("$PROJECT_ROOT") - public class DeadCode extends AbstractDiagnosticTest { + public class DeadCode { @Test public void testAllFilesPresentInDeadCode() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -5174,7 +5180,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/definiteReturn") @TestDataPath("$PROJECT_ROOT") - public class DefiniteReturn extends AbstractDiagnosticTest { + public class DefiniteReturn { @Test public void testAllFilesPresentInDefiniteReturn() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/controlFlowAnalysis/definiteReturn"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -5208,7 +5214,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/unnecessaryLateinit") @TestDataPath("$PROJECT_ROOT") - public class UnnecessaryLateinit extends AbstractDiagnosticTest { + public class UnnecessaryLateinit { @Test public void testAllFilesPresentInUnnecessaryLateinit() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/controlFlowAnalysis/unnecessaryLateinit"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -5291,7 +5297,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/controlStructures") @TestDataPath("$PROJECT_ROOT") - public class ControlStructures extends AbstractDiagnosticTest { + public class ControlStructures { @Test public void testAllFilesPresentInControlStructures() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/controlStructures"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -5565,7 +5571,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/coroutines") @TestDataPath("$PROJECT_ROOT") - public class Coroutines extends AbstractDiagnosticTest { + public class Coroutines { @Test public void testAllFilesPresentInCoroutines() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/coroutines"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -5586,7 +5592,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/coroutines/callableReference") @TestDataPath("$PROJECT_ROOT") - public class CallableReference extends AbstractDiagnosticTest { + public class CallableReference { @Test public void testAllFilesPresentInCallableReference() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/coroutines/callableReference"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -5609,7 +5615,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/cyclicHierarchy") @TestDataPath("$PROJECT_ROOT") - public class CyclicHierarchy extends AbstractDiagnosticTest { + public class CyclicHierarchy { @Test public void testAllFilesPresentInCyclicHierarchy() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/cyclicHierarchy"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -5708,7 +5714,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/cyclicHierarchy/withCompanion") @TestDataPath("$PROJECT_ROOT") - public class WithCompanion extends AbstractDiagnosticTest { + public class WithCompanion { @Test public void testAllFilesPresentInWithCompanion() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/cyclicHierarchy/withCompanion"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -5791,7 +5797,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/dataClasses") @TestDataPath("$PROJECT_ROOT") - public class DataClasses extends AbstractDiagnosticTest { + public class DataClasses { @Test public void testAllFilesPresentInDataClasses() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/dataClasses"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -5993,7 +5999,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/dataFlow") @TestDataPath("$PROJECT_ROOT") - public class DataFlow extends AbstractDiagnosticTest { + public class DataFlow { @Test public void testAllFilesPresentInDataFlow() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/dataFlow"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -6026,7 +6032,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/dataFlow/assignment") @TestDataPath("$PROJECT_ROOT") - public class Assignment extends AbstractDiagnosticTest { + public class Assignment { @Test public void testAllFilesPresentInAssignment() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/dataFlow/assignment"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -6066,7 +6072,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/dataFlow/local") @TestDataPath("$PROJECT_ROOT") - public class Local extends AbstractDiagnosticTest { + public class Local { @Test public void testAllFilesPresentInLocal() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/dataFlow/local"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -6149,7 +6155,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal") @TestDataPath("$PROJECT_ROOT") - public class DataFlowInfoTraversal extends AbstractDiagnosticTest { + public class DataFlowInfoTraversal { @Test public void testAllFilesPresentInDataFlowInfoTraversal() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/dataFlowInfoTraversal"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -6470,7 +6476,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/smartcasts") @TestDataPath("$PROJECT_ROOT") - public class Smartcasts extends AbstractDiagnosticTest { + public class Smartcasts { @Test public void testAllFilesPresentInSmartcasts() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/smartcasts"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -6493,7 +6499,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/declarationChecks") @TestDataPath("$PROJECT_ROOT") - public class DeclarationChecks extends AbstractDiagnosticTest { + public class DeclarationChecks { @Test public void testAllFilesPresentInDeclarationChecks() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/declarationChecks"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -6712,7 +6718,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations") @TestDataPath("$PROJECT_ROOT") - public class DestructuringDeclarations extends AbstractDiagnosticTest { + public class DestructuringDeclarations { @Test public void testAllFilesPresentInDestructuringDeclarations() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -6806,7 +6812,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/declarationChecks/finiteBoundRestriction") @TestDataPath("$PROJECT_ROOT") - public class FiniteBoundRestriction extends AbstractDiagnosticTest { + public class FiniteBoundRestriction { @Test public void testAllFilesPresentInFiniteBoundRestriction() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/declarationChecks/finiteBoundRestriction"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -6834,7 +6840,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/declarationChecks/nonExpansiveInheritanceRestriction") @TestDataPath("$PROJECT_ROOT") - public class NonExpansiveInheritanceRestriction extends AbstractDiagnosticTest { + public class NonExpansiveInheritanceRestriction { @Test public void testAllFilesPresentInNonExpansiveInheritanceRestriction() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/declarationChecks/nonExpansiveInheritanceRestriction"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -6863,7 +6869,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/defaultArguments") @TestDataPath("$PROJECT_ROOT") - public class DefaultArguments extends AbstractDiagnosticTest { + public class DefaultArguments { @Test public void testAllFilesPresentInDefaultArguments() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/defaultArguments"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -6885,7 +6891,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/delegatedProperty") @TestDataPath("$PROJECT_ROOT") - public class DelegatedProperty extends AbstractDiagnosticTest { + public class DelegatedProperty { @Test @TestMetadata("absentErrorAboutInitializer.kt") public void testAbsentErrorAboutInitializer() throws Exception { @@ -7122,7 +7128,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/delegatedProperty/inference") @TestDataPath("$PROJECT_ROOT") - public class Inference extends AbstractDiagnosticTest { + public class Inference { @Test public void testAllFilesPresentInInference() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/delegatedProperty/inference"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -7234,7 +7240,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate") @TestDataPath("$PROJECT_ROOT") - public class ProvideDelegate extends AbstractDiagnosticTest { + public class ProvideDelegate { @Test public void testAllFilesPresentInProvideDelegate() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -7347,7 +7353,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/delegation") @TestDataPath("$PROJECT_ROOT") - public class Delegation extends AbstractDiagnosticTest { + public class Delegation { @Test public void testAllFilesPresentInDelegation() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/delegation"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -7416,7 +7422,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/delegation/clashes") @TestDataPath("$PROJECT_ROOT") - public class Clashes extends AbstractDiagnosticTest { + public class Clashes { @Test public void testAllFilesPresentInClashes() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/delegation/clashes"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -7450,7 +7456,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/delegation/covariantOverrides") @TestDataPath("$PROJECT_ROOT") - public class CovariantOverrides extends AbstractDiagnosticTest { + public class CovariantOverrides { @Test public void testAllFilesPresentInCovariantOverrides() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/delegation/covariantOverrides"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -7484,7 +7490,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/delegation/memberHidesSupertypeOverride") @TestDataPath("$PROJECT_ROOT") - public class MemberHidesSupertypeOverride extends AbstractDiagnosticTest { + public class MemberHidesSupertypeOverride { @Test @TestMetadata("abstractOverride.kt") public void testAbstractOverride() throws Exception { @@ -7585,7 +7591,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/deparenthesize") @TestDataPath("$PROJECT_ROOT") - public class Deparenthesize extends AbstractDiagnosticTest { + public class Deparenthesize { @Test public void testAllFilesPresentInDeparenthesize() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/deparenthesize"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -7631,7 +7637,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/deprecated") @TestDataPath("$PROJECT_ROOT") - public class Deprecated extends AbstractDiagnosticTest { + public class Deprecated { @Test public void testAllFilesPresentInDeprecated() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/deprecated"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -7838,7 +7844,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/deprecated/deprecatedSinceKotlin") @TestDataPath("$PROJECT_ROOT") - public class DeprecatedSinceKotlin extends AbstractDiagnosticTest { + public class DeprecatedSinceKotlin { @Test public void testAllFilesPresentInDeprecatedSinceKotlin() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/deprecated/deprecatedSinceKotlin"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -7903,7 +7909,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature") @TestDataPath("$PROJECT_ROOT") - public class DuplicateJvmSignature extends AbstractDiagnosticTest { + public class DuplicateJvmSignature { @Test public void testAllFilesPresentInDuplicateJvmSignature() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/duplicateJvmSignature"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -7930,7 +7936,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/accidentalOverrides") @TestDataPath("$PROJECT_ROOT") - public class AccidentalOverrides extends AbstractDiagnosticTest { + public class AccidentalOverrides { @Test @TestMetadata("accidentalOverrideFromGrandparent.kt") public void testAccidentalOverrideFromGrandparent() throws Exception { @@ -8030,7 +8036,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/bridges") @TestDataPath("$PROJECT_ROOT") - public class Bridges extends AbstractDiagnosticTest { + public class Bridges { @Test public void testAllFilesPresentInBridges() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/duplicateJvmSignature/bridges"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -8058,7 +8064,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/erasure") @TestDataPath("$PROJECT_ROOT") - public class Erasure extends AbstractDiagnosticTest { + public class Erasure { @Test public void testAllFilesPresentInErasure() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/duplicateJvmSignature/erasure"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -8170,7 +8176,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/finalMembersFromBuiltIns") @TestDataPath("$PROJECT_ROOT") - public class FinalMembersFromBuiltIns extends AbstractDiagnosticTest { + public class FinalMembersFromBuiltIns { @Test public void testAllFilesPresentInFinalMembersFromBuiltIns() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/duplicateJvmSignature/finalMembersFromBuiltIns"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -8192,7 +8198,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/functionAndProperty") @TestDataPath("$PROJECT_ROOT") - public class FunctionAndProperty extends AbstractDiagnosticTest { + public class FunctionAndProperty { @Test public void testAllFilesPresentInFunctionAndProperty() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/duplicateJvmSignature/functionAndProperty"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -8316,7 +8322,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/specialNames") @TestDataPath("$PROJECT_ROOT") - public class SpecialNames extends AbstractDiagnosticTest { + public class SpecialNames { @Test public void testAllFilesPresentInSpecialNames() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/duplicateJvmSignature/specialNames"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -8380,7 +8386,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/statics") @TestDataPath("$PROJECT_ROOT") - public class Statics extends AbstractDiagnosticTest { + public class Statics { @Test public void testAllFilesPresentInStatics() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/duplicateJvmSignature/statics"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -8426,7 +8432,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/synthesized") @TestDataPath("$PROJECT_ROOT") - public class Synthesized extends AbstractDiagnosticTest { + public class Synthesized { @Test public void testAllFilesPresentInSynthesized() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/duplicateJvmSignature/synthesized"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -8442,7 +8448,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/traitImpl") @TestDataPath("$PROJECT_ROOT") - public class TraitImpl extends AbstractDiagnosticTest { + public class TraitImpl { @Test public void testAllFilesPresentInTraitImpl() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/duplicateJvmSignature/traitImpl"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -8477,7 +8483,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/dynamicTypes") @TestDataPath("$PROJECT_ROOT") - public class DynamicTypes extends AbstractDiagnosticTest { + public class DynamicTypes { @Test public void testAllFilesPresentInDynamicTypes() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/dynamicTypes"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -8505,7 +8511,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/enum") @TestDataPath("$PROJECT_ROOT") - public class Enum extends AbstractDiagnosticTest { + public class Enum { @Test @TestMetadata("AbstractEnum.kt") public void testAbstractEnum() throws Exception { @@ -8874,7 +8880,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/enum/inner") @TestDataPath("$PROJECT_ROOT") - public class Inner extends AbstractDiagnosticTest { + public class Inner { @Test public void testAllFilesPresentInInner() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/enum/inner"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -8957,7 +8963,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/evaluate") @TestDataPath("$PROJECT_ROOT") - public class Evaluate extends AbstractDiagnosticTest { + public class Evaluate { @Test public void testAllFilesPresentInEvaluate() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/evaluate"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -9104,7 +9110,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/evaluate/inlineClasses") @TestDataPath("$PROJECT_ROOT") - public class InlineClasses extends AbstractDiagnosticTest { + public class InlineClasses { @Test public void testAllFilesPresentInInlineClasses() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/evaluate/inlineClasses"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -9121,7 +9127,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/exceptions") @TestDataPath("$PROJECT_ROOT") - public class Exceptions extends AbstractDiagnosticTest { + public class Exceptions { @Test public void testAllFilesPresentInExceptions() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/exceptions"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -9137,7 +9143,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/exposed") @TestDataPath("$PROJECT_ROOT") - public class Exposed extends AbstractDiagnosticTest { + public class Exposed { @Test public void testAllFilesPresentInExposed() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/exposed"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -9315,7 +9321,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/extensions") @TestDataPath("$PROJECT_ROOT") - public class Extensions extends AbstractDiagnosticTest { + public class Extensions { @Test public void testAllFilesPresentInExtensions() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/extensions"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -9427,7 +9433,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/funInterface") @TestDataPath("$PROJECT_ROOT") - public class FunInterface extends AbstractDiagnosticTest { + public class FunInterface { @Test public void testAllFilesPresentInFunInterface() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/funInterface"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -9521,7 +9527,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/functionAsExpression") @TestDataPath("$PROJECT_ROOT") - public class FunctionAsExpression extends AbstractDiagnosticTest { + public class FunctionAsExpression { @Test public void testAllFilesPresentInFunctionAsExpression() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/functionAsExpression"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -9633,7 +9639,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/functionLiterals") @TestDataPath("$PROJECT_ROOT") - public class FunctionLiterals extends AbstractDiagnosticTest { + public class FunctionLiterals { @Test public void testAllFilesPresentInFunctionLiterals() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/functionLiterals"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -9822,7 +9828,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas") @TestDataPath("$PROJECT_ROOT") - public class DestructuringInLambdas extends AbstractDiagnosticTest { + public class DestructuringInLambdas { @Test public void testAllFilesPresentInDestructuringInLambdas() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -9898,7 +9904,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/functionLiterals/return") @TestDataPath("$PROJECT_ROOT") - public class Return extends AbstractDiagnosticTest { + public class Return { @Test public void testAllFilesPresentInReturn() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/functionLiterals/return"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -10070,7 +10076,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/functionLiterals/suspend") @TestDataPath("$PROJECT_ROOT") - public class Suspend extends AbstractDiagnosticTest { + public class Suspend { @Test public void testAllFilesPresentInSuspend() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/functionLiterals/suspend"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -10093,7 +10099,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/generics") @TestDataPath("$PROJECT_ROOT") - public class Generics extends AbstractDiagnosticTest { + public class Generics { @Test public void testAllFilesPresentInGenerics() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/generics"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -10306,7 +10312,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/generics/capturedParameters") @TestDataPath("$PROJECT_ROOT") - public class CapturedParameters extends AbstractDiagnosticTest { + public class CapturedParameters { @Test public void testAllFilesPresentInCapturedParameters() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/generics/capturedParameters"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -10352,7 +10358,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/generics/cyclicBounds") @TestDataPath("$PROJECT_ROOT") - public class CyclicBounds extends AbstractDiagnosticTest { + public class CyclicBounds { @Test public void testAllFilesPresentInCyclicBounds() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/generics/cyclicBounds"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -10374,7 +10380,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/generics/innerClasses") @TestDataPath("$PROJECT_ROOT") - public class InnerClasses extends AbstractDiagnosticTest { + public class InnerClasses { @Test public void testAllFilesPresentInInnerClasses() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/generics/innerClasses"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -10527,7 +10533,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/generics/innerClasses/implicitArguments") @TestDataPath("$PROJECT_ROOT") - public class ImplicitArguments extends AbstractDiagnosticTest { + public class ImplicitArguments { @Test public void testAllFilesPresentInImplicitArguments() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/generics/innerClasses/implicitArguments"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -10592,7 +10598,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/generics/multipleBoundsMemberScope") @TestDataPath("$PROJECT_ROOT") - public class MultipleBoundsMemberScope extends AbstractDiagnosticTest { + public class MultipleBoundsMemberScope { @Test public void testAllFilesPresentInMultipleBoundsMemberScope() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/generics/multipleBoundsMemberScope"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -10644,7 +10650,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/generics/nullability") @TestDataPath("$PROJECT_ROOT") - public class Nullability extends AbstractDiagnosticTest { + public class Nullability { @Test public void testAllFilesPresentInNullability() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/generics/nullability"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -10768,7 +10774,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/generics/projectionsScope") @TestDataPath("$PROJECT_ROOT") - public class ProjectionsScope extends AbstractDiagnosticTest { + public class ProjectionsScope { @Test @TestMetadata("addAll.kt") public void testAddAll() throws Exception { @@ -10952,7 +10958,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/generics/starProjections") @TestDataPath("$PROJECT_ROOT") - public class StarProjections extends AbstractDiagnosticTest { + public class StarProjections { @Test public void testAllFilesPresentInStarProjections() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/generics/starProjections"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -10998,7 +11004,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/generics/tpAsReified") @TestDataPath("$PROJECT_ROOT") - public class TpAsReified extends AbstractDiagnosticTest { + public class TpAsReified { @Test public void testAllFilesPresentInTpAsReified() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/generics/tpAsReified"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -11092,7 +11098,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/generics/varProjection") @TestDataPath("$PROJECT_ROOT") - public class VarProjection extends AbstractDiagnosticTest { + public class VarProjection { @Test public void testAllFilesPresentInVarProjection() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/generics/varProjection"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -11127,7 +11133,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/imports") @TestDataPath("$PROJECT_ROOT") - public class Imports extends AbstractDiagnosticTest { + public class Imports { @Test public void testAllFilesPresentInImports() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/imports"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -11473,7 +11479,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/incompleteCode") @TestDataPath("$PROJECT_ROOT") - public class IncompleteCode extends AbstractDiagnosticTest { + public class IncompleteCode { @Test public void testAllFilesPresentInIncompleteCode() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/incompleteCode"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -11602,7 +11608,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError") @TestDataPath("$PROJECT_ROOT") - public class DiagnosticWithSyntaxError extends AbstractDiagnosticTest { + public class DiagnosticWithSyntaxError { @Test public void testAllFilesPresentInDiagnosticWithSyntaxError() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -11721,7 +11727,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/inference") @TestDataPath("$PROJECT_ROOT") - public class Inference extends AbstractDiagnosticTest { + public class Inference { @Test public void testAllFilesPresentInInference() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/inference"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -12294,7 +12300,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/inference/builderInference") @TestDataPath("$PROJECT_ROOT") - public class BuilderInference extends AbstractDiagnosticTest { + public class BuilderInference { @Test public void testAllFilesPresentInBuilderInference() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/inference/builderInference"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -12352,7 +12358,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/inference/capturedTypes") @TestDataPath("$PROJECT_ROOT") - public class CapturedTypes extends AbstractDiagnosticTest { + public class CapturedTypes { @Test public void testAllFilesPresentInCapturedTypes() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/inference/capturedTypes"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -12560,7 +12566,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/inference/coercionToUnit") @TestDataPath("$PROJECT_ROOT") - public class CoercionToUnit extends AbstractDiagnosticTest { + public class CoercionToUnit { @Test public void testAllFilesPresentInCoercionToUnit() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/inference/coercionToUnit"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -12654,7 +12660,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/inference/commonSystem") @TestDataPath("$PROJECT_ROOT") - public class CommonSystem extends AbstractDiagnosticTest { + public class CommonSystem { @Test public void testAllFilesPresentInCommonSystem() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/inference/commonSystem"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -12826,7 +12832,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/inference/completion") @TestDataPath("$PROJECT_ROOT") - public class Completion extends AbstractDiagnosticTest { + public class Completion { @Test public void testAllFilesPresentInCompletion() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/inference/completion"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -12925,7 +12931,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/inference/completion/postponedArgumentsAnalysis") @TestDataPath("$PROJECT_ROOT") - public class PostponedArgumentsAnalysis extends AbstractDiagnosticTest { + public class PostponedArgumentsAnalysis { @Test public void testAllFilesPresentInPostponedArgumentsAnalysis() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/inference/completion/postponedArgumentsAnalysis"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -12996,7 +13002,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/inference/constraints") @TestDataPath("$PROJECT_ROOT") - public class Constraints extends AbstractDiagnosticTest { + public class Constraints { @Test public void testAllFilesPresentInConstraints() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/inference/constraints"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -13168,7 +13174,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/inference/nestedCalls") @TestDataPath("$PROJECT_ROOT") - public class NestedCalls extends AbstractDiagnosticTest { + public class NestedCalls { @Test public void testAllFilesPresentInNestedCalls() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/inference/nestedCalls"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -13262,7 +13268,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/inference/nothingType") @TestDataPath("$PROJECT_ROOT") - public class NothingType extends AbstractDiagnosticTest { + public class NothingType { @Test public void testAllFilesPresentInNothingType() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/inference/nothingType"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -13416,7 +13422,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/inference/publicApproximation") @TestDataPath("$PROJECT_ROOT") - public class PublicApproximation extends AbstractDiagnosticTest { + public class PublicApproximation { @Test public void testAllFilesPresentInPublicApproximation() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/inference/publicApproximation"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -13504,7 +13510,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/inference/recursiveCalls") @TestDataPath("$PROJECT_ROOT") - public class RecursiveCalls extends AbstractDiagnosticTest { + public class RecursiveCalls { @Test public void testAllFilesPresentInRecursiveCalls() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/inference/recursiveCalls"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -13520,7 +13526,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/inference/recursiveLocalFuns") @TestDataPath("$PROJECT_ROOT") - public class RecursiveLocalFuns extends AbstractDiagnosticTest { + public class RecursiveLocalFuns { @Test public void testAllFilesPresentInRecursiveLocalFuns() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/inference/recursiveLocalFuns"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -13554,7 +13560,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/inference/recursiveTypes") @TestDataPath("$PROJECT_ROOT") - public class RecursiveTypes extends AbstractDiagnosticTest { + public class RecursiveTypes { @Test public void testAllFilesPresentInRecursiveTypes() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/inference/recursiveTypes"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -13636,7 +13642,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/inference/regressions") @TestDataPath("$PROJECT_ROOT") - public class Regressions extends AbstractDiagnosticTest { + public class Regressions { @Test public void testAllFilesPresentInRegressions() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/inference/regressions"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -14078,7 +14084,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/inference/reportingImprovements") @TestDataPath("$PROJECT_ROOT") - public class ReportingImprovements extends AbstractDiagnosticTest { + public class ReportingImprovements { @Test public void testAllFilesPresentInReportingImprovements() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/inference/reportingImprovements"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -14160,7 +14166,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/inference/substitutions") @TestDataPath("$PROJECT_ROOT") - public class Substitutions extends AbstractDiagnosticTest { + public class Substitutions { @Test public void testAllFilesPresentInSubstitutions() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/inference/substitutions"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -14218,7 +14224,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/inference/upperBounds") @TestDataPath("$PROJECT_ROOT") - public class UpperBounds extends AbstractDiagnosticTest { + public class UpperBounds { @Test public void testAllFilesPresentInUpperBounds() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/inference/upperBounds"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -14295,7 +14301,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/infos") @TestDataPath("$PROJECT_ROOT") - public class Infos extends AbstractDiagnosticTest { + public class Infos { @Test public void testAllFilesPresentInInfos() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/infos"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -14317,7 +14323,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/inline") @TestDataPath("$PROJECT_ROOT") - public class Inline extends AbstractDiagnosticTest { + public class Inline { @Test public void testAllFilesPresentInInline() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/inline"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -14596,7 +14602,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/inline/binaryExpressions") @TestDataPath("$PROJECT_ROOT") - public class BinaryExpressions extends AbstractDiagnosticTest { + public class BinaryExpressions { @Test public void testAllFilesPresentInBinaryExpressions() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/inline/binaryExpressions"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -14654,7 +14660,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/inline/nonLocalReturns") @TestDataPath("$PROJECT_ROOT") - public class NonLocalReturns extends AbstractDiagnosticTest { + public class NonLocalReturns { @Test public void testAllFilesPresentInNonLocalReturns() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/inline/nonLocalReturns"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -14772,7 +14778,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/inline/nonPublicMember") @TestDataPath("$PROJECT_ROOT") - public class NonPublicMember extends AbstractDiagnosticTest { + public class NonPublicMember { @Test public void testAllFilesPresentInNonPublicMember() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/inline/nonPublicMember"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -14836,7 +14842,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/inline/property") @TestDataPath("$PROJECT_ROOT") - public class Property extends AbstractDiagnosticTest { + public class Property { @Test public void testAllFilesPresentInProperty() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/inline/property"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -14870,7 +14876,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/inline/regressions") @TestDataPath("$PROJECT_ROOT") - public class Regressions extends AbstractDiagnosticTest { + public class Regressions { @Test public void testAllFilesPresentInRegressions() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/inline/regressions"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -14886,7 +14892,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/inline/unaryExpressions") @TestDataPath("$PROJECT_ROOT") - public class UnaryExpressions extends AbstractDiagnosticTest { + public class UnaryExpressions { @Test public void testAllFilesPresentInUnaryExpressions() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/inline/unaryExpressions"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -14915,7 +14921,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/inlineClasses") @TestDataPath("$PROJECT_ROOT") - public class InlineClasses extends AbstractDiagnosticTest { + public class InlineClasses { @Test public void testAllFilesPresentInInlineClasses() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/inlineClasses"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -15075,7 +15081,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/inner") @TestDataPath("$PROJECT_ROOT") - public class Inner extends AbstractDiagnosticTest { + public class Inner { @Test @TestMetadata("accessingToJavaNestedClass.kt") public void testAccessingToJavaNestedClass() throws Exception { @@ -15360,7 +15366,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/inner/qualifiedExpression") @TestDataPath("$PROJECT_ROOT") - public class QualifiedExpression extends AbstractDiagnosticTest { + public class QualifiedExpression { @Test public void testAllFilesPresentInQualifiedExpression() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/inner/qualifiedExpression"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -15431,7 +15437,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/j+k") @TestDataPath("$PROJECT_ROOT") - public class J_k extends AbstractDiagnosticTest { + public class J_k { @Test @TestMetadata("accessClassObjectFromJava.kt") public void testAccessClassObjectFromJava() throws Exception { @@ -15881,6 +15887,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { runTest("compiler/testData/diagnostics/tests/j+k/SupertypeArgumentsNullability-UserTypes.kt"); } + @Test + @TestMetadata("supertypeUsesNested.kt") + public void testSupertypeUsesNested() throws Exception { + runTest("compiler/testData/diagnostics/tests/j+k/supertypeUsesNested.kt"); + } + @Test @TestMetadata("traitDefaultCall.kt") public void testTraitDefaultCall() throws Exception { @@ -15908,7 +15920,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/j+k/brokenCode") @TestDataPath("$PROJECT_ROOT") - public class BrokenCode extends AbstractDiagnosticTest { + public class BrokenCode { @Test public void testAllFilesPresentInBrokenCode() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/j+k/brokenCode"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -15930,7 +15942,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/j+k/collectionOverrides") @TestDataPath("$PROJECT_ROOT") - public class CollectionOverrides extends AbstractDiagnosticTest { + public class CollectionOverrides { @Test public void testAllFilesPresentInCollectionOverrides() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/j+k/collectionOverrides"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -16048,7 +16060,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/j+k/deprecations") @TestDataPath("$PROJECT_ROOT") - public class Deprecations extends AbstractDiagnosticTest { + public class Deprecations { @Test public void testAllFilesPresentInDeprecations() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/j+k/deprecations"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -16076,7 +16088,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/j+k/genericConstructor") @TestDataPath("$PROJECT_ROOT") - public class GenericConstructor extends AbstractDiagnosticTest { + public class GenericConstructor { @Test public void testAllFilesPresentInGenericConstructor() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/j+k/genericConstructor"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -16140,7 +16152,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/j+k/polymorphicSignature") @TestDataPath("$PROJECT_ROOT") - public class PolymorphicSignature extends AbstractDiagnosticTest { + public class PolymorphicSignature { @Test public void testAllFilesPresentInPolymorphicSignature() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/j+k/polymorphicSignature"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -16162,7 +16174,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/j+k/primitiveOverrides") @TestDataPath("$PROJECT_ROOT") - public class PrimitiveOverrides extends AbstractDiagnosticTest { + public class PrimitiveOverrides { @Test public void testAllFilesPresentInPrimitiveOverrides() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/j+k/primitiveOverrides"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -16190,7 +16202,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/j+k/primitiveOverridesWithInlineClass") @TestDataPath("$PROJECT_ROOT") - public class PrimitiveOverridesWithInlineClass extends AbstractDiagnosticTest { + public class PrimitiveOverridesWithInlineClass { @Test public void testAllFilesPresentInPrimitiveOverridesWithInlineClass() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/j+k/primitiveOverridesWithInlineClass"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -16206,7 +16218,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/j+k/properties") @TestDataPath("$PROJECT_ROOT") - public class Properties extends AbstractDiagnosticTest { + public class Properties { @Test public void testAllFilesPresentInProperties() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/j+k/properties"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -16264,7 +16276,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/j+k/sam") @TestDataPath("$PROJECT_ROOT") - public class Sam extends AbstractDiagnosticTest { + public class Sam { @Test public void testAllFilesPresentInSam() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/j+k/sam"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -16370,7 +16382,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/j+k/samByProjectedType") @TestDataPath("$PROJECT_ROOT") - public class SamByProjectedType extends AbstractDiagnosticTest { + public class SamByProjectedType { @Test public void testAllFilesPresentInSamByProjectedType() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/j+k/samByProjectedType"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -16410,7 +16422,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/j+k/signatureAnnotations") @TestDataPath("$PROJECT_ROOT") - public class SignatureAnnotations extends AbstractDiagnosticTest { + public class SignatureAnnotations { @Test public void testAllFilesPresentInSignatureAnnotations() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/j+k/signatureAnnotations"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -16510,7 +16522,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/j+k/specialBuiltIns") @TestDataPath("$PROJECT_ROOT") - public class SpecialBuiltIns extends AbstractDiagnosticTest { + public class SpecialBuiltIns { @Test public void testAllFilesPresentInSpecialBuiltIns() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/j+k/specialBuiltIns"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -16532,7 +16544,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/j+k/types") @TestDataPath("$PROJECT_ROOT") - public class Types extends AbstractDiagnosticTest { + public class Types { @Test public void testAllFilesPresentInTypes() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/j+k/types"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -16585,7 +16597,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/java8Overrides") @TestDataPath("$PROJECT_ROOT") - public class Java8Overrides extends AbstractDiagnosticTest { + public class Java8Overrides { @Test @TestMetadata("abstractBaseClassMemberNotImplemented.kt") public void testAbstractBaseClassMemberNotImplemented() throws Exception { @@ -16649,7 +16661,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/javac") @TestDataPath("$PROJECT_ROOT") - public class Javac extends AbstractDiagnosticTest { + public class Javac { @Test public void testAllFilesPresentInJavac() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/javac"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -16664,7 +16676,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/javac/fieldsResolution") @TestDataPath("$PROJECT_ROOT") - public class FieldsResolution extends AbstractDiagnosticTest { + public class FieldsResolution { @Test public void testAllFilesPresentInFieldsResolution() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/javac/fieldsResolution"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -16746,7 +16758,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/javac/imports") @TestDataPath("$PROJECT_ROOT") - public class Imports extends AbstractDiagnosticTest { + public class Imports { @Test public void testAllFilesPresentInImports() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/javac/imports"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -16858,7 +16870,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/javac/inheritance") @TestDataPath("$PROJECT_ROOT") - public class Inheritance extends AbstractDiagnosticTest { + public class Inheritance { @Test public void testAllFilesPresentInInheritance() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/javac/inheritance"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -16970,7 +16982,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/javac/inners") @TestDataPath("$PROJECT_ROOT") - public class Inners extends AbstractDiagnosticTest { + public class Inners { @Test public void testAllFilesPresentInInners() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/javac/inners"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -17022,7 +17034,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/javac/qualifiedExpression") @TestDataPath("$PROJECT_ROOT") - public class QualifiedExpression extends AbstractDiagnosticTest { + public class QualifiedExpression { @Test public void testAllFilesPresentInQualifiedExpression() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/javac/qualifiedExpression"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -17062,7 +17074,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/javac/typeParameters") @TestDataPath("$PROJECT_ROOT") - public class TypeParameters extends AbstractDiagnosticTest { + public class TypeParameters { @Test public void testAllFilesPresentInTypeParameters() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/javac/typeParameters"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -17115,7 +17127,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/labels") @TestDataPath("$PROJECT_ROOT") - public class Labels extends AbstractDiagnosticTest { + public class Labels { @Test public void testAllFilesPresentInLabels() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/labels"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -17197,7 +17209,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/lateinit") @TestDataPath("$PROJECT_ROOT") - public class Lateinit extends AbstractDiagnosticTest { + public class Lateinit { @Test public void testAllFilesPresentInLateinit() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/lateinit"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -17224,7 +17236,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/lateinit/local") @TestDataPath("$PROJECT_ROOT") - public class Local extends AbstractDiagnosticTest { + public class Local { @Test public void testAllFilesPresentInLocal() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/lateinit/local"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -17253,7 +17265,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/library") @TestDataPath("$PROJECT_ROOT") - public class Library extends AbstractDiagnosticTest { + public class Library { @Test public void testAllFilesPresentInLibrary() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/library"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -17275,7 +17287,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/localClasses") @TestDataPath("$PROJECT_ROOT") - public class LocalClasses extends AbstractDiagnosticTest { + public class LocalClasses { @Test public void testAllFilesPresentInLocalClasses() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/localClasses"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -17297,7 +17309,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/modifiers") @TestDataPath("$PROJECT_ROOT") - public class Modifiers extends AbstractDiagnosticTest { + public class Modifiers { @Test public void testAllFilesPresentInModifiers() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/modifiers"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -17402,7 +17414,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/modifiers/const") @TestDataPath("$PROJECT_ROOT") - public class Const extends AbstractDiagnosticTest { + public class Const { @Test public void testAllFilesPresentInConst() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/modifiers/const"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -17466,7 +17478,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/modifiers/operatorInfix") @TestDataPath("$PROJECT_ROOT") - public class OperatorInfix extends AbstractDiagnosticTest { + public class OperatorInfix { @Test public void testAllFilesPresentInOperatorInfix() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/modifiers/operatorInfix"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -17495,7 +17507,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/multimodule") @TestDataPath("$PROJECT_ROOT") - public class Multimodule extends AbstractDiagnosticTest { + public class Multimodule { @Test public void testAllFilesPresentInMultimodule() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/multimodule"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -17540,7 +17552,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/multimodule/duplicateClass") @TestDataPath("$PROJECT_ROOT") - public class DuplicateClass extends AbstractDiagnosticTest { + public class DuplicateClass { @Test public void testAllFilesPresentInDuplicateClass() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/multimodule/duplicateClass"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -17628,7 +17640,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/multimodule/duplicateMethod") @TestDataPath("$PROJECT_ROOT") - public class DuplicateMethod extends AbstractDiagnosticTest { + public class DuplicateMethod { @Test public void testAllFilesPresentInDuplicateMethod() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/multimodule/duplicateMethod"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -17788,7 +17800,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/multimodule/duplicateSuper") @TestDataPath("$PROJECT_ROOT") - public class DuplicateSuper extends AbstractDiagnosticTest { + public class DuplicateSuper { @Test public void testAllFilesPresentInDuplicateSuper() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/multimodule/duplicateSuper"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -17822,7 +17834,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/multimodule/hiddenClass") @TestDataPath("$PROJECT_ROOT") - public class HiddenClass extends AbstractDiagnosticTest { + public class HiddenClass { @Test public void testAllFilesPresentInHiddenClass() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/multimodule/hiddenClass"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -17857,7 +17869,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/multiplatform") @TestDataPath("$PROJECT_ROOT") - public class Multiplatform extends AbstractDiagnosticTest { + public class Multiplatform { @Test public void testAllFilesPresentInMultiplatform() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/multiplatform"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -17932,7 +17944,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/multiplatform/defaultArguments") @TestDataPath("$PROJECT_ROOT") - public class DefaultArguments extends AbstractDiagnosticTest { + public class DefaultArguments { @Test public void testAllFilesPresentInDefaultArguments() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/multiplatform/defaultArguments"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -17990,7 +18002,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/multiplatform/deprecated") @TestDataPath("$PROJECT_ROOT") - public class Deprecated extends AbstractDiagnosticTest { + public class Deprecated { @Test public void testAllFilesPresentInDeprecated() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/multiplatform/deprecated"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -18006,7 +18018,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/multiplatform/enum") @TestDataPath("$PROJECT_ROOT") - public class Enum extends AbstractDiagnosticTest { + public class Enum { @Test @TestMetadata("additionalEntriesInImpl.kt") public void testAdditionalEntriesInImpl() throws Exception { @@ -18052,7 +18064,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/multiplatform/generic") @TestDataPath("$PROJECT_ROOT") - public class Generic extends AbstractDiagnosticTest { + public class Generic { @Test public void testAllFilesPresentInGeneric() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/multiplatform/generic"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -18086,7 +18098,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/multiplatform/headerClass") @TestDataPath("$PROJECT_ROOT") - public class HeaderClass extends AbstractDiagnosticTest { + public class HeaderClass { @Test @TestMetadata("actualClassWithDefaultValuesInAnnotationViaTypealias.kt") public void testActualClassWithDefaultValuesInAnnotationViaTypealias() throws Exception { @@ -18294,7 +18306,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/multiplatform/inlineClasses") @TestDataPath("$PROJECT_ROOT") - public class InlineClasses extends AbstractDiagnosticTest { + public class InlineClasses { @Test public void testAllFilesPresentInInlineClasses() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/multiplatform/inlineClasses"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -18310,7 +18322,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/multiplatform/java") @TestDataPath("$PROJECT_ROOT") - public class Java extends AbstractDiagnosticTest { + public class Java { @Test public void testAllFilesPresentInJava() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/multiplatform/java"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -18332,7 +18344,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/multiplatform/topLevelFun") @TestDataPath("$PROJECT_ROOT") - public class TopLevelFun extends AbstractDiagnosticTest { + public class TopLevelFun { @Test public void testAllFilesPresentInTopLevelFun() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/multiplatform/topLevelFun"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -18420,7 +18432,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/multiplatform/topLevelProperty") @TestDataPath("$PROJECT_ROOT") - public class TopLevelProperty extends AbstractDiagnosticTest { + public class TopLevelProperty { @Test public void testAllFilesPresentInTopLevelProperty() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/multiplatform/topLevelProperty"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -18443,7 +18455,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/namedArguments") @TestDataPath("$PROJECT_ROOT") - public class NamedArguments extends AbstractDiagnosticTest { + public class NamedArguments { @Test public void testAllFilesPresentInNamedArguments() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/namedArguments"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -18530,7 +18542,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/namedArguments/mixedNamedPosition") @TestDataPath("$PROJECT_ROOT") - public class MixedNamedPosition extends AbstractDiagnosticTest { + public class MixedNamedPosition { @Test public void testAllFilesPresentInMixedNamedPosition() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/namedArguments/mixedNamedPosition"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -18577,7 +18589,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts") @TestDataPath("$PROJECT_ROOT") - public class NullabilityAndSmartCasts extends AbstractDiagnosticTest { + public class NullabilityAndSmartCasts { @Test public void testAllFilesPresentInNullabilityAndSmartCasts() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -18815,7 +18827,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/nullableTypes") @TestDataPath("$PROJECT_ROOT") - public class NullableTypes extends AbstractDiagnosticTest { + public class NullableTypes { @Test public void testAllFilesPresentInNullableTypes() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/nullableTypes"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -18921,7 +18933,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/numbers") @TestDataPath("$PROJECT_ROOT") - public class Numbers extends AbstractDiagnosticTest { + public class Numbers { @Test public void testAllFilesPresentInNumbers() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/numbers"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -18961,7 +18973,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/objects") @TestDataPath("$PROJECT_ROOT") - public class Objects extends AbstractDiagnosticTest { + public class Objects { @Test public void testAllFilesPresentInObjects() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/objects"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -19054,7 +19066,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/objects/kt21515") @TestDataPath("$PROJECT_ROOT") - public class Kt21515 extends AbstractDiagnosticTest { + public class Kt21515 { @Test public void testAllFilesPresentInKt21515() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/objects/kt21515"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -19215,7 +19227,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/operatorRem") @TestDataPath("$PROJECT_ROOT") - public class OperatorRem extends AbstractDiagnosticTest { + public class OperatorRem { @Test public void testAllFilesPresentInOperatorRem() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/operatorRem"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -19351,7 +19363,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/operatorsOverloading") @TestDataPath("$PROJECT_ROOT") - public class OperatorsOverloading extends AbstractDiagnosticTest { + public class OperatorsOverloading { @Test public void testAllFilesPresentInOperatorsOverloading() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/operatorsOverloading"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -19445,7 +19457,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/overload") @TestDataPath("$PROJECT_ROOT") - public class Overload extends AbstractDiagnosticTest { + public class Overload { @Test public void testAllFilesPresentInOverload() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/overload"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -19617,7 +19629,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/override") @TestDataPath("$PROJECT_ROOT") - public class Override extends AbstractDiagnosticTest { + public class Override { @Test @TestMetadata("AbstractFunImplemented.kt") public void testAbstractFunImplemented() throws Exception { @@ -19956,7 +19968,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/override/clashesOnInheritance") @TestDataPath("$PROJECT_ROOT") - public class ClashesOnInheritance extends AbstractDiagnosticTest { + public class ClashesOnInheritance { @Test public void testAllFilesPresentInClashesOnInheritance() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/override/clashesOnInheritance"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -20038,7 +20050,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/override/parameterNames") @TestDataPath("$PROJECT_ROOT") - public class ParameterNames extends AbstractDiagnosticTest { + public class ParameterNames { @Test public void testAllFilesPresentInParameterNames() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/override/parameterNames"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -20096,7 +20108,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/override/typeParameters") @TestDataPath("$PROJECT_ROOT") - public class TypeParameters extends AbstractDiagnosticTest { + public class TypeParameters { @Test public void testAllFilesPresentInTypeParameters() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/override/typeParameters"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -20131,7 +20143,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/parenthesizedTypes") @TestDataPath("$PROJECT_ROOT") - public class ParenthesizedTypes extends AbstractDiagnosticTest { + public class ParenthesizedTypes { @Test public void testAllFilesPresentInParenthesizedTypes() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/parenthesizedTypes"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -20159,7 +20171,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/platformTypes") @TestDataPath("$PROJECT_ROOT") - public class PlatformTypes extends AbstractDiagnosticTest { + public class PlatformTypes { @Test public void testAllFilesPresentInPlatformTypes() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/platformTypes"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -20276,7 +20288,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/platformTypes/commonSupertype") @TestDataPath("$PROJECT_ROOT") - public class CommonSupertype extends AbstractDiagnosticTest { + public class CommonSupertype { @Test public void testAllFilesPresentInCommonSupertype() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/platformTypes/commonSupertype"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -20334,7 +20346,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/platformTypes/genericVarianceViolation") @TestDataPath("$PROJECT_ROOT") - public class GenericVarianceViolation extends AbstractDiagnosticTest { + public class GenericVarianceViolation { @Test public void testAllFilesPresentInGenericVarianceViolation() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/platformTypes/genericVarianceViolation"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -20392,7 +20404,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/platformTypes/methodCall") @TestDataPath("$PROJECT_ROOT") - public class MethodCall extends AbstractDiagnosticTest { + public class MethodCall { @Test public void testAllFilesPresentInMethodCall() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/platformTypes/methodCall"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -20522,7 +20534,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/platformTypes/notNullTypeParameter") @TestDataPath("$PROJECT_ROOT") - public class NotNullTypeParameter extends AbstractDiagnosticTest { + public class NotNullTypeParameter { @Test public void testAllFilesPresentInNotNullTypeParameter() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/platformTypes/notNullTypeParameter"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -20574,7 +20586,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings") @TestDataPath("$PROJECT_ROOT") - public class NullabilityWarnings extends AbstractDiagnosticTest { + public class NullabilityWarnings { @Test public void testAllFilesPresentInNullabilityWarnings() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -20770,7 +20782,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/platformTypes/rawTypes") @TestDataPath("$PROJECT_ROOT") - public class RawTypes extends AbstractDiagnosticTest { + public class RawTypes { @Test public void testAllFilesPresentInRawTypes() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/platformTypes/rawTypes"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -20882,7 +20894,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/platformTypes/typeEnhancement") @TestDataPath("$PROJECT_ROOT") - public class TypeEnhancement extends AbstractDiagnosticTest { + public class TypeEnhancement { @Test public void testAllFilesPresentInTypeEnhancement() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/platformTypes/typeEnhancement"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -20923,7 +20935,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/privateInFile") @TestDataPath("$PROJECT_ROOT") - public class PrivateInFile extends AbstractDiagnosticTest { + public class PrivateInFile { @Test public void testAllFilesPresentInPrivateInFile() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/privateInFile"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -20951,7 +20963,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/properties") @TestDataPath("$PROJECT_ROOT") - public class Properties extends AbstractDiagnosticTest { + public class Properties { @Test public void testAllFilesPresentInProperties() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/properties"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -20972,7 +20984,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/properties/inferenceFromGetters") @TestDataPath("$PROJECT_ROOT") - public class InferenceFromGetters extends AbstractDiagnosticTest { + public class InferenceFromGetters { @Test public void testAllFilesPresentInInferenceFromGetters() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/properties/inferenceFromGetters"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -21055,7 +21067,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/qualifiedExpression") @TestDataPath("$PROJECT_ROOT") - public class QualifiedExpression extends AbstractDiagnosticTest { + public class QualifiedExpression { @Test public void testAllFilesPresentInQualifiedExpression() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/qualifiedExpression"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -21119,7 +21131,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/reassignment") @TestDataPath("$PROJECT_ROOT") - public class Reassignment extends AbstractDiagnosticTest { + public class Reassignment { @Test @TestMetadata("afterfor.kt") public void testAfterfor() throws Exception { @@ -21183,7 +21195,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/recovery") @TestDataPath("$PROJECT_ROOT") - public class Recovery extends AbstractDiagnosticTest { + public class Recovery { @Test @TestMetadata("absentLeftHandSide.kt") public void testAbsentLeftHandSide() throws Exception { @@ -21223,7 +21235,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/redeclarations") @TestDataPath("$PROJECT_ROOT") - public class Redeclarations extends AbstractDiagnosticTest { + public class Redeclarations { @Test public void testAllFilesPresentInRedeclarations() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/redeclarations"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -21436,7 +21448,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/redeclarations/shadowedExtension") @TestDataPath("$PROJECT_ROOT") - public class ShadowedExtension extends AbstractDiagnosticTest { + public class ShadowedExtension { @Test public void testAllFilesPresentInShadowedExtension() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/redeclarations/shadowedExtension"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -21531,7 +21543,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/regressions") @TestDataPath("$PROJECT_ROOT") - public class Regressions extends AbstractDiagnosticTest { + public class Regressions { @Test public void testAllFilesPresentInRegressions() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/regressions"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -22488,7 +22500,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/regressions/kt7585") @TestDataPath("$PROJECT_ROOT") - public class Kt7585 extends AbstractDiagnosticTest { + public class Kt7585 { @Test public void testAllFilesPresentInKt7585() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/regressions/kt7585"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -22517,7 +22529,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/resolve") @TestDataPath("$PROJECT_ROOT") - public class Resolve extends AbstractDiagnosticTest { + public class Resolve { @Test public void testAllFilesPresentInResolve() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/resolve"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -22718,7 +22730,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/resolve/dslMarker") @TestDataPath("$PROJECT_ROOT") - public class DslMarker extends AbstractDiagnosticTest { + public class DslMarker { @Test public void testAllFilesPresentInDslMarker() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/resolve/dslMarker"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -22884,7 +22896,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/resolve/invoke") @TestDataPath("$PROJECT_ROOT") - public class Invoke extends AbstractDiagnosticTest { + public class Invoke { @Test public void testAllFilesPresentInInvoke() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/resolve/invoke"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -23037,7 +23049,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/resolve/invoke/errors") @TestDataPath("$PROJECT_ROOT") - public class Errors extends AbstractDiagnosticTest { + public class Errors { @Test public void testAllFilesPresentInErrors() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/resolve/invoke/errors"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -23096,7 +23108,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/resolve/nestedCalls") @TestDataPath("$PROJECT_ROOT") - public class NestedCalls extends AbstractDiagnosticTest { + public class NestedCalls { @Test public void testAllFilesPresentInNestedCalls() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/resolve/nestedCalls"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -23160,7 +23172,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/resolve/noCandidates") @TestDataPath("$PROJECT_ROOT") - public class NoCandidates extends AbstractDiagnosticTest { + public class NoCandidates { @Test public void testAllFilesPresentInNoCandidates() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/resolve/noCandidates"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -23188,7 +23200,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/resolve/overloadConflicts") @TestDataPath("$PROJECT_ROOT") - public class OverloadConflicts extends AbstractDiagnosticTest { + public class OverloadConflicts { @Test public void testAllFilesPresentInOverloadConflicts() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/resolve/overloadConflicts"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -23324,7 +23336,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/resolve/priority") @TestDataPath("$PROJECT_ROOT") - public class Priority extends AbstractDiagnosticTest { + public class Priority { @Test public void testAllFilesPresentInPriority() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/resolve/priority"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -23406,7 +23418,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/resolve/specialConstructions") @TestDataPath("$PROJECT_ROOT") - public class SpecialConstructions extends AbstractDiagnosticTest { + public class SpecialConstructions { @Test public void testAllFilesPresentInSpecialConstructions() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/resolve/specialConstructions"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -23453,7 +23465,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/samConversions") @TestDataPath("$PROJECT_ROOT") - public class SamConversions extends AbstractDiagnosticTest { + public class SamConversions { @Test public void testAllFilesPresentInSamConversions() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/samConversions"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -23571,7 +23583,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/scopes") @TestDataPath("$PROJECT_ROOT") - public class Scopes extends AbstractDiagnosticTest { + public class Scopes { @Test public void testAllFilesPresentInScopes() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/scopes"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -23808,7 +23820,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/scopes/classHeader") @TestDataPath("$PROJECT_ROOT") - public class ClassHeader extends AbstractDiagnosticTest { + public class ClassHeader { @Test public void testAllFilesPresentInClassHeader() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/scopes/classHeader"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -23896,7 +23908,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/scopes/inheritance") @TestDataPath("$PROJECT_ROOT") - public class Inheritance extends AbstractDiagnosticTest { + public class Inheritance { @Test public void testAllFilesPresentInInheritance() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/scopes/inheritance"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -23989,7 +24001,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/scopes/inheritance/statics") @TestDataPath("$PROJECT_ROOT") - public class Statics extends AbstractDiagnosticTest { + public class Statics { @Test public void testAllFilesPresentInStatics() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/scopes/inheritance/statics"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -24094,7 +24106,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/scopes/inheritance/statics/companionObject") @TestDataPath("$PROJECT_ROOT") - public class CompanionObject extends AbstractDiagnosticTest { + public class CompanionObject { @Test @TestMetadata("accessToStaticMembersOfParentClassJKJ_after.kt") public void testAccessToStaticMembersOfParentClassJKJ_after() throws Exception { @@ -24166,7 +24178,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/scopes/protectedVisibility") @TestDataPath("$PROJECT_ROOT") - public class ProtectedVisibility extends AbstractDiagnosticTest { + public class ProtectedVisibility { @Test public void testAllFilesPresentInProtectedVisibility() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/scopes/protectedVisibility"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -24273,7 +24285,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/script") @TestDataPath("$PROJECT_ROOT") - public class Script extends AbstractDiagnosticTest { + public class Script { @Test @TestMetadata("AccessForwardDeclarationInScript.kts") public void testAccessForwardDeclarationInScript() throws Exception { @@ -24361,7 +24373,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/sealed") @TestDataPath("$PROJECT_ROOT") - public class Sealed extends AbstractDiagnosticTest { + public class Sealed { @Test public void testAllFilesPresentInSealed() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/sealed"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -24610,7 +24622,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/sealed/interfaces") @TestDataPath("$PROJECT_ROOT") - public class Interfaces extends AbstractDiagnosticTest { + public class Interfaces { @Test public void testAllFilesPresentInInterfaces() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/sealed/interfaces"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -24639,7 +24651,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/secondaryConstructors") @TestDataPath("$PROJECT_ROOT") - public class SecondaryConstructors extends AbstractDiagnosticTest { + public class SecondaryConstructors { @Test public void testAllFilesPresentInSecondaryConstructors() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/secondaryConstructors"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -24912,7 +24924,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker") @TestDataPath("$PROJECT_ROOT") - public class HeaderCallChecker extends AbstractDiagnosticTest { + public class HeaderCallChecker { @Test @TestMetadata("accessBaseGenericFromInnerExtendingSameBase.kt") public void testAccessBaseGenericFromInnerExtendingSameBase() throws Exception { @@ -25037,7 +25049,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/senselessComparison") @TestDataPath("$PROJECT_ROOT") - public class SenselessComparison extends AbstractDiagnosticTest { + public class SenselessComparison { @Test public void testAllFilesPresentInSenselessComparison() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/senselessComparison"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -25059,7 +25071,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/shadowing") @TestDataPath("$PROJECT_ROOT") - public class Shadowing extends AbstractDiagnosticTest { + public class Shadowing { @Test public void testAllFilesPresentInShadowing() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/shadowing"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -25141,7 +25153,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/smartCasts") @TestDataPath("$PROJECT_ROOT") - public class SmartCasts extends AbstractDiagnosticTest { + public class SmartCasts { @Test @TestMetadata("afterBinaryExpr.kt") public void testAfterBinaryExpr() throws Exception { @@ -25882,7 +25894,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/smartCasts/castchecks") @TestDataPath("$PROJECT_ROOT") - public class Castchecks extends AbstractDiagnosticTest { + public class Castchecks { @Test public void testAllFilesPresentInCastchecks() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/smartCasts/castchecks"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -25940,7 +25952,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/smartCasts/elvis") @TestDataPath("$PROJECT_ROOT") - public class Elvis extends AbstractDiagnosticTest { + public class Elvis { @Test public void testAllFilesPresentInElvis() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/smartCasts/elvis"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -25968,7 +25980,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/smartCasts/inference") @TestDataPath("$PROJECT_ROOT") - public class Inference extends AbstractDiagnosticTest { + public class Inference { @Test public void testAllFilesPresentInInference() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/smartCasts/inference"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -26074,7 +26086,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/smartCasts/intersectionScope") @TestDataPath("$PROJECT_ROOT") - public class IntersectionScope extends AbstractDiagnosticTest { + public class IntersectionScope { @Test public void testAllFilesPresentInIntersectionScope() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/smartCasts/intersectionScope"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -26168,7 +26180,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/smartCasts/loops") @TestDataPath("$PROJECT_ROOT") - public class Loops extends AbstractDiagnosticTest { + public class Loops { @Test public void testAllFilesPresentInLoops() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/smartCasts/loops"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -26514,7 +26526,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/smartCasts/objectLiterals") @TestDataPath("$PROJECT_ROOT") - public class ObjectLiterals extends AbstractDiagnosticTest { + public class ObjectLiterals { @Test public void testAllFilesPresentInObjectLiterals() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/smartCasts/objectLiterals"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -26572,7 +26584,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/smartCasts/publicVals") @TestDataPath("$PROJECT_ROOT") - public class PublicVals extends AbstractDiagnosticTest { + public class PublicVals { @Test public void testAllFilesPresentInPublicVals() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/smartCasts/publicVals"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -26636,7 +26648,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/smartCasts/safecalls") @TestDataPath("$PROJECT_ROOT") - public class Safecalls extends AbstractDiagnosticTest { + public class Safecalls { @Test public void testAllFilesPresentInSafecalls() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/smartCasts/safecalls"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -26820,7 +26832,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/smartCasts/variables") @TestDataPath("$PROJECT_ROOT") - public class Variables extends AbstractDiagnosticTest { + public class Variables { @Test @TestMetadata("accessorAndFunction.kt") public void testAccessorAndFunction() throws Exception { @@ -26980,7 +26992,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/smartCasts/varnotnull") @TestDataPath("$PROJECT_ROOT") - public class Varnotnull extends AbstractDiagnosticTest { + public class Varnotnull { @Test public void testAllFilesPresentInVarnotnull() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/smartCasts/varnotnull"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -27303,7 +27315,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/sourceCompatibility") @TestDataPath("$PROJECT_ROOT") - public class SourceCompatibility extends AbstractDiagnosticTest { + public class SourceCompatibility { @Test public void testAllFilesPresentInSourceCompatibility() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/sourceCompatibility"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -27360,7 +27372,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/sourceCompatibility/apiVersion") @TestDataPath("$PROJECT_ROOT") - public class ApiVersion extends AbstractDiagnosticTest { + public class ApiVersion { @Test public void testAllFilesPresentInApiVersion() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/sourceCompatibility/apiVersion"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -27436,7 +27448,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/sourceCompatibility/noBoundCallableReferences") @TestDataPath("$PROJECT_ROOT") - public class NoBoundCallableReferences extends AbstractDiagnosticTest { + public class NoBoundCallableReferences { @Test public void testAllFilesPresentInNoBoundCallableReferences() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/sourceCompatibility/noBoundCallableReferences"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -27471,7 +27483,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/substitutions") @TestDataPath("$PROJECT_ROOT") - public class Substitutions extends AbstractDiagnosticTest { + public class Substitutions { @Test public void testAllFilesPresentInSubstitutions() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/substitutions"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -27511,7 +27523,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/subtyping") @TestDataPath("$PROJECT_ROOT") - public class Subtyping extends AbstractDiagnosticTest { + public class Subtyping { @Test public void testAllFilesPresentInSubtyping() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/subtyping"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -27623,7 +27635,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/suppress") @TestDataPath("$PROJECT_ROOT") - public class Suppress extends AbstractDiagnosticTest { + public class Suppress { @Test public void testAllFilesPresentInSuppress() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/suppress"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -27632,7 +27644,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/suppress/allWarnings") @TestDataPath("$PROJECT_ROOT") - public class AllWarnings extends AbstractDiagnosticTest { + public class AllWarnings { @Test public void testAllFilesPresentInAllWarnings() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/suppress/allWarnings"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -27702,7 +27714,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/suppress/manyWarnings") @TestDataPath("$PROJECT_ROOT") - public class ManyWarnings extends AbstractDiagnosticTest { + public class ManyWarnings { @Test public void testAllFilesPresentInManyWarnings() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/suppress/manyWarnings"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -27766,7 +27778,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/suppress/oneWarning") @TestDataPath("$PROJECT_ROOT") - public class OneWarning extends AbstractDiagnosticTest { + public class OneWarning { @Test public void testAllFilesPresentInOneWarning() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/suppress/oneWarning"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -27849,7 +27861,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/suspendConversion") @TestDataPath("$PROJECT_ROOT") - public class SuspendConversion extends AbstractDiagnosticTest { + public class SuspendConversion { @Test public void testAllFilesPresentInSuspendConversion() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/suspendConversion"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -27937,7 +27949,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/syntheticExtensions") @TestDataPath("$PROJECT_ROOT") - public class SyntheticExtensions extends AbstractDiagnosticTest { + public class SyntheticExtensions { @Test public void testAllFilesPresentInSyntheticExtensions() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/syntheticExtensions"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -27946,7 +27958,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties") @TestDataPath("$PROJECT_ROOT") - public class JavaProperties extends AbstractDiagnosticTest { + public class JavaProperties { @Test @TestMetadata("AbbreviationName.kt") public void testAbbreviationName() throws Exception { @@ -28136,7 +28148,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters") @TestDataPath("$PROJECT_ROOT") - public class SamAdapters extends AbstractDiagnosticTest { + public class SamAdapters { @Test public void testAllFilesPresentInSamAdapters() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -28249,7 +28261,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/targetedBuiltIns") @TestDataPath("$PROJECT_ROOT") - public class TargetedBuiltIns extends AbstractDiagnosticTest { + public class TargetedBuiltIns { @Test public void testAllFilesPresentInTargetedBuiltIns() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/targetedBuiltIns"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -28294,7 +28306,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/targetedBuiltIns/backwardCompatibility") @TestDataPath("$PROJECT_ROOT") - public class BackwardCompatibility extends AbstractDiagnosticTest { + public class BackwardCompatibility { @Test public void testAllFilesPresentInBackwardCompatibility() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/targetedBuiltIns/backwardCompatibility"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -28347,7 +28359,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/testWithModifiedMockJdk") @TestDataPath("$PROJECT_ROOT") - public class TestWithModifiedMockJdk extends AbstractDiagnosticTest { + public class TestWithModifiedMockJdk { @Test public void testAllFilesPresentInTestWithModifiedMockJdk() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/testWithModifiedMockJdk"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -28375,7 +28387,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/testsWithExplicitApi") @TestDataPath("$PROJECT_ROOT") - public class TestsWithExplicitApi extends AbstractDiagnosticTest { + public class TestsWithExplicitApi { @Test public void testAllFilesPresentInTestsWithExplicitApi() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/testsWithExplicitApi"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -28445,7 +28457,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/testsWithJava15") @TestDataPath("$PROJECT_ROOT") - public class TestsWithJava15 extends AbstractDiagnosticTest { + public class TestsWithJava15 { @Test public void testAllFilesPresentInTestsWithJava15() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/testsWithJava15"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -28454,7 +28466,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/testsWithJava15/jvmRecord") @TestDataPath("$PROJECT_ROOT") - public class JvmRecord extends AbstractDiagnosticTest { + public class JvmRecord { @Test public void testAllFilesPresentInJvmRecord() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/testsWithJava15/jvmRecord"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -28500,7 +28512,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/testsWithJava15/sealedClasses") @TestDataPath("$PROJECT_ROOT") - public class SealedClasses extends AbstractDiagnosticTest { + public class SealedClasses { @Test public void testAllFilesPresentInSealedClasses() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/testsWithJava15/sealedClasses"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -28535,7 +28547,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/thisAndSuper") @TestDataPath("$PROJECT_ROOT") - public class ThisAndSuper extends AbstractDiagnosticTest { + public class ThisAndSuper { @Test public void testAllFilesPresentInThisAndSuper() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/thisAndSuper"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -28640,7 +28652,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/thisAndSuper/unqualifiedSuper") @TestDataPath("$PROJECT_ROOT") - public class UnqualifiedSuper extends AbstractDiagnosticTest { + public class UnqualifiedSuper { @Test public void testAllFilesPresentInUnqualifiedSuper() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/thisAndSuper/unqualifiedSuper"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -28729,7 +28741,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/traitWithRequired") @TestDataPath("$PROJECT_ROOT") - public class TraitWithRequired extends AbstractDiagnosticTest { + public class TraitWithRequired { @Test public void testAllFilesPresentInTraitWithRequired() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/traitWithRequired"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -28751,7 +28763,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/typeParameters") @TestDataPath("$PROJECT_ROOT") - public class TypeParameters extends AbstractDiagnosticTest { + public class TypeParameters { @Test public void testAllFilesPresentInTypeParameters() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/typeParameters"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -28839,7 +28851,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/typealias") @TestDataPath("$PROJECT_ROOT") - public class Typealias extends AbstractDiagnosticTest { + public class Typealias { @Test @TestMetadata("aliasesOnly.kt") public void testAliasesOnly() throws Exception { @@ -29455,7 +29467,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/underscoresInNumericLiterals") @TestDataPath("$PROJECT_ROOT") - public class UnderscoresInNumericLiterals extends AbstractDiagnosticTest { + public class UnderscoresInNumericLiterals { @Test public void testAllFilesPresentInUnderscoresInNumericLiterals() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/underscoresInNumericLiterals"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -29477,7 +29489,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/unit") @TestDataPath("$PROJECT_ROOT") - public class Unit extends AbstractDiagnosticTest { + public class Unit { @Test public void testAllFilesPresentInUnit() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/unit"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -29493,7 +29505,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/unitConversion") @TestDataPath("$PROJECT_ROOT") - public class UnitConversion extends AbstractDiagnosticTest { + public class UnitConversion { @Test public void testAllFilesPresentInUnitConversion() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/unitConversion"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -29557,7 +29569,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/unsignedTypes") @TestDataPath("$PROJECT_ROOT") - public class UnsignedTypes extends AbstractDiagnosticTest { + public class UnsignedTypes { @Test public void testAllFilesPresentInUnsignedTypes() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/unsignedTypes"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -29638,7 +29650,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/unsignedTypes/conversions") @TestDataPath("$PROJECT_ROOT") - public class Conversions extends AbstractDiagnosticTest { + public class Conversions { @Test public void testAllFilesPresentInConversions() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/unsignedTypes/conversions"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -29679,7 +29691,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/valueClasses") @TestDataPath("$PROJECT_ROOT") - public class ValueClasses extends AbstractDiagnosticTest { + public class ValueClasses { @Test public void testAllFilesPresentInValueClasses() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/valueClasses"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -29827,7 +29839,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/varargs") @TestDataPath("$PROJECT_ROOT") - public class Varargs extends AbstractDiagnosticTest { + public class Varargs { @Test public void testAllFilesPresentInVarargs() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/varargs"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -30035,7 +30047,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/variance") @TestDataPath("$PROJECT_ROOT") - public class Variance extends AbstractDiagnosticTest { + public class Variance { @Test public void testAllFilesPresentInVariance() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/variance"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -30116,7 +30128,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/variance/privateToThis") @TestDataPath("$PROJECT_ROOT") - public class PrivateToThis extends AbstractDiagnosticTest { + public class PrivateToThis { @Test @TestMetadata("Abstract.kt") public void testAbstract() throws Exception { @@ -30157,7 +30169,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/visibility") @TestDataPath("$PROJECT_ROOT") - public class Visibility extends AbstractDiagnosticTest { + public class Visibility { @Test @TestMetadata("abstractInvisibleMemberFromJava.kt") public void testAbstractInvisibleMemberFromJava() throws Exception { @@ -30203,7 +30215,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/when") @TestDataPath("$PROJECT_ROOT") - public class When extends AbstractDiagnosticTest { + public class When { @Test public void testAllFilesPresentInWhen() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/when"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -30590,7 +30602,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/tests/when/withSubjectVariable") @TestDataPath("$PROJECT_ROOT") - public class WithSubjectVariable extends AbstractDiagnosticTest { + public class WithSubjectVariable { @Test public void testAllFilesPresentInWithSubjectVariable() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/when/withSubjectVariable"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -30698,7 +30710,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib") @TestDataPath("$PROJECT_ROOT") - public class TestsWithStdLib extends AbstractDiagnosticTest { + public class TestsWithStdLib { @Test @TestMetadata("addAllProjection.kt") public void testAddAllProjection() throws Exception { @@ -30869,7 +30881,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations") @TestDataPath("$PROJECT_ROOT") - public class Annotations extends AbstractDiagnosticTest { + public class Annotations { @Test public void testAllFilesPresentInAnnotations() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/annotations"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -30968,7 +30980,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationApplicability") @TestDataPath("$PROJECT_ROOT") - public class AnnotationApplicability extends AbstractDiagnosticTest { + public class AnnotationApplicability { @Test public void testAllFilesPresentInAnnotationApplicability() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationApplicability"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -31020,7 +31032,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameterMustBeConstant") @TestDataPath("$PROJECT_ROOT") - public class AnnotationParameterMustBeConstant extends AbstractDiagnosticTest { + public class AnnotationParameterMustBeConstant { @Test public void testAllFilesPresentInAnnotationParameterMustBeConstant() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameterMustBeConstant"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -31054,7 +31066,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameters") @TestDataPath("$PROJECT_ROOT") - public class AnnotationParameters extends AbstractDiagnosticTest { + public class AnnotationParameters { @Test public void testAllFilesPresentInAnnotationParameters() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameters"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -31112,7 +31124,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationWithVarargParameter") @TestDataPath("$PROJECT_ROOT") - public class AnnotationWithVarargParameter extends AbstractDiagnosticTest { + public class AnnotationWithVarargParameter { @Test public void testAllFilesPresentInAnnotationWithVarargParameter() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationWithVarargParameter"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -31134,7 +31146,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/javaAnnotationsWithKClassParameter") @TestDataPath("$PROJECT_ROOT") - public class JavaAnnotationsWithKClassParameter extends AbstractDiagnosticTest { + public class JavaAnnotationsWithKClassParameter { @Test public void testAllFilesPresentInJavaAnnotationsWithKClassParameter() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/annotations/javaAnnotationsWithKClassParameter"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -31216,7 +31228,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault") @TestDataPath("$PROJECT_ROOT") - public class JvmDefault extends AbstractDiagnosticTest { + public class JvmDefault { @Test public void testAllFilesPresentInJvmDefault() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -31327,7 +31339,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/allCompatibility") @TestDataPath("$PROJECT_ROOT") - public class AllCompatibility extends AbstractDiagnosticTest { + public class AllCompatibility { @Test public void testAllFilesPresentInAllCompatibility() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/allCompatibility"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -31343,7 +31355,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/jvmDefaultWithoutCompatibility") @TestDataPath("$PROJECT_ROOT") - public class JvmDefaultWithoutCompatibility extends AbstractDiagnosticTest { + public class JvmDefaultWithoutCompatibility { @Test public void testAllFilesPresentInJvmDefaultWithoutCompatibility() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/jvmDefaultWithoutCompatibility"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -31372,7 +31384,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmField") @TestDataPath("$PROJECT_ROOT") - public class JvmField extends AbstractDiagnosticTest { + public class JvmField { @Test public void testAllFilesPresentInJvmField() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmField"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -31412,7 +31424,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmOverloads") @TestDataPath("$PROJECT_ROOT") - public class JvmOverloads extends AbstractDiagnosticTest { + public class JvmOverloads { @Test public void testAllFilesPresentInJvmOverloads() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmOverloads"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -31458,7 +31470,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmPackageName") @TestDataPath("$PROJECT_ROOT") - public class JvmPackageName extends AbstractDiagnosticTest { + public class JvmPackageName { @Test public void testAllFilesPresentInJvmPackageName() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmPackageName"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -31474,7 +31486,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmSpecialFunctions") @TestDataPath("$PROJECT_ROOT") - public class JvmSpecialFunctions extends AbstractDiagnosticTest { + public class JvmSpecialFunctions { @Test public void testAllFilesPresentInJvmSpecialFunctions() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmSpecialFunctions"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -31490,7 +31502,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmStatic") @TestDataPath("$PROJECT_ROOT") - public class JvmStatic extends AbstractDiagnosticTest { + public class JvmStatic { @Test public void testAllFilesPresentInJvmStatic() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmStatic"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -31596,7 +31608,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/kClass") @TestDataPath("$PROJECT_ROOT") - public class KClass extends AbstractDiagnosticTest { + public class KClass { @Test public void testAllFilesPresentInKClass() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/annotations/kClass"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -31648,7 +31660,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/prohibitPositionedArgument") @TestDataPath("$PROJECT_ROOT") - public class ProhibitPositionedArgument extends AbstractDiagnosticTest { + public class ProhibitPositionedArgument { @Test public void testAllFilesPresentInProhibitPositionedArgument() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/annotations/prohibitPositionedArgument"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -31689,7 +31701,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/assert") @TestDataPath("$PROJECT_ROOT") - public class Assert extends AbstractDiagnosticTest { + public class Assert { @Test public void testAllFilesPresentInAssert() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/assert"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -31708,10 +31720,26 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { } } + @Nested + @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/builderInference") + @TestDataPath("$PROJECT_ROOT") + public class BuilderInference { + @Test + public void testAllFilesPresentInBuilderInference() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/builderInference"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + } + + @Test + @TestMetadata("completeIrrelevantCalls.kt") + public void testCompleteIrrelevantCalls() throws Exception { + runTest("compiler/testData/diagnostics/testsWithStdLib/builderInference/completeIrrelevantCalls.kt"); + } + } + @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/builtins") @TestDataPath("$PROJECT_ROOT") - public class Builtins extends AbstractDiagnosticTest { + public class Builtins { @Test public void testAllFilesPresentInBuiltins() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/builtins"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -31727,7 +31755,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/cast") @TestDataPath("$PROJECT_ROOT") - public class Cast extends AbstractDiagnosticTest { + public class Cast { @Test public void testAllFilesPresentInCast() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/cast"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -31755,7 +31783,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts") @TestDataPath("$PROJECT_ROOT") - public class Contracts extends AbstractDiagnosticTest { + public class Contracts { @Test public void testAllFilesPresentInContracts() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/contracts"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -31764,7 +31792,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow") @TestDataPath("$PROJECT_ROOT") - public class Controlflow extends AbstractDiagnosticTest { + public class Controlflow { @Test public void testAllFilesPresentInControlflow() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -31773,7 +31801,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/flowInlining") @TestDataPath("$PROJECT_ROOT") - public class FlowInlining extends AbstractDiagnosticTest { + public class FlowInlining { @Test public void testAllFilesPresentInFlowInlining() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/flowInlining"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -31885,7 +31913,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/initialization") @TestDataPath("$PROJECT_ROOT") - public class Initialization extends AbstractDiagnosticTest { + public class Initialization { @Test public void testAllFilesPresentInInitialization() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/initialization"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -31894,7 +31922,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/initialization/atLeastOnce") @TestDataPath("$PROJECT_ROOT") - public class AtLeastOnce extends AbstractDiagnosticTest { + public class AtLeastOnce { @Test public void testAllFilesPresentInAtLeastOnce() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/initialization/atLeastOnce"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -31922,7 +31950,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/initialization/exactlyOnce") @TestDataPath("$PROJECT_ROOT") - public class ExactlyOnce extends AbstractDiagnosticTest { + public class ExactlyOnce { @Test public void testAllFilesPresentInExactlyOnce() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/initialization/exactlyOnce"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -31968,7 +31996,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/initialization/unknown") @TestDataPath("$PROJECT_ROOT") - public class Unknown extends AbstractDiagnosticTest { + public class Unknown { @Test public void testAllFilesPresentInUnknown() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/initialization/unknown"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -31986,7 +32014,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/dsl") @TestDataPath("$PROJECT_ROOT") - public class Dsl extends AbstractDiagnosticTest { + public class Dsl { @Test public void testAllFilesPresentInDsl() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/contracts/dsl"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -32019,7 +32047,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/dsl/errors") @TestDataPath("$PROJECT_ROOT") - public class Errors extends AbstractDiagnosticTest { + public class Errors { @Test @TestMetadata("accessToOuterThis.kt") public void testAccessToOuterThis() throws Exception { @@ -32138,7 +32166,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/fromStdlib") @TestDataPath("$PROJECT_ROOT") - public class FromStdlib extends AbstractDiagnosticTest { + public class FromStdlib { @Test public void testAllFilesPresentInFromStdlib() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/contracts/fromStdlib"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -32184,7 +32212,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/newSyntax") @TestDataPath("$PROJECT_ROOT") - public class NewSyntax extends AbstractDiagnosticTest { + public class NewSyntax { @Test public void testAllFilesPresentInNewSyntax() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/contracts/newSyntax"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -32218,7 +32246,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts") @TestDataPath("$PROJECT_ROOT") - public class Smartcasts extends AbstractDiagnosticTest { + public class Smartcasts { @Test public void testAllFilesPresentInSmartcasts() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -32341,7 +32369,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/multieffect") @TestDataPath("$PROJECT_ROOT") - public class Multieffect extends AbstractDiagnosticTest { + public class Multieffect { @Test public void testAllFilesPresentInMultieffect() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/multieffect"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -32363,7 +32391,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/operatorsTests") @TestDataPath("$PROJECT_ROOT") - public class OperatorsTests extends AbstractDiagnosticTest { + public class OperatorsTests { @Test public void testAllFilesPresentInOperatorsTests() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/operatorsTests"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -32427,7 +32455,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/when") @TestDataPath("$PROJECT_ROOT") - public class When extends AbstractDiagnosticTest { + public class When { @Test public void testAllFilesPresentInWhen() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/when"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -32463,7 +32491,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines") @TestDataPath("$PROJECT_ROOT") - public class Coroutines extends AbstractDiagnosticTest { + public class Coroutines { @Test public void testAllFilesPresentInCoroutines() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/coroutines"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -32760,7 +32788,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/callableReference") @TestDataPath("$PROJECT_ROOT") - public class CallableReference extends AbstractDiagnosticTest { + public class CallableReference { @Test public void testAllFilesPresentInCallableReference() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/coroutines/callableReference"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -32794,7 +32822,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/inference") @TestDataPath("$PROJECT_ROOT") - public class Inference extends AbstractDiagnosticTest { + public class Inference { @Test public void testAllFilesPresentInInference() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/coroutines/inference"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -33128,7 +33156,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline") @TestDataPath("$PROJECT_ROOT") - public class InlineCrossinline extends AbstractDiagnosticTest { + public class InlineCrossinline { @Test public void testAllFilesPresentInInlineCrossinline() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -33210,7 +33238,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/release") @TestDataPath("$PROJECT_ROOT") - public class Release extends AbstractDiagnosticTest { + public class Release { @Test public void testAllFilesPresentInRelease() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/coroutines/release"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -33226,7 +33254,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension") @TestDataPath("$PROJECT_ROOT") - public class RestrictSuspension extends AbstractDiagnosticTest { + public class RestrictSuspension { @Test public void testAllFilesPresentInRestrictSuspension() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -33284,7 +33312,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendFunctionType") @TestDataPath("$PROJECT_ROOT") - public class SuspendFunctionType extends AbstractDiagnosticTest { + public class SuspendFunctionType { @Test public void testAllFilesPresentInSuspendFunctionType() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendFunctionType"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -33378,7 +33406,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls") @TestDataPath("$PROJECT_ROOT") - public class TailCalls extends AbstractDiagnosticTest { + public class TailCalls { @Test public void testAllFilesPresentInTailCalls() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -33425,7 +33453,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/deprecated") @TestDataPath("$PROJECT_ROOT") - public class Deprecated extends AbstractDiagnosticTest { + public class Deprecated { @Test public void testAllFilesPresentInDeprecated() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/deprecated"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -33447,7 +33475,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/duplicateJvmSignature") @TestDataPath("$PROJECT_ROOT") - public class DuplicateJvmSignature extends AbstractDiagnosticTest { + public class DuplicateJvmSignature { @Test public void testAllFilesPresentInDuplicateJvmSignature() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/duplicateJvmSignature"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -33492,7 +33520,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/duplicateJvmSignature/statics") @TestDataPath("$PROJECT_ROOT") - public class Statics extends AbstractDiagnosticTest { + public class Statics { @Test public void testAllFilesPresentInStatics() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/duplicateJvmSignature/statics"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -33527,7 +33555,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/experimental") @TestDataPath("$PROJECT_ROOT") - public class Experimental extends AbstractDiagnosticTest { + public class Experimental { @Test public void testAllFilesPresentInExperimental() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/experimental"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -33693,7 +33721,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/factoryPattern") @TestDataPath("$PROJECT_ROOT") - public class FactoryPattern extends AbstractDiagnosticTest { + public class FactoryPattern { @Test public void testAllFilesPresentInFactoryPattern() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/factoryPattern"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -33763,7 +33791,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/forInArrayLoop") @TestDataPath("$PROJECT_ROOT") - public class ForInArrayLoop extends AbstractDiagnosticTest { + public class ForInArrayLoop { @Test public void testAllFilesPresentInForInArrayLoop() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/forInArrayLoop"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -33803,7 +33831,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/functionLiterals") @TestDataPath("$PROJECT_ROOT") - public class FunctionLiterals extends AbstractDiagnosticTest { + public class FunctionLiterals { @Test public void testAllFilesPresentInFunctionLiterals() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/functionLiterals"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -33819,7 +33847,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/inference") @TestDataPath("$PROJECT_ROOT") - public class Inference extends AbstractDiagnosticTest { + public class Inference { @Test public void testAllFilesPresentInInference() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/inference"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -33960,7 +33988,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve") @TestDataPath("$PROJECT_ROOT") - public class AnnotationsForResolve extends AbstractDiagnosticTest { + public class AnnotationsForResolve { @Test public void testAllFilesPresentInAnnotationsForResolve() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -34114,7 +34142,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/inference/completion") @TestDataPath("$PROJECT_ROOT") - public class Completion extends AbstractDiagnosticTest { + public class Completion { @Test public void testAllFilesPresentInCompletion() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/inference/completion"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -34123,7 +34151,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/inference/completion/postponedArgumentsAnalysis") @TestDataPath("$PROJECT_ROOT") - public class PostponedArgumentsAnalysis extends AbstractDiagnosticTest { + public class PostponedArgumentsAnalysis { @Test public void testAllFilesPresentInPostponedArgumentsAnalysis() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/inference/completion/postponedArgumentsAnalysis"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -34204,7 +34232,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/inference/completion/postponedArgumentsAnalysis/performance") @TestDataPath("$PROJECT_ROOT") - public class Performance extends AbstractDiagnosticTest { + public class Performance { @Test public void testAllFilesPresentInPerformance() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/inference/completion/postponedArgumentsAnalysis/performance"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -34252,7 +34280,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/inference/delegates") @TestDataPath("$PROJECT_ROOT") - public class Delegates extends AbstractDiagnosticTest { + public class Delegates { @Test public void testAllFilesPresentInDelegates() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/inference/delegates"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -34280,7 +34308,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/inference/nothingType") @TestDataPath("$PROJECT_ROOT") - public class NothingType extends AbstractDiagnosticTest { + public class NothingType { @Test public void testAllFilesPresentInNothingType() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/inference/nothingType"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -34302,7 +34330,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/inference/performance") @TestDataPath("$PROJECT_ROOT") - public class Performance extends AbstractDiagnosticTest { + public class Performance { @Test public void testAllFilesPresentInPerformance() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/inference/performance"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -34331,7 +34359,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/inline") @TestDataPath("$PROJECT_ROOT") - public class Inline extends AbstractDiagnosticTest { + public class Inline { @Test public void testAllFilesPresentInInline() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/inline"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -34353,7 +34381,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/java") @TestDataPath("$PROJECT_ROOT") - public class Java extends AbstractDiagnosticTest { + public class Java { @Test public void testAllFilesPresentInJava() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/java"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -34393,7 +34421,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/kt7585") @TestDataPath("$PROJECT_ROOT") - public class Kt7585 extends AbstractDiagnosticTest { + public class Kt7585 { @Test public void testAllFilesPresentInKt7585() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/kt7585"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -34409,7 +34437,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/lateinit") @TestDataPath("$PROJECT_ROOT") - public class Lateinit extends AbstractDiagnosticTest { + public class Lateinit { @Test public void testAllFilesPresentInLateinit() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/lateinit"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -34425,7 +34453,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/multiplatform") @TestDataPath("$PROJECT_ROOT") - public class Multiplatform extends AbstractDiagnosticTest { + public class Multiplatform { @Test public void testAllFilesPresentInMultiplatform() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/multiplatform"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -34441,7 +34469,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/native") @TestDataPath("$PROJECT_ROOT") - public class Native extends AbstractDiagnosticTest { + public class Native { @Test @TestMetadata("abstract.kt") public void testAbstract() throws Exception { @@ -34505,7 +34533,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/purelyImplementedCollection") @TestDataPath("$PROJECT_ROOT") - public class PurelyImplementedCollection extends AbstractDiagnosticTest { + public class PurelyImplementedCollection { @Test public void testAllFilesPresentInPurelyImplementedCollection() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/purelyImplementedCollection"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -34575,12 +34603,18 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/reflection") @TestDataPath("$PROJECT_ROOT") - public class Reflection extends AbstractDiagnosticTest { + public class Reflection { @Test public void testAllFilesPresentInReflection() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/reflection"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } + @Test + @TestMetadata("classArrayInAnnotation.kt") + public void testClassArrayInAnnotation() throws Exception { + runTest("compiler/testData/diagnostics/testsWithStdLib/reflection/classArrayInAnnotation.kt"); + } + @Test @TestMetadata("noReflectionInClassPath.kt") public void testNoReflectionInClassPath() throws Exception { @@ -34591,7 +34625,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/regression") @TestDataPath("$PROJECT_ROOT") - public class Regression extends AbstractDiagnosticTest { + public class Regression { @Test public void testAllFilesPresentInRegression() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/regression"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -34691,7 +34725,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/reified") @TestDataPath("$PROJECT_ROOT") - public class Reified extends AbstractDiagnosticTest { + public class Reified { @Test public void testAllFilesPresentInReified() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/reified"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -34731,7 +34765,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/resolve") @TestDataPath("$PROJECT_ROOT") - public class Resolve extends AbstractDiagnosticTest { + public class Resolve { @Test public void testAllFilesPresentInResolve() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/resolve"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -34814,12 +34848,18 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { public void testSamOverloadsWithKtFunctionWithoutRefinedSams() throws Exception { runTest("compiler/testData/diagnostics/testsWithStdLib/resolve/samOverloadsWithKtFunctionWithoutRefinedSams.kt"); } + + @Test + @TestMetadata("sameNameClassesFromSupertypes.kt") + public void testSameNameClassesFromSupertypes() throws Exception { + runTest("compiler/testData/diagnostics/testsWithStdLib/resolve/sameNameClassesFromSupertypes.kt"); + } } @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/smartcasts") @TestDataPath("$PROJECT_ROOT") - public class Smartcasts extends AbstractDiagnosticTest { + public class Smartcasts { @Test public void testAllFilesPresentInSmartcasts() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/smartcasts"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -34907,7 +34947,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/sourceCompatibility") @TestDataPath("$PROJECT_ROOT") - public class SourceCompatibility extends AbstractDiagnosticTest { + public class SourceCompatibility { @Test public void testAllFilesPresentInSourceCompatibility() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/sourceCompatibility"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -34923,7 +34963,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/targetedBuiltIns") @TestDataPath("$PROJECT_ROOT") - public class TargetedBuiltIns extends AbstractDiagnosticTest { + public class TargetedBuiltIns { @Test public void testAllFilesPresentInTargetedBuiltIns() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/targetedBuiltIns"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -34945,7 +34985,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/trailingComma") @TestDataPath("$PROJECT_ROOT") - public class TrailingComma extends AbstractDiagnosticTest { + public class TrailingComma { @Test public void testAllFilesPresentInTrailingComma() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/trailingComma"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -35033,7 +35073,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/tryCatch") @TestDataPath("$PROJECT_ROOT") - public class TryCatch extends AbstractDiagnosticTest { + public class TryCatch { @Test public void testAllFilesPresentInTryCatch() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/tryCatch"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -35103,7 +35143,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/typealias") @TestDataPath("$PROJECT_ROOT") - public class Typealias extends AbstractDiagnosticTest { + public class Typealias { @Test public void testAllFilesPresentInTypealias() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/typealias"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -35149,7 +35189,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/varargs") @TestDataPath("$PROJECT_ROOT") - public class Varargs extends AbstractDiagnosticTest { + public class Varargs { @Test public void testAllFilesPresentInVarargs() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/varargs"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -35177,7 +35217,7 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { @Nested @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/when") @TestDataPath("$PROJECT_ROOT") - public class When extends AbstractDiagnosticTest { + public class When { @Test public void testAllFilesPresentInWhen() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/when"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/DiagnosticUsingJavacTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/DiagnosticUsingJavacTestGenerated.java index e77ba465d05..747d871acde 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/DiagnosticUsingJavacTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/DiagnosticUsingJavacTestGenerated.java @@ -33,7 +33,7 @@ public class DiagnosticUsingJavacTestGenerated extends AbstractDiagnosticUsingJa @Nested @TestMetadata("compiler/testData/diagnostics/tests/javac/fieldsResolution") @TestDataPath("$PROJECT_ROOT") - public class FieldsResolution extends AbstractDiagnosticUsingJavacTest { + public class FieldsResolution { @Test public void testAllFilesPresentInFieldsResolution() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/javac/fieldsResolution"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -115,7 +115,7 @@ public class DiagnosticUsingJavacTestGenerated extends AbstractDiagnosticUsingJa @Nested @TestMetadata("compiler/testData/diagnostics/tests/javac/imports") @TestDataPath("$PROJECT_ROOT") - public class Imports extends AbstractDiagnosticUsingJavacTest { + public class Imports { @Test public void testAllFilesPresentInImports() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/javac/imports"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -227,7 +227,7 @@ public class DiagnosticUsingJavacTestGenerated extends AbstractDiagnosticUsingJa @Nested @TestMetadata("compiler/testData/diagnostics/tests/javac/inheritance") @TestDataPath("$PROJECT_ROOT") - public class Inheritance extends AbstractDiagnosticUsingJavacTest { + public class Inheritance { @Test public void testAllFilesPresentInInheritance() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/javac/inheritance"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -339,7 +339,7 @@ public class DiagnosticUsingJavacTestGenerated extends AbstractDiagnosticUsingJa @Nested @TestMetadata("compiler/testData/diagnostics/tests/javac/inners") @TestDataPath("$PROJECT_ROOT") - public class Inners extends AbstractDiagnosticUsingJavacTest { + public class Inners { @Test public void testAllFilesPresentInInners() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/javac/inners"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -391,7 +391,7 @@ public class DiagnosticUsingJavacTestGenerated extends AbstractDiagnosticUsingJa @Nested @TestMetadata("compiler/testData/diagnostics/tests/javac/qualifiedExpression") @TestDataPath("$PROJECT_ROOT") - public class QualifiedExpression extends AbstractDiagnosticUsingJavacTest { + public class QualifiedExpression { @Test public void testAllFilesPresentInQualifiedExpression() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/javac/qualifiedExpression"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); @@ -431,7 +431,7 @@ public class DiagnosticUsingJavacTestGenerated extends AbstractDiagnosticUsingJa @Nested @TestMetadata("compiler/testData/diagnostics/tests/javac/typeParameters") @TestDataPath("$PROJECT_ROOT") - public class TypeParameters extends AbstractDiagnosticUsingJavacTest { + public class TypeParameters { @Test public void testAllFilesPresentInTypeParameters() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/javac/typeParameters"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/DiagnosticsTestWithJsStdLibGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/DiagnosticsTestWithJsStdLibGenerated.java index 70a47f91ace..823ea6751de 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/DiagnosticsTestWithJsStdLibGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/DiagnosticsTestWithJsStdLibGenerated.java @@ -75,7 +75,7 @@ public class DiagnosticsTestWithJsStdLibGenerated extends AbstractDiagnosticsTes @Nested @TestMetadata("compiler/testData/diagnostics/testsWithJsStdLib/classLiteral") @TestDataPath("$PROJECT_ROOT") - public class ClassLiteral extends AbstractDiagnosticsTestWithJsStdLib { + public class ClassLiteral { @Test public void testAllFilesPresentInClassLiteral() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithJsStdLib/classLiteral"), Pattern.compile("^(.+)\\.kt$"), null, true); @@ -97,7 +97,7 @@ public class DiagnosticsTestWithJsStdLibGenerated extends AbstractDiagnosticsTes @Nested @TestMetadata("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes") @TestDataPath("$PROJECT_ROOT") - public class DynamicTypes extends AbstractDiagnosticsTestWithJsStdLib { + public class DynamicTypes { @Test public void testAllFilesPresentInDynamicTypes() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes"), Pattern.compile("^(.+)\\.kt$"), null, true); @@ -383,7 +383,7 @@ public class DiagnosticsTestWithJsStdLibGenerated extends AbstractDiagnosticsTes @Nested @TestMetadata("compiler/testData/diagnostics/testsWithJsStdLib/export") @TestDataPath("$PROJECT_ROOT") - public class Export extends AbstractDiagnosticsTestWithJsStdLib { + public class Export { @Test public void testAllFilesPresentInExport() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithJsStdLib/export"), Pattern.compile("^(.+)\\.kt$"), null, true); @@ -435,7 +435,7 @@ public class DiagnosticsTestWithJsStdLibGenerated extends AbstractDiagnosticsTes @Nested @TestMetadata("compiler/testData/diagnostics/testsWithJsStdLib/inline") @TestDataPath("$PROJECT_ROOT") - public class Inline extends AbstractDiagnosticsTestWithJsStdLib { + public class Inline { @Test public void testAllFilesPresentInInline() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithJsStdLib/inline"), Pattern.compile("^(.+)\\.kt$"), null, true); @@ -451,7 +451,7 @@ public class DiagnosticsTestWithJsStdLibGenerated extends AbstractDiagnosticsTes @Nested @TestMetadata("compiler/testData/diagnostics/testsWithJsStdLib/jsCode") @TestDataPath("$PROJECT_ROOT") - public class JsCode extends AbstractDiagnosticsTestWithJsStdLib { + public class JsCode { @Test public void testAllFilesPresentInJsCode() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithJsStdLib/jsCode"), Pattern.compile("^(.+)\\.kt$"), null, true); @@ -497,7 +497,7 @@ public class DiagnosticsTestWithJsStdLibGenerated extends AbstractDiagnosticsTes @Nested @TestMetadata("compiler/testData/diagnostics/testsWithJsStdLib/jvmDeclarations") @TestDataPath("$PROJECT_ROOT") - public class JvmDeclarations extends AbstractDiagnosticsTestWithJsStdLib { + public class JvmDeclarations { @Test public void testAllFilesPresentInJvmDeclarations() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithJsStdLib/jvmDeclarations"), Pattern.compile("^(.+)\\.kt$"), null, true); @@ -513,7 +513,7 @@ public class DiagnosticsTestWithJsStdLibGenerated extends AbstractDiagnosticsTes @Nested @TestMetadata("compiler/testData/diagnostics/testsWithJsStdLib/module") @TestDataPath("$PROJECT_ROOT") - public class Module extends AbstractDiagnosticsTestWithJsStdLib { + public class Module { @Test public void testAllFilesPresentInModule() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithJsStdLib/module"), Pattern.compile("^(.+)\\.kt$"), null, true); @@ -577,7 +577,7 @@ public class DiagnosticsTestWithJsStdLibGenerated extends AbstractDiagnosticsTes @Nested @TestMetadata("compiler/testData/diagnostics/testsWithJsStdLib/name") @TestDataPath("$PROJECT_ROOT") - public class Name extends AbstractDiagnosticsTestWithJsStdLib { + public class Name { @Test public void testAllFilesPresentInName() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithJsStdLib/name"), Pattern.compile("^(.+)\\.kt$"), null, true); @@ -773,7 +773,7 @@ public class DiagnosticsTestWithJsStdLibGenerated extends AbstractDiagnosticsTes @Nested @TestMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native") @TestDataPath("$PROJECT_ROOT") - public class Native extends AbstractDiagnosticsTestWithJsStdLib { + public class Native { @Test public void testAllFilesPresentInNative() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithJsStdLib/native"), Pattern.compile("^(.+)\\.kt$"), null, true); @@ -908,7 +908,7 @@ public class DiagnosticsTestWithJsStdLibGenerated extends AbstractDiagnosticsTes @Nested @TestMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeGetter") @TestDataPath("$PROJECT_ROOT") - public class NativeGetter extends AbstractDiagnosticsTestWithJsStdLib { + public class NativeGetter { @Test public void testAllFilesPresentInNativeGetter() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeGetter"), Pattern.compile("^(.+)\\.kt$"), null, true); @@ -972,7 +972,7 @@ public class DiagnosticsTestWithJsStdLibGenerated extends AbstractDiagnosticsTes @Nested @TestMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeInvoke") @TestDataPath("$PROJECT_ROOT") - public class NativeInvoke extends AbstractDiagnosticsTestWithJsStdLib { + public class NativeInvoke { @Test public void testAllFilesPresentInNativeInvoke() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeInvoke"), Pattern.compile("^(.+)\\.kt$"), null, true); @@ -1036,7 +1036,7 @@ public class DiagnosticsTestWithJsStdLibGenerated extends AbstractDiagnosticsTes @Nested @TestMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeSetter") @TestDataPath("$PROJECT_ROOT") - public class NativeSetter extends AbstractDiagnosticsTestWithJsStdLib { + public class NativeSetter { @Test public void testAllFilesPresentInNativeSetter() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeSetter"), Pattern.compile("^(.+)\\.kt$"), null, true); @@ -1100,7 +1100,7 @@ public class DiagnosticsTestWithJsStdLibGenerated extends AbstractDiagnosticsTes @Nested @TestMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/optionlBody") @TestDataPath("$PROJECT_ROOT") - public class OptionlBody extends AbstractDiagnosticsTestWithJsStdLib { + public class OptionlBody { @Test public void testAllFilesPresentInOptionlBody() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithJsStdLib/native/optionlBody"), Pattern.compile("^(.+)\\.kt$"), null, true); @@ -1134,7 +1134,7 @@ public class DiagnosticsTestWithJsStdLibGenerated extends AbstractDiagnosticsTes @Nested @TestMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/rtti") @TestDataPath("$PROJECT_ROOT") - public class Rtti extends AbstractDiagnosticsTestWithJsStdLib { + public class Rtti { @Test public void testAllFilesPresentInRtti() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithJsStdLib/native/rtti"), Pattern.compile("^(.+)\\.kt$"), null, true); @@ -1174,7 +1174,7 @@ public class DiagnosticsTestWithJsStdLibGenerated extends AbstractDiagnosticsTes @Nested @TestMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/unusedParam") @TestDataPath("$PROJECT_ROOT") - public class UnusedParam extends AbstractDiagnosticsTestWithJsStdLib { + public class UnusedParam { @Test public void testAllFilesPresentInUnusedParam() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithJsStdLib/native/unusedParam"), Pattern.compile("^(.+)\\.kt$"), null, true); @@ -1209,7 +1209,7 @@ public class DiagnosticsTestWithJsStdLibGenerated extends AbstractDiagnosticsTes @Nested @TestMetadata("compiler/testData/diagnostics/testsWithJsStdLib/qualifier") @TestDataPath("$PROJECT_ROOT") - public class Qualifier extends AbstractDiagnosticsTestWithJsStdLib { + public class Qualifier { @Test public void testAllFilesPresentInQualifier() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithJsStdLib/qualifier"), Pattern.compile("^(.+)\\.kt$"), null, true); @@ -1231,7 +1231,7 @@ public class DiagnosticsTestWithJsStdLibGenerated extends AbstractDiagnosticsTes @Nested @TestMetadata("compiler/testData/diagnostics/testsWithJsStdLib/reflection") @TestDataPath("$PROJECT_ROOT") - public class Reflection extends AbstractDiagnosticsTestWithJsStdLib { + public class Reflection { @Test public void testAllFilesPresentInReflection() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithJsStdLib/reflection"), Pattern.compile("^(.+)\\.kt$"), null, true); diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/DiagnosticsTestWithJvmIrBackendGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/DiagnosticsTestWithJvmIrBackendGenerated.java index 79e48dd5aae..6379c344a4f 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/DiagnosticsTestWithJvmIrBackendGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/DiagnosticsTestWithJvmIrBackendGenerated.java @@ -58,7 +58,7 @@ public class DiagnosticsTestWithJvmIrBackendGenerated extends AbstractDiagnostic @Nested @TestMetadata("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature") @TestDataPath("$PROJECT_ROOT") - public class DuplicateJvmSignature extends AbstractDiagnosticsTestWithJvmIrBackend { + public class DuplicateJvmSignature { @Test public void testAllFilesPresentInDuplicateJvmSignature() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -85,7 +85,7 @@ public class DiagnosticsTestWithJvmIrBackendGenerated extends AbstractDiagnostic @Nested @TestMetadata("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/accidentalOverrides") @TestDataPath("$PROJECT_ROOT") - public class AccidentalOverrides extends AbstractDiagnosticsTestWithJvmIrBackend { + public class AccidentalOverrides { @Test @TestMetadata("accidentalOverrideFromGrandparent.kt") public void testAccidentalOverrideFromGrandparent() throws Exception { @@ -185,7 +185,7 @@ public class DiagnosticsTestWithJvmIrBackendGenerated extends AbstractDiagnostic @Nested @TestMetadata("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/bridges") @TestDataPath("$PROJECT_ROOT") - public class Bridges extends AbstractDiagnosticsTestWithJvmIrBackend { + public class Bridges { @Test public void testAllFilesPresentInBridges() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/bridges"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -213,7 +213,7 @@ public class DiagnosticsTestWithJvmIrBackendGenerated extends AbstractDiagnostic @Nested @TestMetadata("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/erasure") @TestDataPath("$PROJECT_ROOT") - public class Erasure extends AbstractDiagnosticsTestWithJvmIrBackend { + public class Erasure { @Test public void testAllFilesPresentInErasure() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/erasure"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -325,7 +325,7 @@ public class DiagnosticsTestWithJvmIrBackendGenerated extends AbstractDiagnostic @Nested @TestMetadata("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/finalMembersFromBuiltIns") @TestDataPath("$PROJECT_ROOT") - public class FinalMembersFromBuiltIns extends AbstractDiagnosticsTestWithJvmIrBackend { + public class FinalMembersFromBuiltIns { @Test public void testAllFilesPresentInFinalMembersFromBuiltIns() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/finalMembersFromBuiltIns"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -347,7 +347,7 @@ public class DiagnosticsTestWithJvmIrBackendGenerated extends AbstractDiagnostic @Nested @TestMetadata("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/functionAndProperty") @TestDataPath("$PROJECT_ROOT") - public class FunctionAndProperty extends AbstractDiagnosticsTestWithJvmIrBackend { + public class FunctionAndProperty { @Test public void testAllFilesPresentInFunctionAndProperty() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/functionAndProperty"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -465,7 +465,7 @@ public class DiagnosticsTestWithJvmIrBackendGenerated extends AbstractDiagnostic @Nested @TestMetadata("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/specialNames") @TestDataPath("$PROJECT_ROOT") - public class SpecialNames extends AbstractDiagnosticsTestWithJvmIrBackend { + public class SpecialNames { @Test public void testAllFilesPresentInSpecialNames() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/specialNames"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -535,7 +535,7 @@ public class DiagnosticsTestWithJvmIrBackendGenerated extends AbstractDiagnostic @Nested @TestMetadata("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/statics") @TestDataPath("$PROJECT_ROOT") - public class Statics extends AbstractDiagnosticsTestWithJvmIrBackend { + public class Statics { @Test public void testAllFilesPresentInStatics() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/statics"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -581,7 +581,7 @@ public class DiagnosticsTestWithJvmIrBackendGenerated extends AbstractDiagnostic @Nested @TestMetadata("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/synthesized") @TestDataPath("$PROJECT_ROOT") - public class Synthesized extends AbstractDiagnosticsTestWithJvmIrBackend { + public class Synthesized { @Test public void testAllFilesPresentInSynthesized() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/synthesized"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -597,7 +597,7 @@ public class DiagnosticsTestWithJvmIrBackendGenerated extends AbstractDiagnostic @Nested @TestMetadata("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/traitImpl") @TestDataPath("$PROJECT_ROOT") - public class TraitImpl extends AbstractDiagnosticsTestWithJvmIrBackend { + public class TraitImpl { @Test public void testAllFilesPresentInTraitImpl() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/traitImpl"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -644,7 +644,7 @@ public class DiagnosticsTestWithJvmIrBackendGenerated extends AbstractDiagnostic @Nested @TestMetadata("compiler/testData/diagnostics/testsWithJvmBackend/valueClasses") @TestDataPath("$PROJECT_ROOT") - public class ValueClasses extends AbstractDiagnosticsTestWithJvmIrBackend { + public class ValueClasses { @Test public void testAllFilesPresentInValueClasses() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithJvmBackend/valueClasses"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/DiagnosticsTestWithOldJvmBackendGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/DiagnosticsTestWithOldJvmBackendGenerated.java index f6c3c3a0a2e..ac06ee6d804 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/DiagnosticsTestWithOldJvmBackendGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/DiagnosticsTestWithOldJvmBackendGenerated.java @@ -58,7 +58,7 @@ public class DiagnosticsTestWithOldJvmBackendGenerated extends AbstractDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature") @TestDataPath("$PROJECT_ROOT") - public class DuplicateJvmSignature extends AbstractDiagnosticsTestWithOldJvmBackend { + public class DuplicateJvmSignature { @Test public void testAllFilesPresentInDuplicateJvmSignature() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_OLD, true); @@ -85,7 +85,7 @@ public class DiagnosticsTestWithOldJvmBackendGenerated extends AbstractDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/accidentalOverrides") @TestDataPath("$PROJECT_ROOT") - public class AccidentalOverrides extends AbstractDiagnosticsTestWithOldJvmBackend { + public class AccidentalOverrides { @Test @TestMetadata("accidentalOverrideFromGrandparent.kt") public void testAccidentalOverrideFromGrandparent() throws Exception { @@ -173,7 +173,7 @@ public class DiagnosticsTestWithOldJvmBackendGenerated extends AbstractDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/bridges") @TestDataPath("$PROJECT_ROOT") - public class Bridges extends AbstractDiagnosticsTestWithOldJvmBackend { + public class Bridges { @Test public void testAllFilesPresentInBridges() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/bridges"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_OLD, true); @@ -201,7 +201,7 @@ public class DiagnosticsTestWithOldJvmBackendGenerated extends AbstractDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/erasure") @TestDataPath("$PROJECT_ROOT") - public class Erasure extends AbstractDiagnosticsTestWithOldJvmBackend { + public class Erasure { @Test public void testAllFilesPresentInErasure() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/erasure"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_OLD, true); @@ -313,7 +313,7 @@ public class DiagnosticsTestWithOldJvmBackendGenerated extends AbstractDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/finalMembersFromBuiltIns") @TestDataPath("$PROJECT_ROOT") - public class FinalMembersFromBuiltIns extends AbstractDiagnosticsTestWithOldJvmBackend { + public class FinalMembersFromBuiltIns { @Test public void testAllFilesPresentInFinalMembersFromBuiltIns() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/finalMembersFromBuiltIns"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_OLD, true); @@ -335,7 +335,7 @@ public class DiagnosticsTestWithOldJvmBackendGenerated extends AbstractDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/functionAndProperty") @TestDataPath("$PROJECT_ROOT") - public class FunctionAndProperty extends AbstractDiagnosticsTestWithOldJvmBackend { + public class FunctionAndProperty { @Test public void testAllFilesPresentInFunctionAndProperty() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/functionAndProperty"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_OLD, true); @@ -453,7 +453,7 @@ public class DiagnosticsTestWithOldJvmBackendGenerated extends AbstractDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/specialNames") @TestDataPath("$PROJECT_ROOT") - public class SpecialNames extends AbstractDiagnosticsTestWithOldJvmBackend { + public class SpecialNames { @Test public void testAllFilesPresentInSpecialNames() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/specialNames"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_OLD, true); @@ -523,7 +523,7 @@ public class DiagnosticsTestWithOldJvmBackendGenerated extends AbstractDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/statics") @TestDataPath("$PROJECT_ROOT") - public class Statics extends AbstractDiagnosticsTestWithOldJvmBackend { + public class Statics { @Test public void testAllFilesPresentInStatics() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/statics"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_OLD, true); @@ -569,7 +569,7 @@ public class DiagnosticsTestWithOldJvmBackendGenerated extends AbstractDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/synthesized") @TestDataPath("$PROJECT_ROOT") - public class Synthesized extends AbstractDiagnosticsTestWithOldJvmBackend { + public class Synthesized { @Test public void testAllFilesPresentInSynthesized() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/synthesized"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_OLD, true); @@ -585,7 +585,7 @@ public class DiagnosticsTestWithOldJvmBackendGenerated extends AbstractDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/traitImpl") @TestDataPath("$PROJECT_ROOT") - public class TraitImpl extends AbstractDiagnosticsTestWithOldJvmBackend { + public class TraitImpl { @Test public void testAllFilesPresentInTraitImpl() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/traitImpl"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_OLD, true); @@ -632,7 +632,7 @@ public class DiagnosticsTestWithOldJvmBackendGenerated extends AbstractDiagnosti @Nested @TestMetadata("compiler/testData/diagnostics/testsWithJvmBackend/valueClasses") @TestDataPath("$PROJECT_ROOT") - public class ValueClasses extends AbstractDiagnosticsTestWithOldJvmBackend { + public class ValueClasses { @Test public void testAllFilesPresentInValueClasses() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithJvmBackend/valueClasses"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_OLD, true); diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/ForeignAnnotationsNoAnnotationInClasspathTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/ForeignAnnotationsNoAnnotationInClasspathTestGenerated.java index 9544c40fbfe..ad6535261f8 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/ForeignAnnotationsNoAnnotationInClasspathTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/ForeignAnnotationsNoAnnotationInClasspathTestGenerated.java @@ -20,7 +20,7 @@ public class ForeignAnnotationsNoAnnotationInClasspathTestGenerated extends Abst @Nested @TestMetadata("compiler/testData/foreignAnnotations/tests") @TestDataPath("$PROJECT_ROOT") - public class Tests extends AbstractForeignAnnotationsNoAnnotationInClasspathTest { + public class Tests { @Test public void testAllFilesPresentInTests() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/tests"), Pattern.compile("^(.+)\\.kt$"), null, true); @@ -95,7 +95,7 @@ public class ForeignAnnotationsNoAnnotationInClasspathTestGenerated extends Abst @Nested @TestMetadata("compiler/testData/foreignAnnotations/tests/jsr305") @TestDataPath("$PROJECT_ROOT") - public class Jsr305 extends AbstractForeignAnnotationsNoAnnotationInClasspathTest { + public class Jsr305 { @Test public void testAllFilesPresentInJsr305() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305"), Pattern.compile("^(.+)\\.kt$"), null, true); @@ -128,7 +128,7 @@ public class ForeignAnnotationsNoAnnotationInClasspathTestGenerated extends Abst @Nested @TestMetadata("compiler/testData/foreignAnnotations/tests/jsr305/ignore") @TestDataPath("$PROJECT_ROOT") - public class Ignore extends AbstractForeignAnnotationsNoAnnotationInClasspathTest { + public class Ignore { @Test public void testAllFilesPresentInIgnore() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305/ignore"), Pattern.compile("^(.+)\\.kt$"), null, true); @@ -144,7 +144,7 @@ public class ForeignAnnotationsNoAnnotationInClasspathTestGenerated extends Abst @Nested @TestMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings") @TestDataPath("$PROJECT_ROOT") - public class NullabilityWarnings extends AbstractForeignAnnotationsNoAnnotationInClasspathTest { + public class NullabilityWarnings { @Test public void testAllFilesPresentInNullabilityWarnings() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings"), Pattern.compile("^(.+)\\.kt$"), null, true); @@ -195,7 +195,7 @@ public class ForeignAnnotationsNoAnnotationInClasspathTestGenerated extends Abst @Nested @TestMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes") @TestDataPath("$PROJECT_ROOT") - public class FromPlatformTypes extends AbstractForeignAnnotationsNoAnnotationInClasspathTest { + public class FromPlatformTypes { @Test public void testAllFilesPresentInFromPlatformTypes() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes"), Pattern.compile("^(.+)\\.kt$"), null, true); @@ -325,7 +325,7 @@ public class ForeignAnnotationsNoAnnotationInClasspathTestGenerated extends Abst @Nested @TestMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault") @TestDataPath("$PROJECT_ROOT") - public class TypeQualifierDefault extends AbstractForeignAnnotationsNoAnnotationInClasspathTest { + public class TypeQualifierDefault { @Test public void testAllFilesPresentInTypeQualifierDefault() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault"), Pattern.compile("^(.+)\\.kt$"), null, true); @@ -384,7 +384,7 @@ public class ForeignAnnotationsNoAnnotationInClasspathTestGenerated extends Abst @Nested @TestMetadata("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault") @TestDataPath("$PROJECT_ROOT") - public class TypeQualifierDefault extends AbstractForeignAnnotationsNoAnnotationInClasspathTest { + public class TypeQualifierDefault { @Test public void testAllFilesPresentInTypeQualifierDefault() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault"), Pattern.compile("^(.+)\\.kt$"), null, true); @@ -449,7 +449,7 @@ public class ForeignAnnotationsNoAnnotationInClasspathTestGenerated extends Abst @Nested @TestMetadata("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings") @TestDataPath("$PROJECT_ROOT") - public class Jsr305NullabilityWarnings extends AbstractForeignAnnotationsNoAnnotationInClasspathTest { + public class Jsr305NullabilityWarnings { @Test public void testAllFilesPresentInJsr305NullabilityWarnings() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings"), Pattern.compile("^(.+)\\.kt$"), null, true); @@ -458,7 +458,7 @@ public class ForeignAnnotationsNoAnnotationInClasspathTestGenerated extends Abst @Nested @TestMetadata("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration") @TestDataPath("$PROJECT_ROOT") - public class Migration extends AbstractForeignAnnotationsNoAnnotationInClasspathTest { + public class Migration { @Test public void testAllFilesPresentInMigration() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration"), Pattern.compile("^(.+)\\.kt$"), null, true); @@ -523,7 +523,7 @@ public class ForeignAnnotationsNoAnnotationInClasspathTestGenerated extends Abst @Nested @TestMetadata("compiler/testData/foreignAnnotations/tests/typeQualifierDefault") @TestDataPath("$PROJECT_ROOT") - public class TypeQualifierDefault extends AbstractForeignAnnotationsNoAnnotationInClasspathTest { + public class TypeQualifierDefault { @Test public void testAllFilesPresentInTypeQualifierDefault() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/typeQualifierDefault"), Pattern.compile("^(.+)\\.kt$"), null, true); @@ -540,7 +540,7 @@ public class ForeignAnnotationsNoAnnotationInClasspathTestGenerated extends Abst @Nested @TestMetadata("compiler/testData/foreignAnnotations/java8Tests") @TestDataPath("$PROJECT_ROOT") - public class Java8Tests extends AbstractForeignAnnotationsNoAnnotationInClasspathTest { + public class Java8Tests { @Test public void testAllFilesPresentInJava8Tests() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/java8Tests"), Pattern.compile("^(.+)\\.kt$"), null, true, "jspecify", "typeEnhancementOnCompiledJava"); @@ -567,7 +567,7 @@ public class ForeignAnnotationsNoAnnotationInClasspathTestGenerated extends Abst @Nested @TestMetadata("compiler/testData/foreignAnnotations/java8Tests/jsr305") @TestDataPath("$PROJECT_ROOT") - public class Jsr305 extends AbstractForeignAnnotationsNoAnnotationInClasspathTest { + public class Jsr305 { @Test public void testAllFilesPresentInJsr305() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/java8Tests/jsr305"), Pattern.compile("^(.+)\\.kt$"), null, true); @@ -607,7 +607,7 @@ public class ForeignAnnotationsNoAnnotationInClasspathTestGenerated extends Abst @Nested @TestMetadata("compiler/testData/foreignAnnotations/java8Tests/typeEnhancement") @TestDataPath("$PROJECT_ROOT") - public class TypeEnhancement extends AbstractForeignAnnotationsNoAnnotationInClasspathTest { + public class TypeEnhancement { @Test public void testAllFilesPresentInTypeEnhancement() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/java8Tests/typeEnhancement"), Pattern.compile("^(.+)\\.kt$"), null, true); diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/ForeignAnnotationsNoAnnotationInClasspathWithPsiClassReadingTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/ForeignAnnotationsNoAnnotationInClasspathWithPsiClassReadingTestGenerated.java index 44cc8a3161e..30bc40853b8 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/ForeignAnnotationsNoAnnotationInClasspathWithPsiClassReadingTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/ForeignAnnotationsNoAnnotationInClasspathWithPsiClassReadingTestGenerated.java @@ -20,7 +20,7 @@ public class ForeignAnnotationsNoAnnotationInClasspathWithPsiClassReadingTestGen @Nested @TestMetadata("compiler/testData/foreignAnnotations/tests") @TestDataPath("$PROJECT_ROOT") - public class Tests extends AbstractForeignAnnotationsNoAnnotationInClasspathWithPsiClassReadingTest { + public class Tests { @Test public void testAllFilesPresentInTests() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/tests"), Pattern.compile("^(.+)\\.kt$"), null, true); @@ -95,7 +95,7 @@ public class ForeignAnnotationsNoAnnotationInClasspathWithPsiClassReadingTestGen @Nested @TestMetadata("compiler/testData/foreignAnnotations/tests/jsr305") @TestDataPath("$PROJECT_ROOT") - public class Jsr305 extends AbstractForeignAnnotationsNoAnnotationInClasspathWithPsiClassReadingTest { + public class Jsr305 { @Test public void testAllFilesPresentInJsr305() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305"), Pattern.compile("^(.+)\\.kt$"), null, true); @@ -128,7 +128,7 @@ public class ForeignAnnotationsNoAnnotationInClasspathWithPsiClassReadingTestGen @Nested @TestMetadata("compiler/testData/foreignAnnotations/tests/jsr305/ignore") @TestDataPath("$PROJECT_ROOT") - public class Ignore extends AbstractForeignAnnotationsNoAnnotationInClasspathWithPsiClassReadingTest { + public class Ignore { @Test public void testAllFilesPresentInIgnore() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305/ignore"), Pattern.compile("^(.+)\\.kt$"), null, true); @@ -144,7 +144,7 @@ public class ForeignAnnotationsNoAnnotationInClasspathWithPsiClassReadingTestGen @Nested @TestMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings") @TestDataPath("$PROJECT_ROOT") - public class NullabilityWarnings extends AbstractForeignAnnotationsNoAnnotationInClasspathWithPsiClassReadingTest { + public class NullabilityWarnings { @Test public void testAllFilesPresentInNullabilityWarnings() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings"), Pattern.compile("^(.+)\\.kt$"), null, true); @@ -195,7 +195,7 @@ public class ForeignAnnotationsNoAnnotationInClasspathWithPsiClassReadingTestGen @Nested @TestMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes") @TestDataPath("$PROJECT_ROOT") - public class FromPlatformTypes extends AbstractForeignAnnotationsNoAnnotationInClasspathWithPsiClassReadingTest { + public class FromPlatformTypes { @Test public void testAllFilesPresentInFromPlatformTypes() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes"), Pattern.compile("^(.+)\\.kt$"), null, true); @@ -325,7 +325,7 @@ public class ForeignAnnotationsNoAnnotationInClasspathWithPsiClassReadingTestGen @Nested @TestMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault") @TestDataPath("$PROJECT_ROOT") - public class TypeQualifierDefault extends AbstractForeignAnnotationsNoAnnotationInClasspathWithPsiClassReadingTest { + public class TypeQualifierDefault { @Test public void testAllFilesPresentInTypeQualifierDefault() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault"), Pattern.compile("^(.+)\\.kt$"), null, true); @@ -384,7 +384,7 @@ public class ForeignAnnotationsNoAnnotationInClasspathWithPsiClassReadingTestGen @Nested @TestMetadata("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault") @TestDataPath("$PROJECT_ROOT") - public class TypeQualifierDefault extends AbstractForeignAnnotationsNoAnnotationInClasspathWithPsiClassReadingTest { + public class TypeQualifierDefault { @Test public void testAllFilesPresentInTypeQualifierDefault() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault"), Pattern.compile("^(.+)\\.kt$"), null, true); @@ -449,7 +449,7 @@ public class ForeignAnnotationsNoAnnotationInClasspathWithPsiClassReadingTestGen @Nested @TestMetadata("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings") @TestDataPath("$PROJECT_ROOT") - public class Jsr305NullabilityWarnings extends AbstractForeignAnnotationsNoAnnotationInClasspathWithPsiClassReadingTest { + public class Jsr305NullabilityWarnings { @Test public void testAllFilesPresentInJsr305NullabilityWarnings() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings"), Pattern.compile("^(.+)\\.kt$"), null, true); @@ -458,7 +458,7 @@ public class ForeignAnnotationsNoAnnotationInClasspathWithPsiClassReadingTestGen @Nested @TestMetadata("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration") @TestDataPath("$PROJECT_ROOT") - public class Migration extends AbstractForeignAnnotationsNoAnnotationInClasspathWithPsiClassReadingTest { + public class Migration { @Test public void testAllFilesPresentInMigration() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration"), Pattern.compile("^(.+)\\.kt$"), null, true); @@ -523,7 +523,7 @@ public class ForeignAnnotationsNoAnnotationInClasspathWithPsiClassReadingTestGen @Nested @TestMetadata("compiler/testData/foreignAnnotations/tests/typeQualifierDefault") @TestDataPath("$PROJECT_ROOT") - public class TypeQualifierDefault extends AbstractForeignAnnotationsNoAnnotationInClasspathWithPsiClassReadingTest { + public class TypeQualifierDefault { @Test public void testAllFilesPresentInTypeQualifierDefault() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/typeQualifierDefault"), Pattern.compile("^(.+)\\.kt$"), null, true); @@ -540,7 +540,7 @@ public class ForeignAnnotationsNoAnnotationInClasspathWithPsiClassReadingTestGen @Nested @TestMetadata("compiler/testData/foreignAnnotations/java8Tests") @TestDataPath("$PROJECT_ROOT") - public class Java8Tests extends AbstractForeignAnnotationsNoAnnotationInClasspathWithPsiClassReadingTest { + public class Java8Tests { @Test public void testAllFilesPresentInJava8Tests() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/java8Tests"), Pattern.compile("^(.+)\\.kt$"), null, true, "jspecify", "typeEnhancementOnCompiledJava"); @@ -567,7 +567,7 @@ public class ForeignAnnotationsNoAnnotationInClasspathWithPsiClassReadingTestGen @Nested @TestMetadata("compiler/testData/foreignAnnotations/java8Tests/jsr305") @TestDataPath("$PROJECT_ROOT") - public class Jsr305 extends AbstractForeignAnnotationsNoAnnotationInClasspathWithPsiClassReadingTest { + public class Jsr305 { @Test public void testAllFilesPresentInJsr305() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/java8Tests/jsr305"), Pattern.compile("^(.+)\\.kt$"), null, true); @@ -607,7 +607,7 @@ public class ForeignAnnotationsNoAnnotationInClasspathWithPsiClassReadingTestGen @Nested @TestMetadata("compiler/testData/foreignAnnotations/java8Tests/typeEnhancement") @TestDataPath("$PROJECT_ROOT") - public class TypeEnhancement extends AbstractForeignAnnotationsNoAnnotationInClasspathWithPsiClassReadingTest { + public class TypeEnhancement { @Test public void testAllFilesPresentInTypeEnhancement() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/java8Tests/typeEnhancement"), Pattern.compile("^(.+)\\.kt$"), null, true); diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/ForeignAnnotationsTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/ForeignAnnotationsTestGenerated.java index d285ef8d19f..f61c9fb498a 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/ForeignAnnotationsTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/ForeignAnnotationsTestGenerated.java @@ -20,7 +20,7 @@ public class ForeignAnnotationsTestGenerated extends AbstractForeignAnnotationsT @Nested @TestMetadata("compiler/testData/foreignAnnotations/tests") @TestDataPath("$PROJECT_ROOT") - public class Tests extends AbstractForeignAnnotationsTest { + public class Tests { @Test public void testAllFilesPresentInTests() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/tests"), Pattern.compile("^(.+)\\.kt$"), null, true); @@ -95,7 +95,7 @@ public class ForeignAnnotationsTestGenerated extends AbstractForeignAnnotationsT @Nested @TestMetadata("compiler/testData/foreignAnnotations/tests/jsr305") @TestDataPath("$PROJECT_ROOT") - public class Jsr305 extends AbstractForeignAnnotationsTest { + public class Jsr305 { @Test public void testAllFilesPresentInJsr305() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305"), Pattern.compile("^(.+)\\.kt$"), null, true); @@ -128,7 +128,7 @@ public class ForeignAnnotationsTestGenerated extends AbstractForeignAnnotationsT @Nested @TestMetadata("compiler/testData/foreignAnnotations/tests/jsr305/ignore") @TestDataPath("$PROJECT_ROOT") - public class Ignore extends AbstractForeignAnnotationsTest { + public class Ignore { @Test public void testAllFilesPresentInIgnore() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305/ignore"), Pattern.compile("^(.+)\\.kt$"), null, true); @@ -144,7 +144,7 @@ public class ForeignAnnotationsTestGenerated extends AbstractForeignAnnotationsT @Nested @TestMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings") @TestDataPath("$PROJECT_ROOT") - public class NullabilityWarnings extends AbstractForeignAnnotationsTest { + public class NullabilityWarnings { @Test public void testAllFilesPresentInNullabilityWarnings() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings"), Pattern.compile("^(.+)\\.kt$"), null, true); @@ -195,7 +195,7 @@ public class ForeignAnnotationsTestGenerated extends AbstractForeignAnnotationsT @Nested @TestMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes") @TestDataPath("$PROJECT_ROOT") - public class FromPlatformTypes extends AbstractForeignAnnotationsTest { + public class FromPlatformTypes { @Test public void testAllFilesPresentInFromPlatformTypes() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes"), Pattern.compile("^(.+)\\.kt$"), null, true); @@ -325,7 +325,7 @@ public class ForeignAnnotationsTestGenerated extends AbstractForeignAnnotationsT @Nested @TestMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault") @TestDataPath("$PROJECT_ROOT") - public class TypeQualifierDefault extends AbstractForeignAnnotationsTest { + public class TypeQualifierDefault { @Test public void testAllFilesPresentInTypeQualifierDefault() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault"), Pattern.compile("^(.+)\\.kt$"), null, true); @@ -384,7 +384,7 @@ public class ForeignAnnotationsTestGenerated extends AbstractForeignAnnotationsT @Nested @TestMetadata("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault") @TestDataPath("$PROJECT_ROOT") - public class TypeQualifierDefault extends AbstractForeignAnnotationsTest { + public class TypeQualifierDefault { @Test public void testAllFilesPresentInTypeQualifierDefault() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault"), Pattern.compile("^(.+)\\.kt$"), null, true); @@ -449,7 +449,7 @@ public class ForeignAnnotationsTestGenerated extends AbstractForeignAnnotationsT @Nested @TestMetadata("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings") @TestDataPath("$PROJECT_ROOT") - public class Jsr305NullabilityWarnings extends AbstractForeignAnnotationsTest { + public class Jsr305NullabilityWarnings { @Test public void testAllFilesPresentInJsr305NullabilityWarnings() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings"), Pattern.compile("^(.+)\\.kt$"), null, true); @@ -458,7 +458,7 @@ public class ForeignAnnotationsTestGenerated extends AbstractForeignAnnotationsT @Nested @TestMetadata("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration") @TestDataPath("$PROJECT_ROOT") - public class Migration extends AbstractForeignAnnotationsTest { + public class Migration { @Test public void testAllFilesPresentInMigration() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration"), Pattern.compile("^(.+)\\.kt$"), null, true); @@ -523,7 +523,7 @@ public class ForeignAnnotationsTestGenerated extends AbstractForeignAnnotationsT @Nested @TestMetadata("compiler/testData/foreignAnnotations/tests/typeQualifierDefault") @TestDataPath("$PROJECT_ROOT") - public class TypeQualifierDefault extends AbstractForeignAnnotationsTest { + public class TypeQualifierDefault { @Test public void testAllFilesPresentInTypeQualifierDefault() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/typeQualifierDefault"), Pattern.compile("^(.+)\\.kt$"), null, true); @@ -540,7 +540,7 @@ public class ForeignAnnotationsTestGenerated extends AbstractForeignAnnotationsT @Nested @TestMetadata("compiler/testData/foreignAnnotations/java8Tests") @TestDataPath("$PROJECT_ROOT") - public class Java8Tests extends AbstractForeignAnnotationsTest { + public class Java8Tests { @Test public void testAllFilesPresentInJava8Tests() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/java8Tests"), Pattern.compile("^(.+)\\.kt$"), null, true, "jspecify", "typeEnhancementOnCompiledJava"); @@ -567,7 +567,7 @@ public class ForeignAnnotationsTestGenerated extends AbstractForeignAnnotationsT @Nested @TestMetadata("compiler/testData/foreignAnnotations/java8Tests/jsr305") @TestDataPath("$PROJECT_ROOT") - public class Jsr305 extends AbstractForeignAnnotationsTest { + public class Jsr305 { @Test public void testAllFilesPresentInJsr305() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/java8Tests/jsr305"), Pattern.compile("^(.+)\\.kt$"), null, true); @@ -607,7 +607,7 @@ public class ForeignAnnotationsTestGenerated extends AbstractForeignAnnotationsT @Nested @TestMetadata("compiler/testData/foreignAnnotations/java8Tests/typeEnhancement") @TestDataPath("$PROJECT_ROOT") - public class TypeEnhancement extends AbstractForeignAnnotationsTest { + public class TypeEnhancement { @Test public void testAllFilesPresentInTypeEnhancement() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/java8Tests/typeEnhancement"), Pattern.compile("^(.+)\\.kt$"), null, true); diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxCodegenTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxCodegenTestGenerated.java index 241a846a4dd..0d276b1f143 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxCodegenTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxCodegenTestGenerated.java @@ -28,7 +28,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/annotations") @TestDataPath("$PROJECT_ROOT") - public class Annotations extends AbstractBlackBoxCodegenTest { + public class Annotations { @Test public void testAllFilesPresentInAnnotations() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/annotations"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -124,18 +124,66 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/annotations/delegatedPropertySetter.kt"); } + @Test + @TestMetadata("divisionByZeroInJava.kt") + public void testDivisionByZeroInJava() throws Exception { + runTest("compiler/testData/codegen/box/annotations/divisionByZeroInJava.kt"); + } + @Test @TestMetadata("fileClassWithFileAnnotation.kt") public void testFileClassWithFileAnnotation() throws Exception { runTest("compiler/testData/codegen/box/annotations/fileClassWithFileAnnotation.kt"); } + @Test + @TestMetadata("javaAnnotationArrayValueDefault.kt") + public void testJavaAnnotationArrayValueDefault() throws Exception { + runTest("compiler/testData/codegen/box/annotations/javaAnnotationArrayValueDefault.kt"); + } + + @Test + @TestMetadata("javaAnnotationArrayValueNoDefault.kt") + public void testJavaAnnotationArrayValueNoDefault() throws Exception { + runTest("compiler/testData/codegen/box/annotations/javaAnnotationArrayValueNoDefault.kt"); + } + + @Test + @TestMetadata("javaAnnotationCall.kt") + public void testJavaAnnotationCall() throws Exception { + runTest("compiler/testData/codegen/box/annotations/javaAnnotationCall.kt"); + } + + @Test + @TestMetadata("javaAnnotationDefault.kt") + public void testJavaAnnotationDefault() throws Exception { + runTest("compiler/testData/codegen/box/annotations/javaAnnotationDefault.kt"); + } + @Test @TestMetadata("javaAnnotationOnProperty.kt") public void testJavaAnnotationOnProperty() throws Exception { runTest("compiler/testData/codegen/box/annotations/javaAnnotationOnProperty.kt"); } + @Test + @TestMetadata("javaNegativePropertyAsAnnotationParameter.kt") + public void testJavaNegativePropertyAsAnnotationParameter() throws Exception { + runTest("compiler/testData/codegen/box/annotations/javaNegativePropertyAsAnnotationParameter.kt"); + } + + @Test + @TestMetadata("javaPropertyAsAnnotationParameter.kt") + public void testJavaPropertyAsAnnotationParameter() throws Exception { + runTest("compiler/testData/codegen/box/annotations/javaPropertyAsAnnotationParameter.kt"); + } + + @Test + @TestMetadata("javaPropertyWithIntInitializer.kt") + public void testJavaPropertyWithIntInitializer() throws Exception { + runTest("compiler/testData/codegen/box/annotations/javaPropertyWithIntInitializer.kt"); + } + @Test @TestMetadata("jvmAnnotationFlags.kt") public void testJvmAnnotationFlags() throws Exception { @@ -220,6 +268,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/annotations/resolveWithLowPriorityAnnotation.kt"); } + @Test + @TestMetadata("retentionInJava.kt") + public void testRetentionInJava() throws Exception { + runTest("compiler/testData/codegen/box/annotations/retentionInJava.kt"); + } + @Test @TestMetadata("singleAssignmentToVarargInAnnotation.kt") public void testSingleAssignmentToVarargInAnnotation() throws Exception { @@ -265,7 +319,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/annotations/annotatedLambda") @TestDataPath("$PROJECT_ROOT") - public class AnnotatedLambda extends AbstractBlackBoxCodegenTest { + public class AnnotatedLambda { @Test public void testAllFilesPresentInAnnotatedLambda() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/annotations/annotatedLambda"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -302,10 +356,56 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { } } + @Nested + @TestMetadata("compiler/testData/codegen/box/annotations/kClassMapping") + @TestDataPath("$PROJECT_ROOT") + public class KClassMapping { + @Test + public void testAllFilesPresentInKClassMapping() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/annotations/kClassMapping"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); + } + + @Test + @TestMetadata("arrayClassParameter.kt") + public void testArrayClassParameter() throws Exception { + runTest("compiler/testData/codegen/box/annotations/kClassMapping/arrayClassParameter.kt"); + } + + @Test + @TestMetadata("arrayClassParameterOnJavaClass.kt") + public void testArrayClassParameterOnJavaClass() throws Exception { + runTest("compiler/testData/codegen/box/annotations/kClassMapping/arrayClassParameterOnJavaClass.kt"); + } + + @Test + @TestMetadata("classParameter.kt") + public void testClassParameter() throws Exception { + runTest("compiler/testData/codegen/box/annotations/kClassMapping/classParameter.kt"); + } + + @Test + @TestMetadata("classParameterOnJavaClass.kt") + public void testClassParameterOnJavaClass() throws Exception { + runTest("compiler/testData/codegen/box/annotations/kClassMapping/classParameterOnJavaClass.kt"); + } + + @Test + @TestMetadata("varargClassParameter.kt") + public void testVarargClassParameter() throws Exception { + runTest("compiler/testData/codegen/box/annotations/kClassMapping/varargClassParameter.kt"); + } + + @Test + @TestMetadata("varargClassParameterOnJavaClass.kt") + public void testVarargClassParameterOnJavaClass() throws Exception { + runTest("compiler/testData/codegen/box/annotations/kClassMapping/varargClassParameterOnJavaClass.kt"); + } + } + @Nested @TestMetadata("compiler/testData/codegen/box/annotations/typeAnnotations") @TestDataPath("$PROJECT_ROOT") - public class TypeAnnotations extends AbstractBlackBoxCodegenTest { + public class TypeAnnotations { @Test public void testAllFilesPresentInTypeAnnotations() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/annotations/typeAnnotations"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -323,6 +423,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/annotations/typeAnnotations/implicitReturn.kt"); } + @Test + @TestMetadata("implicitReturnAgainstCompiled.kt") + public void testImplicitReturnAgainstCompiled() throws Exception { + runTest("compiler/testData/codegen/box/annotations/typeAnnotations/implicitReturnAgainstCompiled.kt"); + } + @Test @TestMetadata("kt41484.kt") public void testKt41484() throws Exception { @@ -352,7 +458,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/argumentOrder") @TestDataPath("$PROJECT_ROOT") - public class ArgumentOrder extends AbstractBlackBoxCodegenTest { + public class ArgumentOrder { @Test public void testAllFilesPresentInArgumentOrder() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/argumentOrder"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -458,7 +564,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/arrays") @TestDataPath("$PROJECT_ROOT") - public class Arrays extends AbstractBlackBoxCodegenTest { + public class Arrays { @Test public void testAllFilesPresentInArrays() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/arrays"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -845,7 +951,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/arrays/arraysOfInlineClass") @TestDataPath("$PROJECT_ROOT") - public class ArraysOfInlineClass extends AbstractBlackBoxCodegenTest { + public class ArraysOfInlineClass { @Test @TestMetadata("accessArrayOfInlineClass.kt") public void testAccessArrayOfInlineClass() throws Exception { @@ -873,7 +979,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/arrays/forInReversed") @TestDataPath("$PROJECT_ROOT") - public class ForInReversed extends AbstractBlackBoxCodegenTest { + public class ForInReversed { @Test public void testAllFilesPresentInForInReversed() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/arrays/forInReversed"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -907,7 +1013,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/arrays/multiDecl") @TestDataPath("$PROJECT_ROOT") - public class MultiDecl extends AbstractBlackBoxCodegenTest { + public class MultiDecl { @Test public void testAllFilesPresentInMultiDecl() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/arrays/multiDecl"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -964,7 +1070,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/arrays/multiDecl/int") @TestDataPath("$PROJECT_ROOT") - public class Int extends AbstractBlackBoxCodegenTest { + public class Int { @Test public void testAllFilesPresentInInt() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/arrays/multiDecl/int"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -998,7 +1104,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/arrays/multiDecl/long") @TestDataPath("$PROJECT_ROOT") - public class Long extends AbstractBlackBoxCodegenTest { + public class Long { @Test public void testAllFilesPresentInLong() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/arrays/multiDecl/long"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -1034,7 +1140,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/assert") @TestDataPath("$PROJECT_ROOT") - public class Assert extends AbstractBlackBoxCodegenTest { + public class Assert { @Test public void testAllFilesPresentInAssert() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/assert"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -1055,7 +1161,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/assert/jvm") @TestDataPath("$PROJECT_ROOT") - public class Jvm extends AbstractBlackBoxCodegenTest { + public class Jvm { @Test public void testAllFilesPresentInJvm() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/assert/jvm"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -1198,7 +1304,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/binaryOp") @TestDataPath("$PROJECT_ROOT") - public class BinaryOp extends AbstractBlackBoxCodegenTest { + public class BinaryOp { @Test public void testAllFilesPresentInBinaryOp() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/binaryOp"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -1364,7 +1470,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/boxingOptimization") @TestDataPath("$PROJECT_ROOT") - public class BoxingOptimization extends AbstractBlackBoxCodegenTest { + public class BoxingOptimization { @Test public void testAllFilesPresentInBoxingOptimization() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/boxingOptimization"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -1560,7 +1666,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/bridges") @TestDataPath("$PROJECT_ROOT") - public class Bridges extends AbstractBlackBoxCodegenTest { + public class Bridges { @Test @TestMetadata("abstractOverrideBridge.kt") public void testAbstractOverrideBridge() throws Exception { @@ -1917,7 +2023,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/bridges/substitutionInSuperClass") @TestDataPath("$PROJECT_ROOT") - public class SubstitutionInSuperClass extends AbstractBlackBoxCodegenTest { + public class SubstitutionInSuperClass { @Test @TestMetadata("abstractFun.kt") public void testAbstractFun() throws Exception { @@ -1994,7 +2100,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/builtinStubMethods") @TestDataPath("$PROJECT_ROOT") - public class BuiltinStubMethods extends AbstractBlackBoxCodegenTest { + public class BuiltinStubMethods { @Test @TestMetadata("abstractMember.kt") public void testAbstractMember() throws Exception { @@ -2141,7 +2247,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/builtinStubMethods/extendJavaCollections") @TestDataPath("$PROJECT_ROOT") - public class ExtendJavaCollections extends AbstractBlackBoxCodegenTest { + public class ExtendJavaCollections { @Test @TestMetadata("abstractList.kt") public void testAbstractList() throws Exception { @@ -2193,7 +2299,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/builtinStubMethods/mapGetOrDefault") @TestDataPath("$PROJECT_ROOT") - public class MapGetOrDefault extends AbstractBlackBoxCodegenTest { + public class MapGetOrDefault { @Test public void testAllFilesPresentInMapGetOrDefault() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builtinStubMethods/mapGetOrDefault"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -2221,7 +2327,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/builtinStubMethods/mapRemove") @TestDataPath("$PROJECT_ROOT") - public class MapRemove extends AbstractBlackBoxCodegenTest { + public class MapRemove { @Test public void testAllFilesPresentInMapRemove() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builtinStubMethods/mapRemove"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -2256,7 +2362,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/callableReference") @TestDataPath("$PROJECT_ROOT") - public class CallableReference extends AbstractBlackBoxCodegenTest { + public class CallableReference { @Test public void testAllFilesPresentInCallableReference() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/callableReference"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -2274,6 +2380,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/callableReference/classesAreSynthetic.kt"); } + @Test + @TestMetadata("constructor.kt") + public void testConstructor() throws Exception { + runTest("compiler/testData/codegen/box/callableReference/constructor.kt"); + } + @Test @TestMetadata("genericConstructorReference.kt") public void testGenericConstructorReference() throws Exception { @@ -2292,6 +2404,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/callableReference/javaField.kt"); } + @Test + @TestMetadata("kt16412.kt") + public void testKt16412() throws Exception { + runTest("compiler/testData/codegen/box/callableReference/kt16412.kt"); + } + @Test @TestMetadata("kt16752.kt") public void testKt16752() throws Exception { @@ -2340,10 +2458,28 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/callableReference/optimizedSuperclasses_before.kt"); } + @Test + @TestMetadata("publicFinalField.kt") + public void testPublicFinalField() throws Exception { + runTest("compiler/testData/codegen/box/callableReference/publicFinalField.kt"); + } + + @Test + @TestMetadata("publicMutableField.kt") + public void testPublicMutableField() throws Exception { + runTest("compiler/testData/codegen/box/callableReference/publicMutableField.kt"); + } + + @Test + @TestMetadata("staticMethod.kt") + public void testStaticMethod() throws Exception { + runTest("compiler/testData/codegen/box/callableReference/staticMethod.kt"); + } + @Nested @TestMetadata("compiler/testData/codegen/box/callableReference/adaptedReferences") @TestDataPath("$PROJECT_ROOT") - public class AdaptedReferences extends AbstractBlackBoxCodegenTest { + public class AdaptedReferences { @Test public void testAllFilesPresentInAdaptedReferences() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/callableReference/adaptedReferences"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -2514,7 +2650,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/callableReference/adaptedReferences/suspendConversion") @TestDataPath("$PROJECT_ROOT") - public class SuspendConversion extends AbstractBlackBoxCodegenTest { + public class SuspendConversion { @Test @TestMetadata("adaptedWithCoercionToUnit.kt") public void testAdaptedWithCoercionToUnit() throws Exception { @@ -2615,7 +2751,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/callableReference/bound") @TestDataPath("$PROJECT_ROOT") - public class Bound extends AbstractBlackBoxCodegenTest { + public class Bound { @Test @TestMetadata("adapted.kt") public void testAdapted() throws Exception { @@ -2792,7 +2928,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/callableReference/bound/equals") @TestDataPath("$PROJECT_ROOT") - public class Equals extends AbstractBlackBoxCodegenTest { + public class Equals { @Test public void testAllFilesPresentInEquals() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/callableReference/bound/equals"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -2827,7 +2963,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/callableReference/equality") @TestDataPath("$PROJECT_ROOT") - public class Equality extends AbstractBlackBoxCodegenTest { + public class Equality { @Test public void testAllFilesPresentInEquality() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/callableReference/equality"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -2909,7 +3045,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/callableReference/function") @TestDataPath("$PROJECT_ROOT") - public class Function extends AbstractBlackBoxCodegenTest { + public class Function { @Test @TestMetadata("abstractClassMember.kt") public void testAbstractClassMember() throws Exception { @@ -3248,7 +3384,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/callableReference/function/local") @TestDataPath("$PROJECT_ROOT") - public class Local extends AbstractBlackBoxCodegenTest { + public class Local { @Test public void testAllFilesPresentInLocal() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/callableReference/function/local"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -3379,7 +3515,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/callableReference/property") @TestDataPath("$PROJECT_ROOT") - public class Property extends AbstractBlackBoxCodegenTest { + public class Property { @Test @TestMetadata("accessViaSubclass.kt") public void testAccessViaSubclass() throws Exception { @@ -3569,7 +3705,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/callableReference/serializability") @TestDataPath("$PROJECT_ROOT") - public class Serializability extends AbstractBlackBoxCodegenTest { + public class Serializability { @Test @TestMetadata("adaptedReferences.kt") public void testAdaptedReferences() throws Exception { @@ -3616,7 +3752,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/casts") @TestDataPath("$PROJECT_ROOT") - public class Casts extends AbstractBlackBoxCodegenTest { + public class Casts { @Test public void testAllFilesPresentInCasts() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/casts"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -3775,7 +3911,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/casts/functions") @TestDataPath("$PROJECT_ROOT") - public class Functions extends AbstractBlackBoxCodegenTest { + public class Functions { @Test public void testAllFilesPresentInFunctions() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/casts/functions"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -3863,7 +3999,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/casts/javaInterop") @TestDataPath("$PROJECT_ROOT") - public class JavaInterop extends AbstractBlackBoxCodegenTest { + public class JavaInterop { @Test public void testAllFilesPresentInJavaInterop() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/casts/javaInterop"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -3957,7 +4093,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/casts/literalExpressionAsGenericArgument") @TestDataPath("$PROJECT_ROOT") - public class LiteralExpressionAsGenericArgument extends AbstractBlackBoxCodegenTest { + public class LiteralExpressionAsGenericArgument { @Test public void testAllFilesPresentInLiteralExpressionAsGenericArgument() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/casts/literalExpressionAsGenericArgument"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -4009,7 +4145,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/casts/mutableCollections") @TestDataPath("$PROJECT_ROOT") - public class MutableCollections extends AbstractBlackBoxCodegenTest { + public class MutableCollections { @Test public void testAllFilesPresentInMutableCollections() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/casts/mutableCollections"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -4068,7 +4204,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/checkcastOptimization") @TestDataPath("$PROJECT_ROOT") - public class CheckcastOptimization extends AbstractBlackBoxCodegenTest { + public class CheckcastOptimization { @Test public void testAllFilesPresentInCheckcastOptimization() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/checkcastOptimization"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -4090,7 +4226,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/classLiteral") @TestDataPath("$PROJECT_ROOT") - public class ClassLiteral extends AbstractBlackBoxCodegenTest { + public class ClassLiteral { @Test public void testAllFilesPresentInClassLiteral() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/classLiteral"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -4111,7 +4247,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/classLiteral/bound") @TestDataPath("$PROJECT_ROOT") - public class Bound extends AbstractBlackBoxCodegenTest { + public class Bound { @Test public void testAllFilesPresentInBound() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/classLiteral/bound"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -4151,7 +4287,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/classLiteral/java") @TestDataPath("$PROJECT_ROOT") - public class Java extends AbstractBlackBoxCodegenTest { + public class Java { @Test public void testAllFilesPresentInJava() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/classLiteral/java"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -4210,7 +4346,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/classes") @TestDataPath("$PROJECT_ROOT") - public class Classes extends AbstractBlackBoxCodegenTest { + public class Classes { @Test public void testAllFilesPresentInClasses() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/classes"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -4933,7 +5069,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/classes/inner") @TestDataPath("$PROJECT_ROOT") - public class Inner extends AbstractBlackBoxCodegenTest { + public class Inner { @Test public void testAllFilesPresentInInner() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/classes/inner"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -4986,7 +5122,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/closures") @TestDataPath("$PROJECT_ROOT") - public class Closures extends AbstractBlackBoxCodegenTest { + public class Closures { @Test public void testAllFilesPresentInClosures() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/closures"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -5124,6 +5260,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/closures/kt2151.kt"); } + @Test + @TestMetadata("kt23881.kt") + public void testKt23881() throws Exception { + runTest("compiler/testData/codegen/box/closures/kt23881.kt"); + } + @Test @TestMetadata("kt3152.kt") public void testKt3152() throws Exception { @@ -5271,7 +5413,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall") @TestDataPath("$PROJECT_ROOT") - public class CaptureInSuperConstructorCall extends AbstractBlackBoxCodegenTest { + public class CaptureInSuperConstructorCall { @Test public void testAllFilesPresentInCaptureInSuperConstructorCall() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/closures/captureInSuperConstructorCall"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -5473,7 +5615,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/closures/captureOuterProperty") @TestDataPath("$PROJECT_ROOT") - public class CaptureOuterProperty extends AbstractBlackBoxCodegenTest { + public class CaptureOuterProperty { @Test public void testAllFilesPresentInCaptureOuterProperty() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/closures/captureOuterProperty"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -5531,7 +5673,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/closures/capturedVarsOptimization") @TestDataPath("$PROJECT_ROOT") - public class CapturedVarsOptimization extends AbstractBlackBoxCodegenTest { + public class CapturedVarsOptimization { @Test public void testAllFilesPresentInCapturedVarsOptimization() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/closures/capturedVarsOptimization"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -5613,7 +5755,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/closures/closureInsideClosure") @TestDataPath("$PROJECT_ROOT") - public class ClosureInsideClosure extends AbstractBlackBoxCodegenTest { + public class ClosureInsideClosure { @Test public void testAllFilesPresentInClosureInsideClosure() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/closures/closureInsideClosure"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -5660,7 +5802,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/collectionLiterals") @TestDataPath("$PROJECT_ROOT") - public class CollectionLiterals extends AbstractBlackBoxCodegenTest { + public class CollectionLiterals { @Test public void testAllFilesPresentInCollectionLiterals() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/collectionLiterals"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -5694,7 +5836,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/collections") @TestDataPath("$PROJECT_ROOT") - public class Collections extends AbstractBlackBoxCodegenTest { + public class Collections { @Test @TestMetadata("addCollectionStubWithCovariantOverride.kt") public void testAddCollectionStubWithCovariantOverride() throws Exception { @@ -5908,7 +6050,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/companion") @TestDataPath("$PROJECT_ROOT") - public class Companion extends AbstractBlackBoxCodegenTest { + public class Companion { @Test public void testAllFilesPresentInCompanion() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/companion"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -5930,7 +6072,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/compatibility") @TestDataPath("$PROJECT_ROOT") - public class Compatibility extends AbstractBlackBoxCodegenTest { + public class Compatibility { @Test public void testAllFilesPresentInCompatibility() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/compatibility"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -5943,10 +6085,884 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { } } + @Nested + @TestMetadata("compiler/testData/codegen/box/compileKotlinAgainstKotlin") + @TestDataPath("$PROJECT_ROOT") + public class CompileKotlinAgainstKotlin { + @Test + public void testAllFilesPresentInCompileKotlinAgainstKotlin() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/compileKotlinAgainstKotlin"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); + } + + @Test + @TestMetadata("annotationInInterface.kt") + public void testAnnotationInInterface() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/annotationInInterface.kt"); + } + + @Test + @TestMetadata("annotationOnTypeUseInTypeAlias.kt") + public void testAnnotationOnTypeUseInTypeAlias() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/annotationOnTypeUseInTypeAlias.kt"); + } + + @Test + @TestMetadata("annotationsOnTypeAliases.kt") + public void testAnnotationsOnTypeAliases() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/annotationsOnTypeAliases.kt"); + } + + @Test + @TestMetadata("callDeserializedPropertyOnInlineClassType.kt") + public void testCallDeserializedPropertyOnInlineClassType() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/callDeserializedPropertyOnInlineClassType.kt"); + } + + @Test + @TestMetadata("callDeserializedPropertyOnInlineClassTypeOldMangling.kt") + public void testCallDeserializedPropertyOnInlineClassTypeOldMangling() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/callDeserializedPropertyOnInlineClassTypeOldMangling.kt"); + } + + @Test + @TestMetadata("callsToMultifileClassFromOtherPackage.kt") + public void testCallsToMultifileClassFromOtherPackage() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/callsToMultifileClassFromOtherPackage.kt"); + } + + @Test + @TestMetadata("clashingFakeOverrideSignatures.kt") + public void testClashingFakeOverrideSignatures() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/clashingFakeOverrideSignatures.kt"); + } + + @Test + @TestMetadata("classInObject.kt") + public void testClassInObject() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/classInObject.kt"); + } + + @Test + @TestMetadata("companionObjectInEnum.kt") + public void testCompanionObjectInEnum() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/companionObjectInEnum.kt"); + } + + @Test + @TestMetadata("companionObjectMember.kt") + public void testCompanionObjectMember() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/companionObjectMember.kt"); + } + + @Test + @TestMetadata("constPropertyReferenceFromMultifileClass.kt") + public void testConstPropertyReferenceFromMultifileClass() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/constPropertyReferenceFromMultifileClass.kt"); + } + + @Test + @TestMetadata("constructorVararg.kt") + public void testConstructorVararg() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/constructorVararg.kt"); + } + + @Test + @TestMetadata("constructorWithInlineClassParametersInBinaryDependencies.kt") + public void testConstructorWithInlineClassParametersInBinaryDependencies() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/constructorWithInlineClassParametersInBinaryDependencies.kt"); + } + + @Test + @TestMetadata("constructorWithInlineClassParametersInBinaryDependenciesOldMangling.kt") + public void testConstructorWithInlineClassParametersInBinaryDependenciesOldMangling() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/constructorWithInlineClassParametersInBinaryDependenciesOldMangling.kt"); + } + + @Test + @TestMetadata("copySamOnInline.kt") + public void testCopySamOnInline() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/copySamOnInline.kt"); + } + + @Test + @TestMetadata("copySamOnInline2.kt") + public void testCopySamOnInline2() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/copySamOnInline2.kt"); + } + + @Test + @TestMetadata("coroutinesBinary.kt") + public void testCoroutinesBinary() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/coroutinesBinary.kt"); + } + + @Test + @TestMetadata("defaultConstructor.kt") + public void testDefaultConstructor() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/defaultConstructor.kt"); + } + + @Test + @TestMetadata("defaultLambdaRegeneration.kt") + public void testDefaultLambdaRegeneration() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/defaultLambdaRegeneration.kt"); + } + + @Test + @TestMetadata("defaultLambdaRegeneration2.kt") + public void testDefaultLambdaRegeneration2() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/defaultLambdaRegeneration2.kt"); + } + + @Test + @TestMetadata("defaultWithInlineClassAndReceivers.kt") + public void testDefaultWithInlineClassAndReceivers() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/defaultWithInlineClassAndReceivers.kt"); + } + + @Test + @TestMetadata("defaultWithInlineClassAndReceiversOldMangling.kt") + public void testDefaultWithInlineClassAndReceiversOldMangling() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/defaultWithInlineClassAndReceiversOldMangling.kt"); + } + + @Test + @TestMetadata("delegatedDefault.kt") + public void testDelegatedDefault() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/delegatedDefault.kt"); + } + + @Test + @TestMetadata("delegationAndAnnotations.kt") + public void testDelegationAndAnnotations() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/delegationAndAnnotations.kt"); + } + + @Test + @TestMetadata("doublyNestedClass.kt") + public void testDoublyNestedClass() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/doublyNestedClass.kt"); + } + + @Test + @TestMetadata("enum.kt") + public void testEnum() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/enum.kt"); + } + + @Test + @TestMetadata("expectClassActualTypeAlias.kt") + public void testExpectClassActualTypeAlias() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/expectClassActualTypeAlias.kt"); + } + + @Test + @TestMetadata("fakeOverridesForIntersectionTypes.kt") + public void testFakeOverridesForIntersectionTypes() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/fakeOverridesForIntersectionTypes.kt"); + } + + @Test + @TestMetadata("importCompanion.kt") + public void testImportCompanion() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/importCompanion.kt"); + } + + @Test + @TestMetadata("inlineClassFakeOverrideMangling.kt") + public void testInlineClassFakeOverrideMangling() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/inlineClassFakeOverrideMangling.kt"); + } + + @Test + @TestMetadata("inlineClassFakeOverrideManglingOldMangling.kt") + public void testInlineClassFakeOverrideManglingOldMangling() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/inlineClassFakeOverrideManglingOldMangling.kt"); + } + + @Test + @TestMetadata("inlineClassFromBinaryDependencies.kt") + public void testInlineClassFromBinaryDependencies() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/inlineClassFromBinaryDependencies.kt"); + } + + @Test + @TestMetadata("inlineClassFromBinaryDependenciesOldMangling.kt") + public void testInlineClassFromBinaryDependenciesOldMangling() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/inlineClassFromBinaryDependenciesOldMangling.kt"); + } + + @Test + @TestMetadata("inlineClassInlineFunctionCall.kt") + public void testInlineClassInlineFunctionCall() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/inlineClassInlineFunctionCall.kt"); + } + + @Test + @TestMetadata("inlineClassInlineFunctionCallOldMangling.kt") + public void testInlineClassInlineFunctionCallOldMangling() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/inlineClassInlineFunctionCallOldMangling.kt"); + } + + @Test + @TestMetadata("inlineClassInlineProperty.kt") + public void testInlineClassInlineProperty() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/inlineClassInlineProperty.kt"); + } + + @Test + @TestMetadata("inlineClassInlinePropertyOldMangling.kt") + public void testInlineClassInlinePropertyOldMangling() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/inlineClassInlinePropertyOldMangling.kt"); + } + + @Test + @TestMetadata("inlineClassesOldMangling.kt") + public void testInlineClassesOldMangling() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/inlineClassesOldMangling.kt"); + } + + @Test + @TestMetadata("inlinedConstants.kt") + public void testInlinedConstants() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/inlinedConstants.kt"); + } + + @Test + @TestMetadata("innerClassConstructor.kt") + public void testInnerClassConstructor() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/innerClassConstructor.kt"); + } + + @Test + @TestMetadata("interfaceDelegationAndBridgesProcessing.kt") + public void testInterfaceDelegationAndBridgesProcessing() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/interfaceDelegationAndBridgesProcessing.kt"); + } + + @Test + @TestMetadata("internalSetterOverridden.kt") + public void testInternalSetterOverridden() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/internalSetterOverridden.kt"); + } + + @Test + @TestMetadata("internalWithDefaultArgs.kt") + public void testInternalWithDefaultArgs() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/internalWithDefaultArgs.kt"); + } + + @Test + @TestMetadata("internalWithInlineClass.kt") + public void testInternalWithInlineClass() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/internalWithInlineClass.kt"); + } + + @Test + @TestMetadata("internalWithOtherModuleName.kt") + public void testInternalWithOtherModuleName() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/internalWithOtherModuleName.kt"); + } + + @Test + @TestMetadata("intersectionOverrideProperies.kt") + public void testIntersectionOverrideProperies() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/intersectionOverrideProperies.kt"); + } + + @Test + @TestMetadata("jvmField.kt") + public void testJvmField() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvmField.kt"); + } + + @Test + @TestMetadata("jvmFieldInAnnotationCompanion.kt") + public void testJvmFieldInAnnotationCompanion() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvmFieldInAnnotationCompanion.kt"); + } + + @Test + @TestMetadata("jvmFieldInConstructor.kt") + public void testJvmFieldInConstructor() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvmFieldInConstructor.kt"); + } + + @Test + @TestMetadata("jvmFieldInInterfaceCompanion.kt") + public void testJvmFieldInInterfaceCompanion() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvmFieldInInterfaceCompanion.kt"); + } + + @Test + @TestMetadata("jvmNames.kt") + public void testJvmNames() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvmNames.kt"); + } + + @Test + @TestMetadata("jvmPackageName.kt") + public void testJvmPackageName() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvmPackageName.kt"); + } + + @Test + @TestMetadata("jvmPackageNameInRootPackage.kt") + public void testJvmPackageNameInRootPackage() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvmPackageNameInRootPackage.kt"); + } + + @Test + @TestMetadata("jvmPackageNameMultifileClass.kt") + public void testJvmPackageNameMultifileClass() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvmPackageNameMultifileClass.kt"); + } + + @Test + @TestMetadata("jvmPackageNameWithJvmName.kt") + public void testJvmPackageNameWithJvmName() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvmPackageNameWithJvmName.kt"); + } + + @Test + @TestMetadata("jvmStaticInObject.kt") + public void testJvmStaticInObject() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvmStaticInObject.kt"); + } + + @Test + @TestMetadata("jvmStaticInObjectPropertyReference.kt") + public void testJvmStaticInObjectPropertyReference() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvmStaticInObjectPropertyReference.kt"); + } + + @Test + @TestMetadata("kotlinPropertyAsAnnotationParameter.kt") + public void testKotlinPropertyAsAnnotationParameter() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/kotlinPropertyAsAnnotationParameter.kt"); + } + + @Test + @TestMetadata("kt14012.kt") + public void testKt14012() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/kt14012.kt"); + } + + @Test + @TestMetadata("kt14012_multi.kt") + public void testKt14012_multi() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/kt14012_multi.kt"); + } + + @Test + @TestMetadata("kt21775.kt") + public void testKt21775() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/kt21775.kt"); + } + + @Test + @TestMetadata("metadataForMembersInLocalClassInInitializer.kt") + public void testMetadataForMembersInLocalClassInInitializer() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/metadataForMembersInLocalClassInInitializer.kt"); + } + + @Test + @TestMetadata("multifileClassInlineFunctionAccessingProperty.kt") + public void testMultifileClassInlineFunctionAccessingProperty() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/multifileClassInlineFunctionAccessingProperty.kt"); + } + + @Test + @TestMetadata("multifileClassWithTypealias.kt") + public void testMultifileClassWithTypealias() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/multifileClassWithTypealias.kt"); + } + + @Test + @TestMetadata("nestedClass.kt") + public void testNestedClass() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/nestedClass.kt"); + } + + @Test + @TestMetadata("nestedClassInAnnotationArgument.kt") + public void testNestedClassInAnnotationArgument() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/nestedClassInAnnotationArgument.kt"); + } + + @Test + @TestMetadata("nestedEnum.kt") + public void testNestedEnum() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/nestedEnum.kt"); + } + + @Test + @TestMetadata("nestedFunctionTypeAliasExpansion.kt") + public void testNestedFunctionTypeAliasExpansion() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/nestedFunctionTypeAliasExpansion.kt"); + } + + @Test + @TestMetadata("nestedObject.kt") + public void testNestedObject() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/nestedObject.kt"); + } + + @Test + @TestMetadata("nestedTypeAliasExpansion.kt") + public void testNestedTypeAliasExpansion() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/nestedTypeAliasExpansion.kt"); + } + + @Test + @TestMetadata("noExplicitOverrideForDelegatedFromSupertype.kt") + public void testNoExplicitOverrideForDelegatedFromSupertype() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/noExplicitOverrideForDelegatedFromSupertype.kt"); + } + + @Test + @TestMetadata("optionalAnnotation.kt") + public void testOptionalAnnotation() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/optionalAnnotation.kt"); + } + + @Test + @TestMetadata("platformTypes.kt") + public void testPlatformTypes() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/platformTypes.kt"); + } + + @Test + @TestMetadata("privateCompanionObjectValInDifferentModule.kt") + public void testPrivateCompanionObjectValInDifferentModule() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/privateCompanionObjectValInDifferentModule.kt"); + } + + @Test + @TestMetadata("privateCompanionObjectValInDifferentModuleOldMangling.kt") + public void testPrivateCompanionObjectValInDifferentModuleOldMangling() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/privateCompanionObjectValInDifferentModuleOldMangling.kt"); + } + + @Test + @TestMetadata("privateTopLevelValInDifferentModule.kt") + public void testPrivateTopLevelValInDifferentModule() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/privateTopLevelValInDifferentModule.kt"); + } + + @Test + @TestMetadata("privateTopLevelValInDifferentModuleOldMangling.kt") + public void testPrivateTopLevelValInDifferentModuleOldMangling() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/privateTopLevelValInDifferentModuleOldMangling.kt"); + } + + @Test + @TestMetadata("propertyReference.kt") + public void testPropertyReference() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/propertyReference.kt"); + } + + @Test + @TestMetadata("recursiveGeneric.kt") + public void testRecursiveGeneric() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/recursiveGeneric.kt"); + } + + @Test + @TestMetadata("reflectTopLevelFunctionOtherFile.kt") + public void testReflectTopLevelFunctionOtherFile() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/reflectTopLevelFunctionOtherFile.kt"); + } + + @Test + @TestMetadata("sealedClass.kt") + public void testSealedClass() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/sealedClass.kt"); + } + + @Test + @TestMetadata("secondaryConstructors.kt") + public void testSecondaryConstructors() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/secondaryConstructors.kt"); + } + + @Test + @TestMetadata("simple.kt") + public void testSimple() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/simple.kt"); + } + + @Test + @TestMetadata("simpleValAnonymousObject.kt") + public void testSimpleValAnonymousObject() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/simpleValAnonymousObject.kt"); + } + + @Test + @TestMetadata("specialBridgesInDependencies.kt") + public void testSpecialBridgesInDependencies() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/specialBridgesInDependencies.kt"); + } + + @Test + @TestMetadata("starImportEnum.kt") + public void testStarImportEnum() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/starImportEnum.kt"); + } + + @Test + @TestMetadata("suspendFunWithDefaultMangling.kt") + public void testSuspendFunWithDefaultMangling() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/suspendFunWithDefaultMangling.kt"); + } + + @Test + @TestMetadata("suspendFunWithDefaultOldMangling.kt") + public void testSuspendFunWithDefaultOldMangling() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/suspendFunWithDefaultOldMangling.kt"); + } + + @Test + @TestMetadata("targetedJvmName.kt") + public void testTargetedJvmName() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/targetedJvmName.kt"); + } + + @Test + @TestMetadata("typeAliasesKt13181.kt") + public void testTypeAliasesKt13181() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/typeAliasesKt13181.kt"); + } + + @Test + @TestMetadata("unsignedTypesInAnnotations.kt") + public void testUnsignedTypesInAnnotations() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/unsignedTypesInAnnotations.kt"); + } + + @Test + @TestMetadata("useDeserializedFunInterface.kt") + public void testUseDeserializedFunInterface() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/useDeserializedFunInterface.kt"); + } + + @Nested + @TestMetadata("compiler/testData/codegen/box/compileKotlinAgainstKotlin/fir") + @TestDataPath("$PROJECT_ROOT") + public class Fir { + @Test + public void testAllFilesPresentInFir() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/compileKotlinAgainstKotlin/fir"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); + } + + @Test + @TestMetadata("AnonymousObjectInProperty.kt") + public void testAnonymousObjectInProperty() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/fir/AnonymousObjectInProperty.kt"); + } + + @Test + @TestMetadata("ExistingSymbolInFakeOverride.kt") + public void testExistingSymbolInFakeOverride() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/fir/ExistingSymbolInFakeOverride.kt"); + } + + @Test + @TestMetadata("IncrementalCompilerRunner.kt") + public void testIncrementalCompilerRunner() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/fir/IncrementalCompilerRunner.kt"); + } + + @Test + @TestMetadata("IrConstAcceptMultiModule.kt") + public void testIrConstAcceptMultiModule() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/fir/IrConstAcceptMultiModule.kt"); + } + + @Test + @TestMetadata("LibraryProperty.kt") + public void testLibraryProperty() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/fir/LibraryProperty.kt"); + } + } + + @Nested + @TestMetadata("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8") + @TestDataPath("$PROJECT_ROOT") + public class Jvm8 { + @Test + public void testAllFilesPresentInJvm8() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); + } + + @Nested + @TestMetadata("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults") + @TestDataPath("$PROJECT_ROOT") + public class Defaults { + @Test + public void testAllFilesPresentInDefaults() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); + } + + @Test + @TestMetadata("superCall.kt") + public void testSuperCall() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/superCall.kt"); + } + + @Test + @TestMetadata("superCallFromInterface.kt") + public void testSuperCallFromInterface() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/superCallFromInterface.kt"); + } + + @Test + @TestMetadata("superCallFromInterface2.kt") + public void testSuperCallFromInterface2() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/superCallFromInterface2.kt"); + } + + @Test + @TestMetadata("superPropAccess.kt") + public void testSuperPropAccess() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/superPropAccess.kt"); + } + + @Test + @TestMetadata("superPropAccessFromInterface.kt") + public void testSuperPropAccessFromInterface() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/superPropAccessFromInterface.kt"); + } + + @Test + @TestMetadata("superPropAccessFromInterface2.kt") + public void testSuperPropAccessFromInterface2() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/superPropAccessFromInterface2.kt"); + } + + @Nested + @TestMetadata("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility") + @TestDataPath("$PROJECT_ROOT") + public class AllCompatibility { + @Test + public void testAllFilesPresentInAllCompatibility() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); + } + + @Test + @TestMetadata("callStackTrace.kt") + public void testCallStackTrace() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/callStackTrace.kt"); + } + + @Test + @TestMetadata("superCall.kt") + public void testSuperCall() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superCall.kt"); + } + + @Test + @TestMetadata("superCallFromInterface.kt") + public void testSuperCallFromInterface() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superCallFromInterface.kt"); + } + + @Test + @TestMetadata("superCallFromInterface2.kt") + public void testSuperCallFromInterface2() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superCallFromInterface2.kt"); + } + + @Test + @TestMetadata("superPropAccess.kt") + public void testSuperPropAccess() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superPropAccess.kt"); + } + + @Test + @TestMetadata("superPropAccessFromInterface.kt") + public void testSuperPropAccessFromInterface() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superPropAccessFromInterface.kt"); + } + + @Test + @TestMetadata("superPropAccessFromInterface2.kt") + public void testSuperPropAccessFromInterface2() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superPropAccessFromInterface2.kt"); + } + + @Nested + @TestMetadata("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/delegationBy") + @TestDataPath("$PROJECT_ROOT") + public class DelegationBy { + @Test + public void testAllFilesPresentInDelegationBy() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/delegationBy"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); + } + + @Test + @TestMetadata("simple.kt") + public void testSimple() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/delegationBy/simple.kt"); + } + + @Test + @TestMetadata("simpleProperty.kt") + public void testSimpleProperty() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/delegationBy/simpleProperty.kt"); + } + } + } + + @Nested + @TestMetadata("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/interop") + @TestDataPath("$PROJECT_ROOT") + public class Interop { + @Test + public void testAllFilesPresentInInterop() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/interop"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); + } + + @Test + @TestMetadata("likeMemberClash.kt") + public void testLikeMemberClash() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/interop/likeMemberClash.kt"); + } + + @Test + @TestMetadata("likeSpecialization.kt") + public void testLikeSpecialization() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/interop/likeSpecialization.kt"); + } + + @Test + @TestMetadata("newAndOldSchemes.kt") + public void testNewAndOldSchemes() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/interop/newAndOldSchemes.kt"); + } + + @Test + @TestMetadata("newAndOldSchemes2.kt") + public void testNewAndOldSchemes2() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/interop/newAndOldSchemes2.kt"); + } + + @Test + @TestMetadata("newAndOldSchemes2Compatibility.kt") + public void testNewAndOldSchemes2Compatibility() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/interop/newAndOldSchemes2Compatibility.kt"); + } + + @Test + @TestMetadata("newAndOldSchemes3.kt") + public void testNewAndOldSchemes3() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/interop/newAndOldSchemes3.kt"); + } + + @Test + @TestMetadata("newSchemeWithJvmDefault.kt") + public void testNewSchemeWithJvmDefault() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/interop/newSchemeWithJvmDefault.kt"); + } + } + } + + @Nested + @TestMetadata("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/jvm8against6") + @TestDataPath("$PROJECT_ROOT") + public class Jvm8against6 { + @Test + public void testAllFilesPresentInJvm8against6() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/jvm8against6"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); + } + + @Test + @TestMetadata("jdk8Against6.kt") + public void testJdk8Against6() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/jvm8against6/jdk8Against6.kt"); + } + + @Test + @TestMetadata("simpleCall.kt") + public void testSimpleCall() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/jvm8against6/simpleCall.kt"); + } + + @Test + @TestMetadata("simpleCallWithBigHierarchy.kt") + public void testSimpleCallWithBigHierarchy() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/jvm8against6/simpleCallWithBigHierarchy.kt"); + } + + @Test + @TestMetadata("simpleCallWithHierarchy.kt") + public void testSimpleCallWithHierarchy() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/jvm8against6/simpleCallWithHierarchy.kt"); + } + + @Test + @TestMetadata("simpleProp.kt") + public void testSimpleProp() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/jvm8against6/simpleProp.kt"); + } + + @Test + @TestMetadata("simplePropWithHierarchy.kt") + public void testSimplePropWithHierarchy() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/jvm8against6/simplePropWithHierarchy.kt"); + } + + @Nested + @TestMetadata("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/jvm8against6/delegation") + @TestDataPath("$PROJECT_ROOT") + public class Delegation { + @Test + public void testAllFilesPresentInDelegation() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/jvm8against6/delegation"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); + } + + @Test + @TestMetadata("diamond.kt") + public void testDiamond() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/jvm8against6/delegation/diamond.kt"); + } + + @Test + @TestMetadata("diamond2.kt") + public void testDiamond2() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/jvm8against6/delegation/diamond2.kt"); + } + + @Test + @TestMetadata("diamond3.kt") + public void testDiamond3() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/jvm8against6/delegation/diamond3.kt"); + } + } + } + } + + @Nested + @TestMetadata("compiler/testData/codegen/box/compileKotlinAgainstKotlin/typeAnnotations") + @TestDataPath("$PROJECT_ROOT") + public class TypeAnnotations { + @Test + public void testAllFilesPresentInTypeAnnotations() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/compileKotlinAgainstKotlin/typeAnnotations"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); + } + + @Test + @TestMetadata("implicitReturn.kt") + public void testImplicitReturn() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/typeAnnotations/implicitReturn.kt"); + } + } + } + @Nested @TestMetadata("compiler/testData/codegen/box/constants") @TestDataPath("$PROJECT_ROOT") - public class Constants extends AbstractBlackBoxCodegenTest { + public class Constants { @Test public void testAllFilesPresentInConstants() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/constants"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -6013,10 +7029,32 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { } } + @Nested + @TestMetadata("compiler/testData/codegen/box/constructor") + @TestDataPath("$PROJECT_ROOT") + public class Constructor { + @Test + public void testAllFilesPresentInConstructor() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/constructor"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); + } + + @Test + @TestMetadata("genericConstructor.kt") + public void testGenericConstructor() throws Exception { + runTest("compiler/testData/codegen/box/constructor/genericConstructor.kt"); + } + + @Test + @TestMetadata("secondaryConstructor.kt") + public void testSecondaryConstructor() throws Exception { + runTest("compiler/testData/codegen/box/constructor/secondaryConstructor.kt"); + } + } + @Nested @TestMetadata("compiler/testData/codegen/box/constructorCall") @TestDataPath("$PROJECT_ROOT") - public class ConstructorCall extends AbstractBlackBoxCodegenTest { + public class ConstructorCall { @Test public void testAllFilesPresentInConstructorCall() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/constructorCall"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -6128,7 +7166,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/contracts") @TestDataPath("$PROJECT_ROOT") - public class Contracts extends AbstractBlackBoxCodegenTest { + public class Contracts { @Test public void testAllFilesPresentInContracts() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/contracts"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -6210,7 +7248,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/controlStructures") @TestDataPath("$PROJECT_ROOT") - public class ControlStructures extends AbstractBlackBoxCodegenTest { + public class ControlStructures { @Test public void testAllFilesPresentInControlStructures() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/controlStructures"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -6693,7 +7731,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions") @TestDataPath("$PROJECT_ROOT") - public class BreakContinueInExpressions extends AbstractBlackBoxCodegenTest { + public class BreakContinueInExpressions { @Test public void testAllFilesPresentInBreakContinueInExpressions() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -6811,7 +7849,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/controlStructures/forInArray") @TestDataPath("$PROJECT_ROOT") - public class ForInArray extends AbstractBlackBoxCodegenTest { + public class ForInArray { @Test public void testAllFilesPresentInForInArray() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/controlStructures/forInArray"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -6881,7 +7919,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex") @TestDataPath("$PROJECT_ROOT") - public class ForInArrayWithIndex extends AbstractBlackBoxCodegenTest { + public class ForInArrayWithIndex { @Test public void testAllFilesPresentInForInArrayWithIndex() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -7011,7 +8049,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/controlStructures/forInCharSequenceWithIndex") @TestDataPath("$PROJECT_ROOT") - public class ForInCharSequenceWithIndex extends AbstractBlackBoxCodegenTest { + public class ForInCharSequenceWithIndex { @Test public void testAllFilesPresentInForInCharSequenceWithIndex() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/controlStructures/forInCharSequenceWithIndex"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -7105,7 +8143,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/controlStructures/forInIterableWithIndex") @TestDataPath("$PROJECT_ROOT") - public class ForInIterableWithIndex extends AbstractBlackBoxCodegenTest { + public class ForInIterableWithIndex { @Test public void testAllFilesPresentInForInIterableWithIndex() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/controlStructures/forInIterableWithIndex"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -7181,7 +8219,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/controlStructures/forInSequenceWithIndex") @TestDataPath("$PROJECT_ROOT") - public class ForInSequenceWithIndex extends AbstractBlackBoxCodegenTest { + public class ForInSequenceWithIndex { @Test public void testAllFilesPresentInForInSequenceWithIndex() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/controlStructures/forInSequenceWithIndex"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -7257,7 +8295,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/controlStructures/returnsNothing") @TestDataPath("$PROJECT_ROOT") - public class ReturnsNothing extends AbstractBlackBoxCodegenTest { + public class ReturnsNothing { @Test public void testAllFilesPresentInReturnsNothing() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/controlStructures/returnsNothing"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -7297,7 +8335,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions") @TestDataPath("$PROJECT_ROOT") - public class TryCatchInExpressions extends AbstractBlackBoxCodegenTest { + public class TryCatchInExpressions { @Test public void testAllFilesPresentInTryCatchInExpressions() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -7488,7 +8526,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/coroutines") @TestDataPath("$PROJECT_ROOT") - public class Coroutines extends AbstractBlackBoxCodegenTest { + public class Coroutines { @Test @TestMetadata("32defaultParametersInSuspend.kt") public void test32defaultParametersInSuspend() throws Exception { @@ -7818,6 +8856,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/coroutines/kt21605.kt"); } + @Test + @TestMetadata("kt24135.kt") + public void testKt24135() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/kt24135.kt"); + } + @Test @TestMetadata("kt25912.kt") public void testKt25912() throws Exception { @@ -8199,7 +9243,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/coroutines/bridges") @TestDataPath("$PROJECT_ROOT") - public class Bridges extends AbstractBlackBoxCodegenTest { + public class Bridges { @Test public void testAllFilesPresentInBridges() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/bridges"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -8227,7 +9271,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/coroutines/controlFlow") @TestDataPath("$PROJECT_ROOT") - public class ControlFlow extends AbstractBlackBoxCodegenTest { + public class ControlFlow { @Test public void testAllFilesPresentInControlFlow() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/controlFlow"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -8257,6 +9301,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/coroutines/controlFlow/doWhileStatement.kt"); } + @Test + @TestMetadata("doWhileWithInline.kt") + public void testDoWhileWithInline() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/controlFlow/doWhileWithInline.kt"); + } + @Test @TestMetadata("doubleBreak.kt") public void testDoubleBreak() throws Exception { @@ -8369,7 +9419,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/coroutines/debug") @TestDataPath("$PROJECT_ROOT") - public class Debug extends AbstractBlackBoxCodegenTest { + public class Debug { @Test public void testAllFilesPresentInDebug() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/debug"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -8427,7 +9477,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/coroutines/featureIntersection") @TestDataPath("$PROJECT_ROOT") - public class FeatureIntersection extends AbstractBlackBoxCodegenTest { + public class FeatureIntersection { @Test public void testAllFilesPresentInFeatureIntersection() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/featureIntersection"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -8538,7 +9588,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference") @TestDataPath("$PROJECT_ROOT") - public class CallableReference extends AbstractBlackBoxCodegenTest { + public class CallableReference { @Test public void testAllFilesPresentInCallableReference() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -8571,7 +9621,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound") @TestDataPath("$PROJECT_ROOT") - public class Bound extends AbstractBlackBoxCodegenTest { + public class Bound { @Test public void testAllFilesPresentInBound() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -8587,7 +9637,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function") @TestDataPath("$PROJECT_ROOT") - public class Function extends AbstractBlackBoxCodegenTest { + public class Function { @Test public void testAllFilesPresentInFunction() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -8614,7 +9664,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local") @TestDataPath("$PROJECT_ROOT") - public class Local extends AbstractBlackBoxCodegenTest { + public class Local { @Test public void testAllFilesPresentInLocal() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -8632,7 +9682,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec") @TestDataPath("$PROJECT_ROOT") - public class Tailrec extends AbstractBlackBoxCodegenTest { + public class Tailrec { @Test public void testAllFilesPresentInTailrec() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -8721,12 +9771,18 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/coroutines/inlineClasses") @TestDataPath("$PROJECT_ROOT") - public class InlineClasses extends AbstractBlackBoxCodegenTest { + public class InlineClasses { @Test public void testAllFilesPresentInInlineClasses() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/inlineClasses"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test + @TestMetadata("genericParameterResult.kt") + public void testGenericParameterResult() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/genericParameterResult.kt"); + } + @Test @TestMetadata("nonLocalReturn.kt") public void testNonLocalReturn() throws Exception { @@ -8736,7 +9792,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/coroutines/inlineClasses/direct") @TestDataPath("$PROJECT_ROOT") - public class Direct extends AbstractBlackBoxCodegenTest { + public class Direct { @Test public void testAllFilesPresentInDirect() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/inlineClasses/direct"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -9004,7 +10060,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/coroutines/inlineClasses/resume") @TestDataPath("$PROJECT_ROOT") - public class Resume extends AbstractBlackBoxCodegenTest { + public class Resume { @Test public void testAllFilesPresentInResume() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/inlineClasses/resume"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -9272,7 +10328,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException") @TestDataPath("$PROJECT_ROOT") - public class ResumeWithException extends AbstractBlackBoxCodegenTest { + public class ResumeWithException { @Test public void testAllFilesPresentInResumeWithException() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -9523,7 +10579,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/coroutines/intLikeVarSpilling") @TestDataPath("$PROJECT_ROOT") - public class IntLikeVarSpilling extends AbstractBlackBoxCodegenTest { + public class IntLikeVarSpilling { @Test public void testAllFilesPresentInIntLikeVarSpilling() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/intLikeVarSpilling"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -9599,7 +10655,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/coroutines/intrinsicSemantics") @TestDataPath("$PROJECT_ROOT") - public class IntrinsicSemantics extends AbstractBlackBoxCodegenTest { + public class IntrinsicSemantics { @Test public void testAllFilesPresentInIntrinsicSemantics() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/intrinsicSemantics"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -9629,6 +10685,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/coroutines/intrinsicSemantics/intercepted.kt"); } + @Test + @TestMetadata("resultExceptionOrNullInLambda.kt") + public void testResultExceptionOrNullInLambda() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/intrinsicSemantics/resultExceptionOrNullInLambda.kt"); + } + @Test @TestMetadata("startCoroutine.kt") public void testStartCoroutine() throws Exception { @@ -9657,7 +10719,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/coroutines/javaInterop") @TestDataPath("$PROJECT_ROOT") - public class JavaInterop extends AbstractBlackBoxCodegenTest { + public class JavaInterop { @Test public void testAllFilesPresentInJavaInterop() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/javaInterop"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -9697,7 +10759,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/coroutines/localFunctions") @TestDataPath("$PROJECT_ROOT") - public class LocalFunctions extends AbstractBlackBoxCodegenTest { + public class LocalFunctions { @Test public void testAllFilesPresentInLocalFunctions() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/localFunctions"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -9706,7 +10768,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/coroutines/localFunctions/anonymous") @TestDataPath("$PROJECT_ROOT") - public class Anonymous extends AbstractBlackBoxCodegenTest { + public class Anonymous { @Test public void testAllFilesPresentInAnonymous() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/localFunctions/anonymous"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -9722,7 +10784,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/coroutines/localFunctions/named") @TestDataPath("$PROJECT_ROOT") - public class Named extends AbstractBlackBoxCodegenTest { + public class Named { @Test public void testAllFilesPresentInNamed() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/localFunctions/named"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -9740,6 +10802,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/coroutines/localFunctions/named/capturedVariables.kt"); } + @Test + @TestMetadata("defaultArgument.kt") + public void testDefaultArgument() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/localFunctions/named/defaultArgument.kt"); + } + @Test @TestMetadata("extension.kt") public void testExtension() throws Exception { @@ -9799,7 +10867,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/coroutines/multiModule") @TestDataPath("$PROJECT_ROOT") - public class MultiModule extends AbstractBlackBoxCodegenTest { + public class MultiModule { @Test public void testAllFilesPresentInMultiModule() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/multiModule"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -9863,7 +10931,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/coroutines/redundantLocalsElimination") @TestDataPath("$PROJECT_ROOT") - public class RedundantLocalsElimination extends AbstractBlackBoxCodegenTest { + public class RedundantLocalsElimination { @Test public void testAllFilesPresentInRedundantLocalsElimination() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/redundantLocalsElimination"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -9879,7 +10947,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/coroutines/reflect") @TestDataPath("$PROJECT_ROOT") - public class Reflect extends AbstractBlackBoxCodegenTest { + public class Reflect { @Test public void testAllFilesPresentInReflect() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/reflect"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -9907,7 +10975,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/coroutines/stackUnwinding") @TestDataPath("$PROJECT_ROOT") - public class StackUnwinding extends AbstractBlackBoxCodegenTest { + public class StackUnwinding { @Test public void testAllFilesPresentInStackUnwinding() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/stackUnwinding"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -9953,7 +11021,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/coroutines/suspendConversion") @TestDataPath("$PROJECT_ROOT") - public class SuspendConversion extends AbstractBlackBoxCodegenTest { + public class SuspendConversion { @Test public void testAllFilesPresentInSuspendConversion() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/suspendConversion"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -9987,7 +11055,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine") @TestDataPath("$PROJECT_ROOT") - public class SuspendFunctionAsCoroutine extends AbstractBlackBoxCodegenTest { + public class SuspendFunctionAsCoroutine { @Test public void testAllFilesPresentInSuspendFunctionAsCoroutine() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -10105,7 +11173,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/coroutines/suspendFunctionTypeCall") @TestDataPath("$PROJECT_ROOT") - public class SuspendFunctionTypeCall extends AbstractBlackBoxCodegenTest { + public class SuspendFunctionTypeCall { @Test public void testAllFilesPresentInSuspendFunctionTypeCall() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/suspendFunctionTypeCall"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -10145,7 +11213,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/coroutines/tailCallOptimizations") @TestDataPath("$PROJECT_ROOT") - public class TailCallOptimizations extends AbstractBlackBoxCodegenTest { + public class TailCallOptimizations { @Test public void testAllFilesPresentInTailCallOptimizations() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/tailCallOptimizations"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -10244,7 +11312,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/coroutines/tailCallOptimizations/unit") @TestDataPath("$PROJECT_ROOT") - public class Unit extends AbstractBlackBoxCodegenTest { + public class Unit { @Test public void testAllFilesPresentInUnit() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/tailCallOptimizations/unit"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -10321,7 +11389,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/coroutines/tailOperations") @TestDataPath("$PROJECT_ROOT") - public class TailOperations extends AbstractBlackBoxCodegenTest { + public class TailOperations { @Test public void testAllFilesPresentInTailOperations() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/tailOperations"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -10355,7 +11423,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/coroutines/unitTypeReturn") @TestDataPath("$PROJECT_ROOT") - public class UnitTypeReturn extends AbstractBlackBoxCodegenTest { + public class UnitTypeReturn { @Test public void testAllFilesPresentInUnitTypeReturn() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/unitTypeReturn"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -10407,7 +11475,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/coroutines/varSpilling") @TestDataPath("$PROJECT_ROOT") - public class VarSpilling extends AbstractBlackBoxCodegenTest { + public class VarSpilling { @Test public void testAllFilesPresentInVarSpilling() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/varSpilling"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -10454,7 +11522,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/dataClasses") @TestDataPath("$PROJECT_ROOT") - public class DataClasses extends AbstractBlackBoxCodegenTest { + public class DataClasses { @Test public void testAllFilesPresentInDataClasses() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/dataClasses"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -10559,7 +11627,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/dataClasses/copy") @TestDataPath("$PROJECT_ROOT") - public class Copy extends AbstractBlackBoxCodegenTest { + public class Copy { @Test public void testAllFilesPresentInCopy() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/dataClasses/copy"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -10617,7 +11685,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/dataClasses/equals") @TestDataPath("$PROJECT_ROOT") - public class Equals extends AbstractBlackBoxCodegenTest { + public class Equals { @Test public void testAllFilesPresentInEquals() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/dataClasses/equals"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -10669,7 +11737,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/dataClasses/hashCode") @TestDataPath("$PROJECT_ROOT") - public class HashCode extends AbstractBlackBoxCodegenTest { + public class HashCode { @Test public void testAllFilesPresentInHashCode() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/dataClasses/hashCode"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -10757,7 +11825,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/dataClasses/toString") @TestDataPath("$PROJECT_ROOT") - public class ToString extends AbstractBlackBoxCodegenTest { + public class ToString { @Test public void testAllFilesPresentInToString() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/dataClasses/toString"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -10810,7 +11878,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/deadCodeElimination") @TestDataPath("$PROJECT_ROOT") - public class DeadCodeElimination extends AbstractBlackBoxCodegenTest { + public class DeadCodeElimination { @Test public void testAllFilesPresentInDeadCodeElimination() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/deadCodeElimination"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -10844,7 +11912,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/defaultArguments") @TestDataPath("$PROJECT_ROOT") - public class DefaultArguments extends AbstractBlackBoxCodegenTest { + public class DefaultArguments { @Test public void testAllFilesPresentInDefaultArguments() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/defaultArguments"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -10955,7 +12023,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/defaultArguments/constructor") @TestDataPath("$PROJECT_ROOT") - public class Constructor extends AbstractBlackBoxCodegenTest { + public class Constructor { @Test public void testAllFilesPresentInConstructor() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/defaultArguments/constructor"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -11067,7 +12135,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/defaultArguments/convention") @TestDataPath("$PROJECT_ROOT") - public class Convention extends AbstractBlackBoxCodegenTest { + public class Convention { @Test public void testAllFilesPresentInConvention() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/defaultArguments/convention"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -11119,7 +12187,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/defaultArguments/function") @TestDataPath("$PROJECT_ROOT") - public class Function extends AbstractBlackBoxCodegenTest { + public class Function { @Test @TestMetadata("abstractClass.kt") public void testAbstractClass() throws Exception { @@ -11297,7 +12365,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/defaultArguments/private") @TestDataPath("$PROJECT_ROOT") - public class Private extends AbstractBlackBoxCodegenTest { + public class Private { @Test public void testAllFilesPresentInPrivate() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/defaultArguments/private"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -11331,7 +12399,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/defaultArguments/signature") @TestDataPath("$PROJECT_ROOT") - public class Signature extends AbstractBlackBoxCodegenTest { + public class Signature { @Test public void testAllFilesPresentInSignature() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/defaultArguments/signature"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -11360,7 +12428,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/delegatedProperty") @TestDataPath("$PROJECT_ROOT") - public class DelegatedProperty extends AbstractBlackBoxCodegenTest { + public class DelegatedProperty { @Test @TestMetadata("accessTopLevelDelegatedPropertyInClinit.kt") public void testAccessTopLevelDelegatedPropertyInClinit() throws Exception { @@ -11663,7 +12731,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/delegatedProperty/local") @TestDataPath("$PROJECT_ROOT") - public class Local extends AbstractBlackBoxCodegenTest { + public class Local { @Test public void testAllFilesPresentInLocal() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/delegatedProperty/local"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -11775,7 +12843,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/delegatedProperty/optimizedDelegatedProperties") @TestDataPath("$PROJECT_ROOT") - public class OptimizedDelegatedProperties extends AbstractBlackBoxCodegenTest { + public class OptimizedDelegatedProperties { @Test public void testAllFilesPresentInOptimizedDelegatedProperties() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/delegatedProperty/optimizedDelegatedProperties"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -11845,7 +12913,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/delegatedProperty/provideDelegate") @TestDataPath("$PROJECT_ROOT") - public class ProvideDelegate extends AbstractBlackBoxCodegenTest { + public class ProvideDelegate { @Test public void testAllFilesPresentInProvideDelegate() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/delegatedProperty/provideDelegate"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -11988,7 +13056,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/delegation") @TestDataPath("$PROJECT_ROOT") - public class Delegation extends AbstractBlackBoxCodegenTest { + public class Delegation { @Test public void testAllFilesPresentInDelegation() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/delegation"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -12006,6 +13074,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/delegation/defaultOverride.kt"); } + @Test + @TestMetadata("delegationAndInheritanceFromJava.kt") + public void testDelegationAndInheritanceFromJava() throws Exception { + runTest("compiler/testData/codegen/box/delegation/delegationAndInheritanceFromJava.kt"); + } + @Test @TestMetadata("delegationToMap.kt") public void testDelegationToMap() throws Exception { @@ -12088,7 +13162,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/destructuringDeclInLambdaParam") @TestDataPath("$PROJECT_ROOT") - public class DestructuringDeclInLambdaParam extends AbstractBlackBoxCodegenTest { + public class DestructuringDeclInLambdaParam { @Test public void testAllFilesPresentInDestructuringDeclInLambdaParam() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/destructuringDeclInLambdaParam"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -12146,7 +13220,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/diagnostics") @TestDataPath("$PROJECT_ROOT") - public class Diagnostics extends AbstractBlackBoxCodegenTest { + public class Diagnostics { @Test public void testAllFilesPresentInDiagnostics() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/diagnostics"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -12155,7 +13229,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/diagnostics/functions") @TestDataPath("$PROJECT_ROOT") - public class Functions extends AbstractBlackBoxCodegenTest { + public class Functions { @Test public void testAllFilesPresentInFunctions() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/diagnostics/functions"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -12164,7 +13238,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/diagnostics/functions/inference") @TestDataPath("$PROJECT_ROOT") - public class Inference extends AbstractBlackBoxCodegenTest { + public class Inference { @Test public void testAllFilesPresentInInference() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/diagnostics/functions/inference"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -12180,7 +13254,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/diagnostics/functions/invoke") @TestDataPath("$PROJECT_ROOT") - public class Invoke extends AbstractBlackBoxCodegenTest { + public class Invoke { @Test public void testAllFilesPresentInInvoke() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/diagnostics/functions/invoke"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -12189,7 +13263,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects") @TestDataPath("$PROJECT_ROOT") - public class OnObjects extends AbstractBlackBoxCodegenTest { + public class OnObjects { @Test public void testAllFilesPresentInOnObjects() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -12260,7 +13334,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion") @TestDataPath("$PROJECT_ROOT") - public class TailRecursion extends AbstractBlackBoxCodegenTest { + public class TailRecursion { @Test public void testAllFilesPresentInTailRecursion() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/diagnostics/functions/tailRecursion"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -12517,7 +13591,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/diagnostics/vararg") @TestDataPath("$PROJECT_ROOT") - public class Vararg extends AbstractBlackBoxCodegenTest { + public class Vararg { @Test public void testAllFilesPresentInVararg() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/diagnostics/vararg"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -12534,7 +13608,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/elvis") @TestDataPath("$PROJECT_ROOT") - public class Elvis extends AbstractBlackBoxCodegenTest { + public class Elvis { @Test public void testAllFilesPresentInElvis() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/elvis"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -12586,7 +13660,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/enum") @TestDataPath("$PROJECT_ROOT") - public class Enum extends AbstractBlackBoxCodegenTest { + public class Enum { @Test @TestMetadata("abstractMethodInEnum.kt") public void testAbstractMethodInEnum() throws Exception { @@ -12940,6 +14014,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/enum/modifierFlags.kt"); } + @Test + @TestMetadata("nameConflict.kt") + public void testNameConflict() throws Exception { + runTest("compiler/testData/codegen/box/enum/nameConflict.kt"); + } + @Test @TestMetadata("noClassForSimpleEnum.kt") public void testNoClassForSimpleEnum() throws Exception { @@ -12970,12 +14050,48 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/enum/simple.kt"); } + @Test + @TestMetadata("simpleJavaEnum.kt") + public void testSimpleJavaEnum() throws Exception { + runTest("compiler/testData/codegen/box/enum/simpleJavaEnum.kt"); + } + + @Test + @TestMetadata("simpleJavaEnumWithFunction.kt") + public void testSimpleJavaEnumWithFunction() throws Exception { + runTest("compiler/testData/codegen/box/enum/simpleJavaEnumWithFunction.kt"); + } + + @Test + @TestMetadata("simpleJavaEnumWithStaticImport.kt") + public void testSimpleJavaEnumWithStaticImport() throws Exception { + runTest("compiler/testData/codegen/box/enum/simpleJavaEnumWithStaticImport.kt"); + } + + @Test + @TestMetadata("simpleJavaInnerEnum.kt") + public void testSimpleJavaInnerEnum() throws Exception { + runTest("compiler/testData/codegen/box/enum/simpleJavaInnerEnum.kt"); + } + @Test @TestMetadata("sortEnumEntries.kt") public void testSortEnumEntries() throws Exception { runTest("compiler/testData/codegen/box/enum/sortEnumEntries.kt"); } + @Test + @TestMetadata("staticField.kt") + public void testStaticField() throws Exception { + runTest("compiler/testData/codegen/box/enum/staticField.kt"); + } + + @Test + @TestMetadata("staticMethod.kt") + public void testStaticMethod() throws Exception { + runTest("compiler/testData/codegen/box/enum/staticMethod.kt"); + } + @Test @TestMetadata("superCallInEnumLiteral.kt") public void testSuperCallInEnumLiteral() throws Exception { @@ -13003,7 +14119,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/enum/defaultCtor") @TestDataPath("$PROJECT_ROOT") - public class DefaultCtor extends AbstractBlackBoxCodegenTest { + public class DefaultCtor { @Test public void testAllFilesPresentInDefaultCtor() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/enum/defaultCtor"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -13050,7 +14166,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/evaluate") @TestDataPath("$PROJECT_ROOT") - public class Evaluate extends AbstractBlackBoxCodegenTest { + public class Evaluate { @Test public void testAllFilesPresentInEvaluate() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/evaluate"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -13150,7 +14266,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/exclExcl") @TestDataPath("$PROJECT_ROOT") - public class ExclExcl extends AbstractBlackBoxCodegenTest { + public class ExclExcl { @Test public void testAllFilesPresentInExclExcl() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/exclExcl"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -13172,7 +14288,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/extensionFunctions") @TestDataPath("$PROJECT_ROOT") - public class ExtensionFunctions extends AbstractBlackBoxCodegenTest { + public class ExtensionFunctions { @Test public void testAllFilesPresentInExtensionFunctions() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/extensionFunctions"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -13338,7 +14454,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/extensionProperties") @TestDataPath("$PROJECT_ROOT") - public class ExtensionProperties extends AbstractBlackBoxCodegenTest { + public class ExtensionProperties { @Test @TestMetadata("accessorForPrivateSetter.kt") public void testAccessorForPrivateSetter() throws Exception { @@ -13438,7 +14554,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/external") @TestDataPath("$PROJECT_ROOT") - public class External extends AbstractBlackBoxCodegenTest { + public class External { @Test public void testAllFilesPresentInExternal() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/external"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -13466,7 +14582,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/fakeOverride") @TestDataPath("$PROJECT_ROOT") - public class FakeOverride extends AbstractBlackBoxCodegenTest { + public class FakeOverride { @Test public void testAllFilesPresentInFakeOverride() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/fakeOverride"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -13512,7 +14628,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/fieldRename") @TestDataPath("$PROJECT_ROOT") - public class FieldRename extends AbstractBlackBoxCodegenTest { + public class FieldRename { @Test public void testAllFilesPresentInFieldRename() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/fieldRename"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -13552,7 +14668,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/finally") @TestDataPath("$PROJECT_ROOT") - public class Finally extends AbstractBlackBoxCodegenTest { + public class Finally { @Test public void testAllFilesPresentInFinally() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/finally"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -13694,7 +14810,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/fir") @TestDataPath("$PROJECT_ROOT") - public class Fir extends AbstractBlackBoxCodegenTest { + public class Fir { @Test public void testAllFilesPresentInFir() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/fir"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -13740,7 +14856,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/fullJdk") @TestDataPath("$PROJECT_ROOT") - public class FullJdk extends AbstractBlackBoxCodegenTest { + public class FullJdk { @Test public void testAllFilesPresentInFullJdk() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/fullJdk"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -13785,7 +14901,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/fullJdk/native") @TestDataPath("$PROJECT_ROOT") - public class Native extends AbstractBlackBoxCodegenTest { + public class Native { @Test public void testAllFilesPresentInNative() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/fullJdk/native"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -13813,7 +14929,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/fullJdk/regressions") @TestDataPath("$PROJECT_ROOT") - public class Regressions extends AbstractBlackBoxCodegenTest { + public class Regressions { @Test public void testAllFilesPresentInRegressions() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/fullJdk/regressions"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -13836,7 +14952,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/funInterface") @TestDataPath("$PROJECT_ROOT") - public class FunInterface extends AbstractBlackBoxCodegenTest { + public class FunInterface { @Test public void testAllFilesPresentInFunInterface() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/funInterface"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -13872,6 +14988,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/funInterface/funConversionInVararg.kt"); } + @Test + @TestMetadata("funInterfaceCallInLambda.kt") + public void testFunInterfaceCallInLambda() throws Exception { + runTest("compiler/testData/codegen/box/funInterface/funInterfaceCallInLambda.kt"); + } + @Test @TestMetadata("funInterfaceInheritance.kt") public void testFunInterfaceInheritance() throws Exception { @@ -13971,7 +15093,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/funInterface/equality") @TestDataPath("$PROJECT_ROOT") - public class Equality extends AbstractBlackBoxCodegenTest { + public class Equality { @Test public void testAllFilesPresentInEquality() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/funInterface/equality"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -14012,7 +15134,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/functions") @TestDataPath("$PROJECT_ROOT") - public class Functions extends AbstractBlackBoxCodegenTest { + public class Functions { @Test public void testAllFilesPresentInFunctions() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/functions"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -14030,6 +15152,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/functions/coerceVoidToObject.kt"); } + @Test + @TestMetadata("constructor.kt") + public void testConstructor() throws Exception { + runTest("compiler/testData/codegen/box/functions/constructor.kt"); + } + @Test @TestMetadata("dataLocalVariable.kt") public void testDataLocalVariable() throws Exception { @@ -14252,6 +15380,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/functions/localReturnInsideFunctionExpression.kt"); } + @Test + @TestMetadata("max.kt") + public void testMax() throws Exception { + runTest("compiler/testData/codegen/box/functions/max.kt"); + } + @Test @TestMetadata("nothisnoclosure.kt") public void testNothisnoclosure() throws Exception { @@ -14276,6 +15410,18 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/functions/recursiveIncrementCall.kt"); } + @Test + @TestMetadata("referencesStaticInnerClassMethod.kt") + public void testReferencesStaticInnerClassMethod() throws Exception { + runTest("compiler/testData/codegen/box/functions/referencesStaticInnerClassMethod.kt"); + } + + @Test + @TestMetadata("referencesStaticInnerClassMethodL2.kt") + public void testReferencesStaticInnerClassMethodL2() throws Exception { + runTest("compiler/testData/codegen/box/functions/referencesStaticInnerClassMethodL2.kt"); + } + @Test @TestMetadata("typeParameterAsUpperBound.kt") public void testTypeParameterAsUpperBound() throws Exception { @@ -14288,10 +15434,16 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/functions/typeParametersInLocalFunction.kt"); } + @Test + @TestMetadata("unrelatedUpperBounds.kt") + public void testUnrelatedUpperBounds() throws Exception { + runTest("compiler/testData/codegen/box/functions/unrelatedUpperBounds.kt"); + } + @Nested @TestMetadata("compiler/testData/codegen/box/functions/bigArity") @TestDataPath("$PROJECT_ROOT") - public class BigArity extends AbstractBlackBoxCodegenTest { + public class BigArity { @Test public void testAllFilesPresentInBigArity() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/functions/bigArity"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -14367,7 +15519,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/functions/functionExpression") @TestDataPath("$PROJECT_ROOT") - public class FunctionExpression extends AbstractBlackBoxCodegenTest { + public class FunctionExpression { @Test public void testAllFilesPresentInFunctionExpression() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/functions/functionExpression"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -14413,7 +15565,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/functions/invoke") @TestDataPath("$PROJECT_ROOT") - public class Invoke extends AbstractBlackBoxCodegenTest { + public class Invoke { @Test public void testAllFilesPresentInInvoke() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/functions/invoke"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -14513,7 +15665,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/functions/localFunctions") @TestDataPath("$PROJECT_ROOT") - public class LocalFunctions extends AbstractBlackBoxCodegenTest { + public class LocalFunctions { @Test public void testAllFilesPresentInLocalFunctions() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/functions/localFunctions"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -14704,7 +15856,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/hashPMap") @TestDataPath("$PROJECT_ROOT") - public class HashPMap extends AbstractBlackBoxCodegenTest { + public class HashPMap { @Test public void testAllFilesPresentInHashPMap() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/hashPMap"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -14750,7 +15902,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/ieee754") @TestDataPath("$PROJECT_ROOT") - public class Ieee754 extends AbstractBlackBoxCodegenTest { + public class Ieee754 { @Test public void testAllFilesPresentInIeee754() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ieee754"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -14762,6 +15914,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/ieee754/anyToReal.kt"); } + @Test + @TestMetadata("anyToReal_AgainstCompiled.kt") + public void testAnyToReal_AgainstCompiled() throws Exception { + runTest("compiler/testData/codegen/box/ieee754/anyToReal_AgainstCompiled.kt"); + } + @Test @TestMetadata("asComparableToDouble.kt") public void testAsComparableToDouble() throws Exception { @@ -14786,6 +15944,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/ieee754/comparableTypeCast.kt"); } + @Test + @TestMetadata("comparableTypeCast_AgainstCompiled.kt") + public void testComparableTypeCast_AgainstCompiled() throws Exception { + runTest("compiler/testData/codegen/box/ieee754/comparableTypeCast_AgainstCompiled.kt"); + } + @Test @TestMetadata("dataClass.kt") public void testDataClass() throws Exception { @@ -14798,6 +15962,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/ieee754/differentTypesComparison.kt"); } + @Test + @TestMetadata("double.kt") + public void testDouble() throws Exception { + runTest("compiler/testData/codegen/box/ieee754/double.kt"); + } + @Test @TestMetadata("equalsDouble.kt") public void testEqualsDouble() throws Exception { @@ -14864,18 +16034,42 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/ieee754/explicitCompareCall.kt"); } + @Test + @TestMetadata("explicitCompareCall_AgainstCompiled.kt") + public void testExplicitCompareCall_AgainstCompiled() throws Exception { + runTest("compiler/testData/codegen/box/ieee754/explicitCompareCall_AgainstCompiled.kt"); + } + @Test @TestMetadata("explicitEqualsCall.kt") public void testExplicitEqualsCall() throws Exception { runTest("compiler/testData/codegen/box/ieee754/explicitEqualsCall.kt"); } + @Test + @TestMetadata("explicitEqualsCall_AgainstCompiled.kt") + public void testExplicitEqualsCall_AgainstCompiled() throws Exception { + runTest("compiler/testData/codegen/box/ieee754/explicitEqualsCall_AgainstCompiled.kt"); + } + + @Test + @TestMetadata("float.kt") + public void testFloat() throws Exception { + runTest("compiler/testData/codegen/box/ieee754/float.kt"); + } + @Test @TestMetadata("generic.kt") public void testGeneric() throws Exception { runTest("compiler/testData/codegen/box/ieee754/generic.kt"); } + @Test + @TestMetadata("generic_AgainstCompiled.kt") + public void testGeneric_AgainstCompiled() throws Exception { + runTest("compiler/testData/codegen/box/ieee754/generic_AgainstCompiled.kt"); + } + @Test @TestMetadata("greaterDouble.kt") public void testGreaterDouble() throws Exception { @@ -14942,6 +16136,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/ieee754/nullableAnyToReal.kt"); } + @Test + @TestMetadata("nullableAnyToReal_AgainstCompiled.kt") + public void testNullableAnyToReal_AgainstCompiled() throws Exception { + runTest("compiler/testData/codegen/box/ieee754/nullableAnyToReal_AgainstCompiled.kt"); + } + @Test @TestMetadata("nullableDoubleEquals.kt") public void testNullableDoubleEquals() throws Exception { @@ -15060,7 +16260,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/increment") @TestDataPath("$PROJECT_ROOT") - public class Increment extends AbstractBlackBoxCodegenTest { + public class Increment { @Test public void testAllFilesPresentInIncrement() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/increment"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -15226,7 +16426,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/inference") @TestDataPath("$PROJECT_ROOT") - public class Inference extends AbstractBlackBoxCodegenTest { + public class Inference { @Test public void testAllFilesPresentInInference() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inference"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -15433,7 +16633,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/inference/builderInference") @TestDataPath("$PROJECT_ROOT") - public class BuilderInference extends AbstractBlackBoxCodegenTest { + public class BuilderInference { @Test public void testAllFilesPresentInBuilderInference() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inference/builderInference"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -15513,10 +16713,26 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { } } + @Nested + @TestMetadata("compiler/testData/codegen/box/inline") + @TestDataPath("$PROJECT_ROOT") + public class Inline { + @Test + public void testAllFilesPresentInInline() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inline"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); + } + + @Test + @TestMetadata("kt19910.kt") + public void testKt19910() throws Exception { + runTest("compiler/testData/codegen/box/inline/kt19910.kt"); + } + } + @Nested @TestMetadata("compiler/testData/codegen/box/inlineClasses") @TestDataPath("$PROJECT_ROOT") - public class InlineClasses extends AbstractBlackBoxCodegenTest { + public class InlineClasses { @Test public void testAllFilesPresentInInlineClasses() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -16230,6 +17446,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/inlineClasses/kt28920_javaPrimitiveType.kt"); } + @Test + @TestMetadata("kt32793.kt") + public void testKt32793() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/kt32793.kt"); + } + @Test @TestMetadata("kt33119.kt") public void testKt33119() throws Exception { @@ -16545,7 +17767,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda") @TestDataPath("$PROJECT_ROOT") - public class BoxReturnValueInLambda extends AbstractBlackBoxCodegenTest { + public class BoxReturnValueInLambda { @Test public void testAllFilesPresentInBoxReturnValueInLambda() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -16627,7 +17849,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride") @TestDataPath("$PROJECT_ROOT") - public class BoxReturnValueOnOverride extends AbstractBlackBoxCodegenTest { + public class BoxReturnValueOnOverride { @Test public void testAllFilesPresentInBoxReturnValueOnOverride() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -16793,7 +18015,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/inlineClasses/callableReferences") @TestDataPath("$PROJECT_ROOT") - public class CallableReferences extends AbstractBlackBoxCodegenTest { + public class CallableReferences { @Test public void testAllFilesPresentInCallableReferences() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/callableReferences"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -16923,7 +18145,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/inlineClasses/contextsAndAccessors") @TestDataPath("$PROJECT_ROOT") - public class ContextsAndAccessors extends AbstractBlackBoxCodegenTest { + public class ContextsAndAccessors { @Test @TestMetadata("accessPrivateInlineClassCompanionMethod.kt") public void testAccessPrivateInlineClassCompanionMethod() throws Exception { @@ -17065,7 +18287,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/inlineClasses/defaultParameterValues") @TestDataPath("$PROJECT_ROOT") - public class DefaultParameterValues extends AbstractBlackBoxCodegenTest { + public class DefaultParameterValues { @Test public void testAllFilesPresentInDefaultParameterValues() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/defaultParameterValues"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -17147,7 +18369,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/inlineClasses/functionNameMangling") @TestDataPath("$PROJECT_ROOT") - public class FunctionNameMangling extends AbstractBlackBoxCodegenTest { + public class FunctionNameMangling { @Test public void testAllFilesPresentInFunctionNameMangling() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/functionNameMangling"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -17265,7 +18487,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/inlineClasses/hiddenConstructor") @TestDataPath("$PROJECT_ROOT") - public class HiddenConstructor extends AbstractBlackBoxCodegenTest { + public class HiddenConstructor { @Test public void testAllFilesPresentInHiddenConstructor() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/hiddenConstructor"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -17350,10 +18572,38 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { } } + @Nested + @TestMetadata("compiler/testData/codegen/box/inlineClasses/inlineClassCollection") + @TestDataPath("$PROJECT_ROOT") + public class InlineClassCollection { + @Test + public void testAllFilesPresentInInlineClassCollection() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/inlineClassCollection"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); + } + + @Test + @TestMetadata("inlineCollectionOfInlineClass.kt") + public void testInlineCollectionOfInlineClass() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/inlineClassCollection/inlineCollectionOfInlineClass.kt"); + } + + @Test + @TestMetadata("inlineListOfInlineClass.kt") + public void testInlineListOfInlineClass() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/inlineClassCollection/inlineListOfInlineClass.kt"); + } + + @Test + @TestMetadata("inlineMapOfInlineClass.kt") + public void testInlineMapOfInlineClass() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/inlineClassCollection/inlineMapOfInlineClass.kt"); + } + } + @Nested @TestMetadata("compiler/testData/codegen/box/inlineClasses/interfaceDelegation") @TestDataPath("$PROJECT_ROOT") - public class InterfaceDelegation extends AbstractBlackBoxCodegenTest { + public class InterfaceDelegation { @Test public void testAllFilesPresentInInterfaceDelegation() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/interfaceDelegation"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -17411,7 +18661,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/inlineClasses/interfaceMethodCalls") @TestDataPath("$PROJECT_ROOT") - public class InterfaceMethodCalls extends AbstractBlackBoxCodegenTest { + public class InterfaceMethodCalls { @Test public void testAllFilesPresentInInterfaceMethodCalls() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/interfaceMethodCalls"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -17487,7 +18737,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/inlineClasses/javaInterop") @TestDataPath("$PROJECT_ROOT") - public class JavaInterop extends AbstractBlackBoxCodegenTest { + public class JavaInterop { @Test public void testAllFilesPresentInJavaInterop() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/javaInterop"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -17515,7 +18765,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/inlineClasses/jvm8DefaultInterfaceMethods") @TestDataPath("$PROJECT_ROOT") - public class Jvm8DefaultInterfaceMethods extends AbstractBlackBoxCodegenTest { + public class Jvm8DefaultInterfaceMethods { @Test public void testAllFilesPresentInJvm8DefaultInterfaceMethods() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/jvm8DefaultInterfaceMethods"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -17597,7 +18847,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/inlineClasses/propertyDelegation") @TestDataPath("$PROJECT_ROOT") - public class PropertyDelegation extends AbstractBlackBoxCodegenTest { + public class PropertyDelegation { @Test public void testAllFilesPresentInPropertyDelegation() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/propertyDelegation"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -17679,7 +18929,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter") @TestDataPath("$PROJECT_ROOT") - public class UnboxGenericParameter extends AbstractBlackBoxCodegenTest { + public class UnboxGenericParameter { @Test public void testAllFilesPresentInUnboxGenericParameter() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -17688,7 +18938,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/funInterface") @TestDataPath("$PROJECT_ROOT") - public class FunInterface extends AbstractBlackBoxCodegenTest { + public class FunInterface { @Test public void testAllFilesPresentInFunInterface() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/funInterface"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -17746,7 +18996,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/lambda") @TestDataPath("$PROJECT_ROOT") - public class Lambda extends AbstractBlackBoxCodegenTest { + public class Lambda { @Test public void testAllFilesPresentInLambda() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/lambda"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -17804,7 +19054,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/objectLiteral") @TestDataPath("$PROJECT_ROOT") - public class ObjectLiteral extends AbstractBlackBoxCodegenTest { + public class ObjectLiteral { @Test public void testAllFilesPresentInObjectLiteral() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/objectLiteral"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -17861,10 +19111,38 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { } } + @Nested + @TestMetadata("compiler/testData/codegen/box/innerClass") + @TestDataPath("$PROJECT_ROOT") + public class InnerClass { + @Test + public void testAllFilesPresentInInnerClass() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/innerClass"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); + } + + @Test + @TestMetadata("kt3532.kt") + public void testKt3532() throws Exception { + runTest("compiler/testData/codegen/box/innerClass/kt3532.kt"); + } + + @Test + @TestMetadata("kt3812.kt") + public void testKt3812() throws Exception { + runTest("compiler/testData/codegen/box/innerClass/kt3812.kt"); + } + + @Test + @TestMetadata("kt4036.kt") + public void testKt4036() throws Exception { + runTest("compiler/testData/codegen/box/innerClass/kt4036.kt"); + } + } + @Nested @TestMetadata("compiler/testData/codegen/box/innerNested") @TestDataPath("$PROJECT_ROOT") - public class InnerNested extends AbstractBlackBoxCodegenTest { + public class InnerNested { @Test public void testAllFilesPresentInInnerNested() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/innerNested"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -18041,7 +19319,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall") @TestDataPath("$PROJECT_ROOT") - public class SuperConstructorCall extends AbstractBlackBoxCodegenTest { + public class SuperConstructorCall { @Test public void testAllFilesPresentInSuperConstructorCall() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/innerNested/superConstructorCall"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -18178,7 +19456,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/instructions") @TestDataPath("$PROJECT_ROOT") - public class Instructions extends AbstractBlackBoxCodegenTest { + public class Instructions { @Test public void testAllFilesPresentInInstructions() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/instructions"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -18187,7 +19465,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/instructions/swap") @TestDataPath("$PROJECT_ROOT") - public class Swap extends AbstractBlackBoxCodegenTest { + public class Swap { @Test public void testAllFilesPresentInSwap() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/instructions/swap"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -18207,10 +19485,32 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { } } + @Nested + @TestMetadata("compiler/testData/codegen/box/interfaces") + @TestDataPath("$PROJECT_ROOT") + public class Interfaces { + @Test + public void testAllFilesPresentInInterfaces() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/interfaces"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); + } + + @Test + @TestMetadata("defaultMethod.kt") + public void testDefaultMethod() throws Exception { + runTest("compiler/testData/codegen/box/interfaces/defaultMethod.kt"); + } + + @Test + @TestMetadata("inheritJavaInterface.kt") + public void testInheritJavaInterface() throws Exception { + runTest("compiler/testData/codegen/box/interfaces/inheritJavaInterface.kt"); + } + } + @Nested @TestMetadata("compiler/testData/codegen/box/intrinsics") @TestDataPath("$PROJECT_ROOT") - public class Intrinsics extends AbstractBlackBoxCodegenTest { + public class Intrinsics { @Test public void testAllFilesPresentInIntrinsics() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/intrinsics"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -18382,16 +19682,156 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/invokedynamic") @TestDataPath("$PROJECT_ROOT") - public class Invokedynamic extends AbstractBlackBoxCodegenTest { + public class Invokedynamic { @Test public void testAllFilesPresentInInvokedynamic() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/invokedynamic"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Nested + @TestMetadata("compiler/testData/codegen/box/invokedynamic/lambdas") + @TestDataPath("$PROJECT_ROOT") + public class Lambdas { + @Test + public void testAllFilesPresentInLambdas() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/invokedynamic/lambdas"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); + } + + @Test + @TestMetadata("bigArityExtLambda.kt") + public void testBigArityExtLambda() throws Exception { + runTest("compiler/testData/codegen/box/invokedynamic/lambdas/bigArityExtLambda.kt"); + } + + @Test + @TestMetadata("bigArityLambda.kt") + public void testBigArityLambda() throws Exception { + runTest("compiler/testData/codegen/box/invokedynamic/lambdas/bigArityLambda.kt"); + } + + @Test + @TestMetadata("capturedDispatchReceiver.kt") + public void testCapturedDispatchReceiver() throws Exception { + runTest("compiler/testData/codegen/box/invokedynamic/lambdas/capturedDispatchReceiver.kt"); + } + + @Test + @TestMetadata("capturedExtensionReceiver.kt") + public void testCapturedExtensionReceiver() throws Exception { + runTest("compiler/testData/codegen/box/invokedynamic/lambdas/capturedExtensionReceiver.kt"); + } + + @Test + @TestMetadata("capturingValue.kt") + public void testCapturingValue() throws Exception { + runTest("compiler/testData/codegen/box/invokedynamic/lambdas/capturingValue.kt"); + } + + @Test + @TestMetadata("capturingVar.kt") + public void testCapturingVar() throws Exception { + runTest("compiler/testData/codegen/box/invokedynamic/lambdas/capturingVar.kt"); + } + + @Test + @TestMetadata("extensionLambda.kt") + public void testExtensionLambda() throws Exception { + runTest("compiler/testData/codegen/box/invokedynamic/lambdas/extensionLambda.kt"); + } + + @Test + @TestMetadata("lambdaSerializable.kt") + public void testLambdaSerializable() throws Exception { + runTest("compiler/testData/codegen/box/invokedynamic/lambdas/lambdaSerializable.kt"); + } + + @Test + @TestMetadata("lambdaToSting.kt") + public void testLambdaToSting() throws Exception { + runTest("compiler/testData/codegen/box/invokedynamic/lambdas/lambdaToSting.kt"); + } + + @Test + @TestMetadata("nestedIndyLambdas.kt") + public void testNestedIndyLambdas() throws Exception { + runTest("compiler/testData/codegen/box/invokedynamic/lambdas/nestedIndyLambdas.kt"); + } + + @Test + @TestMetadata("primitiveValueParameters.kt") + public void testPrimitiveValueParameters() throws Exception { + runTest("compiler/testData/codegen/box/invokedynamic/lambdas/primitiveValueParameters.kt"); + } + + @Test + @TestMetadata("simpleIndyLambda.kt") + public void testSimpleIndyLambda() throws Exception { + runTest("compiler/testData/codegen/box/invokedynamic/lambdas/simpleIndyLambda.kt"); + } + + @Test + @TestMetadata("suspendLambda.kt") + public void testSuspendLambda() throws Exception { + runTest("compiler/testData/codegen/box/invokedynamic/lambdas/suspendLambda.kt"); + } + + @Test + @TestMetadata("voidReturnType.kt") + public void testVoidReturnType() throws Exception { + runTest("compiler/testData/codegen/box/invokedynamic/lambdas/voidReturnType.kt"); + } + + @Nested + @TestMetadata("compiler/testData/codegen/box/invokedynamic/lambdas/inlineClassInSignature") + @TestDataPath("$PROJECT_ROOT") + public class InlineClassInSignature { + @Test + public void testAllFilesPresentInInlineClassInSignature() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/invokedynamic/lambdas/inlineClassInSignature"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); + } + + @Test + @TestMetadata("lambdaWithInlineAny.kt") + public void testLambdaWithInlineAny() throws Exception { + runTest("compiler/testData/codegen/box/invokedynamic/lambdas/inlineClassInSignature/lambdaWithInlineAny.kt"); + } + + @Test + @TestMetadata("lambdaWithInlineInt.kt") + public void testLambdaWithInlineInt() throws Exception { + runTest("compiler/testData/codegen/box/invokedynamic/lambdas/inlineClassInSignature/lambdaWithInlineInt.kt"); + } + + @Test + @TestMetadata("lambdaWithInlineNAny.kt") + public void testLambdaWithInlineNAny() throws Exception { + runTest("compiler/testData/codegen/box/invokedynamic/lambdas/inlineClassInSignature/lambdaWithInlineNAny.kt"); + } + + @Test + @TestMetadata("lambdaWithInlineNInt.kt") + public void testLambdaWithInlineNInt() throws Exception { + runTest("compiler/testData/codegen/box/invokedynamic/lambdas/inlineClassInSignature/lambdaWithInlineNInt.kt"); + } + + @Test + @TestMetadata("lambdaWithInlineNString.kt") + public void testLambdaWithInlineNString() throws Exception { + runTest("compiler/testData/codegen/box/invokedynamic/lambdas/inlineClassInSignature/lambdaWithInlineNString.kt"); + } + + @Test + @TestMetadata("lambdaWithInlineString.kt") + public void testLambdaWithInlineString() throws Exception { + runTest("compiler/testData/codegen/box/invokedynamic/lambdas/inlineClassInSignature/lambdaWithInlineString.kt"); + } + } + } + @Nested @TestMetadata("compiler/testData/codegen/box/invokedynamic/sam") @TestDataPath("$PROJECT_ROOT") - public class Sam extends AbstractBlackBoxCodegenTest { + public class Sam { @Test public void testAllFilesPresentInSam() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/invokedynamic/sam"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -18523,44 +19963,16 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/invokedynamic/sam/unboundFunctionReferenceEquality.kt"); } - @Nested - @TestMetadata("compiler/testData/codegen/box/invokedynamic/sam/inline") - @TestDataPath("$PROJECT_ROOT") - public class Inline extends AbstractBlackBoxCodegenTest { - @Test - public void testAllFilesPresentInInline() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/invokedynamic/sam/inline"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); - } - - @Test - @TestMetadata("crossinlineLambda1.kt") - public void testCrossinlineLambda1() throws Exception { - runTest("compiler/testData/codegen/box/invokedynamic/sam/inline/crossinlineLambda1.kt"); - } - - @Test - @TestMetadata("crossinlineLambda2.kt") - public void testCrossinlineLambda2() throws Exception { - runTest("compiler/testData/codegen/box/invokedynamic/sam/inline/crossinlineLambda2.kt"); - } - - @Test - @TestMetadata("inlineFunInDifferentPackage.kt") - public void testInlineFunInDifferentPackage() throws Exception { - runTest("compiler/testData/codegen/box/invokedynamic/sam/inline/inlineFunInDifferentPackage.kt"); - } - - @Test - @TestMetadata("inlineLambda1.kt") - public void testInlineLambda1() throws Exception { - runTest("compiler/testData/codegen/box/invokedynamic/sam/inline/inlineLambda1.kt"); - } + @Test + @TestMetadata("voidReturnTypeAsGeneric.kt") + public void testVoidReturnTypeAsGeneric() throws Exception { + runTest("compiler/testData/codegen/box/invokedynamic/sam/voidReturnTypeAsGeneric.kt"); } @Nested @TestMetadata("compiler/testData/codegen/box/invokedynamic/sam/inlineClassInSignature") @TestDataPath("$PROJECT_ROOT") - public class InlineClassInSignature extends AbstractBlackBoxCodegenTest { + public class InlineClassInSignature { @Test public void testAllFilesPresentInInlineClassInSignature() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/invokedynamic/sam/inlineClassInSignature"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -18644,7 +20056,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/ir") @TestDataPath("$PROJECT_ROOT") - public class Ir extends AbstractBlackBoxCodegenTest { + public class Ir { @Test public void testAllFilesPresentInIr() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ir"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -18767,7 +20179,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/ir/closureConversion") @TestDataPath("$PROJECT_ROOT") - public class ClosureConversion extends AbstractBlackBoxCodegenTest { + public class ClosureConversion { @Test public void testAllFilesPresentInClosureConversion() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ir/closureConversion"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -18825,7 +20237,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/ir/primitiveNumberComparisons") @TestDataPath("$PROJECT_ROOT") - public class PrimitiveNumberComparisons extends AbstractBlackBoxCodegenTest { + public class PrimitiveNumberComparisons { @Test public void testAllFilesPresentInPrimitiveNumberComparisons() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ir/primitiveNumberComparisons"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -18859,7 +20271,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/ir/serializationRegressions") @TestDataPath("$PROJECT_ROOT") - public class SerializationRegressions extends AbstractBlackBoxCodegenTest { + public class SerializationRegressions { @Test public void testAllFilesPresentInSerializationRegressions() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ir/serializationRegressions"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -18918,7 +20330,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/javaInterop") @TestDataPath("$PROJECT_ROOT") - public class JavaInterop extends AbstractBlackBoxCodegenTest { + public class JavaInterop { @Test public void testAllFilesPresentInJavaInterop() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/javaInterop"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -18981,7 +20393,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/javaInterop/generics") @TestDataPath("$PROJECT_ROOT") - public class Generics extends AbstractBlackBoxCodegenTest { + public class Generics { @Test public void testAllFilesPresentInGenerics() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/javaInterop/generics"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -19033,7 +20445,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions") @TestDataPath("$PROJECT_ROOT") - public class NotNullAssertions extends AbstractBlackBoxCodegenTest { + public class NotNullAssertions { @Test public void testAllFilesPresentInNotNullAssertions() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/javaInterop/notNullAssertions"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -19168,7 +20580,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability") @TestDataPath("$PROJECT_ROOT") - public class EnhancedNullability extends AbstractBlackBoxCodegenTest { + public class EnhancedNullability { @Test public void testAllFilesPresentInEnhancedNullability() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -19226,7 +20638,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullCheckOnLambdaReturnValue") @TestDataPath("$PROJECT_ROOT") - public class NullCheckOnLambdaReturnValue extends AbstractBlackBoxCodegenTest { + public class NullCheckOnLambdaReturnValue { @Test public void testAllFilesPresentInNullCheckOnLambdaReturnValue() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullCheckOnLambdaReturnValue"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -19297,7 +20709,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/javaInterop/objectMethods") @TestDataPath("$PROJECT_ROOT") - public class ObjectMethods extends AbstractBlackBoxCodegenTest { + public class ObjectMethods { @Test public void testAllFilesPresentInObjectMethods() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/javaInterop/objectMethods"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -19344,7 +20756,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/jdk") @TestDataPath("$PROJECT_ROOT") - public class Jdk extends AbstractBlackBoxCodegenTest { + public class Jdk { @Test public void testAllFilesPresentInJdk() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/jdk"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -19402,7 +20814,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/jvm8") @TestDataPath("$PROJECT_ROOT") - public class Jvm8 extends AbstractBlackBoxCodegenTest { + public class Jvm8 { @Test public void testAllFilesPresentInJvm8() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/jvm8"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -19543,7 +20955,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/jvm8/defaults") @TestDataPath("$PROJECT_ROOT") - public class Defaults extends AbstractBlackBoxCodegenTest { + public class Defaults { @Test @TestMetadata("26360.kt") public void test26360() throws Exception { @@ -19735,10 +21147,16 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/jvm8/defaults/superCall.kt"); } + @Test + @TestMetadata("suspendFunction.kt") + public void testSuspendFunction() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/suspendFunction.kt"); + } + @Nested @TestMetadata("compiler/testData/codegen/box/jvm8/defaults/allCompatibility") @TestDataPath("$PROJECT_ROOT") - public class AllCompatibility extends AbstractBlackBoxCodegenTest { + public class AllCompatibility { @Test @TestMetadata("accessor.kt") public void testAccessor() throws Exception { @@ -19912,10 +21330,16 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/jvm8/defaults/allCompatibility/simpleFunction.kt"); } + @Test + @TestMetadata("suspendFunction.kt") + public void testSuspendFunction() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/allCompatibility/suspendFunction.kt"); + } + @Nested @TestMetadata("compiler/testData/codegen/box/jvm8/defaults/allCompatibility/delegationBy") @TestDataPath("$PROJECT_ROOT") - public class DelegationBy extends AbstractBlackBoxCodegenTest { + public class DelegationBy { @Test public void testAllFilesPresentInDelegationBy() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/jvm8/defaults/allCompatibility/delegationBy"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -19938,7 +21362,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/jvm8/defaults/compatibility") @TestDataPath("$PROJECT_ROOT") - public class Compatibility extends AbstractBlackBoxCodegenTest { + public class Compatibility { @Test public void testAllFilesPresentInCompatibility() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/jvm8/defaults/compatibility"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -20044,7 +21468,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/jvm8/defaults/delegationBy") @TestDataPath("$PROJECT_ROOT") - public class DelegationBy extends AbstractBlackBoxCodegenTest { + public class DelegationBy { @Test public void testAllFilesPresentInDelegationBy() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/jvm8/defaults/delegationBy"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -20066,7 +21490,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls") @TestDataPath("$PROJECT_ROOT") - public class NoDefaultImpls extends AbstractBlackBoxCodegenTest { + public class NoDefaultImpls { @Test @TestMetadata("accessor.kt") public void testAccessor() throws Exception { @@ -20234,10 +21658,16 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/simpleFunction.kt"); } + @Test + @TestMetadata("suspendFunction.kt") + public void testSuspendFunction() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/suspendFunction.kt"); + } + @Nested @TestMetadata("compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/delegationBy") @TestDataPath("$PROJECT_ROOT") - public class DelegationBy extends AbstractBlackBoxCodegenTest { + public class DelegationBy { @Test public void testAllFilesPresentInDelegationBy() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/delegationBy"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -20259,7 +21689,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/specialization") @TestDataPath("$PROJECT_ROOT") - public class Specialization extends AbstractBlackBoxCodegenTest { + public class Specialization { @Test public void testAllFilesPresentInSpecialization() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/specialization"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -20276,7 +21706,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/jvm8/defaults/noDelegation") @TestDataPath("$PROJECT_ROOT") - public class NoDelegation extends AbstractBlackBoxCodegenTest { + public class NoDelegation { @Test public void testAllFilesPresentInNoDelegation() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/jvm8/defaults/noDelegation"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -20304,7 +21734,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/jvm8/defaults/reflection") @TestDataPath("$PROJECT_ROOT") - public class Reflection extends AbstractBlackBoxCodegenTest { + public class Reflection { @Test public void testAllFilesPresentInReflection() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/jvm8/defaults/reflection"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -20321,7 +21751,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/jvm8/interfaceFlag") @TestDataPath("$PROJECT_ROOT") - public class InterfaceFlag extends AbstractBlackBoxCodegenTest { + public class InterfaceFlag { @Test public void testAllFilesPresentInInterfaceFlag() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/jvm8/interfaceFlag"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -20343,7 +21773,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/jvm8/javaDefaults") @TestDataPath("$PROJECT_ROOT") - public class JavaDefaults extends AbstractBlackBoxCodegenTest { + public class JavaDefaults { @Test public void testAllFilesPresentInJavaDefaults() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/jvm8/javaDefaults"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -20438,7 +21868,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/jvmField") @TestDataPath("$PROJECT_ROOT") - public class JvmField extends AbstractBlackBoxCodegenTest { + public class JvmField { @Test public void testAllFilesPresentInJvmField() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/jvmField"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -20598,7 +22028,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/jvmName") @TestDataPath("$PROJECT_ROOT") - public class JvmName extends AbstractBlackBoxCodegenTest { + public class JvmName { @Test public void testAllFilesPresentInJvmName() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/jvmName"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -20703,7 +22133,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/jvmName/fileFacades") @TestDataPath("$PROJECT_ROOT") - public class FileFacades extends AbstractBlackBoxCodegenTest { + public class FileFacades { @Test public void testAllFilesPresentInFileFacades() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/jvmName/fileFacades"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -20732,7 +22162,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/jvmOverloads") @TestDataPath("$PROJECT_ROOT") - public class JvmOverloads extends AbstractBlackBoxCodegenTest { + public class JvmOverloads { @Test public void testAllFilesPresentInJvmOverloads() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/jvmOverloads"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -20862,7 +22292,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/jvmPackageName") @TestDataPath("$PROJECT_ROOT") - public class JvmPackageName extends AbstractBlackBoxCodegenTest { + public class JvmPackageName { @Test public void testAllFilesPresentInJvmPackageName() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/jvmPackageName"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -20902,7 +22332,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/jvmStatic") @TestDataPath("$PROJECT_ROOT") - public class JvmStatic extends AbstractBlackBoxCodegenTest { + public class JvmStatic { @Test public void testAllFilesPresentInJvmStatic() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/jvmStatic"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -21110,7 +22540,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/labels") @TestDataPath("$PROJECT_ROOT") - public class Labels extends AbstractBlackBoxCodegenTest { + public class Labels { @Test public void testAllFilesPresentInLabels() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/labels"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -21168,7 +22598,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/lazyCodegen") @TestDataPath("$PROJECT_ROOT") - public class LazyCodegen extends AbstractBlackBoxCodegenTest { + public class LazyCodegen { @Test public void testAllFilesPresentInLazyCodegen() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/lazyCodegen"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -21231,7 +22661,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/lazyCodegen/optimizations") @TestDataPath("$PROJECT_ROOT") - public class Optimizations extends AbstractBlackBoxCodegenTest { + public class Optimizations { @Test public void testAllFilesPresentInOptimizations() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/lazyCodegen/optimizations"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -21296,7 +22726,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/localClasses") @TestDataPath("$PROJECT_ROOT") - public class LocalClasses extends AbstractBlackBoxCodegenTest { + public class LocalClasses { @Test public void testAllFilesPresentInLocalClasses() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/localClasses"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -21528,7 +22958,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/mangling") @TestDataPath("$PROJECT_ROOT") - public class Mangling extends AbstractBlackBoxCodegenTest { + public class Mangling { @Test public void testAllFilesPresentInMangling() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/mangling"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -21592,7 +23022,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/mixedNamedPosition") @TestDataPath("$PROJECT_ROOT") - public class MixedNamedPosition extends AbstractBlackBoxCodegenTest { + public class MixedNamedPosition { @Test public void testAllFilesPresentInMixedNamedPosition() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/mixedNamedPosition"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -21626,7 +23056,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/multiDecl") @TestDataPath("$PROJECT_ROOT") - public class MultiDecl extends AbstractBlackBoxCodegenTest { + public class MultiDecl { @Test public void testAllFilesPresentInMultiDecl() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiDecl"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -21719,7 +23149,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/multiDecl/forIterator") @TestDataPath("$PROJECT_ROOT") - public class ForIterator extends AbstractBlackBoxCodegenTest { + public class ForIterator { @Test public void testAllFilesPresentInForIterator() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiDecl/forIterator"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -21758,7 +23188,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/multiDecl/forIterator/longIterator") @TestDataPath("$PROJECT_ROOT") - public class LongIterator extends AbstractBlackBoxCodegenTest { + public class LongIterator { @Test public void testAllFilesPresentInLongIterator() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiDecl/forIterator/longIterator"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -21793,7 +23223,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/multiDecl/forRange") @TestDataPath("$PROJECT_ROOT") - public class ForRange extends AbstractBlackBoxCodegenTest { + public class ForRange { @Test public void testAllFilesPresentInForRange() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiDecl/forRange"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -21844,7 +23274,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo") @TestDataPath("$PROJECT_ROOT") - public class ExplicitRangeTo extends AbstractBlackBoxCodegenTest { + public class ExplicitRangeTo { @Test public void testAllFilesPresentInExplicitRangeTo() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -21883,7 +23313,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/int") @TestDataPath("$PROJECT_ROOT") - public class Int extends AbstractBlackBoxCodegenTest { + public class Int { @Test public void testAllFilesPresentInInt() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/int"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -21917,7 +23347,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/long") @TestDataPath("$PROJECT_ROOT") - public class Long extends AbstractBlackBoxCodegenTest { + public class Long { @Test public void testAllFilesPresentInLong() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/long"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -21952,7 +23382,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot") @TestDataPath("$PROJECT_ROOT") - public class ExplicitRangeToWithDot extends AbstractBlackBoxCodegenTest { + public class ExplicitRangeToWithDot { @Test public void testAllFilesPresentInExplicitRangeToWithDot() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -21991,7 +23421,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/int") @TestDataPath("$PROJECT_ROOT") - public class Int extends AbstractBlackBoxCodegenTest { + public class Int { @Test public void testAllFilesPresentInInt() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/int"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -22025,7 +23455,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/long") @TestDataPath("$PROJECT_ROOT") - public class Long extends AbstractBlackBoxCodegenTest { + public class Long { @Test public void testAllFilesPresentInLong() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/long"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -22060,7 +23490,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/multiDecl/forRange/int") @TestDataPath("$PROJECT_ROOT") - public class Int extends AbstractBlackBoxCodegenTest { + public class Int { @Test public void testAllFilesPresentInInt() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiDecl/forRange/int"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -22094,7 +23524,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/multiDecl/forRange/long") @TestDataPath("$PROJECT_ROOT") - public class Long extends AbstractBlackBoxCodegenTest { + public class Long { @Test public void testAllFilesPresentInLong() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiDecl/forRange/long"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -22130,7 +23560,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/multifileClasses") @TestDataPath("$PROJECT_ROOT") - public class MultifileClasses extends AbstractBlackBoxCodegenTest { + public class MultifileClasses { @Test public void testAllFilesPresentInMultifileClasses() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multifileClasses"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -22223,7 +23653,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/multifileClasses/optimized") @TestDataPath("$PROJECT_ROOT") - public class Optimized extends AbstractBlackBoxCodegenTest { + public class Optimized { @Test public void testAllFilesPresentInOptimized() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multifileClasses/optimized"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -22300,12 +23730,18 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/multiplatform") @TestDataPath("$PROJECT_ROOT") - public class Multiplatform extends AbstractBlackBoxCodegenTest { + public class Multiplatform { @Test public void testAllFilesPresentInMultiplatform() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test + @TestMetadata("annotationsViaActualTypeAliasFromBinary.kt") + public void testAnnotationsViaActualTypeAliasFromBinary() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/annotationsViaActualTypeAliasFromBinary.kt"); + } + @Test @TestMetadata("expectClassInJvmMultifileFacade.kt") public void testExpectClassInJvmMultifileFacade() throws Exception { @@ -22339,7 +23775,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/multiplatform/defaultArguments") @TestDataPath("$PROJECT_ROOT") - public class DefaultArguments extends AbstractBlackBoxCodegenTest { + public class DefaultArguments { @Test public void testAllFilesPresentInDefaultArguments() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/defaultArguments"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -22487,7 +23923,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/multiplatform/multiModule") @TestDataPath("$PROJECT_ROOT") - public class MultiModule extends AbstractBlackBoxCodegenTest { + public class MultiModule { @Test public void testAllFilesPresentInMultiModule() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/multiModule"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -22498,7 +23934,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/nonLocalReturns") @TestDataPath("$PROJECT_ROOT") - public class NonLocalReturns extends AbstractBlackBoxCodegenTest { + public class NonLocalReturns { @Test public void testAllFilesPresentInNonLocalReturns() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/nonLocalReturns"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -22541,10 +23977,50 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { } } + @Nested + @TestMetadata("compiler/testData/codegen/box/notNullAssertions") + @TestDataPath("$PROJECT_ROOT") + public class NotNullAssertions { + @Test + public void testAllFilesPresentInNotNullAssertions() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/notNullAssertions"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); + } + + @Test + @TestMetadata("callAssertions.kt") + public void testCallAssertions() throws Exception { + runTest("compiler/testData/codegen/box/notNullAssertions/callAssertions.kt"); + } + + @Test + @TestMetadata("delegation.kt") + public void testDelegation() throws Exception { + runTest("compiler/testData/codegen/box/notNullAssertions/delegation.kt"); + } + + @Test + @TestMetadata("doGenerateParamAssertions.kt") + public void testDoGenerateParamAssertions() throws Exception { + runTest("compiler/testData/codegen/box/notNullAssertions/doGenerateParamAssertions.kt"); + } + + @Test + @TestMetadata("noCallAssertions.kt") + public void testNoCallAssertions() throws Exception { + runTest("compiler/testData/codegen/box/notNullAssertions/noCallAssertions.kt"); + } + + @Test + @TestMetadata("rightElvisOperand.kt") + public void testRightElvisOperand() throws Exception { + runTest("compiler/testData/codegen/box/notNullAssertions/rightElvisOperand.kt"); + } + } + @Nested @TestMetadata("compiler/testData/codegen/box/nothingValue") @TestDataPath("$PROJECT_ROOT") - public class NothingValue extends AbstractBlackBoxCodegenTest { + public class NothingValue { @Test public void testAllFilesPresentInNothingValue() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/nothingValue"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -22566,7 +24042,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/nullCheckOptimization") @TestDataPath("$PROJECT_ROOT") - public class NullCheckOptimization extends AbstractBlackBoxCodegenTest { + public class NullCheckOptimization { @Test public void testAllFilesPresentInNullCheckOptimization() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/nullCheckOptimization"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -22648,7 +24124,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/objectIntrinsics") @TestDataPath("$PROJECT_ROOT") - public class ObjectIntrinsics extends AbstractBlackBoxCodegenTest { + public class ObjectIntrinsics { @Test public void testAllFilesPresentInObjectIntrinsics() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/objectIntrinsics"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -22664,7 +24140,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/objects") @TestDataPath("$PROJECT_ROOT") - public class Objects extends AbstractBlackBoxCodegenTest { + public class Objects { @Test public void testAllFilesPresentInObjects() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/objects"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -23117,7 +24593,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/objects/companionObjectAccess") @TestDataPath("$PROJECT_ROOT") - public class CompanionObjectAccess extends AbstractBlackBoxCodegenTest { + public class CompanionObjectAccess { @Test public void testAllFilesPresentInCompanionObjectAccess() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/objects/companionObjectAccess"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -23222,7 +24698,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/objects/companionObjectAccess/multipleCompanionsWithAccessors") @TestDataPath("$PROJECT_ROOT") - public class MultipleCompanionsWithAccessors extends AbstractBlackBoxCodegenTest { + public class MultipleCompanionsWithAccessors { @Test @TestMetadata("accessFromInlineLambda.kt") public void testAccessFromInlineLambda() throws Exception { @@ -23304,7 +24780,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/objects/companionObjectAccess/primitiveCompanion") @TestDataPath("$PROJECT_ROOT") - public class PrimitiveCompanion extends AbstractBlackBoxCodegenTest { + public class PrimitiveCompanion { @Test public void testAllFilesPresentInPrimitiveCompanion() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/objects/companionObjectAccess/primitiveCompanion"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -23358,7 +24834,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/oldLanguageVersions") @TestDataPath("$PROJECT_ROOT") - public class OldLanguageVersions extends AbstractBlackBoxCodegenTest { + public class OldLanguageVersions { @Test public void testAllFilesPresentInOldLanguageVersions() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/oldLanguageVersions"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -23373,7 +24849,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/oldLanguageVersions/controlStructures") @TestDataPath("$PROJECT_ROOT") - public class ControlStructures extends AbstractBlackBoxCodegenTest { + public class ControlStructures { @Test public void testAllFilesPresentInControlStructures() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/oldLanguageVersions/controlStructures"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -23382,7 +24858,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/oldLanguageVersions/controlStructures/forInArray") @TestDataPath("$PROJECT_ROOT") - public class ForInArray extends AbstractBlackBoxCodegenTest { + public class ForInArray { @Test public void testAllFilesPresentInForInArray() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/oldLanguageVersions/controlStructures/forInArray"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -23399,7 +24875,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/oldLanguageVersions/functions") @TestDataPath("$PROJECT_ROOT") - public class Functions extends AbstractBlackBoxCodegenTest { + public class Functions { @Test public void testAllFilesPresentInFunctions() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/oldLanguageVersions/functions"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -23408,7 +24884,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/oldLanguageVersions/functions/bigArity") @TestDataPath("$PROJECT_ROOT") - public class BigArity extends AbstractBlackBoxCodegenTest { + public class BigArity { @Test public void testAllFilesPresentInBigArity() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/oldLanguageVersions/functions/bigArity"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -23425,12 +24901,18 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/oldLanguageVersions/ieee754") @TestDataPath("$PROJECT_ROOT") - public class Ieee754 extends AbstractBlackBoxCodegenTest { + public class Ieee754 { @Test public void testAllFilesPresentInIeee754() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/oldLanguageVersions/ieee754"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test + @TestMetadata("explicitEqualsCallNull.kt") + public void testExplicitEqualsCallNull() throws Exception { + runTest("compiler/testData/codegen/box/oldLanguageVersions/ieee754/explicitEqualsCallNull.kt"); + } + @Test @TestMetadata("nullableDoubleEquals10.kt") public void testNullableDoubleEquals10() throws Exception { @@ -23471,7 +24953,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/oldLanguageVersions/javaInterop") @TestDataPath("$PROJECT_ROOT") - public class JavaInterop extends AbstractBlackBoxCodegenTest { + public class JavaInterop { @Test public void testAllFilesPresentInJavaInterop() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/oldLanguageVersions/javaInterop"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -23480,7 +24962,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/oldLanguageVersions/javaInterop/notNullAssertions") @TestDataPath("$PROJECT_ROOT") - public class NotNullAssertions extends AbstractBlackBoxCodegenTest { + public class NotNullAssertions { @Test public void testAllFilesPresentInNotNullAssertions() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/oldLanguageVersions/javaInterop/notNullAssertions"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -23515,7 +24997,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/oldLanguageVersions/operatorConventions") @TestDataPath("$PROJECT_ROOT") - public class OperatorConventions extends AbstractBlackBoxCodegenTest { + public class OperatorConventions { @Test public void testAllFilesPresentInOperatorConventions() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/oldLanguageVersions/operatorConventions"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -23531,7 +25013,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/oldLanguageVersions/platformTypes") @TestDataPath("$PROJECT_ROOT") - public class PlatformTypes extends AbstractBlackBoxCodegenTest { + public class PlatformTypes { @Test public void testAllFilesPresentInPlatformTypes() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/oldLanguageVersions/platformTypes"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -23540,7 +25022,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/oldLanguageVersions/platformTypes/primitives") @TestDataPath("$PROJECT_ROOT") - public class Primitives extends AbstractBlackBoxCodegenTest { + public class Primitives { @Test public void testAllFilesPresentInPrimitives() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/oldLanguageVersions/platformTypes/primitives"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -23558,7 +25040,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/operatorConventions") @TestDataPath("$PROJECT_ROOT") - public class OperatorConventions extends AbstractBlackBoxCodegenTest { + public class OperatorConventions { @Test public void testAllFilesPresentInOperatorConventions() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/operatorConventions"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -23687,7 +25169,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/operatorConventions/compareTo") @TestDataPath("$PROJECT_ROOT") - public class CompareTo extends AbstractBlackBoxCodegenTest { + public class CompareTo { @Test public void testAllFilesPresentInCompareTo() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/operatorConventions/compareTo"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -23764,7 +25246,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/optimizations") @TestDataPath("$PROJECT_ROOT") - public class Optimizations extends AbstractBlackBoxCodegenTest { + public class Optimizations { @Test public void testAllFilesPresentInOptimizations() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/optimizations"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -23786,7 +25268,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/package") @TestDataPath("$PROJECT_ROOT") - public class Package extends AbstractBlackBoxCodegenTest { + public class Package { @Test public void testAllFilesPresentInPackage() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/package"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -23868,7 +25350,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/parametersMetadata") @TestDataPath("$PROJECT_ROOT") - public class ParametersMetadata extends AbstractBlackBoxCodegenTest { + public class ParametersMetadata { @Test public void testAllFilesPresentInParametersMetadata() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/parametersMetadata"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -23938,18 +25420,42 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/platformTypes") @TestDataPath("$PROJECT_ROOT") - public class PlatformTypes extends AbstractBlackBoxCodegenTest { + public class PlatformTypes { @Test public void testAllFilesPresentInPlatformTypes() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/platformTypes"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test + @TestMetadata("genericUnit.kt") + public void testGenericUnit() throws Exception { + runTest("compiler/testData/codegen/box/platformTypes/genericUnit.kt"); + } + @Test @TestMetadata("inferenceFlexibleTToNullable.kt") public void testInferenceFlexibleTToNullable() throws Exception { runTest("compiler/testData/codegen/box/platformTypes/inferenceFlexibleTToNullable.kt"); } + @Test + @TestMetadata("kt14989.kt") + public void testKt14989() throws Exception { + runTest("compiler/testData/codegen/box/platformTypes/kt14989.kt"); + } + + @Test + @TestMetadata("specializedMapFull.kt") + public void testSpecializedMapFull() throws Exception { + runTest("compiler/testData/codegen/box/platformTypes/specializedMapFull.kt"); + } + + @Test + @TestMetadata("specializedMapPut.kt") + public void testSpecializedMapPut() throws Exception { + runTest("compiler/testData/codegen/box/platformTypes/specializedMapPut.kt"); + } + @Test @TestMetadata("unsafeNullCheck.kt") public void testUnsafeNullCheck() throws Exception { @@ -23965,7 +25471,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/platformTypes/primitives") @TestDataPath("$PROJECT_ROOT") - public class Primitives extends AbstractBlackBoxCodegenTest { + public class Primitives { @Test public void testAllFilesPresentInPrimitives() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/platformTypes/primitives"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -24102,7 +25608,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/polymorphicSignature") @TestDataPath("$PROJECT_ROOT") - public class PolymorphicSignature extends AbstractBlackBoxCodegenTest { + public class PolymorphicSignature { @Test public void testAllFilesPresentInPolymorphicSignature() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/polymorphicSignature"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -24160,7 +25666,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/primitiveTypes") @TestDataPath("$PROJECT_ROOT") - public class PrimitiveTypes extends AbstractBlackBoxCodegenTest { + public class PrimitiveTypes { @Test public void testAllFilesPresentInPrimitiveTypes() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/primitiveTypes"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -24523,7 +26029,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/primitiveTypes/equalityWithObject") @TestDataPath("$PROJECT_ROOT") - public class EqualityWithObject extends AbstractBlackBoxCodegenTest { + public class EqualityWithObject { @Test public void testAllFilesPresentInEqualityWithObject() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/primitiveTypes/equalityWithObject"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -24586,7 +26092,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated") @TestDataPath("$PROJECT_ROOT") - public class Generated extends AbstractBlackBoxCodegenTest { + public class Generated { @Test public void testAllFilesPresentInGenerated() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -24706,7 +26212,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/private") @TestDataPath("$PROJECT_ROOT") - public class Private extends AbstractBlackBoxCodegenTest { + public class Private { @Test public void testAllFilesPresentInPrivate() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/private"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -24728,7 +26234,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/privateConstructors") @TestDataPath("$PROJECT_ROOT") - public class PrivateConstructors extends AbstractBlackBoxCodegenTest { + public class PrivateConstructors { @Test public void testAllFilesPresentInPrivateConstructors() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/privateConstructors"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -24816,7 +26322,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/properties") @TestDataPath("$PROJECT_ROOT") - public class Properties extends AbstractBlackBoxCodegenTest { + public class Properties { @Test @TestMetadata("accessToPrivateProperty.kt") public void testAccessToPrivateProperty() throws Exception { @@ -25335,7 +26841,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/properties/const") @TestDataPath("$PROJECT_ROOT") - public class Const extends AbstractBlackBoxCodegenTest { + public class Const { @Test public void testAllFilesPresentInConst() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/properties/const"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -25393,7 +26899,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/properties/lateinit") @TestDataPath("$PROJECT_ROOT") - public class Lateinit extends AbstractBlackBoxCodegenTest { + public class Lateinit { @Test @TestMetadata("accessor.kt") public void testAccessor() throws Exception { @@ -25492,7 +26998,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize") @TestDataPath("$PROJECT_ROOT") - public class IsInitializedAndDeinitialize extends AbstractBlackBoxCodegenTest { + public class IsInitializedAndDeinitialize { @Test public void testAllFilesPresentInIsInitializedAndDeinitialize() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -25556,7 +27062,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/properties/lateinit/local") @TestDataPath("$PROJECT_ROOT") - public class Local extends AbstractBlackBoxCodegenTest { + public class Local { @Test public void testAllFilesPresentInLocal() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/properties/lateinit/local"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -25608,7 +27114,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/properties/lateinit/topLevel") @TestDataPath("$PROJECT_ROOT") - public class TopLevel extends AbstractBlackBoxCodegenTest { + public class TopLevel { @Test @TestMetadata("accessorException.kt") public void testAccessorException() throws Exception { @@ -25647,10 +27153,38 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { } } + @Nested + @TestMetadata("compiler/testData/codegen/box/property") + @TestDataPath("$PROJECT_ROOT") + public class Property { + @Test + public void testAllFilesPresentInProperty() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/property"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); + } + + @Test + @TestMetadata("fieldAccessFromExtensionInTraitImpl.kt") + public void testFieldAccessFromExtensionInTraitImpl() throws Exception { + runTest("compiler/testData/codegen/box/property/fieldAccessFromExtensionInTraitImpl.kt"); + } + + @Test + @TestMetadata("fieldAccessViaSubclass.kt") + public void testFieldAccessViaSubclass() throws Exception { + runTest("compiler/testData/codegen/box/property/fieldAccessViaSubclass.kt"); + } + + @Test + @TestMetadata("referenceToJavaFieldViaBridge.kt") + public void testReferenceToJavaFieldViaBridge() throws Exception { + runTest("compiler/testData/codegen/box/property/referenceToJavaFieldViaBridge.kt"); + } + } + @Nested @TestMetadata("compiler/testData/codegen/box/publishedApi") @TestDataPath("$PROJECT_ROOT") - public class PublishedApi extends AbstractBlackBoxCodegenTest { + public class PublishedApi { @Test public void testAllFilesPresentInPublishedApi() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/publishedApi"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -25678,7 +27212,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/ranges") @TestDataPath("$PROJECT_ROOT") - public class Ranges extends AbstractBlackBoxCodegenTest { + public class Ranges { @Test public void testAllFilesPresentInRanges() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -25789,7 +27323,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/ranges/contains") @TestDataPath("$PROJECT_ROOT") - public class Contains extends AbstractBlackBoxCodegenTest { + public class Contains { @Test public void testAllFilesPresentInContains() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/contains"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -26038,7 +27572,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/ranges/contains/generated") @TestDataPath("$PROJECT_ROOT") - public class Generated extends AbstractBlackBoxCodegenTest { + public class Generated { @Test public void testAllFilesPresentInGenerated() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/contains/generated"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -26133,7 +27667,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/ranges/evaluationOrder") @TestDataPath("$PROJECT_ROOT") - public class EvaluationOrder extends AbstractBlackBoxCodegenTest { + public class EvaluationOrder { @Test public void testAllFilesPresentInEvaluationOrder() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/evaluationOrder"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -26196,7 +27730,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/ranges/evaluationOrder/stepped") @TestDataPath("$PROJECT_ROOT") - public class Stepped extends AbstractBlackBoxCodegenTest { + public class Stepped { @Test public void testAllFilesPresentInStepped() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/evaluationOrder/stepped"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -26205,7 +27739,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/ranges/evaluationOrder/stepped/forInDownTo") @TestDataPath("$PROJECT_ROOT") - public class ForInDownTo extends AbstractBlackBoxCodegenTest { + public class ForInDownTo { @Test public void testAllFilesPresentInForInDownTo() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/evaluationOrder/stepped/forInDownTo"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -26263,7 +27797,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/ranges/evaluationOrder/stepped/forInRangeLiteral") @TestDataPath("$PROJECT_ROOT") - public class ForInRangeLiteral extends AbstractBlackBoxCodegenTest { + public class ForInRangeLiteral { @Test public void testAllFilesPresentInForInRangeLiteral() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/evaluationOrder/stepped/forInRangeLiteral"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -26321,7 +27855,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/ranges/evaluationOrder/stepped/forInUntil") @TestDataPath("$PROJECT_ROOT") - public class ForInUntil extends AbstractBlackBoxCodegenTest { + public class ForInUntil { @Test public void testAllFilesPresentInForInUntil() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/evaluationOrder/stepped/forInUntil"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -26381,7 +27915,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/ranges/expression") @TestDataPath("$PROJECT_ROOT") - public class Expression extends AbstractBlackBoxCodegenTest { + public class Expression { @Test public void testAllFilesPresentInExpression() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/expression"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -26571,7 +28105,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/ranges/forInDownTo") @TestDataPath("$PROJECT_ROOT") - public class ForInDownTo extends AbstractBlackBoxCodegenTest { + public class ForInDownTo { @Test public void testAllFilesPresentInForInDownTo() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/forInDownTo"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -26611,7 +28145,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/ranges/forInIndices") @TestDataPath("$PROJECT_ROOT") - public class ForInIndices extends AbstractBlackBoxCodegenTest { + public class ForInIndices { @Test public void testAllFilesPresentInForInIndices() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/forInIndices"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -26747,7 +28281,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/ranges/forInProgressionWithIndex") @TestDataPath("$PROJECT_ROOT") - public class ForInProgressionWithIndex extends AbstractBlackBoxCodegenTest { + public class ForInProgressionWithIndex { @Test public void testAllFilesPresentInForInProgressionWithIndex() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/forInProgressionWithIndex"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -26847,7 +28381,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/ranges/forInReversed") @TestDataPath("$PROJECT_ROOT") - public class ForInReversed extends AbstractBlackBoxCodegenTest { + public class ForInReversed { @Test public void testAllFilesPresentInForInReversed() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/forInReversed"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -26965,7 +28499,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/ranges/forInUntil") @TestDataPath("$PROJECT_ROOT") - public class ForInUntil extends AbstractBlackBoxCodegenTest { + public class ForInUntil { @Test public void testAllFilesPresentInForInUntil() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/forInUntil"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -27065,7 +28599,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/ranges/forWithPossibleOverflow") @TestDataPath("$PROJECT_ROOT") - public class ForWithPossibleOverflow extends AbstractBlackBoxCodegenTest { + public class ForWithPossibleOverflow { @Test public void testAllFilesPresentInForWithPossibleOverflow() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/forWithPossibleOverflow"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -27153,7 +28687,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/ranges/javaInterop") @TestDataPath("$PROJECT_ROOT") - public class JavaInterop extends AbstractBlackBoxCodegenTest { + public class JavaInterop { @Test public void testAllFilesPresentInJavaInterop() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/javaInterop"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -27276,7 +28810,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/ranges/javaInterop/withIndex") @TestDataPath("$PROJECT_ROOT") - public class WithIndex extends AbstractBlackBoxCodegenTest { + public class WithIndex { @Test public void testAllFilesPresentInWithIndex() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/javaInterop/withIndex"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -27365,7 +28899,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/ranges/literal") @TestDataPath("$PROJECT_ROOT") - public class Literal extends AbstractBlackBoxCodegenTest { + public class Literal { @Test public void testAllFilesPresentInLiteral() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/literal"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -27555,7 +29089,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/ranges/nullableLoopParameter") @TestDataPath("$PROJECT_ROOT") - public class NullableLoopParameter extends AbstractBlackBoxCodegenTest { + public class NullableLoopParameter { @Test public void testAllFilesPresentInNullableLoopParameter() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/nullableLoopParameter"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -27583,7 +29117,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped") @TestDataPath("$PROJECT_ROOT") - public class Stepped extends AbstractBlackBoxCodegenTest { + public class Stepped { @Test public void testAllFilesPresentInStepped() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -27592,7 +29126,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/expression") @TestDataPath("$PROJECT_ROOT") - public class Expression extends AbstractBlackBoxCodegenTest { + public class Expression { @Test public void testAllFilesPresentInExpression() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/expression"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -27601,7 +29135,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/expression/downTo") @TestDataPath("$PROJECT_ROOT") - public class DownTo extends AbstractBlackBoxCodegenTest { + public class DownTo { @Test public void testAllFilesPresentInDownTo() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/expression/downTo"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -27706,7 +29240,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/expression/downTo/nestedStep") @TestDataPath("$PROJECT_ROOT") - public class NestedStep extends AbstractBlackBoxCodegenTest { + public class NestedStep { @Test public void testAllFilesPresentInNestedStep() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/expression/downTo/nestedStep"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -27764,7 +29298,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/expression/downTo/reversed") @TestDataPath("$PROJECT_ROOT") - public class Reversed extends AbstractBlackBoxCodegenTest { + public class Reversed { @Test public void testAllFilesPresentInReversed() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/expression/downTo/reversed"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -27811,7 +29345,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/expression/rangeTo") @TestDataPath("$PROJECT_ROOT") - public class RangeTo extends AbstractBlackBoxCodegenTest { + public class RangeTo { @Test public void testAllFilesPresentInRangeTo() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/expression/rangeTo"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -27916,7 +29450,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/nestedStep") @TestDataPath("$PROJECT_ROOT") - public class NestedStep extends AbstractBlackBoxCodegenTest { + public class NestedStep { @Test public void testAllFilesPresentInNestedStep() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/nestedStep"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -27974,7 +29508,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/reversed") @TestDataPath("$PROJECT_ROOT") - public class Reversed extends AbstractBlackBoxCodegenTest { + public class Reversed { @Test public void testAllFilesPresentInReversed() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/reversed"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -28021,7 +29555,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/expression/until") @TestDataPath("$PROJECT_ROOT") - public class Until extends AbstractBlackBoxCodegenTest { + public class Until { @Test public void testAllFilesPresentInUntil() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/expression/until"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -28132,7 +29666,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/expression/until/nestedStep") @TestDataPath("$PROJECT_ROOT") - public class NestedStep extends AbstractBlackBoxCodegenTest { + public class NestedStep { @Test public void testAllFilesPresentInNestedStep() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/expression/until/nestedStep"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -28190,7 +29724,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/expression/until/reversed") @TestDataPath("$PROJECT_ROOT") - public class Reversed extends AbstractBlackBoxCodegenTest { + public class Reversed { @Test public void testAllFilesPresentInReversed() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/expression/until/reversed"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -28238,7 +29772,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/literal") @TestDataPath("$PROJECT_ROOT") - public class Literal extends AbstractBlackBoxCodegenTest { + public class Literal { @Test public void testAllFilesPresentInLiteral() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/literal"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -28247,7 +29781,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/literal/downTo") @TestDataPath("$PROJECT_ROOT") - public class DownTo extends AbstractBlackBoxCodegenTest { + public class DownTo { @Test public void testAllFilesPresentInDownTo() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/literal/downTo"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -28352,7 +29886,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/literal/downTo/nestedStep") @TestDataPath("$PROJECT_ROOT") - public class NestedStep extends AbstractBlackBoxCodegenTest { + public class NestedStep { @Test public void testAllFilesPresentInNestedStep() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/literal/downTo/nestedStep"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -28410,7 +29944,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/literal/downTo/reversed") @TestDataPath("$PROJECT_ROOT") - public class Reversed extends AbstractBlackBoxCodegenTest { + public class Reversed { @Test public void testAllFilesPresentInReversed() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/literal/downTo/reversed"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -28457,7 +29991,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/literal/rangeTo") @TestDataPath("$PROJECT_ROOT") - public class RangeTo extends AbstractBlackBoxCodegenTest { + public class RangeTo { @Test public void testAllFilesPresentInRangeTo() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/literal/rangeTo"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -28562,7 +30096,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/nestedStep") @TestDataPath("$PROJECT_ROOT") - public class NestedStep extends AbstractBlackBoxCodegenTest { + public class NestedStep { @Test public void testAllFilesPresentInNestedStep() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/nestedStep"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -28620,7 +30154,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/reversed") @TestDataPath("$PROJECT_ROOT") - public class Reversed extends AbstractBlackBoxCodegenTest { + public class Reversed { @Test public void testAllFilesPresentInReversed() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/reversed"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -28667,7 +30201,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/literal/until") @TestDataPath("$PROJECT_ROOT") - public class Until extends AbstractBlackBoxCodegenTest { + public class Until { @Test public void testAllFilesPresentInUntil() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/literal/until"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -28778,7 +30312,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/literal/until/nestedStep") @TestDataPath("$PROJECT_ROOT") - public class NestedStep extends AbstractBlackBoxCodegenTest { + public class NestedStep { @Test public void testAllFilesPresentInNestedStep() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/literal/until/nestedStep"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -28836,7 +30370,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/literal/until/reversed") @TestDataPath("$PROJECT_ROOT") - public class Reversed extends AbstractBlackBoxCodegenTest { + public class Reversed { @Test public void testAllFilesPresentInReversed() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/literal/until/reversed"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -28884,7 +30418,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned") @TestDataPath("$PROJECT_ROOT") - public class Unsigned extends AbstractBlackBoxCodegenTest { + public class Unsigned { @Test public void testAllFilesPresentInUnsigned() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -28893,7 +30427,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/expression") @TestDataPath("$PROJECT_ROOT") - public class Expression extends AbstractBlackBoxCodegenTest { + public class Expression { @Test public void testAllFilesPresentInExpression() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/expression"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -28902,7 +30436,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo") @TestDataPath("$PROJECT_ROOT") - public class DownTo extends AbstractBlackBoxCodegenTest { + public class DownTo { @Test public void testAllFilesPresentInDownTo() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -29007,7 +30541,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/nestedStep") @TestDataPath("$PROJECT_ROOT") - public class NestedStep extends AbstractBlackBoxCodegenTest { + public class NestedStep { @Test public void testAllFilesPresentInNestedStep() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/nestedStep"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -29065,7 +30599,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/reversed") @TestDataPath("$PROJECT_ROOT") - public class Reversed extends AbstractBlackBoxCodegenTest { + public class Reversed { @Test public void testAllFilesPresentInReversed() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/reversed"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -29112,7 +30646,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo") @TestDataPath("$PROJECT_ROOT") - public class RangeTo extends AbstractBlackBoxCodegenTest { + public class RangeTo { @Test public void testAllFilesPresentInRangeTo() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -29217,7 +30751,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/nestedStep") @TestDataPath("$PROJECT_ROOT") - public class NestedStep extends AbstractBlackBoxCodegenTest { + public class NestedStep { @Test public void testAllFilesPresentInNestedStep() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/nestedStep"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -29275,7 +30809,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/reversed") @TestDataPath("$PROJECT_ROOT") - public class Reversed extends AbstractBlackBoxCodegenTest { + public class Reversed { @Test public void testAllFilesPresentInReversed() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/reversed"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -29322,7 +30856,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until") @TestDataPath("$PROJECT_ROOT") - public class Until extends AbstractBlackBoxCodegenTest { + public class Until { @Test public void testAllFilesPresentInUntil() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -29433,7 +30967,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/nestedStep") @TestDataPath("$PROJECT_ROOT") - public class NestedStep extends AbstractBlackBoxCodegenTest { + public class NestedStep { @Test public void testAllFilesPresentInNestedStep() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/nestedStep"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -29491,7 +31025,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/reversed") @TestDataPath("$PROJECT_ROOT") - public class Reversed extends AbstractBlackBoxCodegenTest { + public class Reversed { @Test public void testAllFilesPresentInReversed() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/reversed"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -29539,7 +31073,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/literal") @TestDataPath("$PROJECT_ROOT") - public class Literal extends AbstractBlackBoxCodegenTest { + public class Literal { @Test public void testAllFilesPresentInLiteral() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/literal"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -29548,7 +31082,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo") @TestDataPath("$PROJECT_ROOT") - public class DownTo extends AbstractBlackBoxCodegenTest { + public class DownTo { @Test public void testAllFilesPresentInDownTo() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -29653,7 +31187,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/nestedStep") @TestDataPath("$PROJECT_ROOT") - public class NestedStep extends AbstractBlackBoxCodegenTest { + public class NestedStep { @Test public void testAllFilesPresentInNestedStep() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/nestedStep"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -29711,7 +31245,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/reversed") @TestDataPath("$PROJECT_ROOT") - public class Reversed extends AbstractBlackBoxCodegenTest { + public class Reversed { @Test public void testAllFilesPresentInReversed() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/reversed"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -29758,7 +31292,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo") @TestDataPath("$PROJECT_ROOT") - public class RangeTo extends AbstractBlackBoxCodegenTest { + public class RangeTo { @Test public void testAllFilesPresentInRangeTo() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -29863,7 +31397,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/nestedStep") @TestDataPath("$PROJECT_ROOT") - public class NestedStep extends AbstractBlackBoxCodegenTest { + public class NestedStep { @Test public void testAllFilesPresentInNestedStep() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/nestedStep"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -29921,7 +31455,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/reversed") @TestDataPath("$PROJECT_ROOT") - public class Reversed extends AbstractBlackBoxCodegenTest { + public class Reversed { @Test public void testAllFilesPresentInReversed() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/reversed"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -29968,7 +31502,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until") @TestDataPath("$PROJECT_ROOT") - public class Until extends AbstractBlackBoxCodegenTest { + public class Until { @Test public void testAllFilesPresentInUntil() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -30079,7 +31613,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/nestedStep") @TestDataPath("$PROJECT_ROOT") - public class NestedStep extends AbstractBlackBoxCodegenTest { + public class NestedStep { @Test public void testAllFilesPresentInNestedStep() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/nestedStep"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -30137,7 +31671,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/reversed") @TestDataPath("$PROJECT_ROOT") - public class Reversed extends AbstractBlackBoxCodegenTest { + public class Reversed { @Test public void testAllFilesPresentInReversed() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/reversed"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -30187,7 +31721,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/ranges/unsigned") @TestDataPath("$PROJECT_ROOT") - public class Unsigned extends AbstractBlackBoxCodegenTest { + public class Unsigned { @Test public void testAllFilesPresentInUnsigned() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/unsigned"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -30226,7 +31760,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/ranges/unsigned/expression") @TestDataPath("$PROJECT_ROOT") - public class Expression extends AbstractBlackBoxCodegenTest { + public class Expression { @Test public void testAllFilesPresentInExpression() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/unsigned/expression"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -30416,7 +31950,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/ranges/unsigned/literal") @TestDataPath("$PROJECT_ROOT") - public class Literal extends AbstractBlackBoxCodegenTest { + public class Literal { @Test public void testAllFilesPresentInLiteral() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/unsigned/literal"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -30606,7 +32140,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/ranges/unsigned/nullableLoopParameter") @TestDataPath("$PROJECT_ROOT") - public class NullableLoopParameter extends AbstractBlackBoxCodegenTest { + public class NullableLoopParameter { @Test public void testAllFilesPresentInNullableLoopParameter() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/unsigned/nullableLoopParameter"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -30633,10 +32167,32 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { } } + @Nested + @TestMetadata("compiler/testData/codegen/box/recursiveRawTypes") + @TestDataPath("$PROJECT_ROOT") + public class RecursiveRawTypes { + @Test + public void testAllFilesPresentInRecursiveRawTypes() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/recursiveRawTypes"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); + } + + @Test + @TestMetadata("kt16528.kt") + public void testKt16528() throws Exception { + runTest("compiler/testData/codegen/box/recursiveRawTypes/kt16528.kt"); + } + + @Test + @TestMetadata("kt16639.kt") + public void testKt16639() throws Exception { + runTest("compiler/testData/codegen/box/recursiveRawTypes/kt16639.kt"); + } + } + @Nested @TestMetadata("compiler/testData/codegen/box/reflection") @TestDataPath("$PROJECT_ROOT") - public class Reflection extends AbstractBlackBoxCodegenTest { + public class Reflection { @Test public void testAllFilesPresentInReflection() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -30645,7 +32201,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/reflection/annotations") @TestDataPath("$PROJECT_ROOT") - public class Annotations extends AbstractBlackBoxCodegenTest { + public class Annotations { @Test public void testAllFilesPresentInAnnotations() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/annotations"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -30768,7 +32324,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/reflection/annotations/onTypes") @TestDataPath("$PROJECT_ROOT") - public class OnTypes extends AbstractBlackBoxCodegenTest { + public class OnTypes { @Test public void testAllFilesPresentInOnTypes() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/annotations/onTypes"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -30803,7 +32359,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/reflection/builtins") @TestDataPath("$PROJECT_ROOT") - public class Builtins extends AbstractBlackBoxCodegenTest { + public class Builtins { @Test public void testAllFilesPresentInBuiltins() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/builtins"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -30831,7 +32387,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/reflection/call") @TestDataPath("$PROJECT_ROOT") - public class Call extends AbstractBlackBoxCodegenTest { + public class Call { @Test public void testAllFilesPresentInCall() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/call"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -30984,7 +32540,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/reflection/call/bound") @TestDataPath("$PROJECT_ROOT") - public class Bound extends AbstractBlackBoxCodegenTest { + public class Bound { @Test public void testAllFilesPresentInBound() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/call/bound"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -31072,7 +32628,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/reflection/call/inlineClasses") @TestDataPath("$PROJECT_ROOT") - public class InlineClasses extends AbstractBlackBoxCodegenTest { + public class InlineClasses { @Test public void testAllFilesPresentInInlineClasses() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/call/inlineClasses"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -31167,7 +32723,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/reflection/callBy") @TestDataPath("$PROJECT_ROOT") - public class CallBy extends AbstractBlackBoxCodegenTest { + public class CallBy { @Test public void testAllFilesPresentInCallBy() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/callBy"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -31333,7 +32889,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/reflection/classLiterals") @TestDataPath("$PROJECT_ROOT") - public class ClassLiterals extends AbstractBlackBoxCodegenTest { + public class ClassLiterals { @Test public void testAllFilesPresentInClassLiterals() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/classLiterals"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -31375,6 +32931,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/reflection/classLiterals/genericClass.kt"); } + @Test + @TestMetadata("javaClassLiteral.kt") + public void testJavaClassLiteral() throws Exception { + runTest("compiler/testData/codegen/box/reflection/classLiterals/javaClassLiteral.kt"); + } + @Test @TestMetadata("lambdaClass.kt") public void testLambdaClass() throws Exception { @@ -31397,7 +32959,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/reflection/classes") @TestDataPath("$PROJECT_ROOT") - public class Classes extends AbstractBlackBoxCodegenTest { + public class Classes { @Test public void testAllFilesPresentInClasses() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/classes"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -31503,7 +33065,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/reflection/constructors") @TestDataPath("$PROJECT_ROOT") - public class Constructors extends AbstractBlackBoxCodegenTest { + public class Constructors { @Test public void testAllFilesPresentInConstructors() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/constructors"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -31549,7 +33111,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/reflection/createAnnotation") @TestDataPath("$PROJECT_ROOT") - public class CreateAnnotation extends AbstractBlackBoxCodegenTest { + public class CreateAnnotation { @Test public void testAllFilesPresentInCreateAnnotation() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/createAnnotation"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -31637,7 +33199,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/reflection/enclosing") @TestDataPath("$PROJECT_ROOT") - public class Enclosing extends AbstractBlackBoxCodegenTest { + public class Enclosing { @Test public void testAllFilesPresentInEnclosing() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/enclosing"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -31797,7 +33359,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/reflection/functions") @TestDataPath("$PROJECT_ROOT") - public class Functions extends AbstractBlackBoxCodegenTest { + public class Functions { @Test public void testAllFilesPresentInFunctions() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/functions"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -31885,7 +33447,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/reflection/genericSignature") @TestDataPath("$PROJECT_ROOT") - public class GenericSignature extends AbstractBlackBoxCodegenTest { + public class GenericSignature { @Test public void testAllFilesPresentInGenericSignature() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/genericSignature"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -31997,7 +33559,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/reflection/isInstance") @TestDataPath("$PROJECT_ROOT") - public class IsInstance extends AbstractBlackBoxCodegenTest { + public class IsInstance { @Test public void testAllFilesPresentInIsInstance() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/isInstance"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -32013,7 +33575,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/reflection/kClassInAnnotation") @TestDataPath("$PROJECT_ROOT") - public class KClassInAnnotation extends AbstractBlackBoxCodegenTest { + public class KClassInAnnotation { @Test public void testAllFilesPresentInKClassInAnnotation() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/kClassInAnnotation"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -32077,7 +33639,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/reflection/lambdaClasses") @TestDataPath("$PROJECT_ROOT") - public class LambdaClasses extends AbstractBlackBoxCodegenTest { + public class LambdaClasses { @Test public void testAllFilesPresentInLambdaClasses() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/lambdaClasses"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -32141,7 +33703,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/reflection/mapping") @TestDataPath("$PROJECT_ROOT") - public class Mapping extends AbstractBlackBoxCodegenTest { + public class Mapping { @Test public void testAllFilesPresentInMapping() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/mapping"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -32183,6 +33745,30 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/reflection/mapping/interfaceCompanionPropertyWithJvmField.kt"); } + @Test + @TestMetadata("jClass2kClass.kt") + public void testJClass2kClass() throws Exception { + runTest("compiler/testData/codegen/box/reflection/mapping/jClass2kClass.kt"); + } + + @Test + @TestMetadata("javaConstructor.kt") + public void testJavaConstructor() throws Exception { + runTest("compiler/testData/codegen/box/reflection/mapping/javaConstructor.kt"); + } + + @Test + @TestMetadata("javaFields.kt") + public void testJavaFields() throws Exception { + runTest("compiler/testData/codegen/box/reflection/mapping/javaFields.kt"); + } + + @Test + @TestMetadata("javaMethods.kt") + public void testJavaMethods() throws Exception { + runTest("compiler/testData/codegen/box/reflection/mapping/javaMethods.kt"); + } + @Test @TestMetadata("lateinitProperty.kt") public void testLateinitProperty() throws Exception { @@ -32252,7 +33838,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/reflection/mapping/fakeOverrides") @TestDataPath("$PROJECT_ROOT") - public class FakeOverrides extends AbstractBlackBoxCodegenTest { + public class FakeOverrides { @Test public void testAllFilesPresentInFakeOverrides() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/mapping/fakeOverrides"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -32274,7 +33860,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/reflection/mapping/inlineClasses") @TestDataPath("$PROJECT_ROOT") - public class InlineClasses extends AbstractBlackBoxCodegenTest { + public class InlineClasses { @Test public void testAllFilesPresentInInlineClasses() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/mapping/inlineClasses"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -32296,7 +33882,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/reflection/mapping/jvmStatic") @TestDataPath("$PROJECT_ROOT") - public class JvmStatic extends AbstractBlackBoxCodegenTest { + public class JvmStatic { @Test public void testAllFilesPresentInJvmStatic() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/mapping/jvmStatic"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -32318,7 +33904,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/reflection/mapping/types") @TestDataPath("$PROJECT_ROOT") - public class Types extends AbstractBlackBoxCodegenTest { + public class Types { @Test public void testAllFilesPresentInTypes() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/mapping/types"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -32455,7 +34041,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/reflection/methodsFromAny") @TestDataPath("$PROJECT_ROOT") - public class MethodsFromAny extends AbstractBlackBoxCodegenTest { + public class MethodsFromAny { @Test @TestMetadata("adaptedCallableReferencesNotEqualToCallablesFromAPI.kt") public void testAdaptedCallableReferencesNotEqualToCallablesFromAPI() throws Exception { @@ -32609,7 +34195,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/reflection/modifiers") @TestDataPath("$PROJECT_ROOT") - public class Modifiers extends AbstractBlackBoxCodegenTest { + public class Modifiers { @Test public void testAllFilesPresentInModifiers() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/modifiers"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -32673,7 +34259,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/reflection/multifileClasses") @TestDataPath("$PROJECT_ROOT") - public class MultifileClasses extends AbstractBlackBoxCodegenTest { + public class MultifileClasses { @Test public void testAllFilesPresentInMultifileClasses() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/multifileClasses"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -32701,7 +34287,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/reflection/noReflectAtRuntime") @TestDataPath("$PROJECT_ROOT") - public class NoReflectAtRuntime extends AbstractBlackBoxCodegenTest { + public class NoReflectAtRuntime { @Test public void testAllFilesPresentInNoReflectAtRuntime() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/noReflectAtRuntime"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -32752,7 +34338,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/reflection/noReflectAtRuntime/methodsFromAny") @TestDataPath("$PROJECT_ROOT") - public class MethodsFromAny extends AbstractBlackBoxCodegenTest { + public class MethodsFromAny { @Test public void testAllFilesPresentInMethodsFromAny() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/noReflectAtRuntime/methodsFromAny"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -32781,7 +34367,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/reflection/parameters") @TestDataPath("$PROJECT_ROOT") - public class Parameters extends AbstractBlackBoxCodegenTest { + public class Parameters { @Test public void testAllFilesPresentInParameters() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/parameters"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -32881,7 +34467,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/reflection/properties") @TestDataPath("$PROJECT_ROOT") - public class Properties extends AbstractBlackBoxCodegenTest { + public class Properties { @Test public void testAllFilesPresentInProperties() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/properties"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -32905,6 +34491,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/reflection/properties/declaredVsInheritedProperties.kt"); } + @Test + @TestMetadata("equalsHashCodeToString.kt") + public void testEqualsHashCodeToString() throws Exception { + runTest("compiler/testData/codegen/box/reflection/properties/equalsHashCodeToString.kt"); + } + @Test @TestMetadata("fakeOverridesInSubclass.kt") public void testFakeOverridesInSubclass() throws Exception { @@ -33070,7 +34662,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/reflection/properties/accessors") @TestDataPath("$PROJECT_ROOT") - public class Accessors extends AbstractBlackBoxCodegenTest { + public class Accessors { @Test @TestMetadata("accessorNames.kt") public void testAccessorNames() throws Exception { @@ -33110,7 +34702,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/reflection/properties/getDelegate") @TestDataPath("$PROJECT_ROOT") - public class GetDelegate extends AbstractBlackBoxCodegenTest { + public class GetDelegate { @Test public void testAllFilesPresentInGetDelegate() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/properties/getDelegate"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -33210,7 +34802,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/reflection/properties/jvmField") @TestDataPath("$PROJECT_ROOT") - public class JvmField extends AbstractBlackBoxCodegenTest { + public class JvmField { @Test public void testAllFilesPresentInJvmField() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/properties/jvmField"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -33238,7 +34830,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/reflection/properties/localDelegated") @TestDataPath("$PROJECT_ROOT") - public class LocalDelegated extends AbstractBlackBoxCodegenTest { + public class LocalDelegated { @Test public void testAllFilesPresentInLocalDelegated() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/properties/localDelegated"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -33297,7 +34889,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/reflection/supertypes") @TestDataPath("$PROJECT_ROOT") - public class Supertypes extends AbstractBlackBoxCodegenTest { + public class Supertypes { @Test public void testAllFilesPresentInSupertypes() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/supertypes"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -33337,7 +34929,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/reflection/typeOf") @TestDataPath("$PROJECT_ROOT") - public class TypeOf extends AbstractBlackBoxCodegenTest { + public class TypeOf { @Test public void testAllFilesPresentInTypeOf() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/typeOf"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -33376,7 +34968,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/reflection/typeOf/js") @TestDataPath("$PROJECT_ROOT") - public class Js extends AbstractBlackBoxCodegenTest { + public class Js { @Test public void testAllFilesPresentInJs() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/typeOf/js"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -33386,7 +34978,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/reflection/typeOf/noReflect") @TestDataPath("$PROJECT_ROOT") - public class NoReflect extends AbstractBlackBoxCodegenTest { + public class NoReflect { @Test public void testAllFilesPresentInNoReflect() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/typeOf/noReflect"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -33413,7 +35005,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/reflection/typeOf/noReflect/nonReifiedTypeParameters") @TestDataPath("$PROJECT_ROOT") - public class NonReifiedTypeParameters extends AbstractBlackBoxCodegenTest { + public class NonReifiedTypeParameters { @Test public void testAllFilesPresentInNonReifiedTypeParameters() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/typeOf/noReflect/nonReifiedTypeParameters"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -33484,7 +35076,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/reflection/typeOf/nonReifiedTypeParameters") @TestDataPath("$PROJECT_ROOT") - public class NonReifiedTypeParameters extends AbstractBlackBoxCodegenTest { + public class NonReifiedTypeParameters { @Test public void testAllFilesPresentInNonReifiedTypeParameters() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/typeOf/nonReifiedTypeParameters"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -33567,7 +35159,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/reflection/typeParameters") @TestDataPath("$PROJECT_ROOT") - public class TypeParameters extends AbstractBlackBoxCodegenTest { + public class TypeParameters { @Test public void testAllFilesPresentInTypeParameters() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/typeParameters"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -33607,7 +35199,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/reflection/types") @TestDataPath("$PROJECT_ROOT") - public class Types extends AbstractBlackBoxCodegenTest { + public class Types { @Test public void testAllFilesPresentInTypes() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/types"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -33688,7 +35280,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/reflection/types/createType") @TestDataPath("$PROJECT_ROOT") - public class CreateType extends AbstractBlackBoxCodegenTest { + public class CreateType { @Test public void testAllFilesPresentInCreateType() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/types/createType"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -33728,7 +35320,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/reflection/types/subtyping") @TestDataPath("$PROJECT_ROOT") - public class Subtyping extends AbstractBlackBoxCodegenTest { + public class Subtyping { @Test public void testAllFilesPresentInSubtyping() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/types/subtyping"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -33764,7 +35356,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/regressions") @TestDataPath("$PROJECT_ROOT") - public class Regressions extends AbstractBlackBoxCodegenTest { + public class Regressions { @Test public void testAllFilesPresentInRegressions() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/regressions"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -34350,7 +35942,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/reified") @TestDataPath("$PROJECT_ROOT") - public class Reified extends AbstractBlackBoxCodegenTest { + public class Reified { @Test public void testAllFilesPresentInReified() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reified"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -34446,6 +36038,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/reified/javaClass.kt"); } + @Test + @TestMetadata("kt16445.kt") + public void testKt16445() throws Exception { + runTest("compiler/testData/codegen/box/reified/kt16445.kt"); + } + @Test @TestMetadata("nestedReified.kt") public void testNestedReified() throws Exception { @@ -34569,7 +36167,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/reified/arraysReification") @TestDataPath("$PROJECT_ROOT") - public class ArraysReification extends AbstractBlackBoxCodegenTest { + public class ArraysReification { @Test public void testAllFilesPresentInArraysReification() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reified/arraysReification"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -34616,7 +36214,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/safeCall") @TestDataPath("$PROJECT_ROOT") - public class SafeCall extends AbstractBlackBoxCodegenTest { + public class SafeCall { @Test public void testAllFilesPresentInSafeCall() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/safeCall"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -34704,7 +36302,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/sam") @TestDataPath("$PROJECT_ROOT") - public class Sam extends AbstractBlackBoxCodegenTest { + public class Sam { @Test public void testAllFilesPresentInSam() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/sam"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -34722,6 +36320,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/sam/castFromAny.kt"); } + @Test + @TestMetadata("differentFqNames.kt") + public void testDifferentFqNames() throws Exception { + runTest("compiler/testData/codegen/box/sam/differentFqNames.kt"); + } + @Test @TestMetadata("inlinedSamWrapper.kt") public void testInlinedSamWrapper() throws Exception { @@ -34734,6 +36338,24 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/sam/irrelevantStaticProperty.kt"); } + @Test + @TestMetadata("kt11519.kt") + public void testKt11519() throws Exception { + runTest("compiler/testData/codegen/box/sam/kt11519.kt"); + } + + @Test + @TestMetadata("kt11519Constructor.kt") + public void testKt11519Constructor() throws Exception { + runTest("compiler/testData/codegen/box/sam/kt11519Constructor.kt"); + } + + @Test + @TestMetadata("kt11696.kt") + public void testKt11696() throws Exception { + runTest("compiler/testData/codegen/box/sam/kt11696.kt"); + } + @Test @TestMetadata("kt17091.kt") public void testKt17091() throws Exception { @@ -34782,6 +36404,18 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/sam/kt31908.kt"); } + @Test + @TestMetadata("kt4753.kt") + public void testKt4753() throws Exception { + runTest("compiler/testData/codegen/box/sam/kt4753.kt"); + } + + @Test + @TestMetadata("kt4753_2.kt") + public void testKt4753_2() throws Exception { + runTest("compiler/testData/codegen/box/sam/kt4753_2.kt"); + } + @Test @TestMetadata("nonInlinedSamWrapper.kt") public void testNonInlinedSamWrapper() throws Exception { @@ -34818,6 +36452,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/sam/predicateSamWrapper.kt"); } + @Test + @TestMetadata("propertyReference.kt") + public void testPropertyReference() throws Exception { + runTest("compiler/testData/codegen/box/sam/propertyReference.kt"); + } + @Test @TestMetadata("receiverEvaluatedOnce.kt") public void testReceiverEvaluatedOnce() throws Exception { @@ -34830,10 +36470,282 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/sam/recordSubstitutedTypeForCallableSamParameter.kt"); } + @Test + @TestMetadata("samConstructorGenericSignature.kt") + public void testSamConstructorGenericSignature() throws Exception { + runTest("compiler/testData/codegen/box/sam/samConstructorGenericSignature.kt"); + } + + @Test + @TestMetadata("smartCastSamConversion.kt") + public void testSmartCastSamConversion() throws Exception { + runTest("compiler/testData/codegen/box/sam/smartCastSamConversion.kt"); + } + + @Nested + @TestMetadata("compiler/testData/codegen/box/sam/adapters") + @TestDataPath("$PROJECT_ROOT") + public class Adapters { + @Test + public void testAllFilesPresentInAdapters() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/sam/adapters"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); + } + + @Test + @TestMetadata("bridgesForOverridden.kt") + public void testBridgesForOverridden() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/bridgesForOverridden.kt"); + } + + @Test + @TestMetadata("bridgesForOverriddenComplex.kt") + public void testBridgesForOverriddenComplex() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/bridgesForOverriddenComplex.kt"); + } + + @Test + @TestMetadata("callAbstractAdapter.kt") + public void testCallAbstractAdapter() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/callAbstractAdapter.kt"); + } + + @Test + @TestMetadata("comparator.kt") + public void testComparator() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/comparator.kt"); + } + + @Test + @TestMetadata("constructor.kt") + public void testConstructor() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/constructor.kt"); + } + + @Test + @TestMetadata("doubleLongParameters.kt") + public void testDoubleLongParameters() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/doubleLongParameters.kt"); + } + + @Test + @TestMetadata("fileFilter.kt") + public void testFileFilter() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/fileFilter.kt"); + } + + @Test + @TestMetadata("genericSignature.kt") + public void testGenericSignature() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/genericSignature.kt"); + } + + @Test + @TestMetadata("implementAdapter.kt") + public void testImplementAdapter() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/implementAdapter.kt"); + } + + @Test + @TestMetadata("inheritedInKotlin.kt") + public void testInheritedInKotlin() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/inheritedInKotlin.kt"); + } + + @Test + @TestMetadata("inheritedOverriddenAdapter.kt") + public void testInheritedOverriddenAdapter() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/inheritedOverriddenAdapter.kt"); + } + + @Test + @TestMetadata("inheritedSimple.kt") + public void testInheritedSimple() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/inheritedSimple.kt"); + } + + @Test + @TestMetadata("localClass.kt") + public void testLocalClass() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/localClass.kt"); + } + + @Test + @TestMetadata("localObjectConstructor.kt") + public void testLocalObjectConstructor() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/localObjectConstructor.kt"); + } + + @Test + @TestMetadata("localObjectConstructorWithFnValue.kt") + public void testLocalObjectConstructorWithFnValue() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/localObjectConstructorWithFnValue.kt"); + } + + @Test + @TestMetadata("nonLiteralAndLiteralRunnable.kt") + public void testNonLiteralAndLiteralRunnable() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/nonLiteralAndLiteralRunnable.kt"); + } + + @Test + @TestMetadata("nonLiteralComparator.kt") + public void testNonLiteralComparator() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/nonLiteralComparator.kt"); + } + + @Test + @TestMetadata("nonLiteralInConstructor.kt") + public void testNonLiteralInConstructor() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/nonLiteralInConstructor.kt"); + } + + @Test + @TestMetadata("nonLiteralNull.kt") + public void testNonLiteralNull() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/nonLiteralNull.kt"); + } + + @Test + @TestMetadata("nonLiteralRunnable.kt") + public void testNonLiteralRunnable() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/nonLiteralRunnable.kt"); + } + + @Test + @TestMetadata("protectedFromBase.kt") + public void testProtectedFromBase() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/protectedFromBase.kt"); + } + + @Test + @TestMetadata("severalSamParameters.kt") + public void testSeveralSamParameters() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/severalSamParameters.kt"); + } + + @Test + @TestMetadata("simplest.kt") + public void testSimplest() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/simplest.kt"); + } + + @Test + @TestMetadata("superInSecondaryConstructor.kt") + public void testSuperInSecondaryConstructor() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/superInSecondaryConstructor.kt"); + } + + @Test + @TestMetadata("superconstructor.kt") + public void testSuperconstructor() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/superconstructor.kt"); + } + + @Test + @TestMetadata("superconstructorWithClosure.kt") + public void testSuperconstructorWithClosure() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/superconstructorWithClosure.kt"); + } + + @Test + @TestMetadata("typeParameterOfClass.kt") + public void testTypeParameterOfClass() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/typeParameterOfClass.kt"); + } + + @Test + @TestMetadata("typeParameterOfMethod.kt") + public void testTypeParameterOfMethod() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/typeParameterOfMethod.kt"); + } + + @Test + @TestMetadata("typeParameterOfOuterClass.kt") + public void testTypeParameterOfOuterClass() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/typeParameterOfOuterClass.kt"); + } + + @Nested + @TestMetadata("compiler/testData/codegen/box/sam/adapters/operators") + @TestDataPath("$PROJECT_ROOT") + public class Operators { + @Test + public void testAllFilesPresentInOperators() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/sam/adapters/operators"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); + } + + @Test + @TestMetadata("augmentedAssignmentPure.kt") + public void testAugmentedAssignmentPure() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/operators/augmentedAssignmentPure.kt"); + } + + @Test + @TestMetadata("augmentedAssignmentViaSimpleBinary.kt") + public void testAugmentedAssignmentViaSimpleBinary() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/operators/augmentedAssignmentViaSimpleBinary.kt"); + } + + @Test + @TestMetadata("binary.kt") + public void testBinary() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/operators/binary.kt"); + } + + @Test + @TestMetadata("compareTo.kt") + public void testCompareTo() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/operators/compareTo.kt"); + } + + @Test + @TestMetadata("contains.kt") + public void testContains() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/operators/contains.kt"); + } + + @Test + @TestMetadata("get.kt") + public void testGet() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/operators/get.kt"); + } + + @Test + @TestMetadata("invoke.kt") + public void testInvoke() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/operators/invoke.kt"); + } + + @Test + @TestMetadata("legacyModOperator.kt") + public void testLegacyModOperator() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/operators/legacyModOperator.kt"); + } + + @Test + @TestMetadata("multiGetSet.kt") + public void testMultiGetSet() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/operators/multiGetSet.kt"); + } + + @Test + @TestMetadata("multiInvoke.kt") + public void testMultiInvoke() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/operators/multiInvoke.kt"); + } + + @Test + @TestMetadata("set.kt") + public void testSet() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/operators/set.kt"); + } + } + } + @Nested @TestMetadata("compiler/testData/codegen/box/sam/constructors") @TestDataPath("$PROJECT_ROOT") - public class Constructors extends AbstractBlackBoxCodegenTest { + public class Constructors { @Test public void testAllFilesPresentInConstructors() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/sam/constructors"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -34933,7 +36845,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/sam/equality") @TestDataPath("$PROJECT_ROOT") - public class Equality extends AbstractBlackBoxCodegenTest { + public class Equality { @Test public void testAllFilesPresentInEquality() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/sam/equality"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -34974,7 +36886,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/sealed") @TestDataPath("$PROJECT_ROOT") - public class Sealed extends AbstractBlackBoxCodegenTest { + public class Sealed { @Test public void testAllFilesPresentInSealed() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/sealed"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -35020,7 +36932,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/secondaryConstructors") @TestDataPath("$PROJECT_ROOT") - public class SecondaryConstructors extends AbstractBlackBoxCodegenTest { + public class SecondaryConstructors { @Test @TestMetadata("accessToCompanion.kt") public void testAccessToCompanion() throws Exception { @@ -35240,7 +37152,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/signatureAnnotations") @TestDataPath("$PROJECT_ROOT") - public class SignatureAnnotations extends AbstractBlackBoxCodegenTest { + public class SignatureAnnotations { @Test public void testAllFilesPresentInSignatureAnnotations() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/signatureAnnotations"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -35328,7 +37240,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/smap") @TestDataPath("$PROJECT_ROOT") - public class Smap extends AbstractBlackBoxCodegenTest { + public class Smap { @Test public void testAllFilesPresentInSmap() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/smap"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -35356,7 +37268,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/smartCasts") @TestDataPath("$PROJECT_ROOT") - public class SmartCasts extends AbstractBlackBoxCodegenTest { + public class SmartCasts { @Test public void testAllFilesPresentInSmartCasts() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/smartCasts"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -35480,7 +37392,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/specialBuiltins") @TestDataPath("$PROJECT_ROOT") - public class SpecialBuiltins extends AbstractBlackBoxCodegenTest { + public class SpecialBuiltins { @Test public void testAllFilesPresentInSpecialBuiltins() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/specialBuiltins"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -35498,6 +37410,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/specialBuiltins/bridges.kt"); } + @Test + @TestMetadata("charBuffer.kt") + public void testCharBuffer() throws Exception { + runTest("compiler/testData/codegen/box/specialBuiltins/charBuffer.kt"); + } + @Test @TestMetadata("collectionImpl.kt") public void testCollectionImpl() throws Exception { @@ -35649,10 +37567,26 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { } } + @Nested + @TestMetadata("compiler/testData/codegen/box/staticFun") + @TestDataPath("$PROJECT_ROOT") + public class StaticFun { + @Test + public void testAllFilesPresentInStaticFun() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/staticFun"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); + } + + @Test + @TestMetadata("classWithNestedEnum.kt") + public void testClassWithNestedEnum() throws Exception { + runTest("compiler/testData/codegen/box/staticFun/classWithNestedEnum.kt"); + } + } + @Nested @TestMetadata("compiler/testData/codegen/box/statics") @TestDataPath("$PROJECT_ROOT") - public class Statics extends AbstractBlackBoxCodegenTest { + public class Statics { @Test public void testAllFilesPresentInStatics() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/statics"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -35754,6 +37688,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/statics/protectedStaticAndInline.kt"); } + @Test + @TestMetadata("simpleStaticInJavaSuperChain.kt") + public void testSimpleStaticInJavaSuperChain() throws Exception { + runTest("compiler/testData/codegen/box/statics/simpleStaticInJavaSuperChain.kt"); + } + @Test @TestMetadata("syntheticAccessor.kt") public void testSyntheticAccessor() throws Exception { @@ -35764,7 +37704,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/storeStackBeforeInline") @TestDataPath("$PROJECT_ROOT") - public class StoreStackBeforeInline extends AbstractBlackBoxCodegenTest { + public class StoreStackBeforeInline { @Test public void testAllFilesPresentInStoreStackBeforeInline() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/storeStackBeforeInline"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -35804,7 +37744,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/strings") @TestDataPath("$PROJECT_ROOT") - public class Strings extends AbstractBlackBoxCodegenTest { + public class Strings { @Test public void testAllFilesPresentInStrings() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/strings"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -35970,7 +37910,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/super") @TestDataPath("$PROJECT_ROOT") - public class Super extends AbstractBlackBoxCodegenTest { + public class Super { @Test public void testAllFilesPresentInSuper() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/super"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -36159,7 +38099,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/super/superConstructor") @TestDataPath("$PROJECT_ROOT") - public class SuperConstructor extends AbstractBlackBoxCodegenTest { + public class SuperConstructor { @Test public void testAllFilesPresentInSuperConstructor() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/super/superConstructor"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -36212,7 +38152,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/synchronized") @TestDataPath("$PROJECT_ROOT") - public class Synchronized extends AbstractBlackBoxCodegenTest { + public class Synchronized { @Test public void testAllFilesPresentInSynchronized() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/synchronized"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -36288,7 +38228,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/syntheticAccessors") @TestDataPath("$PROJECT_ROOT") - public class SyntheticAccessors extends AbstractBlackBoxCodegenTest { + public class SyntheticAccessors { @Test @TestMetadata("accessorForAbstractProtected.kt") public void testAccessorForAbstractProtected() throws Exception { @@ -36415,10 +38355,80 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { } } + @Nested + @TestMetadata("compiler/testData/codegen/box/syntheticExtensions") + @TestDataPath("$PROJECT_ROOT") + public class SyntheticExtensions { + @Test + public void testAllFilesPresentInSyntheticExtensions() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/syntheticExtensions"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); + } + + @Test + @TestMetadata("fromTwoBases.kt") + public void testFromTwoBases() throws Exception { + runTest("compiler/testData/codegen/box/syntheticExtensions/fromTwoBases.kt"); + } + + @Test + @TestMetadata("getter.kt") + public void testGetter() throws Exception { + runTest("compiler/testData/codegen/box/syntheticExtensions/getter.kt"); + } + + @Test + @TestMetadata("implicitReceiver.kt") + public void testImplicitReceiver() throws Exception { + runTest("compiler/testData/codegen/box/syntheticExtensions/implicitReceiver.kt"); + } + + @Test + @TestMetadata("overrideOnlyGetter.kt") + public void testOverrideOnlyGetter() throws Exception { + runTest("compiler/testData/codegen/box/syntheticExtensions/overrideOnlyGetter.kt"); + } + + @Test + @TestMetadata("plusPlus.kt") + public void testPlusPlus() throws Exception { + runTest("compiler/testData/codegen/box/syntheticExtensions/plusPlus.kt"); + } + + @Test + @TestMetadata("protected.kt") + public void testProtected() throws Exception { + runTest("compiler/testData/codegen/box/syntheticExtensions/protected.kt"); + } + + @Test + @TestMetadata("protectedSetter.kt") + public void testProtectedSetter() throws Exception { + runTest("compiler/testData/codegen/box/syntheticExtensions/protectedSetter.kt"); + } + + @Test + @TestMetadata("setter.kt") + public void testSetter() throws Exception { + runTest("compiler/testData/codegen/box/syntheticExtensions/setter.kt"); + } + + @Test + @TestMetadata("setterNonVoid1.kt") + public void testSetterNonVoid1() throws Exception { + runTest("compiler/testData/codegen/box/syntheticExtensions/setterNonVoid1.kt"); + } + + @Test + @TestMetadata("setterNonVoid2.kt") + public void testSetterNonVoid2() throws Exception { + runTest("compiler/testData/codegen/box/syntheticExtensions/setterNonVoid2.kt"); + } + } + @Nested @TestMetadata("compiler/testData/codegen/box/throws") @TestDataPath("$PROJECT_ROOT") - public class Throws extends AbstractBlackBoxCodegenTest { + public class Throws { @Test public void testAllFilesPresentInThrows() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/throws"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -36435,12 +38445,18 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { public void testDelegationAndThrows_1_3() throws Exception { runTest("compiler/testData/codegen/box/throws/delegationAndThrows_1_3.kt"); } + + @Test + @TestMetadata("delegationAndThrows_AgainstCompiled.kt") + public void testDelegationAndThrows_AgainstCompiled() throws Exception { + runTest("compiler/testData/codegen/box/throws/delegationAndThrows_AgainstCompiled.kt"); + } } @Nested @TestMetadata("compiler/testData/codegen/box/toArray") @TestDataPath("$PROJECT_ROOT") - public class ToArray extends AbstractBlackBoxCodegenTest { + public class ToArray { @Test public void testAllFilesPresentInToArray() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/toArray"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -36504,7 +38520,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/topLevelPrivate") @TestDataPath("$PROJECT_ROOT") - public class TopLevelPrivate extends AbstractBlackBoxCodegenTest { + public class TopLevelPrivate { @Test public void testAllFilesPresentInTopLevelPrivate() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/topLevelPrivate"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -36550,7 +38566,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/trailingComma") @TestDataPath("$PROJECT_ROOT") - public class TrailingComma extends AbstractBlackBoxCodegenTest { + public class TrailingComma { @Test public void testAllFilesPresentInTrailingComma() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/trailingComma"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -36566,7 +38582,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/traits") @TestDataPath("$PROJECT_ROOT") - public class Traits extends AbstractBlackBoxCodegenTest { + public class Traits { @Test @TestMetadata("abstractClassInheritsFromInterface.kt") public void testAbstractClassInheritsFromInterface() throws Exception { @@ -36804,7 +38820,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/typeInfo") @TestDataPath("$PROJECT_ROOT") - public class TypeInfo extends AbstractBlackBoxCodegenTest { + public class TypeInfo { @Test public void testAllFilesPresentInTypeInfo() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/typeInfo"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -36856,7 +38872,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/typeMapping") @TestDataPath("$PROJECT_ROOT") - public class TypeMapping extends AbstractBlackBoxCodegenTest { + public class TypeMapping { @Test public void testAllFilesPresentInTypeMapping() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/typeMapping"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -36938,7 +38954,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/typealias") @TestDataPath("$PROJECT_ROOT") - public class Typealias extends AbstractBlackBoxCodegenTest { + public class Typealias { @Test public void testAllFilesPresentInTypealias() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/typealias"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -36974,6 +38990,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/typealias/innerClassTypeAliasConstructorInSupertypes.kt"); } + @Test + @TestMetadata("javaStaticMembersViaTypeAlias.kt") + public void testJavaStaticMembersViaTypeAlias() throws Exception { + runTest("compiler/testData/codegen/box/typealias/javaStaticMembersViaTypeAlias.kt"); + } + @Test @TestMetadata("kt15109.kt") public void testKt15109() throws Exception { @@ -37034,6 +39056,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/typealias/typeAliasConstructorInSuperCall.kt"); } + @Test + @TestMetadata("typeAliasFunction.kt") + public void testTypeAliasFunction() throws Exception { + runTest("compiler/testData/codegen/box/typealias/typeAliasFunction.kt"); + } + @Test @TestMetadata("typeAliasInAnonymousObjectType.kt") public void testTypeAliasInAnonymousObjectType() throws Exception { @@ -37062,7 +39090,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/unaryOp") @TestDataPath("$PROJECT_ROOT") - public class UnaryOp extends AbstractBlackBoxCodegenTest { + public class UnaryOp { @Test public void testAllFilesPresentInUnaryOp() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/unaryOp"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -37108,7 +39136,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/unit") @TestDataPath("$PROJECT_ROOT") - public class Unit extends AbstractBlackBoxCodegenTest { + public class Unit { @Test public void testAllFilesPresentInUnit() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/unit"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -37184,7 +39212,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/unsignedTypes") @TestDataPath("$PROJECT_ROOT") - public class UnsignedTypes extends AbstractBlackBoxCodegenTest { + public class UnsignedTypes { @Test public void testAllFilesPresentInUnsignedTypes() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/unsignedTypes"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -37451,7 +39479,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/unsignedTypes/jvm8Intrinsics") @TestDataPath("$PROJECT_ROOT") - public class Jvm8Intrinsics extends AbstractBlackBoxCodegenTest { + public class Jvm8Intrinsics { @Test public void testAllFilesPresentInJvm8Intrinsics() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/unsignedTypes/jvm8Intrinsics"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -37510,7 +39538,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/valueClasses") @TestDataPath("$PROJECT_ROOT") - public class ValueClasses extends AbstractBlackBoxCodegenTest { + public class ValueClasses { @Test public void testAllFilesPresentInValueClasses() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/valueClasses"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -37526,7 +39554,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/vararg") @TestDataPath("$PROJECT_ROOT") - public class Vararg extends AbstractBlackBoxCodegenTest { + public class Vararg { @Test public void testAllFilesPresentInVararg() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/vararg"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -37635,10 +39663,222 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { } } + @Nested + @TestMetadata("compiler/testData/codegen/box/varargs") + @TestDataPath("$PROJECT_ROOT") + public class Varargs { + @Test + public void testAllFilesPresentInVarargs() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/varargs"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); + } + + @Test + @TestMetadata("varargsOverride.kt") + public void testVarargsOverride() throws Exception { + runTest("compiler/testData/codegen/box/varargs/varargsOverride.kt"); + } + + @Test + @TestMetadata("varargsOverride2.kt") + public void testVarargsOverride2() throws Exception { + runTest("compiler/testData/codegen/box/varargs/varargsOverride2.kt"); + } + + @Test + @TestMetadata("varargsOverride3.kt") + public void testVarargsOverride3() throws Exception { + runTest("compiler/testData/codegen/box/varargs/varargsOverride3.kt"); + } + } + + @Nested + @TestMetadata("compiler/testData/codegen/box/visibility") + @TestDataPath("$PROJECT_ROOT") + public class Visibility { + @Test + public void testAllFilesPresentInVisibility() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/visibility"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); + } + + @Nested + @TestMetadata("compiler/testData/codegen/box/visibility/package") + @TestDataPath("$PROJECT_ROOT") + public class Package { + @Test + public void testAllFilesPresentInPackage() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/visibility/package"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); + } + + @Test + @TestMetadata("kt2781.kt") + public void testKt2781() throws Exception { + runTest("compiler/testData/codegen/box/visibility/package/kt2781.kt"); + } + + @Test + @TestMetadata("packageClass.kt") + public void testPackageClass() throws Exception { + runTest("compiler/testData/codegen/box/visibility/package/packageClass.kt"); + } + + @Test + @TestMetadata("packageFun.kt") + public void testPackageFun() throws Exception { + runTest("compiler/testData/codegen/box/visibility/package/packageFun.kt"); + } + + @Test + @TestMetadata("packageProperty.kt") + public void testPackageProperty() throws Exception { + runTest("compiler/testData/codegen/box/visibility/package/packageProperty.kt"); + } + } + + @Nested + @TestMetadata("compiler/testData/codegen/box/visibility/protectedAndPackage") + @TestDataPath("$PROJECT_ROOT") + public class ProtectedAndPackage { + @Test + public void testAllFilesPresentInProtectedAndPackage() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/visibility/protectedAndPackage"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); + } + + @Test + @TestMetadata("overrideProtectedFunInPackage.kt") + public void testOverrideProtectedFunInPackage() throws Exception { + runTest("compiler/testData/codegen/box/visibility/protectedAndPackage/overrideProtectedFunInPackage.kt"); + } + + @Test + @TestMetadata("protectedAccessor.kt") + public void testProtectedAccessor() throws Exception { + runTest("compiler/testData/codegen/box/visibility/protectedAndPackage/protectedAccessor.kt"); + } + + @Test + @TestMetadata("protectedFunInPackage.kt") + public void testProtectedFunInPackage() throws Exception { + runTest("compiler/testData/codegen/box/visibility/protectedAndPackage/protectedFunInPackage.kt"); + } + + @Test + @TestMetadata("protectedPropertyInPackage.kt") + public void testProtectedPropertyInPackage() throws Exception { + runTest("compiler/testData/codegen/box/visibility/protectedAndPackage/protectedPropertyInPackage.kt"); + } + + @Test + @TestMetadata("protectedPropertyInPackageFromCrossinline.kt") + public void testProtectedPropertyInPackageFromCrossinline() throws Exception { + runTest("compiler/testData/codegen/box/visibility/protectedAndPackage/protectedPropertyInPackageFromCrossinline.kt"); + } + + @Test + @TestMetadata("protectedStaticClass.kt") + public void testProtectedStaticClass() throws Exception { + runTest("compiler/testData/codegen/box/visibility/protectedAndPackage/protectedStaticClass.kt"); + } + + @Test + @TestMetadata("protectedSuperField.kt") + public void testProtectedSuperField() throws Exception { + runTest("compiler/testData/codegen/box/visibility/protectedAndPackage/protectedSuperField.kt"); + } + + @Test + @TestMetadata("protectedSuperMethod.kt") + public void testProtectedSuperMethod() throws Exception { + runTest("compiler/testData/codegen/box/visibility/protectedAndPackage/protectedSuperMethod.kt"); + } + } + + @Nested + @TestMetadata("compiler/testData/codegen/box/visibility/protectedStatic") + @TestDataPath("$PROJECT_ROOT") + public class ProtectedStatic { + @Test + public void testAllFilesPresentInProtectedStatic() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/visibility/protectedStatic"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); + } + + @Test + @TestMetadata("funCallInConstructor.kt") + public void testFunCallInConstructor() throws Exception { + runTest("compiler/testData/codegen/box/visibility/protectedStatic/funCallInConstructor.kt"); + } + + @Test + @TestMetadata("funClassObject.kt") + public void testFunClassObject() throws Exception { + runTest("compiler/testData/codegen/box/visibility/protectedStatic/funClassObject.kt"); + } + + @Test + @TestMetadata("funGenericClass.kt") + public void testFunGenericClass() throws Exception { + runTest("compiler/testData/codegen/box/visibility/protectedStatic/funGenericClass.kt"); + } + + @Test + @TestMetadata("funNestedStaticClass.kt") + public void testFunNestedStaticClass() throws Exception { + runTest("compiler/testData/codegen/box/visibility/protectedStatic/funNestedStaticClass.kt"); + } + + @Test + @TestMetadata("funNestedStaticClass2.kt") + public void testFunNestedStaticClass2() throws Exception { + runTest("compiler/testData/codegen/box/visibility/protectedStatic/funNestedStaticClass2.kt"); + } + + @Test + @TestMetadata("funNestedStaticGenericClass.kt") + public void testFunNestedStaticGenericClass() throws Exception { + runTest("compiler/testData/codegen/box/visibility/protectedStatic/funNestedStaticGenericClass.kt"); + } + + @Test + @TestMetadata("funNotDirectSuperClass.kt") + public void testFunNotDirectSuperClass() throws Exception { + runTest("compiler/testData/codegen/box/visibility/protectedStatic/funNotDirectSuperClass.kt"); + } + + @Test + @TestMetadata("funObject.kt") + public void testFunObject() throws Exception { + runTest("compiler/testData/codegen/box/visibility/protectedStatic/funObject.kt"); + } + + @Test + @TestMetadata("simpleClass.kt") + public void testSimpleClass() throws Exception { + runTest("compiler/testData/codegen/box/visibility/protectedStatic/simpleClass.kt"); + } + + @Test + @TestMetadata("simpleClass2.kt") + public void testSimpleClass2() throws Exception { + runTest("compiler/testData/codegen/box/visibility/protectedStatic/simpleClass2.kt"); + } + + @Test + @TestMetadata("simpleFun.kt") + public void testSimpleFun() throws Exception { + runTest("compiler/testData/codegen/box/visibility/protectedStatic/simpleFun.kt"); + } + + @Test + @TestMetadata("simpleProperty.kt") + public void testSimpleProperty() throws Exception { + runTest("compiler/testData/codegen/box/visibility/protectedStatic/simpleProperty.kt"); + } + } + } + @Nested @TestMetadata("compiler/testData/codegen/box/when") @TestDataPath("$PROJECT_ROOT") - public class When extends AbstractBlackBoxCodegenTest { + public class When { @Test public void testAllFilesPresentInWhen() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/when"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -37899,7 +40139,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/when/enumOptimization") @TestDataPath("$PROJECT_ROOT") - public class EnumOptimization extends AbstractBlackBoxCodegenTest { + public class EnumOptimization { @Test public void testAllFilesPresentInEnumOptimization() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/when/enumOptimization"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -38017,7 +40257,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/when/stringOptimization") @TestDataPath("$PROJECT_ROOT") - public class StringOptimization extends AbstractBlackBoxCodegenTest { + public class StringOptimization { @Test public void testAllFilesPresentInStringOptimization() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/when/stringOptimization"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -38081,7 +40321,7 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @Nested @TestMetadata("compiler/testData/codegen/box/when/whenSubjectVariable") @TestDataPath("$PROJECT_ROOT") - public class WhenSubjectVariable extends AbstractBlackBoxCodegenTest { + public class WhenSubjectVariable { @Test public void testAllFilesPresentInWhenSubjectVariable() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/when/whenSubjectVariable"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); diff --git a/compiler/tests-gen/org/jetbrains/kotlin/codegen/BlackBoxInlineCodegenTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxInlineCodegenTestGenerated.java similarity index 89% rename from compiler/tests-gen/org/jetbrains/kotlin/codegen/BlackBoxInlineCodegenTestGenerated.java rename to compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxInlineCodegenTestGenerated.java index a1c375e4b7f..f080a1b5d6e 100644 --- a/compiler/tests-gen/org/jetbrains/kotlin/codegen/BlackBoxInlineCodegenTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxInlineCodegenTestGenerated.java @@ -3,569 +3,651 @@ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. */ -package org.jetbrains.kotlin.codegen; +package org.jetbrains.kotlin.test.runners.codegen; import com.intellij.testFramework.TestDataPath; -import org.jetbrains.kotlin.test.JUnit3RunnerWithInners; -import org.jetbrains.kotlin.test.KotlinTestUtils; import org.jetbrains.kotlin.test.util.KtTestUtil; import org.jetbrains.kotlin.test.TargetBackend; import org.jetbrains.kotlin.test.TestMetadata; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.Nested; +import org.junit.jupiter.api.Test; import java.io.File; import java.util.regex.Pattern; -/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */ +/** This class is generated by {@link GenerateNewCompilerTests.kt}. DO NOT MODIFY MANUALLY */ @SuppressWarnings("all") @TestMetadata("compiler/testData/codegen/boxInline") @TestDataPath("$PROJECT_ROOT") -@RunWith(JUnit3RunnerWithInners.class) public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); - } - + @Test public void testAllFilesPresentInBoxInline() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/anonymousObject") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class AnonymousObject extends AbstractBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); - } - + public class AnonymousObject { + @Test public void testAllFilesPresentInAnonymousObject() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/anonymousObject"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("anonymousObjectInDefault.kt") public void testAnonymousObjectInDefault() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectInDefault.kt"); } + @Test @TestMetadata("anonymousObjectOnCallSite.kt") public void testAnonymousObjectOnCallSite() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnCallSite.kt"); } + @Test @TestMetadata("anonymousObjectOnCallSiteSuperParams.kt") public void testAnonymousObjectOnCallSiteSuperParams() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnCallSiteSuperParams.kt"); } + @Test @TestMetadata("anonymousObjectOnDeclarationSite.kt") public void testAnonymousObjectOnDeclarationSite() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnDeclarationSite.kt"); } + @Test @TestMetadata("anonymousObjectOnDeclarationSiteSuperParams.kt") public void testAnonymousObjectOnDeclarationSiteSuperParams() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnDeclarationSiteSuperParams.kt"); } + @Test @TestMetadata("capturedLambdaInInline.kt") public void testCapturedLambdaInInline() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInline.kt"); } + @Test @TestMetadata("capturedLambdaInInline2.kt") public void testCapturedLambdaInInline2() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInline2.kt"); } + @Test @TestMetadata("capturedLambdaInInline3.kt") public void testCapturedLambdaInInline3() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInline3.kt"); } + @Test @TestMetadata("capturedLambdaInInlineObject.kt") public void testCapturedLambdaInInlineObject() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInlineObject.kt"); } + @Test @TestMetadata("capturedLocalFun.kt") public void testCapturedLocalFun() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/capturedLocalFun.kt"); } + @Test @TestMetadata("capturedLocalFunRef.kt") public void testCapturedLocalFunRef() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/capturedLocalFunRef.kt"); } + @Test @TestMetadata("changingReturnType.kt") public void testChangingReturnType() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/changingReturnType.kt"); } + @Test @TestMetadata("constructOriginalInRegenerated.kt") public void testConstructOriginalInRegenerated() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/constructOriginalInRegenerated.kt"); } + @Test @TestMetadata("constructorVisibility.kt") public void testConstructorVisibility() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/constructorVisibility.kt"); } + @Test @TestMetadata("constructorVisibilityInConstLambda.kt") public void testConstructorVisibilityInConstLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/constructorVisibilityInConstLambda.kt"); } + @Test @TestMetadata("constructorVisibilityInLambda.kt") public void testConstructorVisibilityInLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/constructorVisibilityInLambda.kt"); } + @Test @TestMetadata("defineClass.kt") public void testDefineClass() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/defineClass.kt"); } + @Test @TestMetadata("functionExpression.kt") public void testFunctionExpression() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/functionExpression.kt"); } + @Test @TestMetadata("inlineCallInsideInlineLambda.kt") public void testInlineCallInsideInlineLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/inlineCallInsideInlineLambda.kt"); } + @Test @TestMetadata("kt13133.kt") public void testKt13133() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt13133.kt"); } + @Test @TestMetadata("kt13182.kt") public void testKt13182() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt13182.kt"); } + @Test @TestMetadata("kt13374.kt") public void testKt13374() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt13374.kt"); } + @Test @TestMetadata("kt14011.kt") public void testKt14011() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt14011.kt"); } + @Test @TestMetadata("kt14011_2.kt") public void testKt14011_2() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt14011_2.kt"); } + @Test @TestMetadata("kt14011_3.kt") public void testKt14011_3() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt14011_3.kt"); } + @Test @TestMetadata("kt15751.kt") public void testKt15751() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt15751.kt"); } + @Test @TestMetadata("kt16193.kt") public void testKt16193() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt16193.kt"); } + @Test @TestMetadata("kt17972.kt") public void testKt17972() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt17972.kt"); } + @Test @TestMetadata("kt17972_2.kt") public void testKt17972_2() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt17972_2.kt"); } + @Test @TestMetadata("kt17972_3.kt") public void testKt17972_3() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt17972_3.kt"); } + @Test @TestMetadata("kt17972_4.kt") public void testKt17972_4() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt17972_4.kt"); } + @Test @TestMetadata("kt17972_5.kt") public void testKt17972_5() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt17972_5.kt"); } + @Test @TestMetadata("kt17972_super.kt") public void testKt17972_super() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt17972_super.kt"); } + @Test @TestMetadata("kt17972_super2.kt") public void testKt17972_super2() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt17972_super2.kt"); } + @Test @TestMetadata("kt17972_super3.kt") public void testKt17972_super3() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt17972_super3.kt"); } + @Test @TestMetadata("kt19389.kt") public void testKt19389() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt19389.kt"); } + @Test @TestMetadata("kt19399.kt") public void testKt19399() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt19399.kt"); } + @Test @TestMetadata("kt19434.kt") public void testKt19434() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt19434.kt"); } + @Test @TestMetadata("kt19434_2.kt") public void testKt19434_2() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt19434_2.kt"); } + @Test @TestMetadata("kt19723.kt") public void testKt19723() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt19723.kt"); } + @Test + @TestMetadata("kt29595.kt") + public void testKt29595() throws Exception { + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt29595.kt"); + } + + @Test @TestMetadata("kt34656.kt") public void testKt34656() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt34656.kt"); } + @Test @TestMetadata("kt38197.kt") public void testKt38197() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt38197.kt"); } + @Test @TestMetadata("kt42815.kt") public void testKt42815() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt42815.kt"); } + @Test @TestMetadata("kt42815_delegated.kt") public void testKt42815_delegated() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt42815_delegated.kt"); } + @Test + @TestMetadata("kt6007.kt") + public void testKt6007() throws Exception { + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt6007.kt"); + } + + @Test @TestMetadata("kt6552.kt") public void testKt6552() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt6552.kt"); } + @Test @TestMetadata("kt8133.kt") public void testKt8133() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt8133.kt"); } + @Test @TestMetadata("kt9064.kt") public void testKt9064() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt9064.kt"); } + @Test @TestMetadata("kt9064v2.kt") public void testKt9064v2() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt9064v2.kt"); } + @Test @TestMetadata("kt9591.kt") public void testKt9591() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt9591.kt"); } + @Test @TestMetadata("kt9877.kt") public void testKt9877() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt9877.kt"); } + @Test @TestMetadata("kt9877_2.kt") public void testKt9877_2() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt9877_2.kt"); } + @Test @TestMetadata("objectInLambdaCapturesAnotherObject.kt") public void testObjectInLambdaCapturesAnotherObject() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/objectInLambdaCapturesAnotherObject.kt"); } + @Test @TestMetadata("safeCall.kt") public void testSafeCall() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/safeCall.kt"); } + @Test @TestMetadata("safeCall_2.kt") public void testSafeCall_2() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/safeCall_2.kt"); } + @Test @TestMetadata("sam.kt") public void testSam() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/sam.kt"); } + @Test @TestMetadata("sharedFromCrossinline.kt") public void testSharedFromCrossinline() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/sharedFromCrossinline.kt"); } + @Test @TestMetadata("superConstructorWithObjectParameter.kt") public void testSuperConstructorWithObjectParameter() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/superConstructorWithObjectParameter.kt"); } + @Test @TestMetadata("typeInfo.kt") public void testTypeInfo() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/typeInfo.kt"); } + @Test @TestMetadata("withInlineMethod.kt") public void testWithInlineMethod() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/withInlineMethod.kt"); } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/anonymousObject/enumWhen") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class EnumWhen extends AbstractBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); - } - + public class EnumWhen { + @Test public void testAllFilesPresentInEnumWhen() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/anonymousObject/enumWhen"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("callSite.kt") public void testCallSite() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/enumWhen/callSite.kt"); } + @Test @TestMetadata("declSite.kt") public void testDeclSite() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/enumWhen/declSite.kt"); } + @Test @TestMetadata("declSiteSeveralMappings.kt") public void testDeclSiteSeveralMappings() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/enumWhen/declSiteSeveralMappings.kt"); } + @Test @TestMetadata("declSiteSeveralMappingsDifOrder.kt") public void testDeclSiteSeveralMappingsDifOrder() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/enumWhen/declSiteSeveralMappingsDifOrder.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class ProperRecapturing extends AbstractBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); - } - + public class ProperRecapturing { + @Test public void testAllFilesPresentInProperRecapturing() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("inlineChain.kt") public void testInlineChain() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/inlineChain.kt"); } + @Test @TestMetadata("lambdaChain.kt") public void testLambdaChain() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChain.kt"); } + @Test @TestMetadata("lambdaChainSimple.kt") public void testLambdaChainSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChainSimple.kt"); } + @Test @TestMetadata("lambdaChain_2.kt") public void testLambdaChain_2() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChain_2.kt"); } + @Test @TestMetadata("lambdaChain_3.kt") public void testLambdaChain_3() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChain_3.kt"); } + @Test @TestMetadata("noInlineLambda.kt") public void testNoInlineLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/noInlineLambda.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class ProperRecapturingInClass extends AbstractBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); - } - + public class ProperRecapturingInClass { + @Test public void testAllFilesPresentInProperRecapturingInClass() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("inlineChain.kt") public void testInlineChain() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/inlineChain.kt"); } + @Test @TestMetadata("inlinelambdaChain.kt") public void testInlinelambdaChain() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/inlinelambdaChain.kt"); } + @Test @TestMetadata("lambdaChain.kt") public void testLambdaChain() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChain.kt"); } + @Test @TestMetadata("lambdaChainSimple.kt") public void testLambdaChainSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChainSimple.kt"); } + @Test @TestMetadata("lambdaChainSimple_2.kt") public void testLambdaChainSimple_2() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChainSimple_2.kt"); } + @Test @TestMetadata("lambdaChain_2.kt") public void testLambdaChain_2() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChain_2.kt"); } + @Test @TestMetadata("lambdaChain_3.kt") public void testLambdaChain_3() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChain_3.kt"); } + @Test @TestMetadata("noCapturedThisOnCallSite.kt") public void testNoCapturedThisOnCallSite() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/noCapturedThisOnCallSite.kt"); } + @Test @TestMetadata("noInlineLambda.kt") public void testNoInlineLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/noInlineLambda.kt"); } + @Test @TestMetadata("twoInlineLambda.kt") public void testTwoInlineLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/twoInlineLambda.kt"); } + @Test @TestMetadata("twoInlineLambdaComplex.kt") public void testTwoInlineLambdaComplex() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/twoInlineLambdaComplex.kt"); } + @Test @TestMetadata("twoInlineLambdaComplex_2.kt") public void testTwoInlineLambdaComplex_2() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/twoInlineLambdaComplex_2.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/anonymousObject/sam") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Sam extends AbstractBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); - } - + public class Sam { + @Test public void testAllFilesPresentInSam() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/anonymousObject/sam"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("anonymousObjectToSam.kt") public void testAnonymousObjectToSam() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/sam/anonymousObjectToSam.kt"); } + @Test @TestMetadata("kt17091.kt") public void testKt17091() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/sam/kt17091.kt"); } + @Test @TestMetadata("kt21671.kt") public void testKt21671() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/sam/kt21671.kt"); } + @Test @TestMetadata("kt21671_2.kt") public void testKt21671_2() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/sam/kt21671_2.kt"); } + @Test @TestMetadata("kt21671_3.kt") public void testKt21671_3() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/sam/kt21671_3.kt"); } + @Test @TestMetadata("kt22304.kt") public void testKt22304() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/sam/kt22304.kt"); } + @Test @TestMetadata("samOnCallSite.kt") public void testSamOnCallSite() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/sam/samOnCallSite.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class TwoCapturedReceivers extends AbstractBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); - } - + public class TwoCapturedReceivers { + @Test public void testAllFilesPresentInTwoCapturedReceivers() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("kt8668.kt") public void testKt8668() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668.kt"); } + @Test @TestMetadata("kt8668_2.kt") public void testKt8668_2() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668_2.kt"); } + @Test @TestMetadata("kt8668_3.kt") public void testKt8668_3() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668_3.kt"); } + @Test @TestMetadata("twoDifferentDispatchReceivers.kt") public void testTwoDifferentDispatchReceivers() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/twoDifferentDispatchReceivers.kt"); } + @Test @TestMetadata("twoExtensionReceivers.kt") public void testTwoExtensionReceivers() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/twoExtensionReceivers.kt"); @@ -573,465 +655,525 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/argumentOrder") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class ArgumentOrder extends AbstractBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); - } - + public class ArgumentOrder { + @Test public void testAllFilesPresentInArgumentOrder() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/argumentOrder"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("boundFunctionReference.kt") public void testBoundFunctionReference() throws Exception { runTest("compiler/testData/codegen/boxInline/argumentOrder/boundFunctionReference.kt"); } + @Test @TestMetadata("boundFunctionReference2.kt") public void testBoundFunctionReference2() throws Exception { runTest("compiler/testData/codegen/boxInline/argumentOrder/boundFunctionReference2.kt"); } + @Test @TestMetadata("captured.kt") public void testCaptured() throws Exception { runTest("compiler/testData/codegen/boxInline/argumentOrder/captured.kt"); } + @Test @TestMetadata("capturedInExtension.kt") public void testCapturedInExtension() throws Exception { runTest("compiler/testData/codegen/boxInline/argumentOrder/capturedInExtension.kt"); } + @Test @TestMetadata("defaultParametersAndLastVararg.kt") public void testDefaultParametersAndLastVararg() throws Exception { runTest("compiler/testData/codegen/boxInline/argumentOrder/defaultParametersAndLastVararg.kt"); } + @Test @TestMetadata("defaultParametersAndLastVarargWithCorrectOrder.kt") public void testDefaultParametersAndLastVarargWithCorrectOrder() throws Exception { runTest("compiler/testData/codegen/boxInline/argumentOrder/defaultParametersAndLastVarargWithCorrectOrder.kt"); } + @Test @TestMetadata("extension.kt") public void testExtension() throws Exception { runTest("compiler/testData/codegen/boxInline/argumentOrder/extension.kt"); } + @Test @TestMetadata("extensionInClass.kt") public void testExtensionInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/argumentOrder/extensionInClass.kt"); } + @Test @TestMetadata("lambdaMigration.kt") public void testLambdaMigration() throws Exception { runTest("compiler/testData/codegen/boxInline/argumentOrder/lambdaMigration.kt"); } + @Test @TestMetadata("lambdaMigrationInClass.kt") public void testLambdaMigrationInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/argumentOrder/lambdaMigrationInClass.kt"); } + @Test @TestMetadata("simple.kt") public void testSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/argumentOrder/simple.kt"); } + @Test @TestMetadata("simpleInClass.kt") public void testSimpleInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/argumentOrder/simpleInClass.kt"); } + @Test @TestMetadata("varargAndDefaultParameters.kt") public void testVarargAndDefaultParameters() throws Exception { runTest("compiler/testData/codegen/boxInline/argumentOrder/varargAndDefaultParameters.kt"); } + @Test @TestMetadata("varargAndDefaultParametersWithCorrectOrder.kt") public void testVarargAndDefaultParametersWithCorrectOrder() throws Exception { runTest("compiler/testData/codegen/boxInline/argumentOrder/varargAndDefaultParametersWithCorrectOrder.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/arrayConvention") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class ArrayConvention extends AbstractBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); - } - + public class ArrayConvention { + @Test public void testAllFilesPresentInArrayConvention() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/arrayConvention"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("simpleAccess.kt") public void testSimpleAccess() throws Exception { runTest("compiler/testData/codegen/boxInline/arrayConvention/simpleAccess.kt"); } + @Test @TestMetadata("simpleAccessInClass.kt") public void testSimpleAccessInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/arrayConvention/simpleAccessInClass.kt"); } + @Test @TestMetadata("simpleAccessWithDefault.kt") public void testSimpleAccessWithDefault() throws Exception { runTest("compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithDefault.kt"); } + @Test @TestMetadata("simpleAccessWithDefaultInClass.kt") public void testSimpleAccessWithDefaultInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithDefaultInClass.kt"); } + @Test @TestMetadata("simpleAccessWithLambda.kt") public void testSimpleAccessWithLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithLambda.kt"); } + @Test @TestMetadata("simpleAccessWithLambdaInClass.kt") public void testSimpleAccessWithLambdaInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithLambdaInClass.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/assert") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Assert extends AbstractBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); - } - + public class Assert { + @Test public void testAllFilesPresentInAssert() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/assert"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("jvmAssertInlineFunctionAssertionsDisabled.kt") public void testJvmAssertInlineFunctionAssertionsDisabled() throws Exception { runTest("compiler/testData/codegen/boxInline/assert/jvmAssertInlineFunctionAssertionsDisabled.kt"); } + @Test @TestMetadata("jvmAssertInlineFunctionAssertionsEnabled.kt") public void testJvmAssertInlineFunctionAssertionsEnabled() throws Exception { runTest("compiler/testData/codegen/boxInline/assert/jvmAssertInlineFunctionAssertionsEnabled.kt"); } + @Test @TestMetadata("jvmAssertInlineLambda.kt") public void testJvmAssertInlineLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/assert/jvmAssertInlineLambda.kt"); } + @Test @TestMetadata("jvmClassInitializer.kt") public void testJvmClassInitializer() throws Exception { runTest("compiler/testData/codegen/boxInline/assert/jvmClassInitializer.kt"); } + @Test @TestMetadata("jvmCompanion.kt") public void testJvmCompanion() throws Exception { runTest("compiler/testData/codegen/boxInline/assert/jvmCompanion.kt"); } + @Test @TestMetadata("jvmCrossinlineLambda.kt") public void testJvmCrossinlineLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/assert/jvmCrossinlineLambda.kt"); } + @Test @TestMetadata("jvmCrossinlineLambda2.kt") public void testJvmCrossinlineLambda2() throws Exception { runTest("compiler/testData/codegen/boxInline/assert/jvmCrossinlineLambda2.kt"); } + @Test @TestMetadata("jvmCrossinlineLambdaDeclarationSite.kt") public void testJvmCrossinlineLambdaDeclarationSite() throws Exception { runTest("compiler/testData/codegen/boxInline/assert/jvmCrossinlineLambdaDeclarationSite.kt"); } + @Test @TestMetadata("jvmCrossinlineLambdaDeclarationSiteOnly.kt") public void testJvmCrossinlineLambdaDeclarationSiteOnly() throws Exception { runTest("compiler/testData/codegen/boxInline/assert/jvmCrossinlineLambdaDeclarationSiteOnly.kt"); } + @Test @TestMetadata("jvmCrossinlineSAMDeclarationSite.kt") public void testJvmCrossinlineSAMDeclarationSite() throws Exception { runTest("compiler/testData/codegen/boxInline/assert/jvmCrossinlineSAMDeclarationSite.kt"); } + @Test @TestMetadata("jvmDoubleInline.kt") public void testJvmDoubleInline() throws Exception { runTest("compiler/testData/codegen/boxInline/assert/jvmDoubleInline.kt"); } + @Test @TestMetadata("jvmInlineUsedAsNoinline.kt") public void testJvmInlineUsedAsNoinline() throws Exception { runTest("compiler/testData/codegen/boxInline/assert/jvmInlineUsedAsNoinline.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/builders") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Builders extends AbstractBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); - } - + public class Builders { + @Test public void testAllFilesPresentInBuilders() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/builders"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("builders.kt") public void testBuilders() throws Exception { runTest("compiler/testData/codegen/boxInline/builders/builders.kt"); } + @Test @TestMetadata("buildersAndLambdaCapturing.kt") public void testBuildersAndLambdaCapturing() throws Exception { runTest("compiler/testData/codegen/boxInline/builders/buildersAndLambdaCapturing.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/bytecodePreprocessing") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class BytecodePreprocessing extends AbstractBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); - } - + public class BytecodePreprocessing { + @Test public void testAllFilesPresentInBytecodePreprocessing() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/bytecodePreprocessing"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("apiVersionAtLeast1.kt") public void testApiVersionAtLeast1() throws Exception { runTest("compiler/testData/codegen/boxInline/bytecodePreprocessing/apiVersionAtLeast1.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/callableReference") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class CallableReference extends AbstractBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); - } - + public class CallableReference { + @Test @TestMetadata("adapted.kt") public void testAdapted() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/adapted.kt"); } + @Test public void testAllFilesPresentInCallableReference() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/callableReference"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("classLevel.kt") public void testClassLevel() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/classLevel.kt"); } + @Test @TestMetadata("classLevel2.kt") public void testClassLevel2() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/classLevel2.kt"); } + @Test @TestMetadata("constructor.kt") public void testConstructor() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/constructor.kt"); } + @Test @TestMetadata("innerGenericConstuctor.kt") public void testInnerGenericConstuctor() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/innerGenericConstuctor.kt"); } + @Test @TestMetadata("intrinsic.kt") public void testIntrinsic() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/intrinsic.kt"); } + @Test @TestMetadata("jvmFieldProperty.kt") public void testJvmFieldProperty() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/jvmFieldProperty.kt"); } + @Test @TestMetadata("kt15449.kt") public void testKt15449() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/kt15449.kt"); } + @Test @TestMetadata("kt15751_2.kt") public void testKt15751_2() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/kt15751_2.kt"); } + @Test @TestMetadata("kt16411.kt") public void testKt16411() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/kt16411.kt"); } + @Test @TestMetadata("kt35101.kt") public void testKt35101() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/kt35101.kt"); } + @Test @TestMetadata("propertyIntrinsic.kt") public void testPropertyIntrinsic() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/propertyIntrinsic.kt"); } + @Test @TestMetadata("propertyReference.kt") public void testPropertyReference() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/propertyReference.kt"); } + @Test @TestMetadata("topLevel.kt") public void testTopLevel() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/topLevel.kt"); } + @Test @TestMetadata("topLevelExtension.kt") public void testTopLevelExtension() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/topLevelExtension.kt"); } + @Test @TestMetadata("topLevelProperty.kt") public void testTopLevelProperty() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/topLevelProperty.kt"); } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/callableReference/bound") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Bound extends AbstractBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); - } - + public class Bound { + @Test public void testAllFilesPresentInBound() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/callableReference/bound"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("classProperty.kt") public void testClassProperty() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/classProperty.kt"); } + @Test @TestMetadata("emptyLhsFunction.kt") public void testEmptyLhsFunction() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/emptyLhsFunction.kt"); } + @Test @TestMetadata("emptyLhsOnInlineProperty.kt") public void testEmptyLhsOnInlineProperty() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/emptyLhsOnInlineProperty.kt"); } + @Test @TestMetadata("emptyLhsProperty.kt") public void testEmptyLhsProperty() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/emptyLhsProperty.kt"); } + @Test @TestMetadata("expression.kt") public void testExpression() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/expression.kt"); } + @Test @TestMetadata("extensionReceiver.kt") public void testExtensionReceiver() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/extensionReceiver.kt"); } + @Test @TestMetadata("filter.kt") public void testFilter() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/filter.kt"); } + @Test @TestMetadata("inlineValueParameterInsteadOfReceiver.kt") public void testInlineValueParameterInsteadOfReceiver() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/inlineValueParameterInsteadOfReceiver.kt"); } + @Test @TestMetadata("innerGenericConstuctor.kt") public void testInnerGenericConstuctor() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/innerGenericConstuctor.kt"); } + @Test @TestMetadata("intrinsic.kt") public void testIntrinsic() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/intrinsic.kt"); } + @Test @TestMetadata("jvmFieldProperty.kt") public void testJvmFieldProperty() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/jvmFieldProperty.kt"); } + @Test @TestMetadata("kt18728.kt") public void testKt18728() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/kt18728.kt"); } + @Test @TestMetadata("kt18728_2.kt") public void testKt18728_2() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/kt18728_2.kt"); } + @Test @TestMetadata("kt18728_3.kt") public void testKt18728_3() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/kt18728_3.kt"); } + @Test @TestMetadata("kt18728_4.kt") public void testKt18728_4() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/kt18728_4.kt"); } + @Test + @TestMetadata("lambdaOnLhs.kt") + public void testLambdaOnLhs() throws Exception { + runTest("compiler/testData/codegen/boxInline/callableReference/bound/lambdaOnLhs.kt"); + } + + @Test @TestMetadata("map.kt") public void testMap() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/map.kt"); } + @Test @TestMetadata("mixed.kt") public void testMixed() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/mixed.kt"); } + @Test @TestMetadata("objectProperty.kt") public void testObjectProperty() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/objectProperty.kt"); } + @Test @TestMetadata("propertyImportedFromObject.kt") public void testPropertyImportedFromObject() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/propertyImportedFromObject.kt"); } + @Test @TestMetadata("sideEffect.kt") public void testSideEffect() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/sideEffect.kt"); } + @Test @TestMetadata("simple.kt") public void testSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/simple.kt"); } + @Test @TestMetadata("simpleVal.kt") public void testSimpleVal() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/simpleVal.kt"); } + @Test @TestMetadata("simpleVal2.kt") public void testSimpleVal2() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/simpleVal2.kt"); } + @Test @TestMetadata("topLevelExtensionProperty.kt") public void testTopLevelExtensionProperty() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/topLevelExtensionProperty.kt"); @@ -1039,649 +1181,740 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/capture") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Capture extends AbstractBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); - } - + public class Capture { + @Test public void testAllFilesPresentInCapture() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/capture"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("captureInlinable.kt") public void testCaptureInlinable() throws Exception { runTest("compiler/testData/codegen/boxInline/capture/captureInlinable.kt"); } + @Test @TestMetadata("captureInlinableAndOther.kt") public void testCaptureInlinableAndOther() throws Exception { runTest("compiler/testData/codegen/boxInline/capture/captureInlinableAndOther.kt"); } + @Test @TestMetadata("captureThisAndReceiver.kt") public void testCaptureThisAndReceiver() throws Exception { runTest("compiler/testData/codegen/boxInline/capture/captureThisAndReceiver.kt"); } + @Test @TestMetadata("generics.kt") public void testGenerics() throws Exception { runTest("compiler/testData/codegen/boxInline/capture/generics.kt"); } + @Test @TestMetadata("simpleCapturingInClass.kt") public void testSimpleCapturingInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/capture/simpleCapturingInClass.kt"); } + @Test @TestMetadata("simpleCapturingInPackage.kt") public void testSimpleCapturingInPackage() throws Exception { runTest("compiler/testData/codegen/boxInline/capture/simpleCapturingInPackage.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/complex") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Complex extends AbstractBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); - } - + public class Complex { + @Test public void testAllFilesPresentInComplex() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/complex"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("closureChain.kt") public void testClosureChain() throws Exception { runTest("compiler/testData/codegen/boxInline/complex/closureChain.kt"); } + @Test @TestMetadata("forEachLine.kt") public void testForEachLine() throws Exception { runTest("compiler/testData/codegen/boxInline/complex/forEachLine.kt"); } + @Test @TestMetadata("kt44429.kt") public void testKt44429() throws Exception { runTest("compiler/testData/codegen/boxInline/complex/kt44429.kt"); } + @Test @TestMetadata("lambdaInLambda.kt") public void testLambdaInLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/complex/lambdaInLambda.kt"); } + @Test @TestMetadata("swapAndWith.kt") public void testSwapAndWith() throws Exception { runTest("compiler/testData/codegen/boxInline/complex/swapAndWith.kt"); } + @Test @TestMetadata("swapAndWith2.kt") public void testSwapAndWith2() throws Exception { runTest("compiler/testData/codegen/boxInline/complex/swapAndWith2.kt"); } + @Test @TestMetadata("use.kt") public void testUse() throws Exception { runTest("compiler/testData/codegen/boxInline/complex/use.kt"); } + @Test @TestMetadata("with.kt") public void testWith() throws Exception { runTest("compiler/testData/codegen/boxInline/complex/with.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/complexStack") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class ComplexStack extends AbstractBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); - } - + public class ComplexStack { + @Test public void testAllFilesPresentInComplexStack() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/complexStack"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("asCheck.kt") public void testAsCheck() throws Exception { runTest("compiler/testData/codegen/boxInline/complexStack/asCheck.kt"); } + @Test @TestMetadata("asCheck2.kt") public void testAsCheck2() throws Exception { runTest("compiler/testData/codegen/boxInline/complexStack/asCheck2.kt"); } + @Test @TestMetadata("breakContinueInInlineLambdaArgument.kt") public void testBreakContinueInInlineLambdaArgument() throws Exception { runTest("compiler/testData/codegen/boxInline/complexStack/breakContinueInInlineLambdaArgument.kt"); } + @Test @TestMetadata("simple.kt") public void testSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/complexStack/simple.kt"); } + @Test @TestMetadata("simple2.kt") public void testSimple2() throws Exception { runTest("compiler/testData/codegen/boxInline/complexStack/simple2.kt"); } + @Test @TestMetadata("simple3.kt") public void testSimple3() throws Exception { runTest("compiler/testData/codegen/boxInline/complexStack/simple3.kt"); } + @Test @TestMetadata("simple4.kt") public void testSimple4() throws Exception { runTest("compiler/testData/codegen/boxInline/complexStack/simple4.kt"); } + @Test @TestMetadata("simpleExtension.kt") public void testSimpleExtension() throws Exception { runTest("compiler/testData/codegen/boxInline/complexStack/simpleExtension.kt"); } + @Test @TestMetadata("spillConstructorArgumentsAndInlineLambdaParameter.kt") public void testSpillConstructorArgumentsAndInlineLambdaParameter() throws Exception { runTest("compiler/testData/codegen/boxInline/complexStack/spillConstructorArgumentsAndInlineLambdaParameter.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/contracts") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Contracts extends AbstractBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); - } - + public class Contracts { + @Test public void testAllFilesPresentInContracts() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/contracts"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("cfgDependendValInitialization.kt") public void testCfgDependendValInitialization() throws Exception { runTest("compiler/testData/codegen/boxInline/contracts/cfgDependendValInitialization.kt"); } + @Test @TestMetadata("complexInitializer.kt") public void testComplexInitializer() throws Exception { runTest("compiler/testData/codegen/boxInline/contracts/complexInitializer.kt"); } + @Test @TestMetadata("complexInitializerWithStackTransformation.kt") public void testComplexInitializerWithStackTransformation() throws Exception { runTest("compiler/testData/codegen/boxInline/contracts/complexInitializerWithStackTransformation.kt"); } + @Test @TestMetadata("crossinlineCallableReference.kt") public void testCrossinlineCallableReference() throws Exception { runTest("compiler/testData/codegen/boxInline/contracts/crossinlineCallableReference.kt"); } + @Test @TestMetadata("definiteLongValInitialization.kt") public void testDefiniteLongValInitialization() throws Exception { runTest("compiler/testData/codegen/boxInline/contracts/definiteLongValInitialization.kt"); } + @Test @TestMetadata("definiteNestedValInitialization.kt") public void testDefiniteNestedValInitialization() throws Exception { runTest("compiler/testData/codegen/boxInline/contracts/definiteNestedValInitialization.kt"); } + @Test @TestMetadata("definiteValInitInInitializer.kt") public void testDefiniteValInitInInitializer() throws Exception { runTest("compiler/testData/codegen/boxInline/contracts/definiteValInitInInitializer.kt"); } + @Test @TestMetadata("definiteValInitialization.kt") public void testDefiniteValInitialization() throws Exception { runTest("compiler/testData/codegen/boxInline/contracts/definiteValInitialization.kt"); } + @Test @TestMetadata("exactlyOnceCrossinline.kt") public void testExactlyOnceCrossinline() throws Exception { runTest("compiler/testData/codegen/boxInline/contracts/exactlyOnceCrossinline.kt"); } + @Test @TestMetadata("exactlyOnceCrossinline2.kt") public void testExactlyOnceCrossinline2() throws Exception { runTest("compiler/testData/codegen/boxInline/contracts/exactlyOnceCrossinline2.kt"); } + @Test @TestMetadata("exactlyOnceNoinline.kt") public void testExactlyOnceNoinline() throws Exception { runTest("compiler/testData/codegen/boxInline/contracts/exactlyOnceNoinline.kt"); } + @Test @TestMetadata("nonLocalReturn.kt") public void testNonLocalReturn() throws Exception { runTest("compiler/testData/codegen/boxInline/contracts/nonLocalReturn.kt"); } + @Test @TestMetadata("nonLocalReturnWithCycle.kt") public void testNonLocalReturnWithCycle() throws Exception { runTest("compiler/testData/codegen/boxInline/contracts/nonLocalReturnWithCycle.kt"); } + @Test @TestMetadata("propertyInitialization.kt") public void testPropertyInitialization() throws Exception { runTest("compiler/testData/codegen/boxInline/contracts/propertyInitialization.kt"); } + @Test @TestMetadata("valInitializationAndUsageInNestedLambda.kt") public void testValInitializationAndUsageInNestedLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/contracts/valInitializationAndUsageInNestedLambda.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/defaultValues") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class DefaultValues extends AbstractBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); - } - + public class DefaultValues { + @Test @TestMetadata("33Parameters.kt") public void test33Parameters() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/33Parameters.kt"); } + @Test @TestMetadata("33ParametersInConstructor.kt") public void test33ParametersInConstructor() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/33ParametersInConstructor.kt"); } + @Test public void testAllFilesPresentInDefaultValues() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/defaultValues"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("defaultInExtension.kt") public void testDefaultInExtension() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/defaultInExtension.kt"); } + @Test @TestMetadata("defaultMethod.kt") public void testDefaultMethod() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/defaultMethod.kt"); } + @Test @TestMetadata("defaultMethodInClass.kt") public void testDefaultMethodInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/defaultMethodInClass.kt"); } + @Test @TestMetadata("defaultParamRemapping.kt") public void testDefaultParamRemapping() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/defaultParamRemapping.kt"); } + @Test @TestMetadata("inlineInDefaultParameter.kt") public void testInlineInDefaultParameter() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/inlineInDefaultParameter.kt"); } + @Test @TestMetadata("inlineLambdaInNoInlineDefault.kt") public void testInlineLambdaInNoInlineDefault() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/inlineLambdaInNoInlineDefault.kt"); } + @Test @TestMetadata("kt11479.kt") public void testKt11479() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/kt11479.kt"); } + @Test @TestMetadata("kt11479InlinedDefaultParameter.kt") public void testKt11479InlinedDefaultParameter() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/kt11479InlinedDefaultParameter.kt"); } + @Test @TestMetadata("kt14564.kt") public void testKt14564() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/kt14564.kt"); } + @Test @TestMetadata("kt14564_2.kt") public void testKt14564_2() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/kt14564_2.kt"); } + @Test @TestMetadata("kt16496.kt") public void testKt16496() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/kt16496.kt"); } + @Test @TestMetadata("kt18689.kt") public void testKt18689() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/kt18689.kt"); } + @Test @TestMetadata("kt18689_2.kt") public void testKt18689_2() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/kt18689_2.kt"); } + @Test @TestMetadata("kt18689_3.kt") public void testKt18689_3() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/kt18689_3.kt"); } + @Test @TestMetadata("kt18689_4.kt") public void testKt18689_4() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/kt18689_4.kt"); } + @Test @TestMetadata("kt5685.kt") public void testKt5685() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/kt5685.kt"); } + @Test @TestMetadata("simpleDefaultMethod.kt") public void testSimpleDefaultMethod() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/simpleDefaultMethod.kt"); } + @Test @TestMetadata("varArgNoInline.kt") public void testVarArgNoInline() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/varArgNoInline.kt"); } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class LambdaInlining extends AbstractBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); - } - + public class LambdaInlining { + @Test public void testAllFilesPresentInLambdaInlining() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("checkLambdaClassIsPresent.kt") public void testCheckLambdaClassIsPresent() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/checkLambdaClassIsPresent.kt"); } + @Test @TestMetadata("checkLambdaClassesArePresent.kt") public void testCheckLambdaClassesArePresent() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/checkLambdaClassesArePresent.kt"); } + @Test @TestMetadata("checkObjectClassIsPresent.kt") public void testCheckObjectClassIsPresent() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/checkObjectClassIsPresent.kt"); } + @Test @TestMetadata("checkStaticLambdaClassIsPresent.kt") public void testCheckStaticLambdaClassIsPresent() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/checkStaticLambdaClassIsPresent.kt"); } + @Test @TestMetadata("checkStaticLambdaClassesArePresent.kt") public void testCheckStaticLambdaClassesArePresent() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/checkStaticLambdaClassesArePresent.kt"); } + @Test @TestMetadata("checkStaticObjectClassIsPresent.kt") public void testCheckStaticObjectClassIsPresent() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/checkStaticObjectClassIsPresent.kt"); } + @Test @TestMetadata("defaultCallInDefaultLambda.kt") public void testDefaultCallInDefaultLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/defaultCallInDefaultLambda.kt"); } + @Test @TestMetadata("defaultLambdaInNoInline.kt") public void testDefaultLambdaInNoInline() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/defaultLambdaInNoInline.kt"); } + @Test @TestMetadata("differentInvokeSignature.kt") public void testDifferentInvokeSignature() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/differentInvokeSignature.kt"); } + @Test @TestMetadata("genericLambda.kt") public void testGenericLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/genericLambda.kt"); } + @Test @TestMetadata("instanceCapturedInClass.kt") public void testInstanceCapturedInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/instanceCapturedInClass.kt"); } + @Test @TestMetadata("instanceCapturedInInterface.kt") public void testInstanceCapturedInInterface() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/instanceCapturedInInterface.kt"); } + @Test @TestMetadata("jvmStaticDefault.kt") public void testJvmStaticDefault() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/jvmStaticDefault.kt"); } + @Test @TestMetadata("kt21827.kt") public void testKt21827() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/kt21827.kt"); } + @Test @TestMetadata("kt21946.kt") public void testKt21946() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/kt21946.kt"); } + @Test @TestMetadata("kt24477.kt") public void testKt24477() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/kt24477.kt"); } + @Test @TestMetadata("kt25106.kt") public void testKt25106() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/kt25106.kt"); } + @Test @TestMetadata("kt26636.kt") public void testKt26636() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/kt26636.kt"); } + @Test @TestMetadata("noInline.kt") public void testNoInline() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/noInline.kt"); } + @Test @TestMetadata("nonDefaultInlineInNoInline.kt") public void testNonDefaultInlineInNoInline() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/nonDefaultInlineInNoInline.kt"); } + @Test @TestMetadata("receiverClash.kt") public void testReceiverClash() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/receiverClash.kt"); } + @Test @TestMetadata("receiverClash2.kt") public void testReceiverClash2() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/receiverClash2.kt"); } + @Test @TestMetadata("receiverClashInClass.kt") public void testReceiverClashInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/receiverClashInClass.kt"); } + @Test @TestMetadata("receiverClashInClass2.kt") public void testReceiverClashInClass2() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/receiverClashInClass2.kt"); } + @Test @TestMetadata("simple.kt") public void testSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simple.kt"); } + @Test @TestMetadata("simpleErased.kt") public void testSimpleErased() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simpleErased.kt"); } + @Test @TestMetadata("simpleErasedStaticInstance.kt") public void testSimpleErasedStaticInstance() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simpleErasedStaticInstance.kt"); } + @Test @TestMetadata("simpleExtension.kt") public void testSimpleExtension() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simpleExtension.kt"); } + @Test @TestMetadata("simpleGeneric.kt") public void testSimpleGeneric() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simpleGeneric.kt"); } + @Test @TestMetadata("simpleStaticInstance.kt") public void testSimpleStaticInstance() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simpleStaticInstance.kt"); } + @Test @TestMetadata("thisClash.kt") public void testThisClash() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/thisClash.kt"); } + @Test @TestMetadata("thisClashInClass.kt") public void testThisClashInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/thisClashInClass.kt"); } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class CallableReferences extends AbstractBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); - } - + public class CallableReferences { + @Test public void testAllFilesPresentInCallableReferences() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("boundFunctionReference.kt") public void testBoundFunctionReference() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundFunctionReference.kt"); } + @Test @TestMetadata("boundFunctionReferenceOnInt.kt") public void testBoundFunctionReferenceOnInt() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundFunctionReferenceOnInt.kt"); } + @Test @TestMetadata("boundFunctionReferenceOnLong.kt") public void testBoundFunctionReferenceOnLong() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundFunctionReferenceOnLong.kt"); } + @Test @TestMetadata("boundPropertyReference.kt") public void testBoundPropertyReference() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundPropertyReference.kt"); } + @Test @TestMetadata("boundPropertyReferenceOnInt.kt") public void testBoundPropertyReferenceOnInt() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundPropertyReferenceOnInt.kt"); } + @Test @TestMetadata("boundPropertyReferenceOnLong.kt") public void testBoundPropertyReferenceOnLong() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundPropertyReferenceOnLong.kt"); } + @Test @TestMetadata("constuctorReference.kt") public void testConstuctorReference() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/constuctorReference.kt"); } + @Test @TestMetadata("differentInvokeSignature.kt") public void testDifferentInvokeSignature() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/differentInvokeSignature.kt"); } + @Test @TestMetadata("differentInvokeSignature2.kt") public void testDifferentInvokeSignature2() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/differentInvokeSignature2.kt"); } + @Test @TestMetadata("functionImportedFromObject.kt") public void testFunctionImportedFromObject() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/functionImportedFromObject.kt"); } + @Test @TestMetadata("functionReference.kt") public void testFunctionReference() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/functionReference.kt"); } + @Test @TestMetadata("functionReferenceFromClass.kt") public void testFunctionReferenceFromClass() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/functionReferenceFromClass.kt"); } + @Test @TestMetadata("functionReferenceFromObject.kt") public void testFunctionReferenceFromObject() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/functionReferenceFromObject.kt"); } + @Test @TestMetadata("innerClassConstuctorReference.kt") public void testInnerClassConstuctorReference() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/innerClassConstuctorReference.kt"); } + @Test @TestMetadata("mutableBoundPropertyReferenceFromClass.kt") public void testMutableBoundPropertyReferenceFromClass() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/mutableBoundPropertyReferenceFromClass.kt"); } + @Test @TestMetadata("mutablePropertyReferenceFromClass.kt") public void testMutablePropertyReferenceFromClass() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/mutablePropertyReferenceFromClass.kt"); } + @Test @TestMetadata("privateFunctionReference.kt") public void testPrivateFunctionReference() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/privateFunctionReference.kt"); } + @Test @TestMetadata("privatePropertyReference.kt") public void testPrivatePropertyReference() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/privatePropertyReference.kt"); } + @Test @TestMetadata("propertyImportedFromObject.kt") public void testPropertyImportedFromObject() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/propertyImportedFromObject.kt"); } + @Test @TestMetadata("propertyReference.kt") public void testPropertyReference() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/propertyReference.kt"); } + @Test @TestMetadata("propertyReferenceFromClass.kt") public void testPropertyReferenceFromClass() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/propertyReferenceFromClass.kt"); } + @Test @TestMetadata("propertyReferenceFromObject.kt") public void testPropertyReferenceFromObject() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/propertyReferenceFromObject.kt"); @@ -1689,48 +1922,52 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/defaultValues/maskElimination") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class MaskElimination extends AbstractBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); - } - + public class MaskElimination { + @Test @TestMetadata("32Parameters.kt") public void test32Parameters() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/maskElimination/32Parameters.kt"); } + @Test @TestMetadata("33Parameters.kt") public void test33Parameters() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/maskElimination/33Parameters.kt"); } + @Test public void testAllFilesPresentInMaskElimination() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/defaultValues/maskElimination"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("kt18792.kt") public void testKt18792() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/maskElimination/kt18792.kt"); } + @Test @TestMetadata("kt19679.kt") public void testKt19679() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/maskElimination/kt19679.kt"); } + @Test @TestMetadata("kt19679_2.kt") public void testKt19679_2() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/maskElimination/kt19679_2.kt"); } + @Test @TestMetadata("kt19679_3.kt") public void testKt19679_3() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/maskElimination/kt19679_3.kt"); } + @Test @TestMetadata("simple.kt") public void testSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/maskElimination/simple.kt"); @@ -1738,375 +1975,400 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/delegatedProperty") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class DelegatedProperty extends AbstractBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); - } - + public class DelegatedProperty { + @Test public void testAllFilesPresentInDelegatedProperty() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/delegatedProperty"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("kt16864.kt") public void testKt16864() throws Exception { runTest("compiler/testData/codegen/boxInline/delegatedProperty/kt16864.kt"); } + @Test @TestMetadata("local.kt") public void testLocal() throws Exception { runTest("compiler/testData/codegen/boxInline/delegatedProperty/local.kt"); } + @Test @TestMetadata("localDeclaredInLambda.kt") public void testLocalDeclaredInLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/delegatedProperty/localDeclaredInLambda.kt"); } + @Test @TestMetadata("localInAnonymousObject.kt") public void testLocalInAnonymousObject() throws Exception { runTest("compiler/testData/codegen/boxInline/delegatedProperty/localInAnonymousObject.kt"); } + @Test @TestMetadata("localInLambda.kt") public void testLocalInLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/delegatedProperty/localInLambda.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/enclosingInfo") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class EnclosingInfo extends AbstractBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); - } - + public class EnclosingInfo { + @Test public void testAllFilesPresentInEnclosingInfo() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/enclosingInfo"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("anonymousInLambda.kt") public void testAnonymousInLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/enclosingInfo/anonymousInLambda.kt"); } + @Test @TestMetadata("inlineChain.kt") public void testInlineChain() throws Exception { runTest("compiler/testData/codegen/boxInline/enclosingInfo/inlineChain.kt"); } + @Test @TestMetadata("inlineChain2.kt") public void testInlineChain2() throws Exception { runTest("compiler/testData/codegen/boxInline/enclosingInfo/inlineChain2.kt"); } + @Test @TestMetadata("objectInInlineFun.kt") public void testObjectInInlineFun() throws Exception { runTest("compiler/testData/codegen/boxInline/enclosingInfo/objectInInlineFun.kt"); } + @Test @TestMetadata("transformedConstructor.kt") public void testTransformedConstructor() throws Exception { runTest("compiler/testData/codegen/boxInline/enclosingInfo/transformedConstructor.kt"); } + @Test @TestMetadata("transformedConstructorWithAdditionalObject.kt") public void testTransformedConstructorWithAdditionalObject() throws Exception { runTest("compiler/testData/codegen/boxInline/enclosingInfo/transformedConstructorWithAdditionalObject.kt"); } + @Test @TestMetadata("transformedConstructorWithNestedInline.kt") public void testTransformedConstructorWithNestedInline() throws Exception { runTest("compiler/testData/codegen/boxInline/enclosingInfo/transformedConstructorWithNestedInline.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/enum") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Enum extends AbstractBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); - } - + public class Enum { + @Test public void testAllFilesPresentInEnum() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/enum"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("kt10569.kt") public void testKt10569() throws Exception { runTest("compiler/testData/codegen/boxInline/enum/kt10569.kt"); } + @Test @TestMetadata("kt18254.kt") public void testKt18254() throws Exception { runTest("compiler/testData/codegen/boxInline/enum/kt18254.kt"); } + @Test @TestMetadata("valueOf.kt") public void testValueOf() throws Exception { runTest("compiler/testData/codegen/boxInline/enum/valueOf.kt"); } + @Test @TestMetadata("valueOfCapturedType.kt") public void testValueOfCapturedType() throws Exception { runTest("compiler/testData/codegen/boxInline/enum/valueOfCapturedType.kt"); } + @Test @TestMetadata("valueOfChain.kt") public void testValueOfChain() throws Exception { runTest("compiler/testData/codegen/boxInline/enum/valueOfChain.kt"); } + @Test @TestMetadata("valueOfChainCapturedType.kt") public void testValueOfChainCapturedType() throws Exception { runTest("compiler/testData/codegen/boxInline/enum/valueOfChainCapturedType.kt"); } + @Test @TestMetadata("valueOfNonReified.kt") public void testValueOfNonReified() throws Exception { runTest("compiler/testData/codegen/boxInline/enum/valueOfNonReified.kt"); } + @Test @TestMetadata("values.kt") public void testValues() throws Exception { runTest("compiler/testData/codegen/boxInline/enum/values.kt"); } + @Test @TestMetadata("valuesAsArray.kt") public void testValuesAsArray() throws Exception { runTest("compiler/testData/codegen/boxInline/enum/valuesAsArray.kt"); } + @Test @TestMetadata("valuesCapturedType.kt") public void testValuesCapturedType() throws Exception { runTest("compiler/testData/codegen/boxInline/enum/valuesCapturedType.kt"); } + @Test @TestMetadata("valuesChain.kt") public void testValuesChain() throws Exception { runTest("compiler/testData/codegen/boxInline/enum/valuesChain.kt"); } + @Test @TestMetadata("valuesChainCapturedType.kt") public void testValuesChainCapturedType() throws Exception { runTest("compiler/testData/codegen/boxInline/enum/valuesChainCapturedType.kt"); } + @Test @TestMetadata("valuesNonReified.kt") public void testValuesNonReified() throws Exception { runTest("compiler/testData/codegen/boxInline/enum/valuesNonReified.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/functionExpression") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class FunctionExpression extends AbstractBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); - } - + public class FunctionExpression { + @Test public void testAllFilesPresentInFunctionExpression() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/functionExpression"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("extension.kt") public void testExtension() throws Exception { runTest("compiler/testData/codegen/boxInline/functionExpression/extension.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/inlineClasses") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class InlineClasses extends AbstractBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); - } - + public class InlineClasses { + @Test public void testAllFilesPresentInInlineClasses() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/inlineClasses"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("inlineClassWithInlineValReturningInlineClass.kt") public void testInlineClassWithInlineValReturningInlineClass() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/inlineClassWithInlineValReturningInlineClass.kt"); } + @Test @TestMetadata("inlineFunctionInsideInlineClassesBox.kt") public void testInlineFunctionInsideInlineClassesBox() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/inlineFunctionInsideInlineClassesBox.kt"); } + @Test @TestMetadata("noReturnTypeManglingFun.kt") public void testNoReturnTypeManglingFun() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/noReturnTypeManglingFun.kt"); } + @Test @TestMetadata("noReturnTypeManglingFunJvmName.kt") public void testNoReturnTypeManglingFunJvmName() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/noReturnTypeManglingFunJvmName.kt"); } + @Test @TestMetadata("noReturnTypeManglingVal.kt") public void testNoReturnTypeManglingVal() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/noReturnTypeManglingVal.kt"); } + @Test @TestMetadata("withReturnTypeManglingFun.kt") public void testWithReturnTypeManglingFun() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/withReturnTypeManglingFun.kt"); } + @Test @TestMetadata("withReturnTypeManglingFunJvmName.kt") public void testWithReturnTypeManglingFunJvmName() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/withReturnTypeManglingFunJvmName.kt"); } + @Test @TestMetadata("withReturnTypeManglingVal.kt") public void testWithReturnTypeManglingVal() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/withReturnTypeManglingVal.kt"); } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class UnboxGenericParameter extends AbstractBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); - } - + public class UnboxGenericParameter { + @Test public void testAllFilesPresentInUnboxGenericParameter() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class FunInterface extends AbstractBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); - } - + public class FunInterface { + @Test public void testAllFilesPresentInFunInterface() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("any.kt") public void testAny() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/any.kt"); } + @Test @TestMetadata("anyN.kt") public void testAnyN() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/anyN.kt"); } + @Test @TestMetadata("iface.kt") public void testIface() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/iface.kt"); } + @Test @TestMetadata("ifaceChild.kt") public void testIfaceChild() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/ifaceChild.kt"); } + @Test @TestMetadata("primitive.kt") public void testPrimitive() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/primitive.kt"); } + @Test @TestMetadata("string.kt") public void testString() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/string.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Lambda extends AbstractBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); - } - + public class Lambda { + @Test public void testAllFilesPresentInLambda() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("any.kt") public void testAny() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/any.kt"); } + @Test @TestMetadata("anyN.kt") public void testAnyN() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/anyN.kt"); } + @Test @TestMetadata("iface.kt") public void testIface() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/iface.kt"); } + @Test @TestMetadata("ifaceChild.kt") public void testIfaceChild() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/ifaceChild.kt"); } + @Test @TestMetadata("primitive.kt") public void testPrimitive() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/primitive.kt"); } + @Test @TestMetadata("string.kt") public void testString() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/string.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class ObjectLiteral extends AbstractBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); - } - + public class ObjectLiteral { + @Test public void testAllFilesPresentInObjectLiteral() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("any.kt") public void testAny() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/any.kt"); } + @Test @TestMetadata("anyN.kt") public void testAnyN() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/anyN.kt"); } + @Test @TestMetadata("iface.kt") public void testIface() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/iface.kt"); } + @Test @TestMetadata("ifaceChild.kt") public void testIfaceChild() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/ifaceChild.kt"); } + @Test @TestMetadata("primitive.kt") public void testPrimitive() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/primitive.kt"); } + @Test @TestMetadata("string.kt") public void testString() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/string.kt"); @@ -2115,239 +2377,309 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/innerClasses") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class InnerClasses extends AbstractBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); - } - + public class InnerClasses { + @Test public void testAllFilesPresentInInnerClasses() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/innerClasses"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("captureThisAndOuter.kt") public void testCaptureThisAndOuter() throws Exception { runTest("compiler/testData/codegen/boxInline/innerClasses/captureThisAndOuter.kt"); } + @Test @TestMetadata("innerLambda.kt") public void testInnerLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/innerClasses/innerLambda.kt"); } + @Test @TestMetadata("kt10259.kt") public void testKt10259() throws Exception { runTest("compiler/testData/codegen/boxInline/innerClasses/kt10259.kt"); } } - @TestMetadata("compiler/testData/codegen/boxInline/jvmName") + @Nested + @TestMetadata("compiler/testData/codegen/boxInline/invokedynamic") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class JvmName extends AbstractBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + public class Invokedynamic { + @Test + public void testAllFilesPresentInInvokedynamic() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/invokedynamic"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Nested + @TestMetadata("compiler/testData/codegen/boxInline/invokedynamic/lambdas") + @TestDataPath("$PROJECT_ROOT") + public class Lambdas { + @Test + public void testAllFilesPresentInLambdas() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/invokedynamic/lambdas"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); + } + + @Test + @TestMetadata("crossinlineLambda1.kt") + public void testCrossinlineLambda1() throws Exception { + runTest("compiler/testData/codegen/boxInline/invokedynamic/lambdas/crossinlineLambda1.kt"); + } + + @Test + @TestMetadata("crossinlineLambda2.kt") + public void testCrossinlineLambda2() throws Exception { + runTest("compiler/testData/codegen/boxInline/invokedynamic/lambdas/crossinlineLambda2.kt"); + } + + @Test + @TestMetadata("inlineFunInDifferentPackage.kt") + public void testInlineFunInDifferentPackage() throws Exception { + runTest("compiler/testData/codegen/boxInline/invokedynamic/lambdas/inlineFunInDifferentPackage.kt"); + } + + @Test + @TestMetadata("inlineLambda1.kt") + public void testInlineLambda1() throws Exception { + runTest("compiler/testData/codegen/boxInline/invokedynamic/lambdas/inlineLambda1.kt"); + } + } + + @Nested + @TestMetadata("compiler/testData/codegen/boxInline/invokedynamic/sam") + @TestDataPath("$PROJECT_ROOT") + public class Sam { + @Test + public void testAllFilesPresentInSam() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/invokedynamic/sam"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); + } + + @Test + @TestMetadata("crossinlineLambda1.kt") + public void testCrossinlineLambda1() throws Exception { + runTest("compiler/testData/codegen/boxInline/invokedynamic/sam/crossinlineLambda1.kt"); + } + + @Test + @TestMetadata("crossinlineLambda2.kt") + public void testCrossinlineLambda2() throws Exception { + runTest("compiler/testData/codegen/boxInline/invokedynamic/sam/crossinlineLambda2.kt"); + } + + @Test + @TestMetadata("inlineFunInDifferentPackage.kt") + public void testInlineFunInDifferentPackage() throws Exception { + runTest("compiler/testData/codegen/boxInline/invokedynamic/sam/inlineFunInDifferentPackage.kt"); + } + + @Test + @TestMetadata("inlineLambda1.kt") + public void testInlineLambda1() throws Exception { + runTest("compiler/testData/codegen/boxInline/invokedynamic/sam/inlineLambda1.kt"); + } + } + } + + @Nested + @TestMetadata("compiler/testData/codegen/boxInline/jvmName") + @TestDataPath("$PROJECT_ROOT") + public class JvmName { + @Test public void testAllFilesPresentInJvmName() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/jvmName"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("simple.kt") public void testSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/jvmName/simple.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/jvmPackageName") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class JvmPackageName extends AbstractBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); - } - + public class JvmPackageName { + @Test public void testAllFilesPresentInJvmPackageName() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/jvmPackageName"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("simple.kt") public void testSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/jvmPackageName/simple.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/lambdaClassClash") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class LambdaClassClash extends AbstractBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); - } - + public class LambdaClassClash { + @Test public void testAllFilesPresentInLambdaClassClash() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/lambdaClassClash"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("lambdaClassClash.kt") public void testLambdaClassClash() throws Exception { runTest("compiler/testData/codegen/boxInline/lambdaClassClash/lambdaClassClash.kt"); } + @Test @TestMetadata("noInlineLambdaX2.kt") public void testNoInlineLambdaX2() throws Exception { runTest("compiler/testData/codegen/boxInline/lambdaClassClash/noInlineLambdaX2.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/lambdaTransformation") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class LambdaTransformation extends AbstractBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); - } - + public class LambdaTransformation { + @Test public void testAllFilesPresentInLambdaTransformation() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/lambdaTransformation"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("lambdaCloning.kt") public void testLambdaCloning() throws Exception { runTest("compiler/testData/codegen/boxInline/lambdaTransformation/lambdaCloning.kt"); } + @Test @TestMetadata("lambdaInLambda2.kt") public void testLambdaInLambda2() throws Exception { runTest("compiler/testData/codegen/boxInline/lambdaTransformation/lambdaInLambda2.kt"); } + @Test @TestMetadata("lambdaInLambdaNoInline.kt") public void testLambdaInLambdaNoInline() throws Exception { runTest("compiler/testData/codegen/boxInline/lambdaTransformation/lambdaInLambdaNoInline.kt"); } + @Test @TestMetadata("regeneratedLambdaName.kt") public void testRegeneratedLambdaName() throws Exception { runTest("compiler/testData/codegen/boxInline/lambdaTransformation/regeneratedLambdaName.kt"); } + @Test @TestMetadata("regeneratedLambdaName2.kt") public void testRegeneratedLambdaName2() throws Exception { runTest("compiler/testData/codegen/boxInline/lambdaTransformation/regeneratedLambdaName2.kt"); } + @Test @TestMetadata("sameCaptured.kt") public void testSameCaptured() throws Exception { runTest("compiler/testData/codegen/boxInline/lambdaTransformation/sameCaptured.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/localFunInLambda") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class LocalFunInLambda extends AbstractBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); - } - + public class LocalFunInLambda { + @Test public void testAllFilesPresentInLocalFunInLambda() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/localFunInLambda"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("defaultParam.kt") public void testDefaultParam() throws Exception { runTest("compiler/testData/codegen/boxInline/localFunInLambda/defaultParam.kt"); } + @Test @TestMetadata("lambdaInLambdaCapturesAnotherFun.kt") public void testLambdaInLambdaCapturesAnotherFun() throws Exception { runTest("compiler/testData/codegen/boxInline/localFunInLambda/lambdaInLambdaCapturesAnotherFun.kt"); } + @Test @TestMetadata("localFunInLambda.kt") public void testLocalFunInLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/localFunInLambda/localFunInLambda.kt"); } + @Test @TestMetadata("localFunInLambdaCapturesAnotherFun.kt") public void testLocalFunInLambdaCapturesAnotherFun() throws Exception { runTest("compiler/testData/codegen/boxInline/localFunInLambda/localFunInLambdaCapturesAnotherFun.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/multiModule") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class MultiModule extends AbstractBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); - } - + public class MultiModule { + @Test public void testAllFilesPresentInMultiModule() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/multiModule"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("tryCatchWithRecursiveInline.kt") public void testTryCatchWithRecursiveInline() throws Exception { runTest("compiler/testData/codegen/boxInline/multiModule/tryCatchWithRecursiveInline.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/multifileClasses") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class MultifileClasses extends AbstractBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); - } - + public class MultifileClasses { + @Test public void testAllFilesPresentInMultifileClasses() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/multifileClasses"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("defaultArguments.kt") public void testDefaultArguments() throws Exception { runTest("compiler/testData/codegen/boxInline/multifileClasses/defaultArguments.kt"); } + @Test @TestMetadata("inlineFromOptimizedMultifileClass.kt") public void testInlineFromOptimizedMultifileClass() throws Exception { runTest("compiler/testData/codegen/boxInline/multifileClasses/inlineFromOptimizedMultifileClass.kt"); } + @Test @TestMetadata("inlineFromOtherPackage.kt") public void testInlineFromOtherPackage() throws Exception { runTest("compiler/testData/codegen/boxInline/multifileClasses/inlineFromOtherPackage.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/multiplatform") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Multiplatform extends AbstractBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); - } - + public class Multiplatform { + @Test public void testAllFilesPresentInMultiplatform() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/multiplatform"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/multiplatform/defaultArguments") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class DefaultArguments extends AbstractBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); - } - + public class DefaultArguments { + @Test public void testAllFilesPresentInDefaultArguments() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/multiplatform/defaultArguments"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("receiversAndParametersInLambda.kt") public void testReceiversAndParametersInLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/multiplatform/defaultArguments/receiversAndParametersInLambda.kt"); @@ -2355,535 +2687,640 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/noInline") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class NoInline extends AbstractBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); - } - + public class NoInline { + @Test public void testAllFilesPresentInNoInline() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/noInline"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("extensionReceiver.kt") public void testExtensionReceiver() throws Exception { runTest("compiler/testData/codegen/boxInline/noInline/extensionReceiver.kt"); } + @Test @TestMetadata("lambdaAsGeneric.kt") public void testLambdaAsGeneric() throws Exception { runTest("compiler/testData/codegen/boxInline/noInline/lambdaAsGeneric.kt"); } + @Test @TestMetadata("lambdaAsNonFunction.kt") public void testLambdaAsNonFunction() throws Exception { runTest("compiler/testData/codegen/boxInline/noInline/lambdaAsNonFunction.kt"); } + @Test @TestMetadata("noInline.kt") public void testNoInline() throws Exception { runTest("compiler/testData/codegen/boxInline/noInline/noInline.kt"); } + @Test @TestMetadata("noInlineLambdaChain.kt") public void testNoInlineLambdaChain() throws Exception { runTest("compiler/testData/codegen/boxInline/noInline/noInlineLambdaChain.kt"); } + @Test @TestMetadata("noInlineLambdaChainWithCapturedInline.kt") public void testNoInlineLambdaChainWithCapturedInline() throws Exception { runTest("compiler/testData/codegen/boxInline/noInline/noInlineLambdaChainWithCapturedInline.kt"); } + @Test @TestMetadata("withoutInline.kt") public void testWithoutInline() throws Exception { runTest("compiler/testData/codegen/boxInline/noInline/withoutInline.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/nonLocalReturns") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class NonLocalReturns extends AbstractBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); - } - + public class NonLocalReturns { + @Test public void testAllFilesPresentInNonLocalReturns() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("explicitLocalReturn.kt") public void testExplicitLocalReturn() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/explicitLocalReturn.kt"); } + @Test + @TestMetadata("fromArrayGenerator.kt") + public void testFromArrayGenerator() throws Exception { + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/fromArrayGenerator.kt"); + } + + @Test + @TestMetadata("fromArrayGeneratorCatch.kt") + public void testFromArrayGeneratorCatch() throws Exception { + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/fromArrayGeneratorCatch.kt"); + } + + @Test + @TestMetadata("fromArrayGeneratorNested.kt") + public void testFromArrayGeneratorNested() throws Exception { + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/fromArrayGeneratorNested.kt"); + } + + @Test + @TestMetadata("fromArrayGeneratorWithCapture.kt") + public void testFromArrayGeneratorWithCapture() throws Exception { + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/fromArrayGeneratorWithCapture.kt"); + } + + @Test + @TestMetadata("fromArrayGeneratorWithCatch.kt") + public void testFromArrayGeneratorWithCatch() throws Exception { + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/fromArrayGeneratorWithCatch.kt"); + } + + @Test + @TestMetadata("fromArrayGeneratorWithFinally.kt") + public void testFromArrayGeneratorWithFinally() throws Exception { + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/fromArrayGeneratorWithFinally.kt"); + } + + @Test + @TestMetadata("fromArrayGeneratorWithFinallyX2.kt") + public void testFromArrayGeneratorWithFinallyX2() throws Exception { + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/fromArrayGeneratorWithFinallyX2.kt"); + } + + @Test + @TestMetadata("fromArrayGeneratorWithFinallyX2_2.kt") + public void testFromArrayGeneratorWithFinallyX2_2() throws Exception { + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/fromArrayGeneratorWithFinallyX2_2.kt"); + } + + @Test @TestMetadata("fromInterfaceDefaultGetter.kt") public void testFromInterfaceDefaultGetter() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/fromInterfaceDefaultGetter.kt"); } + @Test @TestMetadata("justReturnInLambda.kt") public void testJustReturnInLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/justReturnInLambda.kt"); } + @Test @TestMetadata("kt5199.kt") public void testKt5199() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/kt5199.kt"); } + @Test @TestMetadata("kt8948.kt") public void testKt8948() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/kt8948.kt"); } + @Test @TestMetadata("kt8948v2.kt") public void testKt8948v2() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/kt8948v2.kt"); } + @Test @TestMetadata("nestedNonLocals.kt") public void testNestedNonLocals() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/nestedNonLocals.kt"); } + @Test @TestMetadata("noInlineLocalReturn.kt") public void testNoInlineLocalReturn() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/noInlineLocalReturn.kt"); } + @Test @TestMetadata("nonLocalReturnFromOuterLambda.kt") public void testNonLocalReturnFromOuterLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/nonLocalReturnFromOuterLambda.kt"); } + @Test @TestMetadata("propertyAccessors.kt") public void testPropertyAccessors() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/propertyAccessors.kt"); } + @Test @TestMetadata("returnFromFunctionExpr.kt") public void testReturnFromFunctionExpr() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/returnFromFunctionExpr.kt"); } + @Test @TestMetadata("simple.kt") public void testSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/simple.kt"); } + @Test @TestMetadata("simpleFunctional.kt") public void testSimpleFunctional() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/simpleFunctional.kt"); } + @Test @TestMetadata("simpleVoid.kt") public void testSimpleVoid() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/simpleVoid.kt"); } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/deparenthesize") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Deparenthesize extends AbstractBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); - } - + public class Deparenthesize { + @Test public void testAllFilesPresentInDeparenthesize() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/deparenthesize"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("bracket.kt") public void testBracket() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/deparenthesize/bracket.kt"); } + @Test @TestMetadata("labeled.kt") public void testLabeled() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/deparenthesize/labeled.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class TryFinally extends AbstractBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); - } - + public class TryFinally { + @Test public void testAllFilesPresentInTryFinally() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("kt16417.kt") public void testKt16417() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt16417.kt"); } + @Test @TestMetadata("kt20433.kt") public void testKt20433() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt20433.kt"); } + @Test @TestMetadata("kt20433_2.kt") public void testKt20433_2() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt20433_2.kt"); } + @Test @TestMetadata("kt20433_2_void.kt") public void testKt20433_2_void() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt20433_2_void.kt"); } + @Test @TestMetadata("kt20433_void.kt") public void testKt20433_void() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt20433_void.kt"); } + @Test @TestMetadata("kt26384.kt") public void testKt26384() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt26384.kt"); } + @Test @TestMetadata("kt26384_2.kt") public void testKt26384_2() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt26384_2.kt"); } + @Test @TestMetadata("kt28546.kt") public void testKt28546() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt28546.kt"); } + @Test @TestMetadata("kt6956.kt") public void testKt6956() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt6956.kt"); } + @Test @TestMetadata("kt7273.kt") public void testKt7273() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt7273.kt"); } + @Test @TestMetadata("nonLocalReturnFromCatchBlock.kt") public void testNonLocalReturnFromCatchBlock() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/nonLocalReturnFromCatchBlock.kt"); } + @Test @TestMetadata("nonLocalReturnFromOuterLambda.kt") public void testNonLocalReturnFromOuterLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/nonLocalReturnFromOuterLambda.kt"); } + @Test @TestMetadata("nonLocalReturnToCatchBlock.kt") public void testNonLocalReturnToCatchBlock() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/nonLocalReturnToCatchBlock.kt"); } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class CallSite extends AbstractBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); - } - + public class CallSite { + @Test public void testAllFilesPresentInCallSite() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("callSite.kt") public void testCallSite() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/callSite.kt"); } + @Test @TestMetadata("callSiteComplex.kt") public void testCallSiteComplex() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/callSiteComplex.kt"); } + @Test @TestMetadata("exceptionTableSplit.kt") public void testExceptionTableSplit() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/exceptionTableSplit.kt"); } + @Test @TestMetadata("exceptionTableSplitNoReturn.kt") public void testExceptionTableSplitNoReturn() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/exceptionTableSplitNoReturn.kt"); } + @Test @TestMetadata("finallyInFinally.kt") public void testFinallyInFinally() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/finallyInFinally.kt"); } + @Test @TestMetadata("wrongVarInterval.kt") public void testWrongVarInterval() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/wrongVarInterval.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Chained extends AbstractBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); - } - + public class Chained { + @Test public void testAllFilesPresentInChained() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("finallyInFinally.kt") public void testFinallyInFinally() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/finallyInFinally.kt"); } + @Test @TestMetadata("finallyInFinally2.kt") public void testFinallyInFinally2() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/finallyInFinally2.kt"); } + @Test @TestMetadata("intReturn.kt") public void testIntReturn() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturn.kt"); } + @Test @TestMetadata("intReturnComplex.kt") public void testIntReturnComplex() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex.kt"); } + @Test @TestMetadata("intReturnComplex2.kt") public void testIntReturnComplex2() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex2.kt"); } + @Test @TestMetadata("intReturnComplex3.kt") public void testIntReturnComplex3() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex3.kt"); } + @Test @TestMetadata("intReturnComplex4.kt") public void testIntReturnComplex4() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex4.kt"); } + @Test @TestMetadata("nestedLambda.kt") public void testNestedLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/nestedLambda.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class DeclSite extends AbstractBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); - } - + public class DeclSite { + @Test public void testAllFilesPresentInDeclSite() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("complex.kt") public void testComplex() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/complex.kt"); } + @Test @TestMetadata("intReturn.kt") public void testIntReturn() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/intReturn.kt"); } + @Test @TestMetadata("intReturnComplex.kt") public void testIntReturnComplex() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/intReturnComplex.kt"); } + @Test @TestMetadata("longReturn.kt") public void testLongReturn() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/longReturn.kt"); } + @Test @TestMetadata("nested.kt") public void testNested() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/nested.kt"); } + @Test @TestMetadata("returnInFinally.kt") public void testReturnInFinally() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/returnInFinally.kt"); } + @Test @TestMetadata("returnInTry.kt") public void testReturnInTry() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/returnInTry.kt"); } + @Test @TestMetadata("returnInTryAndFinally.kt") public void testReturnInTryAndFinally() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/returnInTryAndFinally.kt"); } + @Test @TestMetadata("severalInTry.kt") public void testSeveralInTry() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/severalInTry.kt"); } + @Test @TestMetadata("severalInTryComplex.kt") public void testSeveralInTryComplex() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/severalInTryComplex.kt"); } + @Test @TestMetadata("voidInlineFun.kt") public void testVoidInlineFun() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/voidInlineFun.kt"); } + @Test @TestMetadata("voidNonLocal.kt") public void testVoidNonLocal() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/voidNonLocal.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class ExceptionTable extends AbstractBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); - } - + public class ExceptionTable { + @Test public void testAllFilesPresentInExceptionTable() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("break.kt") public void testBreak() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/break.kt"); } + @Test @TestMetadata("continue.kt") public void testContinue() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/continue.kt"); } + @Test @TestMetadata("exceptionInFinally.kt") public void testExceptionInFinally() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/exceptionInFinally.kt"); } + @Test @TestMetadata("forInFinally.kt") public void testForInFinally() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/forInFinally.kt"); } + @Test @TestMetadata("innerAndExternal.kt") public void testInnerAndExternal() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/innerAndExternal.kt"); } + @Test @TestMetadata("innerAndExternalNested.kt") public void testInnerAndExternalNested() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/innerAndExternalNested.kt"); } + @Test @TestMetadata("innerAndExternalSimple.kt") public void testInnerAndExternalSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/innerAndExternalSimple.kt"); } + @Test @TestMetadata("kt31653.kt") public void testKt31653() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/kt31653.kt"); } + @Test @TestMetadata("kt31653_2.kt") public void testKt31653_2() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/kt31653_2.kt"); } + @Test @TestMetadata("kt31923.kt") public void testKt31923() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/kt31923.kt"); } + @Test @TestMetadata("kt31923_2.kt") public void testKt31923_2() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/kt31923_2.kt"); } + @Test @TestMetadata("kt31923_wrong.kt") public void testKt31923_wrong() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/kt31923_wrong.kt"); } + @Test @TestMetadata("nested.kt") public void testNested() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/nested.kt"); } + @Test @TestMetadata("nestedWithReturns.kt") public void testNestedWithReturns() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/nestedWithReturns.kt"); } + @Test @TestMetadata("nestedWithReturnsSimple.kt") public void testNestedWithReturnsSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/nestedWithReturnsSimple.kt"); } + @Test @TestMetadata("noFinally.kt") public void testNoFinally() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/noFinally.kt"); } + @Test @TestMetadata("severalCatchClause.kt") public void testSeveralCatchClause() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/severalCatchClause.kt"); } + @Test @TestMetadata("simpleThrow.kt") public void testSimpleThrow() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/simpleThrow.kt"); } + @Test @TestMetadata("synchonized.kt") public void testSynchonized() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/synchonized.kt"); } + @Test @TestMetadata("throwInFinally.kt") public void testThrowInFinally() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/throwInFinally.kt"); } + @Test @TestMetadata("tryCatchInFinally.kt") public void testTryCatchInFinally() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/tryCatchInFinally.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/variables") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Variables extends AbstractBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); - } - + public class Variables { + @Test public void testAllFilesPresentInVariables() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/variables"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("kt7792.kt") public void testKt7792() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/variables/kt7792.kt"); @@ -2892,430 +3329,501 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/optimizations") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Optimizations extends AbstractBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); - } - + public class Optimizations { + @Test public void testAllFilesPresentInOptimizations() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/optimizations"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("kt20844.kt") public void testKt20844() throws Exception { runTest("compiler/testData/codegen/boxInline/optimizations/kt20844.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/private") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Private extends AbstractBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); - } - + public class Private { + @Test @TestMetadata("accessorForConst.kt") public void testAccessorForConst() throws Exception { runTest("compiler/testData/codegen/boxInline/private/accessorForConst.kt"); } + @Test @TestMetadata("accessorStability.kt") public void testAccessorStability() throws Exception { runTest("compiler/testData/codegen/boxInline/private/accessorStability.kt"); } + @Test @TestMetadata("accessorStabilityInClass.kt") public void testAccessorStabilityInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/private/accessorStabilityInClass.kt"); } + @Test public void testAllFilesPresentInPrivate() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/private"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("effectivePrivate.kt") public void testEffectivePrivate() throws Exception { runTest("compiler/testData/codegen/boxInline/private/effectivePrivate.kt"); } + @Test @TestMetadata("kt6453.kt") public void testKt6453() throws Exception { runTest("compiler/testData/codegen/boxInline/private/kt6453.kt"); } + @Test @TestMetadata("kt8094.kt") public void testKt8094() throws Exception { runTest("compiler/testData/codegen/boxInline/private/kt8094.kt"); } + @Test @TestMetadata("kt8095.kt") public void testKt8095() throws Exception { runTest("compiler/testData/codegen/boxInline/private/kt8095.kt"); } + @Test @TestMetadata("nestedInPrivateClass.kt") public void testNestedInPrivateClass() throws Exception { runTest("compiler/testData/codegen/boxInline/private/nestedInPrivateClass.kt"); } + @Test @TestMetadata("privateClass.kt") public void testPrivateClass() throws Exception { runTest("compiler/testData/codegen/boxInline/private/privateClass.kt"); } + @Test @TestMetadata("privateClassExtensionLambda.kt") public void testPrivateClassExtensionLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/private/privateClassExtensionLambda.kt"); } + @Test @TestMetadata("privateInInlineInMultiFileFacade.kt") public void testPrivateInInlineInMultiFileFacade() throws Exception { runTest("compiler/testData/codegen/boxInline/private/privateInInlineInMultiFileFacade.kt"); } + @Test @TestMetadata("privateInline.kt") public void testPrivateInline() throws Exception { runTest("compiler/testData/codegen/boxInline/private/privateInline.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/property") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Property extends AbstractBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); - } - + public class Property { + @Test public void testAllFilesPresentInProperty() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/property"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("augAssignmentAndInc.kt") public void testAugAssignmentAndInc() throws Exception { runTest("compiler/testData/codegen/boxInline/property/augAssignmentAndInc.kt"); } + @Test @TestMetadata("augAssignmentAndIncInClass.kt") public void testAugAssignmentAndIncInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/property/augAssignmentAndIncInClass.kt"); } + @Test @TestMetadata("augAssignmentAndIncInClassViaConvention.kt") public void testAugAssignmentAndIncInClassViaConvention() throws Exception { runTest("compiler/testData/codegen/boxInline/property/augAssignmentAndIncInClassViaConvention.kt"); } + @Test @TestMetadata("augAssignmentAndIncOnExtension.kt") public void testAugAssignmentAndIncOnExtension() throws Exception { runTest("compiler/testData/codegen/boxInline/property/augAssignmentAndIncOnExtension.kt"); } + @Test @TestMetadata("augAssignmentAndIncOnExtensionInClass.kt") public void testAugAssignmentAndIncOnExtensionInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/property/augAssignmentAndIncOnExtensionInClass.kt"); } + @Test @TestMetadata("augAssignmentAndIncViaConvention.kt") public void testAugAssignmentAndIncViaConvention() throws Exception { runTest("compiler/testData/codegen/boxInline/property/augAssignmentAndIncViaConvention.kt"); } + @Test @TestMetadata("fromObject.kt") public void testFromObject() throws Exception { runTest("compiler/testData/codegen/boxInline/property/fromObject.kt"); } + @Test @TestMetadata("kt22649.kt") public void testKt22649() throws Exception { runTest("compiler/testData/codegen/boxInline/property/kt22649.kt"); } + @Test @TestMetadata("property.kt") public void testProperty() throws Exception { runTest("compiler/testData/codegen/boxInline/property/property.kt"); } + @Test @TestMetadata("reifiedVal.kt") public void testReifiedVal() throws Exception { runTest("compiler/testData/codegen/boxInline/property/reifiedVal.kt"); } + @Test @TestMetadata("reifiedVar.kt") public void testReifiedVar() throws Exception { runTest("compiler/testData/codegen/boxInline/property/reifiedVar.kt"); } + @Test @TestMetadata("simple.kt") public void testSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/property/simple.kt"); } + @Test @TestMetadata("simpleExtension.kt") public void testSimpleExtension() throws Exception { runTest("compiler/testData/codegen/boxInline/property/simpleExtension.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/reified") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Reified extends AbstractBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); - } - + public class Reified { + @Test public void testAllFilesPresentInReified() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/reified"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("arrayConstructor.kt") public void testArrayConstructor() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/arrayConstructor.kt"); } + @Test @TestMetadata("arrayOf.kt") public void testArrayOf() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/arrayOf.kt"); } + @Test @TestMetadata("capturedLambda.kt") public void testCapturedLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/capturedLambda.kt"); } + @Test @TestMetadata("capturedLambda2.kt") public void testCapturedLambda2() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/capturedLambda2.kt"); } + @Test @TestMetadata("dontSubstituteNonReified.kt") public void testDontSubstituteNonReified() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/dontSubstituteNonReified.kt"); } + @Test @TestMetadata("kt11081.kt") public void testKt11081() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/kt11081.kt"); } + @Test @TestMetadata("kt11677.kt") public void testKt11677() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/kt11677.kt"); } + @Test @TestMetadata("kt15956.kt") public void testKt15956() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/kt15956.kt"); } + @Test @TestMetadata("kt15997.kt") public void testKt15997() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/kt15997.kt"); } + @Test @TestMetadata("kt15997_2.kt") public void testKt15997_2() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/kt15997_2.kt"); } + @Test @TestMetadata("kt18977.kt") public void testKt18977() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/kt18977.kt"); } + @Test + @TestMetadata("kt35511.kt") + public void testKt35511() throws Exception { + runTest("compiler/testData/codegen/boxInline/reified/kt35511.kt"); + } + + @Test + @TestMetadata("kt35511_try.kt") + public void testKt35511_try() throws Exception { + runTest("compiler/testData/codegen/boxInline/reified/kt35511_try.kt"); + } + + @Test + @TestMetadata("kt35511_try_valueOf.kt") + public void testKt35511_try_valueOf() throws Exception { + runTest("compiler/testData/codegen/boxInline/reified/kt35511_try_valueOf.kt"); + } + + @Test + @TestMetadata("kt35511_try_values.kt") + public void testKt35511_try_values() throws Exception { + runTest("compiler/testData/codegen/boxInline/reified/kt35511_try_values.kt"); + } + + @Test @TestMetadata("kt6988.kt") public void testKt6988() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/kt6988.kt"); } + @Test @TestMetadata("kt6988_2.kt") public void testKt6988_2() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/kt6988_2.kt"); } + @Test @TestMetadata("kt6990.kt") public void testKt6990() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/kt6990.kt"); } + @Test @TestMetadata("kt7017.kt") public void testKt7017() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/kt7017.kt"); } + @Test @TestMetadata("kt8047.kt") public void testKt8047() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/kt8047.kt"); } + @Test @TestMetadata("kt8047_2.kt") public void testKt8047_2() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/kt8047_2.kt"); } + @Test @TestMetadata("kt9637.kt") public void testKt9637() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/kt9637.kt"); } + @Test @TestMetadata("kt9637_2.kt") public void testKt9637_2() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/kt9637_2.kt"); } + @Test @TestMetadata("nonCapturingObjectInLambda.kt") public void testNonCapturingObjectInLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/nonCapturingObjectInLambda.kt"); } + @Test @TestMetadata("packages.kt") public void testPackages() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/packages.kt"); } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/reified/checkCast") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class CheckCast extends AbstractBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); - } - + public class CheckCast { + @Test public void testAllFilesPresentInCheckCast() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/reified/checkCast"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("chain.kt") public void testChain() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/checkCast/chain.kt"); } + @Test @TestMetadata("kt26435.kt") public void testKt26435() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/checkCast/kt26435.kt"); } + @Test @TestMetadata("kt26435_2.kt") public void testKt26435_2() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/checkCast/kt26435_2.kt"); } + @Test @TestMetadata("kt26435_3.kt") public void testKt26435_3() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/checkCast/kt26435_3.kt"); } + @Test @TestMetadata("kt8043.kt") public void testKt8043() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/checkCast/kt8043.kt"); } + @Test @TestMetadata("maxStack.kt") public void testMaxStack() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/checkCast/maxStack.kt"); } + @Test @TestMetadata("nullable.kt") public void testNullable() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/checkCast/nullable.kt"); } + @Test @TestMetadata("simple.kt") public void testSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/checkCast/simple.kt"); } + @Test @TestMetadata("simpleSafe.kt") public void testSimpleSafe() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/checkCast/simpleSafe.kt"); } + @Test @TestMetadata("simple_1_3.kt") public void testSimple_1_3() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/checkCast/simple_1_3.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/reified/defaultLambda") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class DefaultLambda extends AbstractBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); - } - + public class DefaultLambda { + @Test public void testAllFilesPresentInDefaultLambda() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/reified/defaultLambda"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("chain.kt") public void testChain() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/defaultLambda/chain.kt"); } + @Test @TestMetadata("nested.kt") public void testNested() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/defaultLambda/nested.kt"); } + @Test @TestMetadata("nested2.kt") public void testNested2() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/defaultLambda/nested2.kt"); } + @Test @TestMetadata("nested2Static.kt") public void testNested2Static() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/defaultLambda/nested2Static.kt"); } + @Test @TestMetadata("nestedStatic.kt") public void testNestedStatic() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/defaultLambda/nestedStatic.kt"); } + @Test @TestMetadata("simple.kt") public void testSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/defaultLambda/simple.kt"); } + @Test @TestMetadata("transitiveChain.kt") public void testTransitiveChain() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/defaultLambda/transitiveChain.kt"); } + @Test @TestMetadata("transitiveChainStatic.kt") public void testTransitiveChainStatic() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/defaultLambda/transitiveChainStatic.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/reified/isCheck") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class IsCheck extends AbstractBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); - } - + public class IsCheck { + @Test public void testAllFilesPresentInIsCheck() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/reified/isCheck"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("chain.kt") public void testChain() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/isCheck/chain.kt"); } + @Test @TestMetadata("nullable.kt") public void testNullable() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/isCheck/nullable.kt"); } + @Test @TestMetadata("simple.kt") public void testSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/isCheck/simple.kt"); @@ -3323,518 +3831,577 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/signature") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Signature extends AbstractBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); - } - + public class Signature { + @Test public void testAllFilesPresentInSignature() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/signature"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("inProjectionSubstitution.kt") public void testInProjectionSubstitution() throws Exception { runTest("compiler/testData/codegen/boxInline/signature/inProjectionSubstitution.kt"); } + @Test @TestMetadata("outProjectionSubstitution.kt") public void testOutProjectionSubstitution() throws Exception { runTest("compiler/testData/codegen/boxInline/signature/outProjectionSubstitution.kt"); } + @Test @TestMetadata("recursion.kt") public void testRecursion() throws Exception { runTest("compiler/testData/codegen/boxInline/signature/recursion.kt"); } + @Test @TestMetadata("sameFormalParameterName.kt") public void testSameFormalParameterName() throws Exception { runTest("compiler/testData/codegen/boxInline/signature/sameFormalParameterName.kt"); } + @Test @TestMetadata("sameReifiedFormalParameterName.kt") public void testSameReifiedFormalParameterName() throws Exception { runTest("compiler/testData/codegen/boxInline/signature/sameReifiedFormalParameterName.kt"); } + @Test @TestMetadata("starProjectionSubstitution.kt") public void testStarProjectionSubstitution() throws Exception { runTest("compiler/testData/codegen/boxInline/signature/starProjectionSubstitution.kt"); } + @Test @TestMetadata("typeParameterInLambda.kt") public void testTypeParameterInLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/signature/typeParameterInLambda.kt"); } + @Test @TestMetadata("typeParametersSubstitution.kt") public void testTypeParametersSubstitution() throws Exception { runTest("compiler/testData/codegen/boxInline/signature/typeParametersSubstitution.kt"); } + @Test @TestMetadata("typeParametersSubstitution2.kt") public void testTypeParametersSubstitution2() throws Exception { runTest("compiler/testData/codegen/boxInline/signature/typeParametersSubstitution2.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/simple") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Simple extends AbstractBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); - } - + public class Simple { + @Test public void testAllFilesPresentInSimple() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/simple"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("captureAndArgumentIncompatibleTypes.kt") public void testCaptureAndArgumentIncompatibleTypes() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/captureAndArgumentIncompatibleTypes.kt"); } + @Test @TestMetadata("classObject.kt") public void testClassObject() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/classObject.kt"); } + @Test @TestMetadata("destructuring.kt") public void testDestructuring() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/destructuring.kt"); } + @Test @TestMetadata("destructuringIndexClash.kt") public void testDestructuringIndexClash() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/destructuringIndexClash.kt"); } + @Test @TestMetadata("extension.kt") public void testExtension() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/extension.kt"); } + @Test @TestMetadata("extensionLambda.kt") public void testExtensionLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/extensionLambda.kt"); } + @Test @TestMetadata("funImportedFromObject.kt") public void testFunImportedFromObject() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/funImportedFromObject.kt"); } + @Test @TestMetadata("inlineCallInInlineLambda.kt") public void testInlineCallInInlineLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/inlineCallInInlineLambda.kt"); } + @Test @TestMetadata("kt17431.kt") public void testKt17431() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/kt17431.kt"); } + @Test @TestMetadata("kt28547.kt") public void testKt28547() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/kt28547.kt"); } + @Test @TestMetadata("kt28547_2.kt") public void testKt28547_2() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/kt28547_2.kt"); } + @Test @TestMetadata("params.kt") public void testParams() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/params.kt"); } + @Test @TestMetadata("propImportedFromObject.kt") public void testPropImportedFromObject() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/propImportedFromObject.kt"); } + @Test @TestMetadata("rootConstructor.kt") public void testRootConstructor() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/rootConstructor.kt"); } + @Test @TestMetadata("safeCall.kt") public void testSafeCall() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/safeCall.kt"); } + @Test @TestMetadata("severalClosures.kt") public void testSeveralClosures() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/severalClosures.kt"); } + @Test @TestMetadata("severalUsage.kt") public void testSeveralUsage() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/severalUsage.kt"); } + @Test @TestMetadata("simpleDouble.kt") public void testSimpleDouble() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/simpleDouble.kt"); } + @Test @TestMetadata("simpleEnum.kt") public void testSimpleEnum() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/simpleEnum.kt"); } + @Test @TestMetadata("simpleGenerics.kt") public void testSimpleGenerics() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/simpleGenerics.kt"); } + @Test @TestMetadata("simpleInt.kt") public void testSimpleInt() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/simpleInt.kt"); } + @Test @TestMetadata("simpleLambda.kt") public void testSimpleLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/simpleLambda.kt"); } + @Test @TestMetadata("simpleObject.kt") public void testSimpleObject() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/simpleObject.kt"); } + @Test @TestMetadata("vararg.kt") public void testVararg() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/vararg.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/smap") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Smap extends AbstractBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); - } - + public class Smap { + @Test public void testAllFilesPresentInSmap() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/smap"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("assertion.kt") public void testAssertion() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/assertion.kt"); } + @Test @TestMetadata("classCycle.kt") public void testClassCycle() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/classCycle.kt"); } + @Test @TestMetadata("classFromDefaultPackage.kt") public void testClassFromDefaultPackage() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/classFromDefaultPackage.kt"); } + @Test @TestMetadata("crossroutines.kt") public void testCrossroutines() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/crossroutines.kt"); } + @Test @TestMetadata("defaultFunction.kt") public void testDefaultFunction() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/defaultFunction.kt"); } + @Test @TestMetadata("defaultFunctionWithInlineCall.kt") public void testDefaultFunctionWithInlineCall() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/defaultFunctionWithInlineCall.kt"); } + @Test @TestMetadata("forInline.kt") public void testForInline() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/forInline.kt"); } + @Test @TestMetadata("interleavedFiles.kt") public void testInterleavedFiles() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/interleavedFiles.kt"); } + @Test @TestMetadata("kt23369.kt") public void testKt23369() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/kt23369.kt"); } + @Test @TestMetadata("kt23369_2.kt") public void testKt23369_2() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/kt23369_2.kt"); } + @Test @TestMetadata("kt23369_3.kt") public void testKt23369_3() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/kt23369_3.kt"); } + @Test @TestMetadata("kt35006.kt") public void testKt35006() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/kt35006.kt"); } + @Test @TestMetadata("multiFileFacade.kt") public void testMultiFileFacade() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/multiFileFacade.kt"); } + @Test @TestMetadata("oneFile.kt") public void testOneFile() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/oneFile.kt"); } + @Test @TestMetadata("rangeFolding.kt") public void testRangeFolding() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/rangeFolding.kt"); } + @Test @TestMetadata("rangeFoldingInClass.kt") public void testRangeFoldingInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/rangeFoldingInClass.kt"); } + @Test @TestMetadata("smap.kt") public void testSmap() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/smap.kt"); } + @Test @TestMetadata("smapWithNewSyntax.kt") public void testSmapWithNewSyntax() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/smapWithNewSyntax.kt"); } + @Test @TestMetadata("smapWithOldSyntax.kt") public void testSmapWithOldSyntax() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/smapWithOldSyntax.kt"); } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/smap/anonymous") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Anonymous extends AbstractBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); - } - + public class Anonymous { + @Test public void testAllFilesPresentInAnonymous() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/smap/anonymous"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("kt19175.kt") public void testKt19175() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/anonymous/kt19175.kt"); } + @Test @TestMetadata("lambda.kt") public void testLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/anonymous/lambda.kt"); } + @Test @TestMetadata("lambdaOnCallSite.kt") public void testLambdaOnCallSite() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/anonymous/lambdaOnCallSite.kt"); } + @Test @TestMetadata("lambdaOnInlineCallSite.kt") public void testLambdaOnInlineCallSite() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/anonymous/lambdaOnInlineCallSite.kt"); } + @Test @TestMetadata("object.kt") public void testObject() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/anonymous/object.kt"); } + @Test @TestMetadata("objectOnCallSite.kt") public void testObjectOnCallSite() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/anonymous/objectOnCallSite.kt"); } + @Test @TestMetadata("objectOnInlineCallSite.kt") public void testObjectOnInlineCallSite() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/anonymous/objectOnInlineCallSite.kt"); } + @Test @TestMetadata("objectOnInlineCallSite2.kt") public void testObjectOnInlineCallSite2() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/anonymous/objectOnInlineCallSite2.kt"); } + @Test @TestMetadata("objectOnInlineCallSiteWithCapture.kt") public void testObjectOnInlineCallSiteWithCapture() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/anonymous/objectOnInlineCallSiteWithCapture.kt"); } + @Test @TestMetadata("severalMappingsForDefaultFile.kt") public void testSeveralMappingsForDefaultFile() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/anonymous/severalMappingsForDefaultFile.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/smap/defaultLambda") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class DefaultLambda extends AbstractBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); - } - + public class DefaultLambda { + @Test public void testAllFilesPresentInDefaultLambda() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/smap/defaultLambda"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("defaultLambdaInAnonymous.kt") public void testDefaultLambdaInAnonymous() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/defaultLambda/defaultLambdaInAnonymous.kt"); } + @Test @TestMetadata("inlinInDefault.kt") public void testInlinInDefault() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/defaultLambda/inlinInDefault.kt"); } + @Test @TestMetadata("inlinInDefault2.kt") public void testInlinInDefault2() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/defaultLambda/inlinInDefault2.kt"); } + @Test @TestMetadata("inlineAnonymousInDefault.kt") public void testInlineAnonymousInDefault() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/defaultLambda/inlineAnonymousInDefault.kt"); } + @Test @TestMetadata("inlineAnonymousInDefault2.kt") public void testInlineAnonymousInDefault2() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/defaultLambda/inlineAnonymousInDefault2.kt"); } + @Test @TestMetadata("kt21827.kt") public void testKt21827() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/defaultLambda/kt21827.kt"); } + @Test @TestMetadata("nested.kt") public void testNested() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/defaultLambda/nested.kt"); } + @Test @TestMetadata("simple.kt") public void testSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/defaultLambda/simple.kt"); } + @Test @TestMetadata("simple2.kt") public void testSimple2() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/defaultLambda/simple2.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/smap/inlineOnly") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class InlineOnly extends AbstractBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); - } - + public class InlineOnly { + @Test public void testAllFilesPresentInInlineOnly() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/smap/inlineOnly"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("noSmap.kt") public void testNoSmap() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/inlineOnly/noSmap.kt"); } + @Test @TestMetadata("noSmapWithProperty.kt") public void testNoSmapWithProperty() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/inlineOnly/noSmapWithProperty.kt"); } + @Test @TestMetadata("reified.kt") public void testReified() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/inlineOnly/reified.kt"); } + @Test @TestMetadata("reifiedProperty.kt") public void testReifiedProperty() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/inlineOnly/reifiedProperty.kt"); } + @Test @TestMetadata("stdlibInlineOnly.kt") public void testStdlibInlineOnly() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/inlineOnly/stdlibInlineOnly.kt"); } + @Test @TestMetadata("stdlibInlineOnlyOneLine.kt") public void testStdlibInlineOnlyOneLine() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/inlineOnly/stdlibInlineOnlyOneLine.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/smap/newsmap") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Newsmap extends AbstractBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); - } - + public class Newsmap { + @Test public void testAllFilesPresentInNewsmap() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/smap/newsmap"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("differentMapping.kt") public void testDifferentMapping() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/newsmap/differentMapping.kt"); } + @Test @TestMetadata("mappingInInlineFunLambda.kt") public void testMappingInInlineFunLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/newsmap/mappingInInlineFunLambda.kt"); } + @Test @TestMetadata("mappingInSubInlineLambda.kt") public void testMappingInSubInlineLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/newsmap/mappingInSubInlineLambda.kt"); } + @Test @TestMetadata("mappingInSubInlineLambdaSameFileInline.kt") public void testMappingInSubInlineLambdaSameFileInline() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/newsmap/mappingInSubInlineLambdaSameFileInline.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/smap/resolve") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Resolve extends AbstractBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); - } - + public class Resolve { + @Test public void testAllFilesPresentInResolve() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/smap/resolve"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("inlineComponent.kt") public void testInlineComponent() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/resolve/inlineComponent.kt"); } + @Test @TestMetadata("inlineIterator.kt") public void testInlineIterator() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/resolve/inlineIterator.kt"); @@ -3842,616 +4409,695 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/special") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Special extends AbstractBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); - } - + public class Special { + @Test public void testAllFilesPresentInSpecial() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/special"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("identityCheck.kt") public void testIdentityCheck() throws Exception { runTest("compiler/testData/codegen/boxInline/special/identityCheck.kt"); } + @Test @TestMetadata("ifBranches.kt") public void testIfBranches() throws Exception { runTest("compiler/testData/codegen/boxInline/special/ifBranches.kt"); } + @Test @TestMetadata("iinc.kt") public void testIinc() throws Exception { runTest("compiler/testData/codegen/boxInline/special/iinc.kt"); } + @Test @TestMetadata("inlineChain.kt") public void testInlineChain() throws Exception { runTest("compiler/testData/codegen/boxInline/special/inlineChain.kt"); } + @Test @TestMetadata("loopInStoreLoadChains.kt") public void testLoopInStoreLoadChains() throws Exception { runTest("compiler/testData/codegen/boxInline/special/loopInStoreLoadChains.kt"); } + @Test @TestMetadata("loopInStoreLoadChains2.kt") public void testLoopInStoreLoadChains2() throws Exception { runTest("compiler/testData/codegen/boxInline/special/loopInStoreLoadChains2.kt"); } + @Test @TestMetadata("plusAssign.kt") public void testPlusAssign() throws Exception { runTest("compiler/testData/codegen/boxInline/special/plusAssign.kt"); } + @Test @TestMetadata("stackHeightBug.kt") public void testStackHeightBug() throws Exception { runTest("compiler/testData/codegen/boxInline/special/stackHeightBug.kt"); } + @Test @TestMetadata("unusedInlineLambda.kt") public void testUnusedInlineLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/special/unusedInlineLambda.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/stackOnReturn") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class StackOnReturn extends AbstractBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); - } - + public class StackOnReturn { + @Test public void testAllFilesPresentInStackOnReturn() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/stackOnReturn"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("elvis.kt") public void testElvis() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/elvis.kt"); } + @Test @TestMetadata("ifThenElse.kt") public void testIfThenElse() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/ifThenElse.kt"); } + @Test @TestMetadata("kt11499.kt") public void testKt11499() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/kt11499.kt"); } + @Test @TestMetadata("kt17591.kt") public void testKt17591() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/kt17591.kt"); } + @Test @TestMetadata("kt17591a.kt") public void testKt17591a() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/kt17591a.kt"); } + @Test @TestMetadata("kt17591b.kt") public void testKt17591b() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/kt17591b.kt"); } + @Test @TestMetadata("mixedTypesOnStack1.kt") public void testMixedTypesOnStack1() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/mixedTypesOnStack1.kt"); } + @Test @TestMetadata("mixedTypesOnStack2.kt") public void testMixedTypesOnStack2() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/mixedTypesOnStack2.kt"); } + @Test @TestMetadata("mixedTypesOnStack3.kt") public void testMixedTypesOnStack3() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/mixedTypesOnStack3.kt"); } + @Test @TestMetadata("nonLocalReturn1.kt") public void testNonLocalReturn1() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/nonLocalReturn1.kt"); } + @Test @TestMetadata("nonLocalReturn2.kt") public void testNonLocalReturn2() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/nonLocalReturn2.kt"); } + @Test @TestMetadata("nonLocalReturn3.kt") public void testNonLocalReturn3() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/nonLocalReturn3.kt"); } + @Test @TestMetadata("poppedLocalReturn.kt") public void testPoppedLocalReturn() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/poppedLocalReturn.kt"); } + @Test @TestMetadata("poppedLocalReturn2.kt") public void testPoppedLocalReturn2() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/poppedLocalReturn2.kt"); } + @Test @TestMetadata("returnLong.kt") public void testReturnLong() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/returnLong.kt"); } + @Test @TestMetadata("tryFinally.kt") public void testTryFinally() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/tryFinally.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/suspend") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Suspend extends AbstractBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); - } - + public class Suspend { + @Test public void testAllFilesPresentInSuspend() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("capturedVariables.kt") public void testCapturedVariables() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/capturedVariables.kt"); } + @Test @TestMetadata("crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt") public void testCrossinlineSuspendLambdaInsideCrossinlineSuspendLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt"); } + @Test @TestMetadata("debugMetadataCrossinline.kt") public void testDebugMetadataCrossinline() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/debugMetadataCrossinline.kt"); } + @Test @TestMetadata("delegatedProperties.kt") public void testDelegatedProperties() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/delegatedProperties.kt"); } + @Test @TestMetadata("doubleRegenerationWithNonSuspendingLambda.kt") public void testDoubleRegenerationWithNonSuspendingLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/doubleRegenerationWithNonSuspendingLambda.kt"); } + @Test @TestMetadata("enclodingMethod.kt") public void testEnclodingMethod() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/enclodingMethod.kt"); } + @Test @TestMetadata("fileNameInMetadata.kt") public void testFileNameInMetadata() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/fileNameInMetadata.kt"); } + @Test @TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt") public void testInlineOrdinaryOfCrossinlineSuspend() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfCrossinlineSuspend.kt"); } + @Test @TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt") public void testInlineOrdinaryOfNoinlineSuspend() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfNoinlineSuspend.kt"); } + @Test @TestMetadata("inlineSuspendContinuation.kt") public void testInlineSuspendContinuation() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendContinuation.kt"); } + @Test @TestMetadata("inlineSuspendInMultifileClass.kt") public void testInlineSuspendInMultifileClass() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendInMultifileClass.kt"); } + @Test @TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt") public void testInlineSuspendOfCrossinlineOrdinary() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineOrdinary.kt"); } + @Test @TestMetadata("inlineSuspendOfCrossinlineSuspend.kt") public void testInlineSuspendOfCrossinlineSuspend() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineSuspend.kt"); } + @Test @TestMetadata("inlineSuspendOfNoinlineOrdinary.kt") public void testInlineSuspendOfNoinlineOrdinary() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineOrdinary.kt"); } + @Test @TestMetadata("inlineSuspendOfNoinlineSuspend.kt") public void testInlineSuspendOfNoinlineSuspend() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineSuspend.kt"); } + @Test @TestMetadata("inlineSuspendOfOrdinary.kt") public void testInlineSuspendOfOrdinary() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfOrdinary.kt"); } + @Test @TestMetadata("inlineSuspendOfSuspend.kt") public void testInlineSuspendOfSuspend() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfSuspend.kt"); } + @Test @TestMetadata("jvmName.kt") public void testJvmName() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/jvmName.kt"); } + @Test @TestMetadata("kt26658.kt") public void testKt26658() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/kt26658.kt"); } + @Test @TestMetadata("maxStackWithCrossinline.kt") public void testMaxStackWithCrossinline() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/maxStackWithCrossinline.kt"); } + @Test @TestMetadata("multipleLocals.kt") public void testMultipleLocals() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/multipleLocals.kt"); } + @Test @TestMetadata("multipleSuspensionPoints.kt") public void testMultipleSuspensionPoints() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/multipleSuspensionPoints.kt"); } + @Test @TestMetadata("nestedMethodWith2XParameter.kt") public void testNestedMethodWith2XParameter() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/nestedMethodWith2XParameter.kt"); } + @Test @TestMetadata("nonLocalReturn.kt") public void testNonLocalReturn() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/nonLocalReturn.kt"); } + @Test @TestMetadata("nonSuspendCrossinline.kt") public void testNonSuspendCrossinline() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/nonSuspendCrossinline.kt"); } + @Test @TestMetadata("returnValue.kt") public void testReturnValue() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/returnValue.kt"); } + @Test @TestMetadata("tryCatchReceiver.kt") public void testTryCatchReceiver() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/tryCatchReceiver.kt"); } + @Test @TestMetadata("tryCatchStackTransform.kt") public void testTryCatchStackTransform() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/tryCatchStackTransform.kt"); } + @Test @TestMetadata("twiceRegeneratedAnonymousObject.kt") public void testTwiceRegeneratedAnonymousObject() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/twiceRegeneratedAnonymousObject.kt"); } + @Test @TestMetadata("twiceRegeneratedSuspendLambda.kt") public void testTwiceRegeneratedSuspendLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/twiceRegeneratedSuspendLambda.kt"); } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/suspend/callableReference") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class CallableReference extends AbstractBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); - } - + public class CallableReference { + @Test public void testAllFilesPresentInCallableReference() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/callableReference"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("isAsReified.kt") public void testIsAsReified() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/callableReference/isAsReified.kt"); } + @Test @TestMetadata("isAsReified2.kt") public void testIsAsReified2() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/callableReference/isAsReified2.kt"); } + @Test @TestMetadata("nonTailCall.kt") public void testNonTailCall() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/callableReference/nonTailCall.kt"); } + @Test @TestMetadata("simple.kt") public void testSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/callableReference/simple.kt"); } + @Test @TestMetadata("unitReturn.kt") public void testUnitReturn() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/callableReference/unitReturn.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/suspend/defaultParameter") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class DefaultParameter extends AbstractBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); - } - + public class DefaultParameter { + @Test public void testAllFilesPresentInDefaultParameter() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/defaultParameter"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("defaultValueCrossinline.kt") public void testDefaultValueCrossinline() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueCrossinline.kt"); } + @Test @TestMetadata("defaultValueInClass.kt") public void testDefaultValueInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInClass.kt"); } + @Test @TestMetadata("defaultValueInline.kt") public void testDefaultValueInline() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInline.kt"); } + @Test @TestMetadata("defaultValueInlineFromMultiFileFacade.kt") public void testDefaultValueInlineFromMultiFileFacade() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInlineFromMultiFileFacade.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/suspend/inlineClass") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class InlineClass extends AbstractBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); - } - + public class InlineClass { + @Test public void testAllFilesPresentInInlineClass() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/inlineClass"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("returnUnboxedDirect.kt") public void testReturnUnboxedDirect() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineClass/returnUnboxedDirect.kt"); } + @Test @TestMetadata("returnUnboxedResume.kt") public void testReturnUnboxedResume() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineClass/returnUnboxedResume.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/suspend/inlineUsedAsNoinline") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class InlineUsedAsNoinline extends AbstractBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); - } - + public class InlineUsedAsNoinline { + @Test public void testAllFilesPresentInInlineUsedAsNoinline() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/inlineUsedAsNoinline"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("inlineOnly.kt") public void testInlineOnly() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineUsedAsNoinline/inlineOnly.kt"); } + @Test @TestMetadata("simpleNamed.kt") public void testSimpleNamed() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineUsedAsNoinline/simpleNamed.kt"); } + @Test @TestMetadata("withCapturedInlineLambda.kt") public void testWithCapturedInlineLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineUsedAsNoinline/withCapturedInlineLambda.kt"); } + @Test @TestMetadata("withCapturedInlineLambda2.kt") public void testWithCapturedInlineLambda2() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineUsedAsNoinline/withCapturedInlineLambda2.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/suspend/receiver") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Receiver extends AbstractBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); - } - + public class Receiver { + @Test public void testAllFilesPresentInReceiver() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/receiver"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt") public void testInlineOrdinaryOfCrossinlineSuspend() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfCrossinlineSuspend.kt"); } + @Test @TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt") public void testInlineOrdinaryOfNoinlineSuspend() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfNoinlineSuspend.kt"); } + @Test @TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt") public void testInlineSuspendOfCrossinlineOrdinary() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineOrdinary.kt"); } + @Test @TestMetadata("inlineSuspendOfCrossinlineSuspend.kt") public void testInlineSuspendOfCrossinlineSuspend() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineSuspend.kt"); } + @Test @TestMetadata("inlineSuspendOfNoinlineOrdinary.kt") public void testInlineSuspendOfNoinlineOrdinary() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineOrdinary.kt"); } + @Test @TestMetadata("inlineSuspendOfNoinlineSuspend.kt") public void testInlineSuspendOfNoinlineSuspend() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineSuspend.kt"); } + @Test @TestMetadata("inlineSuspendOfOrdinary.kt") public void testInlineSuspendOfOrdinary() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfOrdinary.kt"); } + @Test @TestMetadata("inlineSuspendOfSuspend.kt") public void testInlineSuspendOfSuspend() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfSuspend.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class StateMachine extends AbstractBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); - } - + public class StateMachine { + @Test public void testAllFilesPresentInStateMachine() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/stateMachine"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("crossingCoroutineBoundaries.kt") public void testCrossingCoroutineBoundaries() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/crossingCoroutineBoundaries.kt"); } + @Test @TestMetadata("independentInline.kt") public void testIndependentInline() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/independentInline.kt"); } + @Test @TestMetadata("innerLambda.kt") public void testInnerLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambda.kt"); } + @Test @TestMetadata("innerLambdaInsideLambda.kt") public void testInnerLambdaInsideLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaInsideLambda.kt"); } + @Test @TestMetadata("innerLambdaWithoutCrossinline.kt") public void testInnerLambdaWithoutCrossinline() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaWithoutCrossinline.kt"); } + @Test @TestMetadata("innerMadness.kt") public void testInnerMadness() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadness.kt"); } + @Test @TestMetadata("innerMadnessCallSite.kt") public void testInnerMadnessCallSite() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadnessCallSite.kt"); } + @Test @TestMetadata("innerObject.kt") public void testInnerObject() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObject.kt"); } + @Test @TestMetadata("innerObjectInsideInnerObject.kt") public void testInnerObjectInsideInnerObject() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectInsideInnerObject.kt"); } + @Test @TestMetadata("innerObjectRetransformation.kt") public void testInnerObjectRetransformation() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectRetransformation.kt"); } + @Test @TestMetadata("innerObjectSeveralFunctions.kt") public void testInnerObjectSeveralFunctions() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectSeveralFunctions.kt"); } + @Test @TestMetadata("innerObjectWithoutCapturingCrossinline.kt") public void testInnerObjectWithoutCapturingCrossinline() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectWithoutCapturingCrossinline.kt"); } + @Test @TestMetadata("insideObject.kt") public void testInsideObject() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/insideObject.kt"); } + @Test + @TestMetadata("kt30708.kt") + public void testKt30708() throws Exception { + runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/kt30708.kt"); + } + + @Test @TestMetadata("lambdaTransformation.kt") public void testLambdaTransformation() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/lambdaTransformation.kt"); } + @Test @TestMetadata("normalInline.kt") public void testNormalInline() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/normalInline.kt"); } + @Test @TestMetadata("numberOfSuspentions.kt") public void testNumberOfSuspentions() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/numberOfSuspentions.kt"); } + @Test @TestMetadata("objectInsideLambdas.kt") public void testObjectInsideLambdas() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/objectInsideLambdas.kt"); } + @Test @TestMetadata("oneInlineTwoCaptures.kt") public void testOneInlineTwoCaptures() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/oneInlineTwoCaptures.kt"); } + @Test @TestMetadata("passLambda.kt") public void testPassLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/passLambda.kt"); } + @Test @TestMetadata("passParameter.kt") public void testPassParameter() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/passParameter.kt"); } + @Test @TestMetadata("passParameterLambda.kt") public void testPassParameterLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/passParameterLambda.kt"); } + @Test @TestMetadata("unreachableSuspendMarker.kt") public void testUnreachableSuspendMarker() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/unreachableSuspendMarker.kt"); @@ -4459,110 +5105,121 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/syntheticAccessors") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class SyntheticAccessors extends AbstractBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); - } - + public class SyntheticAccessors { + @Test public void testAllFilesPresentInSyntheticAccessors() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/syntheticAccessors"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("constField.kt") public void testConstField() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/constField.kt"); } + @Test @TestMetadata("packagePrivateMembers.kt") public void testPackagePrivateMembers() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/packagePrivateMembers.kt"); } + @Test @TestMetadata("propertyModifiers.kt") public void testPropertyModifiers() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/propertyModifiers.kt"); } + @Test @TestMetadata("protectedMembers.kt") public void testProtectedMembers() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/protectedMembers.kt"); } + @Test @TestMetadata("protectedMembersFromSuper.kt") public void testProtectedMembersFromSuper() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/protectedMembersFromSuper.kt"); } + @Test @TestMetadata("superCall.kt") public void testSuperCall() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/superCall.kt"); } + @Test @TestMetadata("superCallFromMultipleSubclasses.kt") public void testSuperCallFromMultipleSubclasses() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/superCallFromMultipleSubclasses.kt"); } + @Test @TestMetadata("superProperty.kt") public void testSuperProperty() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/superProperty.kt"); } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class WithinInlineLambda extends AbstractBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); - } - + public class WithinInlineLambda { + @Test public void testAllFilesPresentInWithinInlineLambda() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("directFieldAccess.kt") public void testDirectFieldAccess() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/directFieldAccess.kt"); } + @Test @TestMetadata("directFieldAccessInCrossInline.kt") public void testDirectFieldAccessInCrossInline() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/directFieldAccessInCrossInline.kt"); } + @Test @TestMetadata("privateCall.kt") public void testPrivateCall() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/privateCall.kt"); } + @Test @TestMetadata("privateInCrossInline.kt") public void testPrivateInCrossInline() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/privateInCrossInline.kt"); } + @Test @TestMetadata("privateInDefaultStubArgument.kt") public void testPrivateInDefaultStubArgument() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/privateInDefaultStubArgument.kt"); } + @Test @TestMetadata("protectedInCrossinline.kt") public void testProtectedInCrossinline() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/protectedInCrossinline.kt"); } + @Test @TestMetadata("protectedMembersFromSuper.kt") public void testProtectedMembersFromSuper() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/protectedMembersFromSuper.kt"); } + @Test @TestMetadata("superCall.kt") public void testSuperCall() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/superCall.kt"); } + @Test @TestMetadata("superInCrossInline.kt") public void testSuperInCrossInline() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/superInCrossInline.kt"); @@ -4570,79 +5227,78 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/trait") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Trait extends AbstractBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); - } - + public class Trait { + @Test public void testAllFilesPresentInTrait() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/trait"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("trait.kt") public void testTrait() throws Exception { runTest("compiler/testData/codegen/boxInline/trait/trait.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/tryCatchFinally") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class TryCatchFinally extends AbstractBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); - } - + public class TryCatchFinally { + @Test public void testAllFilesPresentInTryCatchFinally() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/tryCatchFinally"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("kt5863.kt") public void testKt5863() throws Exception { runTest("compiler/testData/codegen/boxInline/tryCatchFinally/kt5863.kt"); } + @Test @TestMetadata("tryCatch.kt") public void testTryCatch() throws Exception { runTest("compiler/testData/codegen/boxInline/tryCatchFinally/tryCatch.kt"); } + @Test @TestMetadata("tryCatch2.kt") public void testTryCatch2() throws Exception { runTest("compiler/testData/codegen/boxInline/tryCatchFinally/tryCatch2.kt"); } + @Test @TestMetadata("tryCatchFinally.kt") public void testTryCatchFinally() throws Exception { runTest("compiler/testData/codegen/boxInline/tryCatchFinally/tryCatchFinally.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/varargs") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Varargs extends AbstractBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); - } - + public class Varargs { + @Test public void testAllFilesPresentInVarargs() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/varargs"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("kt17653.kt") public void testKt17653() throws Exception { runTest("compiler/testData/codegen/boxInline/varargs/kt17653.kt"); } + @Test @TestMetadata("varargAndDefaultParameters.kt") public void testVarargAndDefaultParameters() throws Exception { runTest("compiler/testData/codegen/boxInline/varargs/varargAndDefaultParameters.kt"); } + @Test @TestMetadata("varargAndDefaultParameters2.kt") public void testVarargAndDefaultParameters2() throws Exception { runTest("compiler/testData/codegen/boxInline/varargs/varargAndDefaultParameters2.kt"); diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BytecodeTextTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BytecodeTextTestGenerated.java index bd3bd77533e..43e6f54d190 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BytecodeTextTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BytecodeTextTestGenerated.java @@ -520,7 +520,7 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/argumentOrder") @TestDataPath("$PROJECT_ROOT") - public class ArgumentOrder extends AbstractBytecodeTextTest { + public class ArgumentOrder { @Test public void testAllFilesPresentInArgumentOrder() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/argumentOrder"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -542,7 +542,7 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/assert") @TestDataPath("$PROJECT_ROOT") - public class Assert extends AbstractBytecodeTextTest { + public class Assert { @Test public void testAllFilesPresentInAssert() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/assert"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -582,7 +582,7 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/boxing") @TestDataPath("$PROJECT_ROOT") - public class Boxing extends AbstractBytecodeTextTest { + public class Boxing { @Test public void testAllFilesPresentInBoxing() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/boxing"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -610,7 +610,7 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/boxingOptimization") @TestDataPath("$PROJECT_ROOT") - public class BoxingOptimization extends AbstractBytecodeTextTest { + public class BoxingOptimization { @Test public void testAllFilesPresentInBoxingOptimization() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/boxingOptimization"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -640,6 +640,12 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { runTest("compiler/testData/codegen/bytecodeText/boxingOptimization/fold.kt"); } + @Test + @TestMetadata("hashCodeOnNonNull.kt") + public void testHashCodeOnNonNull() throws Exception { + runTest("compiler/testData/codegen/bytecodeText/boxingOptimization/hashCodeOnNonNull.kt"); + } + @Test @TestMetadata("inlineClassesAndInlinedLambda.kt") public void testInlineClassesAndInlinedLambda() throws Exception { @@ -764,7 +770,7 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/builtinFunctions") @TestDataPath("$PROJECT_ROOT") - public class BuiltinFunctions extends AbstractBytecodeTextTest { + public class BuiltinFunctions { @Test public void testAllFilesPresentInBuiltinFunctions() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/builtinFunctions"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -797,7 +803,7 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/builtinFunctions/genericParameterBridge") @TestDataPath("$PROJECT_ROOT") - public class GenericParameterBridge extends AbstractBytecodeTextTest { + public class GenericParameterBridge { @Test @TestMetadata("abstractList.kt") public void testAbstractList() throws Exception { @@ -850,7 +856,7 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/callableReference") @TestDataPath("$PROJECT_ROOT") - public class CallableReference extends AbstractBytecodeTextTest { + public class CallableReference { @Test public void testAllFilesPresentInCallableReference() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/callableReference"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -914,7 +920,7 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/capturedVarsOptimization") @TestDataPath("$PROJECT_ROOT") - public class CapturedVarsOptimization extends AbstractBytecodeTextTest { + public class CapturedVarsOptimization { @Test public void testAllFilesPresentInCapturedVarsOptimization() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/capturedVarsOptimization"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -968,6 +974,12 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { runTest("compiler/testData/codegen/bytecodeText/capturedVarsOptimization/capturedVarsOfSize2.kt"); } + @Test + @TestMetadata("returnValueOfArrayConstructor.kt") + public void testReturnValueOfArrayConstructor() throws Exception { + runTest("compiler/testData/codegen/bytecodeText/capturedVarsOptimization/returnValueOfArrayConstructor.kt"); + } + @Test @TestMetadata("sharedSlotsWithCapturedVars.kt") public void testSharedSlotsWithCapturedVars() throws Exception { @@ -984,7 +996,7 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/checkcast") @TestDataPath("$PROJECT_ROOT") - public class Checkcast extends AbstractBytecodeTextTest { + public class Checkcast { @Test public void testAllFilesPresentInCheckcast() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/checkcast"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -1018,7 +1030,7 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/coercionToUnitOptimization") @TestDataPath("$PROJECT_ROOT") - public class CoercionToUnitOptimization extends AbstractBytecodeTextTest { + public class CoercionToUnitOptimization { @Test public void testAllFilesPresentInCoercionToUnitOptimization() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/coercionToUnitOptimization"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -1082,7 +1094,7 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/companion") @TestDataPath("$PROJECT_ROOT") - public class Companion extends AbstractBytecodeTextTest { + public class Companion { @Test public void testAllFilesPresentInCompanion() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/companion"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -1176,7 +1188,7 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/conditions") @TestDataPath("$PROJECT_ROOT") - public class Conditions extends AbstractBytecodeTextTest { + public class Conditions { @Test public void testAllFilesPresentInConditions() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/conditions"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -1354,7 +1366,7 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/constProperty") @TestDataPath("$PROJECT_ROOT") - public class ConstProperty extends AbstractBytecodeTextTest { + public class ConstProperty { @Test public void testAllFilesPresentInConstProperty() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/constProperty"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -1394,7 +1406,7 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/constantConditions") @TestDataPath("$PROJECT_ROOT") - public class ConstantConditions extends AbstractBytecodeTextTest { + public class ConstantConditions { @Test public void testAllFilesPresentInConstantConditions() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/constantConditions"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -1434,7 +1446,7 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/constants") @TestDataPath("$PROJECT_ROOT") - public class Constants extends AbstractBytecodeTextTest { + public class Constants { @Test public void testAllFilesPresentInConstants() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/constants"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -1510,7 +1522,7 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/constructors") @TestDataPath("$PROJECT_ROOT") - public class Constructors extends AbstractBytecodeTextTest { + public class Constructors { @Test public void testAllFilesPresentInConstructors() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/constructors"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -1574,7 +1586,7 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/controlStructures") @TestDataPath("$PROJECT_ROOT") - public class ControlStructures extends AbstractBytecodeTextTest { + public class ControlStructures { @Test public void testAllFilesPresentInControlStructures() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/controlStructures"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -1596,7 +1608,7 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/coroutines") @TestDataPath("$PROJECT_ROOT") - public class Coroutines extends AbstractBytecodeTextTest { + public class Coroutines { @Test public void testAllFilesPresentInCoroutines() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/coroutines"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -1671,7 +1683,7 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/coroutines/cleanup") @TestDataPath("$PROJECT_ROOT") - public class Cleanup extends AbstractBytecodeTextTest { + public class Cleanup { @Test public void testAllFilesPresentInCleanup() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/coroutines/cleanup"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -1729,7 +1741,7 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/coroutines/debug") @TestDataPath("$PROJECT_ROOT") - public class Debug extends AbstractBytecodeTextTest { + public class Debug { @Test public void testAllFilesPresentInDebug() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/coroutines/debug"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -1769,7 +1781,7 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/coroutines/destructuringInLambda") @TestDataPath("$PROJECT_ROOT") - public class DestructuringInLambda extends AbstractBytecodeTextTest { + public class DestructuringInLambda { @Test public void testAllFilesPresentInDestructuringInLambda() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/coroutines/destructuringInLambda"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -1785,7 +1797,7 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/coroutines/inlineClasses") @TestDataPath("$PROJECT_ROOT") - public class InlineClasses extends AbstractBytecodeTextTest { + public class InlineClasses { @Test public void testAllFilesPresentInInlineClasses() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/coroutines/inlineClasses"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -1837,7 +1849,7 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling") @TestDataPath("$PROJECT_ROOT") - public class IntLikeVarSpilling extends AbstractBytecodeTextTest { + public class IntLikeVarSpilling { @Test public void testAllFilesPresentInIntLikeVarSpilling() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -1907,7 +1919,7 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/coroutines/stateMachine") @TestDataPath("$PROJECT_ROOT") - public class StateMachine extends AbstractBytecodeTextTest { + public class StateMachine { @Test public void testAllFilesPresentInStateMachine() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/coroutines/stateMachine"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -1930,7 +1942,7 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/deadCodeElimination") @TestDataPath("$PROJECT_ROOT") - public class DeadCodeElimination extends AbstractBytecodeTextTest { + public class DeadCodeElimination { @Test public void testAllFilesPresentInDeadCodeElimination() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/deadCodeElimination"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -2006,7 +2018,7 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/defaultArguments") @TestDataPath("$PROJECT_ROOT") - public class DefaultArguments extends AbstractBytecodeTextTest { + public class DefaultArguments { @Test public void testAllFilesPresentInDefaultArguments() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/defaultArguments"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -2076,7 +2088,7 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/directInvoke") @TestDataPath("$PROJECT_ROOT") - public class DirectInvoke extends AbstractBytecodeTextTest { + public class DirectInvoke { @Test public void testAllFilesPresentInDirectInvoke() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/directInvoke"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -2104,7 +2116,7 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/disabledOptimizations") @TestDataPath("$PROJECT_ROOT") - public class DisabledOptimizations extends AbstractBytecodeTextTest { + public class DisabledOptimizations { @Test public void testAllFilesPresentInDisabledOptimizations() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/disabledOptimizations"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -2150,7 +2162,7 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/enum") @TestDataPath("$PROJECT_ROOT") - public class Enum extends AbstractBytecodeTextTest { + public class Enum { @Test public void testAllFilesPresentInEnum() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/enum"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -2184,7 +2196,7 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/exclExcl") @TestDataPath("$PROJECT_ROOT") - public class ExclExcl extends AbstractBytecodeTextTest { + public class ExclExcl { @Test public void testAllFilesPresentInExclExcl() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/exclExcl"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -2200,7 +2212,7 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/fieldsForCapturedValues") @TestDataPath("$PROJECT_ROOT") - public class FieldsForCapturedValues extends AbstractBytecodeTextTest { + public class FieldsForCapturedValues { @Test public void testAllFilesPresentInFieldsForCapturedValues() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/fieldsForCapturedValues"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -2264,7 +2276,7 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/forLoop") @TestDataPath("$PROJECT_ROOT") - public class ForLoop extends AbstractBytecodeTextTest { + public class ForLoop { @Test public void testAllFilesPresentInForLoop() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/forLoop"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -2423,7 +2435,7 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/forLoop/forInArrayWithIndex") @TestDataPath("$PROJECT_ROOT") - public class ForInArrayWithIndex extends AbstractBytecodeTextTest { + public class ForInArrayWithIndex { @Test public void testAllFilesPresentInForInArrayWithIndex() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/forLoop/forInArrayWithIndex"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -2463,7 +2475,7 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/forLoop/forInCharSequenceWithIndex") @TestDataPath("$PROJECT_ROOT") - public class ForInCharSequenceWithIndex extends AbstractBytecodeTextTest { + public class ForInCharSequenceWithIndex { @Test public void testAllFilesPresentInForInCharSequenceWithIndex() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/forLoop/forInCharSequenceWithIndex"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -2509,7 +2521,7 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/forLoop/forInIndices") @TestDataPath("$PROJECT_ROOT") - public class ForInIndices extends AbstractBytecodeTextTest { + public class ForInIndices { @Test public void testAllFilesPresentInForInIndices() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/forLoop/forInIndices"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -2573,7 +2585,7 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/forLoop/forInIterableWithIndex") @TestDataPath("$PROJECT_ROOT") - public class ForInIterableWithIndex extends AbstractBytecodeTextTest { + public class ForInIterableWithIndex { @Test public void testAllFilesPresentInForInIterableWithIndex() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/forLoop/forInIterableWithIndex"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -2619,7 +2631,7 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/forLoop/forInProgressionWithIndex") @TestDataPath("$PROJECT_ROOT") - public class ForInProgressionWithIndex extends AbstractBytecodeTextTest { + public class ForInProgressionWithIndex { @Test public void testAllFilesPresentInForInProgressionWithIndex() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/forLoop/forInProgressionWithIndex"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -2701,7 +2713,7 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/forLoop/forInReversed") @TestDataPath("$PROJECT_ROOT") - public class ForInReversed extends AbstractBytecodeTextTest { + public class ForInReversed { @Test public void testAllFilesPresentInForInReversed() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/forLoop/forInReversed"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -2789,7 +2801,7 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/forLoop/forInSequenceWithIndex") @TestDataPath("$PROJECT_ROOT") - public class ForInSequenceWithIndex extends AbstractBytecodeTextTest { + public class ForInSequenceWithIndex { @Test public void testAllFilesPresentInForInSequenceWithIndex() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/forLoop/forInSequenceWithIndex"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -2841,7 +2853,7 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/forLoop/forInUntil") @TestDataPath("$PROJECT_ROOT") - public class ForInUntil extends AbstractBytecodeTextTest { + public class ForInUntil { @Test public void testAllFilesPresentInForInUntil() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/forLoop/forInUntil"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -2905,7 +2917,7 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/forLoop/stepped") @TestDataPath("$PROJECT_ROOT") - public class Stepped extends AbstractBytecodeTextTest { + public class Stepped { @Test public void testAllFilesPresentInStepped() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/forLoop/stepped"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -2915,7 +2927,7 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/forLoop/unsigned") @TestDataPath("$PROJECT_ROOT") - public class Unsigned extends AbstractBytecodeTextTest { + public class Unsigned { @Test public void testAllFilesPresentInUnsigned() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/forLoop/unsigned"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -2980,16 +2992,16 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/hashCode") @TestDataPath("$PROJECT_ROOT") - public class HashCode extends AbstractBytecodeTextTest { + public class HashCode { @Test public void testAllFilesPresentInHashCode() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/hashCode"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } @Test - @TestMetadata("hashCode.kt") - public void testHashCode() throws Exception { - runTest("compiler/testData/codegen/bytecodeText/hashCode/hashCode.kt"); + @TestMetadata("hashCode_1_6.kt") + public void testHashCode_1_6() throws Exception { + runTest("compiler/testData/codegen/bytecodeText/hashCode/hashCode_1_6.kt"); } @Test @@ -3002,7 +3014,7 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/ieee754") @TestDataPath("$PROJECT_ROOT") - public class Ieee754 extends AbstractBytecodeTextTest { + public class Ieee754 { @Test public void testAllFilesPresentInIeee754() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/ieee754"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -3060,7 +3072,7 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/inline") @TestDataPath("$PROJECT_ROOT") - public class Inline extends AbstractBytecodeTextTest { + public class Inline { @Test public void testAllFilesPresentInInline() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/inline"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -3183,7 +3195,7 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/inline/property") @TestDataPath("$PROJECT_ROOT") - public class Property extends AbstractBytecodeTextTest { + public class Property { @Test public void testAllFilesPresentInProperty() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/inline/property"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -3200,7 +3212,7 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/inlineClasses") @TestDataPath("$PROJECT_ROOT") - public class InlineClasses extends AbstractBytecodeTextTest { + public class InlineClasses { @Test public void testAllFilesPresentInInlineClasses() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/inlineClasses"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -3612,7 +3624,7 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/innerClasses") @TestDataPath("$PROJECT_ROOT") - public class InnerClasses extends AbstractBytecodeTextTest { + public class InnerClasses { @Test public void testAllFilesPresentInInnerClasses() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/innerClasses"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -3628,7 +3640,7 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/interfaces") @TestDataPath("$PROJECT_ROOT") - public class Interfaces extends AbstractBytecodeTextTest { + public class Interfaces { @Test @TestMetadata("addedInterfaceBridge.kt") public void testAddedInterfaceBridge() throws Exception { @@ -3668,7 +3680,7 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/intrinsics") @TestDataPath("$PROJECT_ROOT") - public class Intrinsics extends AbstractBytecodeTextTest { + public class Intrinsics { @Test public void testAllFilesPresentInIntrinsics() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/intrinsics"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -3690,7 +3702,7 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/intrinsicsCompare") @TestDataPath("$PROJECT_ROOT") - public class IntrinsicsCompare extends AbstractBytecodeTextTest { + public class IntrinsicsCompare { @Test public void testAllFilesPresentInIntrinsicsCompare() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/intrinsicsCompare"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -3760,7 +3772,7 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/intrinsicsTrim") @TestDataPath("$PROJECT_ROOT") - public class IntrinsicsTrim extends AbstractBytecodeTextTest { + public class IntrinsicsTrim { @Test public void testAllFilesPresentInIntrinsicsTrim() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/intrinsicsTrim"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -3794,12 +3806,18 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/invokedynamic") @TestDataPath("$PROJECT_ROOT") - public class Invokedynamic extends AbstractBytecodeTextTest { + public class Invokedynamic { @Test public void testAllFilesPresentInInvokedynamic() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/invokedynamic"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test + @TestMetadata("lambdas.kt") + public void testLambdas() throws Exception { + runTest("compiler/testData/codegen/bytecodeText/invokedynamic/lambdas.kt"); + } + @Test @TestMetadata("streamApi.kt") public void testStreamApi() throws Exception { @@ -3810,7 +3828,7 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/jvm8") @TestDataPath("$PROJECT_ROOT") - public class Jvm8 extends AbstractBytecodeTextTest { + public class Jvm8 { @Test public void testAllFilesPresentInJvm8() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/jvm8"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -3819,7 +3837,7 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/jvm8/hashCode") @TestDataPath("$PROJECT_ROOT") - public class HashCode extends AbstractBytecodeTextTest { + public class HashCode { @Test public void testAllFilesPresentInHashCode() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/jvm8/hashCode"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -3841,7 +3859,7 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/jvm8/jvmDefault") @TestDataPath("$PROJECT_ROOT") - public class JvmDefault extends AbstractBytecodeTextTest { + public class JvmDefault { @Test public void testAllFilesPresentInJvmDefault() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/jvm8/jvmDefault"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -3850,7 +3868,7 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/jvm8/jvmDefault/allCompatibility") @TestDataPath("$PROJECT_ROOT") - public class AllCompatibility extends AbstractBytecodeTextTest { + public class AllCompatibility { @Test public void testAllFilesPresentInAllCompatibility() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/jvm8/jvmDefault/allCompatibility"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -3890,7 +3908,7 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/jvm8/jvmDefault/compatibility") @TestDataPath("$PROJECT_ROOT") - public class Compatibility extends AbstractBytecodeTextTest { + public class Compatibility { @Test public void testAllFilesPresentInCompatibility() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/jvm8/jvmDefault/compatibility"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -3932,7 +3950,7 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/lazyCodegen") @TestDataPath("$PROJECT_ROOT") - public class LazyCodegen extends AbstractBytecodeTextTest { + public class LazyCodegen { @Test public void testAllFilesPresentInLazyCodegen() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/lazyCodegen"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -3984,7 +4002,7 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/lineNumbers") @TestDataPath("$PROJECT_ROOT") - public class LineNumbers extends AbstractBytecodeTextTest { + public class LineNumbers { @Test public void testAllFilesPresentInLineNumbers() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/lineNumbers"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -4066,7 +4084,7 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/localInitializationLVT") @TestDataPath("$PROJECT_ROOT") - public class LocalInitializationLVT extends AbstractBytecodeTextTest { + public class LocalInitializationLVT { @Test public void testAllFilesPresentInLocalInitializationLVT() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/localInitializationLVT"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -4190,7 +4208,7 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/mangling") @TestDataPath("$PROJECT_ROOT") - public class Mangling extends AbstractBytecodeTextTest { + public class Mangling { @Test public void testAllFilesPresentInMangling() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/mangling"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -4212,7 +4230,7 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/multifileClasses") @TestDataPath("$PROJECT_ROOT") - public class MultifileClasses extends AbstractBytecodeTextTest { + public class MultifileClasses { @Test public void testAllFilesPresentInMultifileClasses() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/multifileClasses"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -4240,7 +4258,7 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/notNullAssertions") @TestDataPath("$PROJECT_ROOT") - public class NotNullAssertions extends AbstractBytecodeTextTest { + public class NotNullAssertions { @Test public void testAllFilesPresentInNotNullAssertions() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/notNullAssertions"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -4316,7 +4334,7 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/nullCheckOptimization") @TestDataPath("$PROJECT_ROOT") - public class NullCheckOptimization extends AbstractBytecodeTextTest { + public class NullCheckOptimization { @Test public void testAllFilesPresentInNullCheckOptimization() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/nullCheckOptimization"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -4394,6 +4412,12 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { runTest("compiler/testData/codegen/bytecodeText/nullCheckOptimization/multipleExclExcl_1_4.kt"); } + @Test + @TestMetadata("noNullCheckAfterCast.kt") + public void testNoNullCheckAfterCast() throws Exception { + runTest("compiler/testData/codegen/bytecodeText/nullCheckOptimization/noNullCheckAfterCast.kt"); + } + @Test @TestMetadata("notNullAsNotNullable.kt") public void testNotNullAsNotNullable() throws Exception { @@ -4457,7 +4481,7 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/nullCheckOptimization/localLateinit") @TestDataPath("$PROJECT_ROOT") - public class LocalLateinit extends AbstractBytecodeTextTest { + public class LocalLateinit { @Test public void testAllFilesPresentInLocalLateinit() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/nullCheckOptimization/localLateinit"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -4486,7 +4510,7 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/oldLanguageVersions") @TestDataPath("$PROJECT_ROOT") - public class OldLanguageVersions extends AbstractBytecodeTextTest { + public class OldLanguageVersions { @Test public void testAllFilesPresentInOldLanguageVersions() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/oldLanguageVersions"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -4501,7 +4525,7 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/oldLanguageVersions/constProperty") @TestDataPath("$PROJECT_ROOT") - public class ConstProperty extends AbstractBytecodeTextTest { + public class ConstProperty { @Test @TestMetadata("accessorsForPrivateConstants.kt") public void testAccessorsForPrivateConstants() throws Exception { @@ -4517,7 +4541,7 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/oldLanguageVersions/ieee754") @TestDataPath("$PROJECT_ROOT") - public class Ieee754 extends AbstractBytecodeTextTest { + public class Ieee754 { @Test public void testAllFilesPresentInIeee754() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/oldLanguageVersions/ieee754"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -4576,7 +4600,7 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/optimizedDelegatedProperties") @TestDataPath("$PROJECT_ROOT") - public class OptimizedDelegatedProperties extends AbstractBytecodeTextTest { + public class OptimizedDelegatedProperties { @Test public void testAllFilesPresentInOptimizedDelegatedProperties() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/optimizedDelegatedProperties"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -4610,7 +4634,7 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/parameterlessMain") @TestDataPath("$PROJECT_ROOT") - public class ParameterlessMain extends AbstractBytecodeTextTest { + public class ParameterlessMain { @Test public void testAllFilesPresentInParameterlessMain() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/parameterlessMain"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -4662,7 +4686,7 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/properties") @TestDataPath("$PROJECT_ROOT") - public class Properties extends AbstractBytecodeTextTest { + public class Properties { @Test public void testAllFilesPresentInProperties() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/properties"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -4683,7 +4707,7 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/properties/lateinit") @TestDataPath("$PROJECT_ROOT") - public class Lateinit extends AbstractBytecodeTextTest { + public class Lateinit { @Test public void testAllFilesPresentInLateinit() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/properties/lateinit"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -4706,7 +4730,7 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/ranges") @TestDataPath("$PROJECT_ROOT") - public class Ranges extends AbstractBytecodeTextTest { + public class Ranges { @Test public void testAllFilesPresentInRanges() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/ranges"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -4788,7 +4812,7 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/sam") @TestDataPath("$PROJECT_ROOT") - public class Sam extends AbstractBytecodeTextTest { + public class Sam { @Test public void testAllFilesPresentInSam() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/sam"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -4834,7 +4858,7 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/statements") @TestDataPath("$PROJECT_ROOT") - public class Statements extends AbstractBytecodeTextTest { + public class Statements { @Test public void testAllFilesPresentInStatements() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/statements"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -4892,7 +4916,7 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/staticFields") @TestDataPath("$PROJECT_ROOT") - public class StaticFields extends AbstractBytecodeTextTest { + public class StaticFields { @Test public void testAllFilesPresentInStaticFields() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/staticFields"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -4914,7 +4938,7 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/storeStackBeforeInline") @TestDataPath("$PROJECT_ROOT") - public class StoreStackBeforeInline extends AbstractBytecodeTextTest { + public class StoreStackBeforeInline { @Test public void testAllFilesPresentInStoreStackBeforeInline() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/storeStackBeforeInline"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -4954,7 +4978,7 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/stringOperations") @TestDataPath("$PROJECT_ROOT") - public class StringOperations extends AbstractBytecodeTextTest { + public class StringOperations { @Test public void testAllFilesPresentInStringOperations() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/stringOperations"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -5156,7 +5180,7 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/toArray") @TestDataPath("$PROJECT_ROOT") - public class ToArray extends AbstractBytecodeTextTest { + public class ToArray { @Test public void testAllFilesPresentInToArray() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/toArray"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -5172,7 +5196,7 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/unsignedTypes") @TestDataPath("$PROJECT_ROOT") - public class UnsignedTypes extends AbstractBytecodeTextTest { + public class UnsignedTypes { @Test public void testAllFilesPresentInUnsignedTypes() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/unsignedTypes"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -5248,7 +5272,7 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/varargs") @TestDataPath("$PROJECT_ROOT") - public class Varargs extends AbstractBytecodeTextTest { + public class Varargs { @Test public void testAllFilesPresentInVarargs() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/varargs"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -5264,7 +5288,7 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/when") @TestDataPath("$PROJECT_ROOT") - public class When extends AbstractBytecodeTextTest { + public class When { @Test public void testAllFilesPresentInWhen() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/when"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -5424,7 +5448,7 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/whenEnumOptimization") @TestDataPath("$PROJECT_ROOT") - public class WhenEnumOptimization extends AbstractBytecodeTextTest { + public class WhenEnumOptimization { @Test public void testAllFilesPresentInWhenEnumOptimization() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/whenEnumOptimization"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); @@ -5518,7 +5542,7 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/whenStringOptimization") @TestDataPath("$PROJECT_ROOT") - public class WhenStringOptimization extends AbstractBytecodeTextTest { + public class WhenStringOptimization { @Test public void testAllFilesPresentInWhenStringOptimization() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/whenStringOptimization"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); diff --git a/compiler/tests-gen/org/jetbrains/kotlin/codegen/CompileKotlinAgainstInlineKotlinTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/CompileKotlinAgainstInlineKotlinTestGenerated.java similarity index 87% rename from compiler/tests-gen/org/jetbrains/kotlin/codegen/CompileKotlinAgainstInlineKotlinTestGenerated.java rename to compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/CompileKotlinAgainstInlineKotlinTestGenerated.java index d9bc3ce43a5..b5a34bce5e4 100644 --- a/compiler/tests-gen/org/jetbrains/kotlin/codegen/CompileKotlinAgainstInlineKotlinTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/CompileKotlinAgainstInlineKotlinTestGenerated.java @@ -3,569 +3,651 @@ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. */ -package org.jetbrains.kotlin.codegen; +package org.jetbrains.kotlin.test.runners.codegen; import com.intellij.testFramework.TestDataPath; -import org.jetbrains.kotlin.test.JUnit3RunnerWithInners; -import org.jetbrains.kotlin.test.KotlinTestUtils; import org.jetbrains.kotlin.test.util.KtTestUtil; import org.jetbrains.kotlin.test.TargetBackend; import org.jetbrains.kotlin.test.TestMetadata; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.Nested; +import org.junit.jupiter.api.Test; import java.io.File; import java.util.regex.Pattern; -/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */ +/** This class is generated by {@link GenerateNewCompilerTests.kt}. DO NOT MODIFY MANUALLY */ @SuppressWarnings("all") @TestMetadata("compiler/testData/codegen/boxInline") @TestDataPath("$PROJECT_ROOT") -@RunWith(JUnit3RunnerWithInners.class) public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + @Test public void testAllFilesPresentInBoxInline() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/anonymousObject") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class AnonymousObject extends AbstractCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class AnonymousObject { + @Test public void testAllFilesPresentInAnonymousObject() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/anonymousObject"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("anonymousObjectInDefault.kt") public void testAnonymousObjectInDefault() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectInDefault.kt"); } + @Test @TestMetadata("anonymousObjectOnCallSite.kt") public void testAnonymousObjectOnCallSite() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnCallSite.kt"); } + @Test @TestMetadata("anonymousObjectOnCallSiteSuperParams.kt") public void testAnonymousObjectOnCallSiteSuperParams() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnCallSiteSuperParams.kt"); } + @Test @TestMetadata("anonymousObjectOnDeclarationSite.kt") public void testAnonymousObjectOnDeclarationSite() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnDeclarationSite.kt"); } + @Test @TestMetadata("anonymousObjectOnDeclarationSiteSuperParams.kt") public void testAnonymousObjectOnDeclarationSiteSuperParams() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnDeclarationSiteSuperParams.kt"); } + @Test @TestMetadata("capturedLambdaInInline.kt") public void testCapturedLambdaInInline() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInline.kt"); } + @Test @TestMetadata("capturedLambdaInInline2.kt") public void testCapturedLambdaInInline2() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInline2.kt"); } + @Test @TestMetadata("capturedLambdaInInline3.kt") public void testCapturedLambdaInInline3() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInline3.kt"); } + @Test @TestMetadata("capturedLambdaInInlineObject.kt") public void testCapturedLambdaInInlineObject() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInlineObject.kt"); } + @Test @TestMetadata("capturedLocalFun.kt") public void testCapturedLocalFun() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/capturedLocalFun.kt"); } + @Test @TestMetadata("capturedLocalFunRef.kt") public void testCapturedLocalFunRef() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/capturedLocalFunRef.kt"); } + @Test @TestMetadata("changingReturnType.kt") public void testChangingReturnType() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/changingReturnType.kt"); } + @Test @TestMetadata("constructOriginalInRegenerated.kt") public void testConstructOriginalInRegenerated() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/constructOriginalInRegenerated.kt"); } + @Test @TestMetadata("constructorVisibility.kt") public void testConstructorVisibility() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/constructorVisibility.kt"); } + @Test @TestMetadata("constructorVisibilityInConstLambda.kt") public void testConstructorVisibilityInConstLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/constructorVisibilityInConstLambda.kt"); } + @Test @TestMetadata("constructorVisibilityInLambda.kt") public void testConstructorVisibilityInLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/constructorVisibilityInLambda.kt"); } + @Test @TestMetadata("defineClass.kt") public void testDefineClass() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/defineClass.kt"); } + @Test @TestMetadata("functionExpression.kt") public void testFunctionExpression() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/functionExpression.kt"); } + @Test @TestMetadata("inlineCallInsideInlineLambda.kt") public void testInlineCallInsideInlineLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/inlineCallInsideInlineLambda.kt"); } + @Test @TestMetadata("kt13133.kt") public void testKt13133() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt13133.kt"); } + @Test @TestMetadata("kt13182.kt") public void testKt13182() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt13182.kt"); } + @Test @TestMetadata("kt13374.kt") public void testKt13374() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt13374.kt"); } + @Test @TestMetadata("kt14011.kt") public void testKt14011() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt14011.kt"); } + @Test @TestMetadata("kt14011_2.kt") public void testKt14011_2() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt14011_2.kt"); } + @Test @TestMetadata("kt14011_3.kt") public void testKt14011_3() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt14011_3.kt"); } + @Test @TestMetadata("kt15751.kt") public void testKt15751() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt15751.kt"); } + @Test @TestMetadata("kt16193.kt") public void testKt16193() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt16193.kt"); } + @Test @TestMetadata("kt17972.kt") public void testKt17972() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt17972.kt"); } + @Test @TestMetadata("kt17972_2.kt") public void testKt17972_2() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt17972_2.kt"); } + @Test @TestMetadata("kt17972_3.kt") public void testKt17972_3() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt17972_3.kt"); } + @Test @TestMetadata("kt17972_4.kt") public void testKt17972_4() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt17972_4.kt"); } + @Test @TestMetadata("kt17972_5.kt") public void testKt17972_5() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt17972_5.kt"); } + @Test @TestMetadata("kt17972_super.kt") public void testKt17972_super() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt17972_super.kt"); } + @Test @TestMetadata("kt17972_super2.kt") public void testKt17972_super2() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt17972_super2.kt"); } + @Test @TestMetadata("kt17972_super3.kt") public void testKt17972_super3() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt17972_super3.kt"); } + @Test @TestMetadata("kt19389.kt") public void testKt19389() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt19389.kt"); } + @Test @TestMetadata("kt19399.kt") public void testKt19399() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt19399.kt"); } + @Test @TestMetadata("kt19434.kt") public void testKt19434() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt19434.kt"); } + @Test @TestMetadata("kt19434_2.kt") public void testKt19434_2() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt19434_2.kt"); } + @Test @TestMetadata("kt19723.kt") public void testKt19723() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt19723.kt"); } + @Test + @TestMetadata("kt29595.kt") + public void testKt29595() throws Exception { + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt29595.kt"); + } + + @Test @TestMetadata("kt34656.kt") public void testKt34656() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt34656.kt"); } + @Test @TestMetadata("kt38197.kt") public void testKt38197() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt38197.kt"); } + @Test @TestMetadata("kt42815.kt") public void testKt42815() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt42815.kt"); } + @Test @TestMetadata("kt42815_delegated.kt") public void testKt42815_delegated() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt42815_delegated.kt"); } + @Test + @TestMetadata("kt6007.kt") + public void testKt6007() throws Exception { + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt6007.kt"); + } + + @Test @TestMetadata("kt6552.kt") public void testKt6552() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt6552.kt"); } + @Test @TestMetadata("kt8133.kt") public void testKt8133() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt8133.kt"); } + @Test @TestMetadata("kt9064.kt") public void testKt9064() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt9064.kt"); } + @Test @TestMetadata("kt9064v2.kt") public void testKt9064v2() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt9064v2.kt"); } + @Test @TestMetadata("kt9591.kt") public void testKt9591() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt9591.kt"); } + @Test @TestMetadata("kt9877.kt") public void testKt9877() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt9877.kt"); } + @Test @TestMetadata("kt9877_2.kt") public void testKt9877_2() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt9877_2.kt"); } + @Test @TestMetadata("objectInLambdaCapturesAnotherObject.kt") public void testObjectInLambdaCapturesAnotherObject() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/objectInLambdaCapturesAnotherObject.kt"); } + @Test @TestMetadata("safeCall.kt") public void testSafeCall() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/safeCall.kt"); } + @Test @TestMetadata("safeCall_2.kt") public void testSafeCall_2() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/safeCall_2.kt"); } + @Test @TestMetadata("sam.kt") public void testSam() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/sam.kt"); } + @Test @TestMetadata("sharedFromCrossinline.kt") public void testSharedFromCrossinline() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/sharedFromCrossinline.kt"); } + @Test @TestMetadata("superConstructorWithObjectParameter.kt") public void testSuperConstructorWithObjectParameter() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/superConstructorWithObjectParameter.kt"); } + @Test @TestMetadata("typeInfo.kt") public void testTypeInfo() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/typeInfo.kt"); } + @Test @TestMetadata("withInlineMethod.kt") public void testWithInlineMethod() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/withInlineMethod.kt"); } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/anonymousObject/enumWhen") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class EnumWhen extends AbstractCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class EnumWhen { + @Test public void testAllFilesPresentInEnumWhen() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/anonymousObject/enumWhen"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("callSite.kt") public void testCallSite() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/enumWhen/callSite.kt"); } + @Test @TestMetadata("declSite.kt") public void testDeclSite() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/enumWhen/declSite.kt"); } + @Test @TestMetadata("declSiteSeveralMappings.kt") public void testDeclSiteSeveralMappings() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/enumWhen/declSiteSeveralMappings.kt"); } + @Test @TestMetadata("declSiteSeveralMappingsDifOrder.kt") public void testDeclSiteSeveralMappingsDifOrder() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/enumWhen/declSiteSeveralMappingsDifOrder.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class ProperRecapturing extends AbstractCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class ProperRecapturing { + @Test public void testAllFilesPresentInProperRecapturing() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("inlineChain.kt") public void testInlineChain() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/inlineChain.kt"); } + @Test @TestMetadata("lambdaChain.kt") public void testLambdaChain() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChain.kt"); } + @Test @TestMetadata("lambdaChainSimple.kt") public void testLambdaChainSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChainSimple.kt"); } + @Test @TestMetadata("lambdaChain_2.kt") public void testLambdaChain_2() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChain_2.kt"); } + @Test @TestMetadata("lambdaChain_3.kt") public void testLambdaChain_3() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChain_3.kt"); } + @Test @TestMetadata("noInlineLambda.kt") public void testNoInlineLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/noInlineLambda.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class ProperRecapturingInClass extends AbstractCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class ProperRecapturingInClass { + @Test public void testAllFilesPresentInProperRecapturingInClass() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("inlineChain.kt") public void testInlineChain() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/inlineChain.kt"); } + @Test @TestMetadata("inlinelambdaChain.kt") public void testInlinelambdaChain() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/inlinelambdaChain.kt"); } + @Test @TestMetadata("lambdaChain.kt") public void testLambdaChain() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChain.kt"); } + @Test @TestMetadata("lambdaChainSimple.kt") public void testLambdaChainSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChainSimple.kt"); } + @Test @TestMetadata("lambdaChainSimple_2.kt") public void testLambdaChainSimple_2() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChainSimple_2.kt"); } + @Test @TestMetadata("lambdaChain_2.kt") public void testLambdaChain_2() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChain_2.kt"); } + @Test @TestMetadata("lambdaChain_3.kt") public void testLambdaChain_3() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChain_3.kt"); } + @Test @TestMetadata("noCapturedThisOnCallSite.kt") public void testNoCapturedThisOnCallSite() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/noCapturedThisOnCallSite.kt"); } + @Test @TestMetadata("noInlineLambda.kt") public void testNoInlineLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/noInlineLambda.kt"); } + @Test @TestMetadata("twoInlineLambda.kt") public void testTwoInlineLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/twoInlineLambda.kt"); } + @Test @TestMetadata("twoInlineLambdaComplex.kt") public void testTwoInlineLambdaComplex() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/twoInlineLambdaComplex.kt"); } + @Test @TestMetadata("twoInlineLambdaComplex_2.kt") public void testTwoInlineLambdaComplex_2() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/twoInlineLambdaComplex_2.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/anonymousObject/sam") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Sam extends AbstractCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Sam { + @Test public void testAllFilesPresentInSam() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/anonymousObject/sam"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("anonymousObjectToSam.kt") public void testAnonymousObjectToSam() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/sam/anonymousObjectToSam.kt"); } + @Test @TestMetadata("kt17091.kt") public void testKt17091() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/sam/kt17091.kt"); } + @Test @TestMetadata("kt21671.kt") public void testKt21671() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/sam/kt21671.kt"); } + @Test @TestMetadata("kt21671_2.kt") public void testKt21671_2() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/sam/kt21671_2.kt"); } + @Test @TestMetadata("kt21671_3.kt") public void testKt21671_3() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/sam/kt21671_3.kt"); } + @Test @TestMetadata("kt22304.kt") public void testKt22304() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/sam/kt22304.kt"); } + @Test @TestMetadata("samOnCallSite.kt") public void testSamOnCallSite() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/sam/samOnCallSite.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class TwoCapturedReceivers extends AbstractCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class TwoCapturedReceivers { + @Test public void testAllFilesPresentInTwoCapturedReceivers() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("kt8668.kt") public void testKt8668() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668.kt"); } + @Test @TestMetadata("kt8668_2.kt") public void testKt8668_2() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668_2.kt"); } + @Test @TestMetadata("kt8668_3.kt") public void testKt8668_3() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668_3.kt"); } + @Test @TestMetadata("twoDifferentDispatchReceivers.kt") public void testTwoDifferentDispatchReceivers() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/twoDifferentDispatchReceivers.kt"); } + @Test @TestMetadata("twoExtensionReceivers.kt") public void testTwoExtensionReceivers() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/twoExtensionReceivers.kt"); @@ -573,465 +655,525 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/argumentOrder") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class ArgumentOrder extends AbstractCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class ArgumentOrder { + @Test public void testAllFilesPresentInArgumentOrder() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/argumentOrder"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("boundFunctionReference.kt") public void testBoundFunctionReference() throws Exception { runTest("compiler/testData/codegen/boxInline/argumentOrder/boundFunctionReference.kt"); } + @Test @TestMetadata("boundFunctionReference2.kt") public void testBoundFunctionReference2() throws Exception { runTest("compiler/testData/codegen/boxInline/argumentOrder/boundFunctionReference2.kt"); } + @Test @TestMetadata("captured.kt") public void testCaptured() throws Exception { runTest("compiler/testData/codegen/boxInline/argumentOrder/captured.kt"); } + @Test @TestMetadata("capturedInExtension.kt") public void testCapturedInExtension() throws Exception { runTest("compiler/testData/codegen/boxInline/argumentOrder/capturedInExtension.kt"); } + @Test @TestMetadata("defaultParametersAndLastVararg.kt") public void testDefaultParametersAndLastVararg() throws Exception { runTest("compiler/testData/codegen/boxInline/argumentOrder/defaultParametersAndLastVararg.kt"); } + @Test @TestMetadata("defaultParametersAndLastVarargWithCorrectOrder.kt") public void testDefaultParametersAndLastVarargWithCorrectOrder() throws Exception { runTest("compiler/testData/codegen/boxInline/argumentOrder/defaultParametersAndLastVarargWithCorrectOrder.kt"); } + @Test @TestMetadata("extension.kt") public void testExtension() throws Exception { runTest("compiler/testData/codegen/boxInline/argumentOrder/extension.kt"); } + @Test @TestMetadata("extensionInClass.kt") public void testExtensionInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/argumentOrder/extensionInClass.kt"); } + @Test @TestMetadata("lambdaMigration.kt") public void testLambdaMigration() throws Exception { runTest("compiler/testData/codegen/boxInline/argumentOrder/lambdaMigration.kt"); } + @Test @TestMetadata("lambdaMigrationInClass.kt") public void testLambdaMigrationInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/argumentOrder/lambdaMigrationInClass.kt"); } + @Test @TestMetadata("simple.kt") public void testSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/argumentOrder/simple.kt"); } + @Test @TestMetadata("simpleInClass.kt") public void testSimpleInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/argumentOrder/simpleInClass.kt"); } + @Test @TestMetadata("varargAndDefaultParameters.kt") public void testVarargAndDefaultParameters() throws Exception { runTest("compiler/testData/codegen/boxInline/argumentOrder/varargAndDefaultParameters.kt"); } + @Test @TestMetadata("varargAndDefaultParametersWithCorrectOrder.kt") public void testVarargAndDefaultParametersWithCorrectOrder() throws Exception { runTest("compiler/testData/codegen/boxInline/argumentOrder/varargAndDefaultParametersWithCorrectOrder.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/arrayConvention") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class ArrayConvention extends AbstractCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class ArrayConvention { + @Test public void testAllFilesPresentInArrayConvention() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/arrayConvention"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("simpleAccess.kt") public void testSimpleAccess() throws Exception { runTest("compiler/testData/codegen/boxInline/arrayConvention/simpleAccess.kt"); } + @Test @TestMetadata("simpleAccessInClass.kt") public void testSimpleAccessInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/arrayConvention/simpleAccessInClass.kt"); } + @Test @TestMetadata("simpleAccessWithDefault.kt") public void testSimpleAccessWithDefault() throws Exception { runTest("compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithDefault.kt"); } + @Test @TestMetadata("simpleAccessWithDefaultInClass.kt") public void testSimpleAccessWithDefaultInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithDefaultInClass.kt"); } + @Test @TestMetadata("simpleAccessWithLambda.kt") public void testSimpleAccessWithLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithLambda.kt"); } + @Test @TestMetadata("simpleAccessWithLambdaInClass.kt") public void testSimpleAccessWithLambdaInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithLambdaInClass.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/assert") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Assert extends AbstractCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Assert { + @Test public void testAllFilesPresentInAssert() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/assert"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("jvmAssertInlineFunctionAssertionsDisabled.kt") public void testJvmAssertInlineFunctionAssertionsDisabled() throws Exception { runTest("compiler/testData/codegen/boxInline/assert/jvmAssertInlineFunctionAssertionsDisabled.kt"); } + @Test @TestMetadata("jvmAssertInlineFunctionAssertionsEnabled.kt") public void testJvmAssertInlineFunctionAssertionsEnabled() throws Exception { runTest("compiler/testData/codegen/boxInline/assert/jvmAssertInlineFunctionAssertionsEnabled.kt"); } + @Test @TestMetadata("jvmAssertInlineLambda.kt") public void testJvmAssertInlineLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/assert/jvmAssertInlineLambda.kt"); } + @Test @TestMetadata("jvmClassInitializer.kt") public void testJvmClassInitializer() throws Exception { runTest("compiler/testData/codegen/boxInline/assert/jvmClassInitializer.kt"); } + @Test @TestMetadata("jvmCompanion.kt") public void testJvmCompanion() throws Exception { runTest("compiler/testData/codegen/boxInline/assert/jvmCompanion.kt"); } + @Test @TestMetadata("jvmCrossinlineLambda.kt") public void testJvmCrossinlineLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/assert/jvmCrossinlineLambda.kt"); } + @Test @TestMetadata("jvmCrossinlineLambda2.kt") public void testJvmCrossinlineLambda2() throws Exception { runTest("compiler/testData/codegen/boxInline/assert/jvmCrossinlineLambda2.kt"); } + @Test @TestMetadata("jvmCrossinlineLambdaDeclarationSite.kt") public void testJvmCrossinlineLambdaDeclarationSite() throws Exception { runTest("compiler/testData/codegen/boxInline/assert/jvmCrossinlineLambdaDeclarationSite.kt"); } + @Test @TestMetadata("jvmCrossinlineLambdaDeclarationSiteOnly.kt") public void testJvmCrossinlineLambdaDeclarationSiteOnly() throws Exception { runTest("compiler/testData/codegen/boxInline/assert/jvmCrossinlineLambdaDeclarationSiteOnly.kt"); } + @Test @TestMetadata("jvmCrossinlineSAMDeclarationSite.kt") public void testJvmCrossinlineSAMDeclarationSite() throws Exception { runTest("compiler/testData/codegen/boxInline/assert/jvmCrossinlineSAMDeclarationSite.kt"); } + @Test @TestMetadata("jvmDoubleInline.kt") public void testJvmDoubleInline() throws Exception { runTest("compiler/testData/codegen/boxInline/assert/jvmDoubleInline.kt"); } + @Test @TestMetadata("jvmInlineUsedAsNoinline.kt") public void testJvmInlineUsedAsNoinline() throws Exception { runTest("compiler/testData/codegen/boxInline/assert/jvmInlineUsedAsNoinline.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/builders") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Builders extends AbstractCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Builders { + @Test public void testAllFilesPresentInBuilders() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/builders"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("builders.kt") public void testBuilders() throws Exception { runTest("compiler/testData/codegen/boxInline/builders/builders.kt"); } + @Test @TestMetadata("buildersAndLambdaCapturing.kt") public void testBuildersAndLambdaCapturing() throws Exception { runTest("compiler/testData/codegen/boxInline/builders/buildersAndLambdaCapturing.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/bytecodePreprocessing") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class BytecodePreprocessing extends AbstractCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class BytecodePreprocessing { + @Test public void testAllFilesPresentInBytecodePreprocessing() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/bytecodePreprocessing"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("apiVersionAtLeast1.kt") public void testApiVersionAtLeast1() throws Exception { runTest("compiler/testData/codegen/boxInline/bytecodePreprocessing/apiVersionAtLeast1.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/callableReference") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class CallableReference extends AbstractCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class CallableReference { + @Test @TestMetadata("adapted.kt") public void testAdapted() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/adapted.kt"); } + @Test public void testAllFilesPresentInCallableReference() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/callableReference"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("classLevel.kt") public void testClassLevel() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/classLevel.kt"); } + @Test @TestMetadata("classLevel2.kt") public void testClassLevel2() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/classLevel2.kt"); } + @Test @TestMetadata("constructor.kt") public void testConstructor() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/constructor.kt"); } + @Test @TestMetadata("innerGenericConstuctor.kt") public void testInnerGenericConstuctor() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/innerGenericConstuctor.kt"); } + @Test @TestMetadata("intrinsic.kt") public void testIntrinsic() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/intrinsic.kt"); } + @Test @TestMetadata("jvmFieldProperty.kt") public void testJvmFieldProperty() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/jvmFieldProperty.kt"); } + @Test @TestMetadata("kt15449.kt") public void testKt15449() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/kt15449.kt"); } + @Test @TestMetadata("kt15751_2.kt") public void testKt15751_2() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/kt15751_2.kt"); } + @Test @TestMetadata("kt16411.kt") public void testKt16411() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/kt16411.kt"); } + @Test @TestMetadata("kt35101.kt") public void testKt35101() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/kt35101.kt"); } + @Test @TestMetadata("propertyIntrinsic.kt") public void testPropertyIntrinsic() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/propertyIntrinsic.kt"); } + @Test @TestMetadata("propertyReference.kt") public void testPropertyReference() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/propertyReference.kt"); } + @Test @TestMetadata("topLevel.kt") public void testTopLevel() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/topLevel.kt"); } + @Test @TestMetadata("topLevelExtension.kt") public void testTopLevelExtension() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/topLevelExtension.kt"); } + @Test @TestMetadata("topLevelProperty.kt") public void testTopLevelProperty() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/topLevelProperty.kt"); } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/callableReference/bound") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Bound extends AbstractCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Bound { + @Test public void testAllFilesPresentInBound() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/callableReference/bound"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("classProperty.kt") public void testClassProperty() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/classProperty.kt"); } + @Test @TestMetadata("emptyLhsFunction.kt") public void testEmptyLhsFunction() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/emptyLhsFunction.kt"); } + @Test @TestMetadata("emptyLhsOnInlineProperty.kt") public void testEmptyLhsOnInlineProperty() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/emptyLhsOnInlineProperty.kt"); } + @Test @TestMetadata("emptyLhsProperty.kt") public void testEmptyLhsProperty() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/emptyLhsProperty.kt"); } + @Test @TestMetadata("expression.kt") public void testExpression() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/expression.kt"); } + @Test @TestMetadata("extensionReceiver.kt") public void testExtensionReceiver() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/extensionReceiver.kt"); } + @Test @TestMetadata("filter.kt") public void testFilter() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/filter.kt"); } + @Test @TestMetadata("inlineValueParameterInsteadOfReceiver.kt") public void testInlineValueParameterInsteadOfReceiver() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/inlineValueParameterInsteadOfReceiver.kt"); } + @Test @TestMetadata("innerGenericConstuctor.kt") public void testInnerGenericConstuctor() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/innerGenericConstuctor.kt"); } + @Test @TestMetadata("intrinsic.kt") public void testIntrinsic() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/intrinsic.kt"); } + @Test @TestMetadata("jvmFieldProperty.kt") public void testJvmFieldProperty() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/jvmFieldProperty.kt"); } + @Test @TestMetadata("kt18728.kt") public void testKt18728() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/kt18728.kt"); } + @Test @TestMetadata("kt18728_2.kt") public void testKt18728_2() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/kt18728_2.kt"); } + @Test @TestMetadata("kt18728_3.kt") public void testKt18728_3() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/kt18728_3.kt"); } + @Test @TestMetadata("kt18728_4.kt") public void testKt18728_4() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/kt18728_4.kt"); } + @Test + @TestMetadata("lambdaOnLhs.kt") + public void testLambdaOnLhs() throws Exception { + runTest("compiler/testData/codegen/boxInline/callableReference/bound/lambdaOnLhs.kt"); + } + + @Test @TestMetadata("map.kt") public void testMap() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/map.kt"); } + @Test @TestMetadata("mixed.kt") public void testMixed() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/mixed.kt"); } + @Test @TestMetadata("objectProperty.kt") public void testObjectProperty() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/objectProperty.kt"); } + @Test @TestMetadata("propertyImportedFromObject.kt") public void testPropertyImportedFromObject() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/propertyImportedFromObject.kt"); } + @Test @TestMetadata("sideEffect.kt") public void testSideEffect() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/sideEffect.kt"); } + @Test @TestMetadata("simple.kt") public void testSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/simple.kt"); } + @Test @TestMetadata("simpleVal.kt") public void testSimpleVal() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/simpleVal.kt"); } + @Test @TestMetadata("simpleVal2.kt") public void testSimpleVal2() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/simpleVal2.kt"); } + @Test @TestMetadata("topLevelExtensionProperty.kt") public void testTopLevelExtensionProperty() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/topLevelExtensionProperty.kt"); @@ -1039,649 +1181,740 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/capture") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Capture extends AbstractCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Capture { + @Test public void testAllFilesPresentInCapture() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/capture"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("captureInlinable.kt") public void testCaptureInlinable() throws Exception { runTest("compiler/testData/codegen/boxInline/capture/captureInlinable.kt"); } + @Test @TestMetadata("captureInlinableAndOther.kt") public void testCaptureInlinableAndOther() throws Exception { runTest("compiler/testData/codegen/boxInline/capture/captureInlinableAndOther.kt"); } + @Test @TestMetadata("captureThisAndReceiver.kt") public void testCaptureThisAndReceiver() throws Exception { runTest("compiler/testData/codegen/boxInline/capture/captureThisAndReceiver.kt"); } + @Test @TestMetadata("generics.kt") public void testGenerics() throws Exception { runTest("compiler/testData/codegen/boxInline/capture/generics.kt"); } + @Test @TestMetadata("simpleCapturingInClass.kt") public void testSimpleCapturingInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/capture/simpleCapturingInClass.kt"); } + @Test @TestMetadata("simpleCapturingInPackage.kt") public void testSimpleCapturingInPackage() throws Exception { runTest("compiler/testData/codegen/boxInline/capture/simpleCapturingInPackage.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/complex") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Complex extends AbstractCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Complex { + @Test public void testAllFilesPresentInComplex() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/complex"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("closureChain.kt") public void testClosureChain() throws Exception { runTest("compiler/testData/codegen/boxInline/complex/closureChain.kt"); } + @Test @TestMetadata("forEachLine.kt") public void testForEachLine() throws Exception { runTest("compiler/testData/codegen/boxInline/complex/forEachLine.kt"); } + @Test @TestMetadata("kt44429.kt") public void testKt44429() throws Exception { runTest("compiler/testData/codegen/boxInline/complex/kt44429.kt"); } + @Test @TestMetadata("lambdaInLambda.kt") public void testLambdaInLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/complex/lambdaInLambda.kt"); } + @Test @TestMetadata("swapAndWith.kt") public void testSwapAndWith() throws Exception { runTest("compiler/testData/codegen/boxInline/complex/swapAndWith.kt"); } + @Test @TestMetadata("swapAndWith2.kt") public void testSwapAndWith2() throws Exception { runTest("compiler/testData/codegen/boxInline/complex/swapAndWith2.kt"); } + @Test @TestMetadata("use.kt") public void testUse() throws Exception { runTest("compiler/testData/codegen/boxInline/complex/use.kt"); } + @Test @TestMetadata("with.kt") public void testWith() throws Exception { runTest("compiler/testData/codegen/boxInline/complex/with.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/complexStack") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class ComplexStack extends AbstractCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class ComplexStack { + @Test public void testAllFilesPresentInComplexStack() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/complexStack"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("asCheck.kt") public void testAsCheck() throws Exception { runTest("compiler/testData/codegen/boxInline/complexStack/asCheck.kt"); } + @Test @TestMetadata("asCheck2.kt") public void testAsCheck2() throws Exception { runTest("compiler/testData/codegen/boxInline/complexStack/asCheck2.kt"); } + @Test @TestMetadata("breakContinueInInlineLambdaArgument.kt") public void testBreakContinueInInlineLambdaArgument() throws Exception { runTest("compiler/testData/codegen/boxInline/complexStack/breakContinueInInlineLambdaArgument.kt"); } + @Test @TestMetadata("simple.kt") public void testSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/complexStack/simple.kt"); } + @Test @TestMetadata("simple2.kt") public void testSimple2() throws Exception { runTest("compiler/testData/codegen/boxInline/complexStack/simple2.kt"); } + @Test @TestMetadata("simple3.kt") public void testSimple3() throws Exception { runTest("compiler/testData/codegen/boxInline/complexStack/simple3.kt"); } + @Test @TestMetadata("simple4.kt") public void testSimple4() throws Exception { runTest("compiler/testData/codegen/boxInline/complexStack/simple4.kt"); } + @Test @TestMetadata("simpleExtension.kt") public void testSimpleExtension() throws Exception { runTest("compiler/testData/codegen/boxInline/complexStack/simpleExtension.kt"); } + @Test @TestMetadata("spillConstructorArgumentsAndInlineLambdaParameter.kt") public void testSpillConstructorArgumentsAndInlineLambdaParameter() throws Exception { runTest("compiler/testData/codegen/boxInline/complexStack/spillConstructorArgumentsAndInlineLambdaParameter.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/contracts") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Contracts extends AbstractCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Contracts { + @Test public void testAllFilesPresentInContracts() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/contracts"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("cfgDependendValInitialization.kt") public void testCfgDependendValInitialization() throws Exception { runTest("compiler/testData/codegen/boxInline/contracts/cfgDependendValInitialization.kt"); } + @Test @TestMetadata("complexInitializer.kt") public void testComplexInitializer() throws Exception { runTest("compiler/testData/codegen/boxInline/contracts/complexInitializer.kt"); } + @Test @TestMetadata("complexInitializerWithStackTransformation.kt") public void testComplexInitializerWithStackTransformation() throws Exception { runTest("compiler/testData/codegen/boxInline/contracts/complexInitializerWithStackTransformation.kt"); } + @Test @TestMetadata("crossinlineCallableReference.kt") public void testCrossinlineCallableReference() throws Exception { runTest("compiler/testData/codegen/boxInline/contracts/crossinlineCallableReference.kt"); } + @Test @TestMetadata("definiteLongValInitialization.kt") public void testDefiniteLongValInitialization() throws Exception { runTest("compiler/testData/codegen/boxInline/contracts/definiteLongValInitialization.kt"); } + @Test @TestMetadata("definiteNestedValInitialization.kt") public void testDefiniteNestedValInitialization() throws Exception { runTest("compiler/testData/codegen/boxInline/contracts/definiteNestedValInitialization.kt"); } + @Test @TestMetadata("definiteValInitInInitializer.kt") public void testDefiniteValInitInInitializer() throws Exception { runTest("compiler/testData/codegen/boxInline/contracts/definiteValInitInInitializer.kt"); } + @Test @TestMetadata("definiteValInitialization.kt") public void testDefiniteValInitialization() throws Exception { runTest("compiler/testData/codegen/boxInline/contracts/definiteValInitialization.kt"); } + @Test @TestMetadata("exactlyOnceCrossinline.kt") public void testExactlyOnceCrossinline() throws Exception { runTest("compiler/testData/codegen/boxInline/contracts/exactlyOnceCrossinline.kt"); } + @Test @TestMetadata("exactlyOnceCrossinline2.kt") public void testExactlyOnceCrossinline2() throws Exception { runTest("compiler/testData/codegen/boxInline/contracts/exactlyOnceCrossinline2.kt"); } + @Test @TestMetadata("exactlyOnceNoinline.kt") public void testExactlyOnceNoinline() throws Exception { runTest("compiler/testData/codegen/boxInline/contracts/exactlyOnceNoinline.kt"); } + @Test @TestMetadata("nonLocalReturn.kt") public void testNonLocalReturn() throws Exception { runTest("compiler/testData/codegen/boxInline/contracts/nonLocalReturn.kt"); } + @Test @TestMetadata("nonLocalReturnWithCycle.kt") public void testNonLocalReturnWithCycle() throws Exception { runTest("compiler/testData/codegen/boxInline/contracts/nonLocalReturnWithCycle.kt"); } + @Test @TestMetadata("propertyInitialization.kt") public void testPropertyInitialization() throws Exception { runTest("compiler/testData/codegen/boxInline/contracts/propertyInitialization.kt"); } + @Test @TestMetadata("valInitializationAndUsageInNestedLambda.kt") public void testValInitializationAndUsageInNestedLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/contracts/valInitializationAndUsageInNestedLambda.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/defaultValues") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class DefaultValues extends AbstractCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class DefaultValues { + @Test @TestMetadata("33Parameters.kt") public void test33Parameters() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/33Parameters.kt"); } + @Test @TestMetadata("33ParametersInConstructor.kt") public void test33ParametersInConstructor() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/33ParametersInConstructor.kt"); } + @Test public void testAllFilesPresentInDefaultValues() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/defaultValues"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("defaultInExtension.kt") public void testDefaultInExtension() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/defaultInExtension.kt"); } + @Test @TestMetadata("defaultMethod.kt") public void testDefaultMethod() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/defaultMethod.kt"); } + @Test @TestMetadata("defaultMethodInClass.kt") public void testDefaultMethodInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/defaultMethodInClass.kt"); } + @Test @TestMetadata("defaultParamRemapping.kt") public void testDefaultParamRemapping() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/defaultParamRemapping.kt"); } + @Test @TestMetadata("inlineInDefaultParameter.kt") public void testInlineInDefaultParameter() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/inlineInDefaultParameter.kt"); } + @Test @TestMetadata("inlineLambdaInNoInlineDefault.kt") public void testInlineLambdaInNoInlineDefault() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/inlineLambdaInNoInlineDefault.kt"); } + @Test @TestMetadata("kt11479.kt") public void testKt11479() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/kt11479.kt"); } + @Test @TestMetadata("kt11479InlinedDefaultParameter.kt") public void testKt11479InlinedDefaultParameter() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/kt11479InlinedDefaultParameter.kt"); } + @Test @TestMetadata("kt14564.kt") public void testKt14564() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/kt14564.kt"); } + @Test @TestMetadata("kt14564_2.kt") public void testKt14564_2() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/kt14564_2.kt"); } + @Test @TestMetadata("kt16496.kt") public void testKt16496() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/kt16496.kt"); } + @Test @TestMetadata("kt18689.kt") public void testKt18689() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/kt18689.kt"); } + @Test @TestMetadata("kt18689_2.kt") public void testKt18689_2() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/kt18689_2.kt"); } + @Test @TestMetadata("kt18689_3.kt") public void testKt18689_3() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/kt18689_3.kt"); } + @Test @TestMetadata("kt18689_4.kt") public void testKt18689_4() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/kt18689_4.kt"); } + @Test @TestMetadata("kt5685.kt") public void testKt5685() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/kt5685.kt"); } + @Test @TestMetadata("simpleDefaultMethod.kt") public void testSimpleDefaultMethod() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/simpleDefaultMethod.kt"); } + @Test @TestMetadata("varArgNoInline.kt") public void testVarArgNoInline() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/varArgNoInline.kt"); } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class LambdaInlining extends AbstractCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class LambdaInlining { + @Test public void testAllFilesPresentInLambdaInlining() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("checkLambdaClassIsPresent.kt") public void testCheckLambdaClassIsPresent() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/checkLambdaClassIsPresent.kt"); } + @Test @TestMetadata("checkLambdaClassesArePresent.kt") public void testCheckLambdaClassesArePresent() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/checkLambdaClassesArePresent.kt"); } + @Test @TestMetadata("checkObjectClassIsPresent.kt") public void testCheckObjectClassIsPresent() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/checkObjectClassIsPresent.kt"); } + @Test @TestMetadata("checkStaticLambdaClassIsPresent.kt") public void testCheckStaticLambdaClassIsPresent() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/checkStaticLambdaClassIsPresent.kt"); } + @Test @TestMetadata("checkStaticLambdaClassesArePresent.kt") public void testCheckStaticLambdaClassesArePresent() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/checkStaticLambdaClassesArePresent.kt"); } + @Test @TestMetadata("checkStaticObjectClassIsPresent.kt") public void testCheckStaticObjectClassIsPresent() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/checkStaticObjectClassIsPresent.kt"); } + @Test @TestMetadata("defaultCallInDefaultLambda.kt") public void testDefaultCallInDefaultLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/defaultCallInDefaultLambda.kt"); } + @Test @TestMetadata("defaultLambdaInNoInline.kt") public void testDefaultLambdaInNoInline() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/defaultLambdaInNoInline.kt"); } + @Test @TestMetadata("differentInvokeSignature.kt") public void testDifferentInvokeSignature() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/differentInvokeSignature.kt"); } + @Test @TestMetadata("genericLambda.kt") public void testGenericLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/genericLambda.kt"); } + @Test @TestMetadata("instanceCapturedInClass.kt") public void testInstanceCapturedInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/instanceCapturedInClass.kt"); } + @Test @TestMetadata("instanceCapturedInInterface.kt") public void testInstanceCapturedInInterface() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/instanceCapturedInInterface.kt"); } + @Test @TestMetadata("jvmStaticDefault.kt") public void testJvmStaticDefault() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/jvmStaticDefault.kt"); } + @Test @TestMetadata("kt21827.kt") public void testKt21827() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/kt21827.kt"); } + @Test @TestMetadata("kt21946.kt") public void testKt21946() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/kt21946.kt"); } + @Test @TestMetadata("kt24477.kt") public void testKt24477() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/kt24477.kt"); } + @Test @TestMetadata("kt25106.kt") public void testKt25106() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/kt25106.kt"); } + @Test @TestMetadata("kt26636.kt") public void testKt26636() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/kt26636.kt"); } + @Test @TestMetadata("noInline.kt") public void testNoInline() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/noInline.kt"); } + @Test @TestMetadata("nonDefaultInlineInNoInline.kt") public void testNonDefaultInlineInNoInline() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/nonDefaultInlineInNoInline.kt"); } + @Test @TestMetadata("receiverClash.kt") public void testReceiverClash() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/receiverClash.kt"); } + @Test @TestMetadata("receiverClash2.kt") public void testReceiverClash2() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/receiverClash2.kt"); } + @Test @TestMetadata("receiverClashInClass.kt") public void testReceiverClashInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/receiverClashInClass.kt"); } + @Test @TestMetadata("receiverClashInClass2.kt") public void testReceiverClashInClass2() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/receiverClashInClass2.kt"); } + @Test @TestMetadata("simple.kt") public void testSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simple.kt"); } + @Test @TestMetadata("simpleErased.kt") public void testSimpleErased() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simpleErased.kt"); } + @Test @TestMetadata("simpleErasedStaticInstance.kt") public void testSimpleErasedStaticInstance() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simpleErasedStaticInstance.kt"); } + @Test @TestMetadata("simpleExtension.kt") public void testSimpleExtension() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simpleExtension.kt"); } + @Test @TestMetadata("simpleGeneric.kt") public void testSimpleGeneric() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simpleGeneric.kt"); } + @Test @TestMetadata("simpleStaticInstance.kt") public void testSimpleStaticInstance() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simpleStaticInstance.kt"); } + @Test @TestMetadata("thisClash.kt") public void testThisClash() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/thisClash.kt"); } + @Test @TestMetadata("thisClashInClass.kt") public void testThisClashInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/thisClashInClass.kt"); } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class CallableReferences extends AbstractCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class CallableReferences { + @Test public void testAllFilesPresentInCallableReferences() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("boundFunctionReference.kt") public void testBoundFunctionReference() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundFunctionReference.kt"); } + @Test @TestMetadata("boundFunctionReferenceOnInt.kt") public void testBoundFunctionReferenceOnInt() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundFunctionReferenceOnInt.kt"); } + @Test @TestMetadata("boundFunctionReferenceOnLong.kt") public void testBoundFunctionReferenceOnLong() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundFunctionReferenceOnLong.kt"); } + @Test @TestMetadata("boundPropertyReference.kt") public void testBoundPropertyReference() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundPropertyReference.kt"); } + @Test @TestMetadata("boundPropertyReferenceOnInt.kt") public void testBoundPropertyReferenceOnInt() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundPropertyReferenceOnInt.kt"); } + @Test @TestMetadata("boundPropertyReferenceOnLong.kt") public void testBoundPropertyReferenceOnLong() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundPropertyReferenceOnLong.kt"); } + @Test @TestMetadata("constuctorReference.kt") public void testConstuctorReference() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/constuctorReference.kt"); } + @Test @TestMetadata("differentInvokeSignature.kt") public void testDifferentInvokeSignature() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/differentInvokeSignature.kt"); } + @Test @TestMetadata("differentInvokeSignature2.kt") public void testDifferentInvokeSignature2() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/differentInvokeSignature2.kt"); } + @Test @TestMetadata("functionImportedFromObject.kt") public void testFunctionImportedFromObject() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/functionImportedFromObject.kt"); } + @Test @TestMetadata("functionReference.kt") public void testFunctionReference() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/functionReference.kt"); } + @Test @TestMetadata("functionReferenceFromClass.kt") public void testFunctionReferenceFromClass() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/functionReferenceFromClass.kt"); } + @Test @TestMetadata("functionReferenceFromObject.kt") public void testFunctionReferenceFromObject() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/functionReferenceFromObject.kt"); } + @Test @TestMetadata("innerClassConstuctorReference.kt") public void testInnerClassConstuctorReference() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/innerClassConstuctorReference.kt"); } + @Test @TestMetadata("mutableBoundPropertyReferenceFromClass.kt") public void testMutableBoundPropertyReferenceFromClass() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/mutableBoundPropertyReferenceFromClass.kt"); } + @Test @TestMetadata("mutablePropertyReferenceFromClass.kt") public void testMutablePropertyReferenceFromClass() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/mutablePropertyReferenceFromClass.kt"); } + @Test @TestMetadata("privateFunctionReference.kt") public void testPrivateFunctionReference() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/privateFunctionReference.kt"); } + @Test @TestMetadata("privatePropertyReference.kt") public void testPrivatePropertyReference() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/privatePropertyReference.kt"); } + @Test @TestMetadata("propertyImportedFromObject.kt") public void testPropertyImportedFromObject() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/propertyImportedFromObject.kt"); } + @Test @TestMetadata("propertyReference.kt") public void testPropertyReference() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/propertyReference.kt"); } + @Test @TestMetadata("propertyReferenceFromClass.kt") public void testPropertyReferenceFromClass() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/propertyReferenceFromClass.kt"); } + @Test @TestMetadata("propertyReferenceFromObject.kt") public void testPropertyReferenceFromObject() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/propertyReferenceFromObject.kt"); @@ -1689,48 +1922,52 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/defaultValues/maskElimination") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class MaskElimination extends AbstractCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class MaskElimination { + @Test @TestMetadata("32Parameters.kt") public void test32Parameters() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/maskElimination/32Parameters.kt"); } + @Test @TestMetadata("33Parameters.kt") public void test33Parameters() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/maskElimination/33Parameters.kt"); } + @Test public void testAllFilesPresentInMaskElimination() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/defaultValues/maskElimination"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("kt18792.kt") public void testKt18792() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/maskElimination/kt18792.kt"); } + @Test @TestMetadata("kt19679.kt") public void testKt19679() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/maskElimination/kt19679.kt"); } + @Test @TestMetadata("kt19679_2.kt") public void testKt19679_2() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/maskElimination/kt19679_2.kt"); } + @Test @TestMetadata("kt19679_3.kt") public void testKt19679_3() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/maskElimination/kt19679_3.kt"); } + @Test @TestMetadata("simple.kt") public void testSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/maskElimination/simple.kt"); @@ -1738,375 +1975,400 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/delegatedProperty") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class DelegatedProperty extends AbstractCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class DelegatedProperty { + @Test public void testAllFilesPresentInDelegatedProperty() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/delegatedProperty"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("kt16864.kt") public void testKt16864() throws Exception { runTest("compiler/testData/codegen/boxInline/delegatedProperty/kt16864.kt"); } + @Test @TestMetadata("local.kt") public void testLocal() throws Exception { runTest("compiler/testData/codegen/boxInline/delegatedProperty/local.kt"); } + @Test @TestMetadata("localDeclaredInLambda.kt") public void testLocalDeclaredInLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/delegatedProperty/localDeclaredInLambda.kt"); } + @Test @TestMetadata("localInAnonymousObject.kt") public void testLocalInAnonymousObject() throws Exception { runTest("compiler/testData/codegen/boxInline/delegatedProperty/localInAnonymousObject.kt"); } + @Test @TestMetadata("localInLambda.kt") public void testLocalInLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/delegatedProperty/localInLambda.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/enclosingInfo") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class EnclosingInfo extends AbstractCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class EnclosingInfo { + @Test public void testAllFilesPresentInEnclosingInfo() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/enclosingInfo"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("anonymousInLambda.kt") public void testAnonymousInLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/enclosingInfo/anonymousInLambda.kt"); } + @Test @TestMetadata("inlineChain.kt") public void testInlineChain() throws Exception { runTest("compiler/testData/codegen/boxInline/enclosingInfo/inlineChain.kt"); } + @Test @TestMetadata("inlineChain2.kt") public void testInlineChain2() throws Exception { runTest("compiler/testData/codegen/boxInline/enclosingInfo/inlineChain2.kt"); } + @Test @TestMetadata("objectInInlineFun.kt") public void testObjectInInlineFun() throws Exception { runTest("compiler/testData/codegen/boxInline/enclosingInfo/objectInInlineFun.kt"); } + @Test @TestMetadata("transformedConstructor.kt") public void testTransformedConstructor() throws Exception { runTest("compiler/testData/codegen/boxInline/enclosingInfo/transformedConstructor.kt"); } + @Test @TestMetadata("transformedConstructorWithAdditionalObject.kt") public void testTransformedConstructorWithAdditionalObject() throws Exception { runTest("compiler/testData/codegen/boxInline/enclosingInfo/transformedConstructorWithAdditionalObject.kt"); } + @Test @TestMetadata("transformedConstructorWithNestedInline.kt") public void testTransformedConstructorWithNestedInline() throws Exception { runTest("compiler/testData/codegen/boxInline/enclosingInfo/transformedConstructorWithNestedInline.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/enum") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Enum extends AbstractCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Enum { + @Test public void testAllFilesPresentInEnum() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/enum"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("kt10569.kt") public void testKt10569() throws Exception { runTest("compiler/testData/codegen/boxInline/enum/kt10569.kt"); } + @Test @TestMetadata("kt18254.kt") public void testKt18254() throws Exception { runTest("compiler/testData/codegen/boxInline/enum/kt18254.kt"); } + @Test @TestMetadata("valueOf.kt") public void testValueOf() throws Exception { runTest("compiler/testData/codegen/boxInline/enum/valueOf.kt"); } + @Test @TestMetadata("valueOfCapturedType.kt") public void testValueOfCapturedType() throws Exception { runTest("compiler/testData/codegen/boxInline/enum/valueOfCapturedType.kt"); } + @Test @TestMetadata("valueOfChain.kt") public void testValueOfChain() throws Exception { runTest("compiler/testData/codegen/boxInline/enum/valueOfChain.kt"); } + @Test @TestMetadata("valueOfChainCapturedType.kt") public void testValueOfChainCapturedType() throws Exception { runTest("compiler/testData/codegen/boxInline/enum/valueOfChainCapturedType.kt"); } + @Test @TestMetadata("valueOfNonReified.kt") public void testValueOfNonReified() throws Exception { runTest("compiler/testData/codegen/boxInline/enum/valueOfNonReified.kt"); } + @Test @TestMetadata("values.kt") public void testValues() throws Exception { runTest("compiler/testData/codegen/boxInline/enum/values.kt"); } + @Test @TestMetadata("valuesAsArray.kt") public void testValuesAsArray() throws Exception { runTest("compiler/testData/codegen/boxInline/enum/valuesAsArray.kt"); } + @Test @TestMetadata("valuesCapturedType.kt") public void testValuesCapturedType() throws Exception { runTest("compiler/testData/codegen/boxInline/enum/valuesCapturedType.kt"); } + @Test @TestMetadata("valuesChain.kt") public void testValuesChain() throws Exception { runTest("compiler/testData/codegen/boxInline/enum/valuesChain.kt"); } + @Test @TestMetadata("valuesChainCapturedType.kt") public void testValuesChainCapturedType() throws Exception { runTest("compiler/testData/codegen/boxInline/enum/valuesChainCapturedType.kt"); } + @Test @TestMetadata("valuesNonReified.kt") public void testValuesNonReified() throws Exception { runTest("compiler/testData/codegen/boxInline/enum/valuesNonReified.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/functionExpression") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class FunctionExpression extends AbstractCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class FunctionExpression { + @Test public void testAllFilesPresentInFunctionExpression() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/functionExpression"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("extension.kt") public void testExtension() throws Exception { runTest("compiler/testData/codegen/boxInline/functionExpression/extension.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/inlineClasses") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class InlineClasses extends AbstractCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class InlineClasses { + @Test public void testAllFilesPresentInInlineClasses() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/inlineClasses"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("inlineClassWithInlineValReturningInlineClass.kt") public void testInlineClassWithInlineValReturningInlineClass() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/inlineClassWithInlineValReturningInlineClass.kt"); } + @Test @TestMetadata("inlineFunctionInsideInlineClassesBox.kt") public void testInlineFunctionInsideInlineClassesBox() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/inlineFunctionInsideInlineClassesBox.kt"); } + @Test @TestMetadata("noReturnTypeManglingFun.kt") public void testNoReturnTypeManglingFun() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/noReturnTypeManglingFun.kt"); } + @Test @TestMetadata("noReturnTypeManglingFunJvmName.kt") public void testNoReturnTypeManglingFunJvmName() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/noReturnTypeManglingFunJvmName.kt"); } + @Test @TestMetadata("noReturnTypeManglingVal.kt") public void testNoReturnTypeManglingVal() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/noReturnTypeManglingVal.kt"); } + @Test @TestMetadata("withReturnTypeManglingFun.kt") public void testWithReturnTypeManglingFun() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/withReturnTypeManglingFun.kt"); } + @Test @TestMetadata("withReturnTypeManglingFunJvmName.kt") public void testWithReturnTypeManglingFunJvmName() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/withReturnTypeManglingFunJvmName.kt"); } + @Test @TestMetadata("withReturnTypeManglingVal.kt") public void testWithReturnTypeManglingVal() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/withReturnTypeManglingVal.kt"); } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class UnboxGenericParameter extends AbstractCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class UnboxGenericParameter { + @Test public void testAllFilesPresentInUnboxGenericParameter() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class FunInterface extends AbstractCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class FunInterface { + @Test public void testAllFilesPresentInFunInterface() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("any.kt") public void testAny() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/any.kt"); } + @Test @TestMetadata("anyN.kt") public void testAnyN() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/anyN.kt"); } + @Test @TestMetadata("iface.kt") public void testIface() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/iface.kt"); } + @Test @TestMetadata("ifaceChild.kt") public void testIfaceChild() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/ifaceChild.kt"); } + @Test @TestMetadata("primitive.kt") public void testPrimitive() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/primitive.kt"); } + @Test @TestMetadata("string.kt") public void testString() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/string.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Lambda extends AbstractCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Lambda { + @Test public void testAllFilesPresentInLambda() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("any.kt") public void testAny() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/any.kt"); } + @Test @TestMetadata("anyN.kt") public void testAnyN() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/anyN.kt"); } + @Test @TestMetadata("iface.kt") public void testIface() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/iface.kt"); } + @Test @TestMetadata("ifaceChild.kt") public void testIfaceChild() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/ifaceChild.kt"); } + @Test @TestMetadata("primitive.kt") public void testPrimitive() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/primitive.kt"); } + @Test @TestMetadata("string.kt") public void testString() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/string.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class ObjectLiteral extends AbstractCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class ObjectLiteral { + @Test public void testAllFilesPresentInObjectLiteral() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("any.kt") public void testAny() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/any.kt"); } + @Test @TestMetadata("anyN.kt") public void testAnyN() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/anyN.kt"); } + @Test @TestMetadata("iface.kt") public void testIface() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/iface.kt"); } + @Test @TestMetadata("ifaceChild.kt") public void testIfaceChild() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/ifaceChild.kt"); } + @Test @TestMetadata("primitive.kt") public void testPrimitive() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/primitive.kt"); } + @Test @TestMetadata("string.kt") public void testString() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/string.kt"); @@ -2115,239 +2377,309 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/innerClasses") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class InnerClasses extends AbstractCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class InnerClasses { + @Test public void testAllFilesPresentInInnerClasses() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/innerClasses"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("captureThisAndOuter.kt") public void testCaptureThisAndOuter() throws Exception { runTest("compiler/testData/codegen/boxInline/innerClasses/captureThisAndOuter.kt"); } + @Test @TestMetadata("innerLambda.kt") public void testInnerLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/innerClasses/innerLambda.kt"); } + @Test @TestMetadata("kt10259.kt") public void testKt10259() throws Exception { runTest("compiler/testData/codegen/boxInline/innerClasses/kt10259.kt"); } } - @TestMetadata("compiler/testData/codegen/boxInline/jvmName") + @Nested + @TestMetadata("compiler/testData/codegen/boxInline/invokedynamic") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class JvmName extends AbstractCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); + public class Invokedynamic { + @Test + public void testAllFilesPresentInInvokedynamic() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/invokedynamic"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Nested + @TestMetadata("compiler/testData/codegen/boxInline/invokedynamic/lambdas") + @TestDataPath("$PROJECT_ROOT") + public class Lambdas { + @Test + public void testAllFilesPresentInLambdas() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/invokedynamic/lambdas"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); + } + + @Test + @TestMetadata("crossinlineLambda1.kt") + public void testCrossinlineLambda1() throws Exception { + runTest("compiler/testData/codegen/boxInline/invokedynamic/lambdas/crossinlineLambda1.kt"); + } + + @Test + @TestMetadata("crossinlineLambda2.kt") + public void testCrossinlineLambda2() throws Exception { + runTest("compiler/testData/codegen/boxInline/invokedynamic/lambdas/crossinlineLambda2.kt"); + } + + @Test + @TestMetadata("inlineFunInDifferentPackage.kt") + public void testInlineFunInDifferentPackage() throws Exception { + runTest("compiler/testData/codegen/boxInline/invokedynamic/lambdas/inlineFunInDifferentPackage.kt"); + } + + @Test + @TestMetadata("inlineLambda1.kt") + public void testInlineLambda1() throws Exception { + runTest("compiler/testData/codegen/boxInline/invokedynamic/lambdas/inlineLambda1.kt"); + } + } + + @Nested + @TestMetadata("compiler/testData/codegen/boxInline/invokedynamic/sam") + @TestDataPath("$PROJECT_ROOT") + public class Sam { + @Test + public void testAllFilesPresentInSam() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/invokedynamic/sam"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); + } + + @Test + @TestMetadata("crossinlineLambda1.kt") + public void testCrossinlineLambda1() throws Exception { + runTest("compiler/testData/codegen/boxInline/invokedynamic/sam/crossinlineLambda1.kt"); + } + + @Test + @TestMetadata("crossinlineLambda2.kt") + public void testCrossinlineLambda2() throws Exception { + runTest("compiler/testData/codegen/boxInline/invokedynamic/sam/crossinlineLambda2.kt"); + } + + @Test + @TestMetadata("inlineFunInDifferentPackage.kt") + public void testInlineFunInDifferentPackage() throws Exception { + runTest("compiler/testData/codegen/boxInline/invokedynamic/sam/inlineFunInDifferentPackage.kt"); + } + + @Test + @TestMetadata("inlineLambda1.kt") + public void testInlineLambda1() throws Exception { + runTest("compiler/testData/codegen/boxInline/invokedynamic/sam/inlineLambda1.kt"); + } + } + } + + @Nested + @TestMetadata("compiler/testData/codegen/boxInline/jvmName") + @TestDataPath("$PROJECT_ROOT") + public class JvmName { + @Test public void testAllFilesPresentInJvmName() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/jvmName"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("simple.kt") public void testSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/jvmName/simple.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/jvmPackageName") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class JvmPackageName extends AbstractCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class JvmPackageName { + @Test public void testAllFilesPresentInJvmPackageName() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/jvmPackageName"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("simple.kt") public void testSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/jvmPackageName/simple.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/lambdaClassClash") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class LambdaClassClash extends AbstractCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class LambdaClassClash { + @Test public void testAllFilesPresentInLambdaClassClash() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/lambdaClassClash"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("lambdaClassClash.kt") public void testLambdaClassClash() throws Exception { runTest("compiler/testData/codegen/boxInline/lambdaClassClash/lambdaClassClash.kt"); } + @Test @TestMetadata("noInlineLambdaX2.kt") public void testNoInlineLambdaX2() throws Exception { runTest("compiler/testData/codegen/boxInline/lambdaClassClash/noInlineLambdaX2.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/lambdaTransformation") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class LambdaTransformation extends AbstractCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class LambdaTransformation { + @Test public void testAllFilesPresentInLambdaTransformation() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/lambdaTransformation"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("lambdaCloning.kt") public void testLambdaCloning() throws Exception { runTest("compiler/testData/codegen/boxInline/lambdaTransformation/lambdaCloning.kt"); } + @Test @TestMetadata("lambdaInLambda2.kt") public void testLambdaInLambda2() throws Exception { runTest("compiler/testData/codegen/boxInline/lambdaTransformation/lambdaInLambda2.kt"); } + @Test @TestMetadata("lambdaInLambdaNoInline.kt") public void testLambdaInLambdaNoInline() throws Exception { runTest("compiler/testData/codegen/boxInline/lambdaTransformation/lambdaInLambdaNoInline.kt"); } + @Test @TestMetadata("regeneratedLambdaName.kt") public void testRegeneratedLambdaName() throws Exception { runTest("compiler/testData/codegen/boxInline/lambdaTransformation/regeneratedLambdaName.kt"); } + @Test @TestMetadata("regeneratedLambdaName2.kt") public void testRegeneratedLambdaName2() throws Exception { runTest("compiler/testData/codegen/boxInline/lambdaTransformation/regeneratedLambdaName2.kt"); } + @Test @TestMetadata("sameCaptured.kt") public void testSameCaptured() throws Exception { runTest("compiler/testData/codegen/boxInline/lambdaTransformation/sameCaptured.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/localFunInLambda") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class LocalFunInLambda extends AbstractCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class LocalFunInLambda { + @Test public void testAllFilesPresentInLocalFunInLambda() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/localFunInLambda"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("defaultParam.kt") public void testDefaultParam() throws Exception { runTest("compiler/testData/codegen/boxInline/localFunInLambda/defaultParam.kt"); } + @Test @TestMetadata("lambdaInLambdaCapturesAnotherFun.kt") public void testLambdaInLambdaCapturesAnotherFun() throws Exception { runTest("compiler/testData/codegen/boxInline/localFunInLambda/lambdaInLambdaCapturesAnotherFun.kt"); } + @Test @TestMetadata("localFunInLambda.kt") public void testLocalFunInLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/localFunInLambda/localFunInLambda.kt"); } + @Test @TestMetadata("localFunInLambdaCapturesAnotherFun.kt") public void testLocalFunInLambdaCapturesAnotherFun() throws Exception { runTest("compiler/testData/codegen/boxInline/localFunInLambda/localFunInLambdaCapturesAnotherFun.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/multiModule") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class MultiModule extends AbstractCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class MultiModule { + @Test public void testAllFilesPresentInMultiModule() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/multiModule"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("tryCatchWithRecursiveInline.kt") public void testTryCatchWithRecursiveInline() throws Exception { runTest("compiler/testData/codegen/boxInline/multiModule/tryCatchWithRecursiveInline.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/multifileClasses") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class MultifileClasses extends AbstractCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class MultifileClasses { + @Test public void testAllFilesPresentInMultifileClasses() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/multifileClasses"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("defaultArguments.kt") public void testDefaultArguments() throws Exception { runTest("compiler/testData/codegen/boxInline/multifileClasses/defaultArguments.kt"); } + @Test @TestMetadata("inlineFromOptimizedMultifileClass.kt") public void testInlineFromOptimizedMultifileClass() throws Exception { runTest("compiler/testData/codegen/boxInline/multifileClasses/inlineFromOptimizedMultifileClass.kt"); } + @Test @TestMetadata("inlineFromOtherPackage.kt") public void testInlineFromOtherPackage() throws Exception { runTest("compiler/testData/codegen/boxInline/multifileClasses/inlineFromOtherPackage.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/multiplatform") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Multiplatform extends AbstractCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Multiplatform { + @Test public void testAllFilesPresentInMultiplatform() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/multiplatform"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/multiplatform/defaultArguments") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class DefaultArguments extends AbstractCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class DefaultArguments { + @Test public void testAllFilesPresentInDefaultArguments() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/multiplatform/defaultArguments"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("receiversAndParametersInLambda.kt") public void testReceiversAndParametersInLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/multiplatform/defaultArguments/receiversAndParametersInLambda.kt"); @@ -2355,535 +2687,640 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/noInline") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class NoInline extends AbstractCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class NoInline { + @Test public void testAllFilesPresentInNoInline() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/noInline"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("extensionReceiver.kt") public void testExtensionReceiver() throws Exception { runTest("compiler/testData/codegen/boxInline/noInline/extensionReceiver.kt"); } + @Test @TestMetadata("lambdaAsGeneric.kt") public void testLambdaAsGeneric() throws Exception { runTest("compiler/testData/codegen/boxInline/noInline/lambdaAsGeneric.kt"); } + @Test @TestMetadata("lambdaAsNonFunction.kt") public void testLambdaAsNonFunction() throws Exception { runTest("compiler/testData/codegen/boxInline/noInline/lambdaAsNonFunction.kt"); } + @Test @TestMetadata("noInline.kt") public void testNoInline() throws Exception { runTest("compiler/testData/codegen/boxInline/noInline/noInline.kt"); } + @Test @TestMetadata("noInlineLambdaChain.kt") public void testNoInlineLambdaChain() throws Exception { runTest("compiler/testData/codegen/boxInline/noInline/noInlineLambdaChain.kt"); } + @Test @TestMetadata("noInlineLambdaChainWithCapturedInline.kt") public void testNoInlineLambdaChainWithCapturedInline() throws Exception { runTest("compiler/testData/codegen/boxInline/noInline/noInlineLambdaChainWithCapturedInline.kt"); } + @Test @TestMetadata("withoutInline.kt") public void testWithoutInline() throws Exception { runTest("compiler/testData/codegen/boxInline/noInline/withoutInline.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/nonLocalReturns") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class NonLocalReturns extends AbstractCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class NonLocalReturns { + @Test public void testAllFilesPresentInNonLocalReturns() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("explicitLocalReturn.kt") public void testExplicitLocalReturn() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/explicitLocalReturn.kt"); } + @Test + @TestMetadata("fromArrayGenerator.kt") + public void testFromArrayGenerator() throws Exception { + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/fromArrayGenerator.kt"); + } + + @Test + @TestMetadata("fromArrayGeneratorCatch.kt") + public void testFromArrayGeneratorCatch() throws Exception { + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/fromArrayGeneratorCatch.kt"); + } + + @Test + @TestMetadata("fromArrayGeneratorNested.kt") + public void testFromArrayGeneratorNested() throws Exception { + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/fromArrayGeneratorNested.kt"); + } + + @Test + @TestMetadata("fromArrayGeneratorWithCapture.kt") + public void testFromArrayGeneratorWithCapture() throws Exception { + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/fromArrayGeneratorWithCapture.kt"); + } + + @Test + @TestMetadata("fromArrayGeneratorWithCatch.kt") + public void testFromArrayGeneratorWithCatch() throws Exception { + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/fromArrayGeneratorWithCatch.kt"); + } + + @Test + @TestMetadata("fromArrayGeneratorWithFinally.kt") + public void testFromArrayGeneratorWithFinally() throws Exception { + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/fromArrayGeneratorWithFinally.kt"); + } + + @Test + @TestMetadata("fromArrayGeneratorWithFinallyX2.kt") + public void testFromArrayGeneratorWithFinallyX2() throws Exception { + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/fromArrayGeneratorWithFinallyX2.kt"); + } + + @Test + @TestMetadata("fromArrayGeneratorWithFinallyX2_2.kt") + public void testFromArrayGeneratorWithFinallyX2_2() throws Exception { + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/fromArrayGeneratorWithFinallyX2_2.kt"); + } + + @Test @TestMetadata("fromInterfaceDefaultGetter.kt") public void testFromInterfaceDefaultGetter() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/fromInterfaceDefaultGetter.kt"); } + @Test @TestMetadata("justReturnInLambda.kt") public void testJustReturnInLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/justReturnInLambda.kt"); } + @Test @TestMetadata("kt5199.kt") public void testKt5199() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/kt5199.kt"); } + @Test @TestMetadata("kt8948.kt") public void testKt8948() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/kt8948.kt"); } + @Test @TestMetadata("kt8948v2.kt") public void testKt8948v2() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/kt8948v2.kt"); } + @Test @TestMetadata("nestedNonLocals.kt") public void testNestedNonLocals() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/nestedNonLocals.kt"); } + @Test @TestMetadata("noInlineLocalReturn.kt") public void testNoInlineLocalReturn() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/noInlineLocalReturn.kt"); } + @Test @TestMetadata("nonLocalReturnFromOuterLambda.kt") public void testNonLocalReturnFromOuterLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/nonLocalReturnFromOuterLambda.kt"); } + @Test @TestMetadata("propertyAccessors.kt") public void testPropertyAccessors() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/propertyAccessors.kt"); } + @Test @TestMetadata("returnFromFunctionExpr.kt") public void testReturnFromFunctionExpr() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/returnFromFunctionExpr.kt"); } + @Test @TestMetadata("simple.kt") public void testSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/simple.kt"); } + @Test @TestMetadata("simpleFunctional.kt") public void testSimpleFunctional() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/simpleFunctional.kt"); } + @Test @TestMetadata("simpleVoid.kt") public void testSimpleVoid() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/simpleVoid.kt"); } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/deparenthesize") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Deparenthesize extends AbstractCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Deparenthesize { + @Test public void testAllFilesPresentInDeparenthesize() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/deparenthesize"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("bracket.kt") public void testBracket() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/deparenthesize/bracket.kt"); } + @Test @TestMetadata("labeled.kt") public void testLabeled() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/deparenthesize/labeled.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class TryFinally extends AbstractCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class TryFinally { + @Test public void testAllFilesPresentInTryFinally() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("kt16417.kt") public void testKt16417() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt16417.kt"); } + @Test @TestMetadata("kt20433.kt") public void testKt20433() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt20433.kt"); } + @Test @TestMetadata("kt20433_2.kt") public void testKt20433_2() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt20433_2.kt"); } + @Test @TestMetadata("kt20433_2_void.kt") public void testKt20433_2_void() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt20433_2_void.kt"); } + @Test @TestMetadata("kt20433_void.kt") public void testKt20433_void() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt20433_void.kt"); } + @Test @TestMetadata("kt26384.kt") public void testKt26384() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt26384.kt"); } + @Test @TestMetadata("kt26384_2.kt") public void testKt26384_2() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt26384_2.kt"); } + @Test @TestMetadata("kt28546.kt") public void testKt28546() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt28546.kt"); } + @Test @TestMetadata("kt6956.kt") public void testKt6956() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt6956.kt"); } + @Test @TestMetadata("kt7273.kt") public void testKt7273() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt7273.kt"); } + @Test @TestMetadata("nonLocalReturnFromCatchBlock.kt") public void testNonLocalReturnFromCatchBlock() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/nonLocalReturnFromCatchBlock.kt"); } + @Test @TestMetadata("nonLocalReturnFromOuterLambda.kt") public void testNonLocalReturnFromOuterLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/nonLocalReturnFromOuterLambda.kt"); } + @Test @TestMetadata("nonLocalReturnToCatchBlock.kt") public void testNonLocalReturnToCatchBlock() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/nonLocalReturnToCatchBlock.kt"); } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class CallSite extends AbstractCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class CallSite { + @Test public void testAllFilesPresentInCallSite() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("callSite.kt") public void testCallSite() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/callSite.kt"); } + @Test @TestMetadata("callSiteComplex.kt") public void testCallSiteComplex() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/callSiteComplex.kt"); } + @Test @TestMetadata("exceptionTableSplit.kt") public void testExceptionTableSplit() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/exceptionTableSplit.kt"); } + @Test @TestMetadata("exceptionTableSplitNoReturn.kt") public void testExceptionTableSplitNoReturn() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/exceptionTableSplitNoReturn.kt"); } + @Test @TestMetadata("finallyInFinally.kt") public void testFinallyInFinally() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/finallyInFinally.kt"); } + @Test @TestMetadata("wrongVarInterval.kt") public void testWrongVarInterval() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/wrongVarInterval.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Chained extends AbstractCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Chained { + @Test public void testAllFilesPresentInChained() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("finallyInFinally.kt") public void testFinallyInFinally() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/finallyInFinally.kt"); } + @Test @TestMetadata("finallyInFinally2.kt") public void testFinallyInFinally2() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/finallyInFinally2.kt"); } + @Test @TestMetadata("intReturn.kt") public void testIntReturn() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturn.kt"); } + @Test @TestMetadata("intReturnComplex.kt") public void testIntReturnComplex() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex.kt"); } + @Test @TestMetadata("intReturnComplex2.kt") public void testIntReturnComplex2() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex2.kt"); } + @Test @TestMetadata("intReturnComplex3.kt") public void testIntReturnComplex3() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex3.kt"); } + @Test @TestMetadata("intReturnComplex4.kt") public void testIntReturnComplex4() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex4.kt"); } + @Test @TestMetadata("nestedLambda.kt") public void testNestedLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/nestedLambda.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class DeclSite extends AbstractCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class DeclSite { + @Test public void testAllFilesPresentInDeclSite() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("complex.kt") public void testComplex() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/complex.kt"); } + @Test @TestMetadata("intReturn.kt") public void testIntReturn() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/intReturn.kt"); } + @Test @TestMetadata("intReturnComplex.kt") public void testIntReturnComplex() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/intReturnComplex.kt"); } + @Test @TestMetadata("longReturn.kt") public void testLongReturn() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/longReturn.kt"); } + @Test @TestMetadata("nested.kt") public void testNested() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/nested.kt"); } + @Test @TestMetadata("returnInFinally.kt") public void testReturnInFinally() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/returnInFinally.kt"); } + @Test @TestMetadata("returnInTry.kt") public void testReturnInTry() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/returnInTry.kt"); } + @Test @TestMetadata("returnInTryAndFinally.kt") public void testReturnInTryAndFinally() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/returnInTryAndFinally.kt"); } + @Test @TestMetadata("severalInTry.kt") public void testSeveralInTry() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/severalInTry.kt"); } + @Test @TestMetadata("severalInTryComplex.kt") public void testSeveralInTryComplex() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/severalInTryComplex.kt"); } + @Test @TestMetadata("voidInlineFun.kt") public void testVoidInlineFun() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/voidInlineFun.kt"); } + @Test @TestMetadata("voidNonLocal.kt") public void testVoidNonLocal() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/voidNonLocal.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class ExceptionTable extends AbstractCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class ExceptionTable { + @Test public void testAllFilesPresentInExceptionTable() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("break.kt") public void testBreak() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/break.kt"); } + @Test @TestMetadata("continue.kt") public void testContinue() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/continue.kt"); } + @Test @TestMetadata("exceptionInFinally.kt") public void testExceptionInFinally() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/exceptionInFinally.kt"); } + @Test @TestMetadata("forInFinally.kt") public void testForInFinally() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/forInFinally.kt"); } + @Test @TestMetadata("innerAndExternal.kt") public void testInnerAndExternal() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/innerAndExternal.kt"); } + @Test @TestMetadata("innerAndExternalNested.kt") public void testInnerAndExternalNested() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/innerAndExternalNested.kt"); } + @Test @TestMetadata("innerAndExternalSimple.kt") public void testInnerAndExternalSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/innerAndExternalSimple.kt"); } + @Test @TestMetadata("kt31653.kt") public void testKt31653() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/kt31653.kt"); } + @Test @TestMetadata("kt31653_2.kt") public void testKt31653_2() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/kt31653_2.kt"); } + @Test @TestMetadata("kt31923.kt") public void testKt31923() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/kt31923.kt"); } + @Test @TestMetadata("kt31923_2.kt") public void testKt31923_2() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/kt31923_2.kt"); } + @Test @TestMetadata("kt31923_wrong.kt") public void testKt31923_wrong() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/kt31923_wrong.kt"); } + @Test @TestMetadata("nested.kt") public void testNested() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/nested.kt"); } + @Test @TestMetadata("nestedWithReturns.kt") public void testNestedWithReturns() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/nestedWithReturns.kt"); } + @Test @TestMetadata("nestedWithReturnsSimple.kt") public void testNestedWithReturnsSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/nestedWithReturnsSimple.kt"); } + @Test @TestMetadata("noFinally.kt") public void testNoFinally() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/noFinally.kt"); } + @Test @TestMetadata("severalCatchClause.kt") public void testSeveralCatchClause() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/severalCatchClause.kt"); } + @Test @TestMetadata("simpleThrow.kt") public void testSimpleThrow() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/simpleThrow.kt"); } + @Test @TestMetadata("synchonized.kt") public void testSynchonized() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/synchonized.kt"); } + @Test @TestMetadata("throwInFinally.kt") public void testThrowInFinally() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/throwInFinally.kt"); } + @Test @TestMetadata("tryCatchInFinally.kt") public void testTryCatchInFinally() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/tryCatchInFinally.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/variables") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Variables extends AbstractCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Variables { + @Test public void testAllFilesPresentInVariables() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/variables"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("kt7792.kt") public void testKt7792() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/variables/kt7792.kt"); @@ -2892,430 +3329,501 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/optimizations") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Optimizations extends AbstractCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Optimizations { + @Test public void testAllFilesPresentInOptimizations() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/optimizations"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("kt20844.kt") public void testKt20844() throws Exception { runTest("compiler/testData/codegen/boxInline/optimizations/kt20844.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/private") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Private extends AbstractCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Private { + @Test @TestMetadata("accessorForConst.kt") public void testAccessorForConst() throws Exception { runTest("compiler/testData/codegen/boxInline/private/accessorForConst.kt"); } + @Test @TestMetadata("accessorStability.kt") public void testAccessorStability() throws Exception { runTest("compiler/testData/codegen/boxInline/private/accessorStability.kt"); } + @Test @TestMetadata("accessorStabilityInClass.kt") public void testAccessorStabilityInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/private/accessorStabilityInClass.kt"); } + @Test public void testAllFilesPresentInPrivate() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/private"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("effectivePrivate.kt") public void testEffectivePrivate() throws Exception { runTest("compiler/testData/codegen/boxInline/private/effectivePrivate.kt"); } + @Test @TestMetadata("kt6453.kt") public void testKt6453() throws Exception { runTest("compiler/testData/codegen/boxInline/private/kt6453.kt"); } + @Test @TestMetadata("kt8094.kt") public void testKt8094() throws Exception { runTest("compiler/testData/codegen/boxInline/private/kt8094.kt"); } + @Test @TestMetadata("kt8095.kt") public void testKt8095() throws Exception { runTest("compiler/testData/codegen/boxInline/private/kt8095.kt"); } + @Test @TestMetadata("nestedInPrivateClass.kt") public void testNestedInPrivateClass() throws Exception { runTest("compiler/testData/codegen/boxInline/private/nestedInPrivateClass.kt"); } + @Test @TestMetadata("privateClass.kt") public void testPrivateClass() throws Exception { runTest("compiler/testData/codegen/boxInline/private/privateClass.kt"); } + @Test @TestMetadata("privateClassExtensionLambda.kt") public void testPrivateClassExtensionLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/private/privateClassExtensionLambda.kt"); } + @Test @TestMetadata("privateInInlineInMultiFileFacade.kt") public void testPrivateInInlineInMultiFileFacade() throws Exception { runTest("compiler/testData/codegen/boxInline/private/privateInInlineInMultiFileFacade.kt"); } + @Test @TestMetadata("privateInline.kt") public void testPrivateInline() throws Exception { runTest("compiler/testData/codegen/boxInline/private/privateInline.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/property") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Property extends AbstractCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Property { + @Test public void testAllFilesPresentInProperty() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/property"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("augAssignmentAndInc.kt") public void testAugAssignmentAndInc() throws Exception { runTest("compiler/testData/codegen/boxInline/property/augAssignmentAndInc.kt"); } + @Test @TestMetadata("augAssignmentAndIncInClass.kt") public void testAugAssignmentAndIncInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/property/augAssignmentAndIncInClass.kt"); } + @Test @TestMetadata("augAssignmentAndIncInClassViaConvention.kt") public void testAugAssignmentAndIncInClassViaConvention() throws Exception { runTest("compiler/testData/codegen/boxInline/property/augAssignmentAndIncInClassViaConvention.kt"); } + @Test @TestMetadata("augAssignmentAndIncOnExtension.kt") public void testAugAssignmentAndIncOnExtension() throws Exception { runTest("compiler/testData/codegen/boxInline/property/augAssignmentAndIncOnExtension.kt"); } + @Test @TestMetadata("augAssignmentAndIncOnExtensionInClass.kt") public void testAugAssignmentAndIncOnExtensionInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/property/augAssignmentAndIncOnExtensionInClass.kt"); } + @Test @TestMetadata("augAssignmentAndIncViaConvention.kt") public void testAugAssignmentAndIncViaConvention() throws Exception { runTest("compiler/testData/codegen/boxInline/property/augAssignmentAndIncViaConvention.kt"); } + @Test @TestMetadata("fromObject.kt") public void testFromObject() throws Exception { runTest("compiler/testData/codegen/boxInline/property/fromObject.kt"); } + @Test @TestMetadata("kt22649.kt") public void testKt22649() throws Exception { runTest("compiler/testData/codegen/boxInline/property/kt22649.kt"); } + @Test @TestMetadata("property.kt") public void testProperty() throws Exception { runTest("compiler/testData/codegen/boxInline/property/property.kt"); } + @Test @TestMetadata("reifiedVal.kt") public void testReifiedVal() throws Exception { runTest("compiler/testData/codegen/boxInline/property/reifiedVal.kt"); } + @Test @TestMetadata("reifiedVar.kt") public void testReifiedVar() throws Exception { runTest("compiler/testData/codegen/boxInline/property/reifiedVar.kt"); } + @Test @TestMetadata("simple.kt") public void testSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/property/simple.kt"); } + @Test @TestMetadata("simpleExtension.kt") public void testSimpleExtension() throws Exception { runTest("compiler/testData/codegen/boxInline/property/simpleExtension.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/reified") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Reified extends AbstractCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Reified { + @Test public void testAllFilesPresentInReified() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/reified"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("arrayConstructor.kt") public void testArrayConstructor() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/arrayConstructor.kt"); } + @Test @TestMetadata("arrayOf.kt") public void testArrayOf() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/arrayOf.kt"); } + @Test @TestMetadata("capturedLambda.kt") public void testCapturedLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/capturedLambda.kt"); } + @Test @TestMetadata("capturedLambda2.kt") public void testCapturedLambda2() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/capturedLambda2.kt"); } + @Test @TestMetadata("dontSubstituteNonReified.kt") public void testDontSubstituteNonReified() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/dontSubstituteNonReified.kt"); } + @Test @TestMetadata("kt11081.kt") public void testKt11081() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/kt11081.kt"); } + @Test @TestMetadata("kt11677.kt") public void testKt11677() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/kt11677.kt"); } + @Test @TestMetadata("kt15956.kt") public void testKt15956() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/kt15956.kt"); } + @Test @TestMetadata("kt15997.kt") public void testKt15997() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/kt15997.kt"); } + @Test @TestMetadata("kt15997_2.kt") public void testKt15997_2() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/kt15997_2.kt"); } + @Test @TestMetadata("kt18977.kt") public void testKt18977() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/kt18977.kt"); } + @Test + @TestMetadata("kt35511.kt") + public void testKt35511() throws Exception { + runTest("compiler/testData/codegen/boxInline/reified/kt35511.kt"); + } + + @Test + @TestMetadata("kt35511_try.kt") + public void testKt35511_try() throws Exception { + runTest("compiler/testData/codegen/boxInline/reified/kt35511_try.kt"); + } + + @Test + @TestMetadata("kt35511_try_valueOf.kt") + public void testKt35511_try_valueOf() throws Exception { + runTest("compiler/testData/codegen/boxInline/reified/kt35511_try_valueOf.kt"); + } + + @Test + @TestMetadata("kt35511_try_values.kt") + public void testKt35511_try_values() throws Exception { + runTest("compiler/testData/codegen/boxInline/reified/kt35511_try_values.kt"); + } + + @Test @TestMetadata("kt6988.kt") public void testKt6988() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/kt6988.kt"); } + @Test @TestMetadata("kt6988_2.kt") public void testKt6988_2() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/kt6988_2.kt"); } + @Test @TestMetadata("kt6990.kt") public void testKt6990() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/kt6990.kt"); } + @Test @TestMetadata("kt7017.kt") public void testKt7017() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/kt7017.kt"); } + @Test @TestMetadata("kt8047.kt") public void testKt8047() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/kt8047.kt"); } + @Test @TestMetadata("kt8047_2.kt") public void testKt8047_2() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/kt8047_2.kt"); } + @Test @TestMetadata("kt9637.kt") public void testKt9637() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/kt9637.kt"); } + @Test @TestMetadata("kt9637_2.kt") public void testKt9637_2() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/kt9637_2.kt"); } + @Test @TestMetadata("nonCapturingObjectInLambda.kt") public void testNonCapturingObjectInLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/nonCapturingObjectInLambda.kt"); } + @Test @TestMetadata("packages.kt") public void testPackages() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/packages.kt"); } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/reified/checkCast") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class CheckCast extends AbstractCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class CheckCast { + @Test public void testAllFilesPresentInCheckCast() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/reified/checkCast"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("chain.kt") public void testChain() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/checkCast/chain.kt"); } + @Test @TestMetadata("kt26435.kt") public void testKt26435() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/checkCast/kt26435.kt"); } + @Test @TestMetadata("kt26435_2.kt") public void testKt26435_2() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/checkCast/kt26435_2.kt"); } + @Test @TestMetadata("kt26435_3.kt") public void testKt26435_3() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/checkCast/kt26435_3.kt"); } + @Test @TestMetadata("kt8043.kt") public void testKt8043() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/checkCast/kt8043.kt"); } + @Test @TestMetadata("maxStack.kt") public void testMaxStack() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/checkCast/maxStack.kt"); } + @Test @TestMetadata("nullable.kt") public void testNullable() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/checkCast/nullable.kt"); } + @Test @TestMetadata("simple.kt") public void testSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/checkCast/simple.kt"); } + @Test @TestMetadata("simpleSafe.kt") public void testSimpleSafe() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/checkCast/simpleSafe.kt"); } + @Test @TestMetadata("simple_1_3.kt") public void testSimple_1_3() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/checkCast/simple_1_3.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/reified/defaultLambda") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class DefaultLambda extends AbstractCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class DefaultLambda { + @Test public void testAllFilesPresentInDefaultLambda() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/reified/defaultLambda"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("chain.kt") public void testChain() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/defaultLambda/chain.kt"); } + @Test @TestMetadata("nested.kt") public void testNested() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/defaultLambda/nested.kt"); } + @Test @TestMetadata("nested2.kt") public void testNested2() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/defaultLambda/nested2.kt"); } + @Test @TestMetadata("nested2Static.kt") public void testNested2Static() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/defaultLambda/nested2Static.kt"); } + @Test @TestMetadata("nestedStatic.kt") public void testNestedStatic() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/defaultLambda/nestedStatic.kt"); } + @Test @TestMetadata("simple.kt") public void testSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/defaultLambda/simple.kt"); } + @Test @TestMetadata("transitiveChain.kt") public void testTransitiveChain() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/defaultLambda/transitiveChain.kt"); } + @Test @TestMetadata("transitiveChainStatic.kt") public void testTransitiveChainStatic() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/defaultLambda/transitiveChainStatic.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/reified/isCheck") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class IsCheck extends AbstractCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class IsCheck { + @Test public void testAllFilesPresentInIsCheck() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/reified/isCheck"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("chain.kt") public void testChain() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/isCheck/chain.kt"); } + @Test @TestMetadata("nullable.kt") public void testNullable() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/isCheck/nullable.kt"); } + @Test @TestMetadata("simple.kt") public void testSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/isCheck/simple.kt"); @@ -3323,518 +3831,577 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/signature") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Signature extends AbstractCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Signature { + @Test public void testAllFilesPresentInSignature() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/signature"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("inProjectionSubstitution.kt") public void testInProjectionSubstitution() throws Exception { runTest("compiler/testData/codegen/boxInline/signature/inProjectionSubstitution.kt"); } + @Test @TestMetadata("outProjectionSubstitution.kt") public void testOutProjectionSubstitution() throws Exception { runTest("compiler/testData/codegen/boxInline/signature/outProjectionSubstitution.kt"); } + @Test @TestMetadata("recursion.kt") public void testRecursion() throws Exception { runTest("compiler/testData/codegen/boxInline/signature/recursion.kt"); } + @Test @TestMetadata("sameFormalParameterName.kt") public void testSameFormalParameterName() throws Exception { runTest("compiler/testData/codegen/boxInline/signature/sameFormalParameterName.kt"); } + @Test @TestMetadata("sameReifiedFormalParameterName.kt") public void testSameReifiedFormalParameterName() throws Exception { runTest("compiler/testData/codegen/boxInline/signature/sameReifiedFormalParameterName.kt"); } + @Test @TestMetadata("starProjectionSubstitution.kt") public void testStarProjectionSubstitution() throws Exception { runTest("compiler/testData/codegen/boxInline/signature/starProjectionSubstitution.kt"); } + @Test @TestMetadata("typeParameterInLambda.kt") public void testTypeParameterInLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/signature/typeParameterInLambda.kt"); } + @Test @TestMetadata("typeParametersSubstitution.kt") public void testTypeParametersSubstitution() throws Exception { runTest("compiler/testData/codegen/boxInline/signature/typeParametersSubstitution.kt"); } + @Test @TestMetadata("typeParametersSubstitution2.kt") public void testTypeParametersSubstitution2() throws Exception { runTest("compiler/testData/codegen/boxInline/signature/typeParametersSubstitution2.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/simple") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Simple extends AbstractCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Simple { + @Test public void testAllFilesPresentInSimple() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/simple"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("captureAndArgumentIncompatibleTypes.kt") public void testCaptureAndArgumentIncompatibleTypes() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/captureAndArgumentIncompatibleTypes.kt"); } + @Test @TestMetadata("classObject.kt") public void testClassObject() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/classObject.kt"); } + @Test @TestMetadata("destructuring.kt") public void testDestructuring() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/destructuring.kt"); } + @Test @TestMetadata("destructuringIndexClash.kt") public void testDestructuringIndexClash() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/destructuringIndexClash.kt"); } + @Test @TestMetadata("extension.kt") public void testExtension() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/extension.kt"); } + @Test @TestMetadata("extensionLambda.kt") public void testExtensionLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/extensionLambda.kt"); } + @Test @TestMetadata("funImportedFromObject.kt") public void testFunImportedFromObject() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/funImportedFromObject.kt"); } + @Test @TestMetadata("inlineCallInInlineLambda.kt") public void testInlineCallInInlineLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/inlineCallInInlineLambda.kt"); } + @Test @TestMetadata("kt17431.kt") public void testKt17431() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/kt17431.kt"); } + @Test @TestMetadata("kt28547.kt") public void testKt28547() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/kt28547.kt"); } + @Test @TestMetadata("kt28547_2.kt") public void testKt28547_2() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/kt28547_2.kt"); } + @Test @TestMetadata("params.kt") public void testParams() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/params.kt"); } + @Test @TestMetadata("propImportedFromObject.kt") public void testPropImportedFromObject() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/propImportedFromObject.kt"); } + @Test @TestMetadata("rootConstructor.kt") public void testRootConstructor() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/rootConstructor.kt"); } + @Test @TestMetadata("safeCall.kt") public void testSafeCall() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/safeCall.kt"); } + @Test @TestMetadata("severalClosures.kt") public void testSeveralClosures() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/severalClosures.kt"); } + @Test @TestMetadata("severalUsage.kt") public void testSeveralUsage() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/severalUsage.kt"); } + @Test @TestMetadata("simpleDouble.kt") public void testSimpleDouble() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/simpleDouble.kt"); } + @Test @TestMetadata("simpleEnum.kt") public void testSimpleEnum() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/simpleEnum.kt"); } + @Test @TestMetadata("simpleGenerics.kt") public void testSimpleGenerics() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/simpleGenerics.kt"); } + @Test @TestMetadata("simpleInt.kt") public void testSimpleInt() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/simpleInt.kt"); } + @Test @TestMetadata("simpleLambda.kt") public void testSimpleLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/simpleLambda.kt"); } + @Test @TestMetadata("simpleObject.kt") public void testSimpleObject() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/simpleObject.kt"); } + @Test @TestMetadata("vararg.kt") public void testVararg() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/vararg.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/smap") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Smap extends AbstractCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Smap { + @Test public void testAllFilesPresentInSmap() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/smap"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("assertion.kt") public void testAssertion() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/assertion.kt"); } + @Test @TestMetadata("classCycle.kt") public void testClassCycle() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/classCycle.kt"); } + @Test @TestMetadata("classFromDefaultPackage.kt") public void testClassFromDefaultPackage() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/classFromDefaultPackage.kt"); } + @Test @TestMetadata("crossroutines.kt") public void testCrossroutines() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/crossroutines.kt"); } + @Test @TestMetadata("defaultFunction.kt") public void testDefaultFunction() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/defaultFunction.kt"); } + @Test @TestMetadata("defaultFunctionWithInlineCall.kt") public void testDefaultFunctionWithInlineCall() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/defaultFunctionWithInlineCall.kt"); } + @Test @TestMetadata("forInline.kt") public void testForInline() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/forInline.kt"); } + @Test @TestMetadata("interleavedFiles.kt") public void testInterleavedFiles() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/interleavedFiles.kt"); } + @Test @TestMetadata("kt23369.kt") public void testKt23369() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/kt23369.kt"); } + @Test @TestMetadata("kt23369_2.kt") public void testKt23369_2() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/kt23369_2.kt"); } + @Test @TestMetadata("kt23369_3.kt") public void testKt23369_3() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/kt23369_3.kt"); } + @Test @TestMetadata("kt35006.kt") public void testKt35006() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/kt35006.kt"); } + @Test @TestMetadata("multiFileFacade.kt") public void testMultiFileFacade() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/multiFileFacade.kt"); } + @Test @TestMetadata("oneFile.kt") public void testOneFile() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/oneFile.kt"); } + @Test @TestMetadata("rangeFolding.kt") public void testRangeFolding() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/rangeFolding.kt"); } + @Test @TestMetadata("rangeFoldingInClass.kt") public void testRangeFoldingInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/rangeFoldingInClass.kt"); } + @Test @TestMetadata("smap.kt") public void testSmap() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/smap.kt"); } + @Test @TestMetadata("smapWithNewSyntax.kt") public void testSmapWithNewSyntax() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/smapWithNewSyntax.kt"); } + @Test @TestMetadata("smapWithOldSyntax.kt") public void testSmapWithOldSyntax() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/smapWithOldSyntax.kt"); } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/smap/anonymous") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Anonymous extends AbstractCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Anonymous { + @Test public void testAllFilesPresentInAnonymous() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/smap/anonymous"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("kt19175.kt") public void testKt19175() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/anonymous/kt19175.kt"); } + @Test @TestMetadata("lambda.kt") public void testLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/anonymous/lambda.kt"); } + @Test @TestMetadata("lambdaOnCallSite.kt") public void testLambdaOnCallSite() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/anonymous/lambdaOnCallSite.kt"); } + @Test @TestMetadata("lambdaOnInlineCallSite.kt") public void testLambdaOnInlineCallSite() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/anonymous/lambdaOnInlineCallSite.kt"); } + @Test @TestMetadata("object.kt") public void testObject() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/anonymous/object.kt"); } + @Test @TestMetadata("objectOnCallSite.kt") public void testObjectOnCallSite() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/anonymous/objectOnCallSite.kt"); } + @Test @TestMetadata("objectOnInlineCallSite.kt") public void testObjectOnInlineCallSite() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/anonymous/objectOnInlineCallSite.kt"); } + @Test @TestMetadata("objectOnInlineCallSite2.kt") public void testObjectOnInlineCallSite2() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/anonymous/objectOnInlineCallSite2.kt"); } + @Test @TestMetadata("objectOnInlineCallSiteWithCapture.kt") public void testObjectOnInlineCallSiteWithCapture() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/anonymous/objectOnInlineCallSiteWithCapture.kt"); } + @Test @TestMetadata("severalMappingsForDefaultFile.kt") public void testSeveralMappingsForDefaultFile() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/anonymous/severalMappingsForDefaultFile.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/smap/defaultLambda") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class DefaultLambda extends AbstractCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class DefaultLambda { + @Test public void testAllFilesPresentInDefaultLambda() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/smap/defaultLambda"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("defaultLambdaInAnonymous.kt") public void testDefaultLambdaInAnonymous() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/defaultLambda/defaultLambdaInAnonymous.kt"); } + @Test @TestMetadata("inlinInDefault.kt") public void testInlinInDefault() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/defaultLambda/inlinInDefault.kt"); } + @Test @TestMetadata("inlinInDefault2.kt") public void testInlinInDefault2() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/defaultLambda/inlinInDefault2.kt"); } + @Test @TestMetadata("inlineAnonymousInDefault.kt") public void testInlineAnonymousInDefault() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/defaultLambda/inlineAnonymousInDefault.kt"); } + @Test @TestMetadata("inlineAnonymousInDefault2.kt") public void testInlineAnonymousInDefault2() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/defaultLambda/inlineAnonymousInDefault2.kt"); } + @Test @TestMetadata("kt21827.kt") public void testKt21827() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/defaultLambda/kt21827.kt"); } + @Test @TestMetadata("nested.kt") public void testNested() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/defaultLambda/nested.kt"); } + @Test @TestMetadata("simple.kt") public void testSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/defaultLambda/simple.kt"); } + @Test @TestMetadata("simple2.kt") public void testSimple2() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/defaultLambda/simple2.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/smap/inlineOnly") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class InlineOnly extends AbstractCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class InlineOnly { + @Test public void testAllFilesPresentInInlineOnly() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/smap/inlineOnly"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("noSmap.kt") public void testNoSmap() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/inlineOnly/noSmap.kt"); } + @Test @TestMetadata("noSmapWithProperty.kt") public void testNoSmapWithProperty() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/inlineOnly/noSmapWithProperty.kt"); } + @Test @TestMetadata("reified.kt") public void testReified() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/inlineOnly/reified.kt"); } + @Test @TestMetadata("reifiedProperty.kt") public void testReifiedProperty() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/inlineOnly/reifiedProperty.kt"); } + @Test @TestMetadata("stdlibInlineOnly.kt") public void testStdlibInlineOnly() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/inlineOnly/stdlibInlineOnly.kt"); } + @Test @TestMetadata("stdlibInlineOnlyOneLine.kt") public void testStdlibInlineOnlyOneLine() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/inlineOnly/stdlibInlineOnlyOneLine.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/smap/newsmap") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Newsmap extends AbstractCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Newsmap { + @Test public void testAllFilesPresentInNewsmap() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/smap/newsmap"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("differentMapping.kt") public void testDifferentMapping() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/newsmap/differentMapping.kt"); } + @Test @TestMetadata("mappingInInlineFunLambda.kt") public void testMappingInInlineFunLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/newsmap/mappingInInlineFunLambda.kt"); } + @Test @TestMetadata("mappingInSubInlineLambda.kt") public void testMappingInSubInlineLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/newsmap/mappingInSubInlineLambda.kt"); } + @Test @TestMetadata("mappingInSubInlineLambdaSameFileInline.kt") public void testMappingInSubInlineLambdaSameFileInline() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/newsmap/mappingInSubInlineLambdaSameFileInline.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/smap/resolve") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Resolve extends AbstractCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Resolve { + @Test public void testAllFilesPresentInResolve() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/smap/resolve"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("inlineComponent.kt") public void testInlineComponent() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/resolve/inlineComponent.kt"); } + @Test @TestMetadata("inlineIterator.kt") public void testInlineIterator() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/resolve/inlineIterator.kt"); @@ -3842,616 +4409,695 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/special") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Special extends AbstractCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Special { + @Test public void testAllFilesPresentInSpecial() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/special"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("identityCheck.kt") public void testIdentityCheck() throws Exception { runTest("compiler/testData/codegen/boxInline/special/identityCheck.kt"); } + @Test @TestMetadata("ifBranches.kt") public void testIfBranches() throws Exception { runTest("compiler/testData/codegen/boxInline/special/ifBranches.kt"); } + @Test @TestMetadata("iinc.kt") public void testIinc() throws Exception { runTest("compiler/testData/codegen/boxInline/special/iinc.kt"); } + @Test @TestMetadata("inlineChain.kt") public void testInlineChain() throws Exception { runTest("compiler/testData/codegen/boxInline/special/inlineChain.kt"); } + @Test @TestMetadata("loopInStoreLoadChains.kt") public void testLoopInStoreLoadChains() throws Exception { runTest("compiler/testData/codegen/boxInline/special/loopInStoreLoadChains.kt"); } + @Test @TestMetadata("loopInStoreLoadChains2.kt") public void testLoopInStoreLoadChains2() throws Exception { runTest("compiler/testData/codegen/boxInline/special/loopInStoreLoadChains2.kt"); } + @Test @TestMetadata("plusAssign.kt") public void testPlusAssign() throws Exception { runTest("compiler/testData/codegen/boxInline/special/plusAssign.kt"); } + @Test @TestMetadata("stackHeightBug.kt") public void testStackHeightBug() throws Exception { runTest("compiler/testData/codegen/boxInline/special/stackHeightBug.kt"); } + @Test @TestMetadata("unusedInlineLambda.kt") public void testUnusedInlineLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/special/unusedInlineLambda.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/stackOnReturn") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class StackOnReturn extends AbstractCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class StackOnReturn { + @Test public void testAllFilesPresentInStackOnReturn() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/stackOnReturn"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("elvis.kt") public void testElvis() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/elvis.kt"); } + @Test @TestMetadata("ifThenElse.kt") public void testIfThenElse() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/ifThenElse.kt"); } + @Test @TestMetadata("kt11499.kt") public void testKt11499() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/kt11499.kt"); } + @Test @TestMetadata("kt17591.kt") public void testKt17591() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/kt17591.kt"); } + @Test @TestMetadata("kt17591a.kt") public void testKt17591a() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/kt17591a.kt"); } + @Test @TestMetadata("kt17591b.kt") public void testKt17591b() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/kt17591b.kt"); } + @Test @TestMetadata("mixedTypesOnStack1.kt") public void testMixedTypesOnStack1() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/mixedTypesOnStack1.kt"); } + @Test @TestMetadata("mixedTypesOnStack2.kt") public void testMixedTypesOnStack2() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/mixedTypesOnStack2.kt"); } + @Test @TestMetadata("mixedTypesOnStack3.kt") public void testMixedTypesOnStack3() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/mixedTypesOnStack3.kt"); } + @Test @TestMetadata("nonLocalReturn1.kt") public void testNonLocalReturn1() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/nonLocalReturn1.kt"); } + @Test @TestMetadata("nonLocalReturn2.kt") public void testNonLocalReturn2() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/nonLocalReturn2.kt"); } + @Test @TestMetadata("nonLocalReturn3.kt") public void testNonLocalReturn3() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/nonLocalReturn3.kt"); } + @Test @TestMetadata("poppedLocalReturn.kt") public void testPoppedLocalReturn() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/poppedLocalReturn.kt"); } + @Test @TestMetadata("poppedLocalReturn2.kt") public void testPoppedLocalReturn2() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/poppedLocalReturn2.kt"); } + @Test @TestMetadata("returnLong.kt") public void testReturnLong() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/returnLong.kt"); } + @Test @TestMetadata("tryFinally.kt") public void testTryFinally() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/tryFinally.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/suspend") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Suspend extends AbstractCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Suspend { + @Test public void testAllFilesPresentInSuspend() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("capturedVariables.kt") public void testCapturedVariables() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/capturedVariables.kt"); } + @Test @TestMetadata("crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt") public void testCrossinlineSuspendLambdaInsideCrossinlineSuspendLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt"); } + @Test @TestMetadata("debugMetadataCrossinline.kt") public void testDebugMetadataCrossinline() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/debugMetadataCrossinline.kt"); } + @Test @TestMetadata("delegatedProperties.kt") public void testDelegatedProperties() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/delegatedProperties.kt"); } + @Test @TestMetadata("doubleRegenerationWithNonSuspendingLambda.kt") public void testDoubleRegenerationWithNonSuspendingLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/doubleRegenerationWithNonSuspendingLambda.kt"); } + @Test @TestMetadata("enclodingMethod.kt") public void testEnclodingMethod() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/enclodingMethod.kt"); } + @Test @TestMetadata("fileNameInMetadata.kt") public void testFileNameInMetadata() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/fileNameInMetadata.kt"); } + @Test @TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt") public void testInlineOrdinaryOfCrossinlineSuspend() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfCrossinlineSuspend.kt"); } + @Test @TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt") public void testInlineOrdinaryOfNoinlineSuspend() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfNoinlineSuspend.kt"); } + @Test @TestMetadata("inlineSuspendContinuation.kt") public void testInlineSuspendContinuation() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendContinuation.kt"); } + @Test @TestMetadata("inlineSuspendInMultifileClass.kt") public void testInlineSuspendInMultifileClass() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendInMultifileClass.kt"); } + @Test @TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt") public void testInlineSuspendOfCrossinlineOrdinary() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineOrdinary.kt"); } + @Test @TestMetadata("inlineSuspendOfCrossinlineSuspend.kt") public void testInlineSuspendOfCrossinlineSuspend() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineSuspend.kt"); } + @Test @TestMetadata("inlineSuspendOfNoinlineOrdinary.kt") public void testInlineSuspendOfNoinlineOrdinary() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineOrdinary.kt"); } + @Test @TestMetadata("inlineSuspendOfNoinlineSuspend.kt") public void testInlineSuspendOfNoinlineSuspend() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineSuspend.kt"); } + @Test @TestMetadata("inlineSuspendOfOrdinary.kt") public void testInlineSuspendOfOrdinary() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfOrdinary.kt"); } + @Test @TestMetadata("inlineSuspendOfSuspend.kt") public void testInlineSuspendOfSuspend() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfSuspend.kt"); } + @Test @TestMetadata("jvmName.kt") public void testJvmName() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/jvmName.kt"); } + @Test @TestMetadata("kt26658.kt") public void testKt26658() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/kt26658.kt"); } + @Test @TestMetadata("maxStackWithCrossinline.kt") public void testMaxStackWithCrossinline() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/maxStackWithCrossinline.kt"); } + @Test @TestMetadata("multipleLocals.kt") public void testMultipleLocals() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/multipleLocals.kt"); } + @Test @TestMetadata("multipleSuspensionPoints.kt") public void testMultipleSuspensionPoints() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/multipleSuspensionPoints.kt"); } + @Test @TestMetadata("nestedMethodWith2XParameter.kt") public void testNestedMethodWith2XParameter() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/nestedMethodWith2XParameter.kt"); } + @Test @TestMetadata("nonLocalReturn.kt") public void testNonLocalReturn() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/nonLocalReturn.kt"); } + @Test @TestMetadata("nonSuspendCrossinline.kt") public void testNonSuspendCrossinline() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/nonSuspendCrossinline.kt"); } + @Test @TestMetadata("returnValue.kt") public void testReturnValue() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/returnValue.kt"); } + @Test @TestMetadata("tryCatchReceiver.kt") public void testTryCatchReceiver() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/tryCatchReceiver.kt"); } + @Test @TestMetadata("tryCatchStackTransform.kt") public void testTryCatchStackTransform() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/tryCatchStackTransform.kt"); } + @Test @TestMetadata("twiceRegeneratedAnonymousObject.kt") public void testTwiceRegeneratedAnonymousObject() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/twiceRegeneratedAnonymousObject.kt"); } + @Test @TestMetadata("twiceRegeneratedSuspendLambda.kt") public void testTwiceRegeneratedSuspendLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/twiceRegeneratedSuspendLambda.kt"); } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/suspend/callableReference") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class CallableReference extends AbstractCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class CallableReference { + @Test public void testAllFilesPresentInCallableReference() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/callableReference"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("isAsReified.kt") public void testIsAsReified() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/callableReference/isAsReified.kt"); } + @Test @TestMetadata("isAsReified2.kt") public void testIsAsReified2() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/callableReference/isAsReified2.kt"); } + @Test @TestMetadata("nonTailCall.kt") public void testNonTailCall() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/callableReference/nonTailCall.kt"); } + @Test @TestMetadata("simple.kt") public void testSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/callableReference/simple.kt"); } + @Test @TestMetadata("unitReturn.kt") public void testUnitReturn() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/callableReference/unitReturn.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/suspend/defaultParameter") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class DefaultParameter extends AbstractCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class DefaultParameter { + @Test public void testAllFilesPresentInDefaultParameter() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/defaultParameter"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("defaultValueCrossinline.kt") public void testDefaultValueCrossinline() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueCrossinline.kt"); } + @Test @TestMetadata("defaultValueInClass.kt") public void testDefaultValueInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInClass.kt"); } + @Test @TestMetadata("defaultValueInline.kt") public void testDefaultValueInline() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInline.kt"); } + @Test @TestMetadata("defaultValueInlineFromMultiFileFacade.kt") public void testDefaultValueInlineFromMultiFileFacade() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInlineFromMultiFileFacade.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/suspend/inlineClass") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class InlineClass extends AbstractCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class InlineClass { + @Test public void testAllFilesPresentInInlineClass() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/inlineClass"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("returnUnboxedDirect.kt") public void testReturnUnboxedDirect() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineClass/returnUnboxedDirect.kt"); } + @Test @TestMetadata("returnUnboxedResume.kt") public void testReturnUnboxedResume() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineClass/returnUnboxedResume.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/suspend/inlineUsedAsNoinline") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class InlineUsedAsNoinline extends AbstractCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class InlineUsedAsNoinline { + @Test public void testAllFilesPresentInInlineUsedAsNoinline() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/inlineUsedAsNoinline"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("inlineOnly.kt") public void testInlineOnly() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineUsedAsNoinline/inlineOnly.kt"); } + @Test @TestMetadata("simpleNamed.kt") public void testSimpleNamed() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineUsedAsNoinline/simpleNamed.kt"); } + @Test @TestMetadata("withCapturedInlineLambda.kt") public void testWithCapturedInlineLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineUsedAsNoinline/withCapturedInlineLambda.kt"); } + @Test @TestMetadata("withCapturedInlineLambda2.kt") public void testWithCapturedInlineLambda2() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineUsedAsNoinline/withCapturedInlineLambda2.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/suspend/receiver") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Receiver extends AbstractCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Receiver { + @Test public void testAllFilesPresentInReceiver() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/receiver"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt") public void testInlineOrdinaryOfCrossinlineSuspend() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfCrossinlineSuspend.kt"); } + @Test @TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt") public void testInlineOrdinaryOfNoinlineSuspend() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfNoinlineSuspend.kt"); } + @Test @TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt") public void testInlineSuspendOfCrossinlineOrdinary() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineOrdinary.kt"); } + @Test @TestMetadata("inlineSuspendOfCrossinlineSuspend.kt") public void testInlineSuspendOfCrossinlineSuspend() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineSuspend.kt"); } + @Test @TestMetadata("inlineSuspendOfNoinlineOrdinary.kt") public void testInlineSuspendOfNoinlineOrdinary() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineOrdinary.kt"); } + @Test @TestMetadata("inlineSuspendOfNoinlineSuspend.kt") public void testInlineSuspendOfNoinlineSuspend() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineSuspend.kt"); } + @Test @TestMetadata("inlineSuspendOfOrdinary.kt") public void testInlineSuspendOfOrdinary() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfOrdinary.kt"); } + @Test @TestMetadata("inlineSuspendOfSuspend.kt") public void testInlineSuspendOfSuspend() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfSuspend.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class StateMachine extends AbstractCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class StateMachine { + @Test public void testAllFilesPresentInStateMachine() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/stateMachine"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("crossingCoroutineBoundaries.kt") public void testCrossingCoroutineBoundaries() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/crossingCoroutineBoundaries.kt"); } + @Test @TestMetadata("independentInline.kt") public void testIndependentInline() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/independentInline.kt"); } + @Test @TestMetadata("innerLambda.kt") public void testInnerLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambda.kt"); } + @Test @TestMetadata("innerLambdaInsideLambda.kt") public void testInnerLambdaInsideLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaInsideLambda.kt"); } + @Test @TestMetadata("innerLambdaWithoutCrossinline.kt") public void testInnerLambdaWithoutCrossinline() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaWithoutCrossinline.kt"); } + @Test @TestMetadata("innerMadness.kt") public void testInnerMadness() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadness.kt"); } + @Test @TestMetadata("innerMadnessCallSite.kt") public void testInnerMadnessCallSite() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadnessCallSite.kt"); } + @Test @TestMetadata("innerObject.kt") public void testInnerObject() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObject.kt"); } + @Test @TestMetadata("innerObjectInsideInnerObject.kt") public void testInnerObjectInsideInnerObject() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectInsideInnerObject.kt"); } + @Test @TestMetadata("innerObjectRetransformation.kt") public void testInnerObjectRetransformation() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectRetransformation.kt"); } + @Test @TestMetadata("innerObjectSeveralFunctions.kt") public void testInnerObjectSeveralFunctions() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectSeveralFunctions.kt"); } + @Test @TestMetadata("innerObjectWithoutCapturingCrossinline.kt") public void testInnerObjectWithoutCapturingCrossinline() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectWithoutCapturingCrossinline.kt"); } + @Test @TestMetadata("insideObject.kt") public void testInsideObject() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/insideObject.kt"); } + @Test + @TestMetadata("kt30708.kt") + public void testKt30708() throws Exception { + runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/kt30708.kt"); + } + + @Test @TestMetadata("lambdaTransformation.kt") public void testLambdaTransformation() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/lambdaTransformation.kt"); } + @Test @TestMetadata("normalInline.kt") public void testNormalInline() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/normalInline.kt"); } + @Test @TestMetadata("numberOfSuspentions.kt") public void testNumberOfSuspentions() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/numberOfSuspentions.kt"); } + @Test @TestMetadata("objectInsideLambdas.kt") public void testObjectInsideLambdas() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/objectInsideLambdas.kt"); } + @Test @TestMetadata("oneInlineTwoCaptures.kt") public void testOneInlineTwoCaptures() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/oneInlineTwoCaptures.kt"); } + @Test @TestMetadata("passLambda.kt") public void testPassLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/passLambda.kt"); } + @Test @TestMetadata("passParameter.kt") public void testPassParameter() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/passParameter.kt"); } + @Test @TestMetadata("passParameterLambda.kt") public void testPassParameterLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/passParameterLambda.kt"); } + @Test @TestMetadata("unreachableSuspendMarker.kt") public void testUnreachableSuspendMarker() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/unreachableSuspendMarker.kt"); @@ -4459,110 +5105,121 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/syntheticAccessors") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class SyntheticAccessors extends AbstractCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class SyntheticAccessors { + @Test public void testAllFilesPresentInSyntheticAccessors() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/syntheticAccessors"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("constField.kt") public void testConstField() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/constField.kt"); } + @Test @TestMetadata("packagePrivateMembers.kt") public void testPackagePrivateMembers() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/packagePrivateMembers.kt"); } + @Test @TestMetadata("propertyModifiers.kt") public void testPropertyModifiers() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/propertyModifiers.kt"); } + @Test @TestMetadata("protectedMembers.kt") public void testProtectedMembers() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/protectedMembers.kt"); } + @Test @TestMetadata("protectedMembersFromSuper.kt") public void testProtectedMembersFromSuper() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/protectedMembersFromSuper.kt"); } + @Test @TestMetadata("superCall.kt") public void testSuperCall() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/superCall.kt"); } + @Test @TestMetadata("superCallFromMultipleSubclasses.kt") public void testSuperCallFromMultipleSubclasses() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/superCallFromMultipleSubclasses.kt"); } + @Test @TestMetadata("superProperty.kt") public void testSuperProperty() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/superProperty.kt"); } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class WithinInlineLambda extends AbstractCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class WithinInlineLambda { + @Test public void testAllFilesPresentInWithinInlineLambda() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("directFieldAccess.kt") public void testDirectFieldAccess() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/directFieldAccess.kt"); } + @Test @TestMetadata("directFieldAccessInCrossInline.kt") public void testDirectFieldAccessInCrossInline() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/directFieldAccessInCrossInline.kt"); } + @Test @TestMetadata("privateCall.kt") public void testPrivateCall() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/privateCall.kt"); } + @Test @TestMetadata("privateInCrossInline.kt") public void testPrivateInCrossInline() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/privateInCrossInline.kt"); } + @Test @TestMetadata("privateInDefaultStubArgument.kt") public void testPrivateInDefaultStubArgument() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/privateInDefaultStubArgument.kt"); } + @Test @TestMetadata("protectedInCrossinline.kt") public void testProtectedInCrossinline() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/protectedInCrossinline.kt"); } + @Test @TestMetadata("protectedMembersFromSuper.kt") public void testProtectedMembersFromSuper() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/protectedMembersFromSuper.kt"); } + @Test @TestMetadata("superCall.kt") public void testSuperCall() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/superCall.kt"); } + @Test @TestMetadata("superInCrossInline.kt") public void testSuperInCrossInline() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/superInCrossInline.kt"); @@ -4570,79 +5227,78 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/trait") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Trait extends AbstractCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Trait { + @Test public void testAllFilesPresentInTrait() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/trait"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("trait.kt") public void testTrait() throws Exception { runTest("compiler/testData/codegen/boxInline/trait/trait.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/tryCatchFinally") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class TryCatchFinally extends AbstractCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class TryCatchFinally { + @Test public void testAllFilesPresentInTryCatchFinally() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/tryCatchFinally"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("kt5863.kt") public void testKt5863() throws Exception { runTest("compiler/testData/codegen/boxInline/tryCatchFinally/kt5863.kt"); } + @Test @TestMetadata("tryCatch.kt") public void testTryCatch() throws Exception { runTest("compiler/testData/codegen/boxInline/tryCatchFinally/tryCatch.kt"); } + @Test @TestMetadata("tryCatch2.kt") public void testTryCatch2() throws Exception { runTest("compiler/testData/codegen/boxInline/tryCatchFinally/tryCatch2.kt"); } + @Test @TestMetadata("tryCatchFinally.kt") public void testTryCatchFinally() throws Exception { runTest("compiler/testData/codegen/boxInline/tryCatchFinally/tryCatchFinally.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/varargs") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Varargs extends AbstractCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Varargs { + @Test public void testAllFilesPresentInVarargs() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/varargs"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test @TestMetadata("kt17653.kt") public void testKt17653() throws Exception { runTest("compiler/testData/codegen/boxInline/varargs/kt17653.kt"); } + @Test @TestMetadata("varargAndDefaultParameters.kt") public void testVarargAndDefaultParameters() throws Exception { runTest("compiler/testData/codegen/boxInline/varargs/varargAndDefaultParameters.kt"); } + @Test @TestMetadata("varargAndDefaultParameters2.kt") public void testVarargAndDefaultParameters2() throws Exception { runTest("compiler/testData/codegen/boxInline/varargs/varargAndDefaultParameters2.kt"); diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java index f89dfecb257..a5b60776c46 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java @@ -28,7 +28,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/annotations") @TestDataPath("$PROJECT_ROOT") - public class Annotations extends AbstractIrBlackBoxCodegenTest { + public class Annotations { @Test public void testAllFilesPresentInAnnotations() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/annotations"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -124,18 +124,66 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/annotations/delegatedPropertySetter.kt"); } + @Test + @TestMetadata("divisionByZeroInJava.kt") + public void testDivisionByZeroInJava() throws Exception { + runTest("compiler/testData/codegen/box/annotations/divisionByZeroInJava.kt"); + } + @Test @TestMetadata("fileClassWithFileAnnotation.kt") public void testFileClassWithFileAnnotation() throws Exception { runTest("compiler/testData/codegen/box/annotations/fileClassWithFileAnnotation.kt"); } + @Test + @TestMetadata("javaAnnotationArrayValueDefault.kt") + public void testJavaAnnotationArrayValueDefault() throws Exception { + runTest("compiler/testData/codegen/box/annotations/javaAnnotationArrayValueDefault.kt"); + } + + @Test + @TestMetadata("javaAnnotationArrayValueNoDefault.kt") + public void testJavaAnnotationArrayValueNoDefault() throws Exception { + runTest("compiler/testData/codegen/box/annotations/javaAnnotationArrayValueNoDefault.kt"); + } + + @Test + @TestMetadata("javaAnnotationCall.kt") + public void testJavaAnnotationCall() throws Exception { + runTest("compiler/testData/codegen/box/annotations/javaAnnotationCall.kt"); + } + + @Test + @TestMetadata("javaAnnotationDefault.kt") + public void testJavaAnnotationDefault() throws Exception { + runTest("compiler/testData/codegen/box/annotations/javaAnnotationDefault.kt"); + } + @Test @TestMetadata("javaAnnotationOnProperty.kt") public void testJavaAnnotationOnProperty() throws Exception { runTest("compiler/testData/codegen/box/annotations/javaAnnotationOnProperty.kt"); } + @Test + @TestMetadata("javaNegativePropertyAsAnnotationParameter.kt") + public void testJavaNegativePropertyAsAnnotationParameter() throws Exception { + runTest("compiler/testData/codegen/box/annotations/javaNegativePropertyAsAnnotationParameter.kt"); + } + + @Test + @TestMetadata("javaPropertyAsAnnotationParameter.kt") + public void testJavaPropertyAsAnnotationParameter() throws Exception { + runTest("compiler/testData/codegen/box/annotations/javaPropertyAsAnnotationParameter.kt"); + } + + @Test + @TestMetadata("javaPropertyWithIntInitializer.kt") + public void testJavaPropertyWithIntInitializer() throws Exception { + runTest("compiler/testData/codegen/box/annotations/javaPropertyWithIntInitializer.kt"); + } + @Test @TestMetadata("jvmAnnotationFlags.kt") public void testJvmAnnotationFlags() throws Exception { @@ -220,6 +268,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/annotations/resolveWithLowPriorityAnnotation.kt"); } + @Test + @TestMetadata("retentionInJava.kt") + public void testRetentionInJava() throws Exception { + runTest("compiler/testData/codegen/box/annotations/retentionInJava.kt"); + } + @Test @TestMetadata("singleAssignmentToVarargInAnnotation.kt") public void testSingleAssignmentToVarargInAnnotation() throws Exception { @@ -265,7 +319,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/annotations/annotatedLambda") @TestDataPath("$PROJECT_ROOT") - public class AnnotatedLambda extends AbstractIrBlackBoxCodegenTest { + public class AnnotatedLambda { @Test public void testAllFilesPresentInAnnotatedLambda() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/annotations/annotatedLambda"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -302,10 +356,56 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes } } + @Nested + @TestMetadata("compiler/testData/codegen/box/annotations/kClassMapping") + @TestDataPath("$PROJECT_ROOT") + public class KClassMapping { + @Test + public void testAllFilesPresentInKClassMapping() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/annotations/kClassMapping"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @Test + @TestMetadata("arrayClassParameter.kt") + public void testArrayClassParameter() throws Exception { + runTest("compiler/testData/codegen/box/annotations/kClassMapping/arrayClassParameter.kt"); + } + + @Test + @TestMetadata("arrayClassParameterOnJavaClass.kt") + public void testArrayClassParameterOnJavaClass() throws Exception { + runTest("compiler/testData/codegen/box/annotations/kClassMapping/arrayClassParameterOnJavaClass.kt"); + } + + @Test + @TestMetadata("classParameter.kt") + public void testClassParameter() throws Exception { + runTest("compiler/testData/codegen/box/annotations/kClassMapping/classParameter.kt"); + } + + @Test + @TestMetadata("classParameterOnJavaClass.kt") + public void testClassParameterOnJavaClass() throws Exception { + runTest("compiler/testData/codegen/box/annotations/kClassMapping/classParameterOnJavaClass.kt"); + } + + @Test + @TestMetadata("varargClassParameter.kt") + public void testVarargClassParameter() throws Exception { + runTest("compiler/testData/codegen/box/annotations/kClassMapping/varargClassParameter.kt"); + } + + @Test + @TestMetadata("varargClassParameterOnJavaClass.kt") + public void testVarargClassParameterOnJavaClass() throws Exception { + runTest("compiler/testData/codegen/box/annotations/kClassMapping/varargClassParameterOnJavaClass.kt"); + } + } + @Nested @TestMetadata("compiler/testData/codegen/box/annotations/typeAnnotations") @TestDataPath("$PROJECT_ROOT") - public class TypeAnnotations extends AbstractIrBlackBoxCodegenTest { + public class TypeAnnotations { @Test public void testAllFilesPresentInTypeAnnotations() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/annotations/typeAnnotations"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -323,6 +423,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/annotations/typeAnnotations/implicitReturn.kt"); } + @Test + @TestMetadata("implicitReturnAgainstCompiled.kt") + public void testImplicitReturnAgainstCompiled() throws Exception { + runTest("compiler/testData/codegen/box/annotations/typeAnnotations/implicitReturnAgainstCompiled.kt"); + } + @Test @TestMetadata("kt41484.kt") public void testKt41484() throws Exception { @@ -352,7 +458,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/argumentOrder") @TestDataPath("$PROJECT_ROOT") - public class ArgumentOrder extends AbstractIrBlackBoxCodegenTest { + public class ArgumentOrder { @Test public void testAllFilesPresentInArgumentOrder() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/argumentOrder"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -458,7 +564,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/arrays") @TestDataPath("$PROJECT_ROOT") - public class Arrays extends AbstractIrBlackBoxCodegenTest { + public class Arrays { @Test public void testAllFilesPresentInArrays() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/arrays"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -845,7 +951,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/arrays/arraysOfInlineClass") @TestDataPath("$PROJECT_ROOT") - public class ArraysOfInlineClass extends AbstractIrBlackBoxCodegenTest { + public class ArraysOfInlineClass { @Test @TestMetadata("accessArrayOfInlineClass.kt") public void testAccessArrayOfInlineClass() throws Exception { @@ -873,7 +979,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/arrays/forInReversed") @TestDataPath("$PROJECT_ROOT") - public class ForInReversed extends AbstractIrBlackBoxCodegenTest { + public class ForInReversed { @Test public void testAllFilesPresentInForInReversed() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/arrays/forInReversed"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -907,7 +1013,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/arrays/multiDecl") @TestDataPath("$PROJECT_ROOT") - public class MultiDecl extends AbstractIrBlackBoxCodegenTest { + public class MultiDecl { @Test public void testAllFilesPresentInMultiDecl() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/arrays/multiDecl"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -964,7 +1070,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/arrays/multiDecl/int") @TestDataPath("$PROJECT_ROOT") - public class Int extends AbstractIrBlackBoxCodegenTest { + public class Int { @Test public void testAllFilesPresentInInt() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/arrays/multiDecl/int"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -998,7 +1104,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/arrays/multiDecl/long") @TestDataPath("$PROJECT_ROOT") - public class Long extends AbstractIrBlackBoxCodegenTest { + public class Long { @Test public void testAllFilesPresentInLong() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/arrays/multiDecl/long"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -1034,7 +1140,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/assert") @TestDataPath("$PROJECT_ROOT") - public class Assert extends AbstractIrBlackBoxCodegenTest { + public class Assert { @Test public void testAllFilesPresentInAssert() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/assert"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -1055,7 +1161,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/assert/jvm") @TestDataPath("$PROJECT_ROOT") - public class Jvm extends AbstractIrBlackBoxCodegenTest { + public class Jvm { @Test public void testAllFilesPresentInJvm() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/assert/jvm"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -1198,7 +1304,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/binaryOp") @TestDataPath("$PROJECT_ROOT") - public class BinaryOp extends AbstractIrBlackBoxCodegenTest { + public class BinaryOp { @Test public void testAllFilesPresentInBinaryOp() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/binaryOp"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -1364,7 +1470,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/boxingOptimization") @TestDataPath("$PROJECT_ROOT") - public class BoxingOptimization extends AbstractIrBlackBoxCodegenTest { + public class BoxingOptimization { @Test public void testAllFilesPresentInBoxingOptimization() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/boxingOptimization"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -1560,7 +1666,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/bridges") @TestDataPath("$PROJECT_ROOT") - public class Bridges extends AbstractIrBlackBoxCodegenTest { + public class Bridges { @Test @TestMetadata("abstractOverrideBridge.kt") public void testAbstractOverrideBridge() throws Exception { @@ -1917,7 +2023,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/bridges/substitutionInSuperClass") @TestDataPath("$PROJECT_ROOT") - public class SubstitutionInSuperClass extends AbstractIrBlackBoxCodegenTest { + public class SubstitutionInSuperClass { @Test @TestMetadata("abstractFun.kt") public void testAbstractFun() throws Exception { @@ -1994,7 +2100,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/builtinStubMethods") @TestDataPath("$PROJECT_ROOT") - public class BuiltinStubMethods extends AbstractIrBlackBoxCodegenTest { + public class BuiltinStubMethods { @Test @TestMetadata("abstractMember.kt") public void testAbstractMember() throws Exception { @@ -2141,7 +2247,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/builtinStubMethods/extendJavaCollections") @TestDataPath("$PROJECT_ROOT") - public class ExtendJavaCollections extends AbstractIrBlackBoxCodegenTest { + public class ExtendJavaCollections { @Test @TestMetadata("abstractList.kt") public void testAbstractList() throws Exception { @@ -2193,7 +2299,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/builtinStubMethods/mapGetOrDefault") @TestDataPath("$PROJECT_ROOT") - public class MapGetOrDefault extends AbstractIrBlackBoxCodegenTest { + public class MapGetOrDefault { @Test public void testAllFilesPresentInMapGetOrDefault() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builtinStubMethods/mapGetOrDefault"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -2221,7 +2327,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/builtinStubMethods/mapRemove") @TestDataPath("$PROJECT_ROOT") - public class MapRemove extends AbstractIrBlackBoxCodegenTest { + public class MapRemove { @Test public void testAllFilesPresentInMapRemove() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builtinStubMethods/mapRemove"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -2256,7 +2362,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/callableReference") @TestDataPath("$PROJECT_ROOT") - public class CallableReference extends AbstractIrBlackBoxCodegenTest { + public class CallableReference { @Test public void testAllFilesPresentInCallableReference() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/callableReference"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -2274,6 +2380,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/callableReference/classesAreSynthetic.kt"); } + @Test + @TestMetadata("constructor.kt") + public void testConstructor() throws Exception { + runTest("compiler/testData/codegen/box/callableReference/constructor.kt"); + } + @Test @TestMetadata("genericConstructorReference.kt") public void testGenericConstructorReference() throws Exception { @@ -2292,6 +2404,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/callableReference/javaField.kt"); } + @Test + @TestMetadata("kt16412.kt") + public void testKt16412() throws Exception { + runTest("compiler/testData/codegen/box/callableReference/kt16412.kt"); + } + @Test @TestMetadata("kt16752.kt") public void testKt16752() throws Exception { @@ -2340,10 +2458,28 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/callableReference/optimizedSuperclasses_before.kt"); } + @Test + @TestMetadata("publicFinalField.kt") + public void testPublicFinalField() throws Exception { + runTest("compiler/testData/codegen/box/callableReference/publicFinalField.kt"); + } + + @Test + @TestMetadata("publicMutableField.kt") + public void testPublicMutableField() throws Exception { + runTest("compiler/testData/codegen/box/callableReference/publicMutableField.kt"); + } + + @Test + @TestMetadata("staticMethod.kt") + public void testStaticMethod() throws Exception { + runTest("compiler/testData/codegen/box/callableReference/staticMethod.kt"); + } + @Nested @TestMetadata("compiler/testData/codegen/box/callableReference/adaptedReferences") @TestDataPath("$PROJECT_ROOT") - public class AdaptedReferences extends AbstractIrBlackBoxCodegenTest { + public class AdaptedReferences { @Test public void testAllFilesPresentInAdaptedReferences() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/callableReference/adaptedReferences"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -2514,7 +2650,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/callableReference/adaptedReferences/suspendConversion") @TestDataPath("$PROJECT_ROOT") - public class SuspendConversion extends AbstractIrBlackBoxCodegenTest { + public class SuspendConversion { @Test @TestMetadata("adaptedWithCoercionToUnit.kt") public void testAdaptedWithCoercionToUnit() throws Exception { @@ -2615,7 +2751,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/callableReference/bound") @TestDataPath("$PROJECT_ROOT") - public class Bound extends AbstractIrBlackBoxCodegenTest { + public class Bound { @Test @TestMetadata("adapted.kt") public void testAdapted() throws Exception { @@ -2792,7 +2928,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/callableReference/bound/equals") @TestDataPath("$PROJECT_ROOT") - public class Equals extends AbstractIrBlackBoxCodegenTest { + public class Equals { @Test public void testAllFilesPresentInEquals() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/callableReference/bound/equals"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -2827,7 +2963,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/callableReference/equality") @TestDataPath("$PROJECT_ROOT") - public class Equality extends AbstractIrBlackBoxCodegenTest { + public class Equality { @Test public void testAllFilesPresentInEquality() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/callableReference/equality"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -2909,7 +3045,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/callableReference/function") @TestDataPath("$PROJECT_ROOT") - public class Function extends AbstractIrBlackBoxCodegenTest { + public class Function { @Test @TestMetadata("abstractClassMember.kt") public void testAbstractClassMember() throws Exception { @@ -3248,7 +3384,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/callableReference/function/local") @TestDataPath("$PROJECT_ROOT") - public class Local extends AbstractIrBlackBoxCodegenTest { + public class Local { @Test public void testAllFilesPresentInLocal() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/callableReference/function/local"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -3379,7 +3515,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/callableReference/property") @TestDataPath("$PROJECT_ROOT") - public class Property extends AbstractIrBlackBoxCodegenTest { + public class Property { @Test @TestMetadata("accessViaSubclass.kt") public void testAccessViaSubclass() throws Exception { @@ -3569,7 +3705,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/callableReference/serializability") @TestDataPath("$PROJECT_ROOT") - public class Serializability extends AbstractIrBlackBoxCodegenTest { + public class Serializability { @Test @TestMetadata("adaptedReferences.kt") public void testAdaptedReferences() throws Exception { @@ -3616,7 +3752,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/casts") @TestDataPath("$PROJECT_ROOT") - public class Casts extends AbstractIrBlackBoxCodegenTest { + public class Casts { @Test public void testAllFilesPresentInCasts() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/casts"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -3775,7 +3911,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/casts/functions") @TestDataPath("$PROJECT_ROOT") - public class Functions extends AbstractIrBlackBoxCodegenTest { + public class Functions { @Test public void testAllFilesPresentInFunctions() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/casts/functions"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -3863,7 +3999,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/casts/javaInterop") @TestDataPath("$PROJECT_ROOT") - public class JavaInterop extends AbstractIrBlackBoxCodegenTest { + public class JavaInterop { @Test public void testAllFilesPresentInJavaInterop() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/casts/javaInterop"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -3957,7 +4093,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/casts/literalExpressionAsGenericArgument") @TestDataPath("$PROJECT_ROOT") - public class LiteralExpressionAsGenericArgument extends AbstractIrBlackBoxCodegenTest { + public class LiteralExpressionAsGenericArgument { @Test public void testAllFilesPresentInLiteralExpressionAsGenericArgument() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/casts/literalExpressionAsGenericArgument"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -4009,7 +4145,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/casts/mutableCollections") @TestDataPath("$PROJECT_ROOT") - public class MutableCollections extends AbstractIrBlackBoxCodegenTest { + public class MutableCollections { @Test public void testAllFilesPresentInMutableCollections() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/casts/mutableCollections"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -4068,7 +4204,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/checkcastOptimization") @TestDataPath("$PROJECT_ROOT") - public class CheckcastOptimization extends AbstractIrBlackBoxCodegenTest { + public class CheckcastOptimization { @Test public void testAllFilesPresentInCheckcastOptimization() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/checkcastOptimization"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -4090,7 +4226,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/classLiteral") @TestDataPath("$PROJECT_ROOT") - public class ClassLiteral extends AbstractIrBlackBoxCodegenTest { + public class ClassLiteral { @Test public void testAllFilesPresentInClassLiteral() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/classLiteral"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -4111,7 +4247,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/classLiteral/bound") @TestDataPath("$PROJECT_ROOT") - public class Bound extends AbstractIrBlackBoxCodegenTest { + public class Bound { @Test public void testAllFilesPresentInBound() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/classLiteral/bound"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -4151,7 +4287,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/classLiteral/java") @TestDataPath("$PROJECT_ROOT") - public class Java extends AbstractIrBlackBoxCodegenTest { + public class Java { @Test public void testAllFilesPresentInJava() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/classLiteral/java"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -4210,7 +4346,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/classes") @TestDataPath("$PROJECT_ROOT") - public class Classes extends AbstractIrBlackBoxCodegenTest { + public class Classes { @Test public void testAllFilesPresentInClasses() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/classes"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -4933,7 +5069,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/classes/inner") @TestDataPath("$PROJECT_ROOT") - public class Inner extends AbstractIrBlackBoxCodegenTest { + public class Inner { @Test public void testAllFilesPresentInInner() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/classes/inner"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -4986,7 +5122,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/closures") @TestDataPath("$PROJECT_ROOT") - public class Closures extends AbstractIrBlackBoxCodegenTest { + public class Closures { @Test public void testAllFilesPresentInClosures() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/closures"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -5124,6 +5260,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/closures/kt2151.kt"); } + @Test + @TestMetadata("kt23881.kt") + public void testKt23881() throws Exception { + runTest("compiler/testData/codegen/box/closures/kt23881.kt"); + } + @Test @TestMetadata("kt3152.kt") public void testKt3152() throws Exception { @@ -5271,7 +5413,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall") @TestDataPath("$PROJECT_ROOT") - public class CaptureInSuperConstructorCall extends AbstractIrBlackBoxCodegenTest { + public class CaptureInSuperConstructorCall { @Test public void testAllFilesPresentInCaptureInSuperConstructorCall() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/closures/captureInSuperConstructorCall"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -5473,7 +5615,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/closures/captureOuterProperty") @TestDataPath("$PROJECT_ROOT") - public class CaptureOuterProperty extends AbstractIrBlackBoxCodegenTest { + public class CaptureOuterProperty { @Test public void testAllFilesPresentInCaptureOuterProperty() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/closures/captureOuterProperty"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -5531,7 +5673,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/closures/capturedVarsOptimization") @TestDataPath("$PROJECT_ROOT") - public class CapturedVarsOptimization extends AbstractIrBlackBoxCodegenTest { + public class CapturedVarsOptimization { @Test public void testAllFilesPresentInCapturedVarsOptimization() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/closures/capturedVarsOptimization"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -5613,7 +5755,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/closures/closureInsideClosure") @TestDataPath("$PROJECT_ROOT") - public class ClosureInsideClosure extends AbstractIrBlackBoxCodegenTest { + public class ClosureInsideClosure { @Test public void testAllFilesPresentInClosureInsideClosure() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/closures/closureInsideClosure"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -5660,7 +5802,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/collectionLiterals") @TestDataPath("$PROJECT_ROOT") - public class CollectionLiterals extends AbstractIrBlackBoxCodegenTest { + public class CollectionLiterals { @Test public void testAllFilesPresentInCollectionLiterals() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/collectionLiterals"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -5694,7 +5836,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/collections") @TestDataPath("$PROJECT_ROOT") - public class Collections extends AbstractIrBlackBoxCodegenTest { + public class Collections { @Test @TestMetadata("addCollectionStubWithCovariantOverride.kt") public void testAddCollectionStubWithCovariantOverride() throws Exception { @@ -5908,7 +6050,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/companion") @TestDataPath("$PROJECT_ROOT") - public class Companion extends AbstractIrBlackBoxCodegenTest { + public class Companion { @Test public void testAllFilesPresentInCompanion() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/companion"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -5930,7 +6072,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/compatibility") @TestDataPath("$PROJECT_ROOT") - public class Compatibility extends AbstractIrBlackBoxCodegenTest { + public class Compatibility { @Test public void testAllFilesPresentInCompatibility() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/compatibility"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -5943,10 +6085,884 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes } } + @Nested + @TestMetadata("compiler/testData/codegen/box/compileKotlinAgainstKotlin") + @TestDataPath("$PROJECT_ROOT") + public class CompileKotlinAgainstKotlin { + @Test + public void testAllFilesPresentInCompileKotlinAgainstKotlin() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/compileKotlinAgainstKotlin"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @Test + @TestMetadata("annotationInInterface.kt") + public void testAnnotationInInterface() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/annotationInInterface.kt"); + } + + @Test + @TestMetadata("annotationOnTypeUseInTypeAlias.kt") + public void testAnnotationOnTypeUseInTypeAlias() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/annotationOnTypeUseInTypeAlias.kt"); + } + + @Test + @TestMetadata("annotationsOnTypeAliases.kt") + public void testAnnotationsOnTypeAliases() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/annotationsOnTypeAliases.kt"); + } + + @Test + @TestMetadata("callDeserializedPropertyOnInlineClassType.kt") + public void testCallDeserializedPropertyOnInlineClassType() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/callDeserializedPropertyOnInlineClassType.kt"); + } + + @Test + @TestMetadata("callDeserializedPropertyOnInlineClassTypeOldMangling.kt") + public void testCallDeserializedPropertyOnInlineClassTypeOldMangling() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/callDeserializedPropertyOnInlineClassTypeOldMangling.kt"); + } + + @Test + @TestMetadata("callsToMultifileClassFromOtherPackage.kt") + public void testCallsToMultifileClassFromOtherPackage() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/callsToMultifileClassFromOtherPackage.kt"); + } + + @Test + @TestMetadata("clashingFakeOverrideSignatures.kt") + public void testClashingFakeOverrideSignatures() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/clashingFakeOverrideSignatures.kt"); + } + + @Test + @TestMetadata("classInObject.kt") + public void testClassInObject() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/classInObject.kt"); + } + + @Test + @TestMetadata("companionObjectInEnum.kt") + public void testCompanionObjectInEnum() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/companionObjectInEnum.kt"); + } + + @Test + @TestMetadata("companionObjectMember.kt") + public void testCompanionObjectMember() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/companionObjectMember.kt"); + } + + @Test + @TestMetadata("constPropertyReferenceFromMultifileClass.kt") + public void testConstPropertyReferenceFromMultifileClass() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/constPropertyReferenceFromMultifileClass.kt"); + } + + @Test + @TestMetadata("constructorVararg.kt") + public void testConstructorVararg() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/constructorVararg.kt"); + } + + @Test + @TestMetadata("constructorWithInlineClassParametersInBinaryDependencies.kt") + public void testConstructorWithInlineClassParametersInBinaryDependencies() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/constructorWithInlineClassParametersInBinaryDependencies.kt"); + } + + @Test + @TestMetadata("constructorWithInlineClassParametersInBinaryDependenciesOldMangling.kt") + public void testConstructorWithInlineClassParametersInBinaryDependenciesOldMangling() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/constructorWithInlineClassParametersInBinaryDependenciesOldMangling.kt"); + } + + @Test + @TestMetadata("copySamOnInline.kt") + public void testCopySamOnInline() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/copySamOnInline.kt"); + } + + @Test + @TestMetadata("copySamOnInline2.kt") + public void testCopySamOnInline2() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/copySamOnInline2.kt"); + } + + @Test + @TestMetadata("coroutinesBinary.kt") + public void testCoroutinesBinary() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/coroutinesBinary.kt"); + } + + @Test + @TestMetadata("defaultConstructor.kt") + public void testDefaultConstructor() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/defaultConstructor.kt"); + } + + @Test + @TestMetadata("defaultLambdaRegeneration.kt") + public void testDefaultLambdaRegeneration() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/defaultLambdaRegeneration.kt"); + } + + @Test + @TestMetadata("defaultLambdaRegeneration2.kt") + public void testDefaultLambdaRegeneration2() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/defaultLambdaRegeneration2.kt"); + } + + @Test + @TestMetadata("defaultWithInlineClassAndReceivers.kt") + public void testDefaultWithInlineClassAndReceivers() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/defaultWithInlineClassAndReceivers.kt"); + } + + @Test + @TestMetadata("defaultWithInlineClassAndReceiversOldMangling.kt") + public void testDefaultWithInlineClassAndReceiversOldMangling() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/defaultWithInlineClassAndReceiversOldMangling.kt"); + } + + @Test + @TestMetadata("delegatedDefault.kt") + public void testDelegatedDefault() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/delegatedDefault.kt"); + } + + @Test + @TestMetadata("delegationAndAnnotations.kt") + public void testDelegationAndAnnotations() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/delegationAndAnnotations.kt"); + } + + @Test + @TestMetadata("doublyNestedClass.kt") + public void testDoublyNestedClass() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/doublyNestedClass.kt"); + } + + @Test + @TestMetadata("enum.kt") + public void testEnum() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/enum.kt"); + } + + @Test + @TestMetadata("expectClassActualTypeAlias.kt") + public void testExpectClassActualTypeAlias() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/expectClassActualTypeAlias.kt"); + } + + @Test + @TestMetadata("fakeOverridesForIntersectionTypes.kt") + public void testFakeOverridesForIntersectionTypes() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/fakeOverridesForIntersectionTypes.kt"); + } + + @Test + @TestMetadata("importCompanion.kt") + public void testImportCompanion() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/importCompanion.kt"); + } + + @Test + @TestMetadata("inlineClassFakeOverrideMangling.kt") + public void testInlineClassFakeOverrideMangling() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/inlineClassFakeOverrideMangling.kt"); + } + + @Test + @TestMetadata("inlineClassFakeOverrideManglingOldMangling.kt") + public void testInlineClassFakeOverrideManglingOldMangling() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/inlineClassFakeOverrideManglingOldMangling.kt"); + } + + @Test + @TestMetadata("inlineClassFromBinaryDependencies.kt") + public void testInlineClassFromBinaryDependencies() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/inlineClassFromBinaryDependencies.kt"); + } + + @Test + @TestMetadata("inlineClassFromBinaryDependenciesOldMangling.kt") + public void testInlineClassFromBinaryDependenciesOldMangling() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/inlineClassFromBinaryDependenciesOldMangling.kt"); + } + + @Test + @TestMetadata("inlineClassInlineFunctionCall.kt") + public void testInlineClassInlineFunctionCall() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/inlineClassInlineFunctionCall.kt"); + } + + @Test + @TestMetadata("inlineClassInlineFunctionCallOldMangling.kt") + public void testInlineClassInlineFunctionCallOldMangling() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/inlineClassInlineFunctionCallOldMangling.kt"); + } + + @Test + @TestMetadata("inlineClassInlineProperty.kt") + public void testInlineClassInlineProperty() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/inlineClassInlineProperty.kt"); + } + + @Test + @TestMetadata("inlineClassInlinePropertyOldMangling.kt") + public void testInlineClassInlinePropertyOldMangling() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/inlineClassInlinePropertyOldMangling.kt"); + } + + @Test + @TestMetadata("inlineClassesOldMangling.kt") + public void testInlineClassesOldMangling() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/inlineClassesOldMangling.kt"); + } + + @Test + @TestMetadata("inlinedConstants.kt") + public void testInlinedConstants() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/inlinedConstants.kt"); + } + + @Test + @TestMetadata("innerClassConstructor.kt") + public void testInnerClassConstructor() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/innerClassConstructor.kt"); + } + + @Test + @TestMetadata("interfaceDelegationAndBridgesProcessing.kt") + public void testInterfaceDelegationAndBridgesProcessing() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/interfaceDelegationAndBridgesProcessing.kt"); + } + + @Test + @TestMetadata("internalSetterOverridden.kt") + public void testInternalSetterOverridden() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/internalSetterOverridden.kt"); + } + + @Test + @TestMetadata("internalWithDefaultArgs.kt") + public void testInternalWithDefaultArgs() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/internalWithDefaultArgs.kt"); + } + + @Test + @TestMetadata("internalWithInlineClass.kt") + public void testInternalWithInlineClass() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/internalWithInlineClass.kt"); + } + + @Test + @TestMetadata("internalWithOtherModuleName.kt") + public void testInternalWithOtherModuleName() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/internalWithOtherModuleName.kt"); + } + + @Test + @TestMetadata("intersectionOverrideProperies.kt") + public void testIntersectionOverrideProperies() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/intersectionOverrideProperies.kt"); + } + + @Test + @TestMetadata("jvmField.kt") + public void testJvmField() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvmField.kt"); + } + + @Test + @TestMetadata("jvmFieldInAnnotationCompanion.kt") + public void testJvmFieldInAnnotationCompanion() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvmFieldInAnnotationCompanion.kt"); + } + + @Test + @TestMetadata("jvmFieldInConstructor.kt") + public void testJvmFieldInConstructor() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvmFieldInConstructor.kt"); + } + + @Test + @TestMetadata("jvmFieldInInterfaceCompanion.kt") + public void testJvmFieldInInterfaceCompanion() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvmFieldInInterfaceCompanion.kt"); + } + + @Test + @TestMetadata("jvmNames.kt") + public void testJvmNames() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvmNames.kt"); + } + + @Test + @TestMetadata("jvmPackageName.kt") + public void testJvmPackageName() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvmPackageName.kt"); + } + + @Test + @TestMetadata("jvmPackageNameInRootPackage.kt") + public void testJvmPackageNameInRootPackage() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvmPackageNameInRootPackage.kt"); + } + + @Test + @TestMetadata("jvmPackageNameMultifileClass.kt") + public void testJvmPackageNameMultifileClass() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvmPackageNameMultifileClass.kt"); + } + + @Test + @TestMetadata("jvmPackageNameWithJvmName.kt") + public void testJvmPackageNameWithJvmName() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvmPackageNameWithJvmName.kt"); + } + + @Test + @TestMetadata("jvmStaticInObject.kt") + public void testJvmStaticInObject() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvmStaticInObject.kt"); + } + + @Test + @TestMetadata("jvmStaticInObjectPropertyReference.kt") + public void testJvmStaticInObjectPropertyReference() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvmStaticInObjectPropertyReference.kt"); + } + + @Test + @TestMetadata("kotlinPropertyAsAnnotationParameter.kt") + public void testKotlinPropertyAsAnnotationParameter() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/kotlinPropertyAsAnnotationParameter.kt"); + } + + @Test + @TestMetadata("kt14012.kt") + public void testKt14012() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/kt14012.kt"); + } + + @Test + @TestMetadata("kt14012_multi.kt") + public void testKt14012_multi() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/kt14012_multi.kt"); + } + + @Test + @TestMetadata("kt21775.kt") + public void testKt21775() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/kt21775.kt"); + } + + @Test + @TestMetadata("metadataForMembersInLocalClassInInitializer.kt") + public void testMetadataForMembersInLocalClassInInitializer() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/metadataForMembersInLocalClassInInitializer.kt"); + } + + @Test + @TestMetadata("multifileClassInlineFunctionAccessingProperty.kt") + public void testMultifileClassInlineFunctionAccessingProperty() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/multifileClassInlineFunctionAccessingProperty.kt"); + } + + @Test + @TestMetadata("multifileClassWithTypealias.kt") + public void testMultifileClassWithTypealias() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/multifileClassWithTypealias.kt"); + } + + @Test + @TestMetadata("nestedClass.kt") + public void testNestedClass() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/nestedClass.kt"); + } + + @Test + @TestMetadata("nestedClassInAnnotationArgument.kt") + public void testNestedClassInAnnotationArgument() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/nestedClassInAnnotationArgument.kt"); + } + + @Test + @TestMetadata("nestedEnum.kt") + public void testNestedEnum() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/nestedEnum.kt"); + } + + @Test + @TestMetadata("nestedFunctionTypeAliasExpansion.kt") + public void testNestedFunctionTypeAliasExpansion() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/nestedFunctionTypeAliasExpansion.kt"); + } + + @Test + @TestMetadata("nestedObject.kt") + public void testNestedObject() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/nestedObject.kt"); + } + + @Test + @TestMetadata("nestedTypeAliasExpansion.kt") + public void testNestedTypeAliasExpansion() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/nestedTypeAliasExpansion.kt"); + } + + @Test + @TestMetadata("noExplicitOverrideForDelegatedFromSupertype.kt") + public void testNoExplicitOverrideForDelegatedFromSupertype() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/noExplicitOverrideForDelegatedFromSupertype.kt"); + } + + @Test + @TestMetadata("optionalAnnotation.kt") + public void testOptionalAnnotation() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/optionalAnnotation.kt"); + } + + @Test + @TestMetadata("platformTypes.kt") + public void testPlatformTypes() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/platformTypes.kt"); + } + + @Test + @TestMetadata("privateCompanionObjectValInDifferentModule.kt") + public void testPrivateCompanionObjectValInDifferentModule() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/privateCompanionObjectValInDifferentModule.kt"); + } + + @Test + @TestMetadata("privateCompanionObjectValInDifferentModuleOldMangling.kt") + public void testPrivateCompanionObjectValInDifferentModuleOldMangling() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/privateCompanionObjectValInDifferentModuleOldMangling.kt"); + } + + @Test + @TestMetadata("privateTopLevelValInDifferentModule.kt") + public void testPrivateTopLevelValInDifferentModule() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/privateTopLevelValInDifferentModule.kt"); + } + + @Test + @TestMetadata("privateTopLevelValInDifferentModuleOldMangling.kt") + public void testPrivateTopLevelValInDifferentModuleOldMangling() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/privateTopLevelValInDifferentModuleOldMangling.kt"); + } + + @Test + @TestMetadata("propertyReference.kt") + public void testPropertyReference() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/propertyReference.kt"); + } + + @Test + @TestMetadata("recursiveGeneric.kt") + public void testRecursiveGeneric() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/recursiveGeneric.kt"); + } + + @Test + @TestMetadata("reflectTopLevelFunctionOtherFile.kt") + public void testReflectTopLevelFunctionOtherFile() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/reflectTopLevelFunctionOtherFile.kt"); + } + + @Test + @TestMetadata("sealedClass.kt") + public void testSealedClass() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/sealedClass.kt"); + } + + @Test + @TestMetadata("secondaryConstructors.kt") + public void testSecondaryConstructors() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/secondaryConstructors.kt"); + } + + @Test + @TestMetadata("simple.kt") + public void testSimple() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/simple.kt"); + } + + @Test + @TestMetadata("simpleValAnonymousObject.kt") + public void testSimpleValAnonymousObject() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/simpleValAnonymousObject.kt"); + } + + @Test + @TestMetadata("specialBridgesInDependencies.kt") + public void testSpecialBridgesInDependencies() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/specialBridgesInDependencies.kt"); + } + + @Test + @TestMetadata("starImportEnum.kt") + public void testStarImportEnum() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/starImportEnum.kt"); + } + + @Test + @TestMetadata("suspendFunWithDefaultMangling.kt") + public void testSuspendFunWithDefaultMangling() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/suspendFunWithDefaultMangling.kt"); + } + + @Test + @TestMetadata("suspendFunWithDefaultOldMangling.kt") + public void testSuspendFunWithDefaultOldMangling() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/suspendFunWithDefaultOldMangling.kt"); + } + + @Test + @TestMetadata("targetedJvmName.kt") + public void testTargetedJvmName() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/targetedJvmName.kt"); + } + + @Test + @TestMetadata("typeAliasesKt13181.kt") + public void testTypeAliasesKt13181() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/typeAliasesKt13181.kt"); + } + + @Test + @TestMetadata("unsignedTypesInAnnotations.kt") + public void testUnsignedTypesInAnnotations() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/unsignedTypesInAnnotations.kt"); + } + + @Test + @TestMetadata("useDeserializedFunInterface.kt") + public void testUseDeserializedFunInterface() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/useDeserializedFunInterface.kt"); + } + + @Nested + @TestMetadata("compiler/testData/codegen/box/compileKotlinAgainstKotlin/fir") + @TestDataPath("$PROJECT_ROOT") + public class Fir { + @Test + public void testAllFilesPresentInFir() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/compileKotlinAgainstKotlin/fir"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @Test + @TestMetadata("AnonymousObjectInProperty.kt") + public void testAnonymousObjectInProperty() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/fir/AnonymousObjectInProperty.kt"); + } + + @Test + @TestMetadata("ExistingSymbolInFakeOverride.kt") + public void testExistingSymbolInFakeOverride() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/fir/ExistingSymbolInFakeOverride.kt"); + } + + @Test + @TestMetadata("IncrementalCompilerRunner.kt") + public void testIncrementalCompilerRunner() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/fir/IncrementalCompilerRunner.kt"); + } + + @Test + @TestMetadata("IrConstAcceptMultiModule.kt") + public void testIrConstAcceptMultiModule() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/fir/IrConstAcceptMultiModule.kt"); + } + + @Test + @TestMetadata("LibraryProperty.kt") + public void testLibraryProperty() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/fir/LibraryProperty.kt"); + } + } + + @Nested + @TestMetadata("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8") + @TestDataPath("$PROJECT_ROOT") + public class Jvm8 { + @Test + public void testAllFilesPresentInJvm8() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @Nested + @TestMetadata("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults") + @TestDataPath("$PROJECT_ROOT") + public class Defaults { + @Test + public void testAllFilesPresentInDefaults() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @Test + @TestMetadata("superCall.kt") + public void testSuperCall() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/superCall.kt"); + } + + @Test + @TestMetadata("superCallFromInterface.kt") + public void testSuperCallFromInterface() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/superCallFromInterface.kt"); + } + + @Test + @TestMetadata("superCallFromInterface2.kt") + public void testSuperCallFromInterface2() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/superCallFromInterface2.kt"); + } + + @Test + @TestMetadata("superPropAccess.kt") + public void testSuperPropAccess() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/superPropAccess.kt"); + } + + @Test + @TestMetadata("superPropAccessFromInterface.kt") + public void testSuperPropAccessFromInterface() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/superPropAccessFromInterface.kt"); + } + + @Test + @TestMetadata("superPropAccessFromInterface2.kt") + public void testSuperPropAccessFromInterface2() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/superPropAccessFromInterface2.kt"); + } + + @Nested + @TestMetadata("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility") + @TestDataPath("$PROJECT_ROOT") + public class AllCompatibility { + @Test + public void testAllFilesPresentInAllCompatibility() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @Test + @TestMetadata("callStackTrace.kt") + public void testCallStackTrace() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/callStackTrace.kt"); + } + + @Test + @TestMetadata("superCall.kt") + public void testSuperCall() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superCall.kt"); + } + + @Test + @TestMetadata("superCallFromInterface.kt") + public void testSuperCallFromInterface() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superCallFromInterface.kt"); + } + + @Test + @TestMetadata("superCallFromInterface2.kt") + public void testSuperCallFromInterface2() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superCallFromInterface2.kt"); + } + + @Test + @TestMetadata("superPropAccess.kt") + public void testSuperPropAccess() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superPropAccess.kt"); + } + + @Test + @TestMetadata("superPropAccessFromInterface.kt") + public void testSuperPropAccessFromInterface() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superPropAccessFromInterface.kt"); + } + + @Test + @TestMetadata("superPropAccessFromInterface2.kt") + public void testSuperPropAccessFromInterface2() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superPropAccessFromInterface2.kt"); + } + + @Nested + @TestMetadata("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/delegationBy") + @TestDataPath("$PROJECT_ROOT") + public class DelegationBy { + @Test + public void testAllFilesPresentInDelegationBy() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/delegationBy"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @Test + @TestMetadata("simple.kt") + public void testSimple() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/delegationBy/simple.kt"); + } + + @Test + @TestMetadata("simpleProperty.kt") + public void testSimpleProperty() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/delegationBy/simpleProperty.kt"); + } + } + } + + @Nested + @TestMetadata("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/interop") + @TestDataPath("$PROJECT_ROOT") + public class Interop { + @Test + public void testAllFilesPresentInInterop() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/interop"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @Test + @TestMetadata("likeMemberClash.kt") + public void testLikeMemberClash() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/interop/likeMemberClash.kt"); + } + + @Test + @TestMetadata("likeSpecialization.kt") + public void testLikeSpecialization() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/interop/likeSpecialization.kt"); + } + + @Test + @TestMetadata("newAndOldSchemes.kt") + public void testNewAndOldSchemes() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/interop/newAndOldSchemes.kt"); + } + + @Test + @TestMetadata("newAndOldSchemes2.kt") + public void testNewAndOldSchemes2() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/interop/newAndOldSchemes2.kt"); + } + + @Test + @TestMetadata("newAndOldSchemes2Compatibility.kt") + public void testNewAndOldSchemes2Compatibility() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/interop/newAndOldSchemes2Compatibility.kt"); + } + + @Test + @TestMetadata("newAndOldSchemes3.kt") + public void testNewAndOldSchemes3() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/interop/newAndOldSchemes3.kt"); + } + + @Test + @TestMetadata("newSchemeWithJvmDefault.kt") + public void testNewSchemeWithJvmDefault() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/interop/newSchemeWithJvmDefault.kt"); + } + } + } + + @Nested + @TestMetadata("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/jvm8against6") + @TestDataPath("$PROJECT_ROOT") + public class Jvm8against6 { + @Test + public void testAllFilesPresentInJvm8against6() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/jvm8against6"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @Test + @TestMetadata("jdk8Against6.kt") + public void testJdk8Against6() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/jvm8against6/jdk8Against6.kt"); + } + + @Test + @TestMetadata("simpleCall.kt") + public void testSimpleCall() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/jvm8against6/simpleCall.kt"); + } + + @Test + @TestMetadata("simpleCallWithBigHierarchy.kt") + public void testSimpleCallWithBigHierarchy() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/jvm8against6/simpleCallWithBigHierarchy.kt"); + } + + @Test + @TestMetadata("simpleCallWithHierarchy.kt") + public void testSimpleCallWithHierarchy() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/jvm8against6/simpleCallWithHierarchy.kt"); + } + + @Test + @TestMetadata("simpleProp.kt") + public void testSimpleProp() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/jvm8against6/simpleProp.kt"); + } + + @Test + @TestMetadata("simplePropWithHierarchy.kt") + public void testSimplePropWithHierarchy() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/jvm8against6/simplePropWithHierarchy.kt"); + } + + @Nested + @TestMetadata("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/jvm8against6/delegation") + @TestDataPath("$PROJECT_ROOT") + public class Delegation { + @Test + public void testAllFilesPresentInDelegation() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/jvm8against6/delegation"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @Test + @TestMetadata("diamond.kt") + public void testDiamond() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/jvm8against6/delegation/diamond.kt"); + } + + @Test + @TestMetadata("diamond2.kt") + public void testDiamond2() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/jvm8against6/delegation/diamond2.kt"); + } + + @Test + @TestMetadata("diamond3.kt") + public void testDiamond3() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/jvm8against6/delegation/diamond3.kt"); + } + } + } + } + + @Nested + @TestMetadata("compiler/testData/codegen/box/compileKotlinAgainstKotlin/typeAnnotations") + @TestDataPath("$PROJECT_ROOT") + public class TypeAnnotations { + @Test + public void testAllFilesPresentInTypeAnnotations() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/compileKotlinAgainstKotlin/typeAnnotations"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @Test + @TestMetadata("implicitReturn.kt") + public void testImplicitReturn() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/typeAnnotations/implicitReturn.kt"); + } + } + } + @Nested @TestMetadata("compiler/testData/codegen/box/constants") @TestDataPath("$PROJECT_ROOT") - public class Constants extends AbstractIrBlackBoxCodegenTest { + public class Constants { @Test public void testAllFilesPresentInConstants() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/constants"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -6013,10 +7029,32 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes } } + @Nested + @TestMetadata("compiler/testData/codegen/box/constructor") + @TestDataPath("$PROJECT_ROOT") + public class Constructor { + @Test + public void testAllFilesPresentInConstructor() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/constructor"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @Test + @TestMetadata("genericConstructor.kt") + public void testGenericConstructor() throws Exception { + runTest("compiler/testData/codegen/box/constructor/genericConstructor.kt"); + } + + @Test + @TestMetadata("secondaryConstructor.kt") + public void testSecondaryConstructor() throws Exception { + runTest("compiler/testData/codegen/box/constructor/secondaryConstructor.kt"); + } + } + @Nested @TestMetadata("compiler/testData/codegen/box/constructorCall") @TestDataPath("$PROJECT_ROOT") - public class ConstructorCall extends AbstractIrBlackBoxCodegenTest { + public class ConstructorCall { @Test public void testAllFilesPresentInConstructorCall() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/constructorCall"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -6128,7 +7166,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/contracts") @TestDataPath("$PROJECT_ROOT") - public class Contracts extends AbstractIrBlackBoxCodegenTest { + public class Contracts { @Test public void testAllFilesPresentInContracts() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/contracts"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -6210,7 +7248,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/controlStructures") @TestDataPath("$PROJECT_ROOT") - public class ControlStructures extends AbstractIrBlackBoxCodegenTest { + public class ControlStructures { @Test public void testAllFilesPresentInControlStructures() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/controlStructures"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -6693,7 +7731,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions") @TestDataPath("$PROJECT_ROOT") - public class BreakContinueInExpressions extends AbstractIrBlackBoxCodegenTest { + public class BreakContinueInExpressions { @Test public void testAllFilesPresentInBreakContinueInExpressions() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -6811,7 +7849,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/controlStructures/forInArray") @TestDataPath("$PROJECT_ROOT") - public class ForInArray extends AbstractIrBlackBoxCodegenTest { + public class ForInArray { @Test public void testAllFilesPresentInForInArray() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/controlStructures/forInArray"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -6881,7 +7919,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex") @TestDataPath("$PROJECT_ROOT") - public class ForInArrayWithIndex extends AbstractIrBlackBoxCodegenTest { + public class ForInArrayWithIndex { @Test public void testAllFilesPresentInForInArrayWithIndex() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -7011,7 +8049,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/controlStructures/forInCharSequenceWithIndex") @TestDataPath("$PROJECT_ROOT") - public class ForInCharSequenceWithIndex extends AbstractIrBlackBoxCodegenTest { + public class ForInCharSequenceWithIndex { @Test public void testAllFilesPresentInForInCharSequenceWithIndex() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/controlStructures/forInCharSequenceWithIndex"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -7105,7 +8143,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/controlStructures/forInIterableWithIndex") @TestDataPath("$PROJECT_ROOT") - public class ForInIterableWithIndex extends AbstractIrBlackBoxCodegenTest { + public class ForInIterableWithIndex { @Test public void testAllFilesPresentInForInIterableWithIndex() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/controlStructures/forInIterableWithIndex"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -7181,7 +8219,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/controlStructures/forInSequenceWithIndex") @TestDataPath("$PROJECT_ROOT") - public class ForInSequenceWithIndex extends AbstractIrBlackBoxCodegenTest { + public class ForInSequenceWithIndex { @Test public void testAllFilesPresentInForInSequenceWithIndex() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/controlStructures/forInSequenceWithIndex"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -7257,7 +8295,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/controlStructures/returnsNothing") @TestDataPath("$PROJECT_ROOT") - public class ReturnsNothing extends AbstractIrBlackBoxCodegenTest { + public class ReturnsNothing { @Test public void testAllFilesPresentInReturnsNothing() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/controlStructures/returnsNothing"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -7297,7 +8335,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions") @TestDataPath("$PROJECT_ROOT") - public class TryCatchInExpressions extends AbstractIrBlackBoxCodegenTest { + public class TryCatchInExpressions { @Test public void testAllFilesPresentInTryCatchInExpressions() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -7488,7 +8526,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/coroutines") @TestDataPath("$PROJECT_ROOT") - public class Coroutines extends AbstractIrBlackBoxCodegenTest { + public class Coroutines { @Test @TestMetadata("32defaultParametersInSuspend.kt") public void test32defaultParametersInSuspend() throws Exception { @@ -7818,6 +8856,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/coroutines/kt21605.kt"); } + @Test + @TestMetadata("kt24135.kt") + public void testKt24135() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/kt24135.kt"); + } + @Test @TestMetadata("kt25912.kt") public void testKt25912() throws Exception { @@ -8199,7 +9243,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/coroutines/bridges") @TestDataPath("$PROJECT_ROOT") - public class Bridges extends AbstractIrBlackBoxCodegenTest { + public class Bridges { @Test public void testAllFilesPresentInBridges() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/bridges"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -8227,7 +9271,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/coroutines/controlFlow") @TestDataPath("$PROJECT_ROOT") - public class ControlFlow extends AbstractIrBlackBoxCodegenTest { + public class ControlFlow { @Test public void testAllFilesPresentInControlFlow() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/controlFlow"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -8257,6 +9301,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/coroutines/controlFlow/doWhileStatement.kt"); } + @Test + @TestMetadata("doWhileWithInline.kt") + public void testDoWhileWithInline() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/controlFlow/doWhileWithInline.kt"); + } + @Test @TestMetadata("doubleBreak.kt") public void testDoubleBreak() throws Exception { @@ -8369,7 +9419,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/coroutines/debug") @TestDataPath("$PROJECT_ROOT") - public class Debug extends AbstractIrBlackBoxCodegenTest { + public class Debug { @Test public void testAllFilesPresentInDebug() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/debug"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -8427,7 +9477,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/coroutines/featureIntersection") @TestDataPath("$PROJECT_ROOT") - public class FeatureIntersection extends AbstractIrBlackBoxCodegenTest { + public class FeatureIntersection { @Test public void testAllFilesPresentInFeatureIntersection() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/featureIntersection"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -8538,7 +9588,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference") @TestDataPath("$PROJECT_ROOT") - public class CallableReference extends AbstractIrBlackBoxCodegenTest { + public class CallableReference { @Test public void testAllFilesPresentInCallableReference() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -8571,7 +9621,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound") @TestDataPath("$PROJECT_ROOT") - public class Bound extends AbstractIrBlackBoxCodegenTest { + public class Bound { @Test public void testAllFilesPresentInBound() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bound"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -8587,7 +9637,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function") @TestDataPath("$PROJECT_ROOT") - public class Function extends AbstractIrBlackBoxCodegenTest { + public class Function { @Test public void testAllFilesPresentInFunction() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -8614,7 +9664,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local") @TestDataPath("$PROJECT_ROOT") - public class Local extends AbstractIrBlackBoxCodegenTest { + public class Local { @Test public void testAllFilesPresentInLocal() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/function/local"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -8632,7 +9682,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec") @TestDataPath("$PROJECT_ROOT") - public class Tailrec extends AbstractIrBlackBoxCodegenTest { + public class Tailrec { @Test public void testAllFilesPresentInTailrec() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -8721,12 +9771,18 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/coroutines/inlineClasses") @TestDataPath("$PROJECT_ROOT") - public class InlineClasses extends AbstractIrBlackBoxCodegenTest { + public class InlineClasses { @Test public void testAllFilesPresentInInlineClasses() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/inlineClasses"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test + @TestMetadata("genericParameterResult.kt") + public void testGenericParameterResult() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/genericParameterResult.kt"); + } + @Test @TestMetadata("nonLocalReturn.kt") public void testNonLocalReturn() throws Exception { @@ -8736,7 +9792,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/coroutines/inlineClasses/direct") @TestDataPath("$PROJECT_ROOT") - public class Direct extends AbstractIrBlackBoxCodegenTest { + public class Direct { @Test public void testAllFilesPresentInDirect() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/inlineClasses/direct"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -9004,7 +10060,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/coroutines/inlineClasses/resume") @TestDataPath("$PROJECT_ROOT") - public class Resume extends AbstractIrBlackBoxCodegenTest { + public class Resume { @Test public void testAllFilesPresentInResume() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/inlineClasses/resume"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -9272,7 +10328,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException") @TestDataPath("$PROJECT_ROOT") - public class ResumeWithException extends AbstractIrBlackBoxCodegenTest { + public class ResumeWithException { @Test public void testAllFilesPresentInResumeWithException() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -9523,7 +10579,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/coroutines/intLikeVarSpilling") @TestDataPath("$PROJECT_ROOT") - public class IntLikeVarSpilling extends AbstractIrBlackBoxCodegenTest { + public class IntLikeVarSpilling { @Test public void testAllFilesPresentInIntLikeVarSpilling() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/intLikeVarSpilling"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -9599,7 +10655,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/coroutines/intrinsicSemantics") @TestDataPath("$PROJECT_ROOT") - public class IntrinsicSemantics extends AbstractIrBlackBoxCodegenTest { + public class IntrinsicSemantics { @Test public void testAllFilesPresentInIntrinsicSemantics() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/intrinsicSemantics"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -9629,6 +10685,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/coroutines/intrinsicSemantics/intercepted.kt"); } + @Test + @TestMetadata("resultExceptionOrNullInLambda.kt") + public void testResultExceptionOrNullInLambda() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/intrinsicSemantics/resultExceptionOrNullInLambda.kt"); + } + @Test @TestMetadata("startCoroutine.kt") public void testStartCoroutine() throws Exception { @@ -9657,7 +10719,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/coroutines/javaInterop") @TestDataPath("$PROJECT_ROOT") - public class JavaInterop extends AbstractIrBlackBoxCodegenTest { + public class JavaInterop { @Test public void testAllFilesPresentInJavaInterop() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/javaInterop"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -9697,7 +10759,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/coroutines/localFunctions") @TestDataPath("$PROJECT_ROOT") - public class LocalFunctions extends AbstractIrBlackBoxCodegenTest { + public class LocalFunctions { @Test public void testAllFilesPresentInLocalFunctions() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/localFunctions"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -9706,7 +10768,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/coroutines/localFunctions/anonymous") @TestDataPath("$PROJECT_ROOT") - public class Anonymous extends AbstractIrBlackBoxCodegenTest { + public class Anonymous { @Test public void testAllFilesPresentInAnonymous() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/localFunctions/anonymous"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -9722,7 +10784,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/coroutines/localFunctions/named") @TestDataPath("$PROJECT_ROOT") - public class Named extends AbstractIrBlackBoxCodegenTest { + public class Named { @Test public void testAllFilesPresentInNamed() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/localFunctions/named"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -9740,6 +10802,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/coroutines/localFunctions/named/capturedVariables.kt"); } + @Test + @TestMetadata("defaultArgument.kt") + public void testDefaultArgument() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/localFunctions/named/defaultArgument.kt"); + } + @Test @TestMetadata("extension.kt") public void testExtension() throws Exception { @@ -9799,7 +10867,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/coroutines/multiModule") @TestDataPath("$PROJECT_ROOT") - public class MultiModule extends AbstractIrBlackBoxCodegenTest { + public class MultiModule { @Test public void testAllFilesPresentInMultiModule() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/multiModule"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -9863,7 +10931,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/coroutines/redundantLocalsElimination") @TestDataPath("$PROJECT_ROOT") - public class RedundantLocalsElimination extends AbstractIrBlackBoxCodegenTest { + public class RedundantLocalsElimination { @Test public void testAllFilesPresentInRedundantLocalsElimination() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/redundantLocalsElimination"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -9879,7 +10947,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/coroutines/reflect") @TestDataPath("$PROJECT_ROOT") - public class Reflect extends AbstractIrBlackBoxCodegenTest { + public class Reflect { @Test public void testAllFilesPresentInReflect() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/reflect"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -9907,7 +10975,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/coroutines/stackUnwinding") @TestDataPath("$PROJECT_ROOT") - public class StackUnwinding extends AbstractIrBlackBoxCodegenTest { + public class StackUnwinding { @Test public void testAllFilesPresentInStackUnwinding() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/stackUnwinding"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -9953,7 +11021,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/coroutines/suspendConversion") @TestDataPath("$PROJECT_ROOT") - public class SuspendConversion extends AbstractIrBlackBoxCodegenTest { + public class SuspendConversion { @Test public void testAllFilesPresentInSuspendConversion() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/suspendConversion"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -9987,7 +11055,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine") @TestDataPath("$PROJECT_ROOT") - public class SuspendFunctionAsCoroutine extends AbstractIrBlackBoxCodegenTest { + public class SuspendFunctionAsCoroutine { @Test public void testAllFilesPresentInSuspendFunctionAsCoroutine() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -10105,7 +11173,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/coroutines/suspendFunctionTypeCall") @TestDataPath("$PROJECT_ROOT") - public class SuspendFunctionTypeCall extends AbstractIrBlackBoxCodegenTest { + public class SuspendFunctionTypeCall { @Test public void testAllFilesPresentInSuspendFunctionTypeCall() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/suspendFunctionTypeCall"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -10145,7 +11213,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/coroutines/tailCallOptimizations") @TestDataPath("$PROJECT_ROOT") - public class TailCallOptimizations extends AbstractIrBlackBoxCodegenTest { + public class TailCallOptimizations { @Test public void testAllFilesPresentInTailCallOptimizations() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/tailCallOptimizations"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -10244,7 +11312,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/coroutines/tailCallOptimizations/unit") @TestDataPath("$PROJECT_ROOT") - public class Unit extends AbstractIrBlackBoxCodegenTest { + public class Unit { @Test public void testAllFilesPresentInUnit() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/tailCallOptimizations/unit"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -10321,7 +11389,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/coroutines/tailOperations") @TestDataPath("$PROJECT_ROOT") - public class TailOperations extends AbstractIrBlackBoxCodegenTest { + public class TailOperations { @Test public void testAllFilesPresentInTailOperations() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/tailOperations"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -10355,7 +11423,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/coroutines/unitTypeReturn") @TestDataPath("$PROJECT_ROOT") - public class UnitTypeReturn extends AbstractIrBlackBoxCodegenTest { + public class UnitTypeReturn { @Test public void testAllFilesPresentInUnitTypeReturn() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/unitTypeReturn"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -10407,7 +11475,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/coroutines/varSpilling") @TestDataPath("$PROJECT_ROOT") - public class VarSpilling extends AbstractIrBlackBoxCodegenTest { + public class VarSpilling { @Test public void testAllFilesPresentInVarSpilling() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/varSpilling"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -10454,7 +11522,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/dataClasses") @TestDataPath("$PROJECT_ROOT") - public class DataClasses extends AbstractIrBlackBoxCodegenTest { + public class DataClasses { @Test public void testAllFilesPresentInDataClasses() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/dataClasses"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -10559,7 +11627,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/dataClasses/copy") @TestDataPath("$PROJECT_ROOT") - public class Copy extends AbstractIrBlackBoxCodegenTest { + public class Copy { @Test public void testAllFilesPresentInCopy() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/dataClasses/copy"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -10617,7 +11685,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/dataClasses/equals") @TestDataPath("$PROJECT_ROOT") - public class Equals extends AbstractIrBlackBoxCodegenTest { + public class Equals { @Test public void testAllFilesPresentInEquals() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/dataClasses/equals"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -10669,7 +11737,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/dataClasses/hashCode") @TestDataPath("$PROJECT_ROOT") - public class HashCode extends AbstractIrBlackBoxCodegenTest { + public class HashCode { @Test public void testAllFilesPresentInHashCode() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/dataClasses/hashCode"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -10757,7 +11825,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/dataClasses/toString") @TestDataPath("$PROJECT_ROOT") - public class ToString extends AbstractIrBlackBoxCodegenTest { + public class ToString { @Test public void testAllFilesPresentInToString() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/dataClasses/toString"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -10810,7 +11878,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/deadCodeElimination") @TestDataPath("$PROJECT_ROOT") - public class DeadCodeElimination extends AbstractIrBlackBoxCodegenTest { + public class DeadCodeElimination { @Test public void testAllFilesPresentInDeadCodeElimination() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/deadCodeElimination"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -10844,7 +11912,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/defaultArguments") @TestDataPath("$PROJECT_ROOT") - public class DefaultArguments extends AbstractIrBlackBoxCodegenTest { + public class DefaultArguments { @Test public void testAllFilesPresentInDefaultArguments() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/defaultArguments"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -10955,7 +12023,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/defaultArguments/constructor") @TestDataPath("$PROJECT_ROOT") - public class Constructor extends AbstractIrBlackBoxCodegenTest { + public class Constructor { @Test public void testAllFilesPresentInConstructor() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/defaultArguments/constructor"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -11067,7 +12135,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/defaultArguments/convention") @TestDataPath("$PROJECT_ROOT") - public class Convention extends AbstractIrBlackBoxCodegenTest { + public class Convention { @Test public void testAllFilesPresentInConvention() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/defaultArguments/convention"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -11119,7 +12187,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/defaultArguments/function") @TestDataPath("$PROJECT_ROOT") - public class Function extends AbstractIrBlackBoxCodegenTest { + public class Function { @Test @TestMetadata("abstractClass.kt") public void testAbstractClass() throws Exception { @@ -11297,7 +12365,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/defaultArguments/private") @TestDataPath("$PROJECT_ROOT") - public class Private extends AbstractIrBlackBoxCodegenTest { + public class Private { @Test public void testAllFilesPresentInPrivate() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/defaultArguments/private"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -11331,7 +12399,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/defaultArguments/signature") @TestDataPath("$PROJECT_ROOT") - public class Signature extends AbstractIrBlackBoxCodegenTest { + public class Signature { @Test public void testAllFilesPresentInSignature() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/defaultArguments/signature"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -11360,7 +12428,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/delegatedProperty") @TestDataPath("$PROJECT_ROOT") - public class DelegatedProperty extends AbstractIrBlackBoxCodegenTest { + public class DelegatedProperty { @Test @TestMetadata("accessTopLevelDelegatedPropertyInClinit.kt") public void testAccessTopLevelDelegatedPropertyInClinit() throws Exception { @@ -11663,7 +12731,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/delegatedProperty/local") @TestDataPath("$PROJECT_ROOT") - public class Local extends AbstractIrBlackBoxCodegenTest { + public class Local { @Test public void testAllFilesPresentInLocal() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/delegatedProperty/local"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -11775,7 +12843,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/delegatedProperty/optimizedDelegatedProperties") @TestDataPath("$PROJECT_ROOT") - public class OptimizedDelegatedProperties extends AbstractIrBlackBoxCodegenTest { + public class OptimizedDelegatedProperties { @Test public void testAllFilesPresentInOptimizedDelegatedProperties() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/delegatedProperty/optimizedDelegatedProperties"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -11845,7 +12913,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/delegatedProperty/provideDelegate") @TestDataPath("$PROJECT_ROOT") - public class ProvideDelegate extends AbstractIrBlackBoxCodegenTest { + public class ProvideDelegate { @Test public void testAllFilesPresentInProvideDelegate() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/delegatedProperty/provideDelegate"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -11988,7 +13056,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/delegation") @TestDataPath("$PROJECT_ROOT") - public class Delegation extends AbstractIrBlackBoxCodegenTest { + public class Delegation { @Test public void testAllFilesPresentInDelegation() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/delegation"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -12006,6 +13074,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/delegation/defaultOverride.kt"); } + @Test + @TestMetadata("delegationAndInheritanceFromJava.kt") + public void testDelegationAndInheritanceFromJava() throws Exception { + runTest("compiler/testData/codegen/box/delegation/delegationAndInheritanceFromJava.kt"); + } + @Test @TestMetadata("delegationToMap.kt") public void testDelegationToMap() throws Exception { @@ -12088,7 +13162,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/destructuringDeclInLambdaParam") @TestDataPath("$PROJECT_ROOT") - public class DestructuringDeclInLambdaParam extends AbstractIrBlackBoxCodegenTest { + public class DestructuringDeclInLambdaParam { @Test public void testAllFilesPresentInDestructuringDeclInLambdaParam() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/destructuringDeclInLambdaParam"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -12146,7 +13220,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/diagnostics") @TestDataPath("$PROJECT_ROOT") - public class Diagnostics extends AbstractIrBlackBoxCodegenTest { + public class Diagnostics { @Test public void testAllFilesPresentInDiagnostics() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/diagnostics"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -12155,7 +13229,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/diagnostics/functions") @TestDataPath("$PROJECT_ROOT") - public class Functions extends AbstractIrBlackBoxCodegenTest { + public class Functions { @Test public void testAllFilesPresentInFunctions() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/diagnostics/functions"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -12164,7 +13238,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/diagnostics/functions/inference") @TestDataPath("$PROJECT_ROOT") - public class Inference extends AbstractIrBlackBoxCodegenTest { + public class Inference { @Test public void testAllFilesPresentInInference() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/diagnostics/functions/inference"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -12180,7 +13254,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/diagnostics/functions/invoke") @TestDataPath("$PROJECT_ROOT") - public class Invoke extends AbstractIrBlackBoxCodegenTest { + public class Invoke { @Test public void testAllFilesPresentInInvoke() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/diagnostics/functions/invoke"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -12189,7 +13263,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects") @TestDataPath("$PROJECT_ROOT") - public class OnObjects extends AbstractIrBlackBoxCodegenTest { + public class OnObjects { @Test public void testAllFilesPresentInOnObjects() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -12260,7 +13334,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion") @TestDataPath("$PROJECT_ROOT") - public class TailRecursion extends AbstractIrBlackBoxCodegenTest { + public class TailRecursion { @Test public void testAllFilesPresentInTailRecursion() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/diagnostics/functions/tailRecursion"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -12517,7 +13591,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/diagnostics/vararg") @TestDataPath("$PROJECT_ROOT") - public class Vararg extends AbstractIrBlackBoxCodegenTest { + public class Vararg { @Test public void testAllFilesPresentInVararg() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/diagnostics/vararg"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -12534,7 +13608,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/elvis") @TestDataPath("$PROJECT_ROOT") - public class Elvis extends AbstractIrBlackBoxCodegenTest { + public class Elvis { @Test public void testAllFilesPresentInElvis() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/elvis"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -12586,7 +13660,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/enum") @TestDataPath("$PROJECT_ROOT") - public class Enum extends AbstractIrBlackBoxCodegenTest { + public class Enum { @Test @TestMetadata("abstractMethodInEnum.kt") public void testAbstractMethodInEnum() throws Exception { @@ -12940,6 +14014,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/enum/modifierFlags.kt"); } + @Test + @TestMetadata("nameConflict.kt") + public void testNameConflict() throws Exception { + runTest("compiler/testData/codegen/box/enum/nameConflict.kt"); + } + @Test @TestMetadata("noClassForSimpleEnum.kt") public void testNoClassForSimpleEnum() throws Exception { @@ -12970,12 +14050,48 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/enum/simple.kt"); } + @Test + @TestMetadata("simpleJavaEnum.kt") + public void testSimpleJavaEnum() throws Exception { + runTest("compiler/testData/codegen/box/enum/simpleJavaEnum.kt"); + } + + @Test + @TestMetadata("simpleJavaEnumWithFunction.kt") + public void testSimpleJavaEnumWithFunction() throws Exception { + runTest("compiler/testData/codegen/box/enum/simpleJavaEnumWithFunction.kt"); + } + + @Test + @TestMetadata("simpleJavaEnumWithStaticImport.kt") + public void testSimpleJavaEnumWithStaticImport() throws Exception { + runTest("compiler/testData/codegen/box/enum/simpleJavaEnumWithStaticImport.kt"); + } + + @Test + @TestMetadata("simpleJavaInnerEnum.kt") + public void testSimpleJavaInnerEnum() throws Exception { + runTest("compiler/testData/codegen/box/enum/simpleJavaInnerEnum.kt"); + } + @Test @TestMetadata("sortEnumEntries.kt") public void testSortEnumEntries() throws Exception { runTest("compiler/testData/codegen/box/enum/sortEnumEntries.kt"); } + @Test + @TestMetadata("staticField.kt") + public void testStaticField() throws Exception { + runTest("compiler/testData/codegen/box/enum/staticField.kt"); + } + + @Test + @TestMetadata("staticMethod.kt") + public void testStaticMethod() throws Exception { + runTest("compiler/testData/codegen/box/enum/staticMethod.kt"); + } + @Test @TestMetadata("superCallInEnumLiteral.kt") public void testSuperCallInEnumLiteral() throws Exception { @@ -13003,7 +14119,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/enum/defaultCtor") @TestDataPath("$PROJECT_ROOT") - public class DefaultCtor extends AbstractIrBlackBoxCodegenTest { + public class DefaultCtor { @Test public void testAllFilesPresentInDefaultCtor() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/enum/defaultCtor"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -13050,7 +14166,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/evaluate") @TestDataPath("$PROJECT_ROOT") - public class Evaluate extends AbstractIrBlackBoxCodegenTest { + public class Evaluate { @Test public void testAllFilesPresentInEvaluate() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/evaluate"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -13150,7 +14266,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/exclExcl") @TestDataPath("$PROJECT_ROOT") - public class ExclExcl extends AbstractIrBlackBoxCodegenTest { + public class ExclExcl { @Test public void testAllFilesPresentInExclExcl() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/exclExcl"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -13172,7 +14288,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/extensionFunctions") @TestDataPath("$PROJECT_ROOT") - public class ExtensionFunctions extends AbstractIrBlackBoxCodegenTest { + public class ExtensionFunctions { @Test public void testAllFilesPresentInExtensionFunctions() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/extensionFunctions"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -13338,7 +14454,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/extensionProperties") @TestDataPath("$PROJECT_ROOT") - public class ExtensionProperties extends AbstractIrBlackBoxCodegenTest { + public class ExtensionProperties { @Test @TestMetadata("accessorForPrivateSetter.kt") public void testAccessorForPrivateSetter() throws Exception { @@ -13438,7 +14554,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/external") @TestDataPath("$PROJECT_ROOT") - public class External extends AbstractIrBlackBoxCodegenTest { + public class External { @Test public void testAllFilesPresentInExternal() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/external"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -13466,7 +14582,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/fakeOverride") @TestDataPath("$PROJECT_ROOT") - public class FakeOverride extends AbstractIrBlackBoxCodegenTest { + public class FakeOverride { @Test public void testAllFilesPresentInFakeOverride() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/fakeOverride"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -13512,7 +14628,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/fieldRename") @TestDataPath("$PROJECT_ROOT") - public class FieldRename extends AbstractIrBlackBoxCodegenTest { + public class FieldRename { @Test public void testAllFilesPresentInFieldRename() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/fieldRename"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -13552,7 +14668,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/finally") @TestDataPath("$PROJECT_ROOT") - public class Finally extends AbstractIrBlackBoxCodegenTest { + public class Finally { @Test public void testAllFilesPresentInFinally() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/finally"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -13694,7 +14810,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/fir") @TestDataPath("$PROJECT_ROOT") - public class Fir extends AbstractIrBlackBoxCodegenTest { + public class Fir { @Test public void testAllFilesPresentInFir() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/fir"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -13740,7 +14856,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/fullJdk") @TestDataPath("$PROJECT_ROOT") - public class FullJdk extends AbstractIrBlackBoxCodegenTest { + public class FullJdk { @Test public void testAllFilesPresentInFullJdk() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/fullJdk"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -13785,7 +14901,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/fullJdk/native") @TestDataPath("$PROJECT_ROOT") - public class Native extends AbstractIrBlackBoxCodegenTest { + public class Native { @Test public void testAllFilesPresentInNative() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/fullJdk/native"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -13813,7 +14929,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/fullJdk/regressions") @TestDataPath("$PROJECT_ROOT") - public class Regressions extends AbstractIrBlackBoxCodegenTest { + public class Regressions { @Test public void testAllFilesPresentInRegressions() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/fullJdk/regressions"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -13836,7 +14952,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/funInterface") @TestDataPath("$PROJECT_ROOT") - public class FunInterface extends AbstractIrBlackBoxCodegenTest { + public class FunInterface { @Test public void testAllFilesPresentInFunInterface() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/funInterface"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -13872,6 +14988,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/funInterface/funConversionInVararg.kt"); } + @Test + @TestMetadata("funInterfaceCallInLambda.kt") + public void testFunInterfaceCallInLambda() throws Exception { + runTest("compiler/testData/codegen/box/funInterface/funInterfaceCallInLambda.kt"); + } + @Test @TestMetadata("funInterfaceInheritance.kt") public void testFunInterfaceInheritance() throws Exception { @@ -13971,7 +15093,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/funInterface/equality") @TestDataPath("$PROJECT_ROOT") - public class Equality extends AbstractIrBlackBoxCodegenTest { + public class Equality { @Test public void testAllFilesPresentInEquality() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/funInterface/equality"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -14012,7 +15134,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/functions") @TestDataPath("$PROJECT_ROOT") - public class Functions extends AbstractIrBlackBoxCodegenTest { + public class Functions { @Test public void testAllFilesPresentInFunctions() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/functions"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -14030,6 +15152,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/functions/coerceVoidToObject.kt"); } + @Test + @TestMetadata("constructor.kt") + public void testConstructor() throws Exception { + runTest("compiler/testData/codegen/box/functions/constructor.kt"); + } + @Test @TestMetadata("dataLocalVariable.kt") public void testDataLocalVariable() throws Exception { @@ -14252,6 +15380,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/functions/localReturnInsideFunctionExpression.kt"); } + @Test + @TestMetadata("max.kt") + public void testMax() throws Exception { + runTest("compiler/testData/codegen/box/functions/max.kt"); + } + @Test @TestMetadata("nothisnoclosure.kt") public void testNothisnoclosure() throws Exception { @@ -14276,6 +15410,18 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/functions/recursiveIncrementCall.kt"); } + @Test + @TestMetadata("referencesStaticInnerClassMethod.kt") + public void testReferencesStaticInnerClassMethod() throws Exception { + runTest("compiler/testData/codegen/box/functions/referencesStaticInnerClassMethod.kt"); + } + + @Test + @TestMetadata("referencesStaticInnerClassMethodL2.kt") + public void testReferencesStaticInnerClassMethodL2() throws Exception { + runTest("compiler/testData/codegen/box/functions/referencesStaticInnerClassMethodL2.kt"); + } + @Test @TestMetadata("typeParameterAsUpperBound.kt") public void testTypeParameterAsUpperBound() throws Exception { @@ -14288,10 +15434,16 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/functions/typeParametersInLocalFunction.kt"); } + @Test + @TestMetadata("unrelatedUpperBounds.kt") + public void testUnrelatedUpperBounds() throws Exception { + runTest("compiler/testData/codegen/box/functions/unrelatedUpperBounds.kt"); + } + @Nested @TestMetadata("compiler/testData/codegen/box/functions/bigArity") @TestDataPath("$PROJECT_ROOT") - public class BigArity extends AbstractIrBlackBoxCodegenTest { + public class BigArity { @Test public void testAllFilesPresentInBigArity() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/functions/bigArity"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -14367,7 +15519,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/functions/functionExpression") @TestDataPath("$PROJECT_ROOT") - public class FunctionExpression extends AbstractIrBlackBoxCodegenTest { + public class FunctionExpression { @Test public void testAllFilesPresentInFunctionExpression() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/functions/functionExpression"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -14413,7 +15565,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/functions/invoke") @TestDataPath("$PROJECT_ROOT") - public class Invoke extends AbstractIrBlackBoxCodegenTest { + public class Invoke { @Test public void testAllFilesPresentInInvoke() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/functions/invoke"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -14513,7 +15665,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/functions/localFunctions") @TestDataPath("$PROJECT_ROOT") - public class LocalFunctions extends AbstractIrBlackBoxCodegenTest { + public class LocalFunctions { @Test public void testAllFilesPresentInLocalFunctions() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/functions/localFunctions"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -14704,7 +15856,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/hashPMap") @TestDataPath("$PROJECT_ROOT") - public class HashPMap extends AbstractIrBlackBoxCodegenTest { + public class HashPMap { @Test public void testAllFilesPresentInHashPMap() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/hashPMap"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -14750,7 +15902,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/ieee754") @TestDataPath("$PROJECT_ROOT") - public class Ieee754 extends AbstractIrBlackBoxCodegenTest { + public class Ieee754 { @Test public void testAllFilesPresentInIeee754() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ieee754"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -14762,6 +15914,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/ieee754/anyToReal.kt"); } + @Test + @TestMetadata("anyToReal_AgainstCompiled.kt") + public void testAnyToReal_AgainstCompiled() throws Exception { + runTest("compiler/testData/codegen/box/ieee754/anyToReal_AgainstCompiled.kt"); + } + @Test @TestMetadata("asComparableToDouble.kt") public void testAsComparableToDouble() throws Exception { @@ -14786,6 +15944,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/ieee754/comparableTypeCast.kt"); } + @Test + @TestMetadata("comparableTypeCast_AgainstCompiled.kt") + public void testComparableTypeCast_AgainstCompiled() throws Exception { + runTest("compiler/testData/codegen/box/ieee754/comparableTypeCast_AgainstCompiled.kt"); + } + @Test @TestMetadata("dataClass.kt") public void testDataClass() throws Exception { @@ -14798,6 +15962,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/ieee754/differentTypesComparison.kt"); } + @Test + @TestMetadata("double.kt") + public void testDouble() throws Exception { + runTest("compiler/testData/codegen/box/ieee754/double.kt"); + } + @Test @TestMetadata("equalsDouble.kt") public void testEqualsDouble() throws Exception { @@ -14864,18 +16034,42 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/ieee754/explicitCompareCall.kt"); } + @Test + @TestMetadata("explicitCompareCall_AgainstCompiled.kt") + public void testExplicitCompareCall_AgainstCompiled() throws Exception { + runTest("compiler/testData/codegen/box/ieee754/explicitCompareCall_AgainstCompiled.kt"); + } + @Test @TestMetadata("explicitEqualsCall.kt") public void testExplicitEqualsCall() throws Exception { runTest("compiler/testData/codegen/box/ieee754/explicitEqualsCall.kt"); } + @Test + @TestMetadata("explicitEqualsCall_AgainstCompiled.kt") + public void testExplicitEqualsCall_AgainstCompiled() throws Exception { + runTest("compiler/testData/codegen/box/ieee754/explicitEqualsCall_AgainstCompiled.kt"); + } + + @Test + @TestMetadata("float.kt") + public void testFloat() throws Exception { + runTest("compiler/testData/codegen/box/ieee754/float.kt"); + } + @Test @TestMetadata("generic.kt") public void testGeneric() throws Exception { runTest("compiler/testData/codegen/box/ieee754/generic.kt"); } + @Test + @TestMetadata("generic_AgainstCompiled.kt") + public void testGeneric_AgainstCompiled() throws Exception { + runTest("compiler/testData/codegen/box/ieee754/generic_AgainstCompiled.kt"); + } + @Test @TestMetadata("greaterDouble.kt") public void testGreaterDouble() throws Exception { @@ -14942,6 +16136,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/ieee754/nullableAnyToReal.kt"); } + @Test + @TestMetadata("nullableAnyToReal_AgainstCompiled.kt") + public void testNullableAnyToReal_AgainstCompiled() throws Exception { + runTest("compiler/testData/codegen/box/ieee754/nullableAnyToReal_AgainstCompiled.kt"); + } + @Test @TestMetadata("nullableDoubleEquals.kt") public void testNullableDoubleEquals() throws Exception { @@ -15060,7 +16260,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/increment") @TestDataPath("$PROJECT_ROOT") - public class Increment extends AbstractIrBlackBoxCodegenTest { + public class Increment { @Test public void testAllFilesPresentInIncrement() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/increment"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -15226,7 +16426,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/inference") @TestDataPath("$PROJECT_ROOT") - public class Inference extends AbstractIrBlackBoxCodegenTest { + public class Inference { @Test public void testAllFilesPresentInInference() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inference"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -15433,7 +16633,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/inference/builderInference") @TestDataPath("$PROJECT_ROOT") - public class BuilderInference extends AbstractIrBlackBoxCodegenTest { + public class BuilderInference { @Test public void testAllFilesPresentInBuilderInference() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inference/builderInference"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -15513,10 +16713,26 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes } } + @Nested + @TestMetadata("compiler/testData/codegen/box/inline") + @TestDataPath("$PROJECT_ROOT") + public class Inline { + @Test + public void testAllFilesPresentInInline() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inline"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @Test + @TestMetadata("kt19910.kt") + public void testKt19910() throws Exception { + runTest("compiler/testData/codegen/box/inline/kt19910.kt"); + } + } + @Nested @TestMetadata("compiler/testData/codegen/box/inlineClasses") @TestDataPath("$PROJECT_ROOT") - public class InlineClasses extends AbstractIrBlackBoxCodegenTest { + public class InlineClasses { @Test public void testAllFilesPresentInInlineClasses() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -16230,6 +17446,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/inlineClasses/kt28920_javaPrimitiveType.kt"); } + @Test + @TestMetadata("kt32793.kt") + public void testKt32793() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/kt32793.kt"); + } + @Test @TestMetadata("kt33119.kt") public void testKt33119() throws Exception { @@ -16545,7 +17767,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda") @TestDataPath("$PROJECT_ROOT") - public class BoxReturnValueInLambda extends AbstractIrBlackBoxCodegenTest { + public class BoxReturnValueInLambda { @Test public void testAllFilesPresentInBoxReturnValueInLambda() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -16627,7 +17849,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride") @TestDataPath("$PROJECT_ROOT") - public class BoxReturnValueOnOverride extends AbstractIrBlackBoxCodegenTest { + public class BoxReturnValueOnOverride { @Test public void testAllFilesPresentInBoxReturnValueOnOverride() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -16793,7 +18015,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/inlineClasses/callableReferences") @TestDataPath("$PROJECT_ROOT") - public class CallableReferences extends AbstractIrBlackBoxCodegenTest { + public class CallableReferences { @Test public void testAllFilesPresentInCallableReferences() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/callableReferences"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -16923,7 +18145,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/inlineClasses/contextsAndAccessors") @TestDataPath("$PROJECT_ROOT") - public class ContextsAndAccessors extends AbstractIrBlackBoxCodegenTest { + public class ContextsAndAccessors { @Test @TestMetadata("accessPrivateInlineClassCompanionMethod.kt") public void testAccessPrivateInlineClassCompanionMethod() throws Exception { @@ -17065,7 +18287,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/inlineClasses/defaultParameterValues") @TestDataPath("$PROJECT_ROOT") - public class DefaultParameterValues extends AbstractIrBlackBoxCodegenTest { + public class DefaultParameterValues { @Test public void testAllFilesPresentInDefaultParameterValues() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/defaultParameterValues"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -17147,7 +18369,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/inlineClasses/functionNameMangling") @TestDataPath("$PROJECT_ROOT") - public class FunctionNameMangling extends AbstractIrBlackBoxCodegenTest { + public class FunctionNameMangling { @Test public void testAllFilesPresentInFunctionNameMangling() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/functionNameMangling"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -17265,7 +18487,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/inlineClasses/hiddenConstructor") @TestDataPath("$PROJECT_ROOT") - public class HiddenConstructor extends AbstractIrBlackBoxCodegenTest { + public class HiddenConstructor { @Test public void testAllFilesPresentInHiddenConstructor() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/hiddenConstructor"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -17350,10 +18572,38 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes } } + @Nested + @TestMetadata("compiler/testData/codegen/box/inlineClasses/inlineClassCollection") + @TestDataPath("$PROJECT_ROOT") + public class InlineClassCollection { + @Test + public void testAllFilesPresentInInlineClassCollection() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/inlineClassCollection"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @Test + @TestMetadata("inlineCollectionOfInlineClass.kt") + public void testInlineCollectionOfInlineClass() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/inlineClassCollection/inlineCollectionOfInlineClass.kt"); + } + + @Test + @TestMetadata("inlineListOfInlineClass.kt") + public void testInlineListOfInlineClass() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/inlineClassCollection/inlineListOfInlineClass.kt"); + } + + @Test + @TestMetadata("inlineMapOfInlineClass.kt") + public void testInlineMapOfInlineClass() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/inlineClassCollection/inlineMapOfInlineClass.kt"); + } + } + @Nested @TestMetadata("compiler/testData/codegen/box/inlineClasses/interfaceDelegation") @TestDataPath("$PROJECT_ROOT") - public class InterfaceDelegation extends AbstractIrBlackBoxCodegenTest { + public class InterfaceDelegation { @Test public void testAllFilesPresentInInterfaceDelegation() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/interfaceDelegation"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -17411,7 +18661,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/inlineClasses/interfaceMethodCalls") @TestDataPath("$PROJECT_ROOT") - public class InterfaceMethodCalls extends AbstractIrBlackBoxCodegenTest { + public class InterfaceMethodCalls { @Test public void testAllFilesPresentInInterfaceMethodCalls() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/interfaceMethodCalls"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -17487,7 +18737,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/inlineClasses/javaInterop") @TestDataPath("$PROJECT_ROOT") - public class JavaInterop extends AbstractIrBlackBoxCodegenTest { + public class JavaInterop { @Test public void testAllFilesPresentInJavaInterop() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/javaInterop"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -17515,7 +18765,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/inlineClasses/jvm8DefaultInterfaceMethods") @TestDataPath("$PROJECT_ROOT") - public class Jvm8DefaultInterfaceMethods extends AbstractIrBlackBoxCodegenTest { + public class Jvm8DefaultInterfaceMethods { @Test public void testAllFilesPresentInJvm8DefaultInterfaceMethods() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/jvm8DefaultInterfaceMethods"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -17597,7 +18847,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/inlineClasses/propertyDelegation") @TestDataPath("$PROJECT_ROOT") - public class PropertyDelegation extends AbstractIrBlackBoxCodegenTest { + public class PropertyDelegation { @Test public void testAllFilesPresentInPropertyDelegation() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/propertyDelegation"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -17679,7 +18929,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter") @TestDataPath("$PROJECT_ROOT") - public class UnboxGenericParameter extends AbstractIrBlackBoxCodegenTest { + public class UnboxGenericParameter { @Test public void testAllFilesPresentInUnboxGenericParameter() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -17688,7 +18938,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/funInterface") @TestDataPath("$PROJECT_ROOT") - public class FunInterface extends AbstractIrBlackBoxCodegenTest { + public class FunInterface { @Test public void testAllFilesPresentInFunInterface() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/funInterface"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -17746,7 +18996,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/lambda") @TestDataPath("$PROJECT_ROOT") - public class Lambda extends AbstractIrBlackBoxCodegenTest { + public class Lambda { @Test public void testAllFilesPresentInLambda() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/lambda"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -17804,7 +19054,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/objectLiteral") @TestDataPath("$PROJECT_ROOT") - public class ObjectLiteral extends AbstractIrBlackBoxCodegenTest { + public class ObjectLiteral { @Test public void testAllFilesPresentInObjectLiteral() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/objectLiteral"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -17861,10 +19111,38 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes } } + @Nested + @TestMetadata("compiler/testData/codegen/box/innerClass") + @TestDataPath("$PROJECT_ROOT") + public class InnerClass { + @Test + public void testAllFilesPresentInInnerClass() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/innerClass"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @Test + @TestMetadata("kt3532.kt") + public void testKt3532() throws Exception { + runTest("compiler/testData/codegen/box/innerClass/kt3532.kt"); + } + + @Test + @TestMetadata("kt3812.kt") + public void testKt3812() throws Exception { + runTest("compiler/testData/codegen/box/innerClass/kt3812.kt"); + } + + @Test + @TestMetadata("kt4036.kt") + public void testKt4036() throws Exception { + runTest("compiler/testData/codegen/box/innerClass/kt4036.kt"); + } + } + @Nested @TestMetadata("compiler/testData/codegen/box/innerNested") @TestDataPath("$PROJECT_ROOT") - public class InnerNested extends AbstractIrBlackBoxCodegenTest { + public class InnerNested { @Test public void testAllFilesPresentInInnerNested() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/innerNested"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -18041,7 +19319,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall") @TestDataPath("$PROJECT_ROOT") - public class SuperConstructorCall extends AbstractIrBlackBoxCodegenTest { + public class SuperConstructorCall { @Test public void testAllFilesPresentInSuperConstructorCall() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/innerNested/superConstructorCall"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -18178,7 +19456,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/instructions") @TestDataPath("$PROJECT_ROOT") - public class Instructions extends AbstractIrBlackBoxCodegenTest { + public class Instructions { @Test public void testAllFilesPresentInInstructions() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/instructions"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -18187,7 +19465,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/instructions/swap") @TestDataPath("$PROJECT_ROOT") - public class Swap extends AbstractIrBlackBoxCodegenTest { + public class Swap { @Test public void testAllFilesPresentInSwap() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/instructions/swap"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -18207,10 +19485,32 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes } } + @Nested + @TestMetadata("compiler/testData/codegen/box/interfaces") + @TestDataPath("$PROJECT_ROOT") + public class Interfaces { + @Test + public void testAllFilesPresentInInterfaces() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/interfaces"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @Test + @TestMetadata("defaultMethod.kt") + public void testDefaultMethod() throws Exception { + runTest("compiler/testData/codegen/box/interfaces/defaultMethod.kt"); + } + + @Test + @TestMetadata("inheritJavaInterface.kt") + public void testInheritJavaInterface() throws Exception { + runTest("compiler/testData/codegen/box/interfaces/inheritJavaInterface.kt"); + } + } + @Nested @TestMetadata("compiler/testData/codegen/box/intrinsics") @TestDataPath("$PROJECT_ROOT") - public class Intrinsics extends AbstractIrBlackBoxCodegenTest { + public class Intrinsics { @Test public void testAllFilesPresentInIntrinsics() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/intrinsics"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -18382,16 +19682,156 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/invokedynamic") @TestDataPath("$PROJECT_ROOT") - public class Invokedynamic extends AbstractIrBlackBoxCodegenTest { + public class Invokedynamic { @Test public void testAllFilesPresentInInvokedynamic() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/invokedynamic"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Nested + @TestMetadata("compiler/testData/codegen/box/invokedynamic/lambdas") + @TestDataPath("$PROJECT_ROOT") + public class Lambdas { + @Test + public void testAllFilesPresentInLambdas() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/invokedynamic/lambdas"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @Test + @TestMetadata("bigArityExtLambda.kt") + public void testBigArityExtLambda() throws Exception { + runTest("compiler/testData/codegen/box/invokedynamic/lambdas/bigArityExtLambda.kt"); + } + + @Test + @TestMetadata("bigArityLambda.kt") + public void testBigArityLambda() throws Exception { + runTest("compiler/testData/codegen/box/invokedynamic/lambdas/bigArityLambda.kt"); + } + + @Test + @TestMetadata("capturedDispatchReceiver.kt") + public void testCapturedDispatchReceiver() throws Exception { + runTest("compiler/testData/codegen/box/invokedynamic/lambdas/capturedDispatchReceiver.kt"); + } + + @Test + @TestMetadata("capturedExtensionReceiver.kt") + public void testCapturedExtensionReceiver() throws Exception { + runTest("compiler/testData/codegen/box/invokedynamic/lambdas/capturedExtensionReceiver.kt"); + } + + @Test + @TestMetadata("capturingValue.kt") + public void testCapturingValue() throws Exception { + runTest("compiler/testData/codegen/box/invokedynamic/lambdas/capturingValue.kt"); + } + + @Test + @TestMetadata("capturingVar.kt") + public void testCapturingVar() throws Exception { + runTest("compiler/testData/codegen/box/invokedynamic/lambdas/capturingVar.kt"); + } + + @Test + @TestMetadata("extensionLambda.kt") + public void testExtensionLambda() throws Exception { + runTest("compiler/testData/codegen/box/invokedynamic/lambdas/extensionLambda.kt"); + } + + @Test + @TestMetadata("lambdaSerializable.kt") + public void testLambdaSerializable() throws Exception { + runTest("compiler/testData/codegen/box/invokedynamic/lambdas/lambdaSerializable.kt"); + } + + @Test + @TestMetadata("lambdaToSting.kt") + public void testLambdaToSting() throws Exception { + runTest("compiler/testData/codegen/box/invokedynamic/lambdas/lambdaToSting.kt"); + } + + @Test + @TestMetadata("nestedIndyLambdas.kt") + public void testNestedIndyLambdas() throws Exception { + runTest("compiler/testData/codegen/box/invokedynamic/lambdas/nestedIndyLambdas.kt"); + } + + @Test + @TestMetadata("primitiveValueParameters.kt") + public void testPrimitiveValueParameters() throws Exception { + runTest("compiler/testData/codegen/box/invokedynamic/lambdas/primitiveValueParameters.kt"); + } + + @Test + @TestMetadata("simpleIndyLambda.kt") + public void testSimpleIndyLambda() throws Exception { + runTest("compiler/testData/codegen/box/invokedynamic/lambdas/simpleIndyLambda.kt"); + } + + @Test + @TestMetadata("suspendLambda.kt") + public void testSuspendLambda() throws Exception { + runTest("compiler/testData/codegen/box/invokedynamic/lambdas/suspendLambda.kt"); + } + + @Test + @TestMetadata("voidReturnType.kt") + public void testVoidReturnType() throws Exception { + runTest("compiler/testData/codegen/box/invokedynamic/lambdas/voidReturnType.kt"); + } + + @Nested + @TestMetadata("compiler/testData/codegen/box/invokedynamic/lambdas/inlineClassInSignature") + @TestDataPath("$PROJECT_ROOT") + public class InlineClassInSignature { + @Test + public void testAllFilesPresentInInlineClassInSignature() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/invokedynamic/lambdas/inlineClassInSignature"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @Test + @TestMetadata("lambdaWithInlineAny.kt") + public void testLambdaWithInlineAny() throws Exception { + runTest("compiler/testData/codegen/box/invokedynamic/lambdas/inlineClassInSignature/lambdaWithInlineAny.kt"); + } + + @Test + @TestMetadata("lambdaWithInlineInt.kt") + public void testLambdaWithInlineInt() throws Exception { + runTest("compiler/testData/codegen/box/invokedynamic/lambdas/inlineClassInSignature/lambdaWithInlineInt.kt"); + } + + @Test + @TestMetadata("lambdaWithInlineNAny.kt") + public void testLambdaWithInlineNAny() throws Exception { + runTest("compiler/testData/codegen/box/invokedynamic/lambdas/inlineClassInSignature/lambdaWithInlineNAny.kt"); + } + + @Test + @TestMetadata("lambdaWithInlineNInt.kt") + public void testLambdaWithInlineNInt() throws Exception { + runTest("compiler/testData/codegen/box/invokedynamic/lambdas/inlineClassInSignature/lambdaWithInlineNInt.kt"); + } + + @Test + @TestMetadata("lambdaWithInlineNString.kt") + public void testLambdaWithInlineNString() throws Exception { + runTest("compiler/testData/codegen/box/invokedynamic/lambdas/inlineClassInSignature/lambdaWithInlineNString.kt"); + } + + @Test + @TestMetadata("lambdaWithInlineString.kt") + public void testLambdaWithInlineString() throws Exception { + runTest("compiler/testData/codegen/box/invokedynamic/lambdas/inlineClassInSignature/lambdaWithInlineString.kt"); + } + } + } + @Nested @TestMetadata("compiler/testData/codegen/box/invokedynamic/sam") @TestDataPath("$PROJECT_ROOT") - public class Sam extends AbstractIrBlackBoxCodegenTest { + public class Sam { @Test public void testAllFilesPresentInSam() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/invokedynamic/sam"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -18523,44 +19963,16 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/invokedynamic/sam/unboundFunctionReferenceEquality.kt"); } - @Nested - @TestMetadata("compiler/testData/codegen/box/invokedynamic/sam/inline") - @TestDataPath("$PROJECT_ROOT") - public class Inline extends AbstractIrBlackBoxCodegenTest { - @Test - public void testAllFilesPresentInInline() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/invokedynamic/sam/inline"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); - } - - @Test - @TestMetadata("crossinlineLambda1.kt") - public void testCrossinlineLambda1() throws Exception { - runTest("compiler/testData/codegen/box/invokedynamic/sam/inline/crossinlineLambda1.kt"); - } - - @Test - @TestMetadata("crossinlineLambda2.kt") - public void testCrossinlineLambda2() throws Exception { - runTest("compiler/testData/codegen/box/invokedynamic/sam/inline/crossinlineLambda2.kt"); - } - - @Test - @TestMetadata("inlineFunInDifferentPackage.kt") - public void testInlineFunInDifferentPackage() throws Exception { - runTest("compiler/testData/codegen/box/invokedynamic/sam/inline/inlineFunInDifferentPackage.kt"); - } - - @Test - @TestMetadata("inlineLambda1.kt") - public void testInlineLambda1() throws Exception { - runTest("compiler/testData/codegen/box/invokedynamic/sam/inline/inlineLambda1.kt"); - } + @Test + @TestMetadata("voidReturnTypeAsGeneric.kt") + public void testVoidReturnTypeAsGeneric() throws Exception { + runTest("compiler/testData/codegen/box/invokedynamic/sam/voidReturnTypeAsGeneric.kt"); } @Nested @TestMetadata("compiler/testData/codegen/box/invokedynamic/sam/inlineClassInSignature") @TestDataPath("$PROJECT_ROOT") - public class InlineClassInSignature extends AbstractIrBlackBoxCodegenTest { + public class InlineClassInSignature { @Test public void testAllFilesPresentInInlineClassInSignature() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/invokedynamic/sam/inlineClassInSignature"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -18644,7 +20056,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/ir") @TestDataPath("$PROJECT_ROOT") - public class Ir extends AbstractIrBlackBoxCodegenTest { + public class Ir { @Test public void testAllFilesPresentInIr() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ir"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -18767,7 +20179,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/ir/closureConversion") @TestDataPath("$PROJECT_ROOT") - public class ClosureConversion extends AbstractIrBlackBoxCodegenTest { + public class ClosureConversion { @Test public void testAllFilesPresentInClosureConversion() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ir/closureConversion"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -18825,7 +20237,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/ir/primitiveNumberComparisons") @TestDataPath("$PROJECT_ROOT") - public class PrimitiveNumberComparisons extends AbstractIrBlackBoxCodegenTest { + public class PrimitiveNumberComparisons { @Test public void testAllFilesPresentInPrimitiveNumberComparisons() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ir/primitiveNumberComparisons"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -18859,7 +20271,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/ir/serializationRegressions") @TestDataPath("$PROJECT_ROOT") - public class SerializationRegressions extends AbstractIrBlackBoxCodegenTest { + public class SerializationRegressions { @Test public void testAllFilesPresentInSerializationRegressions() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ir/serializationRegressions"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -18918,7 +20330,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/javaInterop") @TestDataPath("$PROJECT_ROOT") - public class JavaInterop extends AbstractIrBlackBoxCodegenTest { + public class JavaInterop { @Test public void testAllFilesPresentInJavaInterop() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/javaInterop"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -18981,7 +20393,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/javaInterop/generics") @TestDataPath("$PROJECT_ROOT") - public class Generics extends AbstractIrBlackBoxCodegenTest { + public class Generics { @Test public void testAllFilesPresentInGenerics() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/javaInterop/generics"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -19033,7 +20445,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions") @TestDataPath("$PROJECT_ROOT") - public class NotNullAssertions extends AbstractIrBlackBoxCodegenTest { + public class NotNullAssertions { @Test public void testAllFilesPresentInNotNullAssertions() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/javaInterop/notNullAssertions"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -19168,7 +20580,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability") @TestDataPath("$PROJECT_ROOT") - public class EnhancedNullability extends AbstractIrBlackBoxCodegenTest { + public class EnhancedNullability { @Test public void testAllFilesPresentInEnhancedNullability() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -19226,7 +20638,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullCheckOnLambdaReturnValue") @TestDataPath("$PROJECT_ROOT") - public class NullCheckOnLambdaReturnValue extends AbstractIrBlackBoxCodegenTest { + public class NullCheckOnLambdaReturnValue { @Test public void testAllFilesPresentInNullCheckOnLambdaReturnValue() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullCheckOnLambdaReturnValue"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -19297,7 +20709,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/javaInterop/objectMethods") @TestDataPath("$PROJECT_ROOT") - public class ObjectMethods extends AbstractIrBlackBoxCodegenTest { + public class ObjectMethods { @Test public void testAllFilesPresentInObjectMethods() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/javaInterop/objectMethods"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -19344,7 +20756,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/jdk") @TestDataPath("$PROJECT_ROOT") - public class Jdk extends AbstractIrBlackBoxCodegenTest { + public class Jdk { @Test public void testAllFilesPresentInJdk() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/jdk"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -19402,7 +20814,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/jvm8") @TestDataPath("$PROJECT_ROOT") - public class Jvm8 extends AbstractIrBlackBoxCodegenTest { + public class Jvm8 { @Test public void testAllFilesPresentInJvm8() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/jvm8"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -19543,7 +20955,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/jvm8/defaults") @TestDataPath("$PROJECT_ROOT") - public class Defaults extends AbstractIrBlackBoxCodegenTest { + public class Defaults { @Test @TestMetadata("26360.kt") public void test26360() throws Exception { @@ -19735,10 +21147,16 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/jvm8/defaults/superCall.kt"); } + @Test + @TestMetadata("suspendFunction.kt") + public void testSuspendFunction() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/suspendFunction.kt"); + } + @Nested @TestMetadata("compiler/testData/codegen/box/jvm8/defaults/allCompatibility") @TestDataPath("$PROJECT_ROOT") - public class AllCompatibility extends AbstractIrBlackBoxCodegenTest { + public class AllCompatibility { @Test @TestMetadata("accessor.kt") public void testAccessor() throws Exception { @@ -19912,10 +21330,16 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/jvm8/defaults/allCompatibility/simpleFunction.kt"); } + @Test + @TestMetadata("suspendFunction.kt") + public void testSuspendFunction() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/allCompatibility/suspendFunction.kt"); + } + @Nested @TestMetadata("compiler/testData/codegen/box/jvm8/defaults/allCompatibility/delegationBy") @TestDataPath("$PROJECT_ROOT") - public class DelegationBy extends AbstractIrBlackBoxCodegenTest { + public class DelegationBy { @Test public void testAllFilesPresentInDelegationBy() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/jvm8/defaults/allCompatibility/delegationBy"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -19938,7 +21362,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/jvm8/defaults/compatibility") @TestDataPath("$PROJECT_ROOT") - public class Compatibility extends AbstractIrBlackBoxCodegenTest { + public class Compatibility { @Test public void testAllFilesPresentInCompatibility() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/jvm8/defaults/compatibility"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -20044,7 +21468,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/jvm8/defaults/delegationBy") @TestDataPath("$PROJECT_ROOT") - public class DelegationBy extends AbstractIrBlackBoxCodegenTest { + public class DelegationBy { @Test public void testAllFilesPresentInDelegationBy() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/jvm8/defaults/delegationBy"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -20066,7 +21490,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls") @TestDataPath("$PROJECT_ROOT") - public class NoDefaultImpls extends AbstractIrBlackBoxCodegenTest { + public class NoDefaultImpls { @Test @TestMetadata("accessor.kt") public void testAccessor() throws Exception { @@ -20234,10 +21658,16 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/simpleFunction.kt"); } + @Test + @TestMetadata("suspendFunction.kt") + public void testSuspendFunction() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/suspendFunction.kt"); + } + @Nested @TestMetadata("compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/delegationBy") @TestDataPath("$PROJECT_ROOT") - public class DelegationBy extends AbstractIrBlackBoxCodegenTest { + public class DelegationBy { @Test public void testAllFilesPresentInDelegationBy() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/delegationBy"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -20259,7 +21689,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/specialization") @TestDataPath("$PROJECT_ROOT") - public class Specialization extends AbstractIrBlackBoxCodegenTest { + public class Specialization { @Test public void testAllFilesPresentInSpecialization() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/specialization"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -20276,7 +21706,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/jvm8/defaults/noDelegation") @TestDataPath("$PROJECT_ROOT") - public class NoDelegation extends AbstractIrBlackBoxCodegenTest { + public class NoDelegation { @Test public void testAllFilesPresentInNoDelegation() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/jvm8/defaults/noDelegation"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -20304,7 +21734,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/jvm8/defaults/reflection") @TestDataPath("$PROJECT_ROOT") - public class Reflection extends AbstractIrBlackBoxCodegenTest { + public class Reflection { @Test public void testAllFilesPresentInReflection() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/jvm8/defaults/reflection"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -20321,7 +21751,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/jvm8/interfaceFlag") @TestDataPath("$PROJECT_ROOT") - public class InterfaceFlag extends AbstractIrBlackBoxCodegenTest { + public class InterfaceFlag { @Test public void testAllFilesPresentInInterfaceFlag() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/jvm8/interfaceFlag"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -20343,7 +21773,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/jvm8/javaDefaults") @TestDataPath("$PROJECT_ROOT") - public class JavaDefaults extends AbstractIrBlackBoxCodegenTest { + public class JavaDefaults { @Test public void testAllFilesPresentInJavaDefaults() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/jvm8/javaDefaults"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -20438,7 +21868,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/jvmField") @TestDataPath("$PROJECT_ROOT") - public class JvmField extends AbstractIrBlackBoxCodegenTest { + public class JvmField { @Test public void testAllFilesPresentInJvmField() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/jvmField"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -20598,7 +22028,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/jvmName") @TestDataPath("$PROJECT_ROOT") - public class JvmName extends AbstractIrBlackBoxCodegenTest { + public class JvmName { @Test public void testAllFilesPresentInJvmName() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/jvmName"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -20703,7 +22133,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/jvmName/fileFacades") @TestDataPath("$PROJECT_ROOT") - public class FileFacades extends AbstractIrBlackBoxCodegenTest { + public class FileFacades { @Test public void testAllFilesPresentInFileFacades() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/jvmName/fileFacades"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -20732,7 +22162,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/jvmOverloads") @TestDataPath("$PROJECT_ROOT") - public class JvmOverloads extends AbstractIrBlackBoxCodegenTest { + public class JvmOverloads { @Test public void testAllFilesPresentInJvmOverloads() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/jvmOverloads"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -20862,7 +22292,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/jvmPackageName") @TestDataPath("$PROJECT_ROOT") - public class JvmPackageName extends AbstractIrBlackBoxCodegenTest { + public class JvmPackageName { @Test public void testAllFilesPresentInJvmPackageName() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/jvmPackageName"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -20902,7 +22332,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/jvmStatic") @TestDataPath("$PROJECT_ROOT") - public class JvmStatic extends AbstractIrBlackBoxCodegenTest { + public class JvmStatic { @Test public void testAllFilesPresentInJvmStatic() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/jvmStatic"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -21110,7 +22540,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/labels") @TestDataPath("$PROJECT_ROOT") - public class Labels extends AbstractIrBlackBoxCodegenTest { + public class Labels { @Test public void testAllFilesPresentInLabels() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/labels"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -21168,7 +22598,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/lazyCodegen") @TestDataPath("$PROJECT_ROOT") - public class LazyCodegen extends AbstractIrBlackBoxCodegenTest { + public class LazyCodegen { @Test public void testAllFilesPresentInLazyCodegen() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/lazyCodegen"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -21231,7 +22661,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/lazyCodegen/optimizations") @TestDataPath("$PROJECT_ROOT") - public class Optimizations extends AbstractIrBlackBoxCodegenTest { + public class Optimizations { @Test public void testAllFilesPresentInOptimizations() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/lazyCodegen/optimizations"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -21296,7 +22726,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/localClasses") @TestDataPath("$PROJECT_ROOT") - public class LocalClasses extends AbstractIrBlackBoxCodegenTest { + public class LocalClasses { @Test public void testAllFilesPresentInLocalClasses() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/localClasses"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -21528,7 +22958,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/mangling") @TestDataPath("$PROJECT_ROOT") - public class Mangling extends AbstractIrBlackBoxCodegenTest { + public class Mangling { @Test public void testAllFilesPresentInMangling() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/mangling"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -21592,7 +23022,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/mixedNamedPosition") @TestDataPath("$PROJECT_ROOT") - public class MixedNamedPosition extends AbstractIrBlackBoxCodegenTest { + public class MixedNamedPosition { @Test public void testAllFilesPresentInMixedNamedPosition() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/mixedNamedPosition"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -21626,7 +23056,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/multiDecl") @TestDataPath("$PROJECT_ROOT") - public class MultiDecl extends AbstractIrBlackBoxCodegenTest { + public class MultiDecl { @Test public void testAllFilesPresentInMultiDecl() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiDecl"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -21719,7 +23149,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/multiDecl/forIterator") @TestDataPath("$PROJECT_ROOT") - public class ForIterator extends AbstractIrBlackBoxCodegenTest { + public class ForIterator { @Test public void testAllFilesPresentInForIterator() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiDecl/forIterator"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -21758,7 +23188,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/multiDecl/forIterator/longIterator") @TestDataPath("$PROJECT_ROOT") - public class LongIterator extends AbstractIrBlackBoxCodegenTest { + public class LongIterator { @Test public void testAllFilesPresentInLongIterator() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiDecl/forIterator/longIterator"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -21793,7 +23223,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/multiDecl/forRange") @TestDataPath("$PROJECT_ROOT") - public class ForRange extends AbstractIrBlackBoxCodegenTest { + public class ForRange { @Test public void testAllFilesPresentInForRange() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiDecl/forRange"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -21844,7 +23274,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo") @TestDataPath("$PROJECT_ROOT") - public class ExplicitRangeTo extends AbstractIrBlackBoxCodegenTest { + public class ExplicitRangeTo { @Test public void testAllFilesPresentInExplicitRangeTo() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -21883,7 +23313,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/int") @TestDataPath("$PROJECT_ROOT") - public class Int extends AbstractIrBlackBoxCodegenTest { + public class Int { @Test public void testAllFilesPresentInInt() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/int"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -21917,7 +23347,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/long") @TestDataPath("$PROJECT_ROOT") - public class Long extends AbstractIrBlackBoxCodegenTest { + public class Long { @Test public void testAllFilesPresentInLong() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/long"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -21952,7 +23382,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot") @TestDataPath("$PROJECT_ROOT") - public class ExplicitRangeToWithDot extends AbstractIrBlackBoxCodegenTest { + public class ExplicitRangeToWithDot { @Test public void testAllFilesPresentInExplicitRangeToWithDot() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -21991,7 +23421,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/int") @TestDataPath("$PROJECT_ROOT") - public class Int extends AbstractIrBlackBoxCodegenTest { + public class Int { @Test public void testAllFilesPresentInInt() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/int"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -22025,7 +23455,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/long") @TestDataPath("$PROJECT_ROOT") - public class Long extends AbstractIrBlackBoxCodegenTest { + public class Long { @Test public void testAllFilesPresentInLong() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/long"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -22060,7 +23490,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/multiDecl/forRange/int") @TestDataPath("$PROJECT_ROOT") - public class Int extends AbstractIrBlackBoxCodegenTest { + public class Int { @Test public void testAllFilesPresentInInt() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiDecl/forRange/int"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -22094,7 +23524,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/multiDecl/forRange/long") @TestDataPath("$PROJECT_ROOT") - public class Long extends AbstractIrBlackBoxCodegenTest { + public class Long { @Test public void testAllFilesPresentInLong() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiDecl/forRange/long"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -22130,7 +23560,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/multifileClasses") @TestDataPath("$PROJECT_ROOT") - public class MultifileClasses extends AbstractIrBlackBoxCodegenTest { + public class MultifileClasses { @Test public void testAllFilesPresentInMultifileClasses() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multifileClasses"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -22223,7 +23653,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/multifileClasses/optimized") @TestDataPath("$PROJECT_ROOT") - public class Optimized extends AbstractIrBlackBoxCodegenTest { + public class Optimized { @Test public void testAllFilesPresentInOptimized() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multifileClasses/optimized"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -22300,12 +23730,18 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/multiplatform") @TestDataPath("$PROJECT_ROOT") - public class Multiplatform extends AbstractIrBlackBoxCodegenTest { + public class Multiplatform { @Test public void testAllFilesPresentInMultiplatform() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test + @TestMetadata("annotationsViaActualTypeAliasFromBinary.kt") + public void testAnnotationsViaActualTypeAliasFromBinary() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/annotationsViaActualTypeAliasFromBinary.kt"); + } + @Test @TestMetadata("expectClassInJvmMultifileFacade.kt") public void testExpectClassInJvmMultifileFacade() throws Exception { @@ -22339,7 +23775,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/multiplatform/defaultArguments") @TestDataPath("$PROJECT_ROOT") - public class DefaultArguments extends AbstractIrBlackBoxCodegenTest { + public class DefaultArguments { @Test public void testAllFilesPresentInDefaultArguments() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/defaultArguments"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -22487,7 +23923,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/multiplatform/multiModule") @TestDataPath("$PROJECT_ROOT") - public class MultiModule extends AbstractIrBlackBoxCodegenTest { + public class MultiModule { @Test public void testAllFilesPresentInMultiModule() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/multiModule"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -22498,7 +23934,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/nonLocalReturns") @TestDataPath("$PROJECT_ROOT") - public class NonLocalReturns extends AbstractIrBlackBoxCodegenTest { + public class NonLocalReturns { @Test public void testAllFilesPresentInNonLocalReturns() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/nonLocalReturns"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -22541,10 +23977,50 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes } } + @Nested + @TestMetadata("compiler/testData/codegen/box/notNullAssertions") + @TestDataPath("$PROJECT_ROOT") + public class NotNullAssertions { + @Test + public void testAllFilesPresentInNotNullAssertions() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/notNullAssertions"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @Test + @TestMetadata("callAssertions.kt") + public void testCallAssertions() throws Exception { + runTest("compiler/testData/codegen/box/notNullAssertions/callAssertions.kt"); + } + + @Test + @TestMetadata("delegation.kt") + public void testDelegation() throws Exception { + runTest("compiler/testData/codegen/box/notNullAssertions/delegation.kt"); + } + + @Test + @TestMetadata("doGenerateParamAssertions.kt") + public void testDoGenerateParamAssertions() throws Exception { + runTest("compiler/testData/codegen/box/notNullAssertions/doGenerateParamAssertions.kt"); + } + + @Test + @TestMetadata("noCallAssertions.kt") + public void testNoCallAssertions() throws Exception { + runTest("compiler/testData/codegen/box/notNullAssertions/noCallAssertions.kt"); + } + + @Test + @TestMetadata("rightElvisOperand.kt") + public void testRightElvisOperand() throws Exception { + runTest("compiler/testData/codegen/box/notNullAssertions/rightElvisOperand.kt"); + } + } + @Nested @TestMetadata("compiler/testData/codegen/box/nothingValue") @TestDataPath("$PROJECT_ROOT") - public class NothingValue extends AbstractIrBlackBoxCodegenTest { + public class NothingValue { @Test public void testAllFilesPresentInNothingValue() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/nothingValue"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -22566,7 +24042,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/nullCheckOptimization") @TestDataPath("$PROJECT_ROOT") - public class NullCheckOptimization extends AbstractIrBlackBoxCodegenTest { + public class NullCheckOptimization { @Test public void testAllFilesPresentInNullCheckOptimization() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/nullCheckOptimization"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -22648,7 +24124,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/objectIntrinsics") @TestDataPath("$PROJECT_ROOT") - public class ObjectIntrinsics extends AbstractIrBlackBoxCodegenTest { + public class ObjectIntrinsics { @Test public void testAllFilesPresentInObjectIntrinsics() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/objectIntrinsics"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -22664,7 +24140,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/objects") @TestDataPath("$PROJECT_ROOT") - public class Objects extends AbstractIrBlackBoxCodegenTest { + public class Objects { @Test public void testAllFilesPresentInObjects() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/objects"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -23117,7 +24593,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/objects/companionObjectAccess") @TestDataPath("$PROJECT_ROOT") - public class CompanionObjectAccess extends AbstractIrBlackBoxCodegenTest { + public class CompanionObjectAccess { @Test public void testAllFilesPresentInCompanionObjectAccess() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/objects/companionObjectAccess"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -23222,7 +24698,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/objects/companionObjectAccess/multipleCompanionsWithAccessors") @TestDataPath("$PROJECT_ROOT") - public class MultipleCompanionsWithAccessors extends AbstractIrBlackBoxCodegenTest { + public class MultipleCompanionsWithAccessors { @Test @TestMetadata("accessFromInlineLambda.kt") public void testAccessFromInlineLambda() throws Exception { @@ -23304,7 +24780,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/objects/companionObjectAccess/primitiveCompanion") @TestDataPath("$PROJECT_ROOT") - public class PrimitiveCompanion extends AbstractIrBlackBoxCodegenTest { + public class PrimitiveCompanion { @Test public void testAllFilesPresentInPrimitiveCompanion() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/objects/companionObjectAccess/primitiveCompanion"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -23358,7 +24834,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/operatorConventions") @TestDataPath("$PROJECT_ROOT") - public class OperatorConventions extends AbstractIrBlackBoxCodegenTest { + public class OperatorConventions { @Test public void testAllFilesPresentInOperatorConventions() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/operatorConventions"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -23487,7 +24963,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/operatorConventions/compareTo") @TestDataPath("$PROJECT_ROOT") - public class CompareTo extends AbstractIrBlackBoxCodegenTest { + public class CompareTo { @Test public void testAllFilesPresentInCompareTo() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/operatorConventions/compareTo"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -23564,7 +25040,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/optimizations") @TestDataPath("$PROJECT_ROOT") - public class Optimizations extends AbstractIrBlackBoxCodegenTest { + public class Optimizations { @Test public void testAllFilesPresentInOptimizations() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/optimizations"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -23586,7 +25062,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/package") @TestDataPath("$PROJECT_ROOT") - public class Package extends AbstractIrBlackBoxCodegenTest { + public class Package { @Test public void testAllFilesPresentInPackage() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/package"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -23668,7 +25144,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/parametersMetadata") @TestDataPath("$PROJECT_ROOT") - public class ParametersMetadata extends AbstractIrBlackBoxCodegenTest { + public class ParametersMetadata { @Test public void testAllFilesPresentInParametersMetadata() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/parametersMetadata"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -23738,18 +25214,42 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/platformTypes") @TestDataPath("$PROJECT_ROOT") - public class PlatformTypes extends AbstractIrBlackBoxCodegenTest { + public class PlatformTypes { @Test public void testAllFilesPresentInPlatformTypes() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/platformTypes"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test + @TestMetadata("genericUnit.kt") + public void testGenericUnit() throws Exception { + runTest("compiler/testData/codegen/box/platformTypes/genericUnit.kt"); + } + @Test @TestMetadata("inferenceFlexibleTToNullable.kt") public void testInferenceFlexibleTToNullable() throws Exception { runTest("compiler/testData/codegen/box/platformTypes/inferenceFlexibleTToNullable.kt"); } + @Test + @TestMetadata("kt14989.kt") + public void testKt14989() throws Exception { + runTest("compiler/testData/codegen/box/platformTypes/kt14989.kt"); + } + + @Test + @TestMetadata("specializedMapFull.kt") + public void testSpecializedMapFull() throws Exception { + runTest("compiler/testData/codegen/box/platformTypes/specializedMapFull.kt"); + } + + @Test + @TestMetadata("specializedMapPut.kt") + public void testSpecializedMapPut() throws Exception { + runTest("compiler/testData/codegen/box/platformTypes/specializedMapPut.kt"); + } + @Test @TestMetadata("unsafeNullCheck.kt") public void testUnsafeNullCheck() throws Exception { @@ -23765,7 +25265,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/platformTypes/primitives") @TestDataPath("$PROJECT_ROOT") - public class Primitives extends AbstractIrBlackBoxCodegenTest { + public class Primitives { @Test public void testAllFilesPresentInPrimitives() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/platformTypes/primitives"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -23902,7 +25402,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/polymorphicSignature") @TestDataPath("$PROJECT_ROOT") - public class PolymorphicSignature extends AbstractIrBlackBoxCodegenTest { + public class PolymorphicSignature { @Test public void testAllFilesPresentInPolymorphicSignature() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/polymorphicSignature"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -23960,7 +25460,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/primitiveTypes") @TestDataPath("$PROJECT_ROOT") - public class PrimitiveTypes extends AbstractIrBlackBoxCodegenTest { + public class PrimitiveTypes { @Test public void testAllFilesPresentInPrimitiveTypes() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/primitiveTypes"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -24323,7 +25823,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/primitiveTypes/equalityWithObject") @TestDataPath("$PROJECT_ROOT") - public class EqualityWithObject extends AbstractIrBlackBoxCodegenTest { + public class EqualityWithObject { @Test public void testAllFilesPresentInEqualityWithObject() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/primitiveTypes/equalityWithObject"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -24386,7 +25886,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated") @TestDataPath("$PROJECT_ROOT") - public class Generated extends AbstractIrBlackBoxCodegenTest { + public class Generated { @Test public void testAllFilesPresentInGenerated() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -24506,7 +26006,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/private") @TestDataPath("$PROJECT_ROOT") - public class Private extends AbstractIrBlackBoxCodegenTest { + public class Private { @Test public void testAllFilesPresentInPrivate() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/private"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -24528,7 +26028,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/privateConstructors") @TestDataPath("$PROJECT_ROOT") - public class PrivateConstructors extends AbstractIrBlackBoxCodegenTest { + public class PrivateConstructors { @Test public void testAllFilesPresentInPrivateConstructors() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/privateConstructors"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -24616,7 +26116,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/properties") @TestDataPath("$PROJECT_ROOT") - public class Properties extends AbstractIrBlackBoxCodegenTest { + public class Properties { @Test @TestMetadata("accessToPrivateProperty.kt") public void testAccessToPrivateProperty() throws Exception { @@ -25135,7 +26635,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/properties/const") @TestDataPath("$PROJECT_ROOT") - public class Const extends AbstractIrBlackBoxCodegenTest { + public class Const { @Test public void testAllFilesPresentInConst() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/properties/const"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -25193,7 +26693,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/properties/lateinit") @TestDataPath("$PROJECT_ROOT") - public class Lateinit extends AbstractIrBlackBoxCodegenTest { + public class Lateinit { @Test @TestMetadata("accessor.kt") public void testAccessor() throws Exception { @@ -25292,7 +26792,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize") @TestDataPath("$PROJECT_ROOT") - public class IsInitializedAndDeinitialize extends AbstractIrBlackBoxCodegenTest { + public class IsInitializedAndDeinitialize { @Test public void testAllFilesPresentInIsInitializedAndDeinitialize() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -25356,7 +26856,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/properties/lateinit/local") @TestDataPath("$PROJECT_ROOT") - public class Local extends AbstractIrBlackBoxCodegenTest { + public class Local { @Test public void testAllFilesPresentInLocal() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/properties/lateinit/local"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -25408,7 +26908,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/properties/lateinit/topLevel") @TestDataPath("$PROJECT_ROOT") - public class TopLevel extends AbstractIrBlackBoxCodegenTest { + public class TopLevel { @Test @TestMetadata("accessorException.kt") public void testAccessorException() throws Exception { @@ -25447,10 +26947,38 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes } } + @Nested + @TestMetadata("compiler/testData/codegen/box/property") + @TestDataPath("$PROJECT_ROOT") + public class Property { + @Test + public void testAllFilesPresentInProperty() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/property"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @Test + @TestMetadata("fieldAccessFromExtensionInTraitImpl.kt") + public void testFieldAccessFromExtensionInTraitImpl() throws Exception { + runTest("compiler/testData/codegen/box/property/fieldAccessFromExtensionInTraitImpl.kt"); + } + + @Test + @TestMetadata("fieldAccessViaSubclass.kt") + public void testFieldAccessViaSubclass() throws Exception { + runTest("compiler/testData/codegen/box/property/fieldAccessViaSubclass.kt"); + } + + @Test + @TestMetadata("referenceToJavaFieldViaBridge.kt") + public void testReferenceToJavaFieldViaBridge() throws Exception { + runTest("compiler/testData/codegen/box/property/referenceToJavaFieldViaBridge.kt"); + } + } + @Nested @TestMetadata("compiler/testData/codegen/box/publishedApi") @TestDataPath("$PROJECT_ROOT") - public class PublishedApi extends AbstractIrBlackBoxCodegenTest { + public class PublishedApi { @Test public void testAllFilesPresentInPublishedApi() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/publishedApi"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -25478,7 +27006,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/ranges") @TestDataPath("$PROJECT_ROOT") - public class Ranges extends AbstractIrBlackBoxCodegenTest { + public class Ranges { @Test public void testAllFilesPresentInRanges() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -25589,7 +27117,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/ranges/contains") @TestDataPath("$PROJECT_ROOT") - public class Contains extends AbstractIrBlackBoxCodegenTest { + public class Contains { @Test public void testAllFilesPresentInContains() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/contains"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -25838,7 +27366,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/ranges/contains/generated") @TestDataPath("$PROJECT_ROOT") - public class Generated extends AbstractIrBlackBoxCodegenTest { + public class Generated { @Test public void testAllFilesPresentInGenerated() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/contains/generated"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -25933,7 +27461,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/ranges/evaluationOrder") @TestDataPath("$PROJECT_ROOT") - public class EvaluationOrder extends AbstractIrBlackBoxCodegenTest { + public class EvaluationOrder { @Test public void testAllFilesPresentInEvaluationOrder() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/evaluationOrder"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -25996,7 +27524,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/ranges/evaluationOrder/stepped") @TestDataPath("$PROJECT_ROOT") - public class Stepped extends AbstractIrBlackBoxCodegenTest { + public class Stepped { @Test public void testAllFilesPresentInStepped() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/evaluationOrder/stepped"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -26005,7 +27533,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/ranges/evaluationOrder/stepped/forInDownTo") @TestDataPath("$PROJECT_ROOT") - public class ForInDownTo extends AbstractIrBlackBoxCodegenTest { + public class ForInDownTo { @Test public void testAllFilesPresentInForInDownTo() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/evaluationOrder/stepped/forInDownTo"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -26063,7 +27591,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/ranges/evaluationOrder/stepped/forInRangeLiteral") @TestDataPath("$PROJECT_ROOT") - public class ForInRangeLiteral extends AbstractIrBlackBoxCodegenTest { + public class ForInRangeLiteral { @Test public void testAllFilesPresentInForInRangeLiteral() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/evaluationOrder/stepped/forInRangeLiteral"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -26121,7 +27649,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/ranges/evaluationOrder/stepped/forInUntil") @TestDataPath("$PROJECT_ROOT") - public class ForInUntil extends AbstractIrBlackBoxCodegenTest { + public class ForInUntil { @Test public void testAllFilesPresentInForInUntil() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/evaluationOrder/stepped/forInUntil"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -26181,7 +27709,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/ranges/expression") @TestDataPath("$PROJECT_ROOT") - public class Expression extends AbstractIrBlackBoxCodegenTest { + public class Expression { @Test public void testAllFilesPresentInExpression() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/expression"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -26371,7 +27899,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/ranges/forInDownTo") @TestDataPath("$PROJECT_ROOT") - public class ForInDownTo extends AbstractIrBlackBoxCodegenTest { + public class ForInDownTo { @Test public void testAllFilesPresentInForInDownTo() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/forInDownTo"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -26411,7 +27939,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/ranges/forInIndices") @TestDataPath("$PROJECT_ROOT") - public class ForInIndices extends AbstractIrBlackBoxCodegenTest { + public class ForInIndices { @Test public void testAllFilesPresentInForInIndices() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/forInIndices"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -26547,7 +28075,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/ranges/forInProgressionWithIndex") @TestDataPath("$PROJECT_ROOT") - public class ForInProgressionWithIndex extends AbstractIrBlackBoxCodegenTest { + public class ForInProgressionWithIndex { @Test public void testAllFilesPresentInForInProgressionWithIndex() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/forInProgressionWithIndex"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -26647,7 +28175,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/ranges/forInReversed") @TestDataPath("$PROJECT_ROOT") - public class ForInReversed extends AbstractIrBlackBoxCodegenTest { + public class ForInReversed { @Test public void testAllFilesPresentInForInReversed() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/forInReversed"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -26765,7 +28293,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/ranges/forInUntil") @TestDataPath("$PROJECT_ROOT") - public class ForInUntil extends AbstractIrBlackBoxCodegenTest { + public class ForInUntil { @Test public void testAllFilesPresentInForInUntil() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/forInUntil"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -26865,7 +28393,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/ranges/forWithPossibleOverflow") @TestDataPath("$PROJECT_ROOT") - public class ForWithPossibleOverflow extends AbstractIrBlackBoxCodegenTest { + public class ForWithPossibleOverflow { @Test public void testAllFilesPresentInForWithPossibleOverflow() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/forWithPossibleOverflow"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -26953,7 +28481,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/ranges/javaInterop") @TestDataPath("$PROJECT_ROOT") - public class JavaInterop extends AbstractIrBlackBoxCodegenTest { + public class JavaInterop { @Test public void testAllFilesPresentInJavaInterop() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/javaInterop"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -27076,7 +28604,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/ranges/javaInterop/withIndex") @TestDataPath("$PROJECT_ROOT") - public class WithIndex extends AbstractIrBlackBoxCodegenTest { + public class WithIndex { @Test public void testAllFilesPresentInWithIndex() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/javaInterop/withIndex"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -27165,7 +28693,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/ranges/literal") @TestDataPath("$PROJECT_ROOT") - public class Literal extends AbstractIrBlackBoxCodegenTest { + public class Literal { @Test public void testAllFilesPresentInLiteral() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/literal"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -27355,7 +28883,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/ranges/nullableLoopParameter") @TestDataPath("$PROJECT_ROOT") - public class NullableLoopParameter extends AbstractIrBlackBoxCodegenTest { + public class NullableLoopParameter { @Test public void testAllFilesPresentInNullableLoopParameter() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/nullableLoopParameter"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -27383,7 +28911,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped") @TestDataPath("$PROJECT_ROOT") - public class Stepped extends AbstractIrBlackBoxCodegenTest { + public class Stepped { @Test public void testAllFilesPresentInStepped() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -27392,7 +28920,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/expression") @TestDataPath("$PROJECT_ROOT") - public class Expression extends AbstractIrBlackBoxCodegenTest { + public class Expression { @Test public void testAllFilesPresentInExpression() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/expression"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -27401,7 +28929,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/expression/downTo") @TestDataPath("$PROJECT_ROOT") - public class DownTo extends AbstractIrBlackBoxCodegenTest { + public class DownTo { @Test public void testAllFilesPresentInDownTo() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/expression/downTo"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -27506,7 +29034,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/expression/downTo/nestedStep") @TestDataPath("$PROJECT_ROOT") - public class NestedStep extends AbstractIrBlackBoxCodegenTest { + public class NestedStep { @Test public void testAllFilesPresentInNestedStep() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/expression/downTo/nestedStep"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -27564,7 +29092,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/expression/downTo/reversed") @TestDataPath("$PROJECT_ROOT") - public class Reversed extends AbstractIrBlackBoxCodegenTest { + public class Reversed { @Test public void testAllFilesPresentInReversed() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/expression/downTo/reversed"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -27611,7 +29139,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/expression/rangeTo") @TestDataPath("$PROJECT_ROOT") - public class RangeTo extends AbstractIrBlackBoxCodegenTest { + public class RangeTo { @Test public void testAllFilesPresentInRangeTo() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/expression/rangeTo"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -27716,7 +29244,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/nestedStep") @TestDataPath("$PROJECT_ROOT") - public class NestedStep extends AbstractIrBlackBoxCodegenTest { + public class NestedStep { @Test public void testAllFilesPresentInNestedStep() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/nestedStep"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -27774,7 +29302,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/reversed") @TestDataPath("$PROJECT_ROOT") - public class Reversed extends AbstractIrBlackBoxCodegenTest { + public class Reversed { @Test public void testAllFilesPresentInReversed() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/expression/rangeTo/reversed"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -27821,7 +29349,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/expression/until") @TestDataPath("$PROJECT_ROOT") - public class Until extends AbstractIrBlackBoxCodegenTest { + public class Until { @Test public void testAllFilesPresentInUntil() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/expression/until"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -27932,7 +29460,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/expression/until/nestedStep") @TestDataPath("$PROJECT_ROOT") - public class NestedStep extends AbstractIrBlackBoxCodegenTest { + public class NestedStep { @Test public void testAllFilesPresentInNestedStep() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/expression/until/nestedStep"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -27990,7 +29518,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/expression/until/reversed") @TestDataPath("$PROJECT_ROOT") - public class Reversed extends AbstractIrBlackBoxCodegenTest { + public class Reversed { @Test public void testAllFilesPresentInReversed() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/expression/until/reversed"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -28038,7 +29566,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/literal") @TestDataPath("$PROJECT_ROOT") - public class Literal extends AbstractIrBlackBoxCodegenTest { + public class Literal { @Test public void testAllFilesPresentInLiteral() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/literal"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -28047,7 +29575,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/literal/downTo") @TestDataPath("$PROJECT_ROOT") - public class DownTo extends AbstractIrBlackBoxCodegenTest { + public class DownTo { @Test public void testAllFilesPresentInDownTo() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/literal/downTo"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -28152,7 +29680,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/literal/downTo/nestedStep") @TestDataPath("$PROJECT_ROOT") - public class NestedStep extends AbstractIrBlackBoxCodegenTest { + public class NestedStep { @Test public void testAllFilesPresentInNestedStep() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/literal/downTo/nestedStep"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -28210,7 +29738,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/literal/downTo/reversed") @TestDataPath("$PROJECT_ROOT") - public class Reversed extends AbstractIrBlackBoxCodegenTest { + public class Reversed { @Test public void testAllFilesPresentInReversed() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/literal/downTo/reversed"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -28257,7 +29785,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/literal/rangeTo") @TestDataPath("$PROJECT_ROOT") - public class RangeTo extends AbstractIrBlackBoxCodegenTest { + public class RangeTo { @Test public void testAllFilesPresentInRangeTo() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/literal/rangeTo"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -28362,7 +29890,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/nestedStep") @TestDataPath("$PROJECT_ROOT") - public class NestedStep extends AbstractIrBlackBoxCodegenTest { + public class NestedStep { @Test public void testAllFilesPresentInNestedStep() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/nestedStep"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -28420,7 +29948,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/reversed") @TestDataPath("$PROJECT_ROOT") - public class Reversed extends AbstractIrBlackBoxCodegenTest { + public class Reversed { @Test public void testAllFilesPresentInReversed() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/literal/rangeTo/reversed"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -28467,7 +29995,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/literal/until") @TestDataPath("$PROJECT_ROOT") - public class Until extends AbstractIrBlackBoxCodegenTest { + public class Until { @Test public void testAllFilesPresentInUntil() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/literal/until"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -28578,7 +30106,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/literal/until/nestedStep") @TestDataPath("$PROJECT_ROOT") - public class NestedStep extends AbstractIrBlackBoxCodegenTest { + public class NestedStep { @Test public void testAllFilesPresentInNestedStep() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/literal/until/nestedStep"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -28636,7 +30164,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/literal/until/reversed") @TestDataPath("$PROJECT_ROOT") - public class Reversed extends AbstractIrBlackBoxCodegenTest { + public class Reversed { @Test public void testAllFilesPresentInReversed() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/literal/until/reversed"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -28684,7 +30212,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned") @TestDataPath("$PROJECT_ROOT") - public class Unsigned extends AbstractIrBlackBoxCodegenTest { + public class Unsigned { @Test public void testAllFilesPresentInUnsigned() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -28693,7 +30221,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/expression") @TestDataPath("$PROJECT_ROOT") - public class Expression extends AbstractIrBlackBoxCodegenTest { + public class Expression { @Test public void testAllFilesPresentInExpression() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/expression"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -28702,7 +30230,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo") @TestDataPath("$PROJECT_ROOT") - public class DownTo extends AbstractIrBlackBoxCodegenTest { + public class DownTo { @Test public void testAllFilesPresentInDownTo() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -28807,7 +30335,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/nestedStep") @TestDataPath("$PROJECT_ROOT") - public class NestedStep extends AbstractIrBlackBoxCodegenTest { + public class NestedStep { @Test public void testAllFilesPresentInNestedStep() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/nestedStep"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -28865,7 +30393,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/reversed") @TestDataPath("$PROJECT_ROOT") - public class Reversed extends AbstractIrBlackBoxCodegenTest { + public class Reversed { @Test public void testAllFilesPresentInReversed() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/downTo/reversed"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -28912,7 +30440,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo") @TestDataPath("$PROJECT_ROOT") - public class RangeTo extends AbstractIrBlackBoxCodegenTest { + public class RangeTo { @Test public void testAllFilesPresentInRangeTo() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -29017,7 +30545,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/nestedStep") @TestDataPath("$PROJECT_ROOT") - public class NestedStep extends AbstractIrBlackBoxCodegenTest { + public class NestedStep { @Test public void testAllFilesPresentInNestedStep() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/nestedStep"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -29075,7 +30603,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/reversed") @TestDataPath("$PROJECT_ROOT") - public class Reversed extends AbstractIrBlackBoxCodegenTest { + public class Reversed { @Test public void testAllFilesPresentInReversed() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/rangeTo/reversed"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -29122,7 +30650,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until") @TestDataPath("$PROJECT_ROOT") - public class Until extends AbstractIrBlackBoxCodegenTest { + public class Until { @Test public void testAllFilesPresentInUntil() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -29233,7 +30761,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/nestedStep") @TestDataPath("$PROJECT_ROOT") - public class NestedStep extends AbstractIrBlackBoxCodegenTest { + public class NestedStep { @Test public void testAllFilesPresentInNestedStep() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/nestedStep"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -29291,7 +30819,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/reversed") @TestDataPath("$PROJECT_ROOT") - public class Reversed extends AbstractIrBlackBoxCodegenTest { + public class Reversed { @Test public void testAllFilesPresentInReversed() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/expression/until/reversed"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -29339,7 +30867,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/literal") @TestDataPath("$PROJECT_ROOT") - public class Literal extends AbstractIrBlackBoxCodegenTest { + public class Literal { @Test public void testAllFilesPresentInLiteral() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/literal"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -29348,7 +30876,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo") @TestDataPath("$PROJECT_ROOT") - public class DownTo extends AbstractIrBlackBoxCodegenTest { + public class DownTo { @Test public void testAllFilesPresentInDownTo() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -29453,7 +30981,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/nestedStep") @TestDataPath("$PROJECT_ROOT") - public class NestedStep extends AbstractIrBlackBoxCodegenTest { + public class NestedStep { @Test public void testAllFilesPresentInNestedStep() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/nestedStep"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -29511,7 +31039,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/reversed") @TestDataPath("$PROJECT_ROOT") - public class Reversed extends AbstractIrBlackBoxCodegenTest { + public class Reversed { @Test public void testAllFilesPresentInReversed() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/downTo/reversed"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -29558,7 +31086,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo") @TestDataPath("$PROJECT_ROOT") - public class RangeTo extends AbstractIrBlackBoxCodegenTest { + public class RangeTo { @Test public void testAllFilesPresentInRangeTo() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -29663,7 +31191,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/nestedStep") @TestDataPath("$PROJECT_ROOT") - public class NestedStep extends AbstractIrBlackBoxCodegenTest { + public class NestedStep { @Test public void testAllFilesPresentInNestedStep() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/nestedStep"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -29721,7 +31249,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/reversed") @TestDataPath("$PROJECT_ROOT") - public class Reversed extends AbstractIrBlackBoxCodegenTest { + public class Reversed { @Test public void testAllFilesPresentInReversed() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/rangeTo/reversed"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -29768,7 +31296,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until") @TestDataPath("$PROJECT_ROOT") - public class Until extends AbstractIrBlackBoxCodegenTest { + public class Until { @Test public void testAllFilesPresentInUntil() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -29879,7 +31407,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/nestedStep") @TestDataPath("$PROJECT_ROOT") - public class NestedStep extends AbstractIrBlackBoxCodegenTest { + public class NestedStep { @Test public void testAllFilesPresentInNestedStep() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/nestedStep"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -29937,7 +31465,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/reversed") @TestDataPath("$PROJECT_ROOT") - public class Reversed extends AbstractIrBlackBoxCodegenTest { + public class Reversed { @Test public void testAllFilesPresentInReversed() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/stepped/unsigned/literal/until/reversed"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -29987,7 +31515,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/ranges/unsigned") @TestDataPath("$PROJECT_ROOT") - public class Unsigned extends AbstractIrBlackBoxCodegenTest { + public class Unsigned { @Test public void testAllFilesPresentInUnsigned() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/unsigned"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -30026,7 +31554,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/ranges/unsigned/expression") @TestDataPath("$PROJECT_ROOT") - public class Expression extends AbstractIrBlackBoxCodegenTest { + public class Expression { @Test public void testAllFilesPresentInExpression() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/unsigned/expression"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -30216,7 +31744,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/ranges/unsigned/literal") @TestDataPath("$PROJECT_ROOT") - public class Literal extends AbstractIrBlackBoxCodegenTest { + public class Literal { @Test public void testAllFilesPresentInLiteral() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/unsigned/literal"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -30406,7 +31934,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/ranges/unsigned/nullableLoopParameter") @TestDataPath("$PROJECT_ROOT") - public class NullableLoopParameter extends AbstractIrBlackBoxCodegenTest { + public class NullableLoopParameter { @Test public void testAllFilesPresentInNullableLoopParameter() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ranges/unsigned/nullableLoopParameter"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -30433,10 +31961,32 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes } } + @Nested + @TestMetadata("compiler/testData/codegen/box/recursiveRawTypes") + @TestDataPath("$PROJECT_ROOT") + public class RecursiveRawTypes { + @Test + public void testAllFilesPresentInRecursiveRawTypes() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/recursiveRawTypes"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @Test + @TestMetadata("kt16528.kt") + public void testKt16528() throws Exception { + runTest("compiler/testData/codegen/box/recursiveRawTypes/kt16528.kt"); + } + + @Test + @TestMetadata("kt16639.kt") + public void testKt16639() throws Exception { + runTest("compiler/testData/codegen/box/recursiveRawTypes/kt16639.kt"); + } + } + @Nested @TestMetadata("compiler/testData/codegen/box/reflection") @TestDataPath("$PROJECT_ROOT") - public class Reflection extends AbstractIrBlackBoxCodegenTest { + public class Reflection { @Test public void testAllFilesPresentInReflection() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -30445,7 +31995,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/reflection/annotations") @TestDataPath("$PROJECT_ROOT") - public class Annotations extends AbstractIrBlackBoxCodegenTest { + public class Annotations { @Test public void testAllFilesPresentInAnnotations() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/annotations"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -30568,7 +32118,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/reflection/annotations/onTypes") @TestDataPath("$PROJECT_ROOT") - public class OnTypes extends AbstractIrBlackBoxCodegenTest { + public class OnTypes { @Test public void testAllFilesPresentInOnTypes() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/annotations/onTypes"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -30603,7 +32153,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/reflection/builtins") @TestDataPath("$PROJECT_ROOT") - public class Builtins extends AbstractIrBlackBoxCodegenTest { + public class Builtins { @Test public void testAllFilesPresentInBuiltins() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/builtins"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -30631,7 +32181,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/reflection/call") @TestDataPath("$PROJECT_ROOT") - public class Call extends AbstractIrBlackBoxCodegenTest { + public class Call { @Test public void testAllFilesPresentInCall() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/call"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -30784,7 +32334,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/reflection/call/bound") @TestDataPath("$PROJECT_ROOT") - public class Bound extends AbstractIrBlackBoxCodegenTest { + public class Bound { @Test public void testAllFilesPresentInBound() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/call/bound"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -30872,7 +32422,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/reflection/call/inlineClasses") @TestDataPath("$PROJECT_ROOT") - public class InlineClasses extends AbstractIrBlackBoxCodegenTest { + public class InlineClasses { @Test public void testAllFilesPresentInInlineClasses() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/call/inlineClasses"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -30967,7 +32517,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/reflection/callBy") @TestDataPath("$PROJECT_ROOT") - public class CallBy extends AbstractIrBlackBoxCodegenTest { + public class CallBy { @Test public void testAllFilesPresentInCallBy() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/callBy"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -31133,7 +32683,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/reflection/classLiterals") @TestDataPath("$PROJECT_ROOT") - public class ClassLiterals extends AbstractIrBlackBoxCodegenTest { + public class ClassLiterals { @Test public void testAllFilesPresentInClassLiterals() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/classLiterals"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -31175,6 +32725,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/reflection/classLiterals/genericClass.kt"); } + @Test + @TestMetadata("javaClassLiteral.kt") + public void testJavaClassLiteral() throws Exception { + runTest("compiler/testData/codegen/box/reflection/classLiterals/javaClassLiteral.kt"); + } + @Test @TestMetadata("lambdaClass.kt") public void testLambdaClass() throws Exception { @@ -31197,7 +32753,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/reflection/classes") @TestDataPath("$PROJECT_ROOT") - public class Classes extends AbstractIrBlackBoxCodegenTest { + public class Classes { @Test public void testAllFilesPresentInClasses() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/classes"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -31303,7 +32859,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/reflection/constructors") @TestDataPath("$PROJECT_ROOT") - public class Constructors extends AbstractIrBlackBoxCodegenTest { + public class Constructors { @Test public void testAllFilesPresentInConstructors() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/constructors"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -31349,7 +32905,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/reflection/createAnnotation") @TestDataPath("$PROJECT_ROOT") - public class CreateAnnotation extends AbstractIrBlackBoxCodegenTest { + public class CreateAnnotation { @Test public void testAllFilesPresentInCreateAnnotation() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/createAnnotation"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -31437,7 +32993,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/reflection/enclosing") @TestDataPath("$PROJECT_ROOT") - public class Enclosing extends AbstractIrBlackBoxCodegenTest { + public class Enclosing { @Test public void testAllFilesPresentInEnclosing() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/enclosing"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -31597,7 +33153,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/reflection/functions") @TestDataPath("$PROJECT_ROOT") - public class Functions extends AbstractIrBlackBoxCodegenTest { + public class Functions { @Test public void testAllFilesPresentInFunctions() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/functions"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -31685,7 +33241,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/reflection/genericSignature") @TestDataPath("$PROJECT_ROOT") - public class GenericSignature extends AbstractIrBlackBoxCodegenTest { + public class GenericSignature { @Test public void testAllFilesPresentInGenericSignature() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/genericSignature"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -31797,7 +33353,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/reflection/isInstance") @TestDataPath("$PROJECT_ROOT") - public class IsInstance extends AbstractIrBlackBoxCodegenTest { + public class IsInstance { @Test public void testAllFilesPresentInIsInstance() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/isInstance"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -31813,7 +33369,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/reflection/kClassInAnnotation") @TestDataPath("$PROJECT_ROOT") - public class KClassInAnnotation extends AbstractIrBlackBoxCodegenTest { + public class KClassInAnnotation { @Test public void testAllFilesPresentInKClassInAnnotation() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/kClassInAnnotation"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -31877,7 +33433,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/reflection/lambdaClasses") @TestDataPath("$PROJECT_ROOT") - public class LambdaClasses extends AbstractIrBlackBoxCodegenTest { + public class LambdaClasses { @Test public void testAllFilesPresentInLambdaClasses() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/lambdaClasses"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -31941,7 +33497,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/reflection/mapping") @TestDataPath("$PROJECT_ROOT") - public class Mapping extends AbstractIrBlackBoxCodegenTest { + public class Mapping { @Test public void testAllFilesPresentInMapping() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/mapping"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -31983,6 +33539,30 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/reflection/mapping/interfaceCompanionPropertyWithJvmField.kt"); } + @Test + @TestMetadata("jClass2kClass.kt") + public void testJClass2kClass() throws Exception { + runTest("compiler/testData/codegen/box/reflection/mapping/jClass2kClass.kt"); + } + + @Test + @TestMetadata("javaConstructor.kt") + public void testJavaConstructor() throws Exception { + runTest("compiler/testData/codegen/box/reflection/mapping/javaConstructor.kt"); + } + + @Test + @TestMetadata("javaFields.kt") + public void testJavaFields() throws Exception { + runTest("compiler/testData/codegen/box/reflection/mapping/javaFields.kt"); + } + + @Test + @TestMetadata("javaMethods.kt") + public void testJavaMethods() throws Exception { + runTest("compiler/testData/codegen/box/reflection/mapping/javaMethods.kt"); + } + @Test @TestMetadata("lateinitProperty.kt") public void testLateinitProperty() throws Exception { @@ -32052,7 +33632,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/reflection/mapping/fakeOverrides") @TestDataPath("$PROJECT_ROOT") - public class FakeOverrides extends AbstractIrBlackBoxCodegenTest { + public class FakeOverrides { @Test public void testAllFilesPresentInFakeOverrides() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/mapping/fakeOverrides"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -32074,7 +33654,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/reflection/mapping/inlineClasses") @TestDataPath("$PROJECT_ROOT") - public class InlineClasses extends AbstractIrBlackBoxCodegenTest { + public class InlineClasses { @Test public void testAllFilesPresentInInlineClasses() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/mapping/inlineClasses"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -32096,7 +33676,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/reflection/mapping/jvmStatic") @TestDataPath("$PROJECT_ROOT") - public class JvmStatic extends AbstractIrBlackBoxCodegenTest { + public class JvmStatic { @Test public void testAllFilesPresentInJvmStatic() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/mapping/jvmStatic"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -32118,7 +33698,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/reflection/mapping/types") @TestDataPath("$PROJECT_ROOT") - public class Types extends AbstractIrBlackBoxCodegenTest { + public class Types { @Test public void testAllFilesPresentInTypes() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/mapping/types"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -32255,7 +33835,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/reflection/methodsFromAny") @TestDataPath("$PROJECT_ROOT") - public class MethodsFromAny extends AbstractIrBlackBoxCodegenTest { + public class MethodsFromAny { @Test @TestMetadata("adaptedCallableReferencesNotEqualToCallablesFromAPI.kt") public void testAdaptedCallableReferencesNotEqualToCallablesFromAPI() throws Exception { @@ -32409,7 +33989,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/reflection/modifiers") @TestDataPath("$PROJECT_ROOT") - public class Modifiers extends AbstractIrBlackBoxCodegenTest { + public class Modifiers { @Test public void testAllFilesPresentInModifiers() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/modifiers"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -32473,7 +34053,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/reflection/multifileClasses") @TestDataPath("$PROJECT_ROOT") - public class MultifileClasses extends AbstractIrBlackBoxCodegenTest { + public class MultifileClasses { @Test public void testAllFilesPresentInMultifileClasses() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/multifileClasses"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -32501,7 +34081,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/reflection/noReflectAtRuntime") @TestDataPath("$PROJECT_ROOT") - public class NoReflectAtRuntime extends AbstractIrBlackBoxCodegenTest { + public class NoReflectAtRuntime { @Test public void testAllFilesPresentInNoReflectAtRuntime() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/noReflectAtRuntime"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -32552,7 +34132,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/reflection/noReflectAtRuntime/methodsFromAny") @TestDataPath("$PROJECT_ROOT") - public class MethodsFromAny extends AbstractIrBlackBoxCodegenTest { + public class MethodsFromAny { @Test public void testAllFilesPresentInMethodsFromAny() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/noReflectAtRuntime/methodsFromAny"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -32581,7 +34161,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/reflection/parameters") @TestDataPath("$PROJECT_ROOT") - public class Parameters extends AbstractIrBlackBoxCodegenTest { + public class Parameters { @Test public void testAllFilesPresentInParameters() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/parameters"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -32681,7 +34261,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/reflection/properties") @TestDataPath("$PROJECT_ROOT") - public class Properties extends AbstractIrBlackBoxCodegenTest { + public class Properties { @Test public void testAllFilesPresentInProperties() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/properties"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -32705,6 +34285,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/reflection/properties/declaredVsInheritedProperties.kt"); } + @Test + @TestMetadata("equalsHashCodeToString.kt") + public void testEqualsHashCodeToString() throws Exception { + runTest("compiler/testData/codegen/box/reflection/properties/equalsHashCodeToString.kt"); + } + @Test @TestMetadata("fakeOverridesInSubclass.kt") public void testFakeOverridesInSubclass() throws Exception { @@ -32870,7 +34456,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/reflection/properties/accessors") @TestDataPath("$PROJECT_ROOT") - public class Accessors extends AbstractIrBlackBoxCodegenTest { + public class Accessors { @Test @TestMetadata("accessorNames.kt") public void testAccessorNames() throws Exception { @@ -32910,7 +34496,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/reflection/properties/getDelegate") @TestDataPath("$PROJECT_ROOT") - public class GetDelegate extends AbstractIrBlackBoxCodegenTest { + public class GetDelegate { @Test public void testAllFilesPresentInGetDelegate() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/properties/getDelegate"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -33010,7 +34596,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/reflection/properties/jvmField") @TestDataPath("$PROJECT_ROOT") - public class JvmField extends AbstractIrBlackBoxCodegenTest { + public class JvmField { @Test public void testAllFilesPresentInJvmField() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/properties/jvmField"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -33038,7 +34624,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/reflection/properties/localDelegated") @TestDataPath("$PROJECT_ROOT") - public class LocalDelegated extends AbstractIrBlackBoxCodegenTest { + public class LocalDelegated { @Test public void testAllFilesPresentInLocalDelegated() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/properties/localDelegated"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -33097,7 +34683,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/reflection/supertypes") @TestDataPath("$PROJECT_ROOT") - public class Supertypes extends AbstractIrBlackBoxCodegenTest { + public class Supertypes { @Test public void testAllFilesPresentInSupertypes() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/supertypes"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -33137,7 +34723,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/reflection/typeOf") @TestDataPath("$PROJECT_ROOT") - public class TypeOf extends AbstractIrBlackBoxCodegenTest { + public class TypeOf { @Test public void testAllFilesPresentInTypeOf() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/typeOf"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -33176,7 +34762,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/reflection/typeOf/js") @TestDataPath("$PROJECT_ROOT") - public class Js extends AbstractIrBlackBoxCodegenTest { + public class Js { @Test public void testAllFilesPresentInJs() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/typeOf/js"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -33186,7 +34772,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/reflection/typeOf/noReflect") @TestDataPath("$PROJECT_ROOT") - public class NoReflect extends AbstractIrBlackBoxCodegenTest { + public class NoReflect { @Test public void testAllFilesPresentInNoReflect() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/typeOf/noReflect"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -33213,7 +34799,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/reflection/typeOf/noReflect/nonReifiedTypeParameters") @TestDataPath("$PROJECT_ROOT") - public class NonReifiedTypeParameters extends AbstractIrBlackBoxCodegenTest { + public class NonReifiedTypeParameters { @Test public void testAllFilesPresentInNonReifiedTypeParameters() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/typeOf/noReflect/nonReifiedTypeParameters"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -33284,7 +34870,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/reflection/typeOf/nonReifiedTypeParameters") @TestDataPath("$PROJECT_ROOT") - public class NonReifiedTypeParameters extends AbstractIrBlackBoxCodegenTest { + public class NonReifiedTypeParameters { @Test public void testAllFilesPresentInNonReifiedTypeParameters() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/typeOf/nonReifiedTypeParameters"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -33367,7 +34953,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/reflection/typeParameters") @TestDataPath("$PROJECT_ROOT") - public class TypeParameters extends AbstractIrBlackBoxCodegenTest { + public class TypeParameters { @Test public void testAllFilesPresentInTypeParameters() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/typeParameters"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -33407,7 +34993,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/reflection/types") @TestDataPath("$PROJECT_ROOT") - public class Types extends AbstractIrBlackBoxCodegenTest { + public class Types { @Test public void testAllFilesPresentInTypes() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/types"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -33488,7 +35074,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/reflection/types/createType") @TestDataPath("$PROJECT_ROOT") - public class CreateType extends AbstractIrBlackBoxCodegenTest { + public class CreateType { @Test public void testAllFilesPresentInCreateType() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/types/createType"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -33528,7 +35114,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/reflection/types/subtyping") @TestDataPath("$PROJECT_ROOT") - public class Subtyping extends AbstractIrBlackBoxCodegenTest { + public class Subtyping { @Test public void testAllFilesPresentInSubtyping() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/types/subtyping"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -33564,7 +35150,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/regressions") @TestDataPath("$PROJECT_ROOT") - public class Regressions extends AbstractIrBlackBoxCodegenTest { + public class Regressions { @Test public void testAllFilesPresentInRegressions() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/regressions"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -34150,7 +35736,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/reified") @TestDataPath("$PROJECT_ROOT") - public class Reified extends AbstractIrBlackBoxCodegenTest { + public class Reified { @Test public void testAllFilesPresentInReified() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reified"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -34246,6 +35832,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/reified/javaClass.kt"); } + @Test + @TestMetadata("kt16445.kt") + public void testKt16445() throws Exception { + runTest("compiler/testData/codegen/box/reified/kt16445.kt"); + } + @Test @TestMetadata("nestedReified.kt") public void testNestedReified() throws Exception { @@ -34369,7 +35961,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/reified/arraysReification") @TestDataPath("$PROJECT_ROOT") - public class ArraysReification extends AbstractIrBlackBoxCodegenTest { + public class ArraysReification { @Test public void testAllFilesPresentInArraysReification() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reified/arraysReification"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -34416,7 +36008,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/safeCall") @TestDataPath("$PROJECT_ROOT") - public class SafeCall extends AbstractIrBlackBoxCodegenTest { + public class SafeCall { @Test public void testAllFilesPresentInSafeCall() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/safeCall"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -34504,7 +36096,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/sam") @TestDataPath("$PROJECT_ROOT") - public class Sam extends AbstractIrBlackBoxCodegenTest { + public class Sam { @Test public void testAllFilesPresentInSam() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/sam"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -34522,6 +36114,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/sam/castFromAny.kt"); } + @Test + @TestMetadata("differentFqNames.kt") + public void testDifferentFqNames() throws Exception { + runTest("compiler/testData/codegen/box/sam/differentFqNames.kt"); + } + @Test @TestMetadata("inlinedSamWrapper.kt") public void testInlinedSamWrapper() throws Exception { @@ -34534,6 +36132,24 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/sam/irrelevantStaticProperty.kt"); } + @Test + @TestMetadata("kt11519.kt") + public void testKt11519() throws Exception { + runTest("compiler/testData/codegen/box/sam/kt11519.kt"); + } + + @Test + @TestMetadata("kt11519Constructor.kt") + public void testKt11519Constructor() throws Exception { + runTest("compiler/testData/codegen/box/sam/kt11519Constructor.kt"); + } + + @Test + @TestMetadata("kt11696.kt") + public void testKt11696() throws Exception { + runTest("compiler/testData/codegen/box/sam/kt11696.kt"); + } + @Test @TestMetadata("kt17091.kt") public void testKt17091() throws Exception { @@ -34582,6 +36198,18 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/sam/kt31908.kt"); } + @Test + @TestMetadata("kt4753.kt") + public void testKt4753() throws Exception { + runTest("compiler/testData/codegen/box/sam/kt4753.kt"); + } + + @Test + @TestMetadata("kt4753_2.kt") + public void testKt4753_2() throws Exception { + runTest("compiler/testData/codegen/box/sam/kt4753_2.kt"); + } + @Test @TestMetadata("nonInlinedSamWrapper.kt") public void testNonInlinedSamWrapper() throws Exception { @@ -34618,6 +36246,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/sam/predicateSamWrapper.kt"); } + @Test + @TestMetadata("propertyReference.kt") + public void testPropertyReference() throws Exception { + runTest("compiler/testData/codegen/box/sam/propertyReference.kt"); + } + @Test @TestMetadata("receiverEvaluatedOnce.kt") public void testReceiverEvaluatedOnce() throws Exception { @@ -34630,10 +36264,282 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/sam/recordSubstitutedTypeForCallableSamParameter.kt"); } + @Test + @TestMetadata("samConstructorGenericSignature.kt") + public void testSamConstructorGenericSignature() throws Exception { + runTest("compiler/testData/codegen/box/sam/samConstructorGenericSignature.kt"); + } + + @Test + @TestMetadata("smartCastSamConversion.kt") + public void testSmartCastSamConversion() throws Exception { + runTest("compiler/testData/codegen/box/sam/smartCastSamConversion.kt"); + } + + @Nested + @TestMetadata("compiler/testData/codegen/box/sam/adapters") + @TestDataPath("$PROJECT_ROOT") + public class Adapters { + @Test + public void testAllFilesPresentInAdapters() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/sam/adapters"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @Test + @TestMetadata("bridgesForOverridden.kt") + public void testBridgesForOverridden() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/bridgesForOverridden.kt"); + } + + @Test + @TestMetadata("bridgesForOverriddenComplex.kt") + public void testBridgesForOverriddenComplex() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/bridgesForOverriddenComplex.kt"); + } + + @Test + @TestMetadata("callAbstractAdapter.kt") + public void testCallAbstractAdapter() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/callAbstractAdapter.kt"); + } + + @Test + @TestMetadata("comparator.kt") + public void testComparator() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/comparator.kt"); + } + + @Test + @TestMetadata("constructor.kt") + public void testConstructor() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/constructor.kt"); + } + + @Test + @TestMetadata("doubleLongParameters.kt") + public void testDoubleLongParameters() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/doubleLongParameters.kt"); + } + + @Test + @TestMetadata("fileFilter.kt") + public void testFileFilter() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/fileFilter.kt"); + } + + @Test + @TestMetadata("genericSignature.kt") + public void testGenericSignature() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/genericSignature.kt"); + } + + @Test + @TestMetadata("implementAdapter.kt") + public void testImplementAdapter() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/implementAdapter.kt"); + } + + @Test + @TestMetadata("inheritedInKotlin.kt") + public void testInheritedInKotlin() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/inheritedInKotlin.kt"); + } + + @Test + @TestMetadata("inheritedOverriddenAdapter.kt") + public void testInheritedOverriddenAdapter() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/inheritedOverriddenAdapter.kt"); + } + + @Test + @TestMetadata("inheritedSimple.kt") + public void testInheritedSimple() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/inheritedSimple.kt"); + } + + @Test + @TestMetadata("localClass.kt") + public void testLocalClass() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/localClass.kt"); + } + + @Test + @TestMetadata("localObjectConstructor.kt") + public void testLocalObjectConstructor() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/localObjectConstructor.kt"); + } + + @Test + @TestMetadata("localObjectConstructorWithFnValue.kt") + public void testLocalObjectConstructorWithFnValue() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/localObjectConstructorWithFnValue.kt"); + } + + @Test + @TestMetadata("nonLiteralAndLiteralRunnable.kt") + public void testNonLiteralAndLiteralRunnable() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/nonLiteralAndLiteralRunnable.kt"); + } + + @Test + @TestMetadata("nonLiteralComparator.kt") + public void testNonLiteralComparator() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/nonLiteralComparator.kt"); + } + + @Test + @TestMetadata("nonLiteralInConstructor.kt") + public void testNonLiteralInConstructor() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/nonLiteralInConstructor.kt"); + } + + @Test + @TestMetadata("nonLiteralNull.kt") + public void testNonLiteralNull() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/nonLiteralNull.kt"); + } + + @Test + @TestMetadata("nonLiteralRunnable.kt") + public void testNonLiteralRunnable() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/nonLiteralRunnable.kt"); + } + + @Test + @TestMetadata("protectedFromBase.kt") + public void testProtectedFromBase() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/protectedFromBase.kt"); + } + + @Test + @TestMetadata("severalSamParameters.kt") + public void testSeveralSamParameters() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/severalSamParameters.kt"); + } + + @Test + @TestMetadata("simplest.kt") + public void testSimplest() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/simplest.kt"); + } + + @Test + @TestMetadata("superInSecondaryConstructor.kt") + public void testSuperInSecondaryConstructor() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/superInSecondaryConstructor.kt"); + } + + @Test + @TestMetadata("superconstructor.kt") + public void testSuperconstructor() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/superconstructor.kt"); + } + + @Test + @TestMetadata("superconstructorWithClosure.kt") + public void testSuperconstructorWithClosure() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/superconstructorWithClosure.kt"); + } + + @Test + @TestMetadata("typeParameterOfClass.kt") + public void testTypeParameterOfClass() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/typeParameterOfClass.kt"); + } + + @Test + @TestMetadata("typeParameterOfMethod.kt") + public void testTypeParameterOfMethod() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/typeParameterOfMethod.kt"); + } + + @Test + @TestMetadata("typeParameterOfOuterClass.kt") + public void testTypeParameterOfOuterClass() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/typeParameterOfOuterClass.kt"); + } + + @Nested + @TestMetadata("compiler/testData/codegen/box/sam/adapters/operators") + @TestDataPath("$PROJECT_ROOT") + public class Operators { + @Test + public void testAllFilesPresentInOperators() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/sam/adapters/operators"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @Test + @TestMetadata("augmentedAssignmentPure.kt") + public void testAugmentedAssignmentPure() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/operators/augmentedAssignmentPure.kt"); + } + + @Test + @TestMetadata("augmentedAssignmentViaSimpleBinary.kt") + public void testAugmentedAssignmentViaSimpleBinary() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/operators/augmentedAssignmentViaSimpleBinary.kt"); + } + + @Test + @TestMetadata("binary.kt") + public void testBinary() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/operators/binary.kt"); + } + + @Test + @TestMetadata("compareTo.kt") + public void testCompareTo() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/operators/compareTo.kt"); + } + + @Test + @TestMetadata("contains.kt") + public void testContains() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/operators/contains.kt"); + } + + @Test + @TestMetadata("get.kt") + public void testGet() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/operators/get.kt"); + } + + @Test + @TestMetadata("invoke.kt") + public void testInvoke() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/operators/invoke.kt"); + } + + @Test + @TestMetadata("legacyModOperator.kt") + public void testLegacyModOperator() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/operators/legacyModOperator.kt"); + } + + @Test + @TestMetadata("multiGetSet.kt") + public void testMultiGetSet() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/operators/multiGetSet.kt"); + } + + @Test + @TestMetadata("multiInvoke.kt") + public void testMultiInvoke() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/operators/multiInvoke.kt"); + } + + @Test + @TestMetadata("set.kt") + public void testSet() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/operators/set.kt"); + } + } + } + @Nested @TestMetadata("compiler/testData/codegen/box/sam/constructors") @TestDataPath("$PROJECT_ROOT") - public class Constructors extends AbstractIrBlackBoxCodegenTest { + public class Constructors { @Test public void testAllFilesPresentInConstructors() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/sam/constructors"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -34733,7 +36639,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/sam/equality") @TestDataPath("$PROJECT_ROOT") - public class Equality extends AbstractIrBlackBoxCodegenTest { + public class Equality { @Test public void testAllFilesPresentInEquality() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/sam/equality"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -34774,7 +36680,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/sealed") @TestDataPath("$PROJECT_ROOT") - public class Sealed extends AbstractIrBlackBoxCodegenTest { + public class Sealed { @Test public void testAllFilesPresentInSealed() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/sealed"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -34820,7 +36726,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/secondaryConstructors") @TestDataPath("$PROJECT_ROOT") - public class SecondaryConstructors extends AbstractIrBlackBoxCodegenTest { + public class SecondaryConstructors { @Test @TestMetadata("accessToCompanion.kt") public void testAccessToCompanion() throws Exception { @@ -35040,7 +36946,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/signatureAnnotations") @TestDataPath("$PROJECT_ROOT") - public class SignatureAnnotations extends AbstractIrBlackBoxCodegenTest { + public class SignatureAnnotations { @Test public void testAllFilesPresentInSignatureAnnotations() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/signatureAnnotations"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -35128,7 +37034,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/smap") @TestDataPath("$PROJECT_ROOT") - public class Smap extends AbstractIrBlackBoxCodegenTest { + public class Smap { @Test public void testAllFilesPresentInSmap() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/smap"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -35156,7 +37062,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/smartCasts") @TestDataPath("$PROJECT_ROOT") - public class SmartCasts extends AbstractIrBlackBoxCodegenTest { + public class SmartCasts { @Test public void testAllFilesPresentInSmartCasts() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/smartCasts"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -35280,7 +37186,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/specialBuiltins") @TestDataPath("$PROJECT_ROOT") - public class SpecialBuiltins extends AbstractIrBlackBoxCodegenTest { + public class SpecialBuiltins { @Test public void testAllFilesPresentInSpecialBuiltins() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/specialBuiltins"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -35298,6 +37204,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/specialBuiltins/bridges.kt"); } + @Test + @TestMetadata("charBuffer.kt") + public void testCharBuffer() throws Exception { + runTest("compiler/testData/codegen/box/specialBuiltins/charBuffer.kt"); + } + @Test @TestMetadata("collectionImpl.kt") public void testCollectionImpl() throws Exception { @@ -35449,10 +37361,26 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes } } + @Nested + @TestMetadata("compiler/testData/codegen/box/staticFun") + @TestDataPath("$PROJECT_ROOT") + public class StaticFun { + @Test + public void testAllFilesPresentInStaticFun() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/staticFun"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @Test + @TestMetadata("classWithNestedEnum.kt") + public void testClassWithNestedEnum() throws Exception { + runTest("compiler/testData/codegen/box/staticFun/classWithNestedEnum.kt"); + } + } + @Nested @TestMetadata("compiler/testData/codegen/box/statics") @TestDataPath("$PROJECT_ROOT") - public class Statics extends AbstractIrBlackBoxCodegenTest { + public class Statics { @Test public void testAllFilesPresentInStatics() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/statics"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -35554,6 +37482,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/statics/protectedStaticAndInline.kt"); } + @Test + @TestMetadata("simpleStaticInJavaSuperChain.kt") + public void testSimpleStaticInJavaSuperChain() throws Exception { + runTest("compiler/testData/codegen/box/statics/simpleStaticInJavaSuperChain.kt"); + } + @Test @TestMetadata("syntheticAccessor.kt") public void testSyntheticAccessor() throws Exception { @@ -35564,7 +37498,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/storeStackBeforeInline") @TestDataPath("$PROJECT_ROOT") - public class StoreStackBeforeInline extends AbstractIrBlackBoxCodegenTest { + public class StoreStackBeforeInline { @Test public void testAllFilesPresentInStoreStackBeforeInline() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/storeStackBeforeInline"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -35604,7 +37538,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/strings") @TestDataPath("$PROJECT_ROOT") - public class Strings extends AbstractIrBlackBoxCodegenTest { + public class Strings { @Test public void testAllFilesPresentInStrings() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/strings"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -35770,7 +37704,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/super") @TestDataPath("$PROJECT_ROOT") - public class Super extends AbstractIrBlackBoxCodegenTest { + public class Super { @Test public void testAllFilesPresentInSuper() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/super"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -35959,7 +37893,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/super/superConstructor") @TestDataPath("$PROJECT_ROOT") - public class SuperConstructor extends AbstractIrBlackBoxCodegenTest { + public class SuperConstructor { @Test public void testAllFilesPresentInSuperConstructor() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/super/superConstructor"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -36012,7 +37946,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/synchronized") @TestDataPath("$PROJECT_ROOT") - public class Synchronized extends AbstractIrBlackBoxCodegenTest { + public class Synchronized { @Test public void testAllFilesPresentInSynchronized() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/synchronized"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -36088,7 +38022,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/syntheticAccessors") @TestDataPath("$PROJECT_ROOT") - public class SyntheticAccessors extends AbstractIrBlackBoxCodegenTest { + public class SyntheticAccessors { @Test @TestMetadata("accessorForAbstractProtected.kt") public void testAccessorForAbstractProtected() throws Exception { @@ -36215,10 +38149,80 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes } } + @Nested + @TestMetadata("compiler/testData/codegen/box/syntheticExtensions") + @TestDataPath("$PROJECT_ROOT") + public class SyntheticExtensions { + @Test + public void testAllFilesPresentInSyntheticExtensions() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/syntheticExtensions"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @Test + @TestMetadata("fromTwoBases.kt") + public void testFromTwoBases() throws Exception { + runTest("compiler/testData/codegen/box/syntheticExtensions/fromTwoBases.kt"); + } + + @Test + @TestMetadata("getter.kt") + public void testGetter() throws Exception { + runTest("compiler/testData/codegen/box/syntheticExtensions/getter.kt"); + } + + @Test + @TestMetadata("implicitReceiver.kt") + public void testImplicitReceiver() throws Exception { + runTest("compiler/testData/codegen/box/syntheticExtensions/implicitReceiver.kt"); + } + + @Test + @TestMetadata("overrideOnlyGetter.kt") + public void testOverrideOnlyGetter() throws Exception { + runTest("compiler/testData/codegen/box/syntheticExtensions/overrideOnlyGetter.kt"); + } + + @Test + @TestMetadata("plusPlus.kt") + public void testPlusPlus() throws Exception { + runTest("compiler/testData/codegen/box/syntheticExtensions/plusPlus.kt"); + } + + @Test + @TestMetadata("protected.kt") + public void testProtected() throws Exception { + runTest("compiler/testData/codegen/box/syntheticExtensions/protected.kt"); + } + + @Test + @TestMetadata("protectedSetter.kt") + public void testProtectedSetter() throws Exception { + runTest("compiler/testData/codegen/box/syntheticExtensions/protectedSetter.kt"); + } + + @Test + @TestMetadata("setter.kt") + public void testSetter() throws Exception { + runTest("compiler/testData/codegen/box/syntheticExtensions/setter.kt"); + } + + @Test + @TestMetadata("setterNonVoid1.kt") + public void testSetterNonVoid1() throws Exception { + runTest("compiler/testData/codegen/box/syntheticExtensions/setterNonVoid1.kt"); + } + + @Test + @TestMetadata("setterNonVoid2.kt") + public void testSetterNonVoid2() throws Exception { + runTest("compiler/testData/codegen/box/syntheticExtensions/setterNonVoid2.kt"); + } + } + @Nested @TestMetadata("compiler/testData/codegen/box/throws") @TestDataPath("$PROJECT_ROOT") - public class Throws extends AbstractIrBlackBoxCodegenTest { + public class Throws { @Test public void testAllFilesPresentInThrows() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/throws"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -36235,12 +38239,18 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes public void testDelegationAndThrows_1_3() throws Exception { runTest("compiler/testData/codegen/box/throws/delegationAndThrows_1_3.kt"); } + + @Test + @TestMetadata("delegationAndThrows_AgainstCompiled.kt") + public void testDelegationAndThrows_AgainstCompiled() throws Exception { + runTest("compiler/testData/codegen/box/throws/delegationAndThrows_AgainstCompiled.kt"); + } } @Nested @TestMetadata("compiler/testData/codegen/box/toArray") @TestDataPath("$PROJECT_ROOT") - public class ToArray extends AbstractIrBlackBoxCodegenTest { + public class ToArray { @Test public void testAllFilesPresentInToArray() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/toArray"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -36304,7 +38314,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/topLevelPrivate") @TestDataPath("$PROJECT_ROOT") - public class TopLevelPrivate extends AbstractIrBlackBoxCodegenTest { + public class TopLevelPrivate { @Test public void testAllFilesPresentInTopLevelPrivate() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/topLevelPrivate"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -36350,7 +38360,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/trailingComma") @TestDataPath("$PROJECT_ROOT") - public class TrailingComma extends AbstractIrBlackBoxCodegenTest { + public class TrailingComma { @Test public void testAllFilesPresentInTrailingComma() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/trailingComma"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -36366,7 +38376,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/traits") @TestDataPath("$PROJECT_ROOT") - public class Traits extends AbstractIrBlackBoxCodegenTest { + public class Traits { @Test @TestMetadata("abstractClassInheritsFromInterface.kt") public void testAbstractClassInheritsFromInterface() throws Exception { @@ -36604,7 +38614,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/typeInfo") @TestDataPath("$PROJECT_ROOT") - public class TypeInfo extends AbstractIrBlackBoxCodegenTest { + public class TypeInfo { @Test public void testAllFilesPresentInTypeInfo() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/typeInfo"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -36656,7 +38666,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/typeMapping") @TestDataPath("$PROJECT_ROOT") - public class TypeMapping extends AbstractIrBlackBoxCodegenTest { + public class TypeMapping { @Test public void testAllFilesPresentInTypeMapping() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/typeMapping"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -36738,7 +38748,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/typealias") @TestDataPath("$PROJECT_ROOT") - public class Typealias extends AbstractIrBlackBoxCodegenTest { + public class Typealias { @Test public void testAllFilesPresentInTypealias() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/typealias"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -36774,6 +38784,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/typealias/innerClassTypeAliasConstructorInSupertypes.kt"); } + @Test + @TestMetadata("javaStaticMembersViaTypeAlias.kt") + public void testJavaStaticMembersViaTypeAlias() throws Exception { + runTest("compiler/testData/codegen/box/typealias/javaStaticMembersViaTypeAlias.kt"); + } + @Test @TestMetadata("kt15109.kt") public void testKt15109() throws Exception { @@ -36834,6 +38850,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/typealias/typeAliasConstructorInSuperCall.kt"); } + @Test + @TestMetadata("typeAliasFunction.kt") + public void testTypeAliasFunction() throws Exception { + runTest("compiler/testData/codegen/box/typealias/typeAliasFunction.kt"); + } + @Test @TestMetadata("typeAliasInAnonymousObjectType.kt") public void testTypeAliasInAnonymousObjectType() throws Exception { @@ -36862,7 +38884,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/unaryOp") @TestDataPath("$PROJECT_ROOT") - public class UnaryOp extends AbstractIrBlackBoxCodegenTest { + public class UnaryOp { @Test public void testAllFilesPresentInUnaryOp() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/unaryOp"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -36908,7 +38930,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/unit") @TestDataPath("$PROJECT_ROOT") - public class Unit extends AbstractIrBlackBoxCodegenTest { + public class Unit { @Test public void testAllFilesPresentInUnit() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/unit"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -36984,7 +39006,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/unsignedTypes") @TestDataPath("$PROJECT_ROOT") - public class UnsignedTypes extends AbstractIrBlackBoxCodegenTest { + public class UnsignedTypes { @Test public void testAllFilesPresentInUnsignedTypes() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/unsignedTypes"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -37251,7 +39273,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/unsignedTypes/jvm8Intrinsics") @TestDataPath("$PROJECT_ROOT") - public class Jvm8Intrinsics extends AbstractIrBlackBoxCodegenTest { + public class Jvm8Intrinsics { @Test public void testAllFilesPresentInJvm8Intrinsics() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/unsignedTypes/jvm8Intrinsics"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -37310,7 +39332,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/valueClasses") @TestDataPath("$PROJECT_ROOT") - public class ValueClasses extends AbstractIrBlackBoxCodegenTest { + public class ValueClasses { @Test public void testAllFilesPresentInValueClasses() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/valueClasses"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -37326,7 +39348,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/vararg") @TestDataPath("$PROJECT_ROOT") - public class Vararg extends AbstractIrBlackBoxCodegenTest { + public class Vararg { @Test public void testAllFilesPresentInVararg() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/vararg"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -37435,10 +39457,222 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes } } + @Nested + @TestMetadata("compiler/testData/codegen/box/varargs") + @TestDataPath("$PROJECT_ROOT") + public class Varargs { + @Test + public void testAllFilesPresentInVarargs() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/varargs"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @Test + @TestMetadata("varargsOverride.kt") + public void testVarargsOverride() throws Exception { + runTest("compiler/testData/codegen/box/varargs/varargsOverride.kt"); + } + + @Test + @TestMetadata("varargsOverride2.kt") + public void testVarargsOverride2() throws Exception { + runTest("compiler/testData/codegen/box/varargs/varargsOverride2.kt"); + } + + @Test + @TestMetadata("varargsOverride3.kt") + public void testVarargsOverride3() throws Exception { + runTest("compiler/testData/codegen/box/varargs/varargsOverride3.kt"); + } + } + + @Nested + @TestMetadata("compiler/testData/codegen/box/visibility") + @TestDataPath("$PROJECT_ROOT") + public class Visibility { + @Test + public void testAllFilesPresentInVisibility() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/visibility"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @Nested + @TestMetadata("compiler/testData/codegen/box/visibility/package") + @TestDataPath("$PROJECT_ROOT") + public class Package { + @Test + public void testAllFilesPresentInPackage() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/visibility/package"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @Test + @TestMetadata("kt2781.kt") + public void testKt2781() throws Exception { + runTest("compiler/testData/codegen/box/visibility/package/kt2781.kt"); + } + + @Test + @TestMetadata("packageClass.kt") + public void testPackageClass() throws Exception { + runTest("compiler/testData/codegen/box/visibility/package/packageClass.kt"); + } + + @Test + @TestMetadata("packageFun.kt") + public void testPackageFun() throws Exception { + runTest("compiler/testData/codegen/box/visibility/package/packageFun.kt"); + } + + @Test + @TestMetadata("packageProperty.kt") + public void testPackageProperty() throws Exception { + runTest("compiler/testData/codegen/box/visibility/package/packageProperty.kt"); + } + } + + @Nested + @TestMetadata("compiler/testData/codegen/box/visibility/protectedAndPackage") + @TestDataPath("$PROJECT_ROOT") + public class ProtectedAndPackage { + @Test + public void testAllFilesPresentInProtectedAndPackage() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/visibility/protectedAndPackage"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @Test + @TestMetadata("overrideProtectedFunInPackage.kt") + public void testOverrideProtectedFunInPackage() throws Exception { + runTest("compiler/testData/codegen/box/visibility/protectedAndPackage/overrideProtectedFunInPackage.kt"); + } + + @Test + @TestMetadata("protectedAccessor.kt") + public void testProtectedAccessor() throws Exception { + runTest("compiler/testData/codegen/box/visibility/protectedAndPackage/protectedAccessor.kt"); + } + + @Test + @TestMetadata("protectedFunInPackage.kt") + public void testProtectedFunInPackage() throws Exception { + runTest("compiler/testData/codegen/box/visibility/protectedAndPackage/protectedFunInPackage.kt"); + } + + @Test + @TestMetadata("protectedPropertyInPackage.kt") + public void testProtectedPropertyInPackage() throws Exception { + runTest("compiler/testData/codegen/box/visibility/protectedAndPackage/protectedPropertyInPackage.kt"); + } + + @Test + @TestMetadata("protectedPropertyInPackageFromCrossinline.kt") + public void testProtectedPropertyInPackageFromCrossinline() throws Exception { + runTest("compiler/testData/codegen/box/visibility/protectedAndPackage/protectedPropertyInPackageFromCrossinline.kt"); + } + + @Test + @TestMetadata("protectedStaticClass.kt") + public void testProtectedStaticClass() throws Exception { + runTest("compiler/testData/codegen/box/visibility/protectedAndPackage/protectedStaticClass.kt"); + } + + @Test + @TestMetadata("protectedSuperField.kt") + public void testProtectedSuperField() throws Exception { + runTest("compiler/testData/codegen/box/visibility/protectedAndPackage/protectedSuperField.kt"); + } + + @Test + @TestMetadata("protectedSuperMethod.kt") + public void testProtectedSuperMethod() throws Exception { + runTest("compiler/testData/codegen/box/visibility/protectedAndPackage/protectedSuperMethod.kt"); + } + } + + @Nested + @TestMetadata("compiler/testData/codegen/box/visibility/protectedStatic") + @TestDataPath("$PROJECT_ROOT") + public class ProtectedStatic { + @Test + public void testAllFilesPresentInProtectedStatic() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/visibility/protectedStatic"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @Test + @TestMetadata("funCallInConstructor.kt") + public void testFunCallInConstructor() throws Exception { + runTest("compiler/testData/codegen/box/visibility/protectedStatic/funCallInConstructor.kt"); + } + + @Test + @TestMetadata("funClassObject.kt") + public void testFunClassObject() throws Exception { + runTest("compiler/testData/codegen/box/visibility/protectedStatic/funClassObject.kt"); + } + + @Test + @TestMetadata("funGenericClass.kt") + public void testFunGenericClass() throws Exception { + runTest("compiler/testData/codegen/box/visibility/protectedStatic/funGenericClass.kt"); + } + + @Test + @TestMetadata("funNestedStaticClass.kt") + public void testFunNestedStaticClass() throws Exception { + runTest("compiler/testData/codegen/box/visibility/protectedStatic/funNestedStaticClass.kt"); + } + + @Test + @TestMetadata("funNestedStaticClass2.kt") + public void testFunNestedStaticClass2() throws Exception { + runTest("compiler/testData/codegen/box/visibility/protectedStatic/funNestedStaticClass2.kt"); + } + + @Test + @TestMetadata("funNestedStaticGenericClass.kt") + public void testFunNestedStaticGenericClass() throws Exception { + runTest("compiler/testData/codegen/box/visibility/protectedStatic/funNestedStaticGenericClass.kt"); + } + + @Test + @TestMetadata("funNotDirectSuperClass.kt") + public void testFunNotDirectSuperClass() throws Exception { + runTest("compiler/testData/codegen/box/visibility/protectedStatic/funNotDirectSuperClass.kt"); + } + + @Test + @TestMetadata("funObject.kt") + public void testFunObject() throws Exception { + runTest("compiler/testData/codegen/box/visibility/protectedStatic/funObject.kt"); + } + + @Test + @TestMetadata("simpleClass.kt") + public void testSimpleClass() throws Exception { + runTest("compiler/testData/codegen/box/visibility/protectedStatic/simpleClass.kt"); + } + + @Test + @TestMetadata("simpleClass2.kt") + public void testSimpleClass2() throws Exception { + runTest("compiler/testData/codegen/box/visibility/protectedStatic/simpleClass2.kt"); + } + + @Test + @TestMetadata("simpleFun.kt") + public void testSimpleFun() throws Exception { + runTest("compiler/testData/codegen/box/visibility/protectedStatic/simpleFun.kt"); + } + + @Test + @TestMetadata("simpleProperty.kt") + public void testSimpleProperty() throws Exception { + runTest("compiler/testData/codegen/box/visibility/protectedStatic/simpleProperty.kt"); + } + } + } + @Nested @TestMetadata("compiler/testData/codegen/box/when") @TestDataPath("$PROJECT_ROOT") - public class When extends AbstractIrBlackBoxCodegenTest { + public class When { @Test public void testAllFilesPresentInWhen() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/when"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -37699,7 +39933,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/when/enumOptimization") @TestDataPath("$PROJECT_ROOT") - public class EnumOptimization extends AbstractIrBlackBoxCodegenTest { + public class EnumOptimization { @Test public void testAllFilesPresentInEnumOptimization() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/when/enumOptimization"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -37817,7 +40051,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/when/stringOptimization") @TestDataPath("$PROJECT_ROOT") - public class StringOptimization extends AbstractIrBlackBoxCodegenTest { + public class StringOptimization { @Test public void testAllFilesPresentInStringOptimization() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/when/stringOptimization"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -37881,7 +40115,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @Nested @TestMetadata("compiler/testData/codegen/box/when/whenSubjectVariable") @TestDataPath("$PROJECT_ROOT") - public class WhenSubjectVariable extends AbstractIrBlackBoxCodegenTest { + public class WhenSubjectVariable { @Test public void testAllFilesPresentInWhenSubjectVariable() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/when/whenSubjectVariable"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); diff --git a/compiler/tests-gen/org/jetbrains/kotlin/codegen/ir/IrBlackBoxInlineCodegenTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxInlineCodegenTestGenerated.java similarity index 89% rename from compiler/tests-gen/org/jetbrains/kotlin/codegen/ir/IrBlackBoxInlineCodegenTestGenerated.java rename to compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxInlineCodegenTestGenerated.java index 5db3b918dbf..b27943edb45 100644 --- a/compiler/tests-gen/org/jetbrains/kotlin/codegen/ir/IrBlackBoxInlineCodegenTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxInlineCodegenTestGenerated.java @@ -3,569 +3,651 @@ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. */ -package org.jetbrains.kotlin.codegen.ir; +package org.jetbrains.kotlin.test.runners.codegen; import com.intellij.testFramework.TestDataPath; -import org.jetbrains.kotlin.test.JUnit3RunnerWithInners; -import org.jetbrains.kotlin.test.KotlinTestUtils; import org.jetbrains.kotlin.test.util.KtTestUtil; import org.jetbrains.kotlin.test.TargetBackend; import org.jetbrains.kotlin.test.TestMetadata; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.Nested; +import org.junit.jupiter.api.Test; import java.io.File; import java.util.regex.Pattern; -/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */ +/** This class is generated by {@link GenerateNewCompilerTests.kt}. DO NOT MODIFY MANUALLY */ @SuppressWarnings("all") @TestMetadata("compiler/testData/codegen/boxInline") @TestDataPath("$PROJECT_ROOT") -@RunWith(JUnit3RunnerWithInners.class) public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - + @Test public void testAllFilesPresentInBoxInline() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/anonymousObject") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class AnonymousObject extends AbstractIrBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - + public class AnonymousObject { + @Test public void testAllFilesPresentInAnonymousObject() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/anonymousObject"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("anonymousObjectInDefault.kt") public void testAnonymousObjectInDefault() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectInDefault.kt"); } + @Test @TestMetadata("anonymousObjectOnCallSite.kt") public void testAnonymousObjectOnCallSite() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnCallSite.kt"); } + @Test @TestMetadata("anonymousObjectOnCallSiteSuperParams.kt") public void testAnonymousObjectOnCallSiteSuperParams() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnCallSiteSuperParams.kt"); } + @Test @TestMetadata("anonymousObjectOnDeclarationSite.kt") public void testAnonymousObjectOnDeclarationSite() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnDeclarationSite.kt"); } + @Test @TestMetadata("anonymousObjectOnDeclarationSiteSuperParams.kt") public void testAnonymousObjectOnDeclarationSiteSuperParams() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnDeclarationSiteSuperParams.kt"); } + @Test @TestMetadata("capturedLambdaInInline.kt") public void testCapturedLambdaInInline() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInline.kt"); } + @Test @TestMetadata("capturedLambdaInInline2.kt") public void testCapturedLambdaInInline2() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInline2.kt"); } + @Test @TestMetadata("capturedLambdaInInline3.kt") public void testCapturedLambdaInInline3() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInline3.kt"); } + @Test @TestMetadata("capturedLambdaInInlineObject.kt") public void testCapturedLambdaInInlineObject() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInlineObject.kt"); } + @Test @TestMetadata("capturedLocalFun.kt") public void testCapturedLocalFun() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/capturedLocalFun.kt"); } + @Test @TestMetadata("capturedLocalFunRef.kt") public void testCapturedLocalFunRef() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/capturedLocalFunRef.kt"); } + @Test @TestMetadata("changingReturnType.kt") public void testChangingReturnType() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/changingReturnType.kt"); } + @Test @TestMetadata("constructOriginalInRegenerated.kt") public void testConstructOriginalInRegenerated() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/constructOriginalInRegenerated.kt"); } + @Test @TestMetadata("constructorVisibility.kt") public void testConstructorVisibility() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/constructorVisibility.kt"); } + @Test @TestMetadata("constructorVisibilityInConstLambda.kt") public void testConstructorVisibilityInConstLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/constructorVisibilityInConstLambda.kt"); } + @Test @TestMetadata("constructorVisibilityInLambda.kt") public void testConstructorVisibilityInLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/constructorVisibilityInLambda.kt"); } + @Test @TestMetadata("defineClass.kt") public void testDefineClass() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/defineClass.kt"); } + @Test @TestMetadata("functionExpression.kt") public void testFunctionExpression() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/functionExpression.kt"); } + @Test @TestMetadata("inlineCallInsideInlineLambda.kt") public void testInlineCallInsideInlineLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/inlineCallInsideInlineLambda.kt"); } + @Test @TestMetadata("kt13133.kt") public void testKt13133() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt13133.kt"); } + @Test @TestMetadata("kt13182.kt") public void testKt13182() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt13182.kt"); } + @Test @TestMetadata("kt13374.kt") public void testKt13374() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt13374.kt"); } + @Test @TestMetadata("kt14011.kt") public void testKt14011() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt14011.kt"); } + @Test @TestMetadata("kt14011_2.kt") public void testKt14011_2() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt14011_2.kt"); } + @Test @TestMetadata("kt14011_3.kt") public void testKt14011_3() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt14011_3.kt"); } + @Test @TestMetadata("kt15751.kt") public void testKt15751() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt15751.kt"); } + @Test @TestMetadata("kt16193.kt") public void testKt16193() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt16193.kt"); } + @Test @TestMetadata("kt17972.kt") public void testKt17972() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt17972.kt"); } + @Test @TestMetadata("kt17972_2.kt") public void testKt17972_2() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt17972_2.kt"); } + @Test @TestMetadata("kt17972_3.kt") public void testKt17972_3() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt17972_3.kt"); } + @Test @TestMetadata("kt17972_4.kt") public void testKt17972_4() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt17972_4.kt"); } + @Test @TestMetadata("kt17972_5.kt") public void testKt17972_5() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt17972_5.kt"); } + @Test @TestMetadata("kt17972_super.kt") public void testKt17972_super() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt17972_super.kt"); } + @Test @TestMetadata("kt17972_super2.kt") public void testKt17972_super2() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt17972_super2.kt"); } + @Test @TestMetadata("kt17972_super3.kt") public void testKt17972_super3() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt17972_super3.kt"); } + @Test @TestMetadata("kt19389.kt") public void testKt19389() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt19389.kt"); } + @Test @TestMetadata("kt19399.kt") public void testKt19399() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt19399.kt"); } + @Test @TestMetadata("kt19434.kt") public void testKt19434() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt19434.kt"); } + @Test @TestMetadata("kt19434_2.kt") public void testKt19434_2() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt19434_2.kt"); } + @Test @TestMetadata("kt19723.kt") public void testKt19723() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt19723.kt"); } + @Test + @TestMetadata("kt29595.kt") + public void testKt29595() throws Exception { + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt29595.kt"); + } + + @Test @TestMetadata("kt34656.kt") public void testKt34656() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt34656.kt"); } + @Test @TestMetadata("kt38197.kt") public void testKt38197() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt38197.kt"); } + @Test @TestMetadata("kt42815.kt") public void testKt42815() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt42815.kt"); } + @Test @TestMetadata("kt42815_delegated.kt") public void testKt42815_delegated() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt42815_delegated.kt"); } + @Test + @TestMetadata("kt6007.kt") + public void testKt6007() throws Exception { + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt6007.kt"); + } + + @Test @TestMetadata("kt6552.kt") public void testKt6552() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt6552.kt"); } + @Test @TestMetadata("kt8133.kt") public void testKt8133() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt8133.kt"); } + @Test @TestMetadata("kt9064.kt") public void testKt9064() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt9064.kt"); } + @Test @TestMetadata("kt9064v2.kt") public void testKt9064v2() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt9064v2.kt"); } + @Test @TestMetadata("kt9591.kt") public void testKt9591() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt9591.kt"); } + @Test @TestMetadata("kt9877.kt") public void testKt9877() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt9877.kt"); } + @Test @TestMetadata("kt9877_2.kt") public void testKt9877_2() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt9877_2.kt"); } + @Test @TestMetadata("objectInLambdaCapturesAnotherObject.kt") public void testObjectInLambdaCapturesAnotherObject() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/objectInLambdaCapturesAnotherObject.kt"); } + @Test @TestMetadata("safeCall.kt") public void testSafeCall() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/safeCall.kt"); } + @Test @TestMetadata("safeCall_2.kt") public void testSafeCall_2() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/safeCall_2.kt"); } + @Test @TestMetadata("sam.kt") public void testSam() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/sam.kt"); } + @Test @TestMetadata("sharedFromCrossinline.kt") public void testSharedFromCrossinline() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/sharedFromCrossinline.kt"); } + @Test @TestMetadata("superConstructorWithObjectParameter.kt") public void testSuperConstructorWithObjectParameter() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/superConstructorWithObjectParameter.kt"); } + @Test @TestMetadata("typeInfo.kt") public void testTypeInfo() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/typeInfo.kt"); } + @Test @TestMetadata("withInlineMethod.kt") public void testWithInlineMethod() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/withInlineMethod.kt"); } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/anonymousObject/enumWhen") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class EnumWhen extends AbstractIrBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - + public class EnumWhen { + @Test public void testAllFilesPresentInEnumWhen() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/anonymousObject/enumWhen"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("callSite.kt") public void testCallSite() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/enumWhen/callSite.kt"); } + @Test @TestMetadata("declSite.kt") public void testDeclSite() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/enumWhen/declSite.kt"); } + @Test @TestMetadata("declSiteSeveralMappings.kt") public void testDeclSiteSeveralMappings() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/enumWhen/declSiteSeveralMappings.kt"); } + @Test @TestMetadata("declSiteSeveralMappingsDifOrder.kt") public void testDeclSiteSeveralMappingsDifOrder() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/enumWhen/declSiteSeveralMappingsDifOrder.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class ProperRecapturing extends AbstractIrBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - + public class ProperRecapturing { + @Test public void testAllFilesPresentInProperRecapturing() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("inlineChain.kt") public void testInlineChain() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/inlineChain.kt"); } + @Test @TestMetadata("lambdaChain.kt") public void testLambdaChain() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChain.kt"); } + @Test @TestMetadata("lambdaChainSimple.kt") public void testLambdaChainSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChainSimple.kt"); } + @Test @TestMetadata("lambdaChain_2.kt") public void testLambdaChain_2() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChain_2.kt"); } + @Test @TestMetadata("lambdaChain_3.kt") public void testLambdaChain_3() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChain_3.kt"); } + @Test @TestMetadata("noInlineLambda.kt") public void testNoInlineLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/noInlineLambda.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class ProperRecapturingInClass extends AbstractIrBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - + public class ProperRecapturingInClass { + @Test public void testAllFilesPresentInProperRecapturingInClass() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("inlineChain.kt") public void testInlineChain() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/inlineChain.kt"); } + @Test @TestMetadata("inlinelambdaChain.kt") public void testInlinelambdaChain() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/inlinelambdaChain.kt"); } + @Test @TestMetadata("lambdaChain.kt") public void testLambdaChain() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChain.kt"); } + @Test @TestMetadata("lambdaChainSimple.kt") public void testLambdaChainSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChainSimple.kt"); } + @Test @TestMetadata("lambdaChainSimple_2.kt") public void testLambdaChainSimple_2() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChainSimple_2.kt"); } + @Test @TestMetadata("lambdaChain_2.kt") public void testLambdaChain_2() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChain_2.kt"); } + @Test @TestMetadata("lambdaChain_3.kt") public void testLambdaChain_3() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChain_3.kt"); } + @Test @TestMetadata("noCapturedThisOnCallSite.kt") public void testNoCapturedThisOnCallSite() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/noCapturedThisOnCallSite.kt"); } + @Test @TestMetadata("noInlineLambda.kt") public void testNoInlineLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/noInlineLambda.kt"); } + @Test @TestMetadata("twoInlineLambda.kt") public void testTwoInlineLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/twoInlineLambda.kt"); } + @Test @TestMetadata("twoInlineLambdaComplex.kt") public void testTwoInlineLambdaComplex() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/twoInlineLambdaComplex.kt"); } + @Test @TestMetadata("twoInlineLambdaComplex_2.kt") public void testTwoInlineLambdaComplex_2() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/twoInlineLambdaComplex_2.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/anonymousObject/sam") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Sam extends AbstractIrBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - + public class Sam { + @Test public void testAllFilesPresentInSam() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/anonymousObject/sam"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("anonymousObjectToSam.kt") public void testAnonymousObjectToSam() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/sam/anonymousObjectToSam.kt"); } + @Test @TestMetadata("kt17091.kt") public void testKt17091() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/sam/kt17091.kt"); } + @Test @TestMetadata("kt21671.kt") public void testKt21671() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/sam/kt21671.kt"); } + @Test @TestMetadata("kt21671_2.kt") public void testKt21671_2() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/sam/kt21671_2.kt"); } + @Test @TestMetadata("kt21671_3.kt") public void testKt21671_3() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/sam/kt21671_3.kt"); } + @Test @TestMetadata("kt22304.kt") public void testKt22304() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/sam/kt22304.kt"); } + @Test @TestMetadata("samOnCallSite.kt") public void testSamOnCallSite() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/sam/samOnCallSite.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class TwoCapturedReceivers extends AbstractIrBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - + public class TwoCapturedReceivers { + @Test public void testAllFilesPresentInTwoCapturedReceivers() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("kt8668.kt") public void testKt8668() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668.kt"); } + @Test @TestMetadata("kt8668_2.kt") public void testKt8668_2() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668_2.kt"); } + @Test @TestMetadata("kt8668_3.kt") public void testKt8668_3() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668_3.kt"); } + @Test @TestMetadata("twoDifferentDispatchReceivers.kt") public void testTwoDifferentDispatchReceivers() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/twoDifferentDispatchReceivers.kt"); } + @Test @TestMetadata("twoExtensionReceivers.kt") public void testTwoExtensionReceivers() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/twoExtensionReceivers.kt"); @@ -573,465 +655,525 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/argumentOrder") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class ArgumentOrder extends AbstractIrBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - + public class ArgumentOrder { + @Test public void testAllFilesPresentInArgumentOrder() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/argumentOrder"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("boundFunctionReference.kt") public void testBoundFunctionReference() throws Exception { runTest("compiler/testData/codegen/boxInline/argumentOrder/boundFunctionReference.kt"); } + @Test @TestMetadata("boundFunctionReference2.kt") public void testBoundFunctionReference2() throws Exception { runTest("compiler/testData/codegen/boxInline/argumentOrder/boundFunctionReference2.kt"); } + @Test @TestMetadata("captured.kt") public void testCaptured() throws Exception { runTest("compiler/testData/codegen/boxInline/argumentOrder/captured.kt"); } + @Test @TestMetadata("capturedInExtension.kt") public void testCapturedInExtension() throws Exception { runTest("compiler/testData/codegen/boxInline/argumentOrder/capturedInExtension.kt"); } + @Test @TestMetadata("defaultParametersAndLastVararg.kt") public void testDefaultParametersAndLastVararg() throws Exception { runTest("compiler/testData/codegen/boxInline/argumentOrder/defaultParametersAndLastVararg.kt"); } + @Test @TestMetadata("defaultParametersAndLastVarargWithCorrectOrder.kt") public void testDefaultParametersAndLastVarargWithCorrectOrder() throws Exception { runTest("compiler/testData/codegen/boxInline/argumentOrder/defaultParametersAndLastVarargWithCorrectOrder.kt"); } + @Test @TestMetadata("extension.kt") public void testExtension() throws Exception { runTest("compiler/testData/codegen/boxInline/argumentOrder/extension.kt"); } + @Test @TestMetadata("extensionInClass.kt") public void testExtensionInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/argumentOrder/extensionInClass.kt"); } + @Test @TestMetadata("lambdaMigration.kt") public void testLambdaMigration() throws Exception { runTest("compiler/testData/codegen/boxInline/argumentOrder/lambdaMigration.kt"); } + @Test @TestMetadata("lambdaMigrationInClass.kt") public void testLambdaMigrationInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/argumentOrder/lambdaMigrationInClass.kt"); } + @Test @TestMetadata("simple.kt") public void testSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/argumentOrder/simple.kt"); } + @Test @TestMetadata("simpleInClass.kt") public void testSimpleInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/argumentOrder/simpleInClass.kt"); } + @Test @TestMetadata("varargAndDefaultParameters.kt") public void testVarargAndDefaultParameters() throws Exception { runTest("compiler/testData/codegen/boxInline/argumentOrder/varargAndDefaultParameters.kt"); } + @Test @TestMetadata("varargAndDefaultParametersWithCorrectOrder.kt") public void testVarargAndDefaultParametersWithCorrectOrder() throws Exception { runTest("compiler/testData/codegen/boxInline/argumentOrder/varargAndDefaultParametersWithCorrectOrder.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/arrayConvention") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class ArrayConvention extends AbstractIrBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - + public class ArrayConvention { + @Test public void testAllFilesPresentInArrayConvention() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/arrayConvention"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("simpleAccess.kt") public void testSimpleAccess() throws Exception { runTest("compiler/testData/codegen/boxInline/arrayConvention/simpleAccess.kt"); } + @Test @TestMetadata("simpleAccessInClass.kt") public void testSimpleAccessInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/arrayConvention/simpleAccessInClass.kt"); } + @Test @TestMetadata("simpleAccessWithDefault.kt") public void testSimpleAccessWithDefault() throws Exception { runTest("compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithDefault.kt"); } + @Test @TestMetadata("simpleAccessWithDefaultInClass.kt") public void testSimpleAccessWithDefaultInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithDefaultInClass.kt"); } + @Test @TestMetadata("simpleAccessWithLambda.kt") public void testSimpleAccessWithLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithLambda.kt"); } + @Test @TestMetadata("simpleAccessWithLambdaInClass.kt") public void testSimpleAccessWithLambdaInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithLambdaInClass.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/assert") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Assert extends AbstractIrBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - + public class Assert { + @Test public void testAllFilesPresentInAssert() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/assert"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("jvmAssertInlineFunctionAssertionsDisabled.kt") public void testJvmAssertInlineFunctionAssertionsDisabled() throws Exception { runTest("compiler/testData/codegen/boxInline/assert/jvmAssertInlineFunctionAssertionsDisabled.kt"); } + @Test @TestMetadata("jvmAssertInlineFunctionAssertionsEnabled.kt") public void testJvmAssertInlineFunctionAssertionsEnabled() throws Exception { runTest("compiler/testData/codegen/boxInline/assert/jvmAssertInlineFunctionAssertionsEnabled.kt"); } + @Test @TestMetadata("jvmAssertInlineLambda.kt") public void testJvmAssertInlineLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/assert/jvmAssertInlineLambda.kt"); } + @Test @TestMetadata("jvmClassInitializer.kt") public void testJvmClassInitializer() throws Exception { runTest("compiler/testData/codegen/boxInline/assert/jvmClassInitializer.kt"); } + @Test @TestMetadata("jvmCompanion.kt") public void testJvmCompanion() throws Exception { runTest("compiler/testData/codegen/boxInline/assert/jvmCompanion.kt"); } + @Test @TestMetadata("jvmCrossinlineLambda.kt") public void testJvmCrossinlineLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/assert/jvmCrossinlineLambda.kt"); } + @Test @TestMetadata("jvmCrossinlineLambda2.kt") public void testJvmCrossinlineLambda2() throws Exception { runTest("compiler/testData/codegen/boxInline/assert/jvmCrossinlineLambda2.kt"); } + @Test @TestMetadata("jvmCrossinlineLambdaDeclarationSite.kt") public void testJvmCrossinlineLambdaDeclarationSite() throws Exception { runTest("compiler/testData/codegen/boxInline/assert/jvmCrossinlineLambdaDeclarationSite.kt"); } + @Test @TestMetadata("jvmCrossinlineLambdaDeclarationSiteOnly.kt") public void testJvmCrossinlineLambdaDeclarationSiteOnly() throws Exception { runTest("compiler/testData/codegen/boxInline/assert/jvmCrossinlineLambdaDeclarationSiteOnly.kt"); } + @Test @TestMetadata("jvmCrossinlineSAMDeclarationSite.kt") public void testJvmCrossinlineSAMDeclarationSite() throws Exception { runTest("compiler/testData/codegen/boxInline/assert/jvmCrossinlineSAMDeclarationSite.kt"); } + @Test @TestMetadata("jvmDoubleInline.kt") public void testJvmDoubleInline() throws Exception { runTest("compiler/testData/codegen/boxInline/assert/jvmDoubleInline.kt"); } + @Test @TestMetadata("jvmInlineUsedAsNoinline.kt") public void testJvmInlineUsedAsNoinline() throws Exception { runTest("compiler/testData/codegen/boxInline/assert/jvmInlineUsedAsNoinline.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/builders") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Builders extends AbstractIrBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - + public class Builders { + @Test public void testAllFilesPresentInBuilders() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/builders"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("builders.kt") public void testBuilders() throws Exception { runTest("compiler/testData/codegen/boxInline/builders/builders.kt"); } + @Test @TestMetadata("buildersAndLambdaCapturing.kt") public void testBuildersAndLambdaCapturing() throws Exception { runTest("compiler/testData/codegen/boxInline/builders/buildersAndLambdaCapturing.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/bytecodePreprocessing") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class BytecodePreprocessing extends AbstractIrBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - + public class BytecodePreprocessing { + @Test public void testAllFilesPresentInBytecodePreprocessing() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/bytecodePreprocessing"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("apiVersionAtLeast1.kt") public void testApiVersionAtLeast1() throws Exception { runTest("compiler/testData/codegen/boxInline/bytecodePreprocessing/apiVersionAtLeast1.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/callableReference") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class CallableReference extends AbstractIrBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - + public class CallableReference { + @Test @TestMetadata("adapted.kt") public void testAdapted() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/adapted.kt"); } + @Test public void testAllFilesPresentInCallableReference() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/callableReference"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("classLevel.kt") public void testClassLevel() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/classLevel.kt"); } + @Test @TestMetadata("classLevel2.kt") public void testClassLevel2() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/classLevel2.kt"); } + @Test @TestMetadata("constructor.kt") public void testConstructor() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/constructor.kt"); } + @Test @TestMetadata("innerGenericConstuctor.kt") public void testInnerGenericConstuctor() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/innerGenericConstuctor.kt"); } + @Test @TestMetadata("intrinsic.kt") public void testIntrinsic() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/intrinsic.kt"); } + @Test @TestMetadata("jvmFieldProperty.kt") public void testJvmFieldProperty() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/jvmFieldProperty.kt"); } + @Test @TestMetadata("kt15449.kt") public void testKt15449() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/kt15449.kt"); } + @Test @TestMetadata("kt15751_2.kt") public void testKt15751_2() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/kt15751_2.kt"); } + @Test @TestMetadata("kt16411.kt") public void testKt16411() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/kt16411.kt"); } + @Test @TestMetadata("kt35101.kt") public void testKt35101() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/kt35101.kt"); } + @Test @TestMetadata("propertyIntrinsic.kt") public void testPropertyIntrinsic() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/propertyIntrinsic.kt"); } + @Test @TestMetadata("propertyReference.kt") public void testPropertyReference() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/propertyReference.kt"); } + @Test @TestMetadata("topLevel.kt") public void testTopLevel() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/topLevel.kt"); } + @Test @TestMetadata("topLevelExtension.kt") public void testTopLevelExtension() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/topLevelExtension.kt"); } + @Test @TestMetadata("topLevelProperty.kt") public void testTopLevelProperty() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/topLevelProperty.kt"); } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/callableReference/bound") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Bound extends AbstractIrBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - + public class Bound { + @Test public void testAllFilesPresentInBound() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/callableReference/bound"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("classProperty.kt") public void testClassProperty() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/classProperty.kt"); } + @Test @TestMetadata("emptyLhsFunction.kt") public void testEmptyLhsFunction() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/emptyLhsFunction.kt"); } + @Test @TestMetadata("emptyLhsOnInlineProperty.kt") public void testEmptyLhsOnInlineProperty() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/emptyLhsOnInlineProperty.kt"); } + @Test @TestMetadata("emptyLhsProperty.kt") public void testEmptyLhsProperty() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/emptyLhsProperty.kt"); } + @Test @TestMetadata("expression.kt") public void testExpression() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/expression.kt"); } + @Test @TestMetadata("extensionReceiver.kt") public void testExtensionReceiver() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/extensionReceiver.kt"); } + @Test @TestMetadata("filter.kt") public void testFilter() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/filter.kt"); } + @Test @TestMetadata("inlineValueParameterInsteadOfReceiver.kt") public void testInlineValueParameterInsteadOfReceiver() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/inlineValueParameterInsteadOfReceiver.kt"); } + @Test @TestMetadata("innerGenericConstuctor.kt") public void testInnerGenericConstuctor() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/innerGenericConstuctor.kt"); } + @Test @TestMetadata("intrinsic.kt") public void testIntrinsic() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/intrinsic.kt"); } + @Test @TestMetadata("jvmFieldProperty.kt") public void testJvmFieldProperty() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/jvmFieldProperty.kt"); } + @Test @TestMetadata("kt18728.kt") public void testKt18728() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/kt18728.kt"); } + @Test @TestMetadata("kt18728_2.kt") public void testKt18728_2() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/kt18728_2.kt"); } + @Test @TestMetadata("kt18728_3.kt") public void testKt18728_3() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/kt18728_3.kt"); } + @Test @TestMetadata("kt18728_4.kt") public void testKt18728_4() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/kt18728_4.kt"); } + @Test + @TestMetadata("lambdaOnLhs.kt") + public void testLambdaOnLhs() throws Exception { + runTest("compiler/testData/codegen/boxInline/callableReference/bound/lambdaOnLhs.kt"); + } + + @Test @TestMetadata("map.kt") public void testMap() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/map.kt"); } + @Test @TestMetadata("mixed.kt") public void testMixed() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/mixed.kt"); } + @Test @TestMetadata("objectProperty.kt") public void testObjectProperty() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/objectProperty.kt"); } + @Test @TestMetadata("propertyImportedFromObject.kt") public void testPropertyImportedFromObject() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/propertyImportedFromObject.kt"); } + @Test @TestMetadata("sideEffect.kt") public void testSideEffect() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/sideEffect.kt"); } + @Test @TestMetadata("simple.kt") public void testSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/simple.kt"); } + @Test @TestMetadata("simpleVal.kt") public void testSimpleVal() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/simpleVal.kt"); } + @Test @TestMetadata("simpleVal2.kt") public void testSimpleVal2() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/simpleVal2.kt"); } + @Test @TestMetadata("topLevelExtensionProperty.kt") public void testTopLevelExtensionProperty() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/topLevelExtensionProperty.kt"); @@ -1039,649 +1181,740 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/capture") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Capture extends AbstractIrBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - + public class Capture { + @Test public void testAllFilesPresentInCapture() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/capture"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("captureInlinable.kt") public void testCaptureInlinable() throws Exception { runTest("compiler/testData/codegen/boxInline/capture/captureInlinable.kt"); } + @Test @TestMetadata("captureInlinableAndOther.kt") public void testCaptureInlinableAndOther() throws Exception { runTest("compiler/testData/codegen/boxInline/capture/captureInlinableAndOther.kt"); } + @Test @TestMetadata("captureThisAndReceiver.kt") public void testCaptureThisAndReceiver() throws Exception { runTest("compiler/testData/codegen/boxInline/capture/captureThisAndReceiver.kt"); } + @Test @TestMetadata("generics.kt") public void testGenerics() throws Exception { runTest("compiler/testData/codegen/boxInline/capture/generics.kt"); } + @Test @TestMetadata("simpleCapturingInClass.kt") public void testSimpleCapturingInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/capture/simpleCapturingInClass.kt"); } + @Test @TestMetadata("simpleCapturingInPackage.kt") public void testSimpleCapturingInPackage() throws Exception { runTest("compiler/testData/codegen/boxInline/capture/simpleCapturingInPackage.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/complex") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Complex extends AbstractIrBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - + public class Complex { + @Test public void testAllFilesPresentInComplex() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/complex"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("closureChain.kt") public void testClosureChain() throws Exception { runTest("compiler/testData/codegen/boxInline/complex/closureChain.kt"); } + @Test @TestMetadata("forEachLine.kt") public void testForEachLine() throws Exception { runTest("compiler/testData/codegen/boxInline/complex/forEachLine.kt"); } + @Test @TestMetadata("kt44429.kt") public void testKt44429() throws Exception { runTest("compiler/testData/codegen/boxInline/complex/kt44429.kt"); } + @Test @TestMetadata("lambdaInLambda.kt") public void testLambdaInLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/complex/lambdaInLambda.kt"); } + @Test @TestMetadata("swapAndWith.kt") public void testSwapAndWith() throws Exception { runTest("compiler/testData/codegen/boxInline/complex/swapAndWith.kt"); } + @Test @TestMetadata("swapAndWith2.kt") public void testSwapAndWith2() throws Exception { runTest("compiler/testData/codegen/boxInline/complex/swapAndWith2.kt"); } + @Test @TestMetadata("use.kt") public void testUse() throws Exception { runTest("compiler/testData/codegen/boxInline/complex/use.kt"); } + @Test @TestMetadata("with.kt") public void testWith() throws Exception { runTest("compiler/testData/codegen/boxInline/complex/with.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/complexStack") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class ComplexStack extends AbstractIrBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - + public class ComplexStack { + @Test public void testAllFilesPresentInComplexStack() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/complexStack"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("asCheck.kt") public void testAsCheck() throws Exception { runTest("compiler/testData/codegen/boxInline/complexStack/asCheck.kt"); } + @Test @TestMetadata("asCheck2.kt") public void testAsCheck2() throws Exception { runTest("compiler/testData/codegen/boxInline/complexStack/asCheck2.kt"); } + @Test @TestMetadata("breakContinueInInlineLambdaArgument.kt") public void testBreakContinueInInlineLambdaArgument() throws Exception { runTest("compiler/testData/codegen/boxInline/complexStack/breakContinueInInlineLambdaArgument.kt"); } + @Test @TestMetadata("simple.kt") public void testSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/complexStack/simple.kt"); } + @Test @TestMetadata("simple2.kt") public void testSimple2() throws Exception { runTest("compiler/testData/codegen/boxInline/complexStack/simple2.kt"); } + @Test @TestMetadata("simple3.kt") public void testSimple3() throws Exception { runTest("compiler/testData/codegen/boxInline/complexStack/simple3.kt"); } + @Test @TestMetadata("simple4.kt") public void testSimple4() throws Exception { runTest("compiler/testData/codegen/boxInline/complexStack/simple4.kt"); } + @Test @TestMetadata("simpleExtension.kt") public void testSimpleExtension() throws Exception { runTest("compiler/testData/codegen/boxInline/complexStack/simpleExtension.kt"); } + @Test @TestMetadata("spillConstructorArgumentsAndInlineLambdaParameter.kt") public void testSpillConstructorArgumentsAndInlineLambdaParameter() throws Exception { runTest("compiler/testData/codegen/boxInline/complexStack/spillConstructorArgumentsAndInlineLambdaParameter.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/contracts") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Contracts extends AbstractIrBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - + public class Contracts { + @Test public void testAllFilesPresentInContracts() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/contracts"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("cfgDependendValInitialization.kt") public void testCfgDependendValInitialization() throws Exception { runTest("compiler/testData/codegen/boxInline/contracts/cfgDependendValInitialization.kt"); } + @Test @TestMetadata("complexInitializer.kt") public void testComplexInitializer() throws Exception { runTest("compiler/testData/codegen/boxInline/contracts/complexInitializer.kt"); } + @Test @TestMetadata("complexInitializerWithStackTransformation.kt") public void testComplexInitializerWithStackTransformation() throws Exception { runTest("compiler/testData/codegen/boxInline/contracts/complexInitializerWithStackTransformation.kt"); } + @Test @TestMetadata("crossinlineCallableReference.kt") public void testCrossinlineCallableReference() throws Exception { runTest("compiler/testData/codegen/boxInline/contracts/crossinlineCallableReference.kt"); } + @Test @TestMetadata("definiteLongValInitialization.kt") public void testDefiniteLongValInitialization() throws Exception { runTest("compiler/testData/codegen/boxInline/contracts/definiteLongValInitialization.kt"); } + @Test @TestMetadata("definiteNestedValInitialization.kt") public void testDefiniteNestedValInitialization() throws Exception { runTest("compiler/testData/codegen/boxInline/contracts/definiteNestedValInitialization.kt"); } + @Test @TestMetadata("definiteValInitInInitializer.kt") public void testDefiniteValInitInInitializer() throws Exception { runTest("compiler/testData/codegen/boxInline/contracts/definiteValInitInInitializer.kt"); } + @Test @TestMetadata("definiteValInitialization.kt") public void testDefiniteValInitialization() throws Exception { runTest("compiler/testData/codegen/boxInline/contracts/definiteValInitialization.kt"); } + @Test @TestMetadata("exactlyOnceCrossinline.kt") public void testExactlyOnceCrossinline() throws Exception { runTest("compiler/testData/codegen/boxInline/contracts/exactlyOnceCrossinline.kt"); } + @Test @TestMetadata("exactlyOnceCrossinline2.kt") public void testExactlyOnceCrossinline2() throws Exception { runTest("compiler/testData/codegen/boxInline/contracts/exactlyOnceCrossinline2.kt"); } + @Test @TestMetadata("exactlyOnceNoinline.kt") public void testExactlyOnceNoinline() throws Exception { runTest("compiler/testData/codegen/boxInline/contracts/exactlyOnceNoinline.kt"); } + @Test @TestMetadata("nonLocalReturn.kt") public void testNonLocalReturn() throws Exception { runTest("compiler/testData/codegen/boxInline/contracts/nonLocalReturn.kt"); } + @Test @TestMetadata("nonLocalReturnWithCycle.kt") public void testNonLocalReturnWithCycle() throws Exception { runTest("compiler/testData/codegen/boxInline/contracts/nonLocalReturnWithCycle.kt"); } + @Test @TestMetadata("propertyInitialization.kt") public void testPropertyInitialization() throws Exception { runTest("compiler/testData/codegen/boxInline/contracts/propertyInitialization.kt"); } + @Test @TestMetadata("valInitializationAndUsageInNestedLambda.kt") public void testValInitializationAndUsageInNestedLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/contracts/valInitializationAndUsageInNestedLambda.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/defaultValues") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class DefaultValues extends AbstractIrBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - + public class DefaultValues { + @Test @TestMetadata("33Parameters.kt") public void test33Parameters() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/33Parameters.kt"); } + @Test @TestMetadata("33ParametersInConstructor.kt") public void test33ParametersInConstructor() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/33ParametersInConstructor.kt"); } + @Test public void testAllFilesPresentInDefaultValues() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/defaultValues"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("defaultInExtension.kt") public void testDefaultInExtension() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/defaultInExtension.kt"); } + @Test @TestMetadata("defaultMethod.kt") public void testDefaultMethod() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/defaultMethod.kt"); } + @Test @TestMetadata("defaultMethodInClass.kt") public void testDefaultMethodInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/defaultMethodInClass.kt"); } + @Test @TestMetadata("defaultParamRemapping.kt") public void testDefaultParamRemapping() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/defaultParamRemapping.kt"); } + @Test @TestMetadata("inlineInDefaultParameter.kt") public void testInlineInDefaultParameter() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/inlineInDefaultParameter.kt"); } + @Test @TestMetadata("inlineLambdaInNoInlineDefault.kt") public void testInlineLambdaInNoInlineDefault() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/inlineLambdaInNoInlineDefault.kt"); } + @Test @TestMetadata("kt11479.kt") public void testKt11479() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/kt11479.kt"); } + @Test @TestMetadata("kt11479InlinedDefaultParameter.kt") public void testKt11479InlinedDefaultParameter() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/kt11479InlinedDefaultParameter.kt"); } + @Test @TestMetadata("kt14564.kt") public void testKt14564() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/kt14564.kt"); } + @Test @TestMetadata("kt14564_2.kt") public void testKt14564_2() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/kt14564_2.kt"); } + @Test @TestMetadata("kt16496.kt") public void testKt16496() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/kt16496.kt"); } + @Test @TestMetadata("kt18689.kt") public void testKt18689() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/kt18689.kt"); } + @Test @TestMetadata("kt18689_2.kt") public void testKt18689_2() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/kt18689_2.kt"); } + @Test @TestMetadata("kt18689_3.kt") public void testKt18689_3() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/kt18689_3.kt"); } + @Test @TestMetadata("kt18689_4.kt") public void testKt18689_4() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/kt18689_4.kt"); } + @Test @TestMetadata("kt5685.kt") public void testKt5685() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/kt5685.kt"); } + @Test @TestMetadata("simpleDefaultMethod.kt") public void testSimpleDefaultMethod() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/simpleDefaultMethod.kt"); } + @Test @TestMetadata("varArgNoInline.kt") public void testVarArgNoInline() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/varArgNoInline.kt"); } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class LambdaInlining extends AbstractIrBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - + public class LambdaInlining { + @Test public void testAllFilesPresentInLambdaInlining() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("checkLambdaClassIsPresent.kt") public void testCheckLambdaClassIsPresent() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/checkLambdaClassIsPresent.kt"); } + @Test @TestMetadata("checkLambdaClassesArePresent.kt") public void testCheckLambdaClassesArePresent() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/checkLambdaClassesArePresent.kt"); } + @Test @TestMetadata("checkObjectClassIsPresent.kt") public void testCheckObjectClassIsPresent() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/checkObjectClassIsPresent.kt"); } + @Test @TestMetadata("checkStaticLambdaClassIsPresent.kt") public void testCheckStaticLambdaClassIsPresent() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/checkStaticLambdaClassIsPresent.kt"); } + @Test @TestMetadata("checkStaticLambdaClassesArePresent.kt") public void testCheckStaticLambdaClassesArePresent() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/checkStaticLambdaClassesArePresent.kt"); } + @Test @TestMetadata("checkStaticObjectClassIsPresent.kt") public void testCheckStaticObjectClassIsPresent() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/checkStaticObjectClassIsPresent.kt"); } + @Test @TestMetadata("defaultCallInDefaultLambda.kt") public void testDefaultCallInDefaultLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/defaultCallInDefaultLambda.kt"); } + @Test @TestMetadata("defaultLambdaInNoInline.kt") public void testDefaultLambdaInNoInline() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/defaultLambdaInNoInline.kt"); } + @Test @TestMetadata("differentInvokeSignature.kt") public void testDifferentInvokeSignature() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/differentInvokeSignature.kt"); } + @Test @TestMetadata("genericLambda.kt") public void testGenericLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/genericLambda.kt"); } + @Test @TestMetadata("instanceCapturedInClass.kt") public void testInstanceCapturedInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/instanceCapturedInClass.kt"); } + @Test @TestMetadata("instanceCapturedInInterface.kt") public void testInstanceCapturedInInterface() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/instanceCapturedInInterface.kt"); } + @Test @TestMetadata("jvmStaticDefault.kt") public void testJvmStaticDefault() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/jvmStaticDefault.kt"); } + @Test @TestMetadata("kt21827.kt") public void testKt21827() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/kt21827.kt"); } + @Test @TestMetadata("kt21946.kt") public void testKt21946() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/kt21946.kt"); } + @Test @TestMetadata("kt24477.kt") public void testKt24477() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/kt24477.kt"); } + @Test @TestMetadata("kt25106.kt") public void testKt25106() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/kt25106.kt"); } + @Test @TestMetadata("kt26636.kt") public void testKt26636() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/kt26636.kt"); } + @Test @TestMetadata("noInline.kt") public void testNoInline() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/noInline.kt"); } + @Test @TestMetadata("nonDefaultInlineInNoInline.kt") public void testNonDefaultInlineInNoInline() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/nonDefaultInlineInNoInline.kt"); } + @Test @TestMetadata("receiverClash.kt") public void testReceiverClash() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/receiverClash.kt"); } + @Test @TestMetadata("receiverClash2.kt") public void testReceiverClash2() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/receiverClash2.kt"); } + @Test @TestMetadata("receiverClashInClass.kt") public void testReceiverClashInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/receiverClashInClass.kt"); } + @Test @TestMetadata("receiverClashInClass2.kt") public void testReceiverClashInClass2() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/receiverClashInClass2.kt"); } + @Test @TestMetadata("simple.kt") public void testSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simple.kt"); } + @Test @TestMetadata("simpleErased.kt") public void testSimpleErased() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simpleErased.kt"); } + @Test @TestMetadata("simpleErasedStaticInstance.kt") public void testSimpleErasedStaticInstance() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simpleErasedStaticInstance.kt"); } + @Test @TestMetadata("simpleExtension.kt") public void testSimpleExtension() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simpleExtension.kt"); } + @Test @TestMetadata("simpleGeneric.kt") public void testSimpleGeneric() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simpleGeneric.kt"); } + @Test @TestMetadata("simpleStaticInstance.kt") public void testSimpleStaticInstance() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simpleStaticInstance.kt"); } + @Test @TestMetadata("thisClash.kt") public void testThisClash() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/thisClash.kt"); } + @Test @TestMetadata("thisClashInClass.kt") public void testThisClashInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/thisClashInClass.kt"); } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class CallableReferences extends AbstractIrBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - + public class CallableReferences { + @Test public void testAllFilesPresentInCallableReferences() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("boundFunctionReference.kt") public void testBoundFunctionReference() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundFunctionReference.kt"); } + @Test @TestMetadata("boundFunctionReferenceOnInt.kt") public void testBoundFunctionReferenceOnInt() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundFunctionReferenceOnInt.kt"); } + @Test @TestMetadata("boundFunctionReferenceOnLong.kt") public void testBoundFunctionReferenceOnLong() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundFunctionReferenceOnLong.kt"); } + @Test @TestMetadata("boundPropertyReference.kt") public void testBoundPropertyReference() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundPropertyReference.kt"); } + @Test @TestMetadata("boundPropertyReferenceOnInt.kt") public void testBoundPropertyReferenceOnInt() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundPropertyReferenceOnInt.kt"); } + @Test @TestMetadata("boundPropertyReferenceOnLong.kt") public void testBoundPropertyReferenceOnLong() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundPropertyReferenceOnLong.kt"); } + @Test @TestMetadata("constuctorReference.kt") public void testConstuctorReference() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/constuctorReference.kt"); } + @Test @TestMetadata("differentInvokeSignature.kt") public void testDifferentInvokeSignature() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/differentInvokeSignature.kt"); } + @Test @TestMetadata("differentInvokeSignature2.kt") public void testDifferentInvokeSignature2() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/differentInvokeSignature2.kt"); } + @Test @TestMetadata("functionImportedFromObject.kt") public void testFunctionImportedFromObject() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/functionImportedFromObject.kt"); } + @Test @TestMetadata("functionReference.kt") public void testFunctionReference() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/functionReference.kt"); } + @Test @TestMetadata("functionReferenceFromClass.kt") public void testFunctionReferenceFromClass() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/functionReferenceFromClass.kt"); } + @Test @TestMetadata("functionReferenceFromObject.kt") public void testFunctionReferenceFromObject() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/functionReferenceFromObject.kt"); } + @Test @TestMetadata("innerClassConstuctorReference.kt") public void testInnerClassConstuctorReference() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/innerClassConstuctorReference.kt"); } + @Test @TestMetadata("mutableBoundPropertyReferenceFromClass.kt") public void testMutableBoundPropertyReferenceFromClass() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/mutableBoundPropertyReferenceFromClass.kt"); } + @Test @TestMetadata("mutablePropertyReferenceFromClass.kt") public void testMutablePropertyReferenceFromClass() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/mutablePropertyReferenceFromClass.kt"); } + @Test @TestMetadata("privateFunctionReference.kt") public void testPrivateFunctionReference() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/privateFunctionReference.kt"); } + @Test @TestMetadata("privatePropertyReference.kt") public void testPrivatePropertyReference() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/privatePropertyReference.kt"); } + @Test @TestMetadata("propertyImportedFromObject.kt") public void testPropertyImportedFromObject() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/propertyImportedFromObject.kt"); } + @Test @TestMetadata("propertyReference.kt") public void testPropertyReference() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/propertyReference.kt"); } + @Test @TestMetadata("propertyReferenceFromClass.kt") public void testPropertyReferenceFromClass() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/propertyReferenceFromClass.kt"); } + @Test @TestMetadata("propertyReferenceFromObject.kt") public void testPropertyReferenceFromObject() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/propertyReferenceFromObject.kt"); @@ -1689,48 +1922,52 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/defaultValues/maskElimination") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class MaskElimination extends AbstractIrBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - + public class MaskElimination { + @Test @TestMetadata("32Parameters.kt") public void test32Parameters() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/maskElimination/32Parameters.kt"); } + @Test @TestMetadata("33Parameters.kt") public void test33Parameters() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/maskElimination/33Parameters.kt"); } + @Test public void testAllFilesPresentInMaskElimination() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/defaultValues/maskElimination"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("kt18792.kt") public void testKt18792() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/maskElimination/kt18792.kt"); } + @Test @TestMetadata("kt19679.kt") public void testKt19679() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/maskElimination/kt19679.kt"); } + @Test @TestMetadata("kt19679_2.kt") public void testKt19679_2() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/maskElimination/kt19679_2.kt"); } + @Test @TestMetadata("kt19679_3.kt") public void testKt19679_3() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/maskElimination/kt19679_3.kt"); } + @Test @TestMetadata("simple.kt") public void testSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/maskElimination/simple.kt"); @@ -1738,375 +1975,400 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/delegatedProperty") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class DelegatedProperty extends AbstractIrBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - + public class DelegatedProperty { + @Test public void testAllFilesPresentInDelegatedProperty() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/delegatedProperty"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("kt16864.kt") public void testKt16864() throws Exception { runTest("compiler/testData/codegen/boxInline/delegatedProperty/kt16864.kt"); } + @Test @TestMetadata("local.kt") public void testLocal() throws Exception { runTest("compiler/testData/codegen/boxInline/delegatedProperty/local.kt"); } + @Test @TestMetadata("localDeclaredInLambda.kt") public void testLocalDeclaredInLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/delegatedProperty/localDeclaredInLambda.kt"); } + @Test @TestMetadata("localInAnonymousObject.kt") public void testLocalInAnonymousObject() throws Exception { runTest("compiler/testData/codegen/boxInline/delegatedProperty/localInAnonymousObject.kt"); } + @Test @TestMetadata("localInLambda.kt") public void testLocalInLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/delegatedProperty/localInLambda.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/enclosingInfo") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class EnclosingInfo extends AbstractIrBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - + public class EnclosingInfo { + @Test public void testAllFilesPresentInEnclosingInfo() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/enclosingInfo"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("anonymousInLambda.kt") public void testAnonymousInLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/enclosingInfo/anonymousInLambda.kt"); } + @Test @TestMetadata("inlineChain.kt") public void testInlineChain() throws Exception { runTest("compiler/testData/codegen/boxInline/enclosingInfo/inlineChain.kt"); } + @Test @TestMetadata("inlineChain2.kt") public void testInlineChain2() throws Exception { runTest("compiler/testData/codegen/boxInline/enclosingInfo/inlineChain2.kt"); } + @Test @TestMetadata("objectInInlineFun.kt") public void testObjectInInlineFun() throws Exception { runTest("compiler/testData/codegen/boxInline/enclosingInfo/objectInInlineFun.kt"); } + @Test @TestMetadata("transformedConstructor.kt") public void testTransformedConstructor() throws Exception { runTest("compiler/testData/codegen/boxInline/enclosingInfo/transformedConstructor.kt"); } + @Test @TestMetadata("transformedConstructorWithAdditionalObject.kt") public void testTransformedConstructorWithAdditionalObject() throws Exception { runTest("compiler/testData/codegen/boxInline/enclosingInfo/transformedConstructorWithAdditionalObject.kt"); } + @Test @TestMetadata("transformedConstructorWithNestedInline.kt") public void testTransformedConstructorWithNestedInline() throws Exception { runTest("compiler/testData/codegen/boxInline/enclosingInfo/transformedConstructorWithNestedInline.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/enum") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Enum extends AbstractIrBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - + public class Enum { + @Test public void testAllFilesPresentInEnum() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/enum"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("kt10569.kt") public void testKt10569() throws Exception { runTest("compiler/testData/codegen/boxInline/enum/kt10569.kt"); } + @Test @TestMetadata("kt18254.kt") public void testKt18254() throws Exception { runTest("compiler/testData/codegen/boxInline/enum/kt18254.kt"); } + @Test @TestMetadata("valueOf.kt") public void testValueOf() throws Exception { runTest("compiler/testData/codegen/boxInline/enum/valueOf.kt"); } + @Test @TestMetadata("valueOfCapturedType.kt") public void testValueOfCapturedType() throws Exception { runTest("compiler/testData/codegen/boxInline/enum/valueOfCapturedType.kt"); } + @Test @TestMetadata("valueOfChain.kt") public void testValueOfChain() throws Exception { runTest("compiler/testData/codegen/boxInline/enum/valueOfChain.kt"); } + @Test @TestMetadata("valueOfChainCapturedType.kt") public void testValueOfChainCapturedType() throws Exception { runTest("compiler/testData/codegen/boxInline/enum/valueOfChainCapturedType.kt"); } + @Test @TestMetadata("valueOfNonReified.kt") public void testValueOfNonReified() throws Exception { runTest("compiler/testData/codegen/boxInline/enum/valueOfNonReified.kt"); } + @Test @TestMetadata("values.kt") public void testValues() throws Exception { runTest("compiler/testData/codegen/boxInline/enum/values.kt"); } + @Test @TestMetadata("valuesAsArray.kt") public void testValuesAsArray() throws Exception { runTest("compiler/testData/codegen/boxInline/enum/valuesAsArray.kt"); } + @Test @TestMetadata("valuesCapturedType.kt") public void testValuesCapturedType() throws Exception { runTest("compiler/testData/codegen/boxInline/enum/valuesCapturedType.kt"); } + @Test @TestMetadata("valuesChain.kt") public void testValuesChain() throws Exception { runTest("compiler/testData/codegen/boxInline/enum/valuesChain.kt"); } + @Test @TestMetadata("valuesChainCapturedType.kt") public void testValuesChainCapturedType() throws Exception { runTest("compiler/testData/codegen/boxInline/enum/valuesChainCapturedType.kt"); } + @Test @TestMetadata("valuesNonReified.kt") public void testValuesNonReified() throws Exception { runTest("compiler/testData/codegen/boxInline/enum/valuesNonReified.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/functionExpression") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class FunctionExpression extends AbstractIrBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - + public class FunctionExpression { + @Test public void testAllFilesPresentInFunctionExpression() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/functionExpression"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("extension.kt") public void testExtension() throws Exception { runTest("compiler/testData/codegen/boxInline/functionExpression/extension.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/inlineClasses") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class InlineClasses extends AbstractIrBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - + public class InlineClasses { + @Test public void testAllFilesPresentInInlineClasses() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/inlineClasses"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("inlineClassWithInlineValReturningInlineClass.kt") public void testInlineClassWithInlineValReturningInlineClass() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/inlineClassWithInlineValReturningInlineClass.kt"); } + @Test @TestMetadata("inlineFunctionInsideInlineClassesBox.kt") public void testInlineFunctionInsideInlineClassesBox() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/inlineFunctionInsideInlineClassesBox.kt"); } + @Test @TestMetadata("noReturnTypeManglingFun.kt") public void testNoReturnTypeManglingFun() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/noReturnTypeManglingFun.kt"); } + @Test @TestMetadata("noReturnTypeManglingFunJvmName.kt") public void testNoReturnTypeManglingFunJvmName() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/noReturnTypeManglingFunJvmName.kt"); } + @Test @TestMetadata("noReturnTypeManglingVal.kt") public void testNoReturnTypeManglingVal() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/noReturnTypeManglingVal.kt"); } + @Test @TestMetadata("withReturnTypeManglingFun.kt") public void testWithReturnTypeManglingFun() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/withReturnTypeManglingFun.kt"); } + @Test @TestMetadata("withReturnTypeManglingFunJvmName.kt") public void testWithReturnTypeManglingFunJvmName() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/withReturnTypeManglingFunJvmName.kt"); } + @Test @TestMetadata("withReturnTypeManglingVal.kt") public void testWithReturnTypeManglingVal() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/withReturnTypeManglingVal.kt"); } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class UnboxGenericParameter extends AbstractIrBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - + public class UnboxGenericParameter { + @Test public void testAllFilesPresentInUnboxGenericParameter() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class FunInterface extends AbstractIrBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - + public class FunInterface { + @Test public void testAllFilesPresentInFunInterface() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("any.kt") public void testAny() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/any.kt"); } + @Test @TestMetadata("anyN.kt") public void testAnyN() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/anyN.kt"); } + @Test @TestMetadata("iface.kt") public void testIface() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/iface.kt"); } + @Test @TestMetadata("ifaceChild.kt") public void testIfaceChild() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/ifaceChild.kt"); } + @Test @TestMetadata("primitive.kt") public void testPrimitive() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/primitive.kt"); } + @Test @TestMetadata("string.kt") public void testString() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/string.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Lambda extends AbstractIrBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - + public class Lambda { + @Test public void testAllFilesPresentInLambda() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("any.kt") public void testAny() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/any.kt"); } + @Test @TestMetadata("anyN.kt") public void testAnyN() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/anyN.kt"); } + @Test @TestMetadata("iface.kt") public void testIface() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/iface.kt"); } + @Test @TestMetadata("ifaceChild.kt") public void testIfaceChild() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/ifaceChild.kt"); } + @Test @TestMetadata("primitive.kt") public void testPrimitive() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/primitive.kt"); } + @Test @TestMetadata("string.kt") public void testString() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/string.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class ObjectLiteral extends AbstractIrBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - + public class ObjectLiteral { + @Test public void testAllFilesPresentInObjectLiteral() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("any.kt") public void testAny() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/any.kt"); } + @Test @TestMetadata("anyN.kt") public void testAnyN() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/anyN.kt"); } + @Test @TestMetadata("iface.kt") public void testIface() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/iface.kt"); } + @Test @TestMetadata("ifaceChild.kt") public void testIfaceChild() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/ifaceChild.kt"); } + @Test @TestMetadata("primitive.kt") public void testPrimitive() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/primitive.kt"); } + @Test @TestMetadata("string.kt") public void testString() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/string.kt"); @@ -2115,239 +2377,309 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/innerClasses") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class InnerClasses extends AbstractIrBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - + public class InnerClasses { + @Test public void testAllFilesPresentInInnerClasses() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/innerClasses"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("captureThisAndOuter.kt") public void testCaptureThisAndOuter() throws Exception { runTest("compiler/testData/codegen/boxInline/innerClasses/captureThisAndOuter.kt"); } + @Test @TestMetadata("innerLambda.kt") public void testInnerLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/innerClasses/innerLambda.kt"); } + @Test @TestMetadata("kt10259.kt") public void testKt10259() throws Exception { runTest("compiler/testData/codegen/boxInline/innerClasses/kt10259.kt"); } } - @TestMetadata("compiler/testData/codegen/boxInline/jvmName") + @Nested + @TestMetadata("compiler/testData/codegen/boxInline/invokedynamic") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class JvmName extends AbstractIrBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); + public class Invokedynamic { + @Test + public void testAllFilesPresentInInvokedynamic() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/invokedynamic"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Nested + @TestMetadata("compiler/testData/codegen/boxInline/invokedynamic/lambdas") + @TestDataPath("$PROJECT_ROOT") + public class Lambdas { + @Test + public void testAllFilesPresentInLambdas() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/invokedynamic/lambdas"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @Test + @TestMetadata("crossinlineLambda1.kt") + public void testCrossinlineLambda1() throws Exception { + runTest("compiler/testData/codegen/boxInline/invokedynamic/lambdas/crossinlineLambda1.kt"); + } + + @Test + @TestMetadata("crossinlineLambda2.kt") + public void testCrossinlineLambda2() throws Exception { + runTest("compiler/testData/codegen/boxInline/invokedynamic/lambdas/crossinlineLambda2.kt"); + } + + @Test + @TestMetadata("inlineFunInDifferentPackage.kt") + public void testInlineFunInDifferentPackage() throws Exception { + runTest("compiler/testData/codegen/boxInline/invokedynamic/lambdas/inlineFunInDifferentPackage.kt"); + } + + @Test + @TestMetadata("inlineLambda1.kt") + public void testInlineLambda1() throws Exception { + runTest("compiler/testData/codegen/boxInline/invokedynamic/lambdas/inlineLambda1.kt"); + } + } + + @Nested + @TestMetadata("compiler/testData/codegen/boxInline/invokedynamic/sam") + @TestDataPath("$PROJECT_ROOT") + public class Sam { + @Test + public void testAllFilesPresentInSam() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/invokedynamic/sam"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @Test + @TestMetadata("crossinlineLambda1.kt") + public void testCrossinlineLambda1() throws Exception { + runTest("compiler/testData/codegen/boxInline/invokedynamic/sam/crossinlineLambda1.kt"); + } + + @Test + @TestMetadata("crossinlineLambda2.kt") + public void testCrossinlineLambda2() throws Exception { + runTest("compiler/testData/codegen/boxInline/invokedynamic/sam/crossinlineLambda2.kt"); + } + + @Test + @TestMetadata("inlineFunInDifferentPackage.kt") + public void testInlineFunInDifferentPackage() throws Exception { + runTest("compiler/testData/codegen/boxInline/invokedynamic/sam/inlineFunInDifferentPackage.kt"); + } + + @Test + @TestMetadata("inlineLambda1.kt") + public void testInlineLambda1() throws Exception { + runTest("compiler/testData/codegen/boxInline/invokedynamic/sam/inlineLambda1.kt"); + } + } + } + + @Nested + @TestMetadata("compiler/testData/codegen/boxInline/jvmName") + @TestDataPath("$PROJECT_ROOT") + public class JvmName { + @Test public void testAllFilesPresentInJvmName() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/jvmName"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("simple.kt") public void testSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/jvmName/simple.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/jvmPackageName") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class JvmPackageName extends AbstractIrBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - + public class JvmPackageName { + @Test public void testAllFilesPresentInJvmPackageName() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/jvmPackageName"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("simple.kt") public void testSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/jvmPackageName/simple.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/lambdaClassClash") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class LambdaClassClash extends AbstractIrBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - + public class LambdaClassClash { + @Test public void testAllFilesPresentInLambdaClassClash() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/lambdaClassClash"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("lambdaClassClash.kt") public void testLambdaClassClash() throws Exception { runTest("compiler/testData/codegen/boxInline/lambdaClassClash/lambdaClassClash.kt"); } + @Test @TestMetadata("noInlineLambdaX2.kt") public void testNoInlineLambdaX2() throws Exception { runTest("compiler/testData/codegen/boxInline/lambdaClassClash/noInlineLambdaX2.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/lambdaTransformation") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class LambdaTransformation extends AbstractIrBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - + public class LambdaTransformation { + @Test public void testAllFilesPresentInLambdaTransformation() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/lambdaTransformation"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("lambdaCloning.kt") public void testLambdaCloning() throws Exception { runTest("compiler/testData/codegen/boxInline/lambdaTransformation/lambdaCloning.kt"); } + @Test @TestMetadata("lambdaInLambda2.kt") public void testLambdaInLambda2() throws Exception { runTest("compiler/testData/codegen/boxInline/lambdaTransformation/lambdaInLambda2.kt"); } + @Test @TestMetadata("lambdaInLambdaNoInline.kt") public void testLambdaInLambdaNoInline() throws Exception { runTest("compiler/testData/codegen/boxInline/lambdaTransformation/lambdaInLambdaNoInline.kt"); } + @Test @TestMetadata("regeneratedLambdaName.kt") public void testRegeneratedLambdaName() throws Exception { runTest("compiler/testData/codegen/boxInline/lambdaTransformation/regeneratedLambdaName.kt"); } + @Test @TestMetadata("regeneratedLambdaName2.kt") public void testRegeneratedLambdaName2() throws Exception { runTest("compiler/testData/codegen/boxInline/lambdaTransformation/regeneratedLambdaName2.kt"); } + @Test @TestMetadata("sameCaptured.kt") public void testSameCaptured() throws Exception { runTest("compiler/testData/codegen/boxInline/lambdaTransformation/sameCaptured.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/localFunInLambda") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class LocalFunInLambda extends AbstractIrBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - + public class LocalFunInLambda { + @Test public void testAllFilesPresentInLocalFunInLambda() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/localFunInLambda"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("defaultParam.kt") public void testDefaultParam() throws Exception { runTest("compiler/testData/codegen/boxInline/localFunInLambda/defaultParam.kt"); } + @Test @TestMetadata("lambdaInLambdaCapturesAnotherFun.kt") public void testLambdaInLambdaCapturesAnotherFun() throws Exception { runTest("compiler/testData/codegen/boxInline/localFunInLambda/lambdaInLambdaCapturesAnotherFun.kt"); } + @Test @TestMetadata("localFunInLambda.kt") public void testLocalFunInLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/localFunInLambda/localFunInLambda.kt"); } + @Test @TestMetadata("localFunInLambdaCapturesAnotherFun.kt") public void testLocalFunInLambdaCapturesAnotherFun() throws Exception { runTest("compiler/testData/codegen/boxInline/localFunInLambda/localFunInLambdaCapturesAnotherFun.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/multiModule") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class MultiModule extends AbstractIrBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - + public class MultiModule { + @Test public void testAllFilesPresentInMultiModule() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/multiModule"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("tryCatchWithRecursiveInline.kt") public void testTryCatchWithRecursiveInline() throws Exception { runTest("compiler/testData/codegen/boxInline/multiModule/tryCatchWithRecursiveInline.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/multifileClasses") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class MultifileClasses extends AbstractIrBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - + public class MultifileClasses { + @Test public void testAllFilesPresentInMultifileClasses() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/multifileClasses"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("defaultArguments.kt") public void testDefaultArguments() throws Exception { runTest("compiler/testData/codegen/boxInline/multifileClasses/defaultArguments.kt"); } + @Test @TestMetadata("inlineFromOptimizedMultifileClass.kt") public void testInlineFromOptimizedMultifileClass() throws Exception { runTest("compiler/testData/codegen/boxInline/multifileClasses/inlineFromOptimizedMultifileClass.kt"); } + @Test @TestMetadata("inlineFromOtherPackage.kt") public void testInlineFromOtherPackage() throws Exception { runTest("compiler/testData/codegen/boxInline/multifileClasses/inlineFromOtherPackage.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/multiplatform") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Multiplatform extends AbstractIrBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - + public class Multiplatform { + @Test public void testAllFilesPresentInMultiplatform() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/multiplatform"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/multiplatform/defaultArguments") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class DefaultArguments extends AbstractIrBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - + public class DefaultArguments { + @Test public void testAllFilesPresentInDefaultArguments() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/multiplatform/defaultArguments"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("receiversAndParametersInLambda.kt") public void testReceiversAndParametersInLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/multiplatform/defaultArguments/receiversAndParametersInLambda.kt"); @@ -2355,535 +2687,640 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/noInline") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class NoInline extends AbstractIrBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - + public class NoInline { + @Test public void testAllFilesPresentInNoInline() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/noInline"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("extensionReceiver.kt") public void testExtensionReceiver() throws Exception { runTest("compiler/testData/codegen/boxInline/noInline/extensionReceiver.kt"); } + @Test @TestMetadata("lambdaAsGeneric.kt") public void testLambdaAsGeneric() throws Exception { runTest("compiler/testData/codegen/boxInline/noInline/lambdaAsGeneric.kt"); } + @Test @TestMetadata("lambdaAsNonFunction.kt") public void testLambdaAsNonFunction() throws Exception { runTest("compiler/testData/codegen/boxInline/noInline/lambdaAsNonFunction.kt"); } + @Test @TestMetadata("noInline.kt") public void testNoInline() throws Exception { runTest("compiler/testData/codegen/boxInline/noInline/noInline.kt"); } + @Test @TestMetadata("noInlineLambdaChain.kt") public void testNoInlineLambdaChain() throws Exception { runTest("compiler/testData/codegen/boxInline/noInline/noInlineLambdaChain.kt"); } + @Test @TestMetadata("noInlineLambdaChainWithCapturedInline.kt") public void testNoInlineLambdaChainWithCapturedInline() throws Exception { runTest("compiler/testData/codegen/boxInline/noInline/noInlineLambdaChainWithCapturedInline.kt"); } + @Test @TestMetadata("withoutInline.kt") public void testWithoutInline() throws Exception { runTest("compiler/testData/codegen/boxInline/noInline/withoutInline.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/nonLocalReturns") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class NonLocalReturns extends AbstractIrBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - + public class NonLocalReturns { + @Test public void testAllFilesPresentInNonLocalReturns() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("explicitLocalReturn.kt") public void testExplicitLocalReturn() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/explicitLocalReturn.kt"); } + @Test + @TestMetadata("fromArrayGenerator.kt") + public void testFromArrayGenerator() throws Exception { + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/fromArrayGenerator.kt"); + } + + @Test + @TestMetadata("fromArrayGeneratorCatch.kt") + public void testFromArrayGeneratorCatch() throws Exception { + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/fromArrayGeneratorCatch.kt"); + } + + @Test + @TestMetadata("fromArrayGeneratorNested.kt") + public void testFromArrayGeneratorNested() throws Exception { + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/fromArrayGeneratorNested.kt"); + } + + @Test + @TestMetadata("fromArrayGeneratorWithCapture.kt") + public void testFromArrayGeneratorWithCapture() throws Exception { + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/fromArrayGeneratorWithCapture.kt"); + } + + @Test + @TestMetadata("fromArrayGeneratorWithCatch.kt") + public void testFromArrayGeneratorWithCatch() throws Exception { + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/fromArrayGeneratorWithCatch.kt"); + } + + @Test + @TestMetadata("fromArrayGeneratorWithFinally.kt") + public void testFromArrayGeneratorWithFinally() throws Exception { + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/fromArrayGeneratorWithFinally.kt"); + } + + @Test + @TestMetadata("fromArrayGeneratorWithFinallyX2.kt") + public void testFromArrayGeneratorWithFinallyX2() throws Exception { + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/fromArrayGeneratorWithFinallyX2.kt"); + } + + @Test + @TestMetadata("fromArrayGeneratorWithFinallyX2_2.kt") + public void testFromArrayGeneratorWithFinallyX2_2() throws Exception { + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/fromArrayGeneratorWithFinallyX2_2.kt"); + } + + @Test @TestMetadata("fromInterfaceDefaultGetter.kt") public void testFromInterfaceDefaultGetter() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/fromInterfaceDefaultGetter.kt"); } + @Test @TestMetadata("justReturnInLambda.kt") public void testJustReturnInLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/justReturnInLambda.kt"); } + @Test @TestMetadata("kt5199.kt") public void testKt5199() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/kt5199.kt"); } + @Test @TestMetadata("kt8948.kt") public void testKt8948() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/kt8948.kt"); } + @Test @TestMetadata("kt8948v2.kt") public void testKt8948v2() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/kt8948v2.kt"); } + @Test @TestMetadata("nestedNonLocals.kt") public void testNestedNonLocals() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/nestedNonLocals.kt"); } + @Test @TestMetadata("noInlineLocalReturn.kt") public void testNoInlineLocalReturn() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/noInlineLocalReturn.kt"); } + @Test @TestMetadata("nonLocalReturnFromOuterLambda.kt") public void testNonLocalReturnFromOuterLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/nonLocalReturnFromOuterLambda.kt"); } + @Test @TestMetadata("propertyAccessors.kt") public void testPropertyAccessors() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/propertyAccessors.kt"); } + @Test @TestMetadata("returnFromFunctionExpr.kt") public void testReturnFromFunctionExpr() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/returnFromFunctionExpr.kt"); } + @Test @TestMetadata("simple.kt") public void testSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/simple.kt"); } + @Test @TestMetadata("simpleFunctional.kt") public void testSimpleFunctional() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/simpleFunctional.kt"); } + @Test @TestMetadata("simpleVoid.kt") public void testSimpleVoid() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/simpleVoid.kt"); } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/deparenthesize") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Deparenthesize extends AbstractIrBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - + public class Deparenthesize { + @Test public void testAllFilesPresentInDeparenthesize() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/deparenthesize"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("bracket.kt") public void testBracket() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/deparenthesize/bracket.kt"); } + @Test @TestMetadata("labeled.kt") public void testLabeled() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/deparenthesize/labeled.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class TryFinally extends AbstractIrBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - + public class TryFinally { + @Test public void testAllFilesPresentInTryFinally() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("kt16417.kt") public void testKt16417() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt16417.kt"); } + @Test @TestMetadata("kt20433.kt") public void testKt20433() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt20433.kt"); } + @Test @TestMetadata("kt20433_2.kt") public void testKt20433_2() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt20433_2.kt"); } + @Test @TestMetadata("kt20433_2_void.kt") public void testKt20433_2_void() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt20433_2_void.kt"); } + @Test @TestMetadata("kt20433_void.kt") public void testKt20433_void() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt20433_void.kt"); } + @Test @TestMetadata("kt26384.kt") public void testKt26384() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt26384.kt"); } + @Test @TestMetadata("kt26384_2.kt") public void testKt26384_2() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt26384_2.kt"); } + @Test @TestMetadata("kt28546.kt") public void testKt28546() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt28546.kt"); } + @Test @TestMetadata("kt6956.kt") public void testKt6956() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt6956.kt"); } + @Test @TestMetadata("kt7273.kt") public void testKt7273() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt7273.kt"); } + @Test @TestMetadata("nonLocalReturnFromCatchBlock.kt") public void testNonLocalReturnFromCatchBlock() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/nonLocalReturnFromCatchBlock.kt"); } + @Test @TestMetadata("nonLocalReturnFromOuterLambda.kt") public void testNonLocalReturnFromOuterLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/nonLocalReturnFromOuterLambda.kt"); } + @Test @TestMetadata("nonLocalReturnToCatchBlock.kt") public void testNonLocalReturnToCatchBlock() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/nonLocalReturnToCatchBlock.kt"); } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class CallSite extends AbstractIrBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - + public class CallSite { + @Test public void testAllFilesPresentInCallSite() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("callSite.kt") public void testCallSite() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/callSite.kt"); } + @Test @TestMetadata("callSiteComplex.kt") public void testCallSiteComplex() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/callSiteComplex.kt"); } + @Test @TestMetadata("exceptionTableSplit.kt") public void testExceptionTableSplit() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/exceptionTableSplit.kt"); } + @Test @TestMetadata("exceptionTableSplitNoReturn.kt") public void testExceptionTableSplitNoReturn() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/exceptionTableSplitNoReturn.kt"); } + @Test @TestMetadata("finallyInFinally.kt") public void testFinallyInFinally() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/finallyInFinally.kt"); } + @Test @TestMetadata("wrongVarInterval.kt") public void testWrongVarInterval() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/wrongVarInterval.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Chained extends AbstractIrBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - + public class Chained { + @Test public void testAllFilesPresentInChained() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("finallyInFinally.kt") public void testFinallyInFinally() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/finallyInFinally.kt"); } + @Test @TestMetadata("finallyInFinally2.kt") public void testFinallyInFinally2() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/finallyInFinally2.kt"); } + @Test @TestMetadata("intReturn.kt") public void testIntReturn() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturn.kt"); } + @Test @TestMetadata("intReturnComplex.kt") public void testIntReturnComplex() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex.kt"); } + @Test @TestMetadata("intReturnComplex2.kt") public void testIntReturnComplex2() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex2.kt"); } + @Test @TestMetadata("intReturnComplex3.kt") public void testIntReturnComplex3() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex3.kt"); } + @Test @TestMetadata("intReturnComplex4.kt") public void testIntReturnComplex4() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex4.kt"); } + @Test @TestMetadata("nestedLambda.kt") public void testNestedLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/nestedLambda.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class DeclSite extends AbstractIrBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - + public class DeclSite { + @Test public void testAllFilesPresentInDeclSite() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("complex.kt") public void testComplex() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/complex.kt"); } + @Test @TestMetadata("intReturn.kt") public void testIntReturn() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/intReturn.kt"); } + @Test @TestMetadata("intReturnComplex.kt") public void testIntReturnComplex() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/intReturnComplex.kt"); } + @Test @TestMetadata("longReturn.kt") public void testLongReturn() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/longReturn.kt"); } + @Test @TestMetadata("nested.kt") public void testNested() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/nested.kt"); } + @Test @TestMetadata("returnInFinally.kt") public void testReturnInFinally() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/returnInFinally.kt"); } + @Test @TestMetadata("returnInTry.kt") public void testReturnInTry() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/returnInTry.kt"); } + @Test @TestMetadata("returnInTryAndFinally.kt") public void testReturnInTryAndFinally() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/returnInTryAndFinally.kt"); } + @Test @TestMetadata("severalInTry.kt") public void testSeveralInTry() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/severalInTry.kt"); } + @Test @TestMetadata("severalInTryComplex.kt") public void testSeveralInTryComplex() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/severalInTryComplex.kt"); } + @Test @TestMetadata("voidInlineFun.kt") public void testVoidInlineFun() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/voidInlineFun.kt"); } + @Test @TestMetadata("voidNonLocal.kt") public void testVoidNonLocal() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/voidNonLocal.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class ExceptionTable extends AbstractIrBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - + public class ExceptionTable { + @Test public void testAllFilesPresentInExceptionTable() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("break.kt") public void testBreak() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/break.kt"); } + @Test @TestMetadata("continue.kt") public void testContinue() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/continue.kt"); } + @Test @TestMetadata("exceptionInFinally.kt") public void testExceptionInFinally() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/exceptionInFinally.kt"); } + @Test @TestMetadata("forInFinally.kt") public void testForInFinally() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/forInFinally.kt"); } + @Test @TestMetadata("innerAndExternal.kt") public void testInnerAndExternal() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/innerAndExternal.kt"); } + @Test @TestMetadata("innerAndExternalNested.kt") public void testInnerAndExternalNested() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/innerAndExternalNested.kt"); } + @Test @TestMetadata("innerAndExternalSimple.kt") public void testInnerAndExternalSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/innerAndExternalSimple.kt"); } + @Test @TestMetadata("kt31653.kt") public void testKt31653() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/kt31653.kt"); } + @Test @TestMetadata("kt31653_2.kt") public void testKt31653_2() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/kt31653_2.kt"); } + @Test @TestMetadata("kt31923.kt") public void testKt31923() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/kt31923.kt"); } + @Test @TestMetadata("kt31923_2.kt") public void testKt31923_2() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/kt31923_2.kt"); } + @Test @TestMetadata("kt31923_wrong.kt") public void testKt31923_wrong() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/kt31923_wrong.kt"); } + @Test @TestMetadata("nested.kt") public void testNested() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/nested.kt"); } + @Test @TestMetadata("nestedWithReturns.kt") public void testNestedWithReturns() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/nestedWithReturns.kt"); } + @Test @TestMetadata("nestedWithReturnsSimple.kt") public void testNestedWithReturnsSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/nestedWithReturnsSimple.kt"); } + @Test @TestMetadata("noFinally.kt") public void testNoFinally() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/noFinally.kt"); } + @Test @TestMetadata("severalCatchClause.kt") public void testSeveralCatchClause() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/severalCatchClause.kt"); } + @Test @TestMetadata("simpleThrow.kt") public void testSimpleThrow() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/simpleThrow.kt"); } + @Test @TestMetadata("synchonized.kt") public void testSynchonized() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/synchonized.kt"); } + @Test @TestMetadata("throwInFinally.kt") public void testThrowInFinally() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/throwInFinally.kt"); } + @Test @TestMetadata("tryCatchInFinally.kt") public void testTryCatchInFinally() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/tryCatchInFinally.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/variables") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Variables extends AbstractIrBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - + public class Variables { + @Test public void testAllFilesPresentInVariables() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/variables"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("kt7792.kt") public void testKt7792() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/variables/kt7792.kt"); @@ -2892,430 +3329,501 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/optimizations") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Optimizations extends AbstractIrBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - + public class Optimizations { + @Test public void testAllFilesPresentInOptimizations() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/optimizations"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("kt20844.kt") public void testKt20844() throws Exception { runTest("compiler/testData/codegen/boxInline/optimizations/kt20844.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/private") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Private extends AbstractIrBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - + public class Private { + @Test @TestMetadata("accessorForConst.kt") public void testAccessorForConst() throws Exception { runTest("compiler/testData/codegen/boxInline/private/accessorForConst.kt"); } + @Test @TestMetadata("accessorStability.kt") public void testAccessorStability() throws Exception { runTest("compiler/testData/codegen/boxInline/private/accessorStability.kt"); } + @Test @TestMetadata("accessorStabilityInClass.kt") public void testAccessorStabilityInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/private/accessorStabilityInClass.kt"); } + @Test public void testAllFilesPresentInPrivate() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/private"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("effectivePrivate.kt") public void testEffectivePrivate() throws Exception { runTest("compiler/testData/codegen/boxInline/private/effectivePrivate.kt"); } + @Test @TestMetadata("kt6453.kt") public void testKt6453() throws Exception { runTest("compiler/testData/codegen/boxInline/private/kt6453.kt"); } + @Test @TestMetadata("kt8094.kt") public void testKt8094() throws Exception { runTest("compiler/testData/codegen/boxInline/private/kt8094.kt"); } + @Test @TestMetadata("kt8095.kt") public void testKt8095() throws Exception { runTest("compiler/testData/codegen/boxInline/private/kt8095.kt"); } + @Test @TestMetadata("nestedInPrivateClass.kt") public void testNestedInPrivateClass() throws Exception { runTest("compiler/testData/codegen/boxInline/private/nestedInPrivateClass.kt"); } + @Test @TestMetadata("privateClass.kt") public void testPrivateClass() throws Exception { runTest("compiler/testData/codegen/boxInline/private/privateClass.kt"); } + @Test @TestMetadata("privateClassExtensionLambda.kt") public void testPrivateClassExtensionLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/private/privateClassExtensionLambda.kt"); } + @Test @TestMetadata("privateInInlineInMultiFileFacade.kt") public void testPrivateInInlineInMultiFileFacade() throws Exception { runTest("compiler/testData/codegen/boxInline/private/privateInInlineInMultiFileFacade.kt"); } + @Test @TestMetadata("privateInline.kt") public void testPrivateInline() throws Exception { runTest("compiler/testData/codegen/boxInline/private/privateInline.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/property") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Property extends AbstractIrBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - + public class Property { + @Test public void testAllFilesPresentInProperty() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/property"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("augAssignmentAndInc.kt") public void testAugAssignmentAndInc() throws Exception { runTest("compiler/testData/codegen/boxInline/property/augAssignmentAndInc.kt"); } + @Test @TestMetadata("augAssignmentAndIncInClass.kt") public void testAugAssignmentAndIncInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/property/augAssignmentAndIncInClass.kt"); } + @Test @TestMetadata("augAssignmentAndIncInClassViaConvention.kt") public void testAugAssignmentAndIncInClassViaConvention() throws Exception { runTest("compiler/testData/codegen/boxInline/property/augAssignmentAndIncInClassViaConvention.kt"); } + @Test @TestMetadata("augAssignmentAndIncOnExtension.kt") public void testAugAssignmentAndIncOnExtension() throws Exception { runTest("compiler/testData/codegen/boxInline/property/augAssignmentAndIncOnExtension.kt"); } + @Test @TestMetadata("augAssignmentAndIncOnExtensionInClass.kt") public void testAugAssignmentAndIncOnExtensionInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/property/augAssignmentAndIncOnExtensionInClass.kt"); } + @Test @TestMetadata("augAssignmentAndIncViaConvention.kt") public void testAugAssignmentAndIncViaConvention() throws Exception { runTest("compiler/testData/codegen/boxInline/property/augAssignmentAndIncViaConvention.kt"); } + @Test @TestMetadata("fromObject.kt") public void testFromObject() throws Exception { runTest("compiler/testData/codegen/boxInline/property/fromObject.kt"); } + @Test @TestMetadata("kt22649.kt") public void testKt22649() throws Exception { runTest("compiler/testData/codegen/boxInline/property/kt22649.kt"); } + @Test @TestMetadata("property.kt") public void testProperty() throws Exception { runTest("compiler/testData/codegen/boxInline/property/property.kt"); } + @Test @TestMetadata("reifiedVal.kt") public void testReifiedVal() throws Exception { runTest("compiler/testData/codegen/boxInline/property/reifiedVal.kt"); } + @Test @TestMetadata("reifiedVar.kt") public void testReifiedVar() throws Exception { runTest("compiler/testData/codegen/boxInline/property/reifiedVar.kt"); } + @Test @TestMetadata("simple.kt") public void testSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/property/simple.kt"); } + @Test @TestMetadata("simpleExtension.kt") public void testSimpleExtension() throws Exception { runTest("compiler/testData/codegen/boxInline/property/simpleExtension.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/reified") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Reified extends AbstractIrBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - + public class Reified { + @Test public void testAllFilesPresentInReified() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/reified"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("arrayConstructor.kt") public void testArrayConstructor() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/arrayConstructor.kt"); } + @Test @TestMetadata("arrayOf.kt") public void testArrayOf() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/arrayOf.kt"); } + @Test @TestMetadata("capturedLambda.kt") public void testCapturedLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/capturedLambda.kt"); } + @Test @TestMetadata("capturedLambda2.kt") public void testCapturedLambda2() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/capturedLambda2.kt"); } + @Test @TestMetadata("dontSubstituteNonReified.kt") public void testDontSubstituteNonReified() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/dontSubstituteNonReified.kt"); } + @Test @TestMetadata("kt11081.kt") public void testKt11081() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/kt11081.kt"); } + @Test @TestMetadata("kt11677.kt") public void testKt11677() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/kt11677.kt"); } + @Test @TestMetadata("kt15956.kt") public void testKt15956() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/kt15956.kt"); } + @Test @TestMetadata("kt15997.kt") public void testKt15997() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/kt15997.kt"); } + @Test @TestMetadata("kt15997_2.kt") public void testKt15997_2() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/kt15997_2.kt"); } + @Test @TestMetadata("kt18977.kt") public void testKt18977() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/kt18977.kt"); } + @Test + @TestMetadata("kt35511.kt") + public void testKt35511() throws Exception { + runTest("compiler/testData/codegen/boxInline/reified/kt35511.kt"); + } + + @Test + @TestMetadata("kt35511_try.kt") + public void testKt35511_try() throws Exception { + runTest("compiler/testData/codegen/boxInline/reified/kt35511_try.kt"); + } + + @Test + @TestMetadata("kt35511_try_valueOf.kt") + public void testKt35511_try_valueOf() throws Exception { + runTest("compiler/testData/codegen/boxInline/reified/kt35511_try_valueOf.kt"); + } + + @Test + @TestMetadata("kt35511_try_values.kt") + public void testKt35511_try_values() throws Exception { + runTest("compiler/testData/codegen/boxInline/reified/kt35511_try_values.kt"); + } + + @Test @TestMetadata("kt6988.kt") public void testKt6988() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/kt6988.kt"); } + @Test @TestMetadata("kt6988_2.kt") public void testKt6988_2() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/kt6988_2.kt"); } + @Test @TestMetadata("kt6990.kt") public void testKt6990() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/kt6990.kt"); } + @Test @TestMetadata("kt7017.kt") public void testKt7017() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/kt7017.kt"); } + @Test @TestMetadata("kt8047.kt") public void testKt8047() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/kt8047.kt"); } + @Test @TestMetadata("kt8047_2.kt") public void testKt8047_2() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/kt8047_2.kt"); } + @Test @TestMetadata("kt9637.kt") public void testKt9637() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/kt9637.kt"); } + @Test @TestMetadata("kt9637_2.kt") public void testKt9637_2() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/kt9637_2.kt"); } + @Test @TestMetadata("nonCapturingObjectInLambda.kt") public void testNonCapturingObjectInLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/nonCapturingObjectInLambda.kt"); } + @Test @TestMetadata("packages.kt") public void testPackages() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/packages.kt"); } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/reified/checkCast") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class CheckCast extends AbstractIrBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - + public class CheckCast { + @Test public void testAllFilesPresentInCheckCast() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/reified/checkCast"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("chain.kt") public void testChain() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/checkCast/chain.kt"); } + @Test @TestMetadata("kt26435.kt") public void testKt26435() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/checkCast/kt26435.kt"); } + @Test @TestMetadata("kt26435_2.kt") public void testKt26435_2() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/checkCast/kt26435_2.kt"); } + @Test @TestMetadata("kt26435_3.kt") public void testKt26435_3() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/checkCast/kt26435_3.kt"); } + @Test @TestMetadata("kt8043.kt") public void testKt8043() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/checkCast/kt8043.kt"); } + @Test @TestMetadata("maxStack.kt") public void testMaxStack() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/checkCast/maxStack.kt"); } + @Test @TestMetadata("nullable.kt") public void testNullable() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/checkCast/nullable.kt"); } + @Test @TestMetadata("simple.kt") public void testSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/checkCast/simple.kt"); } + @Test @TestMetadata("simpleSafe.kt") public void testSimpleSafe() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/checkCast/simpleSafe.kt"); } + @Test @TestMetadata("simple_1_3.kt") public void testSimple_1_3() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/checkCast/simple_1_3.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/reified/defaultLambda") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class DefaultLambda extends AbstractIrBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - + public class DefaultLambda { + @Test public void testAllFilesPresentInDefaultLambda() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/reified/defaultLambda"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("chain.kt") public void testChain() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/defaultLambda/chain.kt"); } + @Test @TestMetadata("nested.kt") public void testNested() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/defaultLambda/nested.kt"); } + @Test @TestMetadata("nested2.kt") public void testNested2() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/defaultLambda/nested2.kt"); } + @Test @TestMetadata("nested2Static.kt") public void testNested2Static() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/defaultLambda/nested2Static.kt"); } + @Test @TestMetadata("nestedStatic.kt") public void testNestedStatic() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/defaultLambda/nestedStatic.kt"); } + @Test @TestMetadata("simple.kt") public void testSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/defaultLambda/simple.kt"); } + @Test @TestMetadata("transitiveChain.kt") public void testTransitiveChain() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/defaultLambda/transitiveChain.kt"); } + @Test @TestMetadata("transitiveChainStatic.kt") public void testTransitiveChainStatic() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/defaultLambda/transitiveChainStatic.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/reified/isCheck") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class IsCheck extends AbstractIrBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - + public class IsCheck { + @Test public void testAllFilesPresentInIsCheck() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/reified/isCheck"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("chain.kt") public void testChain() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/isCheck/chain.kt"); } + @Test @TestMetadata("nullable.kt") public void testNullable() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/isCheck/nullable.kt"); } + @Test @TestMetadata("simple.kt") public void testSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/isCheck/simple.kt"); @@ -3323,518 +3831,577 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/signature") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Signature extends AbstractIrBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - + public class Signature { + @Test public void testAllFilesPresentInSignature() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/signature"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("inProjectionSubstitution.kt") public void testInProjectionSubstitution() throws Exception { runTest("compiler/testData/codegen/boxInline/signature/inProjectionSubstitution.kt"); } + @Test @TestMetadata("outProjectionSubstitution.kt") public void testOutProjectionSubstitution() throws Exception { runTest("compiler/testData/codegen/boxInline/signature/outProjectionSubstitution.kt"); } + @Test @TestMetadata("recursion.kt") public void testRecursion() throws Exception { runTest("compiler/testData/codegen/boxInline/signature/recursion.kt"); } + @Test @TestMetadata("sameFormalParameterName.kt") public void testSameFormalParameterName() throws Exception { runTest("compiler/testData/codegen/boxInline/signature/sameFormalParameterName.kt"); } + @Test @TestMetadata("sameReifiedFormalParameterName.kt") public void testSameReifiedFormalParameterName() throws Exception { runTest("compiler/testData/codegen/boxInline/signature/sameReifiedFormalParameterName.kt"); } + @Test @TestMetadata("starProjectionSubstitution.kt") public void testStarProjectionSubstitution() throws Exception { runTest("compiler/testData/codegen/boxInline/signature/starProjectionSubstitution.kt"); } + @Test @TestMetadata("typeParameterInLambda.kt") public void testTypeParameterInLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/signature/typeParameterInLambda.kt"); } + @Test @TestMetadata("typeParametersSubstitution.kt") public void testTypeParametersSubstitution() throws Exception { runTest("compiler/testData/codegen/boxInline/signature/typeParametersSubstitution.kt"); } + @Test @TestMetadata("typeParametersSubstitution2.kt") public void testTypeParametersSubstitution2() throws Exception { runTest("compiler/testData/codegen/boxInline/signature/typeParametersSubstitution2.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/simple") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Simple extends AbstractIrBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - + public class Simple { + @Test public void testAllFilesPresentInSimple() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/simple"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("captureAndArgumentIncompatibleTypes.kt") public void testCaptureAndArgumentIncompatibleTypes() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/captureAndArgumentIncompatibleTypes.kt"); } + @Test @TestMetadata("classObject.kt") public void testClassObject() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/classObject.kt"); } + @Test @TestMetadata("destructuring.kt") public void testDestructuring() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/destructuring.kt"); } + @Test @TestMetadata("destructuringIndexClash.kt") public void testDestructuringIndexClash() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/destructuringIndexClash.kt"); } + @Test @TestMetadata("extension.kt") public void testExtension() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/extension.kt"); } + @Test @TestMetadata("extensionLambda.kt") public void testExtensionLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/extensionLambda.kt"); } + @Test @TestMetadata("funImportedFromObject.kt") public void testFunImportedFromObject() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/funImportedFromObject.kt"); } + @Test @TestMetadata("inlineCallInInlineLambda.kt") public void testInlineCallInInlineLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/inlineCallInInlineLambda.kt"); } + @Test @TestMetadata("kt17431.kt") public void testKt17431() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/kt17431.kt"); } + @Test @TestMetadata("kt28547.kt") public void testKt28547() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/kt28547.kt"); } + @Test @TestMetadata("kt28547_2.kt") public void testKt28547_2() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/kt28547_2.kt"); } + @Test @TestMetadata("params.kt") public void testParams() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/params.kt"); } + @Test @TestMetadata("propImportedFromObject.kt") public void testPropImportedFromObject() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/propImportedFromObject.kt"); } + @Test @TestMetadata("rootConstructor.kt") public void testRootConstructor() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/rootConstructor.kt"); } + @Test @TestMetadata("safeCall.kt") public void testSafeCall() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/safeCall.kt"); } + @Test @TestMetadata("severalClosures.kt") public void testSeveralClosures() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/severalClosures.kt"); } + @Test @TestMetadata("severalUsage.kt") public void testSeveralUsage() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/severalUsage.kt"); } + @Test @TestMetadata("simpleDouble.kt") public void testSimpleDouble() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/simpleDouble.kt"); } + @Test @TestMetadata("simpleEnum.kt") public void testSimpleEnum() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/simpleEnum.kt"); } + @Test @TestMetadata("simpleGenerics.kt") public void testSimpleGenerics() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/simpleGenerics.kt"); } + @Test @TestMetadata("simpleInt.kt") public void testSimpleInt() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/simpleInt.kt"); } + @Test @TestMetadata("simpleLambda.kt") public void testSimpleLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/simpleLambda.kt"); } + @Test @TestMetadata("simpleObject.kt") public void testSimpleObject() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/simpleObject.kt"); } + @Test @TestMetadata("vararg.kt") public void testVararg() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/vararg.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/smap") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Smap extends AbstractIrBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - + public class Smap { + @Test public void testAllFilesPresentInSmap() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/smap"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("assertion.kt") public void testAssertion() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/assertion.kt"); } + @Test @TestMetadata("classCycle.kt") public void testClassCycle() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/classCycle.kt"); } + @Test @TestMetadata("classFromDefaultPackage.kt") public void testClassFromDefaultPackage() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/classFromDefaultPackage.kt"); } + @Test @TestMetadata("crossroutines.kt") public void testCrossroutines() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/crossroutines.kt"); } + @Test @TestMetadata("defaultFunction.kt") public void testDefaultFunction() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/defaultFunction.kt"); } + @Test @TestMetadata("defaultFunctionWithInlineCall.kt") public void testDefaultFunctionWithInlineCall() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/defaultFunctionWithInlineCall.kt"); } + @Test @TestMetadata("forInline.kt") public void testForInline() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/forInline.kt"); } + @Test @TestMetadata("interleavedFiles.kt") public void testInterleavedFiles() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/interleavedFiles.kt"); } + @Test @TestMetadata("kt23369.kt") public void testKt23369() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/kt23369.kt"); } + @Test @TestMetadata("kt23369_2.kt") public void testKt23369_2() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/kt23369_2.kt"); } + @Test @TestMetadata("kt23369_3.kt") public void testKt23369_3() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/kt23369_3.kt"); } + @Test @TestMetadata("kt35006.kt") public void testKt35006() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/kt35006.kt"); } + @Test @TestMetadata("multiFileFacade.kt") public void testMultiFileFacade() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/multiFileFacade.kt"); } + @Test @TestMetadata("oneFile.kt") public void testOneFile() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/oneFile.kt"); } + @Test @TestMetadata("rangeFolding.kt") public void testRangeFolding() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/rangeFolding.kt"); } + @Test @TestMetadata("rangeFoldingInClass.kt") public void testRangeFoldingInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/rangeFoldingInClass.kt"); } + @Test @TestMetadata("smap.kt") public void testSmap() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/smap.kt"); } + @Test @TestMetadata("smapWithNewSyntax.kt") public void testSmapWithNewSyntax() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/smapWithNewSyntax.kt"); } + @Test @TestMetadata("smapWithOldSyntax.kt") public void testSmapWithOldSyntax() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/smapWithOldSyntax.kt"); } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/smap/anonymous") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Anonymous extends AbstractIrBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - + public class Anonymous { + @Test public void testAllFilesPresentInAnonymous() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/smap/anonymous"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("kt19175.kt") public void testKt19175() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/anonymous/kt19175.kt"); } + @Test @TestMetadata("lambda.kt") public void testLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/anonymous/lambda.kt"); } + @Test @TestMetadata("lambdaOnCallSite.kt") public void testLambdaOnCallSite() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/anonymous/lambdaOnCallSite.kt"); } + @Test @TestMetadata("lambdaOnInlineCallSite.kt") public void testLambdaOnInlineCallSite() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/anonymous/lambdaOnInlineCallSite.kt"); } + @Test @TestMetadata("object.kt") public void testObject() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/anonymous/object.kt"); } + @Test @TestMetadata("objectOnCallSite.kt") public void testObjectOnCallSite() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/anonymous/objectOnCallSite.kt"); } + @Test @TestMetadata("objectOnInlineCallSite.kt") public void testObjectOnInlineCallSite() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/anonymous/objectOnInlineCallSite.kt"); } + @Test @TestMetadata("objectOnInlineCallSite2.kt") public void testObjectOnInlineCallSite2() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/anonymous/objectOnInlineCallSite2.kt"); } + @Test @TestMetadata("objectOnInlineCallSiteWithCapture.kt") public void testObjectOnInlineCallSiteWithCapture() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/anonymous/objectOnInlineCallSiteWithCapture.kt"); } + @Test @TestMetadata("severalMappingsForDefaultFile.kt") public void testSeveralMappingsForDefaultFile() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/anonymous/severalMappingsForDefaultFile.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/smap/defaultLambda") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class DefaultLambda extends AbstractIrBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - + public class DefaultLambda { + @Test public void testAllFilesPresentInDefaultLambda() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/smap/defaultLambda"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("defaultLambdaInAnonymous.kt") public void testDefaultLambdaInAnonymous() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/defaultLambda/defaultLambdaInAnonymous.kt"); } + @Test @TestMetadata("inlinInDefault.kt") public void testInlinInDefault() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/defaultLambda/inlinInDefault.kt"); } + @Test @TestMetadata("inlinInDefault2.kt") public void testInlinInDefault2() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/defaultLambda/inlinInDefault2.kt"); } + @Test @TestMetadata("inlineAnonymousInDefault.kt") public void testInlineAnonymousInDefault() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/defaultLambda/inlineAnonymousInDefault.kt"); } + @Test @TestMetadata("inlineAnonymousInDefault2.kt") public void testInlineAnonymousInDefault2() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/defaultLambda/inlineAnonymousInDefault2.kt"); } + @Test @TestMetadata("kt21827.kt") public void testKt21827() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/defaultLambda/kt21827.kt"); } + @Test @TestMetadata("nested.kt") public void testNested() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/defaultLambda/nested.kt"); } + @Test @TestMetadata("simple.kt") public void testSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/defaultLambda/simple.kt"); } + @Test @TestMetadata("simple2.kt") public void testSimple2() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/defaultLambda/simple2.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/smap/inlineOnly") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class InlineOnly extends AbstractIrBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - + public class InlineOnly { + @Test public void testAllFilesPresentInInlineOnly() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/smap/inlineOnly"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("noSmap.kt") public void testNoSmap() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/inlineOnly/noSmap.kt"); } + @Test @TestMetadata("noSmapWithProperty.kt") public void testNoSmapWithProperty() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/inlineOnly/noSmapWithProperty.kt"); } + @Test @TestMetadata("reified.kt") public void testReified() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/inlineOnly/reified.kt"); } + @Test @TestMetadata("reifiedProperty.kt") public void testReifiedProperty() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/inlineOnly/reifiedProperty.kt"); } + @Test @TestMetadata("stdlibInlineOnly.kt") public void testStdlibInlineOnly() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/inlineOnly/stdlibInlineOnly.kt"); } + @Test @TestMetadata("stdlibInlineOnlyOneLine.kt") public void testStdlibInlineOnlyOneLine() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/inlineOnly/stdlibInlineOnlyOneLine.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/smap/newsmap") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Newsmap extends AbstractIrBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - + public class Newsmap { + @Test public void testAllFilesPresentInNewsmap() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/smap/newsmap"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("differentMapping.kt") public void testDifferentMapping() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/newsmap/differentMapping.kt"); } + @Test @TestMetadata("mappingInInlineFunLambda.kt") public void testMappingInInlineFunLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/newsmap/mappingInInlineFunLambda.kt"); } + @Test @TestMetadata("mappingInSubInlineLambda.kt") public void testMappingInSubInlineLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/newsmap/mappingInSubInlineLambda.kt"); } + @Test @TestMetadata("mappingInSubInlineLambdaSameFileInline.kt") public void testMappingInSubInlineLambdaSameFileInline() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/newsmap/mappingInSubInlineLambdaSameFileInline.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/smap/resolve") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Resolve extends AbstractIrBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - + public class Resolve { + @Test public void testAllFilesPresentInResolve() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/smap/resolve"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("inlineComponent.kt") public void testInlineComponent() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/resolve/inlineComponent.kt"); } + @Test @TestMetadata("inlineIterator.kt") public void testInlineIterator() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/resolve/inlineIterator.kt"); @@ -3842,616 +4409,695 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/special") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Special extends AbstractIrBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - + public class Special { + @Test public void testAllFilesPresentInSpecial() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/special"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("identityCheck.kt") public void testIdentityCheck() throws Exception { runTest("compiler/testData/codegen/boxInline/special/identityCheck.kt"); } + @Test @TestMetadata("ifBranches.kt") public void testIfBranches() throws Exception { runTest("compiler/testData/codegen/boxInline/special/ifBranches.kt"); } + @Test @TestMetadata("iinc.kt") public void testIinc() throws Exception { runTest("compiler/testData/codegen/boxInline/special/iinc.kt"); } + @Test @TestMetadata("inlineChain.kt") public void testInlineChain() throws Exception { runTest("compiler/testData/codegen/boxInline/special/inlineChain.kt"); } + @Test @TestMetadata("loopInStoreLoadChains.kt") public void testLoopInStoreLoadChains() throws Exception { runTest("compiler/testData/codegen/boxInline/special/loopInStoreLoadChains.kt"); } + @Test @TestMetadata("loopInStoreLoadChains2.kt") public void testLoopInStoreLoadChains2() throws Exception { runTest("compiler/testData/codegen/boxInline/special/loopInStoreLoadChains2.kt"); } + @Test @TestMetadata("plusAssign.kt") public void testPlusAssign() throws Exception { runTest("compiler/testData/codegen/boxInline/special/plusAssign.kt"); } + @Test @TestMetadata("stackHeightBug.kt") public void testStackHeightBug() throws Exception { runTest("compiler/testData/codegen/boxInline/special/stackHeightBug.kt"); } + @Test @TestMetadata("unusedInlineLambda.kt") public void testUnusedInlineLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/special/unusedInlineLambda.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/stackOnReturn") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class StackOnReturn extends AbstractIrBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - + public class StackOnReturn { + @Test public void testAllFilesPresentInStackOnReturn() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/stackOnReturn"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("elvis.kt") public void testElvis() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/elvis.kt"); } + @Test @TestMetadata("ifThenElse.kt") public void testIfThenElse() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/ifThenElse.kt"); } + @Test @TestMetadata("kt11499.kt") public void testKt11499() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/kt11499.kt"); } + @Test @TestMetadata("kt17591.kt") public void testKt17591() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/kt17591.kt"); } + @Test @TestMetadata("kt17591a.kt") public void testKt17591a() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/kt17591a.kt"); } + @Test @TestMetadata("kt17591b.kt") public void testKt17591b() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/kt17591b.kt"); } + @Test @TestMetadata("mixedTypesOnStack1.kt") public void testMixedTypesOnStack1() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/mixedTypesOnStack1.kt"); } + @Test @TestMetadata("mixedTypesOnStack2.kt") public void testMixedTypesOnStack2() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/mixedTypesOnStack2.kt"); } + @Test @TestMetadata("mixedTypesOnStack3.kt") public void testMixedTypesOnStack3() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/mixedTypesOnStack3.kt"); } + @Test @TestMetadata("nonLocalReturn1.kt") public void testNonLocalReturn1() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/nonLocalReturn1.kt"); } + @Test @TestMetadata("nonLocalReturn2.kt") public void testNonLocalReturn2() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/nonLocalReturn2.kt"); } + @Test @TestMetadata("nonLocalReturn3.kt") public void testNonLocalReturn3() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/nonLocalReturn3.kt"); } + @Test @TestMetadata("poppedLocalReturn.kt") public void testPoppedLocalReturn() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/poppedLocalReturn.kt"); } + @Test @TestMetadata("poppedLocalReturn2.kt") public void testPoppedLocalReturn2() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/poppedLocalReturn2.kt"); } + @Test @TestMetadata("returnLong.kt") public void testReturnLong() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/returnLong.kt"); } + @Test @TestMetadata("tryFinally.kt") public void testTryFinally() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/tryFinally.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/suspend") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Suspend extends AbstractIrBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - + public class Suspend { + @Test public void testAllFilesPresentInSuspend() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("capturedVariables.kt") public void testCapturedVariables() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/capturedVariables.kt"); } + @Test @TestMetadata("crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt") public void testCrossinlineSuspendLambdaInsideCrossinlineSuspendLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt"); } + @Test @TestMetadata("debugMetadataCrossinline.kt") public void testDebugMetadataCrossinline() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/debugMetadataCrossinline.kt"); } + @Test @TestMetadata("delegatedProperties.kt") public void testDelegatedProperties() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/delegatedProperties.kt"); } + @Test @TestMetadata("doubleRegenerationWithNonSuspendingLambda.kt") public void testDoubleRegenerationWithNonSuspendingLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/doubleRegenerationWithNonSuspendingLambda.kt"); } + @Test @TestMetadata("enclodingMethod.kt") public void testEnclodingMethod() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/enclodingMethod.kt"); } + @Test @TestMetadata("fileNameInMetadata.kt") public void testFileNameInMetadata() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/fileNameInMetadata.kt"); } + @Test @TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt") public void testInlineOrdinaryOfCrossinlineSuspend() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfCrossinlineSuspend.kt"); } + @Test @TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt") public void testInlineOrdinaryOfNoinlineSuspend() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfNoinlineSuspend.kt"); } + @Test @TestMetadata("inlineSuspendContinuation.kt") public void testInlineSuspendContinuation() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendContinuation.kt"); } + @Test @TestMetadata("inlineSuspendInMultifileClass.kt") public void testInlineSuspendInMultifileClass() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendInMultifileClass.kt"); } + @Test @TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt") public void testInlineSuspendOfCrossinlineOrdinary() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineOrdinary.kt"); } + @Test @TestMetadata("inlineSuspendOfCrossinlineSuspend.kt") public void testInlineSuspendOfCrossinlineSuspend() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineSuspend.kt"); } + @Test @TestMetadata("inlineSuspendOfNoinlineOrdinary.kt") public void testInlineSuspendOfNoinlineOrdinary() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineOrdinary.kt"); } + @Test @TestMetadata("inlineSuspendOfNoinlineSuspend.kt") public void testInlineSuspendOfNoinlineSuspend() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineSuspend.kt"); } + @Test @TestMetadata("inlineSuspendOfOrdinary.kt") public void testInlineSuspendOfOrdinary() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfOrdinary.kt"); } + @Test @TestMetadata("inlineSuspendOfSuspend.kt") public void testInlineSuspendOfSuspend() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfSuspend.kt"); } + @Test @TestMetadata("jvmName.kt") public void testJvmName() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/jvmName.kt"); } + @Test @TestMetadata("kt26658.kt") public void testKt26658() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/kt26658.kt"); } + @Test @TestMetadata("maxStackWithCrossinline.kt") public void testMaxStackWithCrossinline() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/maxStackWithCrossinline.kt"); } + @Test @TestMetadata("multipleLocals.kt") public void testMultipleLocals() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/multipleLocals.kt"); } + @Test @TestMetadata("multipleSuspensionPoints.kt") public void testMultipleSuspensionPoints() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/multipleSuspensionPoints.kt"); } + @Test @TestMetadata("nestedMethodWith2XParameter.kt") public void testNestedMethodWith2XParameter() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/nestedMethodWith2XParameter.kt"); } + @Test @TestMetadata("nonLocalReturn.kt") public void testNonLocalReturn() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/nonLocalReturn.kt"); } + @Test @TestMetadata("nonSuspendCrossinline.kt") public void testNonSuspendCrossinline() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/nonSuspendCrossinline.kt"); } + @Test @TestMetadata("returnValue.kt") public void testReturnValue() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/returnValue.kt"); } + @Test @TestMetadata("tryCatchReceiver.kt") public void testTryCatchReceiver() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/tryCatchReceiver.kt"); } + @Test @TestMetadata("tryCatchStackTransform.kt") public void testTryCatchStackTransform() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/tryCatchStackTransform.kt"); } + @Test @TestMetadata("twiceRegeneratedAnonymousObject.kt") public void testTwiceRegeneratedAnonymousObject() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/twiceRegeneratedAnonymousObject.kt"); } + @Test @TestMetadata("twiceRegeneratedSuspendLambda.kt") public void testTwiceRegeneratedSuspendLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/twiceRegeneratedSuspendLambda.kt"); } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/suspend/callableReference") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class CallableReference extends AbstractIrBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - + public class CallableReference { + @Test public void testAllFilesPresentInCallableReference() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/callableReference"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("isAsReified.kt") public void testIsAsReified() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/callableReference/isAsReified.kt"); } + @Test @TestMetadata("isAsReified2.kt") public void testIsAsReified2() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/callableReference/isAsReified2.kt"); } + @Test @TestMetadata("nonTailCall.kt") public void testNonTailCall() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/callableReference/nonTailCall.kt"); } + @Test @TestMetadata("simple.kt") public void testSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/callableReference/simple.kt"); } + @Test @TestMetadata("unitReturn.kt") public void testUnitReturn() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/callableReference/unitReturn.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/suspend/defaultParameter") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class DefaultParameter extends AbstractIrBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - + public class DefaultParameter { + @Test public void testAllFilesPresentInDefaultParameter() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/defaultParameter"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("defaultValueCrossinline.kt") public void testDefaultValueCrossinline() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueCrossinline.kt"); } + @Test @TestMetadata("defaultValueInClass.kt") public void testDefaultValueInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInClass.kt"); } + @Test @TestMetadata("defaultValueInline.kt") public void testDefaultValueInline() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInline.kt"); } + @Test @TestMetadata("defaultValueInlineFromMultiFileFacade.kt") public void testDefaultValueInlineFromMultiFileFacade() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInlineFromMultiFileFacade.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/suspend/inlineClass") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class InlineClass extends AbstractIrBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - + public class InlineClass { + @Test public void testAllFilesPresentInInlineClass() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/inlineClass"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("returnUnboxedDirect.kt") public void testReturnUnboxedDirect() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineClass/returnUnboxedDirect.kt"); } + @Test @TestMetadata("returnUnboxedResume.kt") public void testReturnUnboxedResume() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineClass/returnUnboxedResume.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/suspend/inlineUsedAsNoinline") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class InlineUsedAsNoinline extends AbstractIrBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - + public class InlineUsedAsNoinline { + @Test public void testAllFilesPresentInInlineUsedAsNoinline() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/inlineUsedAsNoinline"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("inlineOnly.kt") public void testInlineOnly() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineUsedAsNoinline/inlineOnly.kt"); } + @Test @TestMetadata("simpleNamed.kt") public void testSimpleNamed() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineUsedAsNoinline/simpleNamed.kt"); } + @Test @TestMetadata("withCapturedInlineLambda.kt") public void testWithCapturedInlineLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineUsedAsNoinline/withCapturedInlineLambda.kt"); } + @Test @TestMetadata("withCapturedInlineLambda2.kt") public void testWithCapturedInlineLambda2() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineUsedAsNoinline/withCapturedInlineLambda2.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/suspend/receiver") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Receiver extends AbstractIrBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - + public class Receiver { + @Test public void testAllFilesPresentInReceiver() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/receiver"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt") public void testInlineOrdinaryOfCrossinlineSuspend() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfCrossinlineSuspend.kt"); } + @Test @TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt") public void testInlineOrdinaryOfNoinlineSuspend() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfNoinlineSuspend.kt"); } + @Test @TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt") public void testInlineSuspendOfCrossinlineOrdinary() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineOrdinary.kt"); } + @Test @TestMetadata("inlineSuspendOfCrossinlineSuspend.kt") public void testInlineSuspendOfCrossinlineSuspend() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineSuspend.kt"); } + @Test @TestMetadata("inlineSuspendOfNoinlineOrdinary.kt") public void testInlineSuspendOfNoinlineOrdinary() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineOrdinary.kt"); } + @Test @TestMetadata("inlineSuspendOfNoinlineSuspend.kt") public void testInlineSuspendOfNoinlineSuspend() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineSuspend.kt"); } + @Test @TestMetadata("inlineSuspendOfOrdinary.kt") public void testInlineSuspendOfOrdinary() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfOrdinary.kt"); } + @Test @TestMetadata("inlineSuspendOfSuspend.kt") public void testInlineSuspendOfSuspend() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfSuspend.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class StateMachine extends AbstractIrBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - + public class StateMachine { + @Test public void testAllFilesPresentInStateMachine() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/stateMachine"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("crossingCoroutineBoundaries.kt") public void testCrossingCoroutineBoundaries() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/crossingCoroutineBoundaries.kt"); } + @Test @TestMetadata("independentInline.kt") public void testIndependentInline() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/independentInline.kt"); } + @Test @TestMetadata("innerLambda.kt") public void testInnerLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambda.kt"); } + @Test @TestMetadata("innerLambdaInsideLambda.kt") public void testInnerLambdaInsideLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaInsideLambda.kt"); } + @Test @TestMetadata("innerLambdaWithoutCrossinline.kt") public void testInnerLambdaWithoutCrossinline() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaWithoutCrossinline.kt"); } + @Test @TestMetadata("innerMadness.kt") public void testInnerMadness() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadness.kt"); } + @Test @TestMetadata("innerMadnessCallSite.kt") public void testInnerMadnessCallSite() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadnessCallSite.kt"); } + @Test @TestMetadata("innerObject.kt") public void testInnerObject() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObject.kt"); } + @Test @TestMetadata("innerObjectInsideInnerObject.kt") public void testInnerObjectInsideInnerObject() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectInsideInnerObject.kt"); } + @Test @TestMetadata("innerObjectRetransformation.kt") public void testInnerObjectRetransformation() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectRetransformation.kt"); } + @Test @TestMetadata("innerObjectSeveralFunctions.kt") public void testInnerObjectSeveralFunctions() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectSeveralFunctions.kt"); } + @Test @TestMetadata("innerObjectWithoutCapturingCrossinline.kt") public void testInnerObjectWithoutCapturingCrossinline() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectWithoutCapturingCrossinline.kt"); } + @Test @TestMetadata("insideObject.kt") public void testInsideObject() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/insideObject.kt"); } + @Test + @TestMetadata("kt30708.kt") + public void testKt30708() throws Exception { + runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/kt30708.kt"); + } + + @Test @TestMetadata("lambdaTransformation.kt") public void testLambdaTransformation() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/lambdaTransformation.kt"); } + @Test @TestMetadata("normalInline.kt") public void testNormalInline() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/normalInline.kt"); } + @Test @TestMetadata("numberOfSuspentions.kt") public void testNumberOfSuspentions() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/numberOfSuspentions.kt"); } + @Test @TestMetadata("objectInsideLambdas.kt") public void testObjectInsideLambdas() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/objectInsideLambdas.kt"); } + @Test @TestMetadata("oneInlineTwoCaptures.kt") public void testOneInlineTwoCaptures() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/oneInlineTwoCaptures.kt"); } + @Test @TestMetadata("passLambda.kt") public void testPassLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/passLambda.kt"); } + @Test @TestMetadata("passParameter.kt") public void testPassParameter() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/passParameter.kt"); } + @Test @TestMetadata("passParameterLambda.kt") public void testPassParameterLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/passParameterLambda.kt"); } + @Test @TestMetadata("unreachableSuspendMarker.kt") public void testUnreachableSuspendMarker() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/unreachableSuspendMarker.kt"); @@ -4459,110 +5105,121 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/syntheticAccessors") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class SyntheticAccessors extends AbstractIrBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - + public class SyntheticAccessors { + @Test public void testAllFilesPresentInSyntheticAccessors() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/syntheticAccessors"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("constField.kt") public void testConstField() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/constField.kt"); } + @Test @TestMetadata("packagePrivateMembers.kt") public void testPackagePrivateMembers() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/packagePrivateMembers.kt"); } + @Test @TestMetadata("propertyModifiers.kt") public void testPropertyModifiers() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/propertyModifiers.kt"); } + @Test @TestMetadata("protectedMembers.kt") public void testProtectedMembers() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/protectedMembers.kt"); } + @Test @TestMetadata("protectedMembersFromSuper.kt") public void testProtectedMembersFromSuper() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/protectedMembersFromSuper.kt"); } + @Test @TestMetadata("superCall.kt") public void testSuperCall() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/superCall.kt"); } + @Test @TestMetadata("superCallFromMultipleSubclasses.kt") public void testSuperCallFromMultipleSubclasses() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/superCallFromMultipleSubclasses.kt"); } + @Test @TestMetadata("superProperty.kt") public void testSuperProperty() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/superProperty.kt"); } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class WithinInlineLambda extends AbstractIrBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - + public class WithinInlineLambda { + @Test public void testAllFilesPresentInWithinInlineLambda() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("directFieldAccess.kt") public void testDirectFieldAccess() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/directFieldAccess.kt"); } + @Test @TestMetadata("directFieldAccessInCrossInline.kt") public void testDirectFieldAccessInCrossInline() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/directFieldAccessInCrossInline.kt"); } + @Test @TestMetadata("privateCall.kt") public void testPrivateCall() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/privateCall.kt"); } + @Test @TestMetadata("privateInCrossInline.kt") public void testPrivateInCrossInline() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/privateInCrossInline.kt"); } + @Test @TestMetadata("privateInDefaultStubArgument.kt") public void testPrivateInDefaultStubArgument() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/privateInDefaultStubArgument.kt"); } + @Test @TestMetadata("protectedInCrossinline.kt") public void testProtectedInCrossinline() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/protectedInCrossinline.kt"); } + @Test @TestMetadata("protectedMembersFromSuper.kt") public void testProtectedMembersFromSuper() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/protectedMembersFromSuper.kt"); } + @Test @TestMetadata("superCall.kt") public void testSuperCall() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/superCall.kt"); } + @Test @TestMetadata("superInCrossInline.kt") public void testSuperInCrossInline() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/superInCrossInline.kt"); @@ -4570,79 +5227,78 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/trait") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Trait extends AbstractIrBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - + public class Trait { + @Test public void testAllFilesPresentInTrait() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/trait"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("trait.kt") public void testTrait() throws Exception { runTest("compiler/testData/codegen/boxInline/trait/trait.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/tryCatchFinally") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class TryCatchFinally extends AbstractIrBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - + public class TryCatchFinally { + @Test public void testAllFilesPresentInTryCatchFinally() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/tryCatchFinally"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("kt5863.kt") public void testKt5863() throws Exception { runTest("compiler/testData/codegen/boxInline/tryCatchFinally/kt5863.kt"); } + @Test @TestMetadata("tryCatch.kt") public void testTryCatch() throws Exception { runTest("compiler/testData/codegen/boxInline/tryCatchFinally/tryCatch.kt"); } + @Test @TestMetadata("tryCatch2.kt") public void testTryCatch2() throws Exception { runTest("compiler/testData/codegen/boxInline/tryCatchFinally/tryCatch2.kt"); } + @Test @TestMetadata("tryCatchFinally.kt") public void testTryCatchFinally() throws Exception { runTest("compiler/testData/codegen/boxInline/tryCatchFinally/tryCatchFinally.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/varargs") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Varargs extends AbstractIrBlackBoxInlineCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - + public class Varargs { + @Test public void testAllFilesPresentInVarargs() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/varargs"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("kt17653.kt") public void testKt17653() throws Exception { runTest("compiler/testData/codegen/boxInline/varargs/kt17653.kt"); } + @Test @TestMetadata("varargAndDefaultParameters.kt") public void testVarargAndDefaultParameters() throws Exception { runTest("compiler/testData/codegen/boxInline/varargs/varargAndDefaultParameters.kt"); } + @Test @TestMetadata("varargAndDefaultParameters2.kt") public void testVarargAndDefaultParameters2() throws Exception { runTest("compiler/testData/codegen/boxInline/varargs/varargAndDefaultParameters2.kt"); diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBytecodeTextTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBytecodeTextTestGenerated.java index 697ca637506..de081a57448 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBytecodeTextTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBytecodeTextTestGenerated.java @@ -520,7 +520,7 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/argumentOrder") @TestDataPath("$PROJECT_ROOT") - public class ArgumentOrder extends AbstractIrBytecodeTextTest { + public class ArgumentOrder { @Test public void testAllFilesPresentInArgumentOrder() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/argumentOrder"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -542,7 +542,7 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/assert") @TestDataPath("$PROJECT_ROOT") - public class Assert extends AbstractIrBytecodeTextTest { + public class Assert { @Test public void testAllFilesPresentInAssert() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/assert"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -582,7 +582,7 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/boxing") @TestDataPath("$PROJECT_ROOT") - public class Boxing extends AbstractIrBytecodeTextTest { + public class Boxing { @Test public void testAllFilesPresentInBoxing() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/boxing"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -610,7 +610,7 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/boxingOptimization") @TestDataPath("$PROJECT_ROOT") - public class BoxingOptimization extends AbstractIrBytecodeTextTest { + public class BoxingOptimization { @Test public void testAllFilesPresentInBoxingOptimization() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/boxingOptimization"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -640,6 +640,12 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest { runTest("compiler/testData/codegen/bytecodeText/boxingOptimization/fold.kt"); } + @Test + @TestMetadata("hashCodeOnNonNull.kt") + public void testHashCodeOnNonNull() throws Exception { + runTest("compiler/testData/codegen/bytecodeText/boxingOptimization/hashCodeOnNonNull.kt"); + } + @Test @TestMetadata("inlineClassesAndInlinedLambda.kt") public void testInlineClassesAndInlinedLambda() throws Exception { @@ -764,7 +770,7 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/builtinFunctions") @TestDataPath("$PROJECT_ROOT") - public class BuiltinFunctions extends AbstractIrBytecodeTextTest { + public class BuiltinFunctions { @Test public void testAllFilesPresentInBuiltinFunctions() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/builtinFunctions"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -797,7 +803,7 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/builtinFunctions/genericParameterBridge") @TestDataPath("$PROJECT_ROOT") - public class GenericParameterBridge extends AbstractIrBytecodeTextTest { + public class GenericParameterBridge { @Test @TestMetadata("abstractList.kt") public void testAbstractList() throws Exception { @@ -850,7 +856,7 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/callableReference") @TestDataPath("$PROJECT_ROOT") - public class CallableReference extends AbstractIrBytecodeTextTest { + public class CallableReference { @Test public void testAllFilesPresentInCallableReference() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/callableReference"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -914,7 +920,7 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/capturedVarsOptimization") @TestDataPath("$PROJECT_ROOT") - public class CapturedVarsOptimization extends AbstractIrBytecodeTextTest { + public class CapturedVarsOptimization { @Test public void testAllFilesPresentInCapturedVarsOptimization() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/capturedVarsOptimization"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -968,6 +974,12 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest { runTest("compiler/testData/codegen/bytecodeText/capturedVarsOptimization/capturedVarsOfSize2.kt"); } + @Test + @TestMetadata("returnValueOfArrayConstructor.kt") + public void testReturnValueOfArrayConstructor() throws Exception { + runTest("compiler/testData/codegen/bytecodeText/capturedVarsOptimization/returnValueOfArrayConstructor.kt"); + } + @Test @TestMetadata("sharedSlotsWithCapturedVars.kt") public void testSharedSlotsWithCapturedVars() throws Exception { @@ -984,7 +996,7 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/checkcast") @TestDataPath("$PROJECT_ROOT") - public class Checkcast extends AbstractIrBytecodeTextTest { + public class Checkcast { @Test public void testAllFilesPresentInCheckcast() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/checkcast"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -1018,7 +1030,7 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/coercionToUnitOptimization") @TestDataPath("$PROJECT_ROOT") - public class CoercionToUnitOptimization extends AbstractIrBytecodeTextTest { + public class CoercionToUnitOptimization { @Test public void testAllFilesPresentInCoercionToUnitOptimization() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/coercionToUnitOptimization"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -1082,7 +1094,7 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/companion") @TestDataPath("$PROJECT_ROOT") - public class Companion extends AbstractIrBytecodeTextTest { + public class Companion { @Test public void testAllFilesPresentInCompanion() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/companion"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -1176,7 +1188,7 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/conditions") @TestDataPath("$PROJECT_ROOT") - public class Conditions extends AbstractIrBytecodeTextTest { + public class Conditions { @Test public void testAllFilesPresentInConditions() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/conditions"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -1354,7 +1366,7 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/constProperty") @TestDataPath("$PROJECT_ROOT") - public class ConstProperty extends AbstractIrBytecodeTextTest { + public class ConstProperty { @Test public void testAllFilesPresentInConstProperty() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/constProperty"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -1394,7 +1406,7 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/constantConditions") @TestDataPath("$PROJECT_ROOT") - public class ConstantConditions extends AbstractIrBytecodeTextTest { + public class ConstantConditions { @Test public void testAllFilesPresentInConstantConditions() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/constantConditions"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -1434,7 +1446,7 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/constants") @TestDataPath("$PROJECT_ROOT") - public class Constants extends AbstractIrBytecodeTextTest { + public class Constants { @Test public void testAllFilesPresentInConstants() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/constants"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -1522,7 +1534,7 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/constructors") @TestDataPath("$PROJECT_ROOT") - public class Constructors extends AbstractIrBytecodeTextTest { + public class Constructors { @Test public void testAllFilesPresentInConstructors() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/constructors"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -1586,7 +1598,7 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/controlStructures") @TestDataPath("$PROJECT_ROOT") - public class ControlStructures extends AbstractIrBytecodeTextTest { + public class ControlStructures { @Test public void testAllFilesPresentInControlStructures() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/controlStructures"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -1608,7 +1620,7 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/coroutines") @TestDataPath("$PROJECT_ROOT") - public class Coroutines extends AbstractIrBytecodeTextTest { + public class Coroutines { @Test public void testAllFilesPresentInCoroutines() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/coroutines"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -1683,7 +1695,7 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/coroutines/cleanup") @TestDataPath("$PROJECT_ROOT") - public class Cleanup extends AbstractIrBytecodeTextTest { + public class Cleanup { @Test public void testAllFilesPresentInCleanup() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/coroutines/cleanup"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -1741,7 +1753,7 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/coroutines/debug") @TestDataPath("$PROJECT_ROOT") - public class Debug extends AbstractIrBytecodeTextTest { + public class Debug { @Test public void testAllFilesPresentInDebug() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/coroutines/debug"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -1781,7 +1793,7 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/coroutines/destructuringInLambda") @TestDataPath("$PROJECT_ROOT") - public class DestructuringInLambda extends AbstractIrBytecodeTextTest { + public class DestructuringInLambda { @Test public void testAllFilesPresentInDestructuringInLambda() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/coroutines/destructuringInLambda"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -1797,7 +1809,7 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/coroutines/inlineClasses") @TestDataPath("$PROJECT_ROOT") - public class InlineClasses extends AbstractIrBytecodeTextTest { + public class InlineClasses { @Test public void testAllFilesPresentInInlineClasses() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/coroutines/inlineClasses"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -1849,7 +1861,7 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling") @TestDataPath("$PROJECT_ROOT") - public class IntLikeVarSpilling extends AbstractIrBytecodeTextTest { + public class IntLikeVarSpilling { @Test public void testAllFilesPresentInIntLikeVarSpilling() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -1919,7 +1931,7 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/coroutines/stateMachine") @TestDataPath("$PROJECT_ROOT") - public class StateMachine extends AbstractIrBytecodeTextTest { + public class StateMachine { @Test public void testAllFilesPresentInStateMachine() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/coroutines/stateMachine"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -1942,7 +1954,7 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/deadCodeElimination") @TestDataPath("$PROJECT_ROOT") - public class DeadCodeElimination extends AbstractIrBytecodeTextTest { + public class DeadCodeElimination { @Test public void testAllFilesPresentInDeadCodeElimination() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/deadCodeElimination"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -2018,7 +2030,7 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/defaultArguments") @TestDataPath("$PROJECT_ROOT") - public class DefaultArguments extends AbstractIrBytecodeTextTest { + public class DefaultArguments { @Test public void testAllFilesPresentInDefaultArguments() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/defaultArguments"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -2088,7 +2100,7 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/directInvoke") @TestDataPath("$PROJECT_ROOT") - public class DirectInvoke extends AbstractIrBytecodeTextTest { + public class DirectInvoke { @Test public void testAllFilesPresentInDirectInvoke() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/directInvoke"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -2116,7 +2128,7 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/disabledOptimizations") @TestDataPath("$PROJECT_ROOT") - public class DisabledOptimizations extends AbstractIrBytecodeTextTest { + public class DisabledOptimizations { @Test public void testAllFilesPresentInDisabledOptimizations() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/disabledOptimizations"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -2162,7 +2174,7 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/enum") @TestDataPath("$PROJECT_ROOT") - public class Enum extends AbstractIrBytecodeTextTest { + public class Enum { @Test public void testAllFilesPresentInEnum() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/enum"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -2196,7 +2208,7 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/exclExcl") @TestDataPath("$PROJECT_ROOT") - public class ExclExcl extends AbstractIrBytecodeTextTest { + public class ExclExcl { @Test public void testAllFilesPresentInExclExcl() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/exclExcl"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -2212,7 +2224,7 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/fieldsForCapturedValues") @TestDataPath("$PROJECT_ROOT") - public class FieldsForCapturedValues extends AbstractIrBytecodeTextTest { + public class FieldsForCapturedValues { @Test public void testAllFilesPresentInFieldsForCapturedValues() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/fieldsForCapturedValues"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -2276,7 +2288,7 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/forLoop") @TestDataPath("$PROJECT_ROOT") - public class ForLoop extends AbstractIrBytecodeTextTest { + public class ForLoop { @Test public void testAllFilesPresentInForLoop() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/forLoop"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -2435,7 +2447,7 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/forLoop/forInArrayWithIndex") @TestDataPath("$PROJECT_ROOT") - public class ForInArrayWithIndex extends AbstractIrBytecodeTextTest { + public class ForInArrayWithIndex { @Test public void testAllFilesPresentInForInArrayWithIndex() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/forLoop/forInArrayWithIndex"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -2475,7 +2487,7 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/forLoop/forInCharSequenceWithIndex") @TestDataPath("$PROJECT_ROOT") - public class ForInCharSequenceWithIndex extends AbstractIrBytecodeTextTest { + public class ForInCharSequenceWithIndex { @Test public void testAllFilesPresentInForInCharSequenceWithIndex() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/forLoop/forInCharSequenceWithIndex"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -2521,7 +2533,7 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/forLoop/forInIndices") @TestDataPath("$PROJECT_ROOT") - public class ForInIndices extends AbstractIrBytecodeTextTest { + public class ForInIndices { @Test public void testAllFilesPresentInForInIndices() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/forLoop/forInIndices"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -2585,7 +2597,7 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/forLoop/forInIterableWithIndex") @TestDataPath("$PROJECT_ROOT") - public class ForInIterableWithIndex extends AbstractIrBytecodeTextTest { + public class ForInIterableWithIndex { @Test public void testAllFilesPresentInForInIterableWithIndex() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/forLoop/forInIterableWithIndex"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -2631,7 +2643,7 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/forLoop/forInProgressionWithIndex") @TestDataPath("$PROJECT_ROOT") - public class ForInProgressionWithIndex extends AbstractIrBytecodeTextTest { + public class ForInProgressionWithIndex { @Test public void testAllFilesPresentInForInProgressionWithIndex() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/forLoop/forInProgressionWithIndex"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -2713,7 +2725,7 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/forLoop/forInReversed") @TestDataPath("$PROJECT_ROOT") - public class ForInReversed extends AbstractIrBytecodeTextTest { + public class ForInReversed { @Test public void testAllFilesPresentInForInReversed() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/forLoop/forInReversed"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -2801,7 +2813,7 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/forLoop/forInSequenceWithIndex") @TestDataPath("$PROJECT_ROOT") - public class ForInSequenceWithIndex extends AbstractIrBytecodeTextTest { + public class ForInSequenceWithIndex { @Test public void testAllFilesPresentInForInSequenceWithIndex() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/forLoop/forInSequenceWithIndex"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -2853,7 +2865,7 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/forLoop/forInUntil") @TestDataPath("$PROJECT_ROOT") - public class ForInUntil extends AbstractIrBytecodeTextTest { + public class ForInUntil { @Test public void testAllFilesPresentInForInUntil() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/forLoop/forInUntil"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -2917,7 +2929,7 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/forLoop/stepped") @TestDataPath("$PROJECT_ROOT") - public class Stepped extends AbstractIrBytecodeTextTest { + public class Stepped { @Test public void testAllFilesPresentInStepped() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/forLoop/stepped"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -3011,7 +3023,7 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/forLoop/unsigned") @TestDataPath("$PROJECT_ROOT") - public class Unsigned extends AbstractIrBytecodeTextTest { + public class Unsigned { @Test public void testAllFilesPresentInUnsigned() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/forLoop/unsigned"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -3112,16 +3124,16 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/hashCode") @TestDataPath("$PROJECT_ROOT") - public class HashCode extends AbstractIrBytecodeTextTest { + public class HashCode { @Test public void testAllFilesPresentInHashCode() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/hashCode"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } @Test - @TestMetadata("hashCode.kt") - public void testHashCode() throws Exception { - runTest("compiler/testData/codegen/bytecodeText/hashCode/hashCode.kt"); + @TestMetadata("hashCode_1_6.kt") + public void testHashCode_1_6() throws Exception { + runTest("compiler/testData/codegen/bytecodeText/hashCode/hashCode_1_6.kt"); } @Test @@ -3134,7 +3146,7 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/ieee754") @TestDataPath("$PROJECT_ROOT") - public class Ieee754 extends AbstractIrBytecodeTextTest { + public class Ieee754 { @Test public void testAllFilesPresentInIeee754() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/ieee754"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -3192,7 +3204,7 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/inline") @TestDataPath("$PROJECT_ROOT") - public class Inline extends AbstractIrBytecodeTextTest { + public class Inline { @Test public void testAllFilesPresentInInline() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/inline"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -3315,7 +3327,7 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/inline/property") @TestDataPath("$PROJECT_ROOT") - public class Property extends AbstractIrBytecodeTextTest { + public class Property { @Test public void testAllFilesPresentInProperty() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/inline/property"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -3332,7 +3344,7 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/inlineClasses") @TestDataPath("$PROJECT_ROOT") - public class InlineClasses extends AbstractIrBytecodeTextTest { + public class InlineClasses { @Test public void testAllFilesPresentInInlineClasses() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/inlineClasses"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -3744,7 +3756,7 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/innerClasses") @TestDataPath("$PROJECT_ROOT") - public class InnerClasses extends AbstractIrBytecodeTextTest { + public class InnerClasses { @Test public void testAllFilesPresentInInnerClasses() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/innerClasses"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -3760,7 +3772,7 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/interfaces") @TestDataPath("$PROJECT_ROOT") - public class Interfaces extends AbstractIrBytecodeTextTest { + public class Interfaces { @Test @TestMetadata("addedInterfaceBridge.kt") public void testAddedInterfaceBridge() throws Exception { @@ -3800,7 +3812,7 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/intrinsics") @TestDataPath("$PROJECT_ROOT") - public class Intrinsics extends AbstractIrBytecodeTextTest { + public class Intrinsics { @Test public void testAllFilesPresentInIntrinsics() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/intrinsics"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -3822,7 +3834,7 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/intrinsicsCompare") @TestDataPath("$PROJECT_ROOT") - public class IntrinsicsCompare extends AbstractIrBytecodeTextTest { + public class IntrinsicsCompare { @Test public void testAllFilesPresentInIntrinsicsCompare() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/intrinsicsCompare"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -3892,7 +3904,7 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/intrinsicsTrim") @TestDataPath("$PROJECT_ROOT") - public class IntrinsicsTrim extends AbstractIrBytecodeTextTest { + public class IntrinsicsTrim { @Test public void testAllFilesPresentInIntrinsicsTrim() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/intrinsicsTrim"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -3926,12 +3938,18 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/invokedynamic") @TestDataPath("$PROJECT_ROOT") - public class Invokedynamic extends AbstractIrBytecodeTextTest { + public class Invokedynamic { @Test public void testAllFilesPresentInInvokedynamic() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/invokedynamic"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test + @TestMetadata("lambdas.kt") + public void testLambdas() throws Exception { + runTest("compiler/testData/codegen/bytecodeText/invokedynamic/lambdas.kt"); + } + @Test @TestMetadata("streamApi.kt") public void testStreamApi() throws Exception { @@ -3942,7 +3960,7 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/jvm8") @TestDataPath("$PROJECT_ROOT") - public class Jvm8 extends AbstractIrBytecodeTextTest { + public class Jvm8 { @Test public void testAllFilesPresentInJvm8() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/jvm8"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -3951,7 +3969,7 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/jvm8/hashCode") @TestDataPath("$PROJECT_ROOT") - public class HashCode extends AbstractIrBytecodeTextTest { + public class HashCode { @Test public void testAllFilesPresentInHashCode() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/jvm8/hashCode"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -3973,7 +3991,7 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/jvm8/jvmDefault") @TestDataPath("$PROJECT_ROOT") - public class JvmDefault extends AbstractIrBytecodeTextTest { + public class JvmDefault { @Test public void testAllFilesPresentInJvmDefault() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/jvm8/jvmDefault"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -3982,7 +4000,7 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/jvm8/jvmDefault/allCompatibility") @TestDataPath("$PROJECT_ROOT") - public class AllCompatibility extends AbstractIrBytecodeTextTest { + public class AllCompatibility { @Test public void testAllFilesPresentInAllCompatibility() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/jvm8/jvmDefault/allCompatibility"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -4022,7 +4040,7 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/jvm8/jvmDefault/compatibility") @TestDataPath("$PROJECT_ROOT") - public class Compatibility extends AbstractIrBytecodeTextTest { + public class Compatibility { @Test public void testAllFilesPresentInCompatibility() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/jvm8/jvmDefault/compatibility"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -4064,7 +4082,7 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/lazyCodegen") @TestDataPath("$PROJECT_ROOT") - public class LazyCodegen extends AbstractIrBytecodeTextTest { + public class LazyCodegen { @Test public void testAllFilesPresentInLazyCodegen() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/lazyCodegen"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -4116,7 +4134,7 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/lineNumbers") @TestDataPath("$PROJECT_ROOT") - public class LineNumbers extends AbstractIrBytecodeTextTest { + public class LineNumbers { @Test public void testAllFilesPresentInLineNumbers() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/lineNumbers"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -4198,7 +4216,7 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/localInitializationLVT") @TestDataPath("$PROJECT_ROOT") - public class LocalInitializationLVT extends AbstractIrBytecodeTextTest { + public class LocalInitializationLVT { @Test public void testAllFilesPresentInLocalInitializationLVT() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/localInitializationLVT"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -4322,7 +4340,7 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/mangling") @TestDataPath("$PROJECT_ROOT") - public class Mangling extends AbstractIrBytecodeTextTest { + public class Mangling { @Test public void testAllFilesPresentInMangling() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/mangling"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -4344,7 +4362,7 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/multifileClasses") @TestDataPath("$PROJECT_ROOT") - public class MultifileClasses extends AbstractIrBytecodeTextTest { + public class MultifileClasses { @Test public void testAllFilesPresentInMultifileClasses() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/multifileClasses"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -4372,7 +4390,7 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/notNullAssertions") @TestDataPath("$PROJECT_ROOT") - public class NotNullAssertions extends AbstractIrBytecodeTextTest { + public class NotNullAssertions { @Test public void testAllFilesPresentInNotNullAssertions() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/notNullAssertions"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -4448,7 +4466,7 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/nullCheckOptimization") @TestDataPath("$PROJECT_ROOT") - public class NullCheckOptimization extends AbstractIrBytecodeTextTest { + public class NullCheckOptimization { @Test public void testAllFilesPresentInNullCheckOptimization() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/nullCheckOptimization"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -4526,6 +4544,12 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest { runTest("compiler/testData/codegen/bytecodeText/nullCheckOptimization/multipleExclExcl_1_4.kt"); } + @Test + @TestMetadata("noNullCheckAfterCast.kt") + public void testNoNullCheckAfterCast() throws Exception { + runTest("compiler/testData/codegen/bytecodeText/nullCheckOptimization/noNullCheckAfterCast.kt"); + } + @Test @TestMetadata("notNullAsNotNullable.kt") public void testNotNullAsNotNullable() throws Exception { @@ -4589,7 +4613,7 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/nullCheckOptimization/localLateinit") @TestDataPath("$PROJECT_ROOT") - public class LocalLateinit extends AbstractIrBytecodeTextTest { + public class LocalLateinit { @Test public void testAllFilesPresentInLocalLateinit() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/nullCheckOptimization/localLateinit"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -4618,7 +4642,7 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/optimizedDelegatedProperties") @TestDataPath("$PROJECT_ROOT") - public class OptimizedDelegatedProperties extends AbstractIrBytecodeTextTest { + public class OptimizedDelegatedProperties { @Test public void testAllFilesPresentInOptimizedDelegatedProperties() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/optimizedDelegatedProperties"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -4652,7 +4676,7 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/parameterlessMain") @TestDataPath("$PROJECT_ROOT") - public class ParameterlessMain extends AbstractIrBytecodeTextTest { + public class ParameterlessMain { @Test public void testAllFilesPresentInParameterlessMain() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/parameterlessMain"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -4704,7 +4728,7 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/properties") @TestDataPath("$PROJECT_ROOT") - public class Properties extends AbstractIrBytecodeTextTest { + public class Properties { @Test public void testAllFilesPresentInProperties() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/properties"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -4725,7 +4749,7 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/properties/lateinit") @TestDataPath("$PROJECT_ROOT") - public class Lateinit extends AbstractIrBytecodeTextTest { + public class Lateinit { @Test public void testAllFilesPresentInLateinit() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/properties/lateinit"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -4748,7 +4772,7 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/ranges") @TestDataPath("$PROJECT_ROOT") - public class Ranges extends AbstractIrBytecodeTextTest { + public class Ranges { @Test public void testAllFilesPresentInRanges() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/ranges"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -4830,7 +4854,7 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/sam") @TestDataPath("$PROJECT_ROOT") - public class Sam extends AbstractIrBytecodeTextTest { + public class Sam { @Test public void testAllFilesPresentInSam() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/sam"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -4876,7 +4900,7 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/statements") @TestDataPath("$PROJECT_ROOT") - public class Statements extends AbstractIrBytecodeTextTest { + public class Statements { @Test public void testAllFilesPresentInStatements() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/statements"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -4934,7 +4958,7 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/staticFields") @TestDataPath("$PROJECT_ROOT") - public class StaticFields extends AbstractIrBytecodeTextTest { + public class StaticFields { @Test public void testAllFilesPresentInStaticFields() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/staticFields"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -4956,7 +4980,7 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/storeStackBeforeInline") @TestDataPath("$PROJECT_ROOT") - public class StoreStackBeforeInline extends AbstractIrBytecodeTextTest { + public class StoreStackBeforeInline { @Test public void testAllFilesPresentInStoreStackBeforeInline() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/storeStackBeforeInline"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -4996,7 +5020,7 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/stringOperations") @TestDataPath("$PROJECT_ROOT") - public class StringOperations extends AbstractIrBytecodeTextTest { + public class StringOperations { @Test public void testAllFilesPresentInStringOperations() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/stringOperations"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -5198,7 +5222,7 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/toArray") @TestDataPath("$PROJECT_ROOT") - public class ToArray extends AbstractIrBytecodeTextTest { + public class ToArray { @Test public void testAllFilesPresentInToArray() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/toArray"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -5214,7 +5238,7 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/unsignedTypes") @TestDataPath("$PROJECT_ROOT") - public class UnsignedTypes extends AbstractIrBytecodeTextTest { + public class UnsignedTypes { @Test public void testAllFilesPresentInUnsignedTypes() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/unsignedTypes"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -5290,7 +5314,7 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/varargs") @TestDataPath("$PROJECT_ROOT") - public class Varargs extends AbstractIrBytecodeTextTest { + public class Varargs { @Test public void testAllFilesPresentInVarargs() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/varargs"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -5306,7 +5330,7 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/when") @TestDataPath("$PROJECT_ROOT") - public class When extends AbstractIrBytecodeTextTest { + public class When { @Test public void testAllFilesPresentInWhen() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/when"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -5466,7 +5490,7 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/whenEnumOptimization") @TestDataPath("$PROJECT_ROOT") - public class WhenEnumOptimization extends AbstractIrBytecodeTextTest { + public class WhenEnumOptimization { @Test public void testAllFilesPresentInWhenEnumOptimization() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/whenEnumOptimization"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -5560,7 +5584,7 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest { @Nested @TestMetadata("compiler/testData/codegen/bytecodeText/whenStringOptimization") @TestDataPath("$PROJECT_ROOT") - public class WhenStringOptimization extends AbstractIrBytecodeTextTest { + public class WhenStringOptimization { @Test public void testAllFilesPresentInWhenStringOptimization() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/whenStringOptimization"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); diff --git a/compiler/tests-gen/org/jetbrains/kotlin/codegen/ir/IrCompileKotlinAgainstInlineKotlinTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrCompileKotlinAgainstInlineKotlinTestGenerated.java similarity index 86% rename from compiler/tests-gen/org/jetbrains/kotlin/codegen/ir/IrCompileKotlinAgainstInlineKotlinTestGenerated.java rename to compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrCompileKotlinAgainstInlineKotlinTestGenerated.java index 50ee263b67e..82a9a8ed03d 100644 --- a/compiler/tests-gen/org/jetbrains/kotlin/codegen/ir/IrCompileKotlinAgainstInlineKotlinTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrCompileKotlinAgainstInlineKotlinTestGenerated.java @@ -3,569 +3,651 @@ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. */ -package org.jetbrains.kotlin.codegen.ir; +package org.jetbrains.kotlin.test.runners.codegen; import com.intellij.testFramework.TestDataPath; -import org.jetbrains.kotlin.test.JUnit3RunnerWithInners; -import org.jetbrains.kotlin.test.KotlinTestUtils; import org.jetbrains.kotlin.test.util.KtTestUtil; import org.jetbrains.kotlin.test.TargetBackend; import org.jetbrains.kotlin.test.TestMetadata; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.Nested; +import org.junit.jupiter.api.Test; import java.io.File; import java.util.regex.Pattern; -/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */ +/** This class is generated by {@link GenerateNewCompilerTests.kt}. DO NOT MODIFY MANUALLY */ @SuppressWarnings("all") @TestMetadata("compiler/testData/codegen/boxInline") @TestDataPath("$PROJECT_ROOT") -@RunWith(JUnit3RunnerWithInners.class) public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + @Test public void testAllFilesPresentInBoxInline() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/anonymousObject") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class AnonymousObject extends AbstractIrCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class AnonymousObject { + @Test public void testAllFilesPresentInAnonymousObject() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/anonymousObject"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("anonymousObjectInDefault.kt") public void testAnonymousObjectInDefault() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectInDefault.kt"); } + @Test @TestMetadata("anonymousObjectOnCallSite.kt") public void testAnonymousObjectOnCallSite() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnCallSite.kt"); } + @Test @TestMetadata("anonymousObjectOnCallSiteSuperParams.kt") public void testAnonymousObjectOnCallSiteSuperParams() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnCallSiteSuperParams.kt"); } + @Test @TestMetadata("anonymousObjectOnDeclarationSite.kt") public void testAnonymousObjectOnDeclarationSite() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnDeclarationSite.kt"); } + @Test @TestMetadata("anonymousObjectOnDeclarationSiteSuperParams.kt") public void testAnonymousObjectOnDeclarationSiteSuperParams() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnDeclarationSiteSuperParams.kt"); } + @Test @TestMetadata("capturedLambdaInInline.kt") public void testCapturedLambdaInInline() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInline.kt"); } + @Test @TestMetadata("capturedLambdaInInline2.kt") public void testCapturedLambdaInInline2() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInline2.kt"); } + @Test @TestMetadata("capturedLambdaInInline3.kt") public void testCapturedLambdaInInline3() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInline3.kt"); } + @Test @TestMetadata("capturedLambdaInInlineObject.kt") public void testCapturedLambdaInInlineObject() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInlineObject.kt"); } + @Test @TestMetadata("capturedLocalFun.kt") public void testCapturedLocalFun() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/capturedLocalFun.kt"); } + @Test @TestMetadata("capturedLocalFunRef.kt") public void testCapturedLocalFunRef() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/capturedLocalFunRef.kt"); } + @Test @TestMetadata("changingReturnType.kt") public void testChangingReturnType() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/changingReturnType.kt"); } + @Test @TestMetadata("constructOriginalInRegenerated.kt") public void testConstructOriginalInRegenerated() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/constructOriginalInRegenerated.kt"); } + @Test @TestMetadata("constructorVisibility.kt") public void testConstructorVisibility() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/constructorVisibility.kt"); } + @Test @TestMetadata("constructorVisibilityInConstLambda.kt") public void testConstructorVisibilityInConstLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/constructorVisibilityInConstLambda.kt"); } + @Test @TestMetadata("constructorVisibilityInLambda.kt") public void testConstructorVisibilityInLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/constructorVisibilityInLambda.kt"); } + @Test @TestMetadata("defineClass.kt") public void testDefineClass() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/defineClass.kt"); } + @Test @TestMetadata("functionExpression.kt") public void testFunctionExpression() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/functionExpression.kt"); } + @Test @TestMetadata("inlineCallInsideInlineLambda.kt") public void testInlineCallInsideInlineLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/inlineCallInsideInlineLambda.kt"); } + @Test @TestMetadata("kt13133.kt") public void testKt13133() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt13133.kt"); } + @Test @TestMetadata("kt13182.kt") public void testKt13182() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt13182.kt"); } + @Test @TestMetadata("kt13374.kt") public void testKt13374() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt13374.kt"); } + @Test @TestMetadata("kt14011.kt") public void testKt14011() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt14011.kt"); } + @Test @TestMetadata("kt14011_2.kt") public void testKt14011_2() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt14011_2.kt"); } + @Test @TestMetadata("kt14011_3.kt") public void testKt14011_3() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt14011_3.kt"); } + @Test @TestMetadata("kt15751.kt") public void testKt15751() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt15751.kt"); } + @Test @TestMetadata("kt16193.kt") public void testKt16193() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt16193.kt"); } + @Test @TestMetadata("kt17972.kt") public void testKt17972() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt17972.kt"); } + @Test @TestMetadata("kt17972_2.kt") public void testKt17972_2() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt17972_2.kt"); } + @Test @TestMetadata("kt17972_3.kt") public void testKt17972_3() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt17972_3.kt"); } + @Test @TestMetadata("kt17972_4.kt") public void testKt17972_4() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt17972_4.kt"); } + @Test @TestMetadata("kt17972_5.kt") public void testKt17972_5() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt17972_5.kt"); } + @Test @TestMetadata("kt17972_super.kt") public void testKt17972_super() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt17972_super.kt"); } + @Test @TestMetadata("kt17972_super2.kt") public void testKt17972_super2() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt17972_super2.kt"); } + @Test @TestMetadata("kt17972_super3.kt") public void testKt17972_super3() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt17972_super3.kt"); } + @Test @TestMetadata("kt19389.kt") public void testKt19389() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt19389.kt"); } + @Test @TestMetadata("kt19399.kt") public void testKt19399() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt19399.kt"); } + @Test @TestMetadata("kt19434.kt") public void testKt19434() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt19434.kt"); } + @Test @TestMetadata("kt19434_2.kt") public void testKt19434_2() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt19434_2.kt"); } + @Test @TestMetadata("kt19723.kt") public void testKt19723() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt19723.kt"); } + @Test + @TestMetadata("kt29595.kt") + public void testKt29595() throws Exception { + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt29595.kt"); + } + + @Test @TestMetadata("kt34656.kt") public void testKt34656() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt34656.kt"); } + @Test @TestMetadata("kt38197.kt") public void testKt38197() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt38197.kt"); } + @Test @TestMetadata("kt42815.kt") public void testKt42815() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt42815.kt"); } + @Test @TestMetadata("kt42815_delegated.kt") public void testKt42815_delegated() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt42815_delegated.kt"); } + @Test + @TestMetadata("kt6007.kt") + public void testKt6007() throws Exception { + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt6007.kt"); + } + + @Test @TestMetadata("kt6552.kt") public void testKt6552() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt6552.kt"); } + @Test @TestMetadata("kt8133.kt") public void testKt8133() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt8133.kt"); } + @Test @TestMetadata("kt9064.kt") public void testKt9064() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt9064.kt"); } + @Test @TestMetadata("kt9064v2.kt") public void testKt9064v2() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt9064v2.kt"); } + @Test @TestMetadata("kt9591.kt") public void testKt9591() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt9591.kt"); } + @Test @TestMetadata("kt9877.kt") public void testKt9877() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt9877.kt"); } + @Test @TestMetadata("kt9877_2.kt") public void testKt9877_2() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt9877_2.kt"); } + @Test @TestMetadata("objectInLambdaCapturesAnotherObject.kt") public void testObjectInLambdaCapturesAnotherObject() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/objectInLambdaCapturesAnotherObject.kt"); } + @Test @TestMetadata("safeCall.kt") public void testSafeCall() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/safeCall.kt"); } + @Test @TestMetadata("safeCall_2.kt") public void testSafeCall_2() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/safeCall_2.kt"); } + @Test @TestMetadata("sam.kt") public void testSam() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/sam.kt"); } + @Test @TestMetadata("sharedFromCrossinline.kt") public void testSharedFromCrossinline() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/sharedFromCrossinline.kt"); } + @Test @TestMetadata("superConstructorWithObjectParameter.kt") public void testSuperConstructorWithObjectParameter() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/superConstructorWithObjectParameter.kt"); } + @Test @TestMetadata("typeInfo.kt") public void testTypeInfo() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/typeInfo.kt"); } + @Test @TestMetadata("withInlineMethod.kt") public void testWithInlineMethod() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/withInlineMethod.kt"); } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/anonymousObject/enumWhen") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class EnumWhen extends AbstractIrCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class EnumWhen { + @Test public void testAllFilesPresentInEnumWhen() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/anonymousObject/enumWhen"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("callSite.kt") public void testCallSite() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/enumWhen/callSite.kt"); } + @Test @TestMetadata("declSite.kt") public void testDeclSite() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/enumWhen/declSite.kt"); } + @Test @TestMetadata("declSiteSeveralMappings.kt") public void testDeclSiteSeveralMappings() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/enumWhen/declSiteSeveralMappings.kt"); } + @Test @TestMetadata("declSiteSeveralMappingsDifOrder.kt") public void testDeclSiteSeveralMappingsDifOrder() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/enumWhen/declSiteSeveralMappingsDifOrder.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class ProperRecapturing extends AbstractIrCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class ProperRecapturing { + @Test public void testAllFilesPresentInProperRecapturing() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("inlineChain.kt") public void testInlineChain() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/inlineChain.kt"); } + @Test @TestMetadata("lambdaChain.kt") public void testLambdaChain() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChain.kt"); } + @Test @TestMetadata("lambdaChainSimple.kt") public void testLambdaChainSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChainSimple.kt"); } + @Test @TestMetadata("lambdaChain_2.kt") public void testLambdaChain_2() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChain_2.kt"); } + @Test @TestMetadata("lambdaChain_3.kt") public void testLambdaChain_3() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChain_3.kt"); } + @Test @TestMetadata("noInlineLambda.kt") public void testNoInlineLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/noInlineLambda.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class ProperRecapturingInClass extends AbstractIrCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class ProperRecapturingInClass { + @Test public void testAllFilesPresentInProperRecapturingInClass() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("inlineChain.kt") public void testInlineChain() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/inlineChain.kt"); } + @Test @TestMetadata("inlinelambdaChain.kt") public void testInlinelambdaChain() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/inlinelambdaChain.kt"); } + @Test @TestMetadata("lambdaChain.kt") public void testLambdaChain() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChain.kt"); } + @Test @TestMetadata("lambdaChainSimple.kt") public void testLambdaChainSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChainSimple.kt"); } + @Test @TestMetadata("lambdaChainSimple_2.kt") public void testLambdaChainSimple_2() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChainSimple_2.kt"); } + @Test @TestMetadata("lambdaChain_2.kt") public void testLambdaChain_2() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChain_2.kt"); } + @Test @TestMetadata("lambdaChain_3.kt") public void testLambdaChain_3() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChain_3.kt"); } + @Test @TestMetadata("noCapturedThisOnCallSite.kt") public void testNoCapturedThisOnCallSite() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/noCapturedThisOnCallSite.kt"); } + @Test @TestMetadata("noInlineLambda.kt") public void testNoInlineLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/noInlineLambda.kt"); } + @Test @TestMetadata("twoInlineLambda.kt") public void testTwoInlineLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/twoInlineLambda.kt"); } + @Test @TestMetadata("twoInlineLambdaComplex.kt") public void testTwoInlineLambdaComplex() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/twoInlineLambdaComplex.kt"); } + @Test @TestMetadata("twoInlineLambdaComplex_2.kt") public void testTwoInlineLambdaComplex_2() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/twoInlineLambdaComplex_2.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/anonymousObject/sam") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Sam extends AbstractIrCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Sam { + @Test public void testAllFilesPresentInSam() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/anonymousObject/sam"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("anonymousObjectToSam.kt") public void testAnonymousObjectToSam() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/sam/anonymousObjectToSam.kt"); } + @Test @TestMetadata("kt17091.kt") public void testKt17091() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/sam/kt17091.kt"); } + @Test @TestMetadata("kt21671.kt") public void testKt21671() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/sam/kt21671.kt"); } + @Test @TestMetadata("kt21671_2.kt") public void testKt21671_2() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/sam/kt21671_2.kt"); } + @Test @TestMetadata("kt21671_3.kt") public void testKt21671_3() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/sam/kt21671_3.kt"); } + @Test @TestMetadata("kt22304.kt") public void testKt22304() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/sam/kt22304.kt"); } + @Test @TestMetadata("samOnCallSite.kt") public void testSamOnCallSite() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/sam/samOnCallSite.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class TwoCapturedReceivers extends AbstractIrCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class TwoCapturedReceivers { + @Test public void testAllFilesPresentInTwoCapturedReceivers() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("kt8668.kt") public void testKt8668() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668.kt"); } + @Test @TestMetadata("kt8668_2.kt") public void testKt8668_2() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668_2.kt"); } + @Test @TestMetadata("kt8668_3.kt") public void testKt8668_3() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668_3.kt"); } + @Test @TestMetadata("twoDifferentDispatchReceivers.kt") public void testTwoDifferentDispatchReceivers() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/twoDifferentDispatchReceivers.kt"); } + @Test @TestMetadata("twoExtensionReceivers.kt") public void testTwoExtensionReceivers() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/twoExtensionReceivers.kt"); @@ -573,465 +655,525 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/argumentOrder") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class ArgumentOrder extends AbstractIrCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class ArgumentOrder { + @Test public void testAllFilesPresentInArgumentOrder() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/argumentOrder"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("boundFunctionReference.kt") public void testBoundFunctionReference() throws Exception { runTest("compiler/testData/codegen/boxInline/argumentOrder/boundFunctionReference.kt"); } + @Test @TestMetadata("boundFunctionReference2.kt") public void testBoundFunctionReference2() throws Exception { runTest("compiler/testData/codegen/boxInline/argumentOrder/boundFunctionReference2.kt"); } + @Test @TestMetadata("captured.kt") public void testCaptured() throws Exception { runTest("compiler/testData/codegen/boxInline/argumentOrder/captured.kt"); } + @Test @TestMetadata("capturedInExtension.kt") public void testCapturedInExtension() throws Exception { runTest("compiler/testData/codegen/boxInline/argumentOrder/capturedInExtension.kt"); } + @Test @TestMetadata("defaultParametersAndLastVararg.kt") public void testDefaultParametersAndLastVararg() throws Exception { runTest("compiler/testData/codegen/boxInline/argumentOrder/defaultParametersAndLastVararg.kt"); } + @Test @TestMetadata("defaultParametersAndLastVarargWithCorrectOrder.kt") public void testDefaultParametersAndLastVarargWithCorrectOrder() throws Exception { runTest("compiler/testData/codegen/boxInline/argumentOrder/defaultParametersAndLastVarargWithCorrectOrder.kt"); } + @Test @TestMetadata("extension.kt") public void testExtension() throws Exception { runTest("compiler/testData/codegen/boxInline/argumentOrder/extension.kt"); } + @Test @TestMetadata("extensionInClass.kt") public void testExtensionInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/argumentOrder/extensionInClass.kt"); } + @Test @TestMetadata("lambdaMigration.kt") public void testLambdaMigration() throws Exception { runTest("compiler/testData/codegen/boxInline/argumentOrder/lambdaMigration.kt"); } + @Test @TestMetadata("lambdaMigrationInClass.kt") public void testLambdaMigrationInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/argumentOrder/lambdaMigrationInClass.kt"); } + @Test @TestMetadata("simple.kt") public void testSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/argumentOrder/simple.kt"); } + @Test @TestMetadata("simpleInClass.kt") public void testSimpleInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/argumentOrder/simpleInClass.kt"); } + @Test @TestMetadata("varargAndDefaultParameters.kt") public void testVarargAndDefaultParameters() throws Exception { runTest("compiler/testData/codegen/boxInline/argumentOrder/varargAndDefaultParameters.kt"); } + @Test @TestMetadata("varargAndDefaultParametersWithCorrectOrder.kt") public void testVarargAndDefaultParametersWithCorrectOrder() throws Exception { runTest("compiler/testData/codegen/boxInline/argumentOrder/varargAndDefaultParametersWithCorrectOrder.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/arrayConvention") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class ArrayConvention extends AbstractIrCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class ArrayConvention { + @Test public void testAllFilesPresentInArrayConvention() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/arrayConvention"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("simpleAccess.kt") public void testSimpleAccess() throws Exception { runTest("compiler/testData/codegen/boxInline/arrayConvention/simpleAccess.kt"); } + @Test @TestMetadata("simpleAccessInClass.kt") public void testSimpleAccessInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/arrayConvention/simpleAccessInClass.kt"); } + @Test @TestMetadata("simpleAccessWithDefault.kt") public void testSimpleAccessWithDefault() throws Exception { runTest("compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithDefault.kt"); } + @Test @TestMetadata("simpleAccessWithDefaultInClass.kt") public void testSimpleAccessWithDefaultInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithDefaultInClass.kt"); } + @Test @TestMetadata("simpleAccessWithLambda.kt") public void testSimpleAccessWithLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithLambda.kt"); } + @Test @TestMetadata("simpleAccessWithLambdaInClass.kt") public void testSimpleAccessWithLambdaInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithLambdaInClass.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/assert") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Assert extends AbstractIrCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Assert { + @Test public void testAllFilesPresentInAssert() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/assert"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("jvmAssertInlineFunctionAssertionsDisabled.kt") public void testJvmAssertInlineFunctionAssertionsDisabled() throws Exception { runTest("compiler/testData/codegen/boxInline/assert/jvmAssertInlineFunctionAssertionsDisabled.kt"); } + @Test @TestMetadata("jvmAssertInlineFunctionAssertionsEnabled.kt") public void testJvmAssertInlineFunctionAssertionsEnabled() throws Exception { runTest("compiler/testData/codegen/boxInline/assert/jvmAssertInlineFunctionAssertionsEnabled.kt"); } + @Test @TestMetadata("jvmAssertInlineLambda.kt") public void testJvmAssertInlineLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/assert/jvmAssertInlineLambda.kt"); } + @Test @TestMetadata("jvmClassInitializer.kt") public void testJvmClassInitializer() throws Exception { runTest("compiler/testData/codegen/boxInline/assert/jvmClassInitializer.kt"); } + @Test @TestMetadata("jvmCompanion.kt") public void testJvmCompanion() throws Exception { runTest("compiler/testData/codegen/boxInline/assert/jvmCompanion.kt"); } + @Test @TestMetadata("jvmCrossinlineLambda.kt") public void testJvmCrossinlineLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/assert/jvmCrossinlineLambda.kt"); } + @Test @TestMetadata("jvmCrossinlineLambda2.kt") public void testJvmCrossinlineLambda2() throws Exception { runTest("compiler/testData/codegen/boxInline/assert/jvmCrossinlineLambda2.kt"); } + @Test @TestMetadata("jvmCrossinlineLambdaDeclarationSite.kt") public void testJvmCrossinlineLambdaDeclarationSite() throws Exception { runTest("compiler/testData/codegen/boxInline/assert/jvmCrossinlineLambdaDeclarationSite.kt"); } + @Test @TestMetadata("jvmCrossinlineLambdaDeclarationSiteOnly.kt") public void testJvmCrossinlineLambdaDeclarationSiteOnly() throws Exception { runTest("compiler/testData/codegen/boxInline/assert/jvmCrossinlineLambdaDeclarationSiteOnly.kt"); } + @Test @TestMetadata("jvmCrossinlineSAMDeclarationSite.kt") public void testJvmCrossinlineSAMDeclarationSite() throws Exception { runTest("compiler/testData/codegen/boxInline/assert/jvmCrossinlineSAMDeclarationSite.kt"); } + @Test @TestMetadata("jvmDoubleInline.kt") public void testJvmDoubleInline() throws Exception { runTest("compiler/testData/codegen/boxInline/assert/jvmDoubleInline.kt"); } + @Test @TestMetadata("jvmInlineUsedAsNoinline.kt") public void testJvmInlineUsedAsNoinline() throws Exception { runTest("compiler/testData/codegen/boxInline/assert/jvmInlineUsedAsNoinline.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/builders") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Builders extends AbstractIrCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Builders { + @Test public void testAllFilesPresentInBuilders() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/builders"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("builders.kt") public void testBuilders() throws Exception { runTest("compiler/testData/codegen/boxInline/builders/builders.kt"); } + @Test @TestMetadata("buildersAndLambdaCapturing.kt") public void testBuildersAndLambdaCapturing() throws Exception { runTest("compiler/testData/codegen/boxInline/builders/buildersAndLambdaCapturing.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/bytecodePreprocessing") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class BytecodePreprocessing extends AbstractIrCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class BytecodePreprocessing { + @Test public void testAllFilesPresentInBytecodePreprocessing() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/bytecodePreprocessing"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("apiVersionAtLeast1.kt") public void testApiVersionAtLeast1() throws Exception { runTest("compiler/testData/codegen/boxInline/bytecodePreprocessing/apiVersionAtLeast1.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/callableReference") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class CallableReference extends AbstractIrCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class CallableReference { + @Test @TestMetadata("adapted.kt") public void testAdapted() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/adapted.kt"); } + @Test public void testAllFilesPresentInCallableReference() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/callableReference"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("classLevel.kt") public void testClassLevel() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/classLevel.kt"); } + @Test @TestMetadata("classLevel2.kt") public void testClassLevel2() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/classLevel2.kt"); } + @Test @TestMetadata("constructor.kt") public void testConstructor() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/constructor.kt"); } + @Test @TestMetadata("innerGenericConstuctor.kt") public void testInnerGenericConstuctor() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/innerGenericConstuctor.kt"); } + @Test @TestMetadata("intrinsic.kt") public void testIntrinsic() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/intrinsic.kt"); } + @Test @TestMetadata("jvmFieldProperty.kt") public void testJvmFieldProperty() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/jvmFieldProperty.kt"); } + @Test @TestMetadata("kt15449.kt") public void testKt15449() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/kt15449.kt"); } + @Test @TestMetadata("kt15751_2.kt") public void testKt15751_2() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/kt15751_2.kt"); } + @Test @TestMetadata("kt16411.kt") public void testKt16411() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/kt16411.kt"); } + @Test @TestMetadata("kt35101.kt") public void testKt35101() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/kt35101.kt"); } + @Test @TestMetadata("propertyIntrinsic.kt") public void testPropertyIntrinsic() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/propertyIntrinsic.kt"); } + @Test @TestMetadata("propertyReference.kt") public void testPropertyReference() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/propertyReference.kt"); } + @Test @TestMetadata("topLevel.kt") public void testTopLevel() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/topLevel.kt"); } + @Test @TestMetadata("topLevelExtension.kt") public void testTopLevelExtension() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/topLevelExtension.kt"); } + @Test @TestMetadata("topLevelProperty.kt") public void testTopLevelProperty() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/topLevelProperty.kt"); } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/callableReference/bound") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Bound extends AbstractIrCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Bound { + @Test public void testAllFilesPresentInBound() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/callableReference/bound"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("classProperty.kt") public void testClassProperty() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/classProperty.kt"); } + @Test @TestMetadata("emptyLhsFunction.kt") public void testEmptyLhsFunction() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/emptyLhsFunction.kt"); } + @Test @TestMetadata("emptyLhsOnInlineProperty.kt") public void testEmptyLhsOnInlineProperty() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/emptyLhsOnInlineProperty.kt"); } + @Test @TestMetadata("emptyLhsProperty.kt") public void testEmptyLhsProperty() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/emptyLhsProperty.kt"); } + @Test @TestMetadata("expression.kt") public void testExpression() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/expression.kt"); } + @Test @TestMetadata("extensionReceiver.kt") public void testExtensionReceiver() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/extensionReceiver.kt"); } + @Test @TestMetadata("filter.kt") public void testFilter() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/filter.kt"); } + @Test @TestMetadata("inlineValueParameterInsteadOfReceiver.kt") public void testInlineValueParameterInsteadOfReceiver() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/inlineValueParameterInsteadOfReceiver.kt"); } + @Test @TestMetadata("innerGenericConstuctor.kt") public void testInnerGenericConstuctor() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/innerGenericConstuctor.kt"); } + @Test @TestMetadata("intrinsic.kt") public void testIntrinsic() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/intrinsic.kt"); } + @Test @TestMetadata("jvmFieldProperty.kt") public void testJvmFieldProperty() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/jvmFieldProperty.kt"); } + @Test @TestMetadata("kt18728.kt") public void testKt18728() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/kt18728.kt"); } + @Test @TestMetadata("kt18728_2.kt") public void testKt18728_2() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/kt18728_2.kt"); } + @Test @TestMetadata("kt18728_3.kt") public void testKt18728_3() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/kt18728_3.kt"); } + @Test @TestMetadata("kt18728_4.kt") public void testKt18728_4() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/kt18728_4.kt"); } + @Test + @TestMetadata("lambdaOnLhs.kt") + public void testLambdaOnLhs() throws Exception { + runTest("compiler/testData/codegen/boxInline/callableReference/bound/lambdaOnLhs.kt"); + } + + @Test @TestMetadata("map.kt") public void testMap() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/map.kt"); } + @Test @TestMetadata("mixed.kt") public void testMixed() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/mixed.kt"); } + @Test @TestMetadata("objectProperty.kt") public void testObjectProperty() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/objectProperty.kt"); } + @Test @TestMetadata("propertyImportedFromObject.kt") public void testPropertyImportedFromObject() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/propertyImportedFromObject.kt"); } + @Test @TestMetadata("sideEffect.kt") public void testSideEffect() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/sideEffect.kt"); } + @Test @TestMetadata("simple.kt") public void testSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/simple.kt"); } + @Test @TestMetadata("simpleVal.kt") public void testSimpleVal() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/simpleVal.kt"); } + @Test @TestMetadata("simpleVal2.kt") public void testSimpleVal2() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/simpleVal2.kt"); } + @Test @TestMetadata("topLevelExtensionProperty.kt") public void testTopLevelExtensionProperty() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/topLevelExtensionProperty.kt"); @@ -1039,649 +1181,740 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/capture") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Capture extends AbstractIrCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Capture { + @Test public void testAllFilesPresentInCapture() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/capture"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("captureInlinable.kt") public void testCaptureInlinable() throws Exception { runTest("compiler/testData/codegen/boxInline/capture/captureInlinable.kt"); } + @Test @TestMetadata("captureInlinableAndOther.kt") public void testCaptureInlinableAndOther() throws Exception { runTest("compiler/testData/codegen/boxInline/capture/captureInlinableAndOther.kt"); } + @Test @TestMetadata("captureThisAndReceiver.kt") public void testCaptureThisAndReceiver() throws Exception { runTest("compiler/testData/codegen/boxInline/capture/captureThisAndReceiver.kt"); } + @Test @TestMetadata("generics.kt") public void testGenerics() throws Exception { runTest("compiler/testData/codegen/boxInline/capture/generics.kt"); } + @Test @TestMetadata("simpleCapturingInClass.kt") public void testSimpleCapturingInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/capture/simpleCapturingInClass.kt"); } + @Test @TestMetadata("simpleCapturingInPackage.kt") public void testSimpleCapturingInPackage() throws Exception { runTest("compiler/testData/codegen/boxInline/capture/simpleCapturingInPackage.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/complex") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Complex extends AbstractIrCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Complex { + @Test public void testAllFilesPresentInComplex() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/complex"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("closureChain.kt") public void testClosureChain() throws Exception { runTest("compiler/testData/codegen/boxInline/complex/closureChain.kt"); } + @Test @TestMetadata("forEachLine.kt") public void testForEachLine() throws Exception { runTest("compiler/testData/codegen/boxInline/complex/forEachLine.kt"); } + @Test @TestMetadata("kt44429.kt") public void testKt44429() throws Exception { runTest("compiler/testData/codegen/boxInline/complex/kt44429.kt"); } + @Test @TestMetadata("lambdaInLambda.kt") public void testLambdaInLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/complex/lambdaInLambda.kt"); } + @Test @TestMetadata("swapAndWith.kt") public void testSwapAndWith() throws Exception { runTest("compiler/testData/codegen/boxInline/complex/swapAndWith.kt"); } + @Test @TestMetadata("swapAndWith2.kt") public void testSwapAndWith2() throws Exception { runTest("compiler/testData/codegen/boxInline/complex/swapAndWith2.kt"); } + @Test @TestMetadata("use.kt") public void testUse() throws Exception { runTest("compiler/testData/codegen/boxInline/complex/use.kt"); } + @Test @TestMetadata("with.kt") public void testWith() throws Exception { runTest("compiler/testData/codegen/boxInline/complex/with.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/complexStack") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class ComplexStack extends AbstractIrCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class ComplexStack { + @Test public void testAllFilesPresentInComplexStack() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/complexStack"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("asCheck.kt") public void testAsCheck() throws Exception { runTest("compiler/testData/codegen/boxInline/complexStack/asCheck.kt"); } + @Test @TestMetadata("asCheck2.kt") public void testAsCheck2() throws Exception { runTest("compiler/testData/codegen/boxInline/complexStack/asCheck2.kt"); } + @Test @TestMetadata("breakContinueInInlineLambdaArgument.kt") public void testBreakContinueInInlineLambdaArgument() throws Exception { runTest("compiler/testData/codegen/boxInline/complexStack/breakContinueInInlineLambdaArgument.kt"); } + @Test @TestMetadata("simple.kt") public void testSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/complexStack/simple.kt"); } + @Test @TestMetadata("simple2.kt") public void testSimple2() throws Exception { runTest("compiler/testData/codegen/boxInline/complexStack/simple2.kt"); } + @Test @TestMetadata("simple3.kt") public void testSimple3() throws Exception { runTest("compiler/testData/codegen/boxInline/complexStack/simple3.kt"); } + @Test @TestMetadata("simple4.kt") public void testSimple4() throws Exception { runTest("compiler/testData/codegen/boxInline/complexStack/simple4.kt"); } + @Test @TestMetadata("simpleExtension.kt") public void testSimpleExtension() throws Exception { runTest("compiler/testData/codegen/boxInline/complexStack/simpleExtension.kt"); } + @Test @TestMetadata("spillConstructorArgumentsAndInlineLambdaParameter.kt") public void testSpillConstructorArgumentsAndInlineLambdaParameter() throws Exception { runTest("compiler/testData/codegen/boxInline/complexStack/spillConstructorArgumentsAndInlineLambdaParameter.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/contracts") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Contracts extends AbstractIrCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Contracts { + @Test public void testAllFilesPresentInContracts() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/contracts"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("cfgDependendValInitialization.kt") public void testCfgDependendValInitialization() throws Exception { runTest("compiler/testData/codegen/boxInline/contracts/cfgDependendValInitialization.kt"); } + @Test @TestMetadata("complexInitializer.kt") public void testComplexInitializer() throws Exception { runTest("compiler/testData/codegen/boxInline/contracts/complexInitializer.kt"); } + @Test @TestMetadata("complexInitializerWithStackTransformation.kt") public void testComplexInitializerWithStackTransformation() throws Exception { runTest("compiler/testData/codegen/boxInline/contracts/complexInitializerWithStackTransformation.kt"); } + @Test @TestMetadata("crossinlineCallableReference.kt") public void testCrossinlineCallableReference() throws Exception { runTest("compiler/testData/codegen/boxInline/contracts/crossinlineCallableReference.kt"); } + @Test @TestMetadata("definiteLongValInitialization.kt") public void testDefiniteLongValInitialization() throws Exception { runTest("compiler/testData/codegen/boxInline/contracts/definiteLongValInitialization.kt"); } + @Test @TestMetadata("definiteNestedValInitialization.kt") public void testDefiniteNestedValInitialization() throws Exception { runTest("compiler/testData/codegen/boxInline/contracts/definiteNestedValInitialization.kt"); } + @Test @TestMetadata("definiteValInitInInitializer.kt") public void testDefiniteValInitInInitializer() throws Exception { runTest("compiler/testData/codegen/boxInline/contracts/definiteValInitInInitializer.kt"); } + @Test @TestMetadata("definiteValInitialization.kt") public void testDefiniteValInitialization() throws Exception { runTest("compiler/testData/codegen/boxInline/contracts/definiteValInitialization.kt"); } + @Test @TestMetadata("exactlyOnceCrossinline.kt") public void testExactlyOnceCrossinline() throws Exception { runTest("compiler/testData/codegen/boxInline/contracts/exactlyOnceCrossinline.kt"); } + @Test @TestMetadata("exactlyOnceCrossinline2.kt") public void testExactlyOnceCrossinline2() throws Exception { runTest("compiler/testData/codegen/boxInline/contracts/exactlyOnceCrossinline2.kt"); } + @Test @TestMetadata("exactlyOnceNoinline.kt") public void testExactlyOnceNoinline() throws Exception { runTest("compiler/testData/codegen/boxInline/contracts/exactlyOnceNoinline.kt"); } + @Test @TestMetadata("nonLocalReturn.kt") public void testNonLocalReturn() throws Exception { runTest("compiler/testData/codegen/boxInline/contracts/nonLocalReturn.kt"); } + @Test @TestMetadata("nonLocalReturnWithCycle.kt") public void testNonLocalReturnWithCycle() throws Exception { runTest("compiler/testData/codegen/boxInline/contracts/nonLocalReturnWithCycle.kt"); } + @Test @TestMetadata("propertyInitialization.kt") public void testPropertyInitialization() throws Exception { runTest("compiler/testData/codegen/boxInline/contracts/propertyInitialization.kt"); } + @Test @TestMetadata("valInitializationAndUsageInNestedLambda.kt") public void testValInitializationAndUsageInNestedLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/contracts/valInitializationAndUsageInNestedLambda.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/defaultValues") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class DefaultValues extends AbstractIrCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class DefaultValues { + @Test @TestMetadata("33Parameters.kt") public void test33Parameters() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/33Parameters.kt"); } + @Test @TestMetadata("33ParametersInConstructor.kt") public void test33ParametersInConstructor() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/33ParametersInConstructor.kt"); } + @Test public void testAllFilesPresentInDefaultValues() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/defaultValues"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("defaultInExtension.kt") public void testDefaultInExtension() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/defaultInExtension.kt"); } + @Test @TestMetadata("defaultMethod.kt") public void testDefaultMethod() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/defaultMethod.kt"); } + @Test @TestMetadata("defaultMethodInClass.kt") public void testDefaultMethodInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/defaultMethodInClass.kt"); } + @Test @TestMetadata("defaultParamRemapping.kt") public void testDefaultParamRemapping() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/defaultParamRemapping.kt"); } + @Test @TestMetadata("inlineInDefaultParameter.kt") public void testInlineInDefaultParameter() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/inlineInDefaultParameter.kt"); } + @Test @TestMetadata("inlineLambdaInNoInlineDefault.kt") public void testInlineLambdaInNoInlineDefault() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/inlineLambdaInNoInlineDefault.kt"); } + @Test @TestMetadata("kt11479.kt") public void testKt11479() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/kt11479.kt"); } + @Test @TestMetadata("kt11479InlinedDefaultParameter.kt") public void testKt11479InlinedDefaultParameter() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/kt11479InlinedDefaultParameter.kt"); } + @Test @TestMetadata("kt14564.kt") public void testKt14564() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/kt14564.kt"); } + @Test @TestMetadata("kt14564_2.kt") public void testKt14564_2() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/kt14564_2.kt"); } + @Test @TestMetadata("kt16496.kt") public void testKt16496() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/kt16496.kt"); } + @Test @TestMetadata("kt18689.kt") public void testKt18689() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/kt18689.kt"); } + @Test @TestMetadata("kt18689_2.kt") public void testKt18689_2() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/kt18689_2.kt"); } + @Test @TestMetadata("kt18689_3.kt") public void testKt18689_3() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/kt18689_3.kt"); } + @Test @TestMetadata("kt18689_4.kt") public void testKt18689_4() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/kt18689_4.kt"); } + @Test @TestMetadata("kt5685.kt") public void testKt5685() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/kt5685.kt"); } + @Test @TestMetadata("simpleDefaultMethod.kt") public void testSimpleDefaultMethod() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/simpleDefaultMethod.kt"); } + @Test @TestMetadata("varArgNoInline.kt") public void testVarArgNoInline() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/varArgNoInline.kt"); } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class LambdaInlining extends AbstractIrCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class LambdaInlining { + @Test public void testAllFilesPresentInLambdaInlining() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("checkLambdaClassIsPresent.kt") public void testCheckLambdaClassIsPresent() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/checkLambdaClassIsPresent.kt"); } + @Test @TestMetadata("checkLambdaClassesArePresent.kt") public void testCheckLambdaClassesArePresent() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/checkLambdaClassesArePresent.kt"); } + @Test @TestMetadata("checkObjectClassIsPresent.kt") public void testCheckObjectClassIsPresent() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/checkObjectClassIsPresent.kt"); } + @Test @TestMetadata("checkStaticLambdaClassIsPresent.kt") public void testCheckStaticLambdaClassIsPresent() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/checkStaticLambdaClassIsPresent.kt"); } + @Test @TestMetadata("checkStaticLambdaClassesArePresent.kt") public void testCheckStaticLambdaClassesArePresent() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/checkStaticLambdaClassesArePresent.kt"); } + @Test @TestMetadata("checkStaticObjectClassIsPresent.kt") public void testCheckStaticObjectClassIsPresent() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/checkStaticObjectClassIsPresent.kt"); } + @Test @TestMetadata("defaultCallInDefaultLambda.kt") public void testDefaultCallInDefaultLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/defaultCallInDefaultLambda.kt"); } + @Test @TestMetadata("defaultLambdaInNoInline.kt") public void testDefaultLambdaInNoInline() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/defaultLambdaInNoInline.kt"); } + @Test @TestMetadata("differentInvokeSignature.kt") public void testDifferentInvokeSignature() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/differentInvokeSignature.kt"); } + @Test @TestMetadata("genericLambda.kt") public void testGenericLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/genericLambda.kt"); } + @Test @TestMetadata("instanceCapturedInClass.kt") public void testInstanceCapturedInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/instanceCapturedInClass.kt"); } + @Test @TestMetadata("instanceCapturedInInterface.kt") public void testInstanceCapturedInInterface() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/instanceCapturedInInterface.kt"); } + @Test @TestMetadata("jvmStaticDefault.kt") public void testJvmStaticDefault() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/jvmStaticDefault.kt"); } + @Test @TestMetadata("kt21827.kt") public void testKt21827() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/kt21827.kt"); } + @Test @TestMetadata("kt21946.kt") public void testKt21946() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/kt21946.kt"); } + @Test @TestMetadata("kt24477.kt") public void testKt24477() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/kt24477.kt"); } + @Test @TestMetadata("kt25106.kt") public void testKt25106() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/kt25106.kt"); } + @Test @TestMetadata("kt26636.kt") public void testKt26636() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/kt26636.kt"); } + @Test @TestMetadata("noInline.kt") public void testNoInline() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/noInline.kt"); } + @Test @TestMetadata("nonDefaultInlineInNoInline.kt") public void testNonDefaultInlineInNoInline() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/nonDefaultInlineInNoInline.kt"); } + @Test @TestMetadata("receiverClash.kt") public void testReceiverClash() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/receiverClash.kt"); } + @Test @TestMetadata("receiverClash2.kt") public void testReceiverClash2() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/receiverClash2.kt"); } + @Test @TestMetadata("receiverClashInClass.kt") public void testReceiverClashInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/receiverClashInClass.kt"); } + @Test @TestMetadata("receiverClashInClass2.kt") public void testReceiverClashInClass2() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/receiverClashInClass2.kt"); } + @Test @TestMetadata("simple.kt") public void testSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simple.kt"); } + @Test @TestMetadata("simpleErased.kt") public void testSimpleErased() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simpleErased.kt"); } + @Test @TestMetadata("simpleErasedStaticInstance.kt") public void testSimpleErasedStaticInstance() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simpleErasedStaticInstance.kt"); } + @Test @TestMetadata("simpleExtension.kt") public void testSimpleExtension() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simpleExtension.kt"); } + @Test @TestMetadata("simpleGeneric.kt") public void testSimpleGeneric() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simpleGeneric.kt"); } + @Test @TestMetadata("simpleStaticInstance.kt") public void testSimpleStaticInstance() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simpleStaticInstance.kt"); } + @Test @TestMetadata("thisClash.kt") public void testThisClash() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/thisClash.kt"); } + @Test @TestMetadata("thisClashInClass.kt") public void testThisClashInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/thisClashInClass.kt"); } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class CallableReferences extends AbstractIrCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class CallableReferences { + @Test public void testAllFilesPresentInCallableReferences() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("boundFunctionReference.kt") public void testBoundFunctionReference() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundFunctionReference.kt"); } + @Test @TestMetadata("boundFunctionReferenceOnInt.kt") public void testBoundFunctionReferenceOnInt() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundFunctionReferenceOnInt.kt"); } + @Test @TestMetadata("boundFunctionReferenceOnLong.kt") public void testBoundFunctionReferenceOnLong() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundFunctionReferenceOnLong.kt"); } + @Test @TestMetadata("boundPropertyReference.kt") public void testBoundPropertyReference() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundPropertyReference.kt"); } + @Test @TestMetadata("boundPropertyReferenceOnInt.kt") public void testBoundPropertyReferenceOnInt() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundPropertyReferenceOnInt.kt"); } + @Test @TestMetadata("boundPropertyReferenceOnLong.kt") public void testBoundPropertyReferenceOnLong() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundPropertyReferenceOnLong.kt"); } + @Test @TestMetadata("constuctorReference.kt") public void testConstuctorReference() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/constuctorReference.kt"); } + @Test @TestMetadata("differentInvokeSignature.kt") public void testDifferentInvokeSignature() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/differentInvokeSignature.kt"); } + @Test @TestMetadata("differentInvokeSignature2.kt") public void testDifferentInvokeSignature2() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/differentInvokeSignature2.kt"); } + @Test @TestMetadata("functionImportedFromObject.kt") public void testFunctionImportedFromObject() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/functionImportedFromObject.kt"); } + @Test @TestMetadata("functionReference.kt") public void testFunctionReference() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/functionReference.kt"); } + @Test @TestMetadata("functionReferenceFromClass.kt") public void testFunctionReferenceFromClass() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/functionReferenceFromClass.kt"); } + @Test @TestMetadata("functionReferenceFromObject.kt") public void testFunctionReferenceFromObject() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/functionReferenceFromObject.kt"); } + @Test @TestMetadata("innerClassConstuctorReference.kt") public void testInnerClassConstuctorReference() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/innerClassConstuctorReference.kt"); } + @Test @TestMetadata("mutableBoundPropertyReferenceFromClass.kt") public void testMutableBoundPropertyReferenceFromClass() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/mutableBoundPropertyReferenceFromClass.kt"); } + @Test @TestMetadata("mutablePropertyReferenceFromClass.kt") public void testMutablePropertyReferenceFromClass() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/mutablePropertyReferenceFromClass.kt"); } + @Test @TestMetadata("privateFunctionReference.kt") public void testPrivateFunctionReference() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/privateFunctionReference.kt"); } + @Test @TestMetadata("privatePropertyReference.kt") public void testPrivatePropertyReference() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/privatePropertyReference.kt"); } + @Test @TestMetadata("propertyImportedFromObject.kt") public void testPropertyImportedFromObject() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/propertyImportedFromObject.kt"); } + @Test @TestMetadata("propertyReference.kt") public void testPropertyReference() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/propertyReference.kt"); } + @Test @TestMetadata("propertyReferenceFromClass.kt") public void testPropertyReferenceFromClass() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/propertyReferenceFromClass.kt"); } + @Test @TestMetadata("propertyReferenceFromObject.kt") public void testPropertyReferenceFromObject() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/propertyReferenceFromObject.kt"); @@ -1689,48 +1922,52 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/defaultValues/maskElimination") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class MaskElimination extends AbstractIrCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class MaskElimination { + @Test @TestMetadata("32Parameters.kt") public void test32Parameters() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/maskElimination/32Parameters.kt"); } + @Test @TestMetadata("33Parameters.kt") public void test33Parameters() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/maskElimination/33Parameters.kt"); } + @Test public void testAllFilesPresentInMaskElimination() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/defaultValues/maskElimination"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("kt18792.kt") public void testKt18792() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/maskElimination/kt18792.kt"); } + @Test @TestMetadata("kt19679.kt") public void testKt19679() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/maskElimination/kt19679.kt"); } + @Test @TestMetadata("kt19679_2.kt") public void testKt19679_2() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/maskElimination/kt19679_2.kt"); } + @Test @TestMetadata("kt19679_3.kt") public void testKt19679_3() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/maskElimination/kt19679_3.kt"); } + @Test @TestMetadata("simple.kt") public void testSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/maskElimination/simple.kt"); @@ -1738,375 +1975,400 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/delegatedProperty") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class DelegatedProperty extends AbstractIrCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class DelegatedProperty { + @Test public void testAllFilesPresentInDelegatedProperty() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/delegatedProperty"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("kt16864.kt") public void testKt16864() throws Exception { runTest("compiler/testData/codegen/boxInline/delegatedProperty/kt16864.kt"); } + @Test @TestMetadata("local.kt") public void testLocal() throws Exception { runTest("compiler/testData/codegen/boxInline/delegatedProperty/local.kt"); } + @Test @TestMetadata("localDeclaredInLambda.kt") public void testLocalDeclaredInLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/delegatedProperty/localDeclaredInLambda.kt"); } + @Test @TestMetadata("localInAnonymousObject.kt") public void testLocalInAnonymousObject() throws Exception { runTest("compiler/testData/codegen/boxInline/delegatedProperty/localInAnonymousObject.kt"); } + @Test @TestMetadata("localInLambda.kt") public void testLocalInLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/delegatedProperty/localInLambda.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/enclosingInfo") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class EnclosingInfo extends AbstractIrCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class EnclosingInfo { + @Test public void testAllFilesPresentInEnclosingInfo() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/enclosingInfo"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("anonymousInLambda.kt") public void testAnonymousInLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/enclosingInfo/anonymousInLambda.kt"); } + @Test @TestMetadata("inlineChain.kt") public void testInlineChain() throws Exception { runTest("compiler/testData/codegen/boxInline/enclosingInfo/inlineChain.kt"); } + @Test @TestMetadata("inlineChain2.kt") public void testInlineChain2() throws Exception { runTest("compiler/testData/codegen/boxInline/enclosingInfo/inlineChain2.kt"); } + @Test @TestMetadata("objectInInlineFun.kt") public void testObjectInInlineFun() throws Exception { runTest("compiler/testData/codegen/boxInline/enclosingInfo/objectInInlineFun.kt"); } + @Test @TestMetadata("transformedConstructor.kt") public void testTransformedConstructor() throws Exception { runTest("compiler/testData/codegen/boxInline/enclosingInfo/transformedConstructor.kt"); } + @Test @TestMetadata("transformedConstructorWithAdditionalObject.kt") public void testTransformedConstructorWithAdditionalObject() throws Exception { runTest("compiler/testData/codegen/boxInline/enclosingInfo/transformedConstructorWithAdditionalObject.kt"); } + @Test @TestMetadata("transformedConstructorWithNestedInline.kt") public void testTransformedConstructorWithNestedInline() throws Exception { runTest("compiler/testData/codegen/boxInline/enclosingInfo/transformedConstructorWithNestedInline.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/enum") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Enum extends AbstractIrCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Enum { + @Test public void testAllFilesPresentInEnum() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/enum"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("kt10569.kt") public void testKt10569() throws Exception { runTest("compiler/testData/codegen/boxInline/enum/kt10569.kt"); } + @Test @TestMetadata("kt18254.kt") public void testKt18254() throws Exception { runTest("compiler/testData/codegen/boxInline/enum/kt18254.kt"); } + @Test @TestMetadata("valueOf.kt") public void testValueOf() throws Exception { runTest("compiler/testData/codegen/boxInline/enum/valueOf.kt"); } + @Test @TestMetadata("valueOfCapturedType.kt") public void testValueOfCapturedType() throws Exception { runTest("compiler/testData/codegen/boxInline/enum/valueOfCapturedType.kt"); } + @Test @TestMetadata("valueOfChain.kt") public void testValueOfChain() throws Exception { runTest("compiler/testData/codegen/boxInline/enum/valueOfChain.kt"); } + @Test @TestMetadata("valueOfChainCapturedType.kt") public void testValueOfChainCapturedType() throws Exception { runTest("compiler/testData/codegen/boxInline/enum/valueOfChainCapturedType.kt"); } + @Test @TestMetadata("valueOfNonReified.kt") public void testValueOfNonReified() throws Exception { runTest("compiler/testData/codegen/boxInline/enum/valueOfNonReified.kt"); } + @Test @TestMetadata("values.kt") public void testValues() throws Exception { runTest("compiler/testData/codegen/boxInline/enum/values.kt"); } + @Test @TestMetadata("valuesAsArray.kt") public void testValuesAsArray() throws Exception { runTest("compiler/testData/codegen/boxInline/enum/valuesAsArray.kt"); } + @Test @TestMetadata("valuesCapturedType.kt") public void testValuesCapturedType() throws Exception { runTest("compiler/testData/codegen/boxInline/enum/valuesCapturedType.kt"); } + @Test @TestMetadata("valuesChain.kt") public void testValuesChain() throws Exception { runTest("compiler/testData/codegen/boxInline/enum/valuesChain.kt"); } + @Test @TestMetadata("valuesChainCapturedType.kt") public void testValuesChainCapturedType() throws Exception { runTest("compiler/testData/codegen/boxInline/enum/valuesChainCapturedType.kt"); } + @Test @TestMetadata("valuesNonReified.kt") public void testValuesNonReified() throws Exception { runTest("compiler/testData/codegen/boxInline/enum/valuesNonReified.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/functionExpression") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class FunctionExpression extends AbstractIrCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class FunctionExpression { + @Test public void testAllFilesPresentInFunctionExpression() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/functionExpression"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("extension.kt") public void testExtension() throws Exception { runTest("compiler/testData/codegen/boxInline/functionExpression/extension.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/inlineClasses") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class InlineClasses extends AbstractIrCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class InlineClasses { + @Test public void testAllFilesPresentInInlineClasses() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/inlineClasses"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("inlineClassWithInlineValReturningInlineClass.kt") public void testInlineClassWithInlineValReturningInlineClass() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/inlineClassWithInlineValReturningInlineClass.kt"); } + @Test @TestMetadata("inlineFunctionInsideInlineClassesBox.kt") public void testInlineFunctionInsideInlineClassesBox() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/inlineFunctionInsideInlineClassesBox.kt"); } + @Test @TestMetadata("noReturnTypeManglingFun.kt") public void testNoReturnTypeManglingFun() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/noReturnTypeManglingFun.kt"); } + @Test @TestMetadata("noReturnTypeManglingFunJvmName.kt") public void testNoReturnTypeManglingFunJvmName() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/noReturnTypeManglingFunJvmName.kt"); } + @Test @TestMetadata("noReturnTypeManglingVal.kt") public void testNoReturnTypeManglingVal() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/noReturnTypeManglingVal.kt"); } + @Test @TestMetadata("withReturnTypeManglingFun.kt") public void testWithReturnTypeManglingFun() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/withReturnTypeManglingFun.kt"); } + @Test @TestMetadata("withReturnTypeManglingFunJvmName.kt") public void testWithReturnTypeManglingFunJvmName() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/withReturnTypeManglingFunJvmName.kt"); } + @Test @TestMetadata("withReturnTypeManglingVal.kt") public void testWithReturnTypeManglingVal() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/withReturnTypeManglingVal.kt"); } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class UnboxGenericParameter extends AbstractIrCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class UnboxGenericParameter { + @Test public void testAllFilesPresentInUnboxGenericParameter() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class FunInterface extends AbstractIrCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class FunInterface { + @Test public void testAllFilesPresentInFunInterface() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("any.kt") public void testAny() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/any.kt"); } + @Test @TestMetadata("anyN.kt") public void testAnyN() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/anyN.kt"); } + @Test @TestMetadata("iface.kt") public void testIface() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/iface.kt"); } + @Test @TestMetadata("ifaceChild.kt") public void testIfaceChild() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/ifaceChild.kt"); } + @Test @TestMetadata("primitive.kt") public void testPrimitive() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/primitive.kt"); } + @Test @TestMetadata("string.kt") public void testString() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/string.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Lambda extends AbstractIrCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Lambda { + @Test public void testAllFilesPresentInLambda() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("any.kt") public void testAny() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/any.kt"); } + @Test @TestMetadata("anyN.kt") public void testAnyN() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/anyN.kt"); } + @Test @TestMetadata("iface.kt") public void testIface() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/iface.kt"); } + @Test @TestMetadata("ifaceChild.kt") public void testIfaceChild() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/ifaceChild.kt"); } + @Test @TestMetadata("primitive.kt") public void testPrimitive() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/primitive.kt"); } + @Test @TestMetadata("string.kt") public void testString() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/string.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class ObjectLiteral extends AbstractIrCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class ObjectLiteral { + @Test public void testAllFilesPresentInObjectLiteral() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("any.kt") public void testAny() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/any.kt"); } + @Test @TestMetadata("anyN.kt") public void testAnyN() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/anyN.kt"); } + @Test @TestMetadata("iface.kt") public void testIface() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/iface.kt"); } + @Test @TestMetadata("ifaceChild.kt") public void testIfaceChild() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/ifaceChild.kt"); } + @Test @TestMetadata("primitive.kt") public void testPrimitive() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/primitive.kt"); } + @Test @TestMetadata("string.kt") public void testString() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/string.kt"); @@ -2115,239 +2377,309 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/innerClasses") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class InnerClasses extends AbstractIrCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class InnerClasses { + @Test public void testAllFilesPresentInInnerClasses() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/innerClasses"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("captureThisAndOuter.kt") public void testCaptureThisAndOuter() throws Exception { runTest("compiler/testData/codegen/boxInline/innerClasses/captureThisAndOuter.kt"); } + @Test @TestMetadata("innerLambda.kt") public void testInnerLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/innerClasses/innerLambda.kt"); } + @Test @TestMetadata("kt10259.kt") public void testKt10259() throws Exception { runTest("compiler/testData/codegen/boxInline/innerClasses/kt10259.kt"); } } - @TestMetadata("compiler/testData/codegen/boxInline/jvmName") + @Nested + @TestMetadata("compiler/testData/codegen/boxInline/invokedynamic") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class JvmName extends AbstractIrCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); + public class Invokedynamic { + @Test + public void testAllFilesPresentInInvokedynamic() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/invokedynamic"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Nested + @TestMetadata("compiler/testData/codegen/boxInline/invokedynamic/lambdas") + @TestDataPath("$PROJECT_ROOT") + public class Lambdas { + @Test + public void testAllFilesPresentInLambdas() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/invokedynamic/lambdas"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @Test + @TestMetadata("crossinlineLambda1.kt") + public void testCrossinlineLambda1() throws Exception { + runTest("compiler/testData/codegen/boxInline/invokedynamic/lambdas/crossinlineLambda1.kt"); + } + + @Test + @TestMetadata("crossinlineLambda2.kt") + public void testCrossinlineLambda2() throws Exception { + runTest("compiler/testData/codegen/boxInline/invokedynamic/lambdas/crossinlineLambda2.kt"); + } + + @Test + @TestMetadata("inlineFunInDifferentPackage.kt") + public void testInlineFunInDifferentPackage() throws Exception { + runTest("compiler/testData/codegen/boxInline/invokedynamic/lambdas/inlineFunInDifferentPackage.kt"); + } + + @Test + @TestMetadata("inlineLambda1.kt") + public void testInlineLambda1() throws Exception { + runTest("compiler/testData/codegen/boxInline/invokedynamic/lambdas/inlineLambda1.kt"); + } + } + + @Nested + @TestMetadata("compiler/testData/codegen/boxInline/invokedynamic/sam") + @TestDataPath("$PROJECT_ROOT") + public class Sam { + @Test + public void testAllFilesPresentInSam() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/invokedynamic/sam"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @Test + @TestMetadata("crossinlineLambda1.kt") + public void testCrossinlineLambda1() throws Exception { + runTest("compiler/testData/codegen/boxInline/invokedynamic/sam/crossinlineLambda1.kt"); + } + + @Test + @TestMetadata("crossinlineLambda2.kt") + public void testCrossinlineLambda2() throws Exception { + runTest("compiler/testData/codegen/boxInline/invokedynamic/sam/crossinlineLambda2.kt"); + } + + @Test + @TestMetadata("inlineFunInDifferentPackage.kt") + public void testInlineFunInDifferentPackage() throws Exception { + runTest("compiler/testData/codegen/boxInline/invokedynamic/sam/inlineFunInDifferentPackage.kt"); + } + + @Test + @TestMetadata("inlineLambda1.kt") + public void testInlineLambda1() throws Exception { + runTest("compiler/testData/codegen/boxInline/invokedynamic/sam/inlineLambda1.kt"); + } + } + } + + @Nested + @TestMetadata("compiler/testData/codegen/boxInline/jvmName") + @TestDataPath("$PROJECT_ROOT") + public class JvmName { + @Test public void testAllFilesPresentInJvmName() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/jvmName"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("simple.kt") public void testSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/jvmName/simple.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/jvmPackageName") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class JvmPackageName extends AbstractIrCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class JvmPackageName { + @Test public void testAllFilesPresentInJvmPackageName() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/jvmPackageName"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("simple.kt") public void testSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/jvmPackageName/simple.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/lambdaClassClash") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class LambdaClassClash extends AbstractIrCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class LambdaClassClash { + @Test public void testAllFilesPresentInLambdaClassClash() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/lambdaClassClash"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("lambdaClassClash.kt") public void testLambdaClassClash() throws Exception { runTest("compiler/testData/codegen/boxInline/lambdaClassClash/lambdaClassClash.kt"); } + @Test @TestMetadata("noInlineLambdaX2.kt") public void testNoInlineLambdaX2() throws Exception { runTest("compiler/testData/codegen/boxInline/lambdaClassClash/noInlineLambdaX2.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/lambdaTransformation") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class LambdaTransformation extends AbstractIrCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class LambdaTransformation { + @Test public void testAllFilesPresentInLambdaTransformation() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/lambdaTransformation"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("lambdaCloning.kt") public void testLambdaCloning() throws Exception { runTest("compiler/testData/codegen/boxInline/lambdaTransformation/lambdaCloning.kt"); } + @Test @TestMetadata("lambdaInLambda2.kt") public void testLambdaInLambda2() throws Exception { runTest("compiler/testData/codegen/boxInline/lambdaTransformation/lambdaInLambda2.kt"); } + @Test @TestMetadata("lambdaInLambdaNoInline.kt") public void testLambdaInLambdaNoInline() throws Exception { runTest("compiler/testData/codegen/boxInline/lambdaTransformation/lambdaInLambdaNoInline.kt"); } + @Test @TestMetadata("regeneratedLambdaName.kt") public void testRegeneratedLambdaName() throws Exception { runTest("compiler/testData/codegen/boxInline/lambdaTransformation/regeneratedLambdaName.kt"); } + @Test @TestMetadata("regeneratedLambdaName2.kt") public void testRegeneratedLambdaName2() throws Exception { runTest("compiler/testData/codegen/boxInline/lambdaTransformation/regeneratedLambdaName2.kt"); } + @Test @TestMetadata("sameCaptured.kt") public void testSameCaptured() throws Exception { runTest("compiler/testData/codegen/boxInline/lambdaTransformation/sameCaptured.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/localFunInLambda") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class LocalFunInLambda extends AbstractIrCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class LocalFunInLambda { + @Test public void testAllFilesPresentInLocalFunInLambda() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/localFunInLambda"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("defaultParam.kt") public void testDefaultParam() throws Exception { runTest("compiler/testData/codegen/boxInline/localFunInLambda/defaultParam.kt"); } + @Test @TestMetadata("lambdaInLambdaCapturesAnotherFun.kt") public void testLambdaInLambdaCapturesAnotherFun() throws Exception { runTest("compiler/testData/codegen/boxInline/localFunInLambda/lambdaInLambdaCapturesAnotherFun.kt"); } + @Test @TestMetadata("localFunInLambda.kt") public void testLocalFunInLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/localFunInLambda/localFunInLambda.kt"); } + @Test @TestMetadata("localFunInLambdaCapturesAnotherFun.kt") public void testLocalFunInLambdaCapturesAnotherFun() throws Exception { runTest("compiler/testData/codegen/boxInline/localFunInLambda/localFunInLambdaCapturesAnotherFun.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/multiModule") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class MultiModule extends AbstractIrCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class MultiModule { + @Test public void testAllFilesPresentInMultiModule() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/multiModule"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("tryCatchWithRecursiveInline.kt") public void testTryCatchWithRecursiveInline() throws Exception { runTest("compiler/testData/codegen/boxInline/multiModule/tryCatchWithRecursiveInline.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/multifileClasses") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class MultifileClasses extends AbstractIrCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class MultifileClasses { + @Test public void testAllFilesPresentInMultifileClasses() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/multifileClasses"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("defaultArguments.kt") public void testDefaultArguments() throws Exception { runTest("compiler/testData/codegen/boxInline/multifileClasses/defaultArguments.kt"); } + @Test @TestMetadata("inlineFromOptimizedMultifileClass.kt") public void testInlineFromOptimizedMultifileClass() throws Exception { runTest("compiler/testData/codegen/boxInline/multifileClasses/inlineFromOptimizedMultifileClass.kt"); } + @Test @TestMetadata("inlineFromOtherPackage.kt") public void testInlineFromOtherPackage() throws Exception { runTest("compiler/testData/codegen/boxInline/multifileClasses/inlineFromOtherPackage.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/multiplatform") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Multiplatform extends AbstractIrCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Multiplatform { + @Test public void testAllFilesPresentInMultiplatform() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/multiplatform"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/multiplatform/defaultArguments") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class DefaultArguments extends AbstractIrCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class DefaultArguments { + @Test public void testAllFilesPresentInDefaultArguments() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/multiplatform/defaultArguments"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("receiversAndParametersInLambda.kt") public void testReceiversAndParametersInLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/multiplatform/defaultArguments/receiversAndParametersInLambda.kt"); @@ -2355,535 +2687,640 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/noInline") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class NoInline extends AbstractIrCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class NoInline { + @Test public void testAllFilesPresentInNoInline() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/noInline"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("extensionReceiver.kt") public void testExtensionReceiver() throws Exception { runTest("compiler/testData/codegen/boxInline/noInline/extensionReceiver.kt"); } + @Test @TestMetadata("lambdaAsGeneric.kt") public void testLambdaAsGeneric() throws Exception { runTest("compiler/testData/codegen/boxInline/noInline/lambdaAsGeneric.kt"); } + @Test @TestMetadata("lambdaAsNonFunction.kt") public void testLambdaAsNonFunction() throws Exception { runTest("compiler/testData/codegen/boxInline/noInline/lambdaAsNonFunction.kt"); } + @Test @TestMetadata("noInline.kt") public void testNoInline() throws Exception { runTest("compiler/testData/codegen/boxInline/noInline/noInline.kt"); } + @Test @TestMetadata("noInlineLambdaChain.kt") public void testNoInlineLambdaChain() throws Exception { runTest("compiler/testData/codegen/boxInline/noInline/noInlineLambdaChain.kt"); } + @Test @TestMetadata("noInlineLambdaChainWithCapturedInline.kt") public void testNoInlineLambdaChainWithCapturedInline() throws Exception { runTest("compiler/testData/codegen/boxInline/noInline/noInlineLambdaChainWithCapturedInline.kt"); } + @Test @TestMetadata("withoutInline.kt") public void testWithoutInline() throws Exception { runTest("compiler/testData/codegen/boxInline/noInline/withoutInline.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/nonLocalReturns") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class NonLocalReturns extends AbstractIrCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class NonLocalReturns { + @Test public void testAllFilesPresentInNonLocalReturns() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("explicitLocalReturn.kt") public void testExplicitLocalReturn() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/explicitLocalReturn.kt"); } + @Test + @TestMetadata("fromArrayGenerator.kt") + public void testFromArrayGenerator() throws Exception { + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/fromArrayGenerator.kt"); + } + + @Test + @TestMetadata("fromArrayGeneratorCatch.kt") + public void testFromArrayGeneratorCatch() throws Exception { + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/fromArrayGeneratorCatch.kt"); + } + + @Test + @TestMetadata("fromArrayGeneratorNested.kt") + public void testFromArrayGeneratorNested() throws Exception { + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/fromArrayGeneratorNested.kt"); + } + + @Test + @TestMetadata("fromArrayGeneratorWithCapture.kt") + public void testFromArrayGeneratorWithCapture() throws Exception { + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/fromArrayGeneratorWithCapture.kt"); + } + + @Test + @TestMetadata("fromArrayGeneratorWithCatch.kt") + public void testFromArrayGeneratorWithCatch() throws Exception { + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/fromArrayGeneratorWithCatch.kt"); + } + + @Test + @TestMetadata("fromArrayGeneratorWithFinally.kt") + public void testFromArrayGeneratorWithFinally() throws Exception { + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/fromArrayGeneratorWithFinally.kt"); + } + + @Test + @TestMetadata("fromArrayGeneratorWithFinallyX2.kt") + public void testFromArrayGeneratorWithFinallyX2() throws Exception { + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/fromArrayGeneratorWithFinallyX2.kt"); + } + + @Test + @TestMetadata("fromArrayGeneratorWithFinallyX2_2.kt") + public void testFromArrayGeneratorWithFinallyX2_2() throws Exception { + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/fromArrayGeneratorWithFinallyX2_2.kt"); + } + + @Test @TestMetadata("fromInterfaceDefaultGetter.kt") public void testFromInterfaceDefaultGetter() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/fromInterfaceDefaultGetter.kt"); } + @Test @TestMetadata("justReturnInLambda.kt") public void testJustReturnInLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/justReturnInLambda.kt"); } + @Test @TestMetadata("kt5199.kt") public void testKt5199() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/kt5199.kt"); } + @Test @TestMetadata("kt8948.kt") public void testKt8948() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/kt8948.kt"); } + @Test @TestMetadata("kt8948v2.kt") public void testKt8948v2() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/kt8948v2.kt"); } + @Test @TestMetadata("nestedNonLocals.kt") public void testNestedNonLocals() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/nestedNonLocals.kt"); } + @Test @TestMetadata("noInlineLocalReturn.kt") public void testNoInlineLocalReturn() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/noInlineLocalReturn.kt"); } + @Test @TestMetadata("nonLocalReturnFromOuterLambda.kt") public void testNonLocalReturnFromOuterLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/nonLocalReturnFromOuterLambda.kt"); } + @Test @TestMetadata("propertyAccessors.kt") public void testPropertyAccessors() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/propertyAccessors.kt"); } + @Test @TestMetadata("returnFromFunctionExpr.kt") public void testReturnFromFunctionExpr() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/returnFromFunctionExpr.kt"); } + @Test @TestMetadata("simple.kt") public void testSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/simple.kt"); } + @Test @TestMetadata("simpleFunctional.kt") public void testSimpleFunctional() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/simpleFunctional.kt"); } + @Test @TestMetadata("simpleVoid.kt") public void testSimpleVoid() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/simpleVoid.kt"); } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/deparenthesize") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Deparenthesize extends AbstractIrCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Deparenthesize { + @Test public void testAllFilesPresentInDeparenthesize() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/deparenthesize"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("bracket.kt") public void testBracket() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/deparenthesize/bracket.kt"); } + @Test @TestMetadata("labeled.kt") public void testLabeled() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/deparenthesize/labeled.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class TryFinally extends AbstractIrCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class TryFinally { + @Test public void testAllFilesPresentInTryFinally() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("kt16417.kt") public void testKt16417() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt16417.kt"); } + @Test @TestMetadata("kt20433.kt") public void testKt20433() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt20433.kt"); } + @Test @TestMetadata("kt20433_2.kt") public void testKt20433_2() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt20433_2.kt"); } + @Test @TestMetadata("kt20433_2_void.kt") public void testKt20433_2_void() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt20433_2_void.kt"); } + @Test @TestMetadata("kt20433_void.kt") public void testKt20433_void() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt20433_void.kt"); } + @Test @TestMetadata("kt26384.kt") public void testKt26384() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt26384.kt"); } + @Test @TestMetadata("kt26384_2.kt") public void testKt26384_2() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt26384_2.kt"); } + @Test @TestMetadata("kt28546.kt") public void testKt28546() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt28546.kt"); } + @Test @TestMetadata("kt6956.kt") public void testKt6956() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt6956.kt"); } + @Test @TestMetadata("kt7273.kt") public void testKt7273() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt7273.kt"); } + @Test @TestMetadata("nonLocalReturnFromCatchBlock.kt") public void testNonLocalReturnFromCatchBlock() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/nonLocalReturnFromCatchBlock.kt"); } + @Test @TestMetadata("nonLocalReturnFromOuterLambda.kt") public void testNonLocalReturnFromOuterLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/nonLocalReturnFromOuterLambda.kt"); } + @Test @TestMetadata("nonLocalReturnToCatchBlock.kt") public void testNonLocalReturnToCatchBlock() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/nonLocalReturnToCatchBlock.kt"); } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class CallSite extends AbstractIrCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class CallSite { + @Test public void testAllFilesPresentInCallSite() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("callSite.kt") public void testCallSite() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/callSite.kt"); } + @Test @TestMetadata("callSiteComplex.kt") public void testCallSiteComplex() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/callSiteComplex.kt"); } + @Test @TestMetadata("exceptionTableSplit.kt") public void testExceptionTableSplit() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/exceptionTableSplit.kt"); } + @Test @TestMetadata("exceptionTableSplitNoReturn.kt") public void testExceptionTableSplitNoReturn() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/exceptionTableSplitNoReturn.kt"); } + @Test @TestMetadata("finallyInFinally.kt") public void testFinallyInFinally() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/finallyInFinally.kt"); } + @Test @TestMetadata("wrongVarInterval.kt") public void testWrongVarInterval() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/wrongVarInterval.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Chained extends AbstractIrCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Chained { + @Test public void testAllFilesPresentInChained() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("finallyInFinally.kt") public void testFinallyInFinally() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/finallyInFinally.kt"); } + @Test @TestMetadata("finallyInFinally2.kt") public void testFinallyInFinally2() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/finallyInFinally2.kt"); } + @Test @TestMetadata("intReturn.kt") public void testIntReturn() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturn.kt"); } + @Test @TestMetadata("intReturnComplex.kt") public void testIntReturnComplex() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex.kt"); } + @Test @TestMetadata("intReturnComplex2.kt") public void testIntReturnComplex2() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex2.kt"); } + @Test @TestMetadata("intReturnComplex3.kt") public void testIntReturnComplex3() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex3.kt"); } + @Test @TestMetadata("intReturnComplex4.kt") public void testIntReturnComplex4() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex4.kt"); } + @Test @TestMetadata("nestedLambda.kt") public void testNestedLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/nestedLambda.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class DeclSite extends AbstractIrCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class DeclSite { + @Test public void testAllFilesPresentInDeclSite() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("complex.kt") public void testComplex() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/complex.kt"); } + @Test @TestMetadata("intReturn.kt") public void testIntReturn() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/intReturn.kt"); } + @Test @TestMetadata("intReturnComplex.kt") public void testIntReturnComplex() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/intReturnComplex.kt"); } + @Test @TestMetadata("longReturn.kt") public void testLongReturn() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/longReturn.kt"); } + @Test @TestMetadata("nested.kt") public void testNested() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/nested.kt"); } + @Test @TestMetadata("returnInFinally.kt") public void testReturnInFinally() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/returnInFinally.kt"); } + @Test @TestMetadata("returnInTry.kt") public void testReturnInTry() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/returnInTry.kt"); } + @Test @TestMetadata("returnInTryAndFinally.kt") public void testReturnInTryAndFinally() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/returnInTryAndFinally.kt"); } + @Test @TestMetadata("severalInTry.kt") public void testSeveralInTry() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/severalInTry.kt"); } + @Test @TestMetadata("severalInTryComplex.kt") public void testSeveralInTryComplex() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/severalInTryComplex.kt"); } + @Test @TestMetadata("voidInlineFun.kt") public void testVoidInlineFun() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/voidInlineFun.kt"); } + @Test @TestMetadata("voidNonLocal.kt") public void testVoidNonLocal() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/voidNonLocal.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class ExceptionTable extends AbstractIrCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class ExceptionTable { + @Test public void testAllFilesPresentInExceptionTable() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("break.kt") public void testBreak() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/break.kt"); } + @Test @TestMetadata("continue.kt") public void testContinue() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/continue.kt"); } + @Test @TestMetadata("exceptionInFinally.kt") public void testExceptionInFinally() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/exceptionInFinally.kt"); } + @Test @TestMetadata("forInFinally.kt") public void testForInFinally() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/forInFinally.kt"); } + @Test @TestMetadata("innerAndExternal.kt") public void testInnerAndExternal() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/innerAndExternal.kt"); } + @Test @TestMetadata("innerAndExternalNested.kt") public void testInnerAndExternalNested() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/innerAndExternalNested.kt"); } + @Test @TestMetadata("innerAndExternalSimple.kt") public void testInnerAndExternalSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/innerAndExternalSimple.kt"); } + @Test @TestMetadata("kt31653.kt") public void testKt31653() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/kt31653.kt"); } + @Test @TestMetadata("kt31653_2.kt") public void testKt31653_2() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/kt31653_2.kt"); } + @Test @TestMetadata("kt31923.kt") public void testKt31923() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/kt31923.kt"); } + @Test @TestMetadata("kt31923_2.kt") public void testKt31923_2() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/kt31923_2.kt"); } + @Test @TestMetadata("kt31923_wrong.kt") public void testKt31923_wrong() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/kt31923_wrong.kt"); } + @Test @TestMetadata("nested.kt") public void testNested() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/nested.kt"); } + @Test @TestMetadata("nestedWithReturns.kt") public void testNestedWithReturns() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/nestedWithReturns.kt"); } + @Test @TestMetadata("nestedWithReturnsSimple.kt") public void testNestedWithReturnsSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/nestedWithReturnsSimple.kt"); } + @Test @TestMetadata("noFinally.kt") public void testNoFinally() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/noFinally.kt"); } + @Test @TestMetadata("severalCatchClause.kt") public void testSeveralCatchClause() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/severalCatchClause.kt"); } + @Test @TestMetadata("simpleThrow.kt") public void testSimpleThrow() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/simpleThrow.kt"); } + @Test @TestMetadata("synchonized.kt") public void testSynchonized() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/synchonized.kt"); } + @Test @TestMetadata("throwInFinally.kt") public void testThrowInFinally() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/throwInFinally.kt"); } + @Test @TestMetadata("tryCatchInFinally.kt") public void testTryCatchInFinally() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/tryCatchInFinally.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/variables") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Variables extends AbstractIrCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Variables { + @Test public void testAllFilesPresentInVariables() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/variables"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("kt7792.kt") public void testKt7792() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/variables/kt7792.kt"); @@ -2892,430 +3329,501 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/optimizations") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Optimizations extends AbstractIrCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Optimizations { + @Test public void testAllFilesPresentInOptimizations() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/optimizations"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("kt20844.kt") public void testKt20844() throws Exception { runTest("compiler/testData/codegen/boxInline/optimizations/kt20844.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/private") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Private extends AbstractIrCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Private { + @Test @TestMetadata("accessorForConst.kt") public void testAccessorForConst() throws Exception { runTest("compiler/testData/codegen/boxInline/private/accessorForConst.kt"); } + @Test @TestMetadata("accessorStability.kt") public void testAccessorStability() throws Exception { runTest("compiler/testData/codegen/boxInline/private/accessorStability.kt"); } + @Test @TestMetadata("accessorStabilityInClass.kt") public void testAccessorStabilityInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/private/accessorStabilityInClass.kt"); } + @Test public void testAllFilesPresentInPrivate() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/private"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("effectivePrivate.kt") public void testEffectivePrivate() throws Exception { runTest("compiler/testData/codegen/boxInline/private/effectivePrivate.kt"); } + @Test @TestMetadata("kt6453.kt") public void testKt6453() throws Exception { runTest("compiler/testData/codegen/boxInline/private/kt6453.kt"); } + @Test @TestMetadata("kt8094.kt") public void testKt8094() throws Exception { runTest("compiler/testData/codegen/boxInline/private/kt8094.kt"); } + @Test @TestMetadata("kt8095.kt") public void testKt8095() throws Exception { runTest("compiler/testData/codegen/boxInline/private/kt8095.kt"); } + @Test @TestMetadata("nestedInPrivateClass.kt") public void testNestedInPrivateClass() throws Exception { runTest("compiler/testData/codegen/boxInline/private/nestedInPrivateClass.kt"); } + @Test @TestMetadata("privateClass.kt") public void testPrivateClass() throws Exception { runTest("compiler/testData/codegen/boxInline/private/privateClass.kt"); } + @Test @TestMetadata("privateClassExtensionLambda.kt") public void testPrivateClassExtensionLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/private/privateClassExtensionLambda.kt"); } + @Test @TestMetadata("privateInInlineInMultiFileFacade.kt") public void testPrivateInInlineInMultiFileFacade() throws Exception { runTest("compiler/testData/codegen/boxInline/private/privateInInlineInMultiFileFacade.kt"); } + @Test @TestMetadata("privateInline.kt") public void testPrivateInline() throws Exception { runTest("compiler/testData/codegen/boxInline/private/privateInline.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/property") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Property extends AbstractIrCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Property { + @Test public void testAllFilesPresentInProperty() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/property"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("augAssignmentAndInc.kt") public void testAugAssignmentAndInc() throws Exception { runTest("compiler/testData/codegen/boxInline/property/augAssignmentAndInc.kt"); } + @Test @TestMetadata("augAssignmentAndIncInClass.kt") public void testAugAssignmentAndIncInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/property/augAssignmentAndIncInClass.kt"); } + @Test @TestMetadata("augAssignmentAndIncInClassViaConvention.kt") public void testAugAssignmentAndIncInClassViaConvention() throws Exception { runTest("compiler/testData/codegen/boxInline/property/augAssignmentAndIncInClassViaConvention.kt"); } + @Test @TestMetadata("augAssignmentAndIncOnExtension.kt") public void testAugAssignmentAndIncOnExtension() throws Exception { runTest("compiler/testData/codegen/boxInline/property/augAssignmentAndIncOnExtension.kt"); } + @Test @TestMetadata("augAssignmentAndIncOnExtensionInClass.kt") public void testAugAssignmentAndIncOnExtensionInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/property/augAssignmentAndIncOnExtensionInClass.kt"); } + @Test @TestMetadata("augAssignmentAndIncViaConvention.kt") public void testAugAssignmentAndIncViaConvention() throws Exception { runTest("compiler/testData/codegen/boxInline/property/augAssignmentAndIncViaConvention.kt"); } + @Test @TestMetadata("fromObject.kt") public void testFromObject() throws Exception { runTest("compiler/testData/codegen/boxInline/property/fromObject.kt"); } + @Test @TestMetadata("kt22649.kt") public void testKt22649() throws Exception { runTest("compiler/testData/codegen/boxInline/property/kt22649.kt"); } + @Test @TestMetadata("property.kt") public void testProperty() throws Exception { runTest("compiler/testData/codegen/boxInline/property/property.kt"); } + @Test @TestMetadata("reifiedVal.kt") public void testReifiedVal() throws Exception { runTest("compiler/testData/codegen/boxInline/property/reifiedVal.kt"); } + @Test @TestMetadata("reifiedVar.kt") public void testReifiedVar() throws Exception { runTest("compiler/testData/codegen/boxInline/property/reifiedVar.kt"); } + @Test @TestMetadata("simple.kt") public void testSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/property/simple.kt"); } + @Test @TestMetadata("simpleExtension.kt") public void testSimpleExtension() throws Exception { runTest("compiler/testData/codegen/boxInline/property/simpleExtension.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/reified") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Reified extends AbstractIrCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Reified { + @Test public void testAllFilesPresentInReified() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/reified"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("arrayConstructor.kt") public void testArrayConstructor() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/arrayConstructor.kt"); } + @Test @TestMetadata("arrayOf.kt") public void testArrayOf() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/arrayOf.kt"); } + @Test @TestMetadata("capturedLambda.kt") public void testCapturedLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/capturedLambda.kt"); } + @Test @TestMetadata("capturedLambda2.kt") public void testCapturedLambda2() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/capturedLambda2.kt"); } + @Test @TestMetadata("dontSubstituteNonReified.kt") public void testDontSubstituteNonReified() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/dontSubstituteNonReified.kt"); } + @Test @TestMetadata("kt11081.kt") public void testKt11081() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/kt11081.kt"); } + @Test @TestMetadata("kt11677.kt") public void testKt11677() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/kt11677.kt"); } + @Test @TestMetadata("kt15956.kt") public void testKt15956() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/kt15956.kt"); } + @Test @TestMetadata("kt15997.kt") public void testKt15997() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/kt15997.kt"); } + @Test @TestMetadata("kt15997_2.kt") public void testKt15997_2() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/kt15997_2.kt"); } + @Test @TestMetadata("kt18977.kt") public void testKt18977() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/kt18977.kt"); } + @Test + @TestMetadata("kt35511.kt") + public void testKt35511() throws Exception { + runTest("compiler/testData/codegen/boxInline/reified/kt35511.kt"); + } + + @Test + @TestMetadata("kt35511_try.kt") + public void testKt35511_try() throws Exception { + runTest("compiler/testData/codegen/boxInline/reified/kt35511_try.kt"); + } + + @Test + @TestMetadata("kt35511_try_valueOf.kt") + public void testKt35511_try_valueOf() throws Exception { + runTest("compiler/testData/codegen/boxInline/reified/kt35511_try_valueOf.kt"); + } + + @Test + @TestMetadata("kt35511_try_values.kt") + public void testKt35511_try_values() throws Exception { + runTest("compiler/testData/codegen/boxInline/reified/kt35511_try_values.kt"); + } + + @Test @TestMetadata("kt6988.kt") public void testKt6988() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/kt6988.kt"); } + @Test @TestMetadata("kt6988_2.kt") public void testKt6988_2() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/kt6988_2.kt"); } + @Test @TestMetadata("kt6990.kt") public void testKt6990() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/kt6990.kt"); } + @Test @TestMetadata("kt7017.kt") public void testKt7017() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/kt7017.kt"); } + @Test @TestMetadata("kt8047.kt") public void testKt8047() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/kt8047.kt"); } + @Test @TestMetadata("kt8047_2.kt") public void testKt8047_2() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/kt8047_2.kt"); } + @Test @TestMetadata("kt9637.kt") public void testKt9637() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/kt9637.kt"); } + @Test @TestMetadata("kt9637_2.kt") public void testKt9637_2() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/kt9637_2.kt"); } + @Test @TestMetadata("nonCapturingObjectInLambda.kt") public void testNonCapturingObjectInLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/nonCapturingObjectInLambda.kt"); } + @Test @TestMetadata("packages.kt") public void testPackages() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/packages.kt"); } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/reified/checkCast") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class CheckCast extends AbstractIrCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class CheckCast { + @Test public void testAllFilesPresentInCheckCast() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/reified/checkCast"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("chain.kt") public void testChain() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/checkCast/chain.kt"); } + @Test @TestMetadata("kt26435.kt") public void testKt26435() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/checkCast/kt26435.kt"); } + @Test @TestMetadata("kt26435_2.kt") public void testKt26435_2() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/checkCast/kt26435_2.kt"); } + @Test @TestMetadata("kt26435_3.kt") public void testKt26435_3() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/checkCast/kt26435_3.kt"); } + @Test @TestMetadata("kt8043.kt") public void testKt8043() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/checkCast/kt8043.kt"); } + @Test @TestMetadata("maxStack.kt") public void testMaxStack() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/checkCast/maxStack.kt"); } + @Test @TestMetadata("nullable.kt") public void testNullable() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/checkCast/nullable.kt"); } + @Test @TestMetadata("simple.kt") public void testSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/checkCast/simple.kt"); } + @Test @TestMetadata("simpleSafe.kt") public void testSimpleSafe() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/checkCast/simpleSafe.kt"); } + @Test @TestMetadata("simple_1_3.kt") public void testSimple_1_3() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/checkCast/simple_1_3.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/reified/defaultLambda") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class DefaultLambda extends AbstractIrCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class DefaultLambda { + @Test public void testAllFilesPresentInDefaultLambda() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/reified/defaultLambda"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("chain.kt") public void testChain() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/defaultLambda/chain.kt"); } + @Test @TestMetadata("nested.kt") public void testNested() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/defaultLambda/nested.kt"); } + @Test @TestMetadata("nested2.kt") public void testNested2() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/defaultLambda/nested2.kt"); } + @Test @TestMetadata("nested2Static.kt") public void testNested2Static() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/defaultLambda/nested2Static.kt"); } + @Test @TestMetadata("nestedStatic.kt") public void testNestedStatic() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/defaultLambda/nestedStatic.kt"); } + @Test @TestMetadata("simple.kt") public void testSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/defaultLambda/simple.kt"); } + @Test @TestMetadata("transitiveChain.kt") public void testTransitiveChain() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/defaultLambda/transitiveChain.kt"); } + @Test @TestMetadata("transitiveChainStatic.kt") public void testTransitiveChainStatic() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/defaultLambda/transitiveChainStatic.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/reified/isCheck") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class IsCheck extends AbstractIrCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class IsCheck { + @Test public void testAllFilesPresentInIsCheck() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/reified/isCheck"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("chain.kt") public void testChain() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/isCheck/chain.kt"); } + @Test @TestMetadata("nullable.kt") public void testNullable() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/isCheck/nullable.kt"); } + @Test @TestMetadata("simple.kt") public void testSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/isCheck/simple.kt"); @@ -3323,518 +3831,577 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/signature") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Signature extends AbstractIrCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Signature { + @Test public void testAllFilesPresentInSignature() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/signature"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("inProjectionSubstitution.kt") public void testInProjectionSubstitution() throws Exception { runTest("compiler/testData/codegen/boxInline/signature/inProjectionSubstitution.kt"); } + @Test @TestMetadata("outProjectionSubstitution.kt") public void testOutProjectionSubstitution() throws Exception { runTest("compiler/testData/codegen/boxInline/signature/outProjectionSubstitution.kt"); } + @Test @TestMetadata("recursion.kt") public void testRecursion() throws Exception { runTest("compiler/testData/codegen/boxInline/signature/recursion.kt"); } + @Test @TestMetadata("sameFormalParameterName.kt") public void testSameFormalParameterName() throws Exception { runTest("compiler/testData/codegen/boxInline/signature/sameFormalParameterName.kt"); } + @Test @TestMetadata("sameReifiedFormalParameterName.kt") public void testSameReifiedFormalParameterName() throws Exception { runTest("compiler/testData/codegen/boxInline/signature/sameReifiedFormalParameterName.kt"); } + @Test @TestMetadata("starProjectionSubstitution.kt") public void testStarProjectionSubstitution() throws Exception { runTest("compiler/testData/codegen/boxInline/signature/starProjectionSubstitution.kt"); } + @Test @TestMetadata("typeParameterInLambda.kt") public void testTypeParameterInLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/signature/typeParameterInLambda.kt"); } + @Test @TestMetadata("typeParametersSubstitution.kt") public void testTypeParametersSubstitution() throws Exception { runTest("compiler/testData/codegen/boxInline/signature/typeParametersSubstitution.kt"); } + @Test @TestMetadata("typeParametersSubstitution2.kt") public void testTypeParametersSubstitution2() throws Exception { runTest("compiler/testData/codegen/boxInline/signature/typeParametersSubstitution2.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/simple") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Simple extends AbstractIrCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Simple { + @Test public void testAllFilesPresentInSimple() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/simple"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("captureAndArgumentIncompatibleTypes.kt") public void testCaptureAndArgumentIncompatibleTypes() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/captureAndArgumentIncompatibleTypes.kt"); } + @Test @TestMetadata("classObject.kt") public void testClassObject() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/classObject.kt"); } + @Test @TestMetadata("destructuring.kt") public void testDestructuring() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/destructuring.kt"); } + @Test @TestMetadata("destructuringIndexClash.kt") public void testDestructuringIndexClash() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/destructuringIndexClash.kt"); } + @Test @TestMetadata("extension.kt") public void testExtension() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/extension.kt"); } + @Test @TestMetadata("extensionLambda.kt") public void testExtensionLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/extensionLambda.kt"); } + @Test @TestMetadata("funImportedFromObject.kt") public void testFunImportedFromObject() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/funImportedFromObject.kt"); } + @Test @TestMetadata("inlineCallInInlineLambda.kt") public void testInlineCallInInlineLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/inlineCallInInlineLambda.kt"); } + @Test @TestMetadata("kt17431.kt") public void testKt17431() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/kt17431.kt"); } + @Test @TestMetadata("kt28547.kt") public void testKt28547() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/kt28547.kt"); } + @Test @TestMetadata("kt28547_2.kt") public void testKt28547_2() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/kt28547_2.kt"); } + @Test @TestMetadata("params.kt") public void testParams() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/params.kt"); } + @Test @TestMetadata("propImportedFromObject.kt") public void testPropImportedFromObject() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/propImportedFromObject.kt"); } + @Test @TestMetadata("rootConstructor.kt") public void testRootConstructor() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/rootConstructor.kt"); } + @Test @TestMetadata("safeCall.kt") public void testSafeCall() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/safeCall.kt"); } + @Test @TestMetadata("severalClosures.kt") public void testSeveralClosures() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/severalClosures.kt"); } + @Test @TestMetadata("severalUsage.kt") public void testSeveralUsage() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/severalUsage.kt"); } + @Test @TestMetadata("simpleDouble.kt") public void testSimpleDouble() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/simpleDouble.kt"); } + @Test @TestMetadata("simpleEnum.kt") public void testSimpleEnum() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/simpleEnum.kt"); } + @Test @TestMetadata("simpleGenerics.kt") public void testSimpleGenerics() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/simpleGenerics.kt"); } + @Test @TestMetadata("simpleInt.kt") public void testSimpleInt() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/simpleInt.kt"); } + @Test @TestMetadata("simpleLambda.kt") public void testSimpleLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/simpleLambda.kt"); } + @Test @TestMetadata("simpleObject.kt") public void testSimpleObject() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/simpleObject.kt"); } + @Test @TestMetadata("vararg.kt") public void testVararg() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/vararg.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/smap") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Smap extends AbstractIrCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Smap { + @Test public void testAllFilesPresentInSmap() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/smap"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("assertion.kt") public void testAssertion() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/assertion.kt"); } + @Test @TestMetadata("classCycle.kt") public void testClassCycle() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/classCycle.kt"); } + @Test @TestMetadata("classFromDefaultPackage.kt") public void testClassFromDefaultPackage() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/classFromDefaultPackage.kt"); } + @Test @TestMetadata("crossroutines.kt") public void testCrossroutines() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/crossroutines.kt"); } + @Test @TestMetadata("defaultFunction.kt") public void testDefaultFunction() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/defaultFunction.kt"); } + @Test @TestMetadata("defaultFunctionWithInlineCall.kt") public void testDefaultFunctionWithInlineCall() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/defaultFunctionWithInlineCall.kt"); } + @Test @TestMetadata("forInline.kt") public void testForInline() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/forInline.kt"); } + @Test @TestMetadata("interleavedFiles.kt") public void testInterleavedFiles() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/interleavedFiles.kt"); } + @Test @TestMetadata("kt23369.kt") public void testKt23369() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/kt23369.kt"); } + @Test @TestMetadata("kt23369_2.kt") public void testKt23369_2() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/kt23369_2.kt"); } + @Test @TestMetadata("kt23369_3.kt") public void testKt23369_3() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/kt23369_3.kt"); } + @Test @TestMetadata("kt35006.kt") public void testKt35006() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/kt35006.kt"); } + @Test @TestMetadata("multiFileFacade.kt") public void testMultiFileFacade() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/multiFileFacade.kt"); } + @Test @TestMetadata("oneFile.kt") public void testOneFile() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/oneFile.kt"); } + @Test @TestMetadata("rangeFolding.kt") public void testRangeFolding() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/rangeFolding.kt"); } + @Test @TestMetadata("rangeFoldingInClass.kt") public void testRangeFoldingInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/rangeFoldingInClass.kt"); } + @Test @TestMetadata("smap.kt") public void testSmap() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/smap.kt"); } + @Test @TestMetadata("smapWithNewSyntax.kt") public void testSmapWithNewSyntax() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/smapWithNewSyntax.kt"); } + @Test @TestMetadata("smapWithOldSyntax.kt") public void testSmapWithOldSyntax() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/smapWithOldSyntax.kt"); } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/smap/anonymous") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Anonymous extends AbstractIrCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Anonymous { + @Test public void testAllFilesPresentInAnonymous() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/smap/anonymous"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("kt19175.kt") public void testKt19175() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/anonymous/kt19175.kt"); } + @Test @TestMetadata("lambda.kt") public void testLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/anonymous/lambda.kt"); } + @Test @TestMetadata("lambdaOnCallSite.kt") public void testLambdaOnCallSite() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/anonymous/lambdaOnCallSite.kt"); } + @Test @TestMetadata("lambdaOnInlineCallSite.kt") public void testLambdaOnInlineCallSite() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/anonymous/lambdaOnInlineCallSite.kt"); } + @Test @TestMetadata("object.kt") public void testObject() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/anonymous/object.kt"); } + @Test @TestMetadata("objectOnCallSite.kt") public void testObjectOnCallSite() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/anonymous/objectOnCallSite.kt"); } + @Test @TestMetadata("objectOnInlineCallSite.kt") public void testObjectOnInlineCallSite() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/anonymous/objectOnInlineCallSite.kt"); } + @Test @TestMetadata("objectOnInlineCallSite2.kt") public void testObjectOnInlineCallSite2() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/anonymous/objectOnInlineCallSite2.kt"); } + @Test @TestMetadata("objectOnInlineCallSiteWithCapture.kt") public void testObjectOnInlineCallSiteWithCapture() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/anonymous/objectOnInlineCallSiteWithCapture.kt"); } + @Test @TestMetadata("severalMappingsForDefaultFile.kt") public void testSeveralMappingsForDefaultFile() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/anonymous/severalMappingsForDefaultFile.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/smap/defaultLambda") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class DefaultLambda extends AbstractIrCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class DefaultLambda { + @Test public void testAllFilesPresentInDefaultLambda() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/smap/defaultLambda"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("defaultLambdaInAnonymous.kt") public void testDefaultLambdaInAnonymous() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/defaultLambda/defaultLambdaInAnonymous.kt"); } + @Test @TestMetadata("inlinInDefault.kt") public void testInlinInDefault() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/defaultLambda/inlinInDefault.kt"); } + @Test @TestMetadata("inlinInDefault2.kt") public void testInlinInDefault2() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/defaultLambda/inlinInDefault2.kt"); } + @Test @TestMetadata("inlineAnonymousInDefault.kt") public void testInlineAnonymousInDefault() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/defaultLambda/inlineAnonymousInDefault.kt"); } + @Test @TestMetadata("inlineAnonymousInDefault2.kt") public void testInlineAnonymousInDefault2() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/defaultLambda/inlineAnonymousInDefault2.kt"); } + @Test @TestMetadata("kt21827.kt") public void testKt21827() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/defaultLambda/kt21827.kt"); } + @Test @TestMetadata("nested.kt") public void testNested() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/defaultLambda/nested.kt"); } + @Test @TestMetadata("simple.kt") public void testSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/defaultLambda/simple.kt"); } + @Test @TestMetadata("simple2.kt") public void testSimple2() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/defaultLambda/simple2.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/smap/inlineOnly") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class InlineOnly extends AbstractIrCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class InlineOnly { + @Test public void testAllFilesPresentInInlineOnly() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/smap/inlineOnly"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("noSmap.kt") public void testNoSmap() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/inlineOnly/noSmap.kt"); } + @Test @TestMetadata("noSmapWithProperty.kt") public void testNoSmapWithProperty() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/inlineOnly/noSmapWithProperty.kt"); } + @Test @TestMetadata("reified.kt") public void testReified() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/inlineOnly/reified.kt"); } + @Test @TestMetadata("reifiedProperty.kt") public void testReifiedProperty() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/inlineOnly/reifiedProperty.kt"); } + @Test @TestMetadata("stdlibInlineOnly.kt") public void testStdlibInlineOnly() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/inlineOnly/stdlibInlineOnly.kt"); } + @Test @TestMetadata("stdlibInlineOnlyOneLine.kt") public void testStdlibInlineOnlyOneLine() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/inlineOnly/stdlibInlineOnlyOneLine.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/smap/newsmap") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Newsmap extends AbstractIrCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Newsmap { + @Test public void testAllFilesPresentInNewsmap() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/smap/newsmap"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("differentMapping.kt") public void testDifferentMapping() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/newsmap/differentMapping.kt"); } + @Test @TestMetadata("mappingInInlineFunLambda.kt") public void testMappingInInlineFunLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/newsmap/mappingInInlineFunLambda.kt"); } + @Test @TestMetadata("mappingInSubInlineLambda.kt") public void testMappingInSubInlineLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/newsmap/mappingInSubInlineLambda.kt"); } + @Test @TestMetadata("mappingInSubInlineLambdaSameFileInline.kt") public void testMappingInSubInlineLambdaSameFileInline() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/newsmap/mappingInSubInlineLambdaSameFileInline.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/smap/resolve") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Resolve extends AbstractIrCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Resolve { + @Test public void testAllFilesPresentInResolve() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/smap/resolve"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("inlineComponent.kt") public void testInlineComponent() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/resolve/inlineComponent.kt"); } + @Test @TestMetadata("inlineIterator.kt") public void testInlineIterator() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/resolve/inlineIterator.kt"); @@ -3842,616 +4409,695 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/special") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Special extends AbstractIrCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Special { + @Test public void testAllFilesPresentInSpecial() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/special"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("identityCheck.kt") public void testIdentityCheck() throws Exception { runTest("compiler/testData/codegen/boxInline/special/identityCheck.kt"); } + @Test @TestMetadata("ifBranches.kt") public void testIfBranches() throws Exception { runTest("compiler/testData/codegen/boxInline/special/ifBranches.kt"); } + @Test @TestMetadata("iinc.kt") public void testIinc() throws Exception { runTest("compiler/testData/codegen/boxInline/special/iinc.kt"); } + @Test @TestMetadata("inlineChain.kt") public void testInlineChain() throws Exception { runTest("compiler/testData/codegen/boxInline/special/inlineChain.kt"); } + @Test @TestMetadata("loopInStoreLoadChains.kt") public void testLoopInStoreLoadChains() throws Exception { runTest("compiler/testData/codegen/boxInline/special/loopInStoreLoadChains.kt"); } + @Test @TestMetadata("loopInStoreLoadChains2.kt") public void testLoopInStoreLoadChains2() throws Exception { runTest("compiler/testData/codegen/boxInline/special/loopInStoreLoadChains2.kt"); } + @Test @TestMetadata("plusAssign.kt") public void testPlusAssign() throws Exception { runTest("compiler/testData/codegen/boxInline/special/plusAssign.kt"); } + @Test @TestMetadata("stackHeightBug.kt") public void testStackHeightBug() throws Exception { runTest("compiler/testData/codegen/boxInline/special/stackHeightBug.kt"); } + @Test @TestMetadata("unusedInlineLambda.kt") public void testUnusedInlineLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/special/unusedInlineLambda.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/stackOnReturn") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class StackOnReturn extends AbstractIrCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class StackOnReturn { + @Test public void testAllFilesPresentInStackOnReturn() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/stackOnReturn"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("elvis.kt") public void testElvis() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/elvis.kt"); } + @Test @TestMetadata("ifThenElse.kt") public void testIfThenElse() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/ifThenElse.kt"); } + @Test @TestMetadata("kt11499.kt") public void testKt11499() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/kt11499.kt"); } + @Test @TestMetadata("kt17591.kt") public void testKt17591() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/kt17591.kt"); } + @Test @TestMetadata("kt17591a.kt") public void testKt17591a() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/kt17591a.kt"); } + @Test @TestMetadata("kt17591b.kt") public void testKt17591b() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/kt17591b.kt"); } + @Test @TestMetadata("mixedTypesOnStack1.kt") public void testMixedTypesOnStack1() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/mixedTypesOnStack1.kt"); } + @Test @TestMetadata("mixedTypesOnStack2.kt") public void testMixedTypesOnStack2() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/mixedTypesOnStack2.kt"); } + @Test @TestMetadata("mixedTypesOnStack3.kt") public void testMixedTypesOnStack3() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/mixedTypesOnStack3.kt"); } + @Test @TestMetadata("nonLocalReturn1.kt") public void testNonLocalReturn1() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/nonLocalReturn1.kt"); } + @Test @TestMetadata("nonLocalReturn2.kt") public void testNonLocalReturn2() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/nonLocalReturn2.kt"); } + @Test @TestMetadata("nonLocalReturn3.kt") public void testNonLocalReturn3() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/nonLocalReturn3.kt"); } + @Test @TestMetadata("poppedLocalReturn.kt") public void testPoppedLocalReturn() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/poppedLocalReturn.kt"); } + @Test @TestMetadata("poppedLocalReturn2.kt") public void testPoppedLocalReturn2() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/poppedLocalReturn2.kt"); } + @Test @TestMetadata("returnLong.kt") public void testReturnLong() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/returnLong.kt"); } + @Test @TestMetadata("tryFinally.kt") public void testTryFinally() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/tryFinally.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/suspend") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Suspend extends AbstractIrCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Suspend { + @Test public void testAllFilesPresentInSuspend() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("capturedVariables.kt") public void testCapturedVariables() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/capturedVariables.kt"); } + @Test @TestMetadata("crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt") public void testCrossinlineSuspendLambdaInsideCrossinlineSuspendLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt"); } + @Test @TestMetadata("debugMetadataCrossinline.kt") public void testDebugMetadataCrossinline() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/debugMetadataCrossinline.kt"); } + @Test @TestMetadata("delegatedProperties.kt") public void testDelegatedProperties() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/delegatedProperties.kt"); } + @Test @TestMetadata("doubleRegenerationWithNonSuspendingLambda.kt") public void testDoubleRegenerationWithNonSuspendingLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/doubleRegenerationWithNonSuspendingLambda.kt"); } + @Test @TestMetadata("enclodingMethod.kt") public void testEnclodingMethod() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/enclodingMethod.kt"); } + @Test @TestMetadata("fileNameInMetadata.kt") public void testFileNameInMetadata() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/fileNameInMetadata.kt"); } + @Test @TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt") public void testInlineOrdinaryOfCrossinlineSuspend() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfCrossinlineSuspend.kt"); } + @Test @TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt") public void testInlineOrdinaryOfNoinlineSuspend() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfNoinlineSuspend.kt"); } + @Test @TestMetadata("inlineSuspendContinuation.kt") public void testInlineSuspendContinuation() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendContinuation.kt"); } + @Test @TestMetadata("inlineSuspendInMultifileClass.kt") public void testInlineSuspendInMultifileClass() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendInMultifileClass.kt"); } + @Test @TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt") public void testInlineSuspendOfCrossinlineOrdinary() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineOrdinary.kt"); } + @Test @TestMetadata("inlineSuspendOfCrossinlineSuspend.kt") public void testInlineSuspendOfCrossinlineSuspend() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineSuspend.kt"); } + @Test @TestMetadata("inlineSuspendOfNoinlineOrdinary.kt") public void testInlineSuspendOfNoinlineOrdinary() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineOrdinary.kt"); } + @Test @TestMetadata("inlineSuspendOfNoinlineSuspend.kt") public void testInlineSuspendOfNoinlineSuspend() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineSuspend.kt"); } + @Test @TestMetadata("inlineSuspendOfOrdinary.kt") public void testInlineSuspendOfOrdinary() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfOrdinary.kt"); } + @Test @TestMetadata("inlineSuspendOfSuspend.kt") public void testInlineSuspendOfSuspend() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfSuspend.kt"); } + @Test @TestMetadata("jvmName.kt") public void testJvmName() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/jvmName.kt"); } + @Test @TestMetadata("kt26658.kt") public void testKt26658() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/kt26658.kt"); } + @Test @TestMetadata("maxStackWithCrossinline.kt") public void testMaxStackWithCrossinline() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/maxStackWithCrossinline.kt"); } + @Test @TestMetadata("multipleLocals.kt") public void testMultipleLocals() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/multipleLocals.kt"); } + @Test @TestMetadata("multipleSuspensionPoints.kt") public void testMultipleSuspensionPoints() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/multipleSuspensionPoints.kt"); } + @Test @TestMetadata("nestedMethodWith2XParameter.kt") public void testNestedMethodWith2XParameter() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/nestedMethodWith2XParameter.kt"); } + @Test @TestMetadata("nonLocalReturn.kt") public void testNonLocalReturn() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/nonLocalReturn.kt"); } + @Test @TestMetadata("nonSuspendCrossinline.kt") public void testNonSuspendCrossinline() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/nonSuspendCrossinline.kt"); } + @Test @TestMetadata("returnValue.kt") public void testReturnValue() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/returnValue.kt"); } + @Test @TestMetadata("tryCatchReceiver.kt") public void testTryCatchReceiver() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/tryCatchReceiver.kt"); } + @Test @TestMetadata("tryCatchStackTransform.kt") public void testTryCatchStackTransform() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/tryCatchStackTransform.kt"); } + @Test @TestMetadata("twiceRegeneratedAnonymousObject.kt") public void testTwiceRegeneratedAnonymousObject() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/twiceRegeneratedAnonymousObject.kt"); } + @Test @TestMetadata("twiceRegeneratedSuspendLambda.kt") public void testTwiceRegeneratedSuspendLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/twiceRegeneratedSuspendLambda.kt"); } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/suspend/callableReference") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class CallableReference extends AbstractIrCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class CallableReference { + @Test public void testAllFilesPresentInCallableReference() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/callableReference"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("isAsReified.kt") public void testIsAsReified() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/callableReference/isAsReified.kt"); } + @Test @TestMetadata("isAsReified2.kt") public void testIsAsReified2() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/callableReference/isAsReified2.kt"); } + @Test @TestMetadata("nonTailCall.kt") public void testNonTailCall() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/callableReference/nonTailCall.kt"); } + @Test @TestMetadata("simple.kt") public void testSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/callableReference/simple.kt"); } + @Test @TestMetadata("unitReturn.kt") public void testUnitReturn() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/callableReference/unitReturn.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/suspend/defaultParameter") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class DefaultParameter extends AbstractIrCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class DefaultParameter { + @Test public void testAllFilesPresentInDefaultParameter() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/defaultParameter"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("defaultValueCrossinline.kt") public void testDefaultValueCrossinline() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueCrossinline.kt"); } + @Test @TestMetadata("defaultValueInClass.kt") public void testDefaultValueInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInClass.kt"); } + @Test @TestMetadata("defaultValueInline.kt") public void testDefaultValueInline() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInline.kt"); } + @Test @TestMetadata("defaultValueInlineFromMultiFileFacade.kt") public void testDefaultValueInlineFromMultiFileFacade() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInlineFromMultiFileFacade.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/suspend/inlineClass") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class InlineClass extends AbstractIrCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class InlineClass { + @Test public void testAllFilesPresentInInlineClass() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/inlineClass"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("returnUnboxedDirect.kt") public void testReturnUnboxedDirect() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineClass/returnUnboxedDirect.kt"); } + @Test @TestMetadata("returnUnboxedResume.kt") public void testReturnUnboxedResume() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineClass/returnUnboxedResume.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/suspend/inlineUsedAsNoinline") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class InlineUsedAsNoinline extends AbstractIrCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class InlineUsedAsNoinline { + @Test public void testAllFilesPresentInInlineUsedAsNoinline() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/inlineUsedAsNoinline"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("inlineOnly.kt") public void testInlineOnly() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineUsedAsNoinline/inlineOnly.kt"); } + @Test @TestMetadata("simpleNamed.kt") public void testSimpleNamed() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineUsedAsNoinline/simpleNamed.kt"); } + @Test @TestMetadata("withCapturedInlineLambda.kt") public void testWithCapturedInlineLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineUsedAsNoinline/withCapturedInlineLambda.kt"); } + @Test @TestMetadata("withCapturedInlineLambda2.kt") public void testWithCapturedInlineLambda2() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineUsedAsNoinline/withCapturedInlineLambda2.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/suspend/receiver") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Receiver extends AbstractIrCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Receiver { + @Test public void testAllFilesPresentInReceiver() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/receiver"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt") public void testInlineOrdinaryOfCrossinlineSuspend() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfCrossinlineSuspend.kt"); } + @Test @TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt") public void testInlineOrdinaryOfNoinlineSuspend() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfNoinlineSuspend.kt"); } + @Test @TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt") public void testInlineSuspendOfCrossinlineOrdinary() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineOrdinary.kt"); } + @Test @TestMetadata("inlineSuspendOfCrossinlineSuspend.kt") public void testInlineSuspendOfCrossinlineSuspend() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineSuspend.kt"); } + @Test @TestMetadata("inlineSuspendOfNoinlineOrdinary.kt") public void testInlineSuspendOfNoinlineOrdinary() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineOrdinary.kt"); } + @Test @TestMetadata("inlineSuspendOfNoinlineSuspend.kt") public void testInlineSuspendOfNoinlineSuspend() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineSuspend.kt"); } + @Test @TestMetadata("inlineSuspendOfOrdinary.kt") public void testInlineSuspendOfOrdinary() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfOrdinary.kt"); } + @Test @TestMetadata("inlineSuspendOfSuspend.kt") public void testInlineSuspendOfSuspend() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfSuspend.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class StateMachine extends AbstractIrCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class StateMachine { + @Test public void testAllFilesPresentInStateMachine() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/stateMachine"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("crossingCoroutineBoundaries.kt") public void testCrossingCoroutineBoundaries() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/crossingCoroutineBoundaries.kt"); } + @Test @TestMetadata("independentInline.kt") public void testIndependentInline() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/independentInline.kt"); } + @Test @TestMetadata("innerLambda.kt") public void testInnerLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambda.kt"); } + @Test @TestMetadata("innerLambdaInsideLambda.kt") public void testInnerLambdaInsideLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaInsideLambda.kt"); } + @Test @TestMetadata("innerLambdaWithoutCrossinline.kt") public void testInnerLambdaWithoutCrossinline() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaWithoutCrossinline.kt"); } + @Test @TestMetadata("innerMadness.kt") public void testInnerMadness() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadness.kt"); } + @Test @TestMetadata("innerMadnessCallSite.kt") public void testInnerMadnessCallSite() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadnessCallSite.kt"); } + @Test @TestMetadata("innerObject.kt") public void testInnerObject() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObject.kt"); } + @Test @TestMetadata("innerObjectInsideInnerObject.kt") public void testInnerObjectInsideInnerObject() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectInsideInnerObject.kt"); } + @Test @TestMetadata("innerObjectRetransformation.kt") public void testInnerObjectRetransformation() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectRetransformation.kt"); } + @Test @TestMetadata("innerObjectSeveralFunctions.kt") public void testInnerObjectSeveralFunctions() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectSeveralFunctions.kt"); } + @Test @TestMetadata("innerObjectWithoutCapturingCrossinline.kt") public void testInnerObjectWithoutCapturingCrossinline() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectWithoutCapturingCrossinline.kt"); } + @Test @TestMetadata("insideObject.kt") public void testInsideObject() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/insideObject.kt"); } + @Test + @TestMetadata("kt30708.kt") + public void testKt30708() throws Exception { + runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/kt30708.kt"); + } + + @Test @TestMetadata("lambdaTransformation.kt") public void testLambdaTransformation() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/lambdaTransformation.kt"); } + @Test @TestMetadata("normalInline.kt") public void testNormalInline() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/normalInline.kt"); } + @Test @TestMetadata("numberOfSuspentions.kt") public void testNumberOfSuspentions() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/numberOfSuspentions.kt"); } + @Test @TestMetadata("objectInsideLambdas.kt") public void testObjectInsideLambdas() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/objectInsideLambdas.kt"); } + @Test @TestMetadata("oneInlineTwoCaptures.kt") public void testOneInlineTwoCaptures() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/oneInlineTwoCaptures.kt"); } + @Test @TestMetadata("passLambda.kt") public void testPassLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/passLambda.kt"); } + @Test @TestMetadata("passParameter.kt") public void testPassParameter() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/passParameter.kt"); } + @Test @TestMetadata("passParameterLambda.kt") public void testPassParameterLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/passParameterLambda.kt"); } + @Test @TestMetadata("unreachableSuspendMarker.kt") public void testUnreachableSuspendMarker() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/unreachableSuspendMarker.kt"); @@ -4459,110 +5105,121 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/syntheticAccessors") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class SyntheticAccessors extends AbstractIrCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class SyntheticAccessors { + @Test public void testAllFilesPresentInSyntheticAccessors() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/syntheticAccessors"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("constField.kt") public void testConstField() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/constField.kt"); } + @Test @TestMetadata("packagePrivateMembers.kt") public void testPackagePrivateMembers() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/packagePrivateMembers.kt"); } + @Test @TestMetadata("propertyModifiers.kt") public void testPropertyModifiers() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/propertyModifiers.kt"); } + @Test @TestMetadata("protectedMembers.kt") public void testProtectedMembers() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/protectedMembers.kt"); } + @Test @TestMetadata("protectedMembersFromSuper.kt") public void testProtectedMembersFromSuper() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/protectedMembersFromSuper.kt"); } + @Test @TestMetadata("superCall.kt") public void testSuperCall() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/superCall.kt"); } + @Test @TestMetadata("superCallFromMultipleSubclasses.kt") public void testSuperCallFromMultipleSubclasses() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/superCallFromMultipleSubclasses.kt"); } + @Test @TestMetadata("superProperty.kt") public void testSuperProperty() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/superProperty.kt"); } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class WithinInlineLambda extends AbstractIrCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class WithinInlineLambda { + @Test public void testAllFilesPresentInWithinInlineLambda() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("directFieldAccess.kt") public void testDirectFieldAccess() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/directFieldAccess.kt"); } + @Test @TestMetadata("directFieldAccessInCrossInline.kt") public void testDirectFieldAccessInCrossInline() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/directFieldAccessInCrossInline.kt"); } + @Test @TestMetadata("privateCall.kt") public void testPrivateCall() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/privateCall.kt"); } + @Test @TestMetadata("privateInCrossInline.kt") public void testPrivateInCrossInline() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/privateInCrossInline.kt"); } + @Test @TestMetadata("privateInDefaultStubArgument.kt") public void testPrivateInDefaultStubArgument() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/privateInDefaultStubArgument.kt"); } + @Test @TestMetadata("protectedInCrossinline.kt") public void testProtectedInCrossinline() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/protectedInCrossinline.kt"); } + @Test @TestMetadata("protectedMembersFromSuper.kt") public void testProtectedMembersFromSuper() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/protectedMembersFromSuper.kt"); } + @Test @TestMetadata("superCall.kt") public void testSuperCall() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/superCall.kt"); } + @Test @TestMetadata("superInCrossInline.kt") public void testSuperInCrossInline() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/superInCrossInline.kt"); @@ -4570,79 +5227,78 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/trait") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Trait extends AbstractIrCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Trait { + @Test public void testAllFilesPresentInTrait() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/trait"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("trait.kt") public void testTrait() throws Exception { runTest("compiler/testData/codegen/boxInline/trait/trait.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/tryCatchFinally") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class TryCatchFinally extends AbstractIrCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class TryCatchFinally { + @Test public void testAllFilesPresentInTryCatchFinally() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/tryCatchFinally"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("kt5863.kt") public void testKt5863() throws Exception { runTest("compiler/testData/codegen/boxInline/tryCatchFinally/kt5863.kt"); } + @Test @TestMetadata("tryCatch.kt") public void testTryCatch() throws Exception { runTest("compiler/testData/codegen/boxInline/tryCatchFinally/tryCatch.kt"); } + @Test @TestMetadata("tryCatch2.kt") public void testTryCatch2() throws Exception { runTest("compiler/testData/codegen/boxInline/tryCatchFinally/tryCatch2.kt"); } + @Test @TestMetadata("tryCatchFinally.kt") public void testTryCatchFinally() throws Exception { runTest("compiler/testData/codegen/boxInline/tryCatchFinally/tryCatchFinally.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/varargs") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Varargs extends AbstractIrCompileKotlinAgainstInlineKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Varargs { + @Test public void testAllFilesPresentInVarargs() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/varargs"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test @TestMetadata("kt17653.kt") public void testKt17653() throws Exception { runTest("compiler/testData/codegen/boxInline/varargs/kt17653.kt"); } + @Test @TestMetadata("varargAndDefaultParameters.kt") public void testVarargAndDefaultParameters() throws Exception { runTest("compiler/testData/codegen/boxInline/varargs/varargAndDefaultParameters.kt"); } + @Test @TestMetadata("varargAndDefaultParameters2.kt") public void testVarargAndDefaultParameters2() throws Exception { runTest("compiler/testData/codegen/boxInline/varargs/varargAndDefaultParameters2.kt"); diff --git a/compiler/tests-gen/org/jetbrains/kotlin/codegen/ir/JvmIrAgainstOldBoxInlineTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/JvmIrAgainstOldBoxInlineTestGenerated.java similarity index 86% rename from compiler/tests-gen/org/jetbrains/kotlin/codegen/ir/JvmIrAgainstOldBoxInlineTestGenerated.java rename to compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/JvmIrAgainstOldBoxInlineTestGenerated.java index 7fbe2635784..b33d5bef291 100644 --- a/compiler/tests-gen/org/jetbrains/kotlin/codegen/ir/JvmIrAgainstOldBoxInlineTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/JvmIrAgainstOldBoxInlineTestGenerated.java @@ -3,569 +3,651 @@ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. */ -package org.jetbrains.kotlin.codegen.ir; +package org.jetbrains.kotlin.test.runners.codegen; import com.intellij.testFramework.TestDataPath; -import org.jetbrains.kotlin.test.JUnit3RunnerWithInners; -import org.jetbrains.kotlin.test.KotlinTestUtils; import org.jetbrains.kotlin.test.util.KtTestUtil; import org.jetbrains.kotlin.test.TargetBackend; import org.jetbrains.kotlin.test.TestMetadata; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.Nested; +import org.junit.jupiter.api.Test; import java.io.File; import java.util.regex.Pattern; -/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */ +/** This class is generated by {@link GenerateNewCompilerTests.kt}. DO NOT MODIFY MANUALLY */ @SuppressWarnings("all") @TestMetadata("compiler/testData/codegen/boxInline") @TestDataPath("$PROJECT_ROOT") -@RunWith(JUnit3RunnerWithInners.class) public class JvmIrAgainstOldBoxInlineTestGenerated extends AbstractJvmIrAgainstOldBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + @Test public void testAllFilesPresentInBoxInline() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true); } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/anonymousObject") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class AnonymousObject extends AbstractJvmIrAgainstOldBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class AnonymousObject { + @Test public void testAllFilesPresentInAnonymousObject() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/anonymousObject"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true); } + @Test @TestMetadata("anonymousObjectInDefault.kt") public void testAnonymousObjectInDefault() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectInDefault.kt"); } + @Test @TestMetadata("anonymousObjectOnCallSite.kt") public void testAnonymousObjectOnCallSite() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnCallSite.kt"); } + @Test @TestMetadata("anonymousObjectOnCallSiteSuperParams.kt") public void testAnonymousObjectOnCallSiteSuperParams() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnCallSiteSuperParams.kt"); } + @Test @TestMetadata("anonymousObjectOnDeclarationSite.kt") public void testAnonymousObjectOnDeclarationSite() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnDeclarationSite.kt"); } + @Test @TestMetadata("anonymousObjectOnDeclarationSiteSuperParams.kt") public void testAnonymousObjectOnDeclarationSiteSuperParams() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnDeclarationSiteSuperParams.kt"); } + @Test @TestMetadata("capturedLambdaInInline.kt") public void testCapturedLambdaInInline() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInline.kt"); } + @Test @TestMetadata("capturedLambdaInInline2.kt") public void testCapturedLambdaInInline2() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInline2.kt"); } + @Test @TestMetadata("capturedLambdaInInline3.kt") public void testCapturedLambdaInInline3() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInline3.kt"); } + @Test @TestMetadata("capturedLambdaInInlineObject.kt") public void testCapturedLambdaInInlineObject() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInlineObject.kt"); } + @Test @TestMetadata("capturedLocalFun.kt") public void testCapturedLocalFun() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/capturedLocalFun.kt"); } + @Test @TestMetadata("capturedLocalFunRef.kt") public void testCapturedLocalFunRef() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/capturedLocalFunRef.kt"); } + @Test @TestMetadata("changingReturnType.kt") public void testChangingReturnType() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/changingReturnType.kt"); } + @Test @TestMetadata("constructOriginalInRegenerated.kt") public void testConstructOriginalInRegenerated() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/constructOriginalInRegenerated.kt"); } + @Test @TestMetadata("constructorVisibility.kt") public void testConstructorVisibility() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/constructorVisibility.kt"); } + @Test @TestMetadata("constructorVisibilityInConstLambda.kt") public void testConstructorVisibilityInConstLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/constructorVisibilityInConstLambda.kt"); } + @Test @TestMetadata("constructorVisibilityInLambda.kt") public void testConstructorVisibilityInLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/constructorVisibilityInLambda.kt"); } + @Test @TestMetadata("defineClass.kt") public void testDefineClass() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/defineClass.kt"); } + @Test @TestMetadata("functionExpression.kt") public void testFunctionExpression() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/functionExpression.kt"); } + @Test @TestMetadata("inlineCallInsideInlineLambda.kt") public void testInlineCallInsideInlineLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/inlineCallInsideInlineLambda.kt"); } + @Test @TestMetadata("kt13133.kt") public void testKt13133() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt13133.kt"); } + @Test @TestMetadata("kt13182.kt") public void testKt13182() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt13182.kt"); } + @Test @TestMetadata("kt13374.kt") public void testKt13374() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt13374.kt"); } + @Test @TestMetadata("kt14011.kt") public void testKt14011() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt14011.kt"); } + @Test @TestMetadata("kt14011_2.kt") public void testKt14011_2() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt14011_2.kt"); } + @Test @TestMetadata("kt14011_3.kt") public void testKt14011_3() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt14011_3.kt"); } + @Test @TestMetadata("kt15751.kt") public void testKt15751() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt15751.kt"); } + @Test @TestMetadata("kt16193.kt") public void testKt16193() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt16193.kt"); } + @Test @TestMetadata("kt17972.kt") public void testKt17972() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt17972.kt"); } + @Test @TestMetadata("kt17972_2.kt") public void testKt17972_2() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt17972_2.kt"); } + @Test @TestMetadata("kt17972_3.kt") public void testKt17972_3() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt17972_3.kt"); } + @Test @TestMetadata("kt17972_4.kt") public void testKt17972_4() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt17972_4.kt"); } + @Test @TestMetadata("kt17972_5.kt") public void testKt17972_5() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt17972_5.kt"); } + @Test @TestMetadata("kt17972_super.kt") public void testKt17972_super() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt17972_super.kt"); } + @Test @TestMetadata("kt17972_super2.kt") public void testKt17972_super2() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt17972_super2.kt"); } + @Test @TestMetadata("kt17972_super3.kt") public void testKt17972_super3() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt17972_super3.kt"); } + @Test @TestMetadata("kt19389.kt") public void testKt19389() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt19389.kt"); } + @Test @TestMetadata("kt19399.kt") public void testKt19399() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt19399.kt"); } + @Test @TestMetadata("kt19434.kt") public void testKt19434() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt19434.kt"); } + @Test @TestMetadata("kt19434_2.kt") public void testKt19434_2() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt19434_2.kt"); } + @Test @TestMetadata("kt19723.kt") public void testKt19723() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt19723.kt"); } + @Test + @TestMetadata("kt29595.kt") + public void testKt29595() throws Exception { + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt29595.kt"); + } + + @Test @TestMetadata("kt34656.kt") public void testKt34656() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt34656.kt"); } + @Test @TestMetadata("kt38197.kt") public void testKt38197() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt38197.kt"); } + @Test @TestMetadata("kt42815.kt") public void testKt42815() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt42815.kt"); } + @Test @TestMetadata("kt42815_delegated.kt") public void testKt42815_delegated() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt42815_delegated.kt"); } + @Test + @TestMetadata("kt6007.kt") + public void testKt6007() throws Exception { + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt6007.kt"); + } + + @Test @TestMetadata("kt6552.kt") public void testKt6552() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt6552.kt"); } + @Test @TestMetadata("kt8133.kt") public void testKt8133() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt8133.kt"); } + @Test @TestMetadata("kt9064.kt") public void testKt9064() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt9064.kt"); } + @Test @TestMetadata("kt9064v2.kt") public void testKt9064v2() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt9064v2.kt"); } + @Test @TestMetadata("kt9591.kt") public void testKt9591() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt9591.kt"); } + @Test @TestMetadata("kt9877.kt") public void testKt9877() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt9877.kt"); } + @Test @TestMetadata("kt9877_2.kt") public void testKt9877_2() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt9877_2.kt"); } + @Test @TestMetadata("objectInLambdaCapturesAnotherObject.kt") public void testObjectInLambdaCapturesAnotherObject() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/objectInLambdaCapturesAnotherObject.kt"); } + @Test @TestMetadata("safeCall.kt") public void testSafeCall() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/safeCall.kt"); } + @Test @TestMetadata("safeCall_2.kt") public void testSafeCall_2() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/safeCall_2.kt"); } + @Test @TestMetadata("sam.kt") public void testSam() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/sam.kt"); } + @Test @TestMetadata("sharedFromCrossinline.kt") public void testSharedFromCrossinline() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/sharedFromCrossinline.kt"); } + @Test @TestMetadata("superConstructorWithObjectParameter.kt") public void testSuperConstructorWithObjectParameter() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/superConstructorWithObjectParameter.kt"); } + @Test @TestMetadata("typeInfo.kt") public void testTypeInfo() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/typeInfo.kt"); } + @Test @TestMetadata("withInlineMethod.kt") public void testWithInlineMethod() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/withInlineMethod.kt"); } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/anonymousObject/enumWhen") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class EnumWhen extends AbstractJvmIrAgainstOldBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class EnumWhen { + @Test public void testAllFilesPresentInEnumWhen() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/anonymousObject/enumWhen"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true); } + @Test @TestMetadata("callSite.kt") public void testCallSite() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/enumWhen/callSite.kt"); } + @Test @TestMetadata("declSite.kt") public void testDeclSite() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/enumWhen/declSite.kt"); } + @Test @TestMetadata("declSiteSeveralMappings.kt") public void testDeclSiteSeveralMappings() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/enumWhen/declSiteSeveralMappings.kt"); } + @Test @TestMetadata("declSiteSeveralMappingsDifOrder.kt") public void testDeclSiteSeveralMappingsDifOrder() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/enumWhen/declSiteSeveralMappingsDifOrder.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class ProperRecapturing extends AbstractJvmIrAgainstOldBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class ProperRecapturing { + @Test public void testAllFilesPresentInProperRecapturing() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true); } + @Test @TestMetadata("inlineChain.kt") public void testInlineChain() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/inlineChain.kt"); } + @Test @TestMetadata("lambdaChain.kt") public void testLambdaChain() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChain.kt"); } + @Test @TestMetadata("lambdaChainSimple.kt") public void testLambdaChainSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChainSimple.kt"); } + @Test @TestMetadata("lambdaChain_2.kt") public void testLambdaChain_2() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChain_2.kt"); } + @Test @TestMetadata("lambdaChain_3.kt") public void testLambdaChain_3() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChain_3.kt"); } + @Test @TestMetadata("noInlineLambda.kt") public void testNoInlineLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/noInlineLambda.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class ProperRecapturingInClass extends AbstractJvmIrAgainstOldBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class ProperRecapturingInClass { + @Test public void testAllFilesPresentInProperRecapturingInClass() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true); } + @Test @TestMetadata("inlineChain.kt") public void testInlineChain() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/inlineChain.kt"); } + @Test @TestMetadata("inlinelambdaChain.kt") public void testInlinelambdaChain() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/inlinelambdaChain.kt"); } + @Test @TestMetadata("lambdaChain.kt") public void testLambdaChain() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChain.kt"); } + @Test @TestMetadata("lambdaChainSimple.kt") public void testLambdaChainSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChainSimple.kt"); } + @Test @TestMetadata("lambdaChainSimple_2.kt") public void testLambdaChainSimple_2() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChainSimple_2.kt"); } + @Test @TestMetadata("lambdaChain_2.kt") public void testLambdaChain_2() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChain_2.kt"); } + @Test @TestMetadata("lambdaChain_3.kt") public void testLambdaChain_3() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChain_3.kt"); } + @Test @TestMetadata("noCapturedThisOnCallSite.kt") public void testNoCapturedThisOnCallSite() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/noCapturedThisOnCallSite.kt"); } + @Test @TestMetadata("noInlineLambda.kt") public void testNoInlineLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/noInlineLambda.kt"); } + @Test @TestMetadata("twoInlineLambda.kt") public void testTwoInlineLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/twoInlineLambda.kt"); } + @Test @TestMetadata("twoInlineLambdaComplex.kt") public void testTwoInlineLambdaComplex() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/twoInlineLambdaComplex.kt"); } + @Test @TestMetadata("twoInlineLambdaComplex_2.kt") public void testTwoInlineLambdaComplex_2() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/twoInlineLambdaComplex_2.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/anonymousObject/sam") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Sam extends AbstractJvmIrAgainstOldBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Sam { + @Test public void testAllFilesPresentInSam() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/anonymousObject/sam"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true); } + @Test @TestMetadata("anonymousObjectToSam.kt") public void testAnonymousObjectToSam() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/sam/anonymousObjectToSam.kt"); } + @Test @TestMetadata("kt17091.kt") public void testKt17091() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/sam/kt17091.kt"); } + @Test @TestMetadata("kt21671.kt") public void testKt21671() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/sam/kt21671.kt"); } + @Test @TestMetadata("kt21671_2.kt") public void testKt21671_2() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/sam/kt21671_2.kt"); } + @Test @TestMetadata("kt21671_3.kt") public void testKt21671_3() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/sam/kt21671_3.kt"); } + @Test @TestMetadata("kt22304.kt") public void testKt22304() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/sam/kt22304.kt"); } + @Test @TestMetadata("samOnCallSite.kt") public void testSamOnCallSite() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/sam/samOnCallSite.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class TwoCapturedReceivers extends AbstractJvmIrAgainstOldBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class TwoCapturedReceivers { + @Test public void testAllFilesPresentInTwoCapturedReceivers() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true); } + @Test @TestMetadata("kt8668.kt") public void testKt8668() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668.kt"); } + @Test @TestMetadata("kt8668_2.kt") public void testKt8668_2() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668_2.kt"); } + @Test @TestMetadata("kt8668_3.kt") public void testKt8668_3() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668_3.kt"); } + @Test @TestMetadata("twoDifferentDispatchReceivers.kt") public void testTwoDifferentDispatchReceivers() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/twoDifferentDispatchReceivers.kt"); } + @Test @TestMetadata("twoExtensionReceivers.kt") public void testTwoExtensionReceivers() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/twoExtensionReceivers.kt"); @@ -573,465 +655,525 @@ public class JvmIrAgainstOldBoxInlineTestGenerated extends AbstractJvmIrAgainstO } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/argumentOrder") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class ArgumentOrder extends AbstractJvmIrAgainstOldBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class ArgumentOrder { + @Test public void testAllFilesPresentInArgumentOrder() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/argumentOrder"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true); } + @Test @TestMetadata("boundFunctionReference.kt") public void testBoundFunctionReference() throws Exception { runTest("compiler/testData/codegen/boxInline/argumentOrder/boundFunctionReference.kt"); } + @Test @TestMetadata("boundFunctionReference2.kt") public void testBoundFunctionReference2() throws Exception { runTest("compiler/testData/codegen/boxInline/argumentOrder/boundFunctionReference2.kt"); } + @Test @TestMetadata("captured.kt") public void testCaptured() throws Exception { runTest("compiler/testData/codegen/boxInline/argumentOrder/captured.kt"); } + @Test @TestMetadata("capturedInExtension.kt") public void testCapturedInExtension() throws Exception { runTest("compiler/testData/codegen/boxInline/argumentOrder/capturedInExtension.kt"); } + @Test @TestMetadata("defaultParametersAndLastVararg.kt") public void testDefaultParametersAndLastVararg() throws Exception { runTest("compiler/testData/codegen/boxInline/argumentOrder/defaultParametersAndLastVararg.kt"); } + @Test @TestMetadata("defaultParametersAndLastVarargWithCorrectOrder.kt") public void testDefaultParametersAndLastVarargWithCorrectOrder() throws Exception { runTest("compiler/testData/codegen/boxInline/argumentOrder/defaultParametersAndLastVarargWithCorrectOrder.kt"); } + @Test @TestMetadata("extension.kt") public void testExtension() throws Exception { runTest("compiler/testData/codegen/boxInline/argumentOrder/extension.kt"); } + @Test @TestMetadata("extensionInClass.kt") public void testExtensionInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/argumentOrder/extensionInClass.kt"); } + @Test @TestMetadata("lambdaMigration.kt") public void testLambdaMigration() throws Exception { runTest("compiler/testData/codegen/boxInline/argumentOrder/lambdaMigration.kt"); } + @Test @TestMetadata("lambdaMigrationInClass.kt") public void testLambdaMigrationInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/argumentOrder/lambdaMigrationInClass.kt"); } + @Test @TestMetadata("simple.kt") public void testSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/argumentOrder/simple.kt"); } + @Test @TestMetadata("simpleInClass.kt") public void testSimpleInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/argumentOrder/simpleInClass.kt"); } + @Test @TestMetadata("varargAndDefaultParameters.kt") public void testVarargAndDefaultParameters() throws Exception { runTest("compiler/testData/codegen/boxInline/argumentOrder/varargAndDefaultParameters.kt"); } + @Test @TestMetadata("varargAndDefaultParametersWithCorrectOrder.kt") public void testVarargAndDefaultParametersWithCorrectOrder() throws Exception { runTest("compiler/testData/codegen/boxInline/argumentOrder/varargAndDefaultParametersWithCorrectOrder.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/arrayConvention") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class ArrayConvention extends AbstractJvmIrAgainstOldBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class ArrayConvention { + @Test public void testAllFilesPresentInArrayConvention() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/arrayConvention"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true); } + @Test @TestMetadata("simpleAccess.kt") public void testSimpleAccess() throws Exception { runTest("compiler/testData/codegen/boxInline/arrayConvention/simpleAccess.kt"); } + @Test @TestMetadata("simpleAccessInClass.kt") public void testSimpleAccessInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/arrayConvention/simpleAccessInClass.kt"); } + @Test @TestMetadata("simpleAccessWithDefault.kt") public void testSimpleAccessWithDefault() throws Exception { runTest("compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithDefault.kt"); } + @Test @TestMetadata("simpleAccessWithDefaultInClass.kt") public void testSimpleAccessWithDefaultInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithDefaultInClass.kt"); } + @Test @TestMetadata("simpleAccessWithLambda.kt") public void testSimpleAccessWithLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithLambda.kt"); } + @Test @TestMetadata("simpleAccessWithLambdaInClass.kt") public void testSimpleAccessWithLambdaInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithLambdaInClass.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/assert") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Assert extends AbstractJvmIrAgainstOldBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Assert { + @Test public void testAllFilesPresentInAssert() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/assert"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true); } + @Test @TestMetadata("jvmAssertInlineFunctionAssertionsDisabled.kt") public void testJvmAssertInlineFunctionAssertionsDisabled() throws Exception { runTest("compiler/testData/codegen/boxInline/assert/jvmAssertInlineFunctionAssertionsDisabled.kt"); } + @Test @TestMetadata("jvmAssertInlineFunctionAssertionsEnabled.kt") public void testJvmAssertInlineFunctionAssertionsEnabled() throws Exception { runTest("compiler/testData/codegen/boxInline/assert/jvmAssertInlineFunctionAssertionsEnabled.kt"); } + @Test @TestMetadata("jvmAssertInlineLambda.kt") public void testJvmAssertInlineLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/assert/jvmAssertInlineLambda.kt"); } + @Test @TestMetadata("jvmClassInitializer.kt") public void testJvmClassInitializer() throws Exception { runTest("compiler/testData/codegen/boxInline/assert/jvmClassInitializer.kt"); } + @Test @TestMetadata("jvmCompanion.kt") public void testJvmCompanion() throws Exception { runTest("compiler/testData/codegen/boxInline/assert/jvmCompanion.kt"); } + @Test @TestMetadata("jvmCrossinlineLambda.kt") public void testJvmCrossinlineLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/assert/jvmCrossinlineLambda.kt"); } + @Test @TestMetadata("jvmCrossinlineLambda2.kt") public void testJvmCrossinlineLambda2() throws Exception { runTest("compiler/testData/codegen/boxInline/assert/jvmCrossinlineLambda2.kt"); } + @Test @TestMetadata("jvmCrossinlineLambdaDeclarationSite.kt") public void testJvmCrossinlineLambdaDeclarationSite() throws Exception { runTest("compiler/testData/codegen/boxInline/assert/jvmCrossinlineLambdaDeclarationSite.kt"); } + @Test @TestMetadata("jvmCrossinlineLambdaDeclarationSiteOnly.kt") public void testJvmCrossinlineLambdaDeclarationSiteOnly() throws Exception { runTest("compiler/testData/codegen/boxInline/assert/jvmCrossinlineLambdaDeclarationSiteOnly.kt"); } + @Test @TestMetadata("jvmCrossinlineSAMDeclarationSite.kt") public void testJvmCrossinlineSAMDeclarationSite() throws Exception { runTest("compiler/testData/codegen/boxInline/assert/jvmCrossinlineSAMDeclarationSite.kt"); } + @Test @TestMetadata("jvmDoubleInline.kt") public void testJvmDoubleInline() throws Exception { runTest("compiler/testData/codegen/boxInline/assert/jvmDoubleInline.kt"); } + @Test @TestMetadata("jvmInlineUsedAsNoinline.kt") public void testJvmInlineUsedAsNoinline() throws Exception { runTest("compiler/testData/codegen/boxInline/assert/jvmInlineUsedAsNoinline.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/builders") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Builders extends AbstractJvmIrAgainstOldBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Builders { + @Test public void testAllFilesPresentInBuilders() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/builders"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true); } + @Test @TestMetadata("builders.kt") public void testBuilders() throws Exception { runTest("compiler/testData/codegen/boxInline/builders/builders.kt"); } + @Test @TestMetadata("buildersAndLambdaCapturing.kt") public void testBuildersAndLambdaCapturing() throws Exception { runTest("compiler/testData/codegen/boxInline/builders/buildersAndLambdaCapturing.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/bytecodePreprocessing") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class BytecodePreprocessing extends AbstractJvmIrAgainstOldBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class BytecodePreprocessing { + @Test public void testAllFilesPresentInBytecodePreprocessing() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/bytecodePreprocessing"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true); } + @Test @TestMetadata("apiVersionAtLeast1.kt") public void testApiVersionAtLeast1() throws Exception { runTest("compiler/testData/codegen/boxInline/bytecodePreprocessing/apiVersionAtLeast1.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/callableReference") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class CallableReference extends AbstractJvmIrAgainstOldBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class CallableReference { + @Test @TestMetadata("adapted.kt") public void testAdapted() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/adapted.kt"); } + @Test public void testAllFilesPresentInCallableReference() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/callableReference"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true); } + @Test @TestMetadata("classLevel.kt") public void testClassLevel() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/classLevel.kt"); } + @Test @TestMetadata("classLevel2.kt") public void testClassLevel2() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/classLevel2.kt"); } + @Test @TestMetadata("constructor.kt") public void testConstructor() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/constructor.kt"); } + @Test @TestMetadata("innerGenericConstuctor.kt") public void testInnerGenericConstuctor() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/innerGenericConstuctor.kt"); } + @Test @TestMetadata("intrinsic.kt") public void testIntrinsic() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/intrinsic.kt"); } + @Test @TestMetadata("jvmFieldProperty.kt") public void testJvmFieldProperty() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/jvmFieldProperty.kt"); } + @Test @TestMetadata("kt15449.kt") public void testKt15449() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/kt15449.kt"); } + @Test @TestMetadata("kt15751_2.kt") public void testKt15751_2() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/kt15751_2.kt"); } + @Test @TestMetadata("kt16411.kt") public void testKt16411() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/kt16411.kt"); } + @Test @TestMetadata("kt35101.kt") public void testKt35101() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/kt35101.kt"); } + @Test @TestMetadata("propertyIntrinsic.kt") public void testPropertyIntrinsic() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/propertyIntrinsic.kt"); } + @Test @TestMetadata("propertyReference.kt") public void testPropertyReference() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/propertyReference.kt"); } + @Test @TestMetadata("topLevel.kt") public void testTopLevel() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/topLevel.kt"); } + @Test @TestMetadata("topLevelExtension.kt") public void testTopLevelExtension() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/topLevelExtension.kt"); } + @Test @TestMetadata("topLevelProperty.kt") public void testTopLevelProperty() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/topLevelProperty.kt"); } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/callableReference/bound") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Bound extends AbstractJvmIrAgainstOldBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Bound { + @Test public void testAllFilesPresentInBound() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/callableReference/bound"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true); } + @Test @TestMetadata("classProperty.kt") public void testClassProperty() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/classProperty.kt"); } + @Test @TestMetadata("emptyLhsFunction.kt") public void testEmptyLhsFunction() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/emptyLhsFunction.kt"); } + @Test @TestMetadata("emptyLhsOnInlineProperty.kt") public void testEmptyLhsOnInlineProperty() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/emptyLhsOnInlineProperty.kt"); } + @Test @TestMetadata("emptyLhsProperty.kt") public void testEmptyLhsProperty() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/emptyLhsProperty.kt"); } + @Test @TestMetadata("expression.kt") public void testExpression() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/expression.kt"); } + @Test @TestMetadata("extensionReceiver.kt") public void testExtensionReceiver() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/extensionReceiver.kt"); } + @Test @TestMetadata("filter.kt") public void testFilter() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/filter.kt"); } + @Test @TestMetadata("inlineValueParameterInsteadOfReceiver.kt") public void testInlineValueParameterInsteadOfReceiver() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/inlineValueParameterInsteadOfReceiver.kt"); } + @Test @TestMetadata("innerGenericConstuctor.kt") public void testInnerGenericConstuctor() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/innerGenericConstuctor.kt"); } + @Test @TestMetadata("intrinsic.kt") public void testIntrinsic() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/intrinsic.kt"); } + @Test @TestMetadata("jvmFieldProperty.kt") public void testJvmFieldProperty() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/jvmFieldProperty.kt"); } + @Test @TestMetadata("kt18728.kt") public void testKt18728() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/kt18728.kt"); } + @Test @TestMetadata("kt18728_2.kt") public void testKt18728_2() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/kt18728_2.kt"); } + @Test @TestMetadata("kt18728_3.kt") public void testKt18728_3() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/kt18728_3.kt"); } + @Test @TestMetadata("kt18728_4.kt") public void testKt18728_4() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/kt18728_4.kt"); } + @Test + @TestMetadata("lambdaOnLhs.kt") + public void testLambdaOnLhs() throws Exception { + runTest("compiler/testData/codegen/boxInline/callableReference/bound/lambdaOnLhs.kt"); + } + + @Test @TestMetadata("map.kt") public void testMap() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/map.kt"); } + @Test @TestMetadata("mixed.kt") public void testMixed() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/mixed.kt"); } + @Test @TestMetadata("objectProperty.kt") public void testObjectProperty() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/objectProperty.kt"); } + @Test @TestMetadata("propertyImportedFromObject.kt") public void testPropertyImportedFromObject() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/propertyImportedFromObject.kt"); } + @Test @TestMetadata("sideEffect.kt") public void testSideEffect() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/sideEffect.kt"); } + @Test @TestMetadata("simple.kt") public void testSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/simple.kt"); } + @Test @TestMetadata("simpleVal.kt") public void testSimpleVal() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/simpleVal.kt"); } + @Test @TestMetadata("simpleVal2.kt") public void testSimpleVal2() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/simpleVal2.kt"); } + @Test @TestMetadata("topLevelExtensionProperty.kt") public void testTopLevelExtensionProperty() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/topLevelExtensionProperty.kt"); @@ -1039,649 +1181,740 @@ public class JvmIrAgainstOldBoxInlineTestGenerated extends AbstractJvmIrAgainstO } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/capture") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Capture extends AbstractJvmIrAgainstOldBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Capture { + @Test public void testAllFilesPresentInCapture() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/capture"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true); } + @Test @TestMetadata("captureInlinable.kt") public void testCaptureInlinable() throws Exception { runTest("compiler/testData/codegen/boxInline/capture/captureInlinable.kt"); } + @Test @TestMetadata("captureInlinableAndOther.kt") public void testCaptureInlinableAndOther() throws Exception { runTest("compiler/testData/codegen/boxInline/capture/captureInlinableAndOther.kt"); } + @Test @TestMetadata("captureThisAndReceiver.kt") public void testCaptureThisAndReceiver() throws Exception { runTest("compiler/testData/codegen/boxInline/capture/captureThisAndReceiver.kt"); } + @Test @TestMetadata("generics.kt") public void testGenerics() throws Exception { runTest("compiler/testData/codegen/boxInline/capture/generics.kt"); } + @Test @TestMetadata("simpleCapturingInClass.kt") public void testSimpleCapturingInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/capture/simpleCapturingInClass.kt"); } + @Test @TestMetadata("simpleCapturingInPackage.kt") public void testSimpleCapturingInPackage() throws Exception { runTest("compiler/testData/codegen/boxInline/capture/simpleCapturingInPackage.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/complex") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Complex extends AbstractJvmIrAgainstOldBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Complex { + @Test public void testAllFilesPresentInComplex() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/complex"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true); } + @Test @TestMetadata("closureChain.kt") public void testClosureChain() throws Exception { runTest("compiler/testData/codegen/boxInline/complex/closureChain.kt"); } + @Test @TestMetadata("forEachLine.kt") public void testForEachLine() throws Exception { runTest("compiler/testData/codegen/boxInline/complex/forEachLine.kt"); } + @Test @TestMetadata("kt44429.kt") public void testKt44429() throws Exception { runTest("compiler/testData/codegen/boxInline/complex/kt44429.kt"); } + @Test @TestMetadata("lambdaInLambda.kt") public void testLambdaInLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/complex/lambdaInLambda.kt"); } + @Test @TestMetadata("swapAndWith.kt") public void testSwapAndWith() throws Exception { runTest("compiler/testData/codegen/boxInline/complex/swapAndWith.kt"); } + @Test @TestMetadata("swapAndWith2.kt") public void testSwapAndWith2() throws Exception { runTest("compiler/testData/codegen/boxInline/complex/swapAndWith2.kt"); } + @Test @TestMetadata("use.kt") public void testUse() throws Exception { runTest("compiler/testData/codegen/boxInline/complex/use.kt"); } + @Test @TestMetadata("with.kt") public void testWith() throws Exception { runTest("compiler/testData/codegen/boxInline/complex/with.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/complexStack") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class ComplexStack extends AbstractJvmIrAgainstOldBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class ComplexStack { + @Test public void testAllFilesPresentInComplexStack() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/complexStack"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true); } + @Test @TestMetadata("asCheck.kt") public void testAsCheck() throws Exception { runTest("compiler/testData/codegen/boxInline/complexStack/asCheck.kt"); } + @Test @TestMetadata("asCheck2.kt") public void testAsCheck2() throws Exception { runTest("compiler/testData/codegen/boxInline/complexStack/asCheck2.kt"); } + @Test @TestMetadata("breakContinueInInlineLambdaArgument.kt") public void testBreakContinueInInlineLambdaArgument() throws Exception { runTest("compiler/testData/codegen/boxInline/complexStack/breakContinueInInlineLambdaArgument.kt"); } + @Test @TestMetadata("simple.kt") public void testSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/complexStack/simple.kt"); } + @Test @TestMetadata("simple2.kt") public void testSimple2() throws Exception { runTest("compiler/testData/codegen/boxInline/complexStack/simple2.kt"); } + @Test @TestMetadata("simple3.kt") public void testSimple3() throws Exception { runTest("compiler/testData/codegen/boxInline/complexStack/simple3.kt"); } + @Test @TestMetadata("simple4.kt") public void testSimple4() throws Exception { runTest("compiler/testData/codegen/boxInline/complexStack/simple4.kt"); } + @Test @TestMetadata("simpleExtension.kt") public void testSimpleExtension() throws Exception { runTest("compiler/testData/codegen/boxInline/complexStack/simpleExtension.kt"); } + @Test @TestMetadata("spillConstructorArgumentsAndInlineLambdaParameter.kt") public void testSpillConstructorArgumentsAndInlineLambdaParameter() throws Exception { runTest("compiler/testData/codegen/boxInline/complexStack/spillConstructorArgumentsAndInlineLambdaParameter.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/contracts") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Contracts extends AbstractJvmIrAgainstOldBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Contracts { + @Test public void testAllFilesPresentInContracts() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/contracts"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true); } + @Test @TestMetadata("cfgDependendValInitialization.kt") public void testCfgDependendValInitialization() throws Exception { runTest("compiler/testData/codegen/boxInline/contracts/cfgDependendValInitialization.kt"); } + @Test @TestMetadata("complexInitializer.kt") public void testComplexInitializer() throws Exception { runTest("compiler/testData/codegen/boxInline/contracts/complexInitializer.kt"); } + @Test @TestMetadata("complexInitializerWithStackTransformation.kt") public void testComplexInitializerWithStackTransformation() throws Exception { runTest("compiler/testData/codegen/boxInline/contracts/complexInitializerWithStackTransformation.kt"); } + @Test @TestMetadata("crossinlineCallableReference.kt") public void testCrossinlineCallableReference() throws Exception { runTest("compiler/testData/codegen/boxInline/contracts/crossinlineCallableReference.kt"); } + @Test @TestMetadata("definiteLongValInitialization.kt") public void testDefiniteLongValInitialization() throws Exception { runTest("compiler/testData/codegen/boxInline/contracts/definiteLongValInitialization.kt"); } + @Test @TestMetadata("definiteNestedValInitialization.kt") public void testDefiniteNestedValInitialization() throws Exception { runTest("compiler/testData/codegen/boxInline/contracts/definiteNestedValInitialization.kt"); } + @Test @TestMetadata("definiteValInitInInitializer.kt") public void testDefiniteValInitInInitializer() throws Exception { runTest("compiler/testData/codegen/boxInline/contracts/definiteValInitInInitializer.kt"); } + @Test @TestMetadata("definiteValInitialization.kt") public void testDefiniteValInitialization() throws Exception { runTest("compiler/testData/codegen/boxInline/contracts/definiteValInitialization.kt"); } + @Test @TestMetadata("exactlyOnceCrossinline.kt") public void testExactlyOnceCrossinline() throws Exception { runTest("compiler/testData/codegen/boxInline/contracts/exactlyOnceCrossinline.kt"); } + @Test @TestMetadata("exactlyOnceCrossinline2.kt") public void testExactlyOnceCrossinline2() throws Exception { runTest("compiler/testData/codegen/boxInline/contracts/exactlyOnceCrossinline2.kt"); } + @Test @TestMetadata("exactlyOnceNoinline.kt") public void testExactlyOnceNoinline() throws Exception { runTest("compiler/testData/codegen/boxInline/contracts/exactlyOnceNoinline.kt"); } + @Test @TestMetadata("nonLocalReturn.kt") public void testNonLocalReturn() throws Exception { runTest("compiler/testData/codegen/boxInline/contracts/nonLocalReturn.kt"); } + @Test @TestMetadata("nonLocalReturnWithCycle.kt") public void testNonLocalReturnWithCycle() throws Exception { runTest("compiler/testData/codegen/boxInline/contracts/nonLocalReturnWithCycle.kt"); } + @Test @TestMetadata("propertyInitialization.kt") public void testPropertyInitialization() throws Exception { runTest("compiler/testData/codegen/boxInline/contracts/propertyInitialization.kt"); } + @Test @TestMetadata("valInitializationAndUsageInNestedLambda.kt") public void testValInitializationAndUsageInNestedLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/contracts/valInitializationAndUsageInNestedLambda.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/defaultValues") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class DefaultValues extends AbstractJvmIrAgainstOldBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class DefaultValues { + @Test @TestMetadata("33Parameters.kt") public void test33Parameters() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/33Parameters.kt"); } + @Test @TestMetadata("33ParametersInConstructor.kt") public void test33ParametersInConstructor() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/33ParametersInConstructor.kt"); } + @Test public void testAllFilesPresentInDefaultValues() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/defaultValues"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true); } + @Test @TestMetadata("defaultInExtension.kt") public void testDefaultInExtension() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/defaultInExtension.kt"); } + @Test @TestMetadata("defaultMethod.kt") public void testDefaultMethod() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/defaultMethod.kt"); } + @Test @TestMetadata("defaultMethodInClass.kt") public void testDefaultMethodInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/defaultMethodInClass.kt"); } + @Test @TestMetadata("defaultParamRemapping.kt") public void testDefaultParamRemapping() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/defaultParamRemapping.kt"); } + @Test @TestMetadata("inlineInDefaultParameter.kt") public void testInlineInDefaultParameter() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/inlineInDefaultParameter.kt"); } + @Test @TestMetadata("inlineLambdaInNoInlineDefault.kt") public void testInlineLambdaInNoInlineDefault() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/inlineLambdaInNoInlineDefault.kt"); } + @Test @TestMetadata("kt11479.kt") public void testKt11479() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/kt11479.kt"); } + @Test @TestMetadata("kt11479InlinedDefaultParameter.kt") public void testKt11479InlinedDefaultParameter() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/kt11479InlinedDefaultParameter.kt"); } + @Test @TestMetadata("kt14564.kt") public void testKt14564() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/kt14564.kt"); } + @Test @TestMetadata("kt14564_2.kt") public void testKt14564_2() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/kt14564_2.kt"); } + @Test @TestMetadata("kt16496.kt") public void testKt16496() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/kt16496.kt"); } + @Test @TestMetadata("kt18689.kt") public void testKt18689() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/kt18689.kt"); } + @Test @TestMetadata("kt18689_2.kt") public void testKt18689_2() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/kt18689_2.kt"); } + @Test @TestMetadata("kt18689_3.kt") public void testKt18689_3() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/kt18689_3.kt"); } + @Test @TestMetadata("kt18689_4.kt") public void testKt18689_4() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/kt18689_4.kt"); } + @Test @TestMetadata("kt5685.kt") public void testKt5685() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/kt5685.kt"); } + @Test @TestMetadata("simpleDefaultMethod.kt") public void testSimpleDefaultMethod() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/simpleDefaultMethod.kt"); } + @Test @TestMetadata("varArgNoInline.kt") public void testVarArgNoInline() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/varArgNoInline.kt"); } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class LambdaInlining extends AbstractJvmIrAgainstOldBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class LambdaInlining { + @Test public void testAllFilesPresentInLambdaInlining() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true); } + @Test @TestMetadata("checkLambdaClassIsPresent.kt") public void testCheckLambdaClassIsPresent() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/checkLambdaClassIsPresent.kt"); } + @Test @TestMetadata("checkLambdaClassesArePresent.kt") public void testCheckLambdaClassesArePresent() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/checkLambdaClassesArePresent.kt"); } + @Test @TestMetadata("checkObjectClassIsPresent.kt") public void testCheckObjectClassIsPresent() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/checkObjectClassIsPresent.kt"); } + @Test @TestMetadata("checkStaticLambdaClassIsPresent.kt") public void testCheckStaticLambdaClassIsPresent() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/checkStaticLambdaClassIsPresent.kt"); } + @Test @TestMetadata("checkStaticLambdaClassesArePresent.kt") public void testCheckStaticLambdaClassesArePresent() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/checkStaticLambdaClassesArePresent.kt"); } + @Test @TestMetadata("checkStaticObjectClassIsPresent.kt") public void testCheckStaticObjectClassIsPresent() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/checkStaticObjectClassIsPresent.kt"); } + @Test @TestMetadata("defaultCallInDefaultLambda.kt") public void testDefaultCallInDefaultLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/defaultCallInDefaultLambda.kt"); } + @Test @TestMetadata("defaultLambdaInNoInline.kt") public void testDefaultLambdaInNoInline() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/defaultLambdaInNoInline.kt"); } + @Test @TestMetadata("differentInvokeSignature.kt") public void testDifferentInvokeSignature() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/differentInvokeSignature.kt"); } + @Test @TestMetadata("genericLambda.kt") public void testGenericLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/genericLambda.kt"); } + @Test @TestMetadata("instanceCapturedInClass.kt") public void testInstanceCapturedInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/instanceCapturedInClass.kt"); } + @Test @TestMetadata("instanceCapturedInInterface.kt") public void testInstanceCapturedInInterface() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/instanceCapturedInInterface.kt"); } + @Test @TestMetadata("jvmStaticDefault.kt") public void testJvmStaticDefault() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/jvmStaticDefault.kt"); } + @Test @TestMetadata("kt21827.kt") public void testKt21827() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/kt21827.kt"); } + @Test @TestMetadata("kt21946.kt") public void testKt21946() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/kt21946.kt"); } + @Test @TestMetadata("kt24477.kt") public void testKt24477() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/kt24477.kt"); } + @Test @TestMetadata("kt25106.kt") public void testKt25106() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/kt25106.kt"); } + @Test @TestMetadata("kt26636.kt") public void testKt26636() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/kt26636.kt"); } + @Test @TestMetadata("noInline.kt") public void testNoInline() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/noInline.kt"); } + @Test @TestMetadata("nonDefaultInlineInNoInline.kt") public void testNonDefaultInlineInNoInline() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/nonDefaultInlineInNoInline.kt"); } + @Test @TestMetadata("receiverClash.kt") public void testReceiverClash() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/receiverClash.kt"); } + @Test @TestMetadata("receiverClash2.kt") public void testReceiverClash2() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/receiverClash2.kt"); } + @Test @TestMetadata("receiverClashInClass.kt") public void testReceiverClashInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/receiverClashInClass.kt"); } + @Test @TestMetadata("receiverClashInClass2.kt") public void testReceiverClashInClass2() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/receiverClashInClass2.kt"); } + @Test @TestMetadata("simple.kt") public void testSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simple.kt"); } + @Test @TestMetadata("simpleErased.kt") public void testSimpleErased() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simpleErased.kt"); } + @Test @TestMetadata("simpleErasedStaticInstance.kt") public void testSimpleErasedStaticInstance() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simpleErasedStaticInstance.kt"); } + @Test @TestMetadata("simpleExtension.kt") public void testSimpleExtension() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simpleExtension.kt"); } + @Test @TestMetadata("simpleGeneric.kt") public void testSimpleGeneric() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simpleGeneric.kt"); } + @Test @TestMetadata("simpleStaticInstance.kt") public void testSimpleStaticInstance() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simpleStaticInstance.kt"); } + @Test @TestMetadata("thisClash.kt") public void testThisClash() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/thisClash.kt"); } + @Test @TestMetadata("thisClashInClass.kt") public void testThisClashInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/thisClashInClass.kt"); } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class CallableReferences extends AbstractJvmIrAgainstOldBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class CallableReferences { + @Test public void testAllFilesPresentInCallableReferences() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true); } + @Test @TestMetadata("boundFunctionReference.kt") public void testBoundFunctionReference() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundFunctionReference.kt"); } + @Test @TestMetadata("boundFunctionReferenceOnInt.kt") public void testBoundFunctionReferenceOnInt() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundFunctionReferenceOnInt.kt"); } + @Test @TestMetadata("boundFunctionReferenceOnLong.kt") public void testBoundFunctionReferenceOnLong() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundFunctionReferenceOnLong.kt"); } + @Test @TestMetadata("boundPropertyReference.kt") public void testBoundPropertyReference() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundPropertyReference.kt"); } + @Test @TestMetadata("boundPropertyReferenceOnInt.kt") public void testBoundPropertyReferenceOnInt() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundPropertyReferenceOnInt.kt"); } + @Test @TestMetadata("boundPropertyReferenceOnLong.kt") public void testBoundPropertyReferenceOnLong() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundPropertyReferenceOnLong.kt"); } + @Test @TestMetadata("constuctorReference.kt") public void testConstuctorReference() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/constuctorReference.kt"); } + @Test @TestMetadata("differentInvokeSignature.kt") public void testDifferentInvokeSignature() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/differentInvokeSignature.kt"); } + @Test @TestMetadata("differentInvokeSignature2.kt") public void testDifferentInvokeSignature2() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/differentInvokeSignature2.kt"); } + @Test @TestMetadata("functionImportedFromObject.kt") public void testFunctionImportedFromObject() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/functionImportedFromObject.kt"); } + @Test @TestMetadata("functionReference.kt") public void testFunctionReference() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/functionReference.kt"); } + @Test @TestMetadata("functionReferenceFromClass.kt") public void testFunctionReferenceFromClass() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/functionReferenceFromClass.kt"); } + @Test @TestMetadata("functionReferenceFromObject.kt") public void testFunctionReferenceFromObject() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/functionReferenceFromObject.kt"); } + @Test @TestMetadata("innerClassConstuctorReference.kt") public void testInnerClassConstuctorReference() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/innerClassConstuctorReference.kt"); } + @Test @TestMetadata("mutableBoundPropertyReferenceFromClass.kt") public void testMutableBoundPropertyReferenceFromClass() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/mutableBoundPropertyReferenceFromClass.kt"); } + @Test @TestMetadata("mutablePropertyReferenceFromClass.kt") public void testMutablePropertyReferenceFromClass() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/mutablePropertyReferenceFromClass.kt"); } + @Test @TestMetadata("privateFunctionReference.kt") public void testPrivateFunctionReference() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/privateFunctionReference.kt"); } + @Test @TestMetadata("privatePropertyReference.kt") public void testPrivatePropertyReference() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/privatePropertyReference.kt"); } + @Test @TestMetadata("propertyImportedFromObject.kt") public void testPropertyImportedFromObject() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/propertyImportedFromObject.kt"); } + @Test @TestMetadata("propertyReference.kt") public void testPropertyReference() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/propertyReference.kt"); } + @Test @TestMetadata("propertyReferenceFromClass.kt") public void testPropertyReferenceFromClass() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/propertyReferenceFromClass.kt"); } + @Test @TestMetadata("propertyReferenceFromObject.kt") public void testPropertyReferenceFromObject() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/propertyReferenceFromObject.kt"); @@ -1689,48 +1922,52 @@ public class JvmIrAgainstOldBoxInlineTestGenerated extends AbstractJvmIrAgainstO } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/defaultValues/maskElimination") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class MaskElimination extends AbstractJvmIrAgainstOldBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class MaskElimination { + @Test @TestMetadata("32Parameters.kt") public void test32Parameters() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/maskElimination/32Parameters.kt"); } + @Test @TestMetadata("33Parameters.kt") public void test33Parameters() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/maskElimination/33Parameters.kt"); } + @Test public void testAllFilesPresentInMaskElimination() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/defaultValues/maskElimination"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true); } + @Test @TestMetadata("kt18792.kt") public void testKt18792() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/maskElimination/kt18792.kt"); } + @Test @TestMetadata("kt19679.kt") public void testKt19679() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/maskElimination/kt19679.kt"); } + @Test @TestMetadata("kt19679_2.kt") public void testKt19679_2() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/maskElimination/kt19679_2.kt"); } + @Test @TestMetadata("kt19679_3.kt") public void testKt19679_3() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/maskElimination/kt19679_3.kt"); } + @Test @TestMetadata("simple.kt") public void testSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/maskElimination/simple.kt"); @@ -1738,375 +1975,400 @@ public class JvmIrAgainstOldBoxInlineTestGenerated extends AbstractJvmIrAgainstO } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/delegatedProperty") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class DelegatedProperty extends AbstractJvmIrAgainstOldBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class DelegatedProperty { + @Test public void testAllFilesPresentInDelegatedProperty() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/delegatedProperty"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true); } + @Test @TestMetadata("kt16864.kt") public void testKt16864() throws Exception { runTest("compiler/testData/codegen/boxInline/delegatedProperty/kt16864.kt"); } + @Test @TestMetadata("local.kt") public void testLocal() throws Exception { runTest("compiler/testData/codegen/boxInline/delegatedProperty/local.kt"); } + @Test @TestMetadata("localDeclaredInLambda.kt") public void testLocalDeclaredInLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/delegatedProperty/localDeclaredInLambda.kt"); } + @Test @TestMetadata("localInAnonymousObject.kt") public void testLocalInAnonymousObject() throws Exception { runTest("compiler/testData/codegen/boxInline/delegatedProperty/localInAnonymousObject.kt"); } + @Test @TestMetadata("localInLambda.kt") public void testLocalInLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/delegatedProperty/localInLambda.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/enclosingInfo") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class EnclosingInfo extends AbstractJvmIrAgainstOldBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class EnclosingInfo { + @Test public void testAllFilesPresentInEnclosingInfo() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/enclosingInfo"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true); } + @Test @TestMetadata("anonymousInLambda.kt") public void testAnonymousInLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/enclosingInfo/anonymousInLambda.kt"); } + @Test @TestMetadata("inlineChain.kt") public void testInlineChain() throws Exception { runTest("compiler/testData/codegen/boxInline/enclosingInfo/inlineChain.kt"); } + @Test @TestMetadata("inlineChain2.kt") public void testInlineChain2() throws Exception { runTest("compiler/testData/codegen/boxInline/enclosingInfo/inlineChain2.kt"); } + @Test @TestMetadata("objectInInlineFun.kt") public void testObjectInInlineFun() throws Exception { runTest("compiler/testData/codegen/boxInline/enclosingInfo/objectInInlineFun.kt"); } + @Test @TestMetadata("transformedConstructor.kt") public void testTransformedConstructor() throws Exception { runTest("compiler/testData/codegen/boxInline/enclosingInfo/transformedConstructor.kt"); } + @Test @TestMetadata("transformedConstructorWithAdditionalObject.kt") public void testTransformedConstructorWithAdditionalObject() throws Exception { runTest("compiler/testData/codegen/boxInline/enclosingInfo/transformedConstructorWithAdditionalObject.kt"); } + @Test @TestMetadata("transformedConstructorWithNestedInline.kt") public void testTransformedConstructorWithNestedInline() throws Exception { runTest("compiler/testData/codegen/boxInline/enclosingInfo/transformedConstructorWithNestedInline.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/enum") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Enum extends AbstractJvmIrAgainstOldBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Enum { + @Test public void testAllFilesPresentInEnum() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/enum"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true); } + @Test @TestMetadata("kt10569.kt") public void testKt10569() throws Exception { runTest("compiler/testData/codegen/boxInline/enum/kt10569.kt"); } + @Test @TestMetadata("kt18254.kt") public void testKt18254() throws Exception { runTest("compiler/testData/codegen/boxInline/enum/kt18254.kt"); } + @Test @TestMetadata("valueOf.kt") public void testValueOf() throws Exception { runTest("compiler/testData/codegen/boxInline/enum/valueOf.kt"); } + @Test @TestMetadata("valueOfCapturedType.kt") public void testValueOfCapturedType() throws Exception { runTest("compiler/testData/codegen/boxInline/enum/valueOfCapturedType.kt"); } + @Test @TestMetadata("valueOfChain.kt") public void testValueOfChain() throws Exception { runTest("compiler/testData/codegen/boxInline/enum/valueOfChain.kt"); } + @Test @TestMetadata("valueOfChainCapturedType.kt") public void testValueOfChainCapturedType() throws Exception { runTest("compiler/testData/codegen/boxInline/enum/valueOfChainCapturedType.kt"); } + @Test @TestMetadata("valueOfNonReified.kt") public void testValueOfNonReified() throws Exception { runTest("compiler/testData/codegen/boxInline/enum/valueOfNonReified.kt"); } + @Test @TestMetadata("values.kt") public void testValues() throws Exception { runTest("compiler/testData/codegen/boxInline/enum/values.kt"); } + @Test @TestMetadata("valuesAsArray.kt") public void testValuesAsArray() throws Exception { runTest("compiler/testData/codegen/boxInline/enum/valuesAsArray.kt"); } + @Test @TestMetadata("valuesCapturedType.kt") public void testValuesCapturedType() throws Exception { runTest("compiler/testData/codegen/boxInline/enum/valuesCapturedType.kt"); } + @Test @TestMetadata("valuesChain.kt") public void testValuesChain() throws Exception { runTest("compiler/testData/codegen/boxInline/enum/valuesChain.kt"); } + @Test @TestMetadata("valuesChainCapturedType.kt") public void testValuesChainCapturedType() throws Exception { runTest("compiler/testData/codegen/boxInline/enum/valuesChainCapturedType.kt"); } + @Test @TestMetadata("valuesNonReified.kt") public void testValuesNonReified() throws Exception { runTest("compiler/testData/codegen/boxInline/enum/valuesNonReified.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/functionExpression") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class FunctionExpression extends AbstractJvmIrAgainstOldBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class FunctionExpression { + @Test public void testAllFilesPresentInFunctionExpression() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/functionExpression"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true); } + @Test @TestMetadata("extension.kt") public void testExtension() throws Exception { runTest("compiler/testData/codegen/boxInline/functionExpression/extension.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/inlineClasses") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class InlineClasses extends AbstractJvmIrAgainstOldBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class InlineClasses { + @Test public void testAllFilesPresentInInlineClasses() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/inlineClasses"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true); } + @Test @TestMetadata("inlineClassWithInlineValReturningInlineClass.kt") public void testInlineClassWithInlineValReturningInlineClass() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/inlineClassWithInlineValReturningInlineClass.kt"); } + @Test @TestMetadata("inlineFunctionInsideInlineClassesBox.kt") public void testInlineFunctionInsideInlineClassesBox() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/inlineFunctionInsideInlineClassesBox.kt"); } + @Test @TestMetadata("noReturnTypeManglingFun.kt") public void testNoReturnTypeManglingFun() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/noReturnTypeManglingFun.kt"); } + @Test @TestMetadata("noReturnTypeManglingFunJvmName.kt") public void testNoReturnTypeManglingFunJvmName() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/noReturnTypeManglingFunJvmName.kt"); } + @Test @TestMetadata("noReturnTypeManglingVal.kt") public void testNoReturnTypeManglingVal() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/noReturnTypeManglingVal.kt"); } + @Test @TestMetadata("withReturnTypeManglingFun.kt") public void testWithReturnTypeManglingFun() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/withReturnTypeManglingFun.kt"); } + @Test @TestMetadata("withReturnTypeManglingFunJvmName.kt") public void testWithReturnTypeManglingFunJvmName() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/withReturnTypeManglingFunJvmName.kt"); } + @Test @TestMetadata("withReturnTypeManglingVal.kt") public void testWithReturnTypeManglingVal() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/withReturnTypeManglingVal.kt"); } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class UnboxGenericParameter extends AbstractJvmIrAgainstOldBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class UnboxGenericParameter { + @Test public void testAllFilesPresentInUnboxGenericParameter() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true); } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class FunInterface extends AbstractJvmIrAgainstOldBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class FunInterface { + @Test public void testAllFilesPresentInFunInterface() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true); } + @Test @TestMetadata("any.kt") public void testAny() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/any.kt"); } + @Test @TestMetadata("anyN.kt") public void testAnyN() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/anyN.kt"); } + @Test @TestMetadata("iface.kt") public void testIface() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/iface.kt"); } + @Test @TestMetadata("ifaceChild.kt") public void testIfaceChild() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/ifaceChild.kt"); } + @Test @TestMetadata("primitive.kt") public void testPrimitive() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/primitive.kt"); } + @Test @TestMetadata("string.kt") public void testString() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/string.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Lambda extends AbstractJvmIrAgainstOldBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Lambda { + @Test public void testAllFilesPresentInLambda() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true); } + @Test @TestMetadata("any.kt") public void testAny() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/any.kt"); } + @Test @TestMetadata("anyN.kt") public void testAnyN() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/anyN.kt"); } + @Test @TestMetadata("iface.kt") public void testIface() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/iface.kt"); } + @Test @TestMetadata("ifaceChild.kt") public void testIfaceChild() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/ifaceChild.kt"); } + @Test @TestMetadata("primitive.kt") public void testPrimitive() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/primitive.kt"); } + @Test @TestMetadata("string.kt") public void testString() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/string.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class ObjectLiteral extends AbstractJvmIrAgainstOldBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class ObjectLiteral { + @Test public void testAllFilesPresentInObjectLiteral() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true); } + @Test @TestMetadata("any.kt") public void testAny() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/any.kt"); } + @Test @TestMetadata("anyN.kt") public void testAnyN() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/anyN.kt"); } + @Test @TestMetadata("iface.kt") public void testIface() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/iface.kt"); } + @Test @TestMetadata("ifaceChild.kt") public void testIfaceChild() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/ifaceChild.kt"); } + @Test @TestMetadata("primitive.kt") public void testPrimitive() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/primitive.kt"); } + @Test @TestMetadata("string.kt") public void testString() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/string.kt"); @@ -2115,239 +2377,309 @@ public class JvmIrAgainstOldBoxInlineTestGenerated extends AbstractJvmIrAgainstO } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/innerClasses") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class InnerClasses extends AbstractJvmIrAgainstOldBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class InnerClasses { + @Test public void testAllFilesPresentInInnerClasses() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/innerClasses"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true); } + @Test @TestMetadata("captureThisAndOuter.kt") public void testCaptureThisAndOuter() throws Exception { runTest("compiler/testData/codegen/boxInline/innerClasses/captureThisAndOuter.kt"); } + @Test @TestMetadata("innerLambda.kt") public void testInnerLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/innerClasses/innerLambda.kt"); } + @Test @TestMetadata("kt10259.kt") public void testKt10259() throws Exception { runTest("compiler/testData/codegen/boxInline/innerClasses/kt10259.kt"); } } - @TestMetadata("compiler/testData/codegen/boxInline/jvmName") + @Nested + @TestMetadata("compiler/testData/codegen/boxInline/invokedynamic") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class JvmName extends AbstractJvmIrAgainstOldBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); + public class Invokedynamic { + @Test + public void testAllFilesPresentInInvokedynamic() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/invokedynamic"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true); } + @Nested + @TestMetadata("compiler/testData/codegen/boxInline/invokedynamic/lambdas") + @TestDataPath("$PROJECT_ROOT") + public class Lambdas { + @Test + public void testAllFilesPresentInLambdas() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/invokedynamic/lambdas"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true); + } + + @Test + @TestMetadata("crossinlineLambda1.kt") + public void testCrossinlineLambda1() throws Exception { + runTest("compiler/testData/codegen/boxInline/invokedynamic/lambdas/crossinlineLambda1.kt"); + } + + @Test + @TestMetadata("crossinlineLambda2.kt") + public void testCrossinlineLambda2() throws Exception { + runTest("compiler/testData/codegen/boxInline/invokedynamic/lambdas/crossinlineLambda2.kt"); + } + + @Test + @TestMetadata("inlineFunInDifferentPackage.kt") + public void testInlineFunInDifferentPackage() throws Exception { + runTest("compiler/testData/codegen/boxInline/invokedynamic/lambdas/inlineFunInDifferentPackage.kt"); + } + + @Test + @TestMetadata("inlineLambda1.kt") + public void testInlineLambda1() throws Exception { + runTest("compiler/testData/codegen/boxInline/invokedynamic/lambdas/inlineLambda1.kt"); + } + } + + @Nested + @TestMetadata("compiler/testData/codegen/boxInline/invokedynamic/sam") + @TestDataPath("$PROJECT_ROOT") + public class Sam { + @Test + public void testAllFilesPresentInSam() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/invokedynamic/sam"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true); + } + + @Test + @TestMetadata("crossinlineLambda1.kt") + public void testCrossinlineLambda1() throws Exception { + runTest("compiler/testData/codegen/boxInline/invokedynamic/sam/crossinlineLambda1.kt"); + } + + @Test + @TestMetadata("crossinlineLambda2.kt") + public void testCrossinlineLambda2() throws Exception { + runTest("compiler/testData/codegen/boxInline/invokedynamic/sam/crossinlineLambda2.kt"); + } + + @Test + @TestMetadata("inlineFunInDifferentPackage.kt") + public void testInlineFunInDifferentPackage() throws Exception { + runTest("compiler/testData/codegen/boxInline/invokedynamic/sam/inlineFunInDifferentPackage.kt"); + } + + @Test + @TestMetadata("inlineLambda1.kt") + public void testInlineLambda1() throws Exception { + runTest("compiler/testData/codegen/boxInline/invokedynamic/sam/inlineLambda1.kt"); + } + } + } + + @Nested + @TestMetadata("compiler/testData/codegen/boxInline/jvmName") + @TestDataPath("$PROJECT_ROOT") + public class JvmName { + @Test public void testAllFilesPresentInJvmName() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/jvmName"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true); } + @Test @TestMetadata("simple.kt") public void testSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/jvmName/simple.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/jvmPackageName") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class JvmPackageName extends AbstractJvmIrAgainstOldBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class JvmPackageName { + @Test public void testAllFilesPresentInJvmPackageName() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/jvmPackageName"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true); } + @Test @TestMetadata("simple.kt") public void testSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/jvmPackageName/simple.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/lambdaClassClash") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class LambdaClassClash extends AbstractJvmIrAgainstOldBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class LambdaClassClash { + @Test public void testAllFilesPresentInLambdaClassClash() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/lambdaClassClash"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true); } + @Test @TestMetadata("lambdaClassClash.kt") public void testLambdaClassClash() throws Exception { runTest("compiler/testData/codegen/boxInline/lambdaClassClash/lambdaClassClash.kt"); } + @Test @TestMetadata("noInlineLambdaX2.kt") public void testNoInlineLambdaX2() throws Exception { runTest("compiler/testData/codegen/boxInline/lambdaClassClash/noInlineLambdaX2.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/lambdaTransformation") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class LambdaTransformation extends AbstractJvmIrAgainstOldBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class LambdaTransformation { + @Test public void testAllFilesPresentInLambdaTransformation() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/lambdaTransformation"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true); } + @Test @TestMetadata("lambdaCloning.kt") public void testLambdaCloning() throws Exception { runTest("compiler/testData/codegen/boxInline/lambdaTransformation/lambdaCloning.kt"); } + @Test @TestMetadata("lambdaInLambda2.kt") public void testLambdaInLambda2() throws Exception { runTest("compiler/testData/codegen/boxInline/lambdaTransformation/lambdaInLambda2.kt"); } + @Test @TestMetadata("lambdaInLambdaNoInline.kt") public void testLambdaInLambdaNoInline() throws Exception { runTest("compiler/testData/codegen/boxInline/lambdaTransformation/lambdaInLambdaNoInline.kt"); } + @Test @TestMetadata("regeneratedLambdaName.kt") public void testRegeneratedLambdaName() throws Exception { runTest("compiler/testData/codegen/boxInline/lambdaTransformation/regeneratedLambdaName.kt"); } + @Test @TestMetadata("regeneratedLambdaName2.kt") public void testRegeneratedLambdaName2() throws Exception { runTest("compiler/testData/codegen/boxInline/lambdaTransformation/regeneratedLambdaName2.kt"); } + @Test @TestMetadata("sameCaptured.kt") public void testSameCaptured() throws Exception { runTest("compiler/testData/codegen/boxInline/lambdaTransformation/sameCaptured.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/localFunInLambda") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class LocalFunInLambda extends AbstractJvmIrAgainstOldBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class LocalFunInLambda { + @Test public void testAllFilesPresentInLocalFunInLambda() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/localFunInLambda"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true); } + @Test @TestMetadata("defaultParam.kt") public void testDefaultParam() throws Exception { runTest("compiler/testData/codegen/boxInline/localFunInLambda/defaultParam.kt"); } + @Test @TestMetadata("lambdaInLambdaCapturesAnotherFun.kt") public void testLambdaInLambdaCapturesAnotherFun() throws Exception { runTest("compiler/testData/codegen/boxInline/localFunInLambda/lambdaInLambdaCapturesAnotherFun.kt"); } + @Test @TestMetadata("localFunInLambda.kt") public void testLocalFunInLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/localFunInLambda/localFunInLambda.kt"); } + @Test @TestMetadata("localFunInLambdaCapturesAnotherFun.kt") public void testLocalFunInLambdaCapturesAnotherFun() throws Exception { runTest("compiler/testData/codegen/boxInline/localFunInLambda/localFunInLambdaCapturesAnotherFun.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/multiModule") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class MultiModule extends AbstractJvmIrAgainstOldBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class MultiModule { + @Test public void testAllFilesPresentInMultiModule() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/multiModule"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true); } + @Test @TestMetadata("tryCatchWithRecursiveInline.kt") public void testTryCatchWithRecursiveInline() throws Exception { runTest("compiler/testData/codegen/boxInline/multiModule/tryCatchWithRecursiveInline.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/multifileClasses") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class MultifileClasses extends AbstractJvmIrAgainstOldBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class MultifileClasses { + @Test public void testAllFilesPresentInMultifileClasses() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/multifileClasses"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true); } + @Test @TestMetadata("defaultArguments.kt") public void testDefaultArguments() throws Exception { runTest("compiler/testData/codegen/boxInline/multifileClasses/defaultArguments.kt"); } + @Test @TestMetadata("inlineFromOptimizedMultifileClass.kt") public void testInlineFromOptimizedMultifileClass() throws Exception { runTest("compiler/testData/codegen/boxInline/multifileClasses/inlineFromOptimizedMultifileClass.kt"); } + @Test @TestMetadata("inlineFromOtherPackage.kt") public void testInlineFromOtherPackage() throws Exception { runTest("compiler/testData/codegen/boxInline/multifileClasses/inlineFromOtherPackage.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/multiplatform") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Multiplatform extends AbstractJvmIrAgainstOldBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Multiplatform { + @Test public void testAllFilesPresentInMultiplatform() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/multiplatform"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true); } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/multiplatform/defaultArguments") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class DefaultArguments extends AbstractJvmIrAgainstOldBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class DefaultArguments { + @Test public void testAllFilesPresentInDefaultArguments() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/multiplatform/defaultArguments"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true); } + @Test @TestMetadata("receiversAndParametersInLambda.kt") public void testReceiversAndParametersInLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/multiplatform/defaultArguments/receiversAndParametersInLambda.kt"); @@ -2355,535 +2687,640 @@ public class JvmIrAgainstOldBoxInlineTestGenerated extends AbstractJvmIrAgainstO } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/noInline") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class NoInline extends AbstractJvmIrAgainstOldBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class NoInline { + @Test public void testAllFilesPresentInNoInline() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/noInline"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true); } + @Test @TestMetadata("extensionReceiver.kt") public void testExtensionReceiver() throws Exception { runTest("compiler/testData/codegen/boxInline/noInline/extensionReceiver.kt"); } + @Test @TestMetadata("lambdaAsGeneric.kt") public void testLambdaAsGeneric() throws Exception { runTest("compiler/testData/codegen/boxInline/noInline/lambdaAsGeneric.kt"); } + @Test @TestMetadata("lambdaAsNonFunction.kt") public void testLambdaAsNonFunction() throws Exception { runTest("compiler/testData/codegen/boxInline/noInline/lambdaAsNonFunction.kt"); } + @Test @TestMetadata("noInline.kt") public void testNoInline() throws Exception { runTest("compiler/testData/codegen/boxInline/noInline/noInline.kt"); } + @Test @TestMetadata("noInlineLambdaChain.kt") public void testNoInlineLambdaChain() throws Exception { runTest("compiler/testData/codegen/boxInline/noInline/noInlineLambdaChain.kt"); } + @Test @TestMetadata("noInlineLambdaChainWithCapturedInline.kt") public void testNoInlineLambdaChainWithCapturedInline() throws Exception { runTest("compiler/testData/codegen/boxInline/noInline/noInlineLambdaChainWithCapturedInline.kt"); } + @Test @TestMetadata("withoutInline.kt") public void testWithoutInline() throws Exception { runTest("compiler/testData/codegen/boxInline/noInline/withoutInline.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/nonLocalReturns") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class NonLocalReturns extends AbstractJvmIrAgainstOldBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class NonLocalReturns { + @Test public void testAllFilesPresentInNonLocalReturns() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true); } + @Test @TestMetadata("explicitLocalReturn.kt") public void testExplicitLocalReturn() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/explicitLocalReturn.kt"); } + @Test + @TestMetadata("fromArrayGenerator.kt") + public void testFromArrayGenerator() throws Exception { + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/fromArrayGenerator.kt"); + } + + @Test + @TestMetadata("fromArrayGeneratorCatch.kt") + public void testFromArrayGeneratorCatch() throws Exception { + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/fromArrayGeneratorCatch.kt"); + } + + @Test + @TestMetadata("fromArrayGeneratorNested.kt") + public void testFromArrayGeneratorNested() throws Exception { + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/fromArrayGeneratorNested.kt"); + } + + @Test + @TestMetadata("fromArrayGeneratorWithCapture.kt") + public void testFromArrayGeneratorWithCapture() throws Exception { + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/fromArrayGeneratorWithCapture.kt"); + } + + @Test + @TestMetadata("fromArrayGeneratorWithCatch.kt") + public void testFromArrayGeneratorWithCatch() throws Exception { + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/fromArrayGeneratorWithCatch.kt"); + } + + @Test + @TestMetadata("fromArrayGeneratorWithFinally.kt") + public void testFromArrayGeneratorWithFinally() throws Exception { + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/fromArrayGeneratorWithFinally.kt"); + } + + @Test + @TestMetadata("fromArrayGeneratorWithFinallyX2.kt") + public void testFromArrayGeneratorWithFinallyX2() throws Exception { + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/fromArrayGeneratorWithFinallyX2.kt"); + } + + @Test + @TestMetadata("fromArrayGeneratorWithFinallyX2_2.kt") + public void testFromArrayGeneratorWithFinallyX2_2() throws Exception { + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/fromArrayGeneratorWithFinallyX2_2.kt"); + } + + @Test @TestMetadata("fromInterfaceDefaultGetter.kt") public void testFromInterfaceDefaultGetter() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/fromInterfaceDefaultGetter.kt"); } + @Test @TestMetadata("justReturnInLambda.kt") public void testJustReturnInLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/justReturnInLambda.kt"); } + @Test @TestMetadata("kt5199.kt") public void testKt5199() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/kt5199.kt"); } + @Test @TestMetadata("kt8948.kt") public void testKt8948() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/kt8948.kt"); } + @Test @TestMetadata("kt8948v2.kt") public void testKt8948v2() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/kt8948v2.kt"); } + @Test @TestMetadata("nestedNonLocals.kt") public void testNestedNonLocals() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/nestedNonLocals.kt"); } + @Test @TestMetadata("noInlineLocalReturn.kt") public void testNoInlineLocalReturn() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/noInlineLocalReturn.kt"); } + @Test @TestMetadata("nonLocalReturnFromOuterLambda.kt") public void testNonLocalReturnFromOuterLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/nonLocalReturnFromOuterLambda.kt"); } + @Test @TestMetadata("propertyAccessors.kt") public void testPropertyAccessors() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/propertyAccessors.kt"); } + @Test @TestMetadata("returnFromFunctionExpr.kt") public void testReturnFromFunctionExpr() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/returnFromFunctionExpr.kt"); } + @Test @TestMetadata("simple.kt") public void testSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/simple.kt"); } + @Test @TestMetadata("simpleFunctional.kt") public void testSimpleFunctional() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/simpleFunctional.kt"); } + @Test @TestMetadata("simpleVoid.kt") public void testSimpleVoid() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/simpleVoid.kt"); } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/deparenthesize") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Deparenthesize extends AbstractJvmIrAgainstOldBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Deparenthesize { + @Test public void testAllFilesPresentInDeparenthesize() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/deparenthesize"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true); } + @Test @TestMetadata("bracket.kt") public void testBracket() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/deparenthesize/bracket.kt"); } + @Test @TestMetadata("labeled.kt") public void testLabeled() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/deparenthesize/labeled.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class TryFinally extends AbstractJvmIrAgainstOldBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class TryFinally { + @Test public void testAllFilesPresentInTryFinally() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true); } + @Test @TestMetadata("kt16417.kt") public void testKt16417() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt16417.kt"); } + @Test @TestMetadata("kt20433.kt") public void testKt20433() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt20433.kt"); } + @Test @TestMetadata("kt20433_2.kt") public void testKt20433_2() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt20433_2.kt"); } + @Test @TestMetadata("kt20433_2_void.kt") public void testKt20433_2_void() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt20433_2_void.kt"); } + @Test @TestMetadata("kt20433_void.kt") public void testKt20433_void() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt20433_void.kt"); } + @Test @TestMetadata("kt26384.kt") public void testKt26384() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt26384.kt"); } + @Test @TestMetadata("kt26384_2.kt") public void testKt26384_2() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt26384_2.kt"); } + @Test @TestMetadata("kt28546.kt") public void testKt28546() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt28546.kt"); } + @Test @TestMetadata("kt6956.kt") public void testKt6956() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt6956.kt"); } + @Test @TestMetadata("kt7273.kt") public void testKt7273() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt7273.kt"); } + @Test @TestMetadata("nonLocalReturnFromCatchBlock.kt") public void testNonLocalReturnFromCatchBlock() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/nonLocalReturnFromCatchBlock.kt"); } + @Test @TestMetadata("nonLocalReturnFromOuterLambda.kt") public void testNonLocalReturnFromOuterLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/nonLocalReturnFromOuterLambda.kt"); } + @Test @TestMetadata("nonLocalReturnToCatchBlock.kt") public void testNonLocalReturnToCatchBlock() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/nonLocalReturnToCatchBlock.kt"); } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class CallSite extends AbstractJvmIrAgainstOldBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class CallSite { + @Test public void testAllFilesPresentInCallSite() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true); } + @Test @TestMetadata("callSite.kt") public void testCallSite() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/callSite.kt"); } + @Test @TestMetadata("callSiteComplex.kt") public void testCallSiteComplex() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/callSiteComplex.kt"); } + @Test @TestMetadata("exceptionTableSplit.kt") public void testExceptionTableSplit() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/exceptionTableSplit.kt"); } + @Test @TestMetadata("exceptionTableSplitNoReturn.kt") public void testExceptionTableSplitNoReturn() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/exceptionTableSplitNoReturn.kt"); } + @Test @TestMetadata("finallyInFinally.kt") public void testFinallyInFinally() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/finallyInFinally.kt"); } + @Test @TestMetadata("wrongVarInterval.kt") public void testWrongVarInterval() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/wrongVarInterval.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Chained extends AbstractJvmIrAgainstOldBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Chained { + @Test public void testAllFilesPresentInChained() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true); } + @Test @TestMetadata("finallyInFinally.kt") public void testFinallyInFinally() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/finallyInFinally.kt"); } + @Test @TestMetadata("finallyInFinally2.kt") public void testFinallyInFinally2() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/finallyInFinally2.kt"); } + @Test @TestMetadata("intReturn.kt") public void testIntReturn() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturn.kt"); } + @Test @TestMetadata("intReturnComplex.kt") public void testIntReturnComplex() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex.kt"); } + @Test @TestMetadata("intReturnComplex2.kt") public void testIntReturnComplex2() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex2.kt"); } + @Test @TestMetadata("intReturnComplex3.kt") public void testIntReturnComplex3() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex3.kt"); } + @Test @TestMetadata("intReturnComplex4.kt") public void testIntReturnComplex4() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex4.kt"); } + @Test @TestMetadata("nestedLambda.kt") public void testNestedLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/nestedLambda.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class DeclSite extends AbstractJvmIrAgainstOldBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class DeclSite { + @Test public void testAllFilesPresentInDeclSite() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true); } + @Test @TestMetadata("complex.kt") public void testComplex() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/complex.kt"); } + @Test @TestMetadata("intReturn.kt") public void testIntReturn() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/intReturn.kt"); } + @Test @TestMetadata("intReturnComplex.kt") public void testIntReturnComplex() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/intReturnComplex.kt"); } + @Test @TestMetadata("longReturn.kt") public void testLongReturn() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/longReturn.kt"); } + @Test @TestMetadata("nested.kt") public void testNested() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/nested.kt"); } + @Test @TestMetadata("returnInFinally.kt") public void testReturnInFinally() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/returnInFinally.kt"); } + @Test @TestMetadata("returnInTry.kt") public void testReturnInTry() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/returnInTry.kt"); } + @Test @TestMetadata("returnInTryAndFinally.kt") public void testReturnInTryAndFinally() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/returnInTryAndFinally.kt"); } + @Test @TestMetadata("severalInTry.kt") public void testSeveralInTry() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/severalInTry.kt"); } + @Test @TestMetadata("severalInTryComplex.kt") public void testSeveralInTryComplex() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/severalInTryComplex.kt"); } + @Test @TestMetadata("voidInlineFun.kt") public void testVoidInlineFun() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/voidInlineFun.kt"); } + @Test @TestMetadata("voidNonLocal.kt") public void testVoidNonLocal() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/voidNonLocal.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class ExceptionTable extends AbstractJvmIrAgainstOldBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class ExceptionTable { + @Test public void testAllFilesPresentInExceptionTable() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true); } + @Test @TestMetadata("break.kt") public void testBreak() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/break.kt"); } + @Test @TestMetadata("continue.kt") public void testContinue() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/continue.kt"); } + @Test @TestMetadata("exceptionInFinally.kt") public void testExceptionInFinally() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/exceptionInFinally.kt"); } + @Test @TestMetadata("forInFinally.kt") public void testForInFinally() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/forInFinally.kt"); } + @Test @TestMetadata("innerAndExternal.kt") public void testInnerAndExternal() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/innerAndExternal.kt"); } + @Test @TestMetadata("innerAndExternalNested.kt") public void testInnerAndExternalNested() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/innerAndExternalNested.kt"); } + @Test @TestMetadata("innerAndExternalSimple.kt") public void testInnerAndExternalSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/innerAndExternalSimple.kt"); } + @Test @TestMetadata("kt31653.kt") public void testKt31653() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/kt31653.kt"); } + @Test @TestMetadata("kt31653_2.kt") public void testKt31653_2() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/kt31653_2.kt"); } + @Test @TestMetadata("kt31923.kt") public void testKt31923() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/kt31923.kt"); } + @Test @TestMetadata("kt31923_2.kt") public void testKt31923_2() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/kt31923_2.kt"); } + @Test @TestMetadata("kt31923_wrong.kt") public void testKt31923_wrong() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/kt31923_wrong.kt"); } + @Test @TestMetadata("nested.kt") public void testNested() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/nested.kt"); } + @Test @TestMetadata("nestedWithReturns.kt") public void testNestedWithReturns() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/nestedWithReturns.kt"); } + @Test @TestMetadata("nestedWithReturnsSimple.kt") public void testNestedWithReturnsSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/nestedWithReturnsSimple.kt"); } + @Test @TestMetadata("noFinally.kt") public void testNoFinally() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/noFinally.kt"); } + @Test @TestMetadata("severalCatchClause.kt") public void testSeveralCatchClause() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/severalCatchClause.kt"); } + @Test @TestMetadata("simpleThrow.kt") public void testSimpleThrow() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/simpleThrow.kt"); } + @Test @TestMetadata("synchonized.kt") public void testSynchonized() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/synchonized.kt"); } + @Test @TestMetadata("throwInFinally.kt") public void testThrowInFinally() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/throwInFinally.kt"); } + @Test @TestMetadata("tryCatchInFinally.kt") public void testTryCatchInFinally() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/tryCatchInFinally.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/variables") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Variables extends AbstractJvmIrAgainstOldBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Variables { + @Test public void testAllFilesPresentInVariables() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/variables"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true); } + @Test @TestMetadata("kt7792.kt") public void testKt7792() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/variables/kt7792.kt"); @@ -2892,430 +3329,501 @@ public class JvmIrAgainstOldBoxInlineTestGenerated extends AbstractJvmIrAgainstO } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/optimizations") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Optimizations extends AbstractJvmIrAgainstOldBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Optimizations { + @Test public void testAllFilesPresentInOptimizations() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/optimizations"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true); } + @Test @TestMetadata("kt20844.kt") public void testKt20844() throws Exception { runTest("compiler/testData/codegen/boxInline/optimizations/kt20844.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/private") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Private extends AbstractJvmIrAgainstOldBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Private { + @Test @TestMetadata("accessorForConst.kt") public void testAccessorForConst() throws Exception { runTest("compiler/testData/codegen/boxInline/private/accessorForConst.kt"); } + @Test @TestMetadata("accessorStability.kt") public void testAccessorStability() throws Exception { runTest("compiler/testData/codegen/boxInline/private/accessorStability.kt"); } + @Test @TestMetadata("accessorStabilityInClass.kt") public void testAccessorStabilityInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/private/accessorStabilityInClass.kt"); } + @Test public void testAllFilesPresentInPrivate() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/private"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true); } + @Test @TestMetadata("effectivePrivate.kt") public void testEffectivePrivate() throws Exception { runTest("compiler/testData/codegen/boxInline/private/effectivePrivate.kt"); } + @Test @TestMetadata("kt6453.kt") public void testKt6453() throws Exception { runTest("compiler/testData/codegen/boxInline/private/kt6453.kt"); } + @Test @TestMetadata("kt8094.kt") public void testKt8094() throws Exception { runTest("compiler/testData/codegen/boxInline/private/kt8094.kt"); } + @Test @TestMetadata("kt8095.kt") public void testKt8095() throws Exception { runTest("compiler/testData/codegen/boxInline/private/kt8095.kt"); } + @Test @TestMetadata("nestedInPrivateClass.kt") public void testNestedInPrivateClass() throws Exception { runTest("compiler/testData/codegen/boxInline/private/nestedInPrivateClass.kt"); } + @Test @TestMetadata("privateClass.kt") public void testPrivateClass() throws Exception { runTest("compiler/testData/codegen/boxInline/private/privateClass.kt"); } + @Test @TestMetadata("privateClassExtensionLambda.kt") public void testPrivateClassExtensionLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/private/privateClassExtensionLambda.kt"); } + @Test @TestMetadata("privateInInlineInMultiFileFacade.kt") public void testPrivateInInlineInMultiFileFacade() throws Exception { runTest("compiler/testData/codegen/boxInline/private/privateInInlineInMultiFileFacade.kt"); } + @Test @TestMetadata("privateInline.kt") public void testPrivateInline() throws Exception { runTest("compiler/testData/codegen/boxInline/private/privateInline.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/property") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Property extends AbstractJvmIrAgainstOldBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Property { + @Test public void testAllFilesPresentInProperty() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/property"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true); } + @Test @TestMetadata("augAssignmentAndInc.kt") public void testAugAssignmentAndInc() throws Exception { runTest("compiler/testData/codegen/boxInline/property/augAssignmentAndInc.kt"); } + @Test @TestMetadata("augAssignmentAndIncInClass.kt") public void testAugAssignmentAndIncInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/property/augAssignmentAndIncInClass.kt"); } + @Test @TestMetadata("augAssignmentAndIncInClassViaConvention.kt") public void testAugAssignmentAndIncInClassViaConvention() throws Exception { runTest("compiler/testData/codegen/boxInline/property/augAssignmentAndIncInClassViaConvention.kt"); } + @Test @TestMetadata("augAssignmentAndIncOnExtension.kt") public void testAugAssignmentAndIncOnExtension() throws Exception { runTest("compiler/testData/codegen/boxInline/property/augAssignmentAndIncOnExtension.kt"); } + @Test @TestMetadata("augAssignmentAndIncOnExtensionInClass.kt") public void testAugAssignmentAndIncOnExtensionInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/property/augAssignmentAndIncOnExtensionInClass.kt"); } + @Test @TestMetadata("augAssignmentAndIncViaConvention.kt") public void testAugAssignmentAndIncViaConvention() throws Exception { runTest("compiler/testData/codegen/boxInline/property/augAssignmentAndIncViaConvention.kt"); } + @Test @TestMetadata("fromObject.kt") public void testFromObject() throws Exception { runTest("compiler/testData/codegen/boxInline/property/fromObject.kt"); } + @Test @TestMetadata("kt22649.kt") public void testKt22649() throws Exception { runTest("compiler/testData/codegen/boxInline/property/kt22649.kt"); } + @Test @TestMetadata("property.kt") public void testProperty() throws Exception { runTest("compiler/testData/codegen/boxInline/property/property.kt"); } + @Test @TestMetadata("reifiedVal.kt") public void testReifiedVal() throws Exception { runTest("compiler/testData/codegen/boxInline/property/reifiedVal.kt"); } + @Test @TestMetadata("reifiedVar.kt") public void testReifiedVar() throws Exception { runTest("compiler/testData/codegen/boxInline/property/reifiedVar.kt"); } + @Test @TestMetadata("simple.kt") public void testSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/property/simple.kt"); } + @Test @TestMetadata("simpleExtension.kt") public void testSimpleExtension() throws Exception { runTest("compiler/testData/codegen/boxInline/property/simpleExtension.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/reified") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Reified extends AbstractJvmIrAgainstOldBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Reified { + @Test public void testAllFilesPresentInReified() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/reified"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true); } + @Test @TestMetadata("arrayConstructor.kt") public void testArrayConstructor() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/arrayConstructor.kt"); } + @Test @TestMetadata("arrayOf.kt") public void testArrayOf() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/arrayOf.kt"); } + @Test @TestMetadata("capturedLambda.kt") public void testCapturedLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/capturedLambda.kt"); } + @Test @TestMetadata("capturedLambda2.kt") public void testCapturedLambda2() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/capturedLambda2.kt"); } + @Test @TestMetadata("dontSubstituteNonReified.kt") public void testDontSubstituteNonReified() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/dontSubstituteNonReified.kt"); } + @Test @TestMetadata("kt11081.kt") public void testKt11081() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/kt11081.kt"); } + @Test @TestMetadata("kt11677.kt") public void testKt11677() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/kt11677.kt"); } + @Test @TestMetadata("kt15956.kt") public void testKt15956() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/kt15956.kt"); } + @Test @TestMetadata("kt15997.kt") public void testKt15997() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/kt15997.kt"); } + @Test @TestMetadata("kt15997_2.kt") public void testKt15997_2() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/kt15997_2.kt"); } + @Test @TestMetadata("kt18977.kt") public void testKt18977() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/kt18977.kt"); } + @Test + @TestMetadata("kt35511.kt") + public void testKt35511() throws Exception { + runTest("compiler/testData/codegen/boxInline/reified/kt35511.kt"); + } + + @Test + @TestMetadata("kt35511_try.kt") + public void testKt35511_try() throws Exception { + runTest("compiler/testData/codegen/boxInline/reified/kt35511_try.kt"); + } + + @Test + @TestMetadata("kt35511_try_valueOf.kt") + public void testKt35511_try_valueOf() throws Exception { + runTest("compiler/testData/codegen/boxInline/reified/kt35511_try_valueOf.kt"); + } + + @Test + @TestMetadata("kt35511_try_values.kt") + public void testKt35511_try_values() throws Exception { + runTest("compiler/testData/codegen/boxInline/reified/kt35511_try_values.kt"); + } + + @Test @TestMetadata("kt6988.kt") public void testKt6988() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/kt6988.kt"); } + @Test @TestMetadata("kt6988_2.kt") public void testKt6988_2() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/kt6988_2.kt"); } + @Test @TestMetadata("kt6990.kt") public void testKt6990() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/kt6990.kt"); } + @Test @TestMetadata("kt7017.kt") public void testKt7017() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/kt7017.kt"); } + @Test @TestMetadata("kt8047.kt") public void testKt8047() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/kt8047.kt"); } + @Test @TestMetadata("kt8047_2.kt") public void testKt8047_2() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/kt8047_2.kt"); } + @Test @TestMetadata("kt9637.kt") public void testKt9637() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/kt9637.kt"); } + @Test @TestMetadata("kt9637_2.kt") public void testKt9637_2() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/kt9637_2.kt"); } + @Test @TestMetadata("nonCapturingObjectInLambda.kt") public void testNonCapturingObjectInLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/nonCapturingObjectInLambda.kt"); } + @Test @TestMetadata("packages.kt") public void testPackages() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/packages.kt"); } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/reified/checkCast") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class CheckCast extends AbstractJvmIrAgainstOldBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class CheckCast { + @Test public void testAllFilesPresentInCheckCast() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/reified/checkCast"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true); } + @Test @TestMetadata("chain.kt") public void testChain() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/checkCast/chain.kt"); } + @Test @TestMetadata("kt26435.kt") public void testKt26435() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/checkCast/kt26435.kt"); } + @Test @TestMetadata("kt26435_2.kt") public void testKt26435_2() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/checkCast/kt26435_2.kt"); } + @Test @TestMetadata("kt26435_3.kt") public void testKt26435_3() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/checkCast/kt26435_3.kt"); } + @Test @TestMetadata("kt8043.kt") public void testKt8043() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/checkCast/kt8043.kt"); } + @Test @TestMetadata("maxStack.kt") public void testMaxStack() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/checkCast/maxStack.kt"); } + @Test @TestMetadata("nullable.kt") public void testNullable() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/checkCast/nullable.kt"); } + @Test @TestMetadata("simple.kt") public void testSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/checkCast/simple.kt"); } + @Test @TestMetadata("simpleSafe.kt") public void testSimpleSafe() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/checkCast/simpleSafe.kt"); } + @Test @TestMetadata("simple_1_3.kt") public void testSimple_1_3() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/checkCast/simple_1_3.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/reified/defaultLambda") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class DefaultLambda extends AbstractJvmIrAgainstOldBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class DefaultLambda { + @Test public void testAllFilesPresentInDefaultLambda() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/reified/defaultLambda"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true); } + @Test @TestMetadata("chain.kt") public void testChain() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/defaultLambda/chain.kt"); } + @Test @TestMetadata("nested.kt") public void testNested() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/defaultLambda/nested.kt"); } + @Test @TestMetadata("nested2.kt") public void testNested2() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/defaultLambda/nested2.kt"); } + @Test @TestMetadata("nested2Static.kt") public void testNested2Static() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/defaultLambda/nested2Static.kt"); } + @Test @TestMetadata("nestedStatic.kt") public void testNestedStatic() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/defaultLambda/nestedStatic.kt"); } + @Test @TestMetadata("simple.kt") public void testSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/defaultLambda/simple.kt"); } + @Test @TestMetadata("transitiveChain.kt") public void testTransitiveChain() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/defaultLambda/transitiveChain.kt"); } + @Test @TestMetadata("transitiveChainStatic.kt") public void testTransitiveChainStatic() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/defaultLambda/transitiveChainStatic.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/reified/isCheck") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class IsCheck extends AbstractJvmIrAgainstOldBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class IsCheck { + @Test public void testAllFilesPresentInIsCheck() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/reified/isCheck"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true); } + @Test @TestMetadata("chain.kt") public void testChain() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/isCheck/chain.kt"); } + @Test @TestMetadata("nullable.kt") public void testNullable() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/isCheck/nullable.kt"); } + @Test @TestMetadata("simple.kt") public void testSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/isCheck/simple.kt"); @@ -3323,518 +3831,577 @@ public class JvmIrAgainstOldBoxInlineTestGenerated extends AbstractJvmIrAgainstO } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/signature") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Signature extends AbstractJvmIrAgainstOldBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Signature { + @Test public void testAllFilesPresentInSignature() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/signature"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true); } + @Test @TestMetadata("inProjectionSubstitution.kt") public void testInProjectionSubstitution() throws Exception { runTest("compiler/testData/codegen/boxInline/signature/inProjectionSubstitution.kt"); } + @Test @TestMetadata("outProjectionSubstitution.kt") public void testOutProjectionSubstitution() throws Exception { runTest("compiler/testData/codegen/boxInline/signature/outProjectionSubstitution.kt"); } + @Test @TestMetadata("recursion.kt") public void testRecursion() throws Exception { runTest("compiler/testData/codegen/boxInline/signature/recursion.kt"); } + @Test @TestMetadata("sameFormalParameterName.kt") public void testSameFormalParameterName() throws Exception { runTest("compiler/testData/codegen/boxInline/signature/sameFormalParameterName.kt"); } + @Test @TestMetadata("sameReifiedFormalParameterName.kt") public void testSameReifiedFormalParameterName() throws Exception { runTest("compiler/testData/codegen/boxInline/signature/sameReifiedFormalParameterName.kt"); } + @Test @TestMetadata("starProjectionSubstitution.kt") public void testStarProjectionSubstitution() throws Exception { runTest("compiler/testData/codegen/boxInline/signature/starProjectionSubstitution.kt"); } + @Test @TestMetadata("typeParameterInLambda.kt") public void testTypeParameterInLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/signature/typeParameterInLambda.kt"); } + @Test @TestMetadata("typeParametersSubstitution.kt") public void testTypeParametersSubstitution() throws Exception { runTest("compiler/testData/codegen/boxInline/signature/typeParametersSubstitution.kt"); } + @Test @TestMetadata("typeParametersSubstitution2.kt") public void testTypeParametersSubstitution2() throws Exception { runTest("compiler/testData/codegen/boxInline/signature/typeParametersSubstitution2.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/simple") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Simple extends AbstractJvmIrAgainstOldBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Simple { + @Test public void testAllFilesPresentInSimple() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/simple"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true); } + @Test @TestMetadata("captureAndArgumentIncompatibleTypes.kt") public void testCaptureAndArgumentIncompatibleTypes() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/captureAndArgumentIncompatibleTypes.kt"); } + @Test @TestMetadata("classObject.kt") public void testClassObject() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/classObject.kt"); } + @Test @TestMetadata("destructuring.kt") public void testDestructuring() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/destructuring.kt"); } + @Test @TestMetadata("destructuringIndexClash.kt") public void testDestructuringIndexClash() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/destructuringIndexClash.kt"); } + @Test @TestMetadata("extension.kt") public void testExtension() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/extension.kt"); } + @Test @TestMetadata("extensionLambda.kt") public void testExtensionLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/extensionLambda.kt"); } + @Test @TestMetadata("funImportedFromObject.kt") public void testFunImportedFromObject() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/funImportedFromObject.kt"); } + @Test @TestMetadata("inlineCallInInlineLambda.kt") public void testInlineCallInInlineLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/inlineCallInInlineLambda.kt"); } + @Test @TestMetadata("kt17431.kt") public void testKt17431() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/kt17431.kt"); } + @Test @TestMetadata("kt28547.kt") public void testKt28547() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/kt28547.kt"); } + @Test @TestMetadata("kt28547_2.kt") public void testKt28547_2() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/kt28547_2.kt"); } + @Test @TestMetadata("params.kt") public void testParams() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/params.kt"); } + @Test @TestMetadata("propImportedFromObject.kt") public void testPropImportedFromObject() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/propImportedFromObject.kt"); } + @Test @TestMetadata("rootConstructor.kt") public void testRootConstructor() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/rootConstructor.kt"); } + @Test @TestMetadata("safeCall.kt") public void testSafeCall() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/safeCall.kt"); } + @Test @TestMetadata("severalClosures.kt") public void testSeveralClosures() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/severalClosures.kt"); } + @Test @TestMetadata("severalUsage.kt") public void testSeveralUsage() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/severalUsage.kt"); } + @Test @TestMetadata("simpleDouble.kt") public void testSimpleDouble() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/simpleDouble.kt"); } + @Test @TestMetadata("simpleEnum.kt") public void testSimpleEnum() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/simpleEnum.kt"); } + @Test @TestMetadata("simpleGenerics.kt") public void testSimpleGenerics() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/simpleGenerics.kt"); } + @Test @TestMetadata("simpleInt.kt") public void testSimpleInt() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/simpleInt.kt"); } + @Test @TestMetadata("simpleLambda.kt") public void testSimpleLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/simpleLambda.kt"); } + @Test @TestMetadata("simpleObject.kt") public void testSimpleObject() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/simpleObject.kt"); } + @Test @TestMetadata("vararg.kt") public void testVararg() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/vararg.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/smap") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Smap extends AbstractJvmIrAgainstOldBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Smap { + @Test public void testAllFilesPresentInSmap() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/smap"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true); } + @Test @TestMetadata("assertion.kt") public void testAssertion() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/assertion.kt"); } + @Test @TestMetadata("classCycle.kt") public void testClassCycle() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/classCycle.kt"); } + @Test @TestMetadata("classFromDefaultPackage.kt") public void testClassFromDefaultPackage() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/classFromDefaultPackage.kt"); } + @Test @TestMetadata("crossroutines.kt") public void testCrossroutines() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/crossroutines.kt"); } + @Test @TestMetadata("defaultFunction.kt") public void testDefaultFunction() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/defaultFunction.kt"); } + @Test @TestMetadata("defaultFunctionWithInlineCall.kt") public void testDefaultFunctionWithInlineCall() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/defaultFunctionWithInlineCall.kt"); } + @Test @TestMetadata("forInline.kt") public void testForInline() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/forInline.kt"); } + @Test @TestMetadata("interleavedFiles.kt") public void testInterleavedFiles() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/interleavedFiles.kt"); } + @Test @TestMetadata("kt23369.kt") public void testKt23369() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/kt23369.kt"); } + @Test @TestMetadata("kt23369_2.kt") public void testKt23369_2() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/kt23369_2.kt"); } + @Test @TestMetadata("kt23369_3.kt") public void testKt23369_3() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/kt23369_3.kt"); } + @Test @TestMetadata("kt35006.kt") public void testKt35006() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/kt35006.kt"); } + @Test @TestMetadata("multiFileFacade.kt") public void testMultiFileFacade() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/multiFileFacade.kt"); } + @Test @TestMetadata("oneFile.kt") public void testOneFile() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/oneFile.kt"); } + @Test @TestMetadata("rangeFolding.kt") public void testRangeFolding() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/rangeFolding.kt"); } + @Test @TestMetadata("rangeFoldingInClass.kt") public void testRangeFoldingInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/rangeFoldingInClass.kt"); } + @Test @TestMetadata("smap.kt") public void testSmap() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/smap.kt"); } + @Test @TestMetadata("smapWithNewSyntax.kt") public void testSmapWithNewSyntax() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/smapWithNewSyntax.kt"); } + @Test @TestMetadata("smapWithOldSyntax.kt") public void testSmapWithOldSyntax() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/smapWithOldSyntax.kt"); } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/smap/anonymous") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Anonymous extends AbstractJvmIrAgainstOldBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Anonymous { + @Test public void testAllFilesPresentInAnonymous() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/smap/anonymous"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true); } + @Test @TestMetadata("kt19175.kt") public void testKt19175() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/anonymous/kt19175.kt"); } + @Test @TestMetadata("lambda.kt") public void testLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/anonymous/lambda.kt"); } + @Test @TestMetadata("lambdaOnCallSite.kt") public void testLambdaOnCallSite() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/anonymous/lambdaOnCallSite.kt"); } + @Test @TestMetadata("lambdaOnInlineCallSite.kt") public void testLambdaOnInlineCallSite() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/anonymous/lambdaOnInlineCallSite.kt"); } + @Test @TestMetadata("object.kt") public void testObject() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/anonymous/object.kt"); } + @Test @TestMetadata("objectOnCallSite.kt") public void testObjectOnCallSite() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/anonymous/objectOnCallSite.kt"); } + @Test @TestMetadata("objectOnInlineCallSite.kt") public void testObjectOnInlineCallSite() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/anonymous/objectOnInlineCallSite.kt"); } + @Test @TestMetadata("objectOnInlineCallSite2.kt") public void testObjectOnInlineCallSite2() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/anonymous/objectOnInlineCallSite2.kt"); } + @Test @TestMetadata("objectOnInlineCallSiteWithCapture.kt") public void testObjectOnInlineCallSiteWithCapture() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/anonymous/objectOnInlineCallSiteWithCapture.kt"); } + @Test @TestMetadata("severalMappingsForDefaultFile.kt") public void testSeveralMappingsForDefaultFile() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/anonymous/severalMappingsForDefaultFile.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/smap/defaultLambda") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class DefaultLambda extends AbstractJvmIrAgainstOldBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class DefaultLambda { + @Test public void testAllFilesPresentInDefaultLambda() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/smap/defaultLambda"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true); } + @Test @TestMetadata("defaultLambdaInAnonymous.kt") public void testDefaultLambdaInAnonymous() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/defaultLambda/defaultLambdaInAnonymous.kt"); } + @Test @TestMetadata("inlinInDefault.kt") public void testInlinInDefault() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/defaultLambda/inlinInDefault.kt"); } + @Test @TestMetadata("inlinInDefault2.kt") public void testInlinInDefault2() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/defaultLambda/inlinInDefault2.kt"); } + @Test @TestMetadata("inlineAnonymousInDefault.kt") public void testInlineAnonymousInDefault() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/defaultLambda/inlineAnonymousInDefault.kt"); } + @Test @TestMetadata("inlineAnonymousInDefault2.kt") public void testInlineAnonymousInDefault2() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/defaultLambda/inlineAnonymousInDefault2.kt"); } + @Test @TestMetadata("kt21827.kt") public void testKt21827() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/defaultLambda/kt21827.kt"); } + @Test @TestMetadata("nested.kt") public void testNested() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/defaultLambda/nested.kt"); } + @Test @TestMetadata("simple.kt") public void testSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/defaultLambda/simple.kt"); } + @Test @TestMetadata("simple2.kt") public void testSimple2() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/defaultLambda/simple2.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/smap/inlineOnly") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class InlineOnly extends AbstractJvmIrAgainstOldBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class InlineOnly { + @Test public void testAllFilesPresentInInlineOnly() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/smap/inlineOnly"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true); } + @Test @TestMetadata("noSmap.kt") public void testNoSmap() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/inlineOnly/noSmap.kt"); } + @Test @TestMetadata("noSmapWithProperty.kt") public void testNoSmapWithProperty() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/inlineOnly/noSmapWithProperty.kt"); } + @Test @TestMetadata("reified.kt") public void testReified() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/inlineOnly/reified.kt"); } + @Test @TestMetadata("reifiedProperty.kt") public void testReifiedProperty() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/inlineOnly/reifiedProperty.kt"); } + @Test @TestMetadata("stdlibInlineOnly.kt") public void testStdlibInlineOnly() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/inlineOnly/stdlibInlineOnly.kt"); } + @Test @TestMetadata("stdlibInlineOnlyOneLine.kt") public void testStdlibInlineOnlyOneLine() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/inlineOnly/stdlibInlineOnlyOneLine.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/smap/newsmap") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Newsmap extends AbstractJvmIrAgainstOldBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Newsmap { + @Test public void testAllFilesPresentInNewsmap() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/smap/newsmap"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true); } + @Test @TestMetadata("differentMapping.kt") public void testDifferentMapping() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/newsmap/differentMapping.kt"); } + @Test @TestMetadata("mappingInInlineFunLambda.kt") public void testMappingInInlineFunLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/newsmap/mappingInInlineFunLambda.kt"); } + @Test @TestMetadata("mappingInSubInlineLambda.kt") public void testMappingInSubInlineLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/newsmap/mappingInSubInlineLambda.kt"); } + @Test @TestMetadata("mappingInSubInlineLambdaSameFileInline.kt") public void testMappingInSubInlineLambdaSameFileInline() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/newsmap/mappingInSubInlineLambdaSameFileInline.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/smap/resolve") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Resolve extends AbstractJvmIrAgainstOldBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Resolve { + @Test public void testAllFilesPresentInResolve() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/smap/resolve"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true); } + @Test @TestMetadata("inlineComponent.kt") public void testInlineComponent() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/resolve/inlineComponent.kt"); } + @Test @TestMetadata("inlineIterator.kt") public void testInlineIterator() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/resolve/inlineIterator.kt"); @@ -3842,616 +4409,695 @@ public class JvmIrAgainstOldBoxInlineTestGenerated extends AbstractJvmIrAgainstO } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/special") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Special extends AbstractJvmIrAgainstOldBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Special { + @Test public void testAllFilesPresentInSpecial() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/special"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true); } + @Test @TestMetadata("identityCheck.kt") public void testIdentityCheck() throws Exception { runTest("compiler/testData/codegen/boxInline/special/identityCheck.kt"); } + @Test @TestMetadata("ifBranches.kt") public void testIfBranches() throws Exception { runTest("compiler/testData/codegen/boxInline/special/ifBranches.kt"); } + @Test @TestMetadata("iinc.kt") public void testIinc() throws Exception { runTest("compiler/testData/codegen/boxInline/special/iinc.kt"); } + @Test @TestMetadata("inlineChain.kt") public void testInlineChain() throws Exception { runTest("compiler/testData/codegen/boxInline/special/inlineChain.kt"); } + @Test @TestMetadata("loopInStoreLoadChains.kt") public void testLoopInStoreLoadChains() throws Exception { runTest("compiler/testData/codegen/boxInline/special/loopInStoreLoadChains.kt"); } + @Test @TestMetadata("loopInStoreLoadChains2.kt") public void testLoopInStoreLoadChains2() throws Exception { runTest("compiler/testData/codegen/boxInline/special/loopInStoreLoadChains2.kt"); } + @Test @TestMetadata("plusAssign.kt") public void testPlusAssign() throws Exception { runTest("compiler/testData/codegen/boxInline/special/plusAssign.kt"); } + @Test @TestMetadata("stackHeightBug.kt") public void testStackHeightBug() throws Exception { runTest("compiler/testData/codegen/boxInline/special/stackHeightBug.kt"); } + @Test @TestMetadata("unusedInlineLambda.kt") public void testUnusedInlineLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/special/unusedInlineLambda.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/stackOnReturn") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class StackOnReturn extends AbstractJvmIrAgainstOldBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class StackOnReturn { + @Test public void testAllFilesPresentInStackOnReturn() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/stackOnReturn"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true); } + @Test @TestMetadata("elvis.kt") public void testElvis() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/elvis.kt"); } + @Test @TestMetadata("ifThenElse.kt") public void testIfThenElse() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/ifThenElse.kt"); } + @Test @TestMetadata("kt11499.kt") public void testKt11499() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/kt11499.kt"); } + @Test @TestMetadata("kt17591.kt") public void testKt17591() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/kt17591.kt"); } + @Test @TestMetadata("kt17591a.kt") public void testKt17591a() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/kt17591a.kt"); } + @Test @TestMetadata("kt17591b.kt") public void testKt17591b() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/kt17591b.kt"); } + @Test @TestMetadata("mixedTypesOnStack1.kt") public void testMixedTypesOnStack1() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/mixedTypesOnStack1.kt"); } + @Test @TestMetadata("mixedTypesOnStack2.kt") public void testMixedTypesOnStack2() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/mixedTypesOnStack2.kt"); } + @Test @TestMetadata("mixedTypesOnStack3.kt") public void testMixedTypesOnStack3() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/mixedTypesOnStack3.kt"); } + @Test @TestMetadata("nonLocalReturn1.kt") public void testNonLocalReturn1() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/nonLocalReturn1.kt"); } + @Test @TestMetadata("nonLocalReturn2.kt") public void testNonLocalReturn2() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/nonLocalReturn2.kt"); } + @Test @TestMetadata("nonLocalReturn3.kt") public void testNonLocalReturn3() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/nonLocalReturn3.kt"); } + @Test @TestMetadata("poppedLocalReturn.kt") public void testPoppedLocalReturn() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/poppedLocalReturn.kt"); } + @Test @TestMetadata("poppedLocalReturn2.kt") public void testPoppedLocalReturn2() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/poppedLocalReturn2.kt"); } + @Test @TestMetadata("returnLong.kt") public void testReturnLong() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/returnLong.kt"); } + @Test @TestMetadata("tryFinally.kt") public void testTryFinally() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/tryFinally.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/suspend") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Suspend extends AbstractJvmIrAgainstOldBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Suspend { + @Test public void testAllFilesPresentInSuspend() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true); } + @Test @TestMetadata("capturedVariables.kt") public void testCapturedVariables() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/capturedVariables.kt"); } + @Test @TestMetadata("crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt") public void testCrossinlineSuspendLambdaInsideCrossinlineSuspendLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt"); } + @Test @TestMetadata("debugMetadataCrossinline.kt") public void testDebugMetadataCrossinline() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/debugMetadataCrossinline.kt"); } + @Test @TestMetadata("delegatedProperties.kt") public void testDelegatedProperties() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/delegatedProperties.kt"); } + @Test @TestMetadata("doubleRegenerationWithNonSuspendingLambda.kt") public void testDoubleRegenerationWithNonSuspendingLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/doubleRegenerationWithNonSuspendingLambda.kt"); } + @Test @TestMetadata("enclodingMethod.kt") public void testEnclodingMethod() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/enclodingMethod.kt"); } + @Test @TestMetadata("fileNameInMetadata.kt") public void testFileNameInMetadata() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/fileNameInMetadata.kt"); } + @Test @TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt") public void testInlineOrdinaryOfCrossinlineSuspend() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfCrossinlineSuspend.kt"); } + @Test @TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt") public void testInlineOrdinaryOfNoinlineSuspend() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfNoinlineSuspend.kt"); } + @Test @TestMetadata("inlineSuspendContinuation.kt") public void testInlineSuspendContinuation() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendContinuation.kt"); } + @Test @TestMetadata("inlineSuspendInMultifileClass.kt") public void testInlineSuspendInMultifileClass() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendInMultifileClass.kt"); } + @Test @TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt") public void testInlineSuspendOfCrossinlineOrdinary() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineOrdinary.kt"); } + @Test @TestMetadata("inlineSuspendOfCrossinlineSuspend.kt") public void testInlineSuspendOfCrossinlineSuspend() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineSuspend.kt"); } + @Test @TestMetadata("inlineSuspendOfNoinlineOrdinary.kt") public void testInlineSuspendOfNoinlineOrdinary() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineOrdinary.kt"); } + @Test @TestMetadata("inlineSuspendOfNoinlineSuspend.kt") public void testInlineSuspendOfNoinlineSuspend() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineSuspend.kt"); } + @Test @TestMetadata("inlineSuspendOfOrdinary.kt") public void testInlineSuspendOfOrdinary() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfOrdinary.kt"); } + @Test @TestMetadata("inlineSuspendOfSuspend.kt") public void testInlineSuspendOfSuspend() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfSuspend.kt"); } + @Test @TestMetadata("jvmName.kt") public void testJvmName() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/jvmName.kt"); } + @Test @TestMetadata("kt26658.kt") public void testKt26658() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/kt26658.kt"); } + @Test @TestMetadata("maxStackWithCrossinline.kt") public void testMaxStackWithCrossinline() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/maxStackWithCrossinline.kt"); } + @Test @TestMetadata("multipleLocals.kt") public void testMultipleLocals() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/multipleLocals.kt"); } + @Test @TestMetadata("multipleSuspensionPoints.kt") public void testMultipleSuspensionPoints() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/multipleSuspensionPoints.kt"); } + @Test @TestMetadata("nestedMethodWith2XParameter.kt") public void testNestedMethodWith2XParameter() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/nestedMethodWith2XParameter.kt"); } + @Test @TestMetadata("nonLocalReturn.kt") public void testNonLocalReturn() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/nonLocalReturn.kt"); } + @Test @TestMetadata("nonSuspendCrossinline.kt") public void testNonSuspendCrossinline() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/nonSuspendCrossinline.kt"); } + @Test @TestMetadata("returnValue.kt") public void testReturnValue() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/returnValue.kt"); } + @Test @TestMetadata("tryCatchReceiver.kt") public void testTryCatchReceiver() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/tryCatchReceiver.kt"); } + @Test @TestMetadata("tryCatchStackTransform.kt") public void testTryCatchStackTransform() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/tryCatchStackTransform.kt"); } + @Test @TestMetadata("twiceRegeneratedAnonymousObject.kt") public void testTwiceRegeneratedAnonymousObject() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/twiceRegeneratedAnonymousObject.kt"); } + @Test @TestMetadata("twiceRegeneratedSuspendLambda.kt") public void testTwiceRegeneratedSuspendLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/twiceRegeneratedSuspendLambda.kt"); } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/suspend/callableReference") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class CallableReference extends AbstractJvmIrAgainstOldBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class CallableReference { + @Test public void testAllFilesPresentInCallableReference() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/callableReference"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true); } + @Test @TestMetadata("isAsReified.kt") public void testIsAsReified() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/callableReference/isAsReified.kt"); } + @Test @TestMetadata("isAsReified2.kt") public void testIsAsReified2() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/callableReference/isAsReified2.kt"); } + @Test @TestMetadata("nonTailCall.kt") public void testNonTailCall() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/callableReference/nonTailCall.kt"); } + @Test @TestMetadata("simple.kt") public void testSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/callableReference/simple.kt"); } + @Test @TestMetadata("unitReturn.kt") public void testUnitReturn() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/callableReference/unitReturn.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/suspend/defaultParameter") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class DefaultParameter extends AbstractJvmIrAgainstOldBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class DefaultParameter { + @Test public void testAllFilesPresentInDefaultParameter() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/defaultParameter"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true); } + @Test @TestMetadata("defaultValueCrossinline.kt") public void testDefaultValueCrossinline() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueCrossinline.kt"); } + @Test @TestMetadata("defaultValueInClass.kt") public void testDefaultValueInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInClass.kt"); } + @Test @TestMetadata("defaultValueInline.kt") public void testDefaultValueInline() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInline.kt"); } + @Test @TestMetadata("defaultValueInlineFromMultiFileFacade.kt") public void testDefaultValueInlineFromMultiFileFacade() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInlineFromMultiFileFacade.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/suspend/inlineClass") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class InlineClass extends AbstractJvmIrAgainstOldBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class InlineClass { + @Test public void testAllFilesPresentInInlineClass() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/inlineClass"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true); } + @Test @TestMetadata("returnUnboxedDirect.kt") public void testReturnUnboxedDirect() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineClass/returnUnboxedDirect.kt"); } + @Test @TestMetadata("returnUnboxedResume.kt") public void testReturnUnboxedResume() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineClass/returnUnboxedResume.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/suspend/inlineUsedAsNoinline") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class InlineUsedAsNoinline extends AbstractJvmIrAgainstOldBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class InlineUsedAsNoinline { + @Test public void testAllFilesPresentInInlineUsedAsNoinline() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/inlineUsedAsNoinline"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true); } + @Test @TestMetadata("inlineOnly.kt") public void testInlineOnly() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineUsedAsNoinline/inlineOnly.kt"); } + @Test @TestMetadata("simpleNamed.kt") public void testSimpleNamed() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineUsedAsNoinline/simpleNamed.kt"); } + @Test @TestMetadata("withCapturedInlineLambda.kt") public void testWithCapturedInlineLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineUsedAsNoinline/withCapturedInlineLambda.kt"); } + @Test @TestMetadata("withCapturedInlineLambda2.kt") public void testWithCapturedInlineLambda2() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineUsedAsNoinline/withCapturedInlineLambda2.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/suspend/receiver") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Receiver extends AbstractJvmIrAgainstOldBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Receiver { + @Test public void testAllFilesPresentInReceiver() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/receiver"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true); } + @Test @TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt") public void testInlineOrdinaryOfCrossinlineSuspend() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfCrossinlineSuspend.kt"); } + @Test @TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt") public void testInlineOrdinaryOfNoinlineSuspend() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfNoinlineSuspend.kt"); } + @Test @TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt") public void testInlineSuspendOfCrossinlineOrdinary() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineOrdinary.kt"); } + @Test @TestMetadata("inlineSuspendOfCrossinlineSuspend.kt") public void testInlineSuspendOfCrossinlineSuspend() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineSuspend.kt"); } + @Test @TestMetadata("inlineSuspendOfNoinlineOrdinary.kt") public void testInlineSuspendOfNoinlineOrdinary() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineOrdinary.kt"); } + @Test @TestMetadata("inlineSuspendOfNoinlineSuspend.kt") public void testInlineSuspendOfNoinlineSuspend() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineSuspend.kt"); } + @Test @TestMetadata("inlineSuspendOfOrdinary.kt") public void testInlineSuspendOfOrdinary() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfOrdinary.kt"); } + @Test @TestMetadata("inlineSuspendOfSuspend.kt") public void testInlineSuspendOfSuspend() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfSuspend.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class StateMachine extends AbstractJvmIrAgainstOldBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class StateMachine { + @Test public void testAllFilesPresentInStateMachine() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/stateMachine"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true); } + @Test @TestMetadata("crossingCoroutineBoundaries.kt") public void testCrossingCoroutineBoundaries() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/crossingCoroutineBoundaries.kt"); } + @Test @TestMetadata("independentInline.kt") public void testIndependentInline() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/independentInline.kt"); } + @Test @TestMetadata("innerLambda.kt") public void testInnerLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambda.kt"); } + @Test @TestMetadata("innerLambdaInsideLambda.kt") public void testInnerLambdaInsideLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaInsideLambda.kt"); } + @Test @TestMetadata("innerLambdaWithoutCrossinline.kt") public void testInnerLambdaWithoutCrossinline() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaWithoutCrossinline.kt"); } + @Test @TestMetadata("innerMadness.kt") public void testInnerMadness() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadness.kt"); } + @Test @TestMetadata("innerMadnessCallSite.kt") public void testInnerMadnessCallSite() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadnessCallSite.kt"); } + @Test @TestMetadata("innerObject.kt") public void testInnerObject() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObject.kt"); } + @Test @TestMetadata("innerObjectInsideInnerObject.kt") public void testInnerObjectInsideInnerObject() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectInsideInnerObject.kt"); } + @Test @TestMetadata("innerObjectRetransformation.kt") public void testInnerObjectRetransformation() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectRetransformation.kt"); } + @Test @TestMetadata("innerObjectSeveralFunctions.kt") public void testInnerObjectSeveralFunctions() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectSeveralFunctions.kt"); } + @Test @TestMetadata("innerObjectWithoutCapturingCrossinline.kt") public void testInnerObjectWithoutCapturingCrossinline() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectWithoutCapturingCrossinline.kt"); } + @Test @TestMetadata("insideObject.kt") public void testInsideObject() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/insideObject.kt"); } + @Test + @TestMetadata("kt30708.kt") + public void testKt30708() throws Exception { + runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/kt30708.kt"); + } + + @Test @TestMetadata("lambdaTransformation.kt") public void testLambdaTransformation() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/lambdaTransformation.kt"); } + @Test @TestMetadata("normalInline.kt") public void testNormalInline() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/normalInline.kt"); } + @Test @TestMetadata("numberOfSuspentions.kt") public void testNumberOfSuspentions() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/numberOfSuspentions.kt"); } + @Test @TestMetadata("objectInsideLambdas.kt") public void testObjectInsideLambdas() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/objectInsideLambdas.kt"); } + @Test @TestMetadata("oneInlineTwoCaptures.kt") public void testOneInlineTwoCaptures() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/oneInlineTwoCaptures.kt"); } + @Test @TestMetadata("passLambda.kt") public void testPassLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/passLambda.kt"); } + @Test @TestMetadata("passParameter.kt") public void testPassParameter() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/passParameter.kt"); } + @Test @TestMetadata("passParameterLambda.kt") public void testPassParameterLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/passParameterLambda.kt"); } + @Test @TestMetadata("unreachableSuspendMarker.kt") public void testUnreachableSuspendMarker() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/unreachableSuspendMarker.kt"); @@ -4459,110 +5105,121 @@ public class JvmIrAgainstOldBoxInlineTestGenerated extends AbstractJvmIrAgainstO } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/syntheticAccessors") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class SyntheticAccessors extends AbstractJvmIrAgainstOldBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class SyntheticAccessors { + @Test public void testAllFilesPresentInSyntheticAccessors() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/syntheticAccessors"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true); } + @Test @TestMetadata("constField.kt") public void testConstField() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/constField.kt"); } + @Test @TestMetadata("packagePrivateMembers.kt") public void testPackagePrivateMembers() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/packagePrivateMembers.kt"); } + @Test @TestMetadata("propertyModifiers.kt") public void testPropertyModifiers() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/propertyModifiers.kt"); } + @Test @TestMetadata("protectedMembers.kt") public void testProtectedMembers() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/protectedMembers.kt"); } + @Test @TestMetadata("protectedMembersFromSuper.kt") public void testProtectedMembersFromSuper() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/protectedMembersFromSuper.kt"); } + @Test @TestMetadata("superCall.kt") public void testSuperCall() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/superCall.kt"); } + @Test @TestMetadata("superCallFromMultipleSubclasses.kt") public void testSuperCallFromMultipleSubclasses() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/superCallFromMultipleSubclasses.kt"); } + @Test @TestMetadata("superProperty.kt") public void testSuperProperty() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/superProperty.kt"); } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class WithinInlineLambda extends AbstractJvmIrAgainstOldBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class WithinInlineLambda { + @Test public void testAllFilesPresentInWithinInlineLambda() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true); } + @Test @TestMetadata("directFieldAccess.kt") public void testDirectFieldAccess() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/directFieldAccess.kt"); } + @Test @TestMetadata("directFieldAccessInCrossInline.kt") public void testDirectFieldAccessInCrossInline() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/directFieldAccessInCrossInline.kt"); } + @Test @TestMetadata("privateCall.kt") public void testPrivateCall() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/privateCall.kt"); } + @Test @TestMetadata("privateInCrossInline.kt") public void testPrivateInCrossInline() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/privateInCrossInline.kt"); } + @Test @TestMetadata("privateInDefaultStubArgument.kt") public void testPrivateInDefaultStubArgument() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/privateInDefaultStubArgument.kt"); } + @Test @TestMetadata("protectedInCrossinline.kt") public void testProtectedInCrossinline() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/protectedInCrossinline.kt"); } + @Test @TestMetadata("protectedMembersFromSuper.kt") public void testProtectedMembersFromSuper() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/protectedMembersFromSuper.kt"); } + @Test @TestMetadata("superCall.kt") public void testSuperCall() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/superCall.kt"); } + @Test @TestMetadata("superInCrossInline.kt") public void testSuperInCrossInline() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/superInCrossInline.kt"); @@ -4570,79 +5227,78 @@ public class JvmIrAgainstOldBoxInlineTestGenerated extends AbstractJvmIrAgainstO } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/trait") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Trait extends AbstractJvmIrAgainstOldBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Trait { + @Test public void testAllFilesPresentInTrait() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/trait"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true); } + @Test @TestMetadata("trait.kt") public void testTrait() throws Exception { runTest("compiler/testData/codegen/boxInline/trait/trait.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/tryCatchFinally") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class TryCatchFinally extends AbstractJvmIrAgainstOldBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class TryCatchFinally { + @Test public void testAllFilesPresentInTryCatchFinally() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/tryCatchFinally"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true); } + @Test @TestMetadata("kt5863.kt") public void testKt5863() throws Exception { runTest("compiler/testData/codegen/boxInline/tryCatchFinally/kt5863.kt"); } + @Test @TestMetadata("tryCatch.kt") public void testTryCatch() throws Exception { runTest("compiler/testData/codegen/boxInline/tryCatchFinally/tryCatch.kt"); } + @Test @TestMetadata("tryCatch2.kt") public void testTryCatch2() throws Exception { runTest("compiler/testData/codegen/boxInline/tryCatchFinally/tryCatch2.kt"); } + @Test @TestMetadata("tryCatchFinally.kt") public void testTryCatchFinally() throws Exception { runTest("compiler/testData/codegen/boxInline/tryCatchFinally/tryCatchFinally.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/varargs") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Varargs extends AbstractJvmIrAgainstOldBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Varargs { + @Test public void testAllFilesPresentInVarargs() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/varargs"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true); } + @Test @TestMetadata("kt17653.kt") public void testKt17653() throws Exception { runTest("compiler/testData/codegen/boxInline/varargs/kt17653.kt"); } + @Test @TestMetadata("varargAndDefaultParameters.kt") public void testVarargAndDefaultParameters() throws Exception { runTest("compiler/testData/codegen/boxInline/varargs/varargAndDefaultParameters.kt"); } + @Test @TestMetadata("varargAndDefaultParameters2.kt") public void testVarargAndDefaultParameters2() throws Exception { runTest("compiler/testData/codegen/boxInline/varargs/varargAndDefaultParameters2.kt"); diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/JvmIrAgainstOldBoxTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/JvmIrAgainstOldBoxTestGenerated.java new file mode 100644 index 00000000000..02fc861b0c5 --- /dev/null +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/JvmIrAgainstOldBoxTestGenerated.java @@ -0,0 +1,891 @@ +/* + * Copyright 2010-2021 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. + */ + +package org.jetbrains.kotlin.test.runners.codegen; + +import com.intellij.testFramework.TestDataPath; +import org.jetbrains.kotlin.test.util.KtTestUtil; +import org.jetbrains.kotlin.test.TargetBackend; +import org.jetbrains.kotlin.test.TestMetadata; +import org.junit.jupiter.api.Nested; +import org.junit.jupiter.api.Test; + +import java.io.File; +import java.util.regex.Pattern; + +/** This class is generated by {@link GenerateNewCompilerTests.kt}. DO NOT MODIFY MANUALLY */ +@SuppressWarnings("all") +@TestMetadata("compiler/testData/codegen/box/compileKotlinAgainstKotlin") +@TestDataPath("$PROJECT_ROOT") +public class JvmIrAgainstOldBoxTestGenerated extends AbstractJvmIrAgainstOldBoxTest { + @Test + public void testAllFilesPresentInCompileKotlinAgainstKotlin() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/compileKotlinAgainstKotlin"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true); + } + + @Test + @TestMetadata("annotationInInterface.kt") + public void testAnnotationInInterface() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/annotationInInterface.kt"); + } + + @Test + @TestMetadata("annotationOnTypeUseInTypeAlias.kt") + public void testAnnotationOnTypeUseInTypeAlias() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/annotationOnTypeUseInTypeAlias.kt"); + } + + @Test + @TestMetadata("annotationsOnTypeAliases.kt") + public void testAnnotationsOnTypeAliases() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/annotationsOnTypeAliases.kt"); + } + + @Test + @TestMetadata("callDeserializedPropertyOnInlineClassType.kt") + public void testCallDeserializedPropertyOnInlineClassType() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/callDeserializedPropertyOnInlineClassType.kt"); + } + + @Test + @TestMetadata("callDeserializedPropertyOnInlineClassTypeOldMangling.kt") + public void testCallDeserializedPropertyOnInlineClassTypeOldMangling() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/callDeserializedPropertyOnInlineClassTypeOldMangling.kt"); + } + + @Test + @TestMetadata("callsToMultifileClassFromOtherPackage.kt") + public void testCallsToMultifileClassFromOtherPackage() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/callsToMultifileClassFromOtherPackage.kt"); + } + + @Test + @TestMetadata("clashingFakeOverrideSignatures.kt") + public void testClashingFakeOverrideSignatures() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/clashingFakeOverrideSignatures.kt"); + } + + @Test + @TestMetadata("classInObject.kt") + public void testClassInObject() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/classInObject.kt"); + } + + @Test + @TestMetadata("companionObjectInEnum.kt") + public void testCompanionObjectInEnum() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/companionObjectInEnum.kt"); + } + + @Test + @TestMetadata("companionObjectMember.kt") + public void testCompanionObjectMember() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/companionObjectMember.kt"); + } + + @Test + @TestMetadata("constPropertyReferenceFromMultifileClass.kt") + public void testConstPropertyReferenceFromMultifileClass() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/constPropertyReferenceFromMultifileClass.kt"); + } + + @Test + @TestMetadata("constructorVararg.kt") + public void testConstructorVararg() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/constructorVararg.kt"); + } + + @Test + @TestMetadata("constructorWithInlineClassParametersInBinaryDependencies.kt") + public void testConstructorWithInlineClassParametersInBinaryDependencies() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/constructorWithInlineClassParametersInBinaryDependencies.kt"); + } + + @Test + @TestMetadata("constructorWithInlineClassParametersInBinaryDependenciesOldMangling.kt") + public void testConstructorWithInlineClassParametersInBinaryDependenciesOldMangling() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/constructorWithInlineClassParametersInBinaryDependenciesOldMangling.kt"); + } + + @Test + @TestMetadata("copySamOnInline.kt") + public void testCopySamOnInline() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/copySamOnInline.kt"); + } + + @Test + @TestMetadata("copySamOnInline2.kt") + public void testCopySamOnInline2() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/copySamOnInline2.kt"); + } + + @Test + @TestMetadata("coroutinesBinary.kt") + public void testCoroutinesBinary() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/coroutinesBinary.kt"); + } + + @Test + @TestMetadata("defaultConstructor.kt") + public void testDefaultConstructor() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/defaultConstructor.kt"); + } + + @Test + @TestMetadata("defaultLambdaRegeneration.kt") + public void testDefaultLambdaRegeneration() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/defaultLambdaRegeneration.kt"); + } + + @Test + @TestMetadata("defaultLambdaRegeneration2.kt") + public void testDefaultLambdaRegeneration2() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/defaultLambdaRegeneration2.kt"); + } + + @Test + @TestMetadata("defaultWithInlineClassAndReceivers.kt") + public void testDefaultWithInlineClassAndReceivers() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/defaultWithInlineClassAndReceivers.kt"); + } + + @Test + @TestMetadata("defaultWithInlineClassAndReceiversOldMangling.kt") + public void testDefaultWithInlineClassAndReceiversOldMangling() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/defaultWithInlineClassAndReceiversOldMangling.kt"); + } + + @Test + @TestMetadata("delegatedDefault.kt") + public void testDelegatedDefault() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/delegatedDefault.kt"); + } + + @Test + @TestMetadata("delegationAndAnnotations.kt") + public void testDelegationAndAnnotations() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/delegationAndAnnotations.kt"); + } + + @Test + @TestMetadata("doublyNestedClass.kt") + public void testDoublyNestedClass() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/doublyNestedClass.kt"); + } + + @Test + @TestMetadata("enum.kt") + public void testEnum() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/enum.kt"); + } + + @Test + @TestMetadata("expectClassActualTypeAlias.kt") + public void testExpectClassActualTypeAlias() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/expectClassActualTypeAlias.kt"); + } + + @Test + @TestMetadata("fakeOverridesForIntersectionTypes.kt") + public void testFakeOverridesForIntersectionTypes() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/fakeOverridesForIntersectionTypes.kt"); + } + + @Test + @TestMetadata("importCompanion.kt") + public void testImportCompanion() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/importCompanion.kt"); + } + + @Test + @TestMetadata("inlineClassFakeOverrideMangling.kt") + public void testInlineClassFakeOverrideMangling() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/inlineClassFakeOverrideMangling.kt"); + } + + @Test + @TestMetadata("inlineClassFakeOverrideManglingOldMangling.kt") + public void testInlineClassFakeOverrideManglingOldMangling() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/inlineClassFakeOverrideManglingOldMangling.kt"); + } + + @Test + @TestMetadata("inlineClassFromBinaryDependencies.kt") + public void testInlineClassFromBinaryDependencies() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/inlineClassFromBinaryDependencies.kt"); + } + + @Test + @TestMetadata("inlineClassFromBinaryDependenciesOldMangling.kt") + public void testInlineClassFromBinaryDependenciesOldMangling() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/inlineClassFromBinaryDependenciesOldMangling.kt"); + } + + @Test + @TestMetadata("inlineClassInlineFunctionCall.kt") + public void testInlineClassInlineFunctionCall() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/inlineClassInlineFunctionCall.kt"); + } + + @Test + @TestMetadata("inlineClassInlineFunctionCallOldMangling.kt") + public void testInlineClassInlineFunctionCallOldMangling() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/inlineClassInlineFunctionCallOldMangling.kt"); + } + + @Test + @TestMetadata("inlineClassInlineProperty.kt") + public void testInlineClassInlineProperty() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/inlineClassInlineProperty.kt"); + } + + @Test + @TestMetadata("inlineClassInlinePropertyOldMangling.kt") + public void testInlineClassInlinePropertyOldMangling() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/inlineClassInlinePropertyOldMangling.kt"); + } + + @Test + @TestMetadata("inlineClassesOldMangling.kt") + public void testInlineClassesOldMangling() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/inlineClassesOldMangling.kt"); + } + + @Test + @TestMetadata("inlinedConstants.kt") + public void testInlinedConstants() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/inlinedConstants.kt"); + } + + @Test + @TestMetadata("innerClassConstructor.kt") + public void testInnerClassConstructor() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/innerClassConstructor.kt"); + } + + @Test + @TestMetadata("interfaceDelegationAndBridgesProcessing.kt") + public void testInterfaceDelegationAndBridgesProcessing() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/interfaceDelegationAndBridgesProcessing.kt"); + } + + @Test + @TestMetadata("internalSetterOverridden.kt") + public void testInternalSetterOverridden() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/internalSetterOverridden.kt"); + } + + @Test + @TestMetadata("internalWithDefaultArgs.kt") + public void testInternalWithDefaultArgs() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/internalWithDefaultArgs.kt"); + } + + @Test + @TestMetadata("internalWithInlineClass.kt") + public void testInternalWithInlineClass() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/internalWithInlineClass.kt"); + } + + @Test + @TestMetadata("internalWithOtherModuleName.kt") + public void testInternalWithOtherModuleName() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/internalWithOtherModuleName.kt"); + } + + @Test + @TestMetadata("intersectionOverrideProperies.kt") + public void testIntersectionOverrideProperies() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/intersectionOverrideProperies.kt"); + } + + @Test + @TestMetadata("jvmField.kt") + public void testJvmField() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvmField.kt"); + } + + @Test + @TestMetadata("jvmFieldInAnnotationCompanion.kt") + public void testJvmFieldInAnnotationCompanion() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvmFieldInAnnotationCompanion.kt"); + } + + @Test + @TestMetadata("jvmFieldInConstructor.kt") + public void testJvmFieldInConstructor() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvmFieldInConstructor.kt"); + } + + @Test + @TestMetadata("jvmFieldInInterfaceCompanion.kt") + public void testJvmFieldInInterfaceCompanion() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvmFieldInInterfaceCompanion.kt"); + } + + @Test + @TestMetadata("jvmNames.kt") + public void testJvmNames() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvmNames.kt"); + } + + @Test + @TestMetadata("jvmPackageName.kt") + public void testJvmPackageName() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvmPackageName.kt"); + } + + @Test + @TestMetadata("jvmPackageNameInRootPackage.kt") + public void testJvmPackageNameInRootPackage() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvmPackageNameInRootPackage.kt"); + } + + @Test + @TestMetadata("jvmPackageNameMultifileClass.kt") + public void testJvmPackageNameMultifileClass() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvmPackageNameMultifileClass.kt"); + } + + @Test + @TestMetadata("jvmPackageNameWithJvmName.kt") + public void testJvmPackageNameWithJvmName() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvmPackageNameWithJvmName.kt"); + } + + @Test + @TestMetadata("jvmStaticInObject.kt") + public void testJvmStaticInObject() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvmStaticInObject.kt"); + } + + @Test + @TestMetadata("jvmStaticInObjectPropertyReference.kt") + public void testJvmStaticInObjectPropertyReference() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvmStaticInObjectPropertyReference.kt"); + } + + @Test + @TestMetadata("kotlinPropertyAsAnnotationParameter.kt") + public void testKotlinPropertyAsAnnotationParameter() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/kotlinPropertyAsAnnotationParameter.kt"); + } + + @Test + @TestMetadata("kt14012.kt") + public void testKt14012() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/kt14012.kt"); + } + + @Test + @TestMetadata("kt14012_multi.kt") + public void testKt14012_multi() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/kt14012_multi.kt"); + } + + @Test + @TestMetadata("kt21775.kt") + public void testKt21775() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/kt21775.kt"); + } + + @Test + @TestMetadata("metadataForMembersInLocalClassInInitializer.kt") + public void testMetadataForMembersInLocalClassInInitializer() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/metadataForMembersInLocalClassInInitializer.kt"); + } + + @Test + @TestMetadata("multifileClassInlineFunctionAccessingProperty.kt") + public void testMultifileClassInlineFunctionAccessingProperty() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/multifileClassInlineFunctionAccessingProperty.kt"); + } + + @Test + @TestMetadata("multifileClassWithTypealias.kt") + public void testMultifileClassWithTypealias() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/multifileClassWithTypealias.kt"); + } + + @Test + @TestMetadata("nestedClass.kt") + public void testNestedClass() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/nestedClass.kt"); + } + + @Test + @TestMetadata("nestedClassInAnnotationArgument.kt") + public void testNestedClassInAnnotationArgument() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/nestedClassInAnnotationArgument.kt"); + } + + @Test + @TestMetadata("nestedEnum.kt") + public void testNestedEnum() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/nestedEnum.kt"); + } + + @Test + @TestMetadata("nestedFunctionTypeAliasExpansion.kt") + public void testNestedFunctionTypeAliasExpansion() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/nestedFunctionTypeAliasExpansion.kt"); + } + + @Test + @TestMetadata("nestedObject.kt") + public void testNestedObject() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/nestedObject.kt"); + } + + @Test + @TestMetadata("nestedTypeAliasExpansion.kt") + public void testNestedTypeAliasExpansion() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/nestedTypeAliasExpansion.kt"); + } + + @Test + @TestMetadata("noExplicitOverrideForDelegatedFromSupertype.kt") + public void testNoExplicitOverrideForDelegatedFromSupertype() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/noExplicitOverrideForDelegatedFromSupertype.kt"); + } + + @Test + @TestMetadata("optionalAnnotation.kt") + public void testOptionalAnnotation() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/optionalAnnotation.kt"); + } + + @Test + @TestMetadata("platformTypes.kt") + public void testPlatformTypes() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/platformTypes.kt"); + } + + @Test + @TestMetadata("privateCompanionObjectValInDifferentModule.kt") + public void testPrivateCompanionObjectValInDifferentModule() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/privateCompanionObjectValInDifferentModule.kt"); + } + + @Test + @TestMetadata("privateCompanionObjectValInDifferentModuleOldMangling.kt") + public void testPrivateCompanionObjectValInDifferentModuleOldMangling() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/privateCompanionObjectValInDifferentModuleOldMangling.kt"); + } + + @Test + @TestMetadata("privateTopLevelValInDifferentModule.kt") + public void testPrivateTopLevelValInDifferentModule() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/privateTopLevelValInDifferentModule.kt"); + } + + @Test + @TestMetadata("privateTopLevelValInDifferentModuleOldMangling.kt") + public void testPrivateTopLevelValInDifferentModuleOldMangling() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/privateTopLevelValInDifferentModuleOldMangling.kt"); + } + + @Test + @TestMetadata("propertyReference.kt") + public void testPropertyReference() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/propertyReference.kt"); + } + + @Test + @TestMetadata("recursiveGeneric.kt") + public void testRecursiveGeneric() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/recursiveGeneric.kt"); + } + + @Test + @TestMetadata("reflectTopLevelFunctionOtherFile.kt") + public void testReflectTopLevelFunctionOtherFile() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/reflectTopLevelFunctionOtherFile.kt"); + } + + @Test + @TestMetadata("sealedClass.kt") + public void testSealedClass() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/sealedClass.kt"); + } + + @Test + @TestMetadata("secondaryConstructors.kt") + public void testSecondaryConstructors() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/secondaryConstructors.kt"); + } + + @Test + @TestMetadata("simple.kt") + public void testSimple() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/simple.kt"); + } + + @Test + @TestMetadata("simpleValAnonymousObject.kt") + public void testSimpleValAnonymousObject() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/simpleValAnonymousObject.kt"); + } + + @Test + @TestMetadata("specialBridgesInDependencies.kt") + public void testSpecialBridgesInDependencies() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/specialBridgesInDependencies.kt"); + } + + @Test + @TestMetadata("starImportEnum.kt") + public void testStarImportEnum() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/starImportEnum.kt"); + } + + @Test + @TestMetadata("suspendFunWithDefaultMangling.kt") + public void testSuspendFunWithDefaultMangling() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/suspendFunWithDefaultMangling.kt"); + } + + @Test + @TestMetadata("suspendFunWithDefaultOldMangling.kt") + public void testSuspendFunWithDefaultOldMangling() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/suspendFunWithDefaultOldMangling.kt"); + } + + @Test + @TestMetadata("targetedJvmName.kt") + public void testTargetedJvmName() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/targetedJvmName.kt"); + } + + @Test + @TestMetadata("typeAliasesKt13181.kt") + public void testTypeAliasesKt13181() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/typeAliasesKt13181.kt"); + } + + @Test + @TestMetadata("unsignedTypesInAnnotations.kt") + public void testUnsignedTypesInAnnotations() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/unsignedTypesInAnnotations.kt"); + } + + @Test + @TestMetadata("useDeserializedFunInterface.kt") + public void testUseDeserializedFunInterface() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/useDeserializedFunInterface.kt"); + } + + @Nested + @TestMetadata("compiler/testData/codegen/box/compileKotlinAgainstKotlin/fir") + @TestDataPath("$PROJECT_ROOT") + public class Fir { + @Test + public void testAllFilesPresentInFir() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/compileKotlinAgainstKotlin/fir"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true); + } + + @Test + @TestMetadata("AnonymousObjectInProperty.kt") + public void testAnonymousObjectInProperty() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/fir/AnonymousObjectInProperty.kt"); + } + + @Test + @TestMetadata("ExistingSymbolInFakeOverride.kt") + public void testExistingSymbolInFakeOverride() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/fir/ExistingSymbolInFakeOverride.kt"); + } + + @Test + @TestMetadata("IncrementalCompilerRunner.kt") + public void testIncrementalCompilerRunner() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/fir/IncrementalCompilerRunner.kt"); + } + + @Test + @TestMetadata("IrConstAcceptMultiModule.kt") + public void testIrConstAcceptMultiModule() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/fir/IrConstAcceptMultiModule.kt"); + } + + @Test + @TestMetadata("LibraryProperty.kt") + public void testLibraryProperty() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/fir/LibraryProperty.kt"); + } + } + + @Nested + @TestMetadata("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8") + @TestDataPath("$PROJECT_ROOT") + public class Jvm8 { + @Test + public void testAllFilesPresentInJvm8() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true); + } + + @Nested + @TestMetadata("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults") + @TestDataPath("$PROJECT_ROOT") + public class Defaults { + @Test + public void testAllFilesPresentInDefaults() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true); + } + + @Test + @TestMetadata("superCall.kt") + public void testSuperCall() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/superCall.kt"); + } + + @Test + @TestMetadata("superCallFromInterface.kt") + public void testSuperCallFromInterface() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/superCallFromInterface.kt"); + } + + @Test + @TestMetadata("superCallFromInterface2.kt") + public void testSuperCallFromInterface2() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/superCallFromInterface2.kt"); + } + + @Test + @TestMetadata("superPropAccess.kt") + public void testSuperPropAccess() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/superPropAccess.kt"); + } + + @Test + @TestMetadata("superPropAccessFromInterface.kt") + public void testSuperPropAccessFromInterface() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/superPropAccessFromInterface.kt"); + } + + @Test + @TestMetadata("superPropAccessFromInterface2.kt") + public void testSuperPropAccessFromInterface2() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/superPropAccessFromInterface2.kt"); + } + + @Nested + @TestMetadata("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility") + @TestDataPath("$PROJECT_ROOT") + public class AllCompatibility { + @Test + public void testAllFilesPresentInAllCompatibility() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true); + } + + @Test + @TestMetadata("callStackTrace.kt") + public void testCallStackTrace() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/callStackTrace.kt"); + } + + @Test + @TestMetadata("superCall.kt") + public void testSuperCall() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superCall.kt"); + } + + @Test + @TestMetadata("superCallFromInterface.kt") + public void testSuperCallFromInterface() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superCallFromInterface.kt"); + } + + @Test + @TestMetadata("superCallFromInterface2.kt") + public void testSuperCallFromInterface2() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superCallFromInterface2.kt"); + } + + @Test + @TestMetadata("superPropAccess.kt") + public void testSuperPropAccess() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superPropAccess.kt"); + } + + @Test + @TestMetadata("superPropAccessFromInterface.kt") + public void testSuperPropAccessFromInterface() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superPropAccessFromInterface.kt"); + } + + @Test + @TestMetadata("superPropAccessFromInterface2.kt") + public void testSuperPropAccessFromInterface2() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superPropAccessFromInterface2.kt"); + } + + @Nested + @TestMetadata("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/delegationBy") + @TestDataPath("$PROJECT_ROOT") + public class DelegationBy { + @Test + public void testAllFilesPresentInDelegationBy() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/delegationBy"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true); + } + + @Test + @TestMetadata("simple.kt") + public void testSimple() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/delegationBy/simple.kt"); + } + + @Test + @TestMetadata("simpleProperty.kt") + public void testSimpleProperty() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/delegationBy/simpleProperty.kt"); + } + } + } + + @Nested + @TestMetadata("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/interop") + @TestDataPath("$PROJECT_ROOT") + public class Interop { + @Test + public void testAllFilesPresentInInterop() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/interop"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true); + } + + @Test + @TestMetadata("likeMemberClash.kt") + public void testLikeMemberClash() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/interop/likeMemberClash.kt"); + } + + @Test + @TestMetadata("likeSpecialization.kt") + public void testLikeSpecialization() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/interop/likeSpecialization.kt"); + } + + @Test + @TestMetadata("newAndOldSchemes.kt") + public void testNewAndOldSchemes() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/interop/newAndOldSchemes.kt"); + } + + @Test + @TestMetadata("newAndOldSchemes2.kt") + public void testNewAndOldSchemes2() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/interop/newAndOldSchemes2.kt"); + } + + @Test + @TestMetadata("newAndOldSchemes2Compatibility.kt") + public void testNewAndOldSchemes2Compatibility() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/interop/newAndOldSchemes2Compatibility.kt"); + } + + @Test + @TestMetadata("newAndOldSchemes3.kt") + public void testNewAndOldSchemes3() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/interop/newAndOldSchemes3.kt"); + } + + @Test + @TestMetadata("newSchemeWithJvmDefault.kt") + public void testNewSchemeWithJvmDefault() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/interop/newSchemeWithJvmDefault.kt"); + } + } + } + + @Nested + @TestMetadata("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/jvm8against6") + @TestDataPath("$PROJECT_ROOT") + public class Jvm8against6 { + @Test + public void testAllFilesPresentInJvm8against6() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/jvm8against6"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true); + } + + @Test + @TestMetadata("jdk8Against6.kt") + public void testJdk8Against6() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/jvm8against6/jdk8Against6.kt"); + } + + @Test + @TestMetadata("simpleCall.kt") + public void testSimpleCall() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/jvm8against6/simpleCall.kt"); + } + + @Test + @TestMetadata("simpleCallWithBigHierarchy.kt") + public void testSimpleCallWithBigHierarchy() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/jvm8against6/simpleCallWithBigHierarchy.kt"); + } + + @Test + @TestMetadata("simpleCallWithHierarchy.kt") + public void testSimpleCallWithHierarchy() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/jvm8against6/simpleCallWithHierarchy.kt"); + } + + @Test + @TestMetadata("simpleProp.kt") + public void testSimpleProp() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/jvm8against6/simpleProp.kt"); + } + + @Test + @TestMetadata("simplePropWithHierarchy.kt") + public void testSimplePropWithHierarchy() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/jvm8against6/simplePropWithHierarchy.kt"); + } + + @Nested + @TestMetadata("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/jvm8against6/delegation") + @TestDataPath("$PROJECT_ROOT") + public class Delegation { + @Test + public void testAllFilesPresentInDelegation() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/jvm8against6/delegation"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true); + } + + @Test + @TestMetadata("diamond.kt") + public void testDiamond() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/jvm8against6/delegation/diamond.kt"); + } + + @Test + @TestMetadata("diamond2.kt") + public void testDiamond2() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/jvm8against6/delegation/diamond2.kt"); + } + + @Test + @TestMetadata("diamond3.kt") + public void testDiamond3() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/jvm8against6/delegation/diamond3.kt"); + } + } + } + } + + @Nested + @TestMetadata("compiler/testData/codegen/box/compileKotlinAgainstKotlin/typeAnnotations") + @TestDataPath("$PROJECT_ROOT") + public class TypeAnnotations { + @Test + public void testAllFilesPresentInTypeAnnotations() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/compileKotlinAgainstKotlin/typeAnnotations"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true); + } + + @Test + @TestMetadata("implicitReturn.kt") + public void testImplicitReturn() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/typeAnnotations/implicitReturn.kt"); + } + } +} diff --git a/compiler/tests-gen/org/jetbrains/kotlin/codegen/ir/JvmOldAgainstIrBoxInlineTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/JvmOldAgainstIrBoxInlineTestGenerated.java similarity index 86% rename from compiler/tests-gen/org/jetbrains/kotlin/codegen/ir/JvmOldAgainstIrBoxInlineTestGenerated.java rename to compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/JvmOldAgainstIrBoxInlineTestGenerated.java index f66d8be4f83..d97680edabe 100644 --- a/compiler/tests-gen/org/jetbrains/kotlin/codegen/ir/JvmOldAgainstIrBoxInlineTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/JvmOldAgainstIrBoxInlineTestGenerated.java @@ -3,569 +3,651 @@ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. */ -package org.jetbrains.kotlin.codegen.ir; +package org.jetbrains.kotlin.test.runners.codegen; import com.intellij.testFramework.TestDataPath; -import org.jetbrains.kotlin.test.JUnit3RunnerWithInners; -import org.jetbrains.kotlin.test.KotlinTestUtils; import org.jetbrains.kotlin.test.util.KtTestUtil; import org.jetbrains.kotlin.test.TargetBackend; import org.jetbrains.kotlin.test.TestMetadata; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.Nested; +import org.junit.jupiter.api.Test; import java.io.File; import java.util.regex.Pattern; -/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */ +/** This class is generated by {@link GenerateNewCompilerTests.kt}. DO NOT MODIFY MANUALLY */ @SuppressWarnings("all") @TestMetadata("compiler/testData/codegen/boxInline") @TestDataPath("$PROJECT_ROOT") -@RunWith(JUnit3RunnerWithInners.class) public class JvmOldAgainstIrBoxInlineTestGenerated extends AbstractJvmOldAgainstIrBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + @Test public void testAllFilesPresentInBoxInline() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true); } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/anonymousObject") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class AnonymousObject extends AbstractJvmOldAgainstIrBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class AnonymousObject { + @Test public void testAllFilesPresentInAnonymousObject() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/anonymousObject"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true); } + @Test @TestMetadata("anonymousObjectInDefault.kt") public void testAnonymousObjectInDefault() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectInDefault.kt"); } + @Test @TestMetadata("anonymousObjectOnCallSite.kt") public void testAnonymousObjectOnCallSite() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnCallSite.kt"); } + @Test @TestMetadata("anonymousObjectOnCallSiteSuperParams.kt") public void testAnonymousObjectOnCallSiteSuperParams() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnCallSiteSuperParams.kt"); } + @Test @TestMetadata("anonymousObjectOnDeclarationSite.kt") public void testAnonymousObjectOnDeclarationSite() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnDeclarationSite.kt"); } + @Test @TestMetadata("anonymousObjectOnDeclarationSiteSuperParams.kt") public void testAnonymousObjectOnDeclarationSiteSuperParams() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnDeclarationSiteSuperParams.kt"); } + @Test @TestMetadata("capturedLambdaInInline.kt") public void testCapturedLambdaInInline() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInline.kt"); } + @Test @TestMetadata("capturedLambdaInInline2.kt") public void testCapturedLambdaInInline2() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInline2.kt"); } + @Test @TestMetadata("capturedLambdaInInline3.kt") public void testCapturedLambdaInInline3() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInline3.kt"); } + @Test @TestMetadata("capturedLambdaInInlineObject.kt") public void testCapturedLambdaInInlineObject() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInlineObject.kt"); } + @Test @TestMetadata("capturedLocalFun.kt") public void testCapturedLocalFun() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/capturedLocalFun.kt"); } + @Test @TestMetadata("capturedLocalFunRef.kt") public void testCapturedLocalFunRef() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/capturedLocalFunRef.kt"); } + @Test @TestMetadata("changingReturnType.kt") public void testChangingReturnType() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/changingReturnType.kt"); } + @Test @TestMetadata("constructOriginalInRegenerated.kt") public void testConstructOriginalInRegenerated() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/constructOriginalInRegenerated.kt"); } + @Test @TestMetadata("constructorVisibility.kt") public void testConstructorVisibility() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/constructorVisibility.kt"); } + @Test @TestMetadata("constructorVisibilityInConstLambda.kt") public void testConstructorVisibilityInConstLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/constructorVisibilityInConstLambda.kt"); } + @Test @TestMetadata("constructorVisibilityInLambda.kt") public void testConstructorVisibilityInLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/constructorVisibilityInLambda.kt"); } + @Test @TestMetadata("defineClass.kt") public void testDefineClass() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/defineClass.kt"); } + @Test @TestMetadata("functionExpression.kt") public void testFunctionExpression() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/functionExpression.kt"); } + @Test @TestMetadata("inlineCallInsideInlineLambda.kt") public void testInlineCallInsideInlineLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/inlineCallInsideInlineLambda.kt"); } + @Test @TestMetadata("kt13133.kt") public void testKt13133() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt13133.kt"); } + @Test @TestMetadata("kt13182.kt") public void testKt13182() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt13182.kt"); } + @Test @TestMetadata("kt13374.kt") public void testKt13374() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt13374.kt"); } + @Test @TestMetadata("kt14011.kt") public void testKt14011() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt14011.kt"); } + @Test @TestMetadata("kt14011_2.kt") public void testKt14011_2() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt14011_2.kt"); } + @Test @TestMetadata("kt14011_3.kt") public void testKt14011_3() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt14011_3.kt"); } + @Test @TestMetadata("kt15751.kt") public void testKt15751() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt15751.kt"); } + @Test @TestMetadata("kt16193.kt") public void testKt16193() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt16193.kt"); } + @Test @TestMetadata("kt17972.kt") public void testKt17972() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt17972.kt"); } + @Test @TestMetadata("kt17972_2.kt") public void testKt17972_2() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt17972_2.kt"); } + @Test @TestMetadata("kt17972_3.kt") public void testKt17972_3() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt17972_3.kt"); } + @Test @TestMetadata("kt17972_4.kt") public void testKt17972_4() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt17972_4.kt"); } + @Test @TestMetadata("kt17972_5.kt") public void testKt17972_5() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt17972_5.kt"); } + @Test @TestMetadata("kt17972_super.kt") public void testKt17972_super() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt17972_super.kt"); } + @Test @TestMetadata("kt17972_super2.kt") public void testKt17972_super2() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt17972_super2.kt"); } + @Test @TestMetadata("kt17972_super3.kt") public void testKt17972_super3() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt17972_super3.kt"); } + @Test @TestMetadata("kt19389.kt") public void testKt19389() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt19389.kt"); } + @Test @TestMetadata("kt19399.kt") public void testKt19399() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt19399.kt"); } + @Test @TestMetadata("kt19434.kt") public void testKt19434() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt19434.kt"); } + @Test @TestMetadata("kt19434_2.kt") public void testKt19434_2() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt19434_2.kt"); } + @Test @TestMetadata("kt19723.kt") public void testKt19723() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt19723.kt"); } + @Test + @TestMetadata("kt29595.kt") + public void testKt29595() throws Exception { + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt29595.kt"); + } + + @Test @TestMetadata("kt34656.kt") public void testKt34656() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt34656.kt"); } + @Test @TestMetadata("kt38197.kt") public void testKt38197() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt38197.kt"); } + @Test @TestMetadata("kt42815.kt") public void testKt42815() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt42815.kt"); } + @Test @TestMetadata("kt42815_delegated.kt") public void testKt42815_delegated() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt42815_delegated.kt"); } + @Test + @TestMetadata("kt6007.kt") + public void testKt6007() throws Exception { + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt6007.kt"); + } + + @Test @TestMetadata("kt6552.kt") public void testKt6552() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt6552.kt"); } + @Test @TestMetadata("kt8133.kt") public void testKt8133() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt8133.kt"); } + @Test @TestMetadata("kt9064.kt") public void testKt9064() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt9064.kt"); } + @Test @TestMetadata("kt9064v2.kt") public void testKt9064v2() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt9064v2.kt"); } + @Test @TestMetadata("kt9591.kt") public void testKt9591() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt9591.kt"); } + @Test @TestMetadata("kt9877.kt") public void testKt9877() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt9877.kt"); } + @Test @TestMetadata("kt9877_2.kt") public void testKt9877_2() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt9877_2.kt"); } + @Test @TestMetadata("objectInLambdaCapturesAnotherObject.kt") public void testObjectInLambdaCapturesAnotherObject() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/objectInLambdaCapturesAnotherObject.kt"); } + @Test @TestMetadata("safeCall.kt") public void testSafeCall() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/safeCall.kt"); } + @Test @TestMetadata("safeCall_2.kt") public void testSafeCall_2() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/safeCall_2.kt"); } + @Test @TestMetadata("sam.kt") public void testSam() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/sam.kt"); } + @Test @TestMetadata("sharedFromCrossinline.kt") public void testSharedFromCrossinline() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/sharedFromCrossinline.kt"); } + @Test @TestMetadata("superConstructorWithObjectParameter.kt") public void testSuperConstructorWithObjectParameter() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/superConstructorWithObjectParameter.kt"); } + @Test @TestMetadata("typeInfo.kt") public void testTypeInfo() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/typeInfo.kt"); } + @Test @TestMetadata("withInlineMethod.kt") public void testWithInlineMethod() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/withInlineMethod.kt"); } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/anonymousObject/enumWhen") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class EnumWhen extends AbstractJvmOldAgainstIrBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class EnumWhen { + @Test public void testAllFilesPresentInEnumWhen() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/anonymousObject/enumWhen"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true); } + @Test @TestMetadata("callSite.kt") public void testCallSite() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/enumWhen/callSite.kt"); } + @Test @TestMetadata("declSite.kt") public void testDeclSite() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/enumWhen/declSite.kt"); } + @Test @TestMetadata("declSiteSeveralMappings.kt") public void testDeclSiteSeveralMappings() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/enumWhen/declSiteSeveralMappings.kt"); } + @Test @TestMetadata("declSiteSeveralMappingsDifOrder.kt") public void testDeclSiteSeveralMappingsDifOrder() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/enumWhen/declSiteSeveralMappingsDifOrder.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class ProperRecapturing extends AbstractJvmOldAgainstIrBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class ProperRecapturing { + @Test public void testAllFilesPresentInProperRecapturing() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true); } + @Test @TestMetadata("inlineChain.kt") public void testInlineChain() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/inlineChain.kt"); } + @Test @TestMetadata("lambdaChain.kt") public void testLambdaChain() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChain.kt"); } + @Test @TestMetadata("lambdaChainSimple.kt") public void testLambdaChainSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChainSimple.kt"); } + @Test @TestMetadata("lambdaChain_2.kt") public void testLambdaChain_2() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChain_2.kt"); } + @Test @TestMetadata("lambdaChain_3.kt") public void testLambdaChain_3() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChain_3.kt"); } + @Test @TestMetadata("noInlineLambda.kt") public void testNoInlineLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/noInlineLambda.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class ProperRecapturingInClass extends AbstractJvmOldAgainstIrBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class ProperRecapturingInClass { + @Test public void testAllFilesPresentInProperRecapturingInClass() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true); } + @Test @TestMetadata("inlineChain.kt") public void testInlineChain() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/inlineChain.kt"); } + @Test @TestMetadata("inlinelambdaChain.kt") public void testInlinelambdaChain() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/inlinelambdaChain.kt"); } + @Test @TestMetadata("lambdaChain.kt") public void testLambdaChain() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChain.kt"); } + @Test @TestMetadata("lambdaChainSimple.kt") public void testLambdaChainSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChainSimple.kt"); } + @Test @TestMetadata("lambdaChainSimple_2.kt") public void testLambdaChainSimple_2() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChainSimple_2.kt"); } + @Test @TestMetadata("lambdaChain_2.kt") public void testLambdaChain_2() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChain_2.kt"); } + @Test @TestMetadata("lambdaChain_3.kt") public void testLambdaChain_3() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChain_3.kt"); } + @Test @TestMetadata("noCapturedThisOnCallSite.kt") public void testNoCapturedThisOnCallSite() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/noCapturedThisOnCallSite.kt"); } + @Test @TestMetadata("noInlineLambda.kt") public void testNoInlineLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/noInlineLambda.kt"); } + @Test @TestMetadata("twoInlineLambda.kt") public void testTwoInlineLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/twoInlineLambda.kt"); } + @Test @TestMetadata("twoInlineLambdaComplex.kt") public void testTwoInlineLambdaComplex() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/twoInlineLambdaComplex.kt"); } + @Test @TestMetadata("twoInlineLambdaComplex_2.kt") public void testTwoInlineLambdaComplex_2() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/twoInlineLambdaComplex_2.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/anonymousObject/sam") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Sam extends AbstractJvmOldAgainstIrBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Sam { + @Test public void testAllFilesPresentInSam() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/anonymousObject/sam"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true); } + @Test @TestMetadata("anonymousObjectToSam.kt") public void testAnonymousObjectToSam() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/sam/anonymousObjectToSam.kt"); } + @Test @TestMetadata("kt17091.kt") public void testKt17091() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/sam/kt17091.kt"); } + @Test @TestMetadata("kt21671.kt") public void testKt21671() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/sam/kt21671.kt"); } + @Test @TestMetadata("kt21671_2.kt") public void testKt21671_2() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/sam/kt21671_2.kt"); } + @Test @TestMetadata("kt21671_3.kt") public void testKt21671_3() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/sam/kt21671_3.kt"); } + @Test @TestMetadata("kt22304.kt") public void testKt22304() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/sam/kt22304.kt"); } + @Test @TestMetadata("samOnCallSite.kt") public void testSamOnCallSite() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/sam/samOnCallSite.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class TwoCapturedReceivers extends AbstractJvmOldAgainstIrBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class TwoCapturedReceivers { + @Test public void testAllFilesPresentInTwoCapturedReceivers() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true); } + @Test @TestMetadata("kt8668.kt") public void testKt8668() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668.kt"); } + @Test @TestMetadata("kt8668_2.kt") public void testKt8668_2() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668_2.kt"); } + @Test @TestMetadata("kt8668_3.kt") public void testKt8668_3() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668_3.kt"); } + @Test @TestMetadata("twoDifferentDispatchReceivers.kt") public void testTwoDifferentDispatchReceivers() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/twoDifferentDispatchReceivers.kt"); } + @Test @TestMetadata("twoExtensionReceivers.kt") public void testTwoExtensionReceivers() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/twoExtensionReceivers.kt"); @@ -573,465 +655,525 @@ public class JvmOldAgainstIrBoxInlineTestGenerated extends AbstractJvmOldAgainst } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/argumentOrder") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class ArgumentOrder extends AbstractJvmOldAgainstIrBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class ArgumentOrder { + @Test public void testAllFilesPresentInArgumentOrder() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/argumentOrder"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true); } + @Test @TestMetadata("boundFunctionReference.kt") public void testBoundFunctionReference() throws Exception { runTest("compiler/testData/codegen/boxInline/argumentOrder/boundFunctionReference.kt"); } + @Test @TestMetadata("boundFunctionReference2.kt") public void testBoundFunctionReference2() throws Exception { runTest("compiler/testData/codegen/boxInline/argumentOrder/boundFunctionReference2.kt"); } + @Test @TestMetadata("captured.kt") public void testCaptured() throws Exception { runTest("compiler/testData/codegen/boxInline/argumentOrder/captured.kt"); } + @Test @TestMetadata("capturedInExtension.kt") public void testCapturedInExtension() throws Exception { runTest("compiler/testData/codegen/boxInline/argumentOrder/capturedInExtension.kt"); } + @Test @TestMetadata("defaultParametersAndLastVararg.kt") public void testDefaultParametersAndLastVararg() throws Exception { runTest("compiler/testData/codegen/boxInline/argumentOrder/defaultParametersAndLastVararg.kt"); } + @Test @TestMetadata("defaultParametersAndLastVarargWithCorrectOrder.kt") public void testDefaultParametersAndLastVarargWithCorrectOrder() throws Exception { runTest("compiler/testData/codegen/boxInline/argumentOrder/defaultParametersAndLastVarargWithCorrectOrder.kt"); } + @Test @TestMetadata("extension.kt") public void testExtension() throws Exception { runTest("compiler/testData/codegen/boxInline/argumentOrder/extension.kt"); } + @Test @TestMetadata("extensionInClass.kt") public void testExtensionInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/argumentOrder/extensionInClass.kt"); } + @Test @TestMetadata("lambdaMigration.kt") public void testLambdaMigration() throws Exception { runTest("compiler/testData/codegen/boxInline/argumentOrder/lambdaMigration.kt"); } + @Test @TestMetadata("lambdaMigrationInClass.kt") public void testLambdaMigrationInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/argumentOrder/lambdaMigrationInClass.kt"); } + @Test @TestMetadata("simple.kt") public void testSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/argumentOrder/simple.kt"); } + @Test @TestMetadata("simpleInClass.kt") public void testSimpleInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/argumentOrder/simpleInClass.kt"); } + @Test @TestMetadata("varargAndDefaultParameters.kt") public void testVarargAndDefaultParameters() throws Exception { runTest("compiler/testData/codegen/boxInline/argumentOrder/varargAndDefaultParameters.kt"); } + @Test @TestMetadata("varargAndDefaultParametersWithCorrectOrder.kt") public void testVarargAndDefaultParametersWithCorrectOrder() throws Exception { runTest("compiler/testData/codegen/boxInline/argumentOrder/varargAndDefaultParametersWithCorrectOrder.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/arrayConvention") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class ArrayConvention extends AbstractJvmOldAgainstIrBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class ArrayConvention { + @Test public void testAllFilesPresentInArrayConvention() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/arrayConvention"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true); } + @Test @TestMetadata("simpleAccess.kt") public void testSimpleAccess() throws Exception { runTest("compiler/testData/codegen/boxInline/arrayConvention/simpleAccess.kt"); } + @Test @TestMetadata("simpleAccessInClass.kt") public void testSimpleAccessInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/arrayConvention/simpleAccessInClass.kt"); } + @Test @TestMetadata("simpleAccessWithDefault.kt") public void testSimpleAccessWithDefault() throws Exception { runTest("compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithDefault.kt"); } + @Test @TestMetadata("simpleAccessWithDefaultInClass.kt") public void testSimpleAccessWithDefaultInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithDefaultInClass.kt"); } + @Test @TestMetadata("simpleAccessWithLambda.kt") public void testSimpleAccessWithLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithLambda.kt"); } + @Test @TestMetadata("simpleAccessWithLambdaInClass.kt") public void testSimpleAccessWithLambdaInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithLambdaInClass.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/assert") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Assert extends AbstractJvmOldAgainstIrBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Assert { + @Test public void testAllFilesPresentInAssert() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/assert"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true); } + @Test @TestMetadata("jvmAssertInlineFunctionAssertionsDisabled.kt") public void testJvmAssertInlineFunctionAssertionsDisabled() throws Exception { runTest("compiler/testData/codegen/boxInline/assert/jvmAssertInlineFunctionAssertionsDisabled.kt"); } + @Test @TestMetadata("jvmAssertInlineFunctionAssertionsEnabled.kt") public void testJvmAssertInlineFunctionAssertionsEnabled() throws Exception { runTest("compiler/testData/codegen/boxInline/assert/jvmAssertInlineFunctionAssertionsEnabled.kt"); } + @Test @TestMetadata("jvmAssertInlineLambda.kt") public void testJvmAssertInlineLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/assert/jvmAssertInlineLambda.kt"); } + @Test @TestMetadata("jvmClassInitializer.kt") public void testJvmClassInitializer() throws Exception { runTest("compiler/testData/codegen/boxInline/assert/jvmClassInitializer.kt"); } + @Test @TestMetadata("jvmCompanion.kt") public void testJvmCompanion() throws Exception { runTest("compiler/testData/codegen/boxInline/assert/jvmCompanion.kt"); } + @Test @TestMetadata("jvmCrossinlineLambda.kt") public void testJvmCrossinlineLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/assert/jvmCrossinlineLambda.kt"); } + @Test @TestMetadata("jvmCrossinlineLambda2.kt") public void testJvmCrossinlineLambda2() throws Exception { runTest("compiler/testData/codegen/boxInline/assert/jvmCrossinlineLambda2.kt"); } + @Test @TestMetadata("jvmCrossinlineLambdaDeclarationSite.kt") public void testJvmCrossinlineLambdaDeclarationSite() throws Exception { runTest("compiler/testData/codegen/boxInline/assert/jvmCrossinlineLambdaDeclarationSite.kt"); } + @Test @TestMetadata("jvmCrossinlineLambdaDeclarationSiteOnly.kt") public void testJvmCrossinlineLambdaDeclarationSiteOnly() throws Exception { runTest("compiler/testData/codegen/boxInline/assert/jvmCrossinlineLambdaDeclarationSiteOnly.kt"); } + @Test @TestMetadata("jvmCrossinlineSAMDeclarationSite.kt") public void testJvmCrossinlineSAMDeclarationSite() throws Exception { runTest("compiler/testData/codegen/boxInline/assert/jvmCrossinlineSAMDeclarationSite.kt"); } + @Test @TestMetadata("jvmDoubleInline.kt") public void testJvmDoubleInline() throws Exception { runTest("compiler/testData/codegen/boxInline/assert/jvmDoubleInline.kt"); } + @Test @TestMetadata("jvmInlineUsedAsNoinline.kt") public void testJvmInlineUsedAsNoinline() throws Exception { runTest("compiler/testData/codegen/boxInline/assert/jvmInlineUsedAsNoinline.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/builders") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Builders extends AbstractJvmOldAgainstIrBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Builders { + @Test public void testAllFilesPresentInBuilders() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/builders"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true); } + @Test @TestMetadata("builders.kt") public void testBuilders() throws Exception { runTest("compiler/testData/codegen/boxInline/builders/builders.kt"); } + @Test @TestMetadata("buildersAndLambdaCapturing.kt") public void testBuildersAndLambdaCapturing() throws Exception { runTest("compiler/testData/codegen/boxInline/builders/buildersAndLambdaCapturing.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/bytecodePreprocessing") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class BytecodePreprocessing extends AbstractJvmOldAgainstIrBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class BytecodePreprocessing { + @Test public void testAllFilesPresentInBytecodePreprocessing() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/bytecodePreprocessing"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true); } + @Test @TestMetadata("apiVersionAtLeast1.kt") public void testApiVersionAtLeast1() throws Exception { runTest("compiler/testData/codegen/boxInline/bytecodePreprocessing/apiVersionAtLeast1.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/callableReference") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class CallableReference extends AbstractJvmOldAgainstIrBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class CallableReference { + @Test @TestMetadata("adapted.kt") public void testAdapted() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/adapted.kt"); } + @Test public void testAllFilesPresentInCallableReference() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/callableReference"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true); } + @Test @TestMetadata("classLevel.kt") public void testClassLevel() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/classLevel.kt"); } + @Test @TestMetadata("classLevel2.kt") public void testClassLevel2() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/classLevel2.kt"); } + @Test @TestMetadata("constructor.kt") public void testConstructor() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/constructor.kt"); } + @Test @TestMetadata("innerGenericConstuctor.kt") public void testInnerGenericConstuctor() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/innerGenericConstuctor.kt"); } + @Test @TestMetadata("intrinsic.kt") public void testIntrinsic() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/intrinsic.kt"); } + @Test @TestMetadata("jvmFieldProperty.kt") public void testJvmFieldProperty() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/jvmFieldProperty.kt"); } + @Test @TestMetadata("kt15449.kt") public void testKt15449() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/kt15449.kt"); } + @Test @TestMetadata("kt15751_2.kt") public void testKt15751_2() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/kt15751_2.kt"); } + @Test @TestMetadata("kt16411.kt") public void testKt16411() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/kt16411.kt"); } + @Test @TestMetadata("kt35101.kt") public void testKt35101() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/kt35101.kt"); } + @Test @TestMetadata("propertyIntrinsic.kt") public void testPropertyIntrinsic() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/propertyIntrinsic.kt"); } + @Test @TestMetadata("propertyReference.kt") public void testPropertyReference() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/propertyReference.kt"); } + @Test @TestMetadata("topLevel.kt") public void testTopLevel() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/topLevel.kt"); } + @Test @TestMetadata("topLevelExtension.kt") public void testTopLevelExtension() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/topLevelExtension.kt"); } + @Test @TestMetadata("topLevelProperty.kt") public void testTopLevelProperty() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/topLevelProperty.kt"); } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/callableReference/bound") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Bound extends AbstractJvmOldAgainstIrBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Bound { + @Test public void testAllFilesPresentInBound() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/callableReference/bound"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true); } + @Test @TestMetadata("classProperty.kt") public void testClassProperty() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/classProperty.kt"); } + @Test @TestMetadata("emptyLhsFunction.kt") public void testEmptyLhsFunction() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/emptyLhsFunction.kt"); } + @Test @TestMetadata("emptyLhsOnInlineProperty.kt") public void testEmptyLhsOnInlineProperty() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/emptyLhsOnInlineProperty.kt"); } + @Test @TestMetadata("emptyLhsProperty.kt") public void testEmptyLhsProperty() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/emptyLhsProperty.kt"); } + @Test @TestMetadata("expression.kt") public void testExpression() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/expression.kt"); } + @Test @TestMetadata("extensionReceiver.kt") public void testExtensionReceiver() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/extensionReceiver.kt"); } + @Test @TestMetadata("filter.kt") public void testFilter() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/filter.kt"); } + @Test @TestMetadata("inlineValueParameterInsteadOfReceiver.kt") public void testInlineValueParameterInsteadOfReceiver() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/inlineValueParameterInsteadOfReceiver.kt"); } + @Test @TestMetadata("innerGenericConstuctor.kt") public void testInnerGenericConstuctor() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/innerGenericConstuctor.kt"); } + @Test @TestMetadata("intrinsic.kt") public void testIntrinsic() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/intrinsic.kt"); } + @Test @TestMetadata("jvmFieldProperty.kt") public void testJvmFieldProperty() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/jvmFieldProperty.kt"); } + @Test @TestMetadata("kt18728.kt") public void testKt18728() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/kt18728.kt"); } + @Test @TestMetadata("kt18728_2.kt") public void testKt18728_2() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/kt18728_2.kt"); } + @Test @TestMetadata("kt18728_3.kt") public void testKt18728_3() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/kt18728_3.kt"); } + @Test @TestMetadata("kt18728_4.kt") public void testKt18728_4() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/kt18728_4.kt"); } + @Test + @TestMetadata("lambdaOnLhs.kt") + public void testLambdaOnLhs() throws Exception { + runTest("compiler/testData/codegen/boxInline/callableReference/bound/lambdaOnLhs.kt"); + } + + @Test @TestMetadata("map.kt") public void testMap() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/map.kt"); } + @Test @TestMetadata("mixed.kt") public void testMixed() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/mixed.kt"); } + @Test @TestMetadata("objectProperty.kt") public void testObjectProperty() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/objectProperty.kt"); } + @Test @TestMetadata("propertyImportedFromObject.kt") public void testPropertyImportedFromObject() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/propertyImportedFromObject.kt"); } + @Test @TestMetadata("sideEffect.kt") public void testSideEffect() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/sideEffect.kt"); } + @Test @TestMetadata("simple.kt") public void testSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/simple.kt"); } + @Test @TestMetadata("simpleVal.kt") public void testSimpleVal() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/simpleVal.kt"); } + @Test @TestMetadata("simpleVal2.kt") public void testSimpleVal2() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/simpleVal2.kt"); } + @Test @TestMetadata("topLevelExtensionProperty.kt") public void testTopLevelExtensionProperty() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/topLevelExtensionProperty.kt"); @@ -1039,649 +1181,740 @@ public class JvmOldAgainstIrBoxInlineTestGenerated extends AbstractJvmOldAgainst } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/capture") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Capture extends AbstractJvmOldAgainstIrBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Capture { + @Test public void testAllFilesPresentInCapture() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/capture"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true); } + @Test @TestMetadata("captureInlinable.kt") public void testCaptureInlinable() throws Exception { runTest("compiler/testData/codegen/boxInline/capture/captureInlinable.kt"); } + @Test @TestMetadata("captureInlinableAndOther.kt") public void testCaptureInlinableAndOther() throws Exception { runTest("compiler/testData/codegen/boxInline/capture/captureInlinableAndOther.kt"); } + @Test @TestMetadata("captureThisAndReceiver.kt") public void testCaptureThisAndReceiver() throws Exception { runTest("compiler/testData/codegen/boxInline/capture/captureThisAndReceiver.kt"); } + @Test @TestMetadata("generics.kt") public void testGenerics() throws Exception { runTest("compiler/testData/codegen/boxInline/capture/generics.kt"); } + @Test @TestMetadata("simpleCapturingInClass.kt") public void testSimpleCapturingInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/capture/simpleCapturingInClass.kt"); } + @Test @TestMetadata("simpleCapturingInPackage.kt") public void testSimpleCapturingInPackage() throws Exception { runTest("compiler/testData/codegen/boxInline/capture/simpleCapturingInPackage.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/complex") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Complex extends AbstractJvmOldAgainstIrBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Complex { + @Test public void testAllFilesPresentInComplex() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/complex"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true); } + @Test @TestMetadata("closureChain.kt") public void testClosureChain() throws Exception { runTest("compiler/testData/codegen/boxInline/complex/closureChain.kt"); } + @Test @TestMetadata("forEachLine.kt") public void testForEachLine() throws Exception { runTest("compiler/testData/codegen/boxInline/complex/forEachLine.kt"); } + @Test @TestMetadata("kt44429.kt") public void testKt44429() throws Exception { runTest("compiler/testData/codegen/boxInline/complex/kt44429.kt"); } + @Test @TestMetadata("lambdaInLambda.kt") public void testLambdaInLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/complex/lambdaInLambda.kt"); } + @Test @TestMetadata("swapAndWith.kt") public void testSwapAndWith() throws Exception { runTest("compiler/testData/codegen/boxInline/complex/swapAndWith.kt"); } + @Test @TestMetadata("swapAndWith2.kt") public void testSwapAndWith2() throws Exception { runTest("compiler/testData/codegen/boxInline/complex/swapAndWith2.kt"); } + @Test @TestMetadata("use.kt") public void testUse() throws Exception { runTest("compiler/testData/codegen/boxInline/complex/use.kt"); } + @Test @TestMetadata("with.kt") public void testWith() throws Exception { runTest("compiler/testData/codegen/boxInline/complex/with.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/complexStack") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class ComplexStack extends AbstractJvmOldAgainstIrBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class ComplexStack { + @Test public void testAllFilesPresentInComplexStack() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/complexStack"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true); } + @Test @TestMetadata("asCheck.kt") public void testAsCheck() throws Exception { runTest("compiler/testData/codegen/boxInline/complexStack/asCheck.kt"); } + @Test @TestMetadata("asCheck2.kt") public void testAsCheck2() throws Exception { runTest("compiler/testData/codegen/boxInline/complexStack/asCheck2.kt"); } + @Test @TestMetadata("breakContinueInInlineLambdaArgument.kt") public void testBreakContinueInInlineLambdaArgument() throws Exception { runTest("compiler/testData/codegen/boxInline/complexStack/breakContinueInInlineLambdaArgument.kt"); } + @Test @TestMetadata("simple.kt") public void testSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/complexStack/simple.kt"); } + @Test @TestMetadata("simple2.kt") public void testSimple2() throws Exception { runTest("compiler/testData/codegen/boxInline/complexStack/simple2.kt"); } + @Test @TestMetadata("simple3.kt") public void testSimple3() throws Exception { runTest("compiler/testData/codegen/boxInline/complexStack/simple3.kt"); } + @Test @TestMetadata("simple4.kt") public void testSimple4() throws Exception { runTest("compiler/testData/codegen/boxInline/complexStack/simple4.kt"); } + @Test @TestMetadata("simpleExtension.kt") public void testSimpleExtension() throws Exception { runTest("compiler/testData/codegen/boxInline/complexStack/simpleExtension.kt"); } + @Test @TestMetadata("spillConstructorArgumentsAndInlineLambdaParameter.kt") public void testSpillConstructorArgumentsAndInlineLambdaParameter() throws Exception { runTest("compiler/testData/codegen/boxInline/complexStack/spillConstructorArgumentsAndInlineLambdaParameter.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/contracts") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Contracts extends AbstractJvmOldAgainstIrBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Contracts { + @Test public void testAllFilesPresentInContracts() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/contracts"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true); } + @Test @TestMetadata("cfgDependendValInitialization.kt") public void testCfgDependendValInitialization() throws Exception { runTest("compiler/testData/codegen/boxInline/contracts/cfgDependendValInitialization.kt"); } + @Test @TestMetadata("complexInitializer.kt") public void testComplexInitializer() throws Exception { runTest("compiler/testData/codegen/boxInline/contracts/complexInitializer.kt"); } + @Test @TestMetadata("complexInitializerWithStackTransformation.kt") public void testComplexInitializerWithStackTransformation() throws Exception { runTest("compiler/testData/codegen/boxInline/contracts/complexInitializerWithStackTransformation.kt"); } + @Test @TestMetadata("crossinlineCallableReference.kt") public void testCrossinlineCallableReference() throws Exception { runTest("compiler/testData/codegen/boxInline/contracts/crossinlineCallableReference.kt"); } + @Test @TestMetadata("definiteLongValInitialization.kt") public void testDefiniteLongValInitialization() throws Exception { runTest("compiler/testData/codegen/boxInline/contracts/definiteLongValInitialization.kt"); } + @Test @TestMetadata("definiteNestedValInitialization.kt") public void testDefiniteNestedValInitialization() throws Exception { runTest("compiler/testData/codegen/boxInline/contracts/definiteNestedValInitialization.kt"); } + @Test @TestMetadata("definiteValInitInInitializer.kt") public void testDefiniteValInitInInitializer() throws Exception { runTest("compiler/testData/codegen/boxInline/contracts/definiteValInitInInitializer.kt"); } + @Test @TestMetadata("definiteValInitialization.kt") public void testDefiniteValInitialization() throws Exception { runTest("compiler/testData/codegen/boxInline/contracts/definiteValInitialization.kt"); } + @Test @TestMetadata("exactlyOnceCrossinline.kt") public void testExactlyOnceCrossinline() throws Exception { runTest("compiler/testData/codegen/boxInline/contracts/exactlyOnceCrossinline.kt"); } + @Test @TestMetadata("exactlyOnceCrossinline2.kt") public void testExactlyOnceCrossinline2() throws Exception { runTest("compiler/testData/codegen/boxInline/contracts/exactlyOnceCrossinline2.kt"); } + @Test @TestMetadata("exactlyOnceNoinline.kt") public void testExactlyOnceNoinline() throws Exception { runTest("compiler/testData/codegen/boxInline/contracts/exactlyOnceNoinline.kt"); } + @Test @TestMetadata("nonLocalReturn.kt") public void testNonLocalReturn() throws Exception { runTest("compiler/testData/codegen/boxInline/contracts/nonLocalReturn.kt"); } + @Test @TestMetadata("nonLocalReturnWithCycle.kt") public void testNonLocalReturnWithCycle() throws Exception { runTest("compiler/testData/codegen/boxInline/contracts/nonLocalReturnWithCycle.kt"); } + @Test @TestMetadata("propertyInitialization.kt") public void testPropertyInitialization() throws Exception { runTest("compiler/testData/codegen/boxInline/contracts/propertyInitialization.kt"); } + @Test @TestMetadata("valInitializationAndUsageInNestedLambda.kt") public void testValInitializationAndUsageInNestedLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/contracts/valInitializationAndUsageInNestedLambda.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/defaultValues") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class DefaultValues extends AbstractJvmOldAgainstIrBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class DefaultValues { + @Test @TestMetadata("33Parameters.kt") public void test33Parameters() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/33Parameters.kt"); } + @Test @TestMetadata("33ParametersInConstructor.kt") public void test33ParametersInConstructor() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/33ParametersInConstructor.kt"); } + @Test public void testAllFilesPresentInDefaultValues() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/defaultValues"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true); } + @Test @TestMetadata("defaultInExtension.kt") public void testDefaultInExtension() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/defaultInExtension.kt"); } + @Test @TestMetadata("defaultMethod.kt") public void testDefaultMethod() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/defaultMethod.kt"); } + @Test @TestMetadata("defaultMethodInClass.kt") public void testDefaultMethodInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/defaultMethodInClass.kt"); } + @Test @TestMetadata("defaultParamRemapping.kt") public void testDefaultParamRemapping() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/defaultParamRemapping.kt"); } + @Test @TestMetadata("inlineInDefaultParameter.kt") public void testInlineInDefaultParameter() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/inlineInDefaultParameter.kt"); } + @Test @TestMetadata("inlineLambdaInNoInlineDefault.kt") public void testInlineLambdaInNoInlineDefault() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/inlineLambdaInNoInlineDefault.kt"); } + @Test @TestMetadata("kt11479.kt") public void testKt11479() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/kt11479.kt"); } + @Test @TestMetadata("kt11479InlinedDefaultParameter.kt") public void testKt11479InlinedDefaultParameter() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/kt11479InlinedDefaultParameter.kt"); } + @Test @TestMetadata("kt14564.kt") public void testKt14564() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/kt14564.kt"); } + @Test @TestMetadata("kt14564_2.kt") public void testKt14564_2() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/kt14564_2.kt"); } + @Test @TestMetadata("kt16496.kt") public void testKt16496() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/kt16496.kt"); } + @Test @TestMetadata("kt18689.kt") public void testKt18689() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/kt18689.kt"); } + @Test @TestMetadata("kt18689_2.kt") public void testKt18689_2() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/kt18689_2.kt"); } + @Test @TestMetadata("kt18689_3.kt") public void testKt18689_3() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/kt18689_3.kt"); } + @Test @TestMetadata("kt18689_4.kt") public void testKt18689_4() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/kt18689_4.kt"); } + @Test @TestMetadata("kt5685.kt") public void testKt5685() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/kt5685.kt"); } + @Test @TestMetadata("simpleDefaultMethod.kt") public void testSimpleDefaultMethod() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/simpleDefaultMethod.kt"); } + @Test @TestMetadata("varArgNoInline.kt") public void testVarArgNoInline() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/varArgNoInline.kt"); } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class LambdaInlining extends AbstractJvmOldAgainstIrBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class LambdaInlining { + @Test public void testAllFilesPresentInLambdaInlining() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true); } + @Test @TestMetadata("checkLambdaClassIsPresent.kt") public void testCheckLambdaClassIsPresent() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/checkLambdaClassIsPresent.kt"); } + @Test @TestMetadata("checkLambdaClassesArePresent.kt") public void testCheckLambdaClassesArePresent() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/checkLambdaClassesArePresent.kt"); } + @Test @TestMetadata("checkObjectClassIsPresent.kt") public void testCheckObjectClassIsPresent() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/checkObjectClassIsPresent.kt"); } + @Test @TestMetadata("checkStaticLambdaClassIsPresent.kt") public void testCheckStaticLambdaClassIsPresent() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/checkStaticLambdaClassIsPresent.kt"); } + @Test @TestMetadata("checkStaticLambdaClassesArePresent.kt") public void testCheckStaticLambdaClassesArePresent() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/checkStaticLambdaClassesArePresent.kt"); } + @Test @TestMetadata("checkStaticObjectClassIsPresent.kt") public void testCheckStaticObjectClassIsPresent() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/checkStaticObjectClassIsPresent.kt"); } + @Test @TestMetadata("defaultCallInDefaultLambda.kt") public void testDefaultCallInDefaultLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/defaultCallInDefaultLambda.kt"); } + @Test @TestMetadata("defaultLambdaInNoInline.kt") public void testDefaultLambdaInNoInline() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/defaultLambdaInNoInline.kt"); } + @Test @TestMetadata("differentInvokeSignature.kt") public void testDifferentInvokeSignature() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/differentInvokeSignature.kt"); } + @Test @TestMetadata("genericLambda.kt") public void testGenericLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/genericLambda.kt"); } + @Test @TestMetadata("instanceCapturedInClass.kt") public void testInstanceCapturedInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/instanceCapturedInClass.kt"); } + @Test @TestMetadata("instanceCapturedInInterface.kt") public void testInstanceCapturedInInterface() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/instanceCapturedInInterface.kt"); } + @Test @TestMetadata("jvmStaticDefault.kt") public void testJvmStaticDefault() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/jvmStaticDefault.kt"); } + @Test @TestMetadata("kt21827.kt") public void testKt21827() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/kt21827.kt"); } + @Test @TestMetadata("kt21946.kt") public void testKt21946() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/kt21946.kt"); } + @Test @TestMetadata("kt24477.kt") public void testKt24477() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/kt24477.kt"); } + @Test @TestMetadata("kt25106.kt") public void testKt25106() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/kt25106.kt"); } + @Test @TestMetadata("kt26636.kt") public void testKt26636() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/kt26636.kt"); } + @Test @TestMetadata("noInline.kt") public void testNoInline() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/noInline.kt"); } + @Test @TestMetadata("nonDefaultInlineInNoInline.kt") public void testNonDefaultInlineInNoInline() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/nonDefaultInlineInNoInline.kt"); } + @Test @TestMetadata("receiverClash.kt") public void testReceiverClash() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/receiverClash.kt"); } + @Test @TestMetadata("receiverClash2.kt") public void testReceiverClash2() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/receiverClash2.kt"); } + @Test @TestMetadata("receiverClashInClass.kt") public void testReceiverClashInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/receiverClashInClass.kt"); } + @Test @TestMetadata("receiverClashInClass2.kt") public void testReceiverClashInClass2() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/receiverClashInClass2.kt"); } + @Test @TestMetadata("simple.kt") public void testSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simple.kt"); } + @Test @TestMetadata("simpleErased.kt") public void testSimpleErased() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simpleErased.kt"); } + @Test @TestMetadata("simpleErasedStaticInstance.kt") public void testSimpleErasedStaticInstance() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simpleErasedStaticInstance.kt"); } + @Test @TestMetadata("simpleExtension.kt") public void testSimpleExtension() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simpleExtension.kt"); } + @Test @TestMetadata("simpleGeneric.kt") public void testSimpleGeneric() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simpleGeneric.kt"); } + @Test @TestMetadata("simpleStaticInstance.kt") public void testSimpleStaticInstance() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simpleStaticInstance.kt"); } + @Test @TestMetadata("thisClash.kt") public void testThisClash() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/thisClash.kt"); } + @Test @TestMetadata("thisClashInClass.kt") public void testThisClashInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/thisClashInClass.kt"); } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class CallableReferences extends AbstractJvmOldAgainstIrBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class CallableReferences { + @Test public void testAllFilesPresentInCallableReferences() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true); } + @Test @TestMetadata("boundFunctionReference.kt") public void testBoundFunctionReference() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundFunctionReference.kt"); } + @Test @TestMetadata("boundFunctionReferenceOnInt.kt") public void testBoundFunctionReferenceOnInt() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundFunctionReferenceOnInt.kt"); } + @Test @TestMetadata("boundFunctionReferenceOnLong.kt") public void testBoundFunctionReferenceOnLong() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundFunctionReferenceOnLong.kt"); } + @Test @TestMetadata("boundPropertyReference.kt") public void testBoundPropertyReference() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundPropertyReference.kt"); } + @Test @TestMetadata("boundPropertyReferenceOnInt.kt") public void testBoundPropertyReferenceOnInt() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundPropertyReferenceOnInt.kt"); } + @Test @TestMetadata("boundPropertyReferenceOnLong.kt") public void testBoundPropertyReferenceOnLong() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundPropertyReferenceOnLong.kt"); } + @Test @TestMetadata("constuctorReference.kt") public void testConstuctorReference() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/constuctorReference.kt"); } + @Test @TestMetadata("differentInvokeSignature.kt") public void testDifferentInvokeSignature() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/differentInvokeSignature.kt"); } + @Test @TestMetadata("differentInvokeSignature2.kt") public void testDifferentInvokeSignature2() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/differentInvokeSignature2.kt"); } + @Test @TestMetadata("functionImportedFromObject.kt") public void testFunctionImportedFromObject() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/functionImportedFromObject.kt"); } + @Test @TestMetadata("functionReference.kt") public void testFunctionReference() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/functionReference.kt"); } + @Test @TestMetadata("functionReferenceFromClass.kt") public void testFunctionReferenceFromClass() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/functionReferenceFromClass.kt"); } + @Test @TestMetadata("functionReferenceFromObject.kt") public void testFunctionReferenceFromObject() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/functionReferenceFromObject.kt"); } + @Test @TestMetadata("innerClassConstuctorReference.kt") public void testInnerClassConstuctorReference() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/innerClassConstuctorReference.kt"); } + @Test @TestMetadata("mutableBoundPropertyReferenceFromClass.kt") public void testMutableBoundPropertyReferenceFromClass() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/mutableBoundPropertyReferenceFromClass.kt"); } + @Test @TestMetadata("mutablePropertyReferenceFromClass.kt") public void testMutablePropertyReferenceFromClass() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/mutablePropertyReferenceFromClass.kt"); } + @Test @TestMetadata("privateFunctionReference.kt") public void testPrivateFunctionReference() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/privateFunctionReference.kt"); } + @Test @TestMetadata("privatePropertyReference.kt") public void testPrivatePropertyReference() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/privatePropertyReference.kt"); } + @Test @TestMetadata("propertyImportedFromObject.kt") public void testPropertyImportedFromObject() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/propertyImportedFromObject.kt"); } + @Test @TestMetadata("propertyReference.kt") public void testPropertyReference() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/propertyReference.kt"); } + @Test @TestMetadata("propertyReferenceFromClass.kt") public void testPropertyReferenceFromClass() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/propertyReferenceFromClass.kt"); } + @Test @TestMetadata("propertyReferenceFromObject.kt") public void testPropertyReferenceFromObject() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/propertyReferenceFromObject.kt"); @@ -1689,48 +1922,52 @@ public class JvmOldAgainstIrBoxInlineTestGenerated extends AbstractJvmOldAgainst } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/defaultValues/maskElimination") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class MaskElimination extends AbstractJvmOldAgainstIrBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class MaskElimination { + @Test @TestMetadata("32Parameters.kt") public void test32Parameters() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/maskElimination/32Parameters.kt"); } + @Test @TestMetadata("33Parameters.kt") public void test33Parameters() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/maskElimination/33Parameters.kt"); } + @Test public void testAllFilesPresentInMaskElimination() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/defaultValues/maskElimination"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true); } + @Test @TestMetadata("kt18792.kt") public void testKt18792() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/maskElimination/kt18792.kt"); } + @Test @TestMetadata("kt19679.kt") public void testKt19679() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/maskElimination/kt19679.kt"); } + @Test @TestMetadata("kt19679_2.kt") public void testKt19679_2() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/maskElimination/kt19679_2.kt"); } + @Test @TestMetadata("kt19679_3.kt") public void testKt19679_3() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/maskElimination/kt19679_3.kt"); } + @Test @TestMetadata("simple.kt") public void testSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/defaultValues/maskElimination/simple.kt"); @@ -1738,375 +1975,400 @@ public class JvmOldAgainstIrBoxInlineTestGenerated extends AbstractJvmOldAgainst } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/delegatedProperty") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class DelegatedProperty extends AbstractJvmOldAgainstIrBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class DelegatedProperty { + @Test public void testAllFilesPresentInDelegatedProperty() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/delegatedProperty"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true); } + @Test @TestMetadata("kt16864.kt") public void testKt16864() throws Exception { runTest("compiler/testData/codegen/boxInline/delegatedProperty/kt16864.kt"); } + @Test @TestMetadata("local.kt") public void testLocal() throws Exception { runTest("compiler/testData/codegen/boxInline/delegatedProperty/local.kt"); } + @Test @TestMetadata("localDeclaredInLambda.kt") public void testLocalDeclaredInLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/delegatedProperty/localDeclaredInLambda.kt"); } + @Test @TestMetadata("localInAnonymousObject.kt") public void testLocalInAnonymousObject() throws Exception { runTest("compiler/testData/codegen/boxInline/delegatedProperty/localInAnonymousObject.kt"); } + @Test @TestMetadata("localInLambda.kt") public void testLocalInLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/delegatedProperty/localInLambda.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/enclosingInfo") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class EnclosingInfo extends AbstractJvmOldAgainstIrBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class EnclosingInfo { + @Test public void testAllFilesPresentInEnclosingInfo() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/enclosingInfo"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true); } + @Test @TestMetadata("anonymousInLambda.kt") public void testAnonymousInLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/enclosingInfo/anonymousInLambda.kt"); } + @Test @TestMetadata("inlineChain.kt") public void testInlineChain() throws Exception { runTest("compiler/testData/codegen/boxInline/enclosingInfo/inlineChain.kt"); } + @Test @TestMetadata("inlineChain2.kt") public void testInlineChain2() throws Exception { runTest("compiler/testData/codegen/boxInline/enclosingInfo/inlineChain2.kt"); } + @Test @TestMetadata("objectInInlineFun.kt") public void testObjectInInlineFun() throws Exception { runTest("compiler/testData/codegen/boxInline/enclosingInfo/objectInInlineFun.kt"); } + @Test @TestMetadata("transformedConstructor.kt") public void testTransformedConstructor() throws Exception { runTest("compiler/testData/codegen/boxInline/enclosingInfo/transformedConstructor.kt"); } + @Test @TestMetadata("transformedConstructorWithAdditionalObject.kt") public void testTransformedConstructorWithAdditionalObject() throws Exception { runTest("compiler/testData/codegen/boxInline/enclosingInfo/transformedConstructorWithAdditionalObject.kt"); } + @Test @TestMetadata("transformedConstructorWithNestedInline.kt") public void testTransformedConstructorWithNestedInline() throws Exception { runTest("compiler/testData/codegen/boxInline/enclosingInfo/transformedConstructorWithNestedInline.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/enum") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Enum extends AbstractJvmOldAgainstIrBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Enum { + @Test public void testAllFilesPresentInEnum() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/enum"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true); } + @Test @TestMetadata("kt10569.kt") public void testKt10569() throws Exception { runTest("compiler/testData/codegen/boxInline/enum/kt10569.kt"); } + @Test @TestMetadata("kt18254.kt") public void testKt18254() throws Exception { runTest("compiler/testData/codegen/boxInline/enum/kt18254.kt"); } + @Test @TestMetadata("valueOf.kt") public void testValueOf() throws Exception { runTest("compiler/testData/codegen/boxInline/enum/valueOf.kt"); } + @Test @TestMetadata("valueOfCapturedType.kt") public void testValueOfCapturedType() throws Exception { runTest("compiler/testData/codegen/boxInline/enum/valueOfCapturedType.kt"); } + @Test @TestMetadata("valueOfChain.kt") public void testValueOfChain() throws Exception { runTest("compiler/testData/codegen/boxInline/enum/valueOfChain.kt"); } + @Test @TestMetadata("valueOfChainCapturedType.kt") public void testValueOfChainCapturedType() throws Exception { runTest("compiler/testData/codegen/boxInline/enum/valueOfChainCapturedType.kt"); } + @Test @TestMetadata("valueOfNonReified.kt") public void testValueOfNonReified() throws Exception { runTest("compiler/testData/codegen/boxInline/enum/valueOfNonReified.kt"); } + @Test @TestMetadata("values.kt") public void testValues() throws Exception { runTest("compiler/testData/codegen/boxInline/enum/values.kt"); } + @Test @TestMetadata("valuesAsArray.kt") public void testValuesAsArray() throws Exception { runTest("compiler/testData/codegen/boxInline/enum/valuesAsArray.kt"); } + @Test @TestMetadata("valuesCapturedType.kt") public void testValuesCapturedType() throws Exception { runTest("compiler/testData/codegen/boxInline/enum/valuesCapturedType.kt"); } + @Test @TestMetadata("valuesChain.kt") public void testValuesChain() throws Exception { runTest("compiler/testData/codegen/boxInline/enum/valuesChain.kt"); } + @Test @TestMetadata("valuesChainCapturedType.kt") public void testValuesChainCapturedType() throws Exception { runTest("compiler/testData/codegen/boxInline/enum/valuesChainCapturedType.kt"); } + @Test @TestMetadata("valuesNonReified.kt") public void testValuesNonReified() throws Exception { runTest("compiler/testData/codegen/boxInline/enum/valuesNonReified.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/functionExpression") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class FunctionExpression extends AbstractJvmOldAgainstIrBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class FunctionExpression { + @Test public void testAllFilesPresentInFunctionExpression() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/functionExpression"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true); } + @Test @TestMetadata("extension.kt") public void testExtension() throws Exception { runTest("compiler/testData/codegen/boxInline/functionExpression/extension.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/inlineClasses") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class InlineClasses extends AbstractJvmOldAgainstIrBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class InlineClasses { + @Test public void testAllFilesPresentInInlineClasses() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/inlineClasses"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true); } + @Test @TestMetadata("inlineClassWithInlineValReturningInlineClass.kt") public void testInlineClassWithInlineValReturningInlineClass() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/inlineClassWithInlineValReturningInlineClass.kt"); } + @Test @TestMetadata("inlineFunctionInsideInlineClassesBox.kt") public void testInlineFunctionInsideInlineClassesBox() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/inlineFunctionInsideInlineClassesBox.kt"); } + @Test @TestMetadata("noReturnTypeManglingFun.kt") public void testNoReturnTypeManglingFun() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/noReturnTypeManglingFun.kt"); } + @Test @TestMetadata("noReturnTypeManglingFunJvmName.kt") public void testNoReturnTypeManglingFunJvmName() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/noReturnTypeManglingFunJvmName.kt"); } + @Test @TestMetadata("noReturnTypeManglingVal.kt") public void testNoReturnTypeManglingVal() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/noReturnTypeManglingVal.kt"); } + @Test @TestMetadata("withReturnTypeManglingFun.kt") public void testWithReturnTypeManglingFun() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/withReturnTypeManglingFun.kt"); } + @Test @TestMetadata("withReturnTypeManglingFunJvmName.kt") public void testWithReturnTypeManglingFunJvmName() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/withReturnTypeManglingFunJvmName.kt"); } + @Test @TestMetadata("withReturnTypeManglingVal.kt") public void testWithReturnTypeManglingVal() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/withReturnTypeManglingVal.kt"); } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class UnboxGenericParameter extends AbstractJvmOldAgainstIrBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class UnboxGenericParameter { + @Test public void testAllFilesPresentInUnboxGenericParameter() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true); } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class FunInterface extends AbstractJvmOldAgainstIrBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class FunInterface { + @Test public void testAllFilesPresentInFunInterface() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true); } + @Test @TestMetadata("any.kt") public void testAny() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/any.kt"); } + @Test @TestMetadata("anyN.kt") public void testAnyN() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/anyN.kt"); } + @Test @TestMetadata("iface.kt") public void testIface() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/iface.kt"); } + @Test @TestMetadata("ifaceChild.kt") public void testIfaceChild() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/ifaceChild.kt"); } + @Test @TestMetadata("primitive.kt") public void testPrimitive() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/primitive.kt"); } + @Test @TestMetadata("string.kt") public void testString() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/funInterface/string.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Lambda extends AbstractJvmOldAgainstIrBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Lambda { + @Test public void testAllFilesPresentInLambda() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true); } + @Test @TestMetadata("any.kt") public void testAny() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/any.kt"); } + @Test @TestMetadata("anyN.kt") public void testAnyN() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/anyN.kt"); } + @Test @TestMetadata("iface.kt") public void testIface() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/iface.kt"); } + @Test @TestMetadata("ifaceChild.kt") public void testIfaceChild() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/ifaceChild.kt"); } + @Test @TestMetadata("primitive.kt") public void testPrimitive() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/primitive.kt"); } + @Test @TestMetadata("string.kt") public void testString() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/lambda/string.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class ObjectLiteral extends AbstractJvmOldAgainstIrBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class ObjectLiteral { + @Test public void testAllFilesPresentInObjectLiteral() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true); } + @Test @TestMetadata("any.kt") public void testAny() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/any.kt"); } + @Test @TestMetadata("anyN.kt") public void testAnyN() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/anyN.kt"); } + @Test @TestMetadata("iface.kt") public void testIface() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/iface.kt"); } + @Test @TestMetadata("ifaceChild.kt") public void testIfaceChild() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/ifaceChild.kt"); } + @Test @TestMetadata("primitive.kt") public void testPrimitive() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/primitive.kt"); } + @Test @TestMetadata("string.kt") public void testString() throws Exception { runTest("compiler/testData/codegen/boxInline/inlineClasses/unboxGenericParameter/objectLiteral/string.kt"); @@ -2115,239 +2377,309 @@ public class JvmOldAgainstIrBoxInlineTestGenerated extends AbstractJvmOldAgainst } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/innerClasses") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class InnerClasses extends AbstractJvmOldAgainstIrBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class InnerClasses { + @Test public void testAllFilesPresentInInnerClasses() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/innerClasses"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true); } + @Test @TestMetadata("captureThisAndOuter.kt") public void testCaptureThisAndOuter() throws Exception { runTest("compiler/testData/codegen/boxInline/innerClasses/captureThisAndOuter.kt"); } + @Test @TestMetadata("innerLambda.kt") public void testInnerLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/innerClasses/innerLambda.kt"); } + @Test @TestMetadata("kt10259.kt") public void testKt10259() throws Exception { runTest("compiler/testData/codegen/boxInline/innerClasses/kt10259.kt"); } } - @TestMetadata("compiler/testData/codegen/boxInline/jvmName") + @Nested + @TestMetadata("compiler/testData/codegen/boxInline/invokedynamic") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class JvmName extends AbstractJvmOldAgainstIrBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); + public class Invokedynamic { + @Test + public void testAllFilesPresentInInvokedynamic() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/invokedynamic"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true); } + @Nested + @TestMetadata("compiler/testData/codegen/boxInline/invokedynamic/lambdas") + @TestDataPath("$PROJECT_ROOT") + public class Lambdas { + @Test + public void testAllFilesPresentInLambdas() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/invokedynamic/lambdas"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true); + } + + @Test + @TestMetadata("crossinlineLambda1.kt") + public void testCrossinlineLambda1() throws Exception { + runTest("compiler/testData/codegen/boxInline/invokedynamic/lambdas/crossinlineLambda1.kt"); + } + + @Test + @TestMetadata("crossinlineLambda2.kt") + public void testCrossinlineLambda2() throws Exception { + runTest("compiler/testData/codegen/boxInline/invokedynamic/lambdas/crossinlineLambda2.kt"); + } + + @Test + @TestMetadata("inlineFunInDifferentPackage.kt") + public void testInlineFunInDifferentPackage() throws Exception { + runTest("compiler/testData/codegen/boxInline/invokedynamic/lambdas/inlineFunInDifferentPackage.kt"); + } + + @Test + @TestMetadata("inlineLambda1.kt") + public void testInlineLambda1() throws Exception { + runTest("compiler/testData/codegen/boxInline/invokedynamic/lambdas/inlineLambda1.kt"); + } + } + + @Nested + @TestMetadata("compiler/testData/codegen/boxInline/invokedynamic/sam") + @TestDataPath("$PROJECT_ROOT") + public class Sam { + @Test + public void testAllFilesPresentInSam() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/invokedynamic/sam"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true); + } + + @Test + @TestMetadata("crossinlineLambda1.kt") + public void testCrossinlineLambda1() throws Exception { + runTest("compiler/testData/codegen/boxInline/invokedynamic/sam/crossinlineLambda1.kt"); + } + + @Test + @TestMetadata("crossinlineLambda2.kt") + public void testCrossinlineLambda2() throws Exception { + runTest("compiler/testData/codegen/boxInline/invokedynamic/sam/crossinlineLambda2.kt"); + } + + @Test + @TestMetadata("inlineFunInDifferentPackage.kt") + public void testInlineFunInDifferentPackage() throws Exception { + runTest("compiler/testData/codegen/boxInline/invokedynamic/sam/inlineFunInDifferentPackage.kt"); + } + + @Test + @TestMetadata("inlineLambda1.kt") + public void testInlineLambda1() throws Exception { + runTest("compiler/testData/codegen/boxInline/invokedynamic/sam/inlineLambda1.kt"); + } + } + } + + @Nested + @TestMetadata("compiler/testData/codegen/boxInline/jvmName") + @TestDataPath("$PROJECT_ROOT") + public class JvmName { + @Test public void testAllFilesPresentInJvmName() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/jvmName"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true); } + @Test @TestMetadata("simple.kt") public void testSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/jvmName/simple.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/jvmPackageName") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class JvmPackageName extends AbstractJvmOldAgainstIrBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class JvmPackageName { + @Test public void testAllFilesPresentInJvmPackageName() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/jvmPackageName"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true); } + @Test @TestMetadata("simple.kt") public void testSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/jvmPackageName/simple.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/lambdaClassClash") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class LambdaClassClash extends AbstractJvmOldAgainstIrBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class LambdaClassClash { + @Test public void testAllFilesPresentInLambdaClassClash() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/lambdaClassClash"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true); } + @Test @TestMetadata("lambdaClassClash.kt") public void testLambdaClassClash() throws Exception { runTest("compiler/testData/codegen/boxInline/lambdaClassClash/lambdaClassClash.kt"); } + @Test @TestMetadata("noInlineLambdaX2.kt") public void testNoInlineLambdaX2() throws Exception { runTest("compiler/testData/codegen/boxInline/lambdaClassClash/noInlineLambdaX2.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/lambdaTransformation") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class LambdaTransformation extends AbstractJvmOldAgainstIrBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class LambdaTransformation { + @Test public void testAllFilesPresentInLambdaTransformation() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/lambdaTransformation"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true); } + @Test @TestMetadata("lambdaCloning.kt") public void testLambdaCloning() throws Exception { runTest("compiler/testData/codegen/boxInline/lambdaTransformation/lambdaCloning.kt"); } + @Test @TestMetadata("lambdaInLambda2.kt") public void testLambdaInLambda2() throws Exception { runTest("compiler/testData/codegen/boxInline/lambdaTransformation/lambdaInLambda2.kt"); } + @Test @TestMetadata("lambdaInLambdaNoInline.kt") public void testLambdaInLambdaNoInline() throws Exception { runTest("compiler/testData/codegen/boxInline/lambdaTransformation/lambdaInLambdaNoInline.kt"); } + @Test @TestMetadata("regeneratedLambdaName.kt") public void testRegeneratedLambdaName() throws Exception { runTest("compiler/testData/codegen/boxInline/lambdaTransformation/regeneratedLambdaName.kt"); } + @Test @TestMetadata("regeneratedLambdaName2.kt") public void testRegeneratedLambdaName2() throws Exception { runTest("compiler/testData/codegen/boxInline/lambdaTransformation/regeneratedLambdaName2.kt"); } + @Test @TestMetadata("sameCaptured.kt") public void testSameCaptured() throws Exception { runTest("compiler/testData/codegen/boxInline/lambdaTransformation/sameCaptured.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/localFunInLambda") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class LocalFunInLambda extends AbstractJvmOldAgainstIrBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class LocalFunInLambda { + @Test public void testAllFilesPresentInLocalFunInLambda() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/localFunInLambda"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true); } + @Test @TestMetadata("defaultParam.kt") public void testDefaultParam() throws Exception { runTest("compiler/testData/codegen/boxInline/localFunInLambda/defaultParam.kt"); } + @Test @TestMetadata("lambdaInLambdaCapturesAnotherFun.kt") public void testLambdaInLambdaCapturesAnotherFun() throws Exception { runTest("compiler/testData/codegen/boxInline/localFunInLambda/lambdaInLambdaCapturesAnotherFun.kt"); } + @Test @TestMetadata("localFunInLambda.kt") public void testLocalFunInLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/localFunInLambda/localFunInLambda.kt"); } + @Test @TestMetadata("localFunInLambdaCapturesAnotherFun.kt") public void testLocalFunInLambdaCapturesAnotherFun() throws Exception { runTest("compiler/testData/codegen/boxInline/localFunInLambda/localFunInLambdaCapturesAnotherFun.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/multiModule") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class MultiModule extends AbstractJvmOldAgainstIrBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class MultiModule { + @Test public void testAllFilesPresentInMultiModule() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/multiModule"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true); } + @Test @TestMetadata("tryCatchWithRecursiveInline.kt") public void testTryCatchWithRecursiveInline() throws Exception { runTest("compiler/testData/codegen/boxInline/multiModule/tryCatchWithRecursiveInline.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/multifileClasses") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class MultifileClasses extends AbstractJvmOldAgainstIrBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class MultifileClasses { + @Test public void testAllFilesPresentInMultifileClasses() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/multifileClasses"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true); } + @Test @TestMetadata("defaultArguments.kt") public void testDefaultArguments() throws Exception { runTest("compiler/testData/codegen/boxInline/multifileClasses/defaultArguments.kt"); } + @Test @TestMetadata("inlineFromOptimizedMultifileClass.kt") public void testInlineFromOptimizedMultifileClass() throws Exception { runTest("compiler/testData/codegen/boxInline/multifileClasses/inlineFromOptimizedMultifileClass.kt"); } + @Test @TestMetadata("inlineFromOtherPackage.kt") public void testInlineFromOtherPackage() throws Exception { runTest("compiler/testData/codegen/boxInline/multifileClasses/inlineFromOtherPackage.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/multiplatform") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Multiplatform extends AbstractJvmOldAgainstIrBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Multiplatform { + @Test public void testAllFilesPresentInMultiplatform() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/multiplatform"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true); } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/multiplatform/defaultArguments") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class DefaultArguments extends AbstractJvmOldAgainstIrBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class DefaultArguments { + @Test public void testAllFilesPresentInDefaultArguments() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/multiplatform/defaultArguments"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true); } + @Test @TestMetadata("receiversAndParametersInLambda.kt") public void testReceiversAndParametersInLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/multiplatform/defaultArguments/receiversAndParametersInLambda.kt"); @@ -2355,535 +2687,640 @@ public class JvmOldAgainstIrBoxInlineTestGenerated extends AbstractJvmOldAgainst } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/noInline") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class NoInline extends AbstractJvmOldAgainstIrBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class NoInline { + @Test public void testAllFilesPresentInNoInline() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/noInline"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true); } + @Test @TestMetadata("extensionReceiver.kt") public void testExtensionReceiver() throws Exception { runTest("compiler/testData/codegen/boxInline/noInline/extensionReceiver.kt"); } + @Test @TestMetadata("lambdaAsGeneric.kt") public void testLambdaAsGeneric() throws Exception { runTest("compiler/testData/codegen/boxInline/noInline/lambdaAsGeneric.kt"); } + @Test @TestMetadata("lambdaAsNonFunction.kt") public void testLambdaAsNonFunction() throws Exception { runTest("compiler/testData/codegen/boxInline/noInline/lambdaAsNonFunction.kt"); } + @Test @TestMetadata("noInline.kt") public void testNoInline() throws Exception { runTest("compiler/testData/codegen/boxInline/noInline/noInline.kt"); } + @Test @TestMetadata("noInlineLambdaChain.kt") public void testNoInlineLambdaChain() throws Exception { runTest("compiler/testData/codegen/boxInline/noInline/noInlineLambdaChain.kt"); } + @Test @TestMetadata("noInlineLambdaChainWithCapturedInline.kt") public void testNoInlineLambdaChainWithCapturedInline() throws Exception { runTest("compiler/testData/codegen/boxInline/noInline/noInlineLambdaChainWithCapturedInline.kt"); } + @Test @TestMetadata("withoutInline.kt") public void testWithoutInline() throws Exception { runTest("compiler/testData/codegen/boxInline/noInline/withoutInline.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/nonLocalReturns") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class NonLocalReturns extends AbstractJvmOldAgainstIrBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class NonLocalReturns { + @Test public void testAllFilesPresentInNonLocalReturns() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true); } + @Test @TestMetadata("explicitLocalReturn.kt") public void testExplicitLocalReturn() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/explicitLocalReturn.kt"); } + @Test + @TestMetadata("fromArrayGenerator.kt") + public void testFromArrayGenerator() throws Exception { + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/fromArrayGenerator.kt"); + } + + @Test + @TestMetadata("fromArrayGeneratorCatch.kt") + public void testFromArrayGeneratorCatch() throws Exception { + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/fromArrayGeneratorCatch.kt"); + } + + @Test + @TestMetadata("fromArrayGeneratorNested.kt") + public void testFromArrayGeneratorNested() throws Exception { + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/fromArrayGeneratorNested.kt"); + } + + @Test + @TestMetadata("fromArrayGeneratorWithCapture.kt") + public void testFromArrayGeneratorWithCapture() throws Exception { + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/fromArrayGeneratorWithCapture.kt"); + } + + @Test + @TestMetadata("fromArrayGeneratorWithCatch.kt") + public void testFromArrayGeneratorWithCatch() throws Exception { + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/fromArrayGeneratorWithCatch.kt"); + } + + @Test + @TestMetadata("fromArrayGeneratorWithFinally.kt") + public void testFromArrayGeneratorWithFinally() throws Exception { + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/fromArrayGeneratorWithFinally.kt"); + } + + @Test + @TestMetadata("fromArrayGeneratorWithFinallyX2.kt") + public void testFromArrayGeneratorWithFinallyX2() throws Exception { + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/fromArrayGeneratorWithFinallyX2.kt"); + } + + @Test + @TestMetadata("fromArrayGeneratorWithFinallyX2_2.kt") + public void testFromArrayGeneratorWithFinallyX2_2() throws Exception { + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/fromArrayGeneratorWithFinallyX2_2.kt"); + } + + @Test @TestMetadata("fromInterfaceDefaultGetter.kt") public void testFromInterfaceDefaultGetter() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/fromInterfaceDefaultGetter.kt"); } + @Test @TestMetadata("justReturnInLambda.kt") public void testJustReturnInLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/justReturnInLambda.kt"); } + @Test @TestMetadata("kt5199.kt") public void testKt5199() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/kt5199.kt"); } + @Test @TestMetadata("kt8948.kt") public void testKt8948() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/kt8948.kt"); } + @Test @TestMetadata("kt8948v2.kt") public void testKt8948v2() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/kt8948v2.kt"); } + @Test @TestMetadata("nestedNonLocals.kt") public void testNestedNonLocals() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/nestedNonLocals.kt"); } + @Test @TestMetadata("noInlineLocalReturn.kt") public void testNoInlineLocalReturn() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/noInlineLocalReturn.kt"); } + @Test @TestMetadata("nonLocalReturnFromOuterLambda.kt") public void testNonLocalReturnFromOuterLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/nonLocalReturnFromOuterLambda.kt"); } + @Test @TestMetadata("propertyAccessors.kt") public void testPropertyAccessors() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/propertyAccessors.kt"); } + @Test @TestMetadata("returnFromFunctionExpr.kt") public void testReturnFromFunctionExpr() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/returnFromFunctionExpr.kt"); } + @Test @TestMetadata("simple.kt") public void testSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/simple.kt"); } + @Test @TestMetadata("simpleFunctional.kt") public void testSimpleFunctional() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/simpleFunctional.kt"); } + @Test @TestMetadata("simpleVoid.kt") public void testSimpleVoid() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/simpleVoid.kt"); } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/deparenthesize") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Deparenthesize extends AbstractJvmOldAgainstIrBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Deparenthesize { + @Test public void testAllFilesPresentInDeparenthesize() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/deparenthesize"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true); } + @Test @TestMetadata("bracket.kt") public void testBracket() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/deparenthesize/bracket.kt"); } + @Test @TestMetadata("labeled.kt") public void testLabeled() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/deparenthesize/labeled.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class TryFinally extends AbstractJvmOldAgainstIrBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class TryFinally { + @Test public void testAllFilesPresentInTryFinally() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true); } + @Test @TestMetadata("kt16417.kt") public void testKt16417() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt16417.kt"); } + @Test @TestMetadata("kt20433.kt") public void testKt20433() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt20433.kt"); } + @Test @TestMetadata("kt20433_2.kt") public void testKt20433_2() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt20433_2.kt"); } + @Test @TestMetadata("kt20433_2_void.kt") public void testKt20433_2_void() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt20433_2_void.kt"); } + @Test @TestMetadata("kt20433_void.kt") public void testKt20433_void() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt20433_void.kt"); } + @Test @TestMetadata("kt26384.kt") public void testKt26384() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt26384.kt"); } + @Test @TestMetadata("kt26384_2.kt") public void testKt26384_2() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt26384_2.kt"); } + @Test @TestMetadata("kt28546.kt") public void testKt28546() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt28546.kt"); } + @Test @TestMetadata("kt6956.kt") public void testKt6956() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt6956.kt"); } + @Test @TestMetadata("kt7273.kt") public void testKt7273() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt7273.kt"); } + @Test @TestMetadata("nonLocalReturnFromCatchBlock.kt") public void testNonLocalReturnFromCatchBlock() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/nonLocalReturnFromCatchBlock.kt"); } + @Test @TestMetadata("nonLocalReturnFromOuterLambda.kt") public void testNonLocalReturnFromOuterLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/nonLocalReturnFromOuterLambda.kt"); } + @Test @TestMetadata("nonLocalReturnToCatchBlock.kt") public void testNonLocalReturnToCatchBlock() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/nonLocalReturnToCatchBlock.kt"); } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class CallSite extends AbstractJvmOldAgainstIrBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class CallSite { + @Test public void testAllFilesPresentInCallSite() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true); } + @Test @TestMetadata("callSite.kt") public void testCallSite() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/callSite.kt"); } + @Test @TestMetadata("callSiteComplex.kt") public void testCallSiteComplex() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/callSiteComplex.kt"); } + @Test @TestMetadata("exceptionTableSplit.kt") public void testExceptionTableSplit() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/exceptionTableSplit.kt"); } + @Test @TestMetadata("exceptionTableSplitNoReturn.kt") public void testExceptionTableSplitNoReturn() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/exceptionTableSplitNoReturn.kt"); } + @Test @TestMetadata("finallyInFinally.kt") public void testFinallyInFinally() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/finallyInFinally.kt"); } + @Test @TestMetadata("wrongVarInterval.kt") public void testWrongVarInterval() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/wrongVarInterval.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Chained extends AbstractJvmOldAgainstIrBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Chained { + @Test public void testAllFilesPresentInChained() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true); } + @Test @TestMetadata("finallyInFinally.kt") public void testFinallyInFinally() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/finallyInFinally.kt"); } + @Test @TestMetadata("finallyInFinally2.kt") public void testFinallyInFinally2() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/finallyInFinally2.kt"); } + @Test @TestMetadata("intReturn.kt") public void testIntReturn() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturn.kt"); } + @Test @TestMetadata("intReturnComplex.kt") public void testIntReturnComplex() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex.kt"); } + @Test @TestMetadata("intReturnComplex2.kt") public void testIntReturnComplex2() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex2.kt"); } + @Test @TestMetadata("intReturnComplex3.kt") public void testIntReturnComplex3() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex3.kt"); } + @Test @TestMetadata("intReturnComplex4.kt") public void testIntReturnComplex4() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex4.kt"); } + @Test @TestMetadata("nestedLambda.kt") public void testNestedLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/nestedLambda.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class DeclSite extends AbstractJvmOldAgainstIrBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class DeclSite { + @Test public void testAllFilesPresentInDeclSite() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true); } + @Test @TestMetadata("complex.kt") public void testComplex() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/complex.kt"); } + @Test @TestMetadata("intReturn.kt") public void testIntReturn() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/intReturn.kt"); } + @Test @TestMetadata("intReturnComplex.kt") public void testIntReturnComplex() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/intReturnComplex.kt"); } + @Test @TestMetadata("longReturn.kt") public void testLongReturn() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/longReturn.kt"); } + @Test @TestMetadata("nested.kt") public void testNested() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/nested.kt"); } + @Test @TestMetadata("returnInFinally.kt") public void testReturnInFinally() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/returnInFinally.kt"); } + @Test @TestMetadata("returnInTry.kt") public void testReturnInTry() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/returnInTry.kt"); } + @Test @TestMetadata("returnInTryAndFinally.kt") public void testReturnInTryAndFinally() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/returnInTryAndFinally.kt"); } + @Test @TestMetadata("severalInTry.kt") public void testSeveralInTry() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/severalInTry.kt"); } + @Test @TestMetadata("severalInTryComplex.kt") public void testSeveralInTryComplex() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/severalInTryComplex.kt"); } + @Test @TestMetadata("voidInlineFun.kt") public void testVoidInlineFun() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/voidInlineFun.kt"); } + @Test @TestMetadata("voidNonLocal.kt") public void testVoidNonLocal() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/voidNonLocal.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class ExceptionTable extends AbstractJvmOldAgainstIrBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class ExceptionTable { + @Test public void testAllFilesPresentInExceptionTable() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true); } + @Test @TestMetadata("break.kt") public void testBreak() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/break.kt"); } + @Test @TestMetadata("continue.kt") public void testContinue() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/continue.kt"); } + @Test @TestMetadata("exceptionInFinally.kt") public void testExceptionInFinally() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/exceptionInFinally.kt"); } + @Test @TestMetadata("forInFinally.kt") public void testForInFinally() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/forInFinally.kt"); } + @Test @TestMetadata("innerAndExternal.kt") public void testInnerAndExternal() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/innerAndExternal.kt"); } + @Test @TestMetadata("innerAndExternalNested.kt") public void testInnerAndExternalNested() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/innerAndExternalNested.kt"); } + @Test @TestMetadata("innerAndExternalSimple.kt") public void testInnerAndExternalSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/innerAndExternalSimple.kt"); } + @Test @TestMetadata("kt31653.kt") public void testKt31653() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/kt31653.kt"); } + @Test @TestMetadata("kt31653_2.kt") public void testKt31653_2() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/kt31653_2.kt"); } + @Test @TestMetadata("kt31923.kt") public void testKt31923() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/kt31923.kt"); } + @Test @TestMetadata("kt31923_2.kt") public void testKt31923_2() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/kt31923_2.kt"); } + @Test @TestMetadata("kt31923_wrong.kt") public void testKt31923_wrong() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/kt31923_wrong.kt"); } + @Test @TestMetadata("nested.kt") public void testNested() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/nested.kt"); } + @Test @TestMetadata("nestedWithReturns.kt") public void testNestedWithReturns() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/nestedWithReturns.kt"); } + @Test @TestMetadata("nestedWithReturnsSimple.kt") public void testNestedWithReturnsSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/nestedWithReturnsSimple.kt"); } + @Test @TestMetadata("noFinally.kt") public void testNoFinally() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/noFinally.kt"); } + @Test @TestMetadata("severalCatchClause.kt") public void testSeveralCatchClause() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/severalCatchClause.kt"); } + @Test @TestMetadata("simpleThrow.kt") public void testSimpleThrow() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/simpleThrow.kt"); } + @Test @TestMetadata("synchonized.kt") public void testSynchonized() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/synchonized.kt"); } + @Test @TestMetadata("throwInFinally.kt") public void testThrowInFinally() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/throwInFinally.kt"); } + @Test @TestMetadata("tryCatchInFinally.kt") public void testTryCatchInFinally() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/tryCatchInFinally.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/variables") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Variables extends AbstractJvmOldAgainstIrBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Variables { + @Test public void testAllFilesPresentInVariables() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/variables"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true); } + @Test @TestMetadata("kt7792.kt") public void testKt7792() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/variables/kt7792.kt"); @@ -2892,430 +3329,501 @@ public class JvmOldAgainstIrBoxInlineTestGenerated extends AbstractJvmOldAgainst } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/optimizations") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Optimizations extends AbstractJvmOldAgainstIrBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Optimizations { + @Test public void testAllFilesPresentInOptimizations() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/optimizations"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true); } + @Test @TestMetadata("kt20844.kt") public void testKt20844() throws Exception { runTest("compiler/testData/codegen/boxInline/optimizations/kt20844.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/private") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Private extends AbstractJvmOldAgainstIrBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Private { + @Test @TestMetadata("accessorForConst.kt") public void testAccessorForConst() throws Exception { runTest("compiler/testData/codegen/boxInline/private/accessorForConst.kt"); } + @Test @TestMetadata("accessorStability.kt") public void testAccessorStability() throws Exception { runTest("compiler/testData/codegen/boxInline/private/accessorStability.kt"); } + @Test @TestMetadata("accessorStabilityInClass.kt") public void testAccessorStabilityInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/private/accessorStabilityInClass.kt"); } + @Test public void testAllFilesPresentInPrivate() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/private"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true); } + @Test @TestMetadata("effectivePrivate.kt") public void testEffectivePrivate() throws Exception { runTest("compiler/testData/codegen/boxInline/private/effectivePrivate.kt"); } + @Test @TestMetadata("kt6453.kt") public void testKt6453() throws Exception { runTest("compiler/testData/codegen/boxInline/private/kt6453.kt"); } + @Test @TestMetadata("kt8094.kt") public void testKt8094() throws Exception { runTest("compiler/testData/codegen/boxInline/private/kt8094.kt"); } + @Test @TestMetadata("kt8095.kt") public void testKt8095() throws Exception { runTest("compiler/testData/codegen/boxInline/private/kt8095.kt"); } + @Test @TestMetadata("nestedInPrivateClass.kt") public void testNestedInPrivateClass() throws Exception { runTest("compiler/testData/codegen/boxInline/private/nestedInPrivateClass.kt"); } + @Test @TestMetadata("privateClass.kt") public void testPrivateClass() throws Exception { runTest("compiler/testData/codegen/boxInline/private/privateClass.kt"); } + @Test @TestMetadata("privateClassExtensionLambda.kt") public void testPrivateClassExtensionLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/private/privateClassExtensionLambda.kt"); } + @Test @TestMetadata("privateInInlineInMultiFileFacade.kt") public void testPrivateInInlineInMultiFileFacade() throws Exception { runTest("compiler/testData/codegen/boxInline/private/privateInInlineInMultiFileFacade.kt"); } + @Test @TestMetadata("privateInline.kt") public void testPrivateInline() throws Exception { runTest("compiler/testData/codegen/boxInline/private/privateInline.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/property") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Property extends AbstractJvmOldAgainstIrBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Property { + @Test public void testAllFilesPresentInProperty() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/property"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true); } + @Test @TestMetadata("augAssignmentAndInc.kt") public void testAugAssignmentAndInc() throws Exception { runTest("compiler/testData/codegen/boxInline/property/augAssignmentAndInc.kt"); } + @Test @TestMetadata("augAssignmentAndIncInClass.kt") public void testAugAssignmentAndIncInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/property/augAssignmentAndIncInClass.kt"); } + @Test @TestMetadata("augAssignmentAndIncInClassViaConvention.kt") public void testAugAssignmentAndIncInClassViaConvention() throws Exception { runTest("compiler/testData/codegen/boxInline/property/augAssignmentAndIncInClassViaConvention.kt"); } + @Test @TestMetadata("augAssignmentAndIncOnExtension.kt") public void testAugAssignmentAndIncOnExtension() throws Exception { runTest("compiler/testData/codegen/boxInline/property/augAssignmentAndIncOnExtension.kt"); } + @Test @TestMetadata("augAssignmentAndIncOnExtensionInClass.kt") public void testAugAssignmentAndIncOnExtensionInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/property/augAssignmentAndIncOnExtensionInClass.kt"); } + @Test @TestMetadata("augAssignmentAndIncViaConvention.kt") public void testAugAssignmentAndIncViaConvention() throws Exception { runTest("compiler/testData/codegen/boxInline/property/augAssignmentAndIncViaConvention.kt"); } + @Test @TestMetadata("fromObject.kt") public void testFromObject() throws Exception { runTest("compiler/testData/codegen/boxInline/property/fromObject.kt"); } + @Test @TestMetadata("kt22649.kt") public void testKt22649() throws Exception { runTest("compiler/testData/codegen/boxInline/property/kt22649.kt"); } + @Test @TestMetadata("property.kt") public void testProperty() throws Exception { runTest("compiler/testData/codegen/boxInline/property/property.kt"); } + @Test @TestMetadata("reifiedVal.kt") public void testReifiedVal() throws Exception { runTest("compiler/testData/codegen/boxInline/property/reifiedVal.kt"); } + @Test @TestMetadata("reifiedVar.kt") public void testReifiedVar() throws Exception { runTest("compiler/testData/codegen/boxInline/property/reifiedVar.kt"); } + @Test @TestMetadata("simple.kt") public void testSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/property/simple.kt"); } + @Test @TestMetadata("simpleExtension.kt") public void testSimpleExtension() throws Exception { runTest("compiler/testData/codegen/boxInline/property/simpleExtension.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/reified") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Reified extends AbstractJvmOldAgainstIrBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Reified { + @Test public void testAllFilesPresentInReified() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/reified"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true); } + @Test @TestMetadata("arrayConstructor.kt") public void testArrayConstructor() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/arrayConstructor.kt"); } + @Test @TestMetadata("arrayOf.kt") public void testArrayOf() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/arrayOf.kt"); } + @Test @TestMetadata("capturedLambda.kt") public void testCapturedLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/capturedLambda.kt"); } + @Test @TestMetadata("capturedLambda2.kt") public void testCapturedLambda2() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/capturedLambda2.kt"); } + @Test @TestMetadata("dontSubstituteNonReified.kt") public void testDontSubstituteNonReified() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/dontSubstituteNonReified.kt"); } + @Test @TestMetadata("kt11081.kt") public void testKt11081() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/kt11081.kt"); } + @Test @TestMetadata("kt11677.kt") public void testKt11677() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/kt11677.kt"); } + @Test @TestMetadata("kt15956.kt") public void testKt15956() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/kt15956.kt"); } + @Test @TestMetadata("kt15997.kt") public void testKt15997() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/kt15997.kt"); } + @Test @TestMetadata("kt15997_2.kt") public void testKt15997_2() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/kt15997_2.kt"); } + @Test @TestMetadata("kt18977.kt") public void testKt18977() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/kt18977.kt"); } + @Test + @TestMetadata("kt35511.kt") + public void testKt35511() throws Exception { + runTest("compiler/testData/codegen/boxInline/reified/kt35511.kt"); + } + + @Test + @TestMetadata("kt35511_try.kt") + public void testKt35511_try() throws Exception { + runTest("compiler/testData/codegen/boxInline/reified/kt35511_try.kt"); + } + + @Test + @TestMetadata("kt35511_try_valueOf.kt") + public void testKt35511_try_valueOf() throws Exception { + runTest("compiler/testData/codegen/boxInline/reified/kt35511_try_valueOf.kt"); + } + + @Test + @TestMetadata("kt35511_try_values.kt") + public void testKt35511_try_values() throws Exception { + runTest("compiler/testData/codegen/boxInline/reified/kt35511_try_values.kt"); + } + + @Test @TestMetadata("kt6988.kt") public void testKt6988() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/kt6988.kt"); } + @Test @TestMetadata("kt6988_2.kt") public void testKt6988_2() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/kt6988_2.kt"); } + @Test @TestMetadata("kt6990.kt") public void testKt6990() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/kt6990.kt"); } + @Test @TestMetadata("kt7017.kt") public void testKt7017() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/kt7017.kt"); } + @Test @TestMetadata("kt8047.kt") public void testKt8047() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/kt8047.kt"); } + @Test @TestMetadata("kt8047_2.kt") public void testKt8047_2() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/kt8047_2.kt"); } + @Test @TestMetadata("kt9637.kt") public void testKt9637() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/kt9637.kt"); } + @Test @TestMetadata("kt9637_2.kt") public void testKt9637_2() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/kt9637_2.kt"); } + @Test @TestMetadata("nonCapturingObjectInLambda.kt") public void testNonCapturingObjectInLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/nonCapturingObjectInLambda.kt"); } + @Test @TestMetadata("packages.kt") public void testPackages() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/packages.kt"); } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/reified/checkCast") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class CheckCast extends AbstractJvmOldAgainstIrBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class CheckCast { + @Test public void testAllFilesPresentInCheckCast() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/reified/checkCast"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true); } + @Test @TestMetadata("chain.kt") public void testChain() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/checkCast/chain.kt"); } + @Test @TestMetadata("kt26435.kt") public void testKt26435() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/checkCast/kt26435.kt"); } + @Test @TestMetadata("kt26435_2.kt") public void testKt26435_2() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/checkCast/kt26435_2.kt"); } + @Test @TestMetadata("kt26435_3.kt") public void testKt26435_3() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/checkCast/kt26435_3.kt"); } + @Test @TestMetadata("kt8043.kt") public void testKt8043() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/checkCast/kt8043.kt"); } + @Test @TestMetadata("maxStack.kt") public void testMaxStack() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/checkCast/maxStack.kt"); } + @Test @TestMetadata("nullable.kt") public void testNullable() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/checkCast/nullable.kt"); } + @Test @TestMetadata("simple.kt") public void testSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/checkCast/simple.kt"); } + @Test @TestMetadata("simpleSafe.kt") public void testSimpleSafe() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/checkCast/simpleSafe.kt"); } + @Test @TestMetadata("simple_1_3.kt") public void testSimple_1_3() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/checkCast/simple_1_3.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/reified/defaultLambda") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class DefaultLambda extends AbstractJvmOldAgainstIrBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class DefaultLambda { + @Test public void testAllFilesPresentInDefaultLambda() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/reified/defaultLambda"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true); } + @Test @TestMetadata("chain.kt") public void testChain() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/defaultLambda/chain.kt"); } + @Test @TestMetadata("nested.kt") public void testNested() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/defaultLambda/nested.kt"); } + @Test @TestMetadata("nested2.kt") public void testNested2() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/defaultLambda/nested2.kt"); } + @Test @TestMetadata("nested2Static.kt") public void testNested2Static() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/defaultLambda/nested2Static.kt"); } + @Test @TestMetadata("nestedStatic.kt") public void testNestedStatic() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/defaultLambda/nestedStatic.kt"); } + @Test @TestMetadata("simple.kt") public void testSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/defaultLambda/simple.kt"); } + @Test @TestMetadata("transitiveChain.kt") public void testTransitiveChain() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/defaultLambda/transitiveChain.kt"); } + @Test @TestMetadata("transitiveChainStatic.kt") public void testTransitiveChainStatic() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/defaultLambda/transitiveChainStatic.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/reified/isCheck") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class IsCheck extends AbstractJvmOldAgainstIrBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class IsCheck { + @Test public void testAllFilesPresentInIsCheck() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/reified/isCheck"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true); } + @Test @TestMetadata("chain.kt") public void testChain() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/isCheck/chain.kt"); } + @Test @TestMetadata("nullable.kt") public void testNullable() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/isCheck/nullable.kt"); } + @Test @TestMetadata("simple.kt") public void testSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/isCheck/simple.kt"); @@ -3323,518 +3831,577 @@ public class JvmOldAgainstIrBoxInlineTestGenerated extends AbstractJvmOldAgainst } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/signature") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Signature extends AbstractJvmOldAgainstIrBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Signature { + @Test public void testAllFilesPresentInSignature() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/signature"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true); } + @Test @TestMetadata("inProjectionSubstitution.kt") public void testInProjectionSubstitution() throws Exception { runTest("compiler/testData/codegen/boxInline/signature/inProjectionSubstitution.kt"); } + @Test @TestMetadata("outProjectionSubstitution.kt") public void testOutProjectionSubstitution() throws Exception { runTest("compiler/testData/codegen/boxInline/signature/outProjectionSubstitution.kt"); } + @Test @TestMetadata("recursion.kt") public void testRecursion() throws Exception { runTest("compiler/testData/codegen/boxInline/signature/recursion.kt"); } + @Test @TestMetadata("sameFormalParameterName.kt") public void testSameFormalParameterName() throws Exception { runTest("compiler/testData/codegen/boxInline/signature/sameFormalParameterName.kt"); } + @Test @TestMetadata("sameReifiedFormalParameterName.kt") public void testSameReifiedFormalParameterName() throws Exception { runTest("compiler/testData/codegen/boxInline/signature/sameReifiedFormalParameterName.kt"); } + @Test @TestMetadata("starProjectionSubstitution.kt") public void testStarProjectionSubstitution() throws Exception { runTest("compiler/testData/codegen/boxInline/signature/starProjectionSubstitution.kt"); } + @Test @TestMetadata("typeParameterInLambda.kt") public void testTypeParameterInLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/signature/typeParameterInLambda.kt"); } + @Test @TestMetadata("typeParametersSubstitution.kt") public void testTypeParametersSubstitution() throws Exception { runTest("compiler/testData/codegen/boxInline/signature/typeParametersSubstitution.kt"); } + @Test @TestMetadata("typeParametersSubstitution2.kt") public void testTypeParametersSubstitution2() throws Exception { runTest("compiler/testData/codegen/boxInline/signature/typeParametersSubstitution2.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/simple") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Simple extends AbstractJvmOldAgainstIrBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Simple { + @Test public void testAllFilesPresentInSimple() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/simple"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true); } + @Test @TestMetadata("captureAndArgumentIncompatibleTypes.kt") public void testCaptureAndArgumentIncompatibleTypes() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/captureAndArgumentIncompatibleTypes.kt"); } + @Test @TestMetadata("classObject.kt") public void testClassObject() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/classObject.kt"); } + @Test @TestMetadata("destructuring.kt") public void testDestructuring() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/destructuring.kt"); } + @Test @TestMetadata("destructuringIndexClash.kt") public void testDestructuringIndexClash() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/destructuringIndexClash.kt"); } + @Test @TestMetadata("extension.kt") public void testExtension() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/extension.kt"); } + @Test @TestMetadata("extensionLambda.kt") public void testExtensionLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/extensionLambda.kt"); } + @Test @TestMetadata("funImportedFromObject.kt") public void testFunImportedFromObject() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/funImportedFromObject.kt"); } + @Test @TestMetadata("inlineCallInInlineLambda.kt") public void testInlineCallInInlineLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/inlineCallInInlineLambda.kt"); } + @Test @TestMetadata("kt17431.kt") public void testKt17431() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/kt17431.kt"); } + @Test @TestMetadata("kt28547.kt") public void testKt28547() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/kt28547.kt"); } + @Test @TestMetadata("kt28547_2.kt") public void testKt28547_2() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/kt28547_2.kt"); } + @Test @TestMetadata("params.kt") public void testParams() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/params.kt"); } + @Test @TestMetadata("propImportedFromObject.kt") public void testPropImportedFromObject() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/propImportedFromObject.kt"); } + @Test @TestMetadata("rootConstructor.kt") public void testRootConstructor() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/rootConstructor.kt"); } + @Test @TestMetadata("safeCall.kt") public void testSafeCall() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/safeCall.kt"); } + @Test @TestMetadata("severalClosures.kt") public void testSeveralClosures() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/severalClosures.kt"); } + @Test @TestMetadata("severalUsage.kt") public void testSeveralUsage() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/severalUsage.kt"); } + @Test @TestMetadata("simpleDouble.kt") public void testSimpleDouble() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/simpleDouble.kt"); } + @Test @TestMetadata("simpleEnum.kt") public void testSimpleEnum() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/simpleEnum.kt"); } + @Test @TestMetadata("simpleGenerics.kt") public void testSimpleGenerics() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/simpleGenerics.kt"); } + @Test @TestMetadata("simpleInt.kt") public void testSimpleInt() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/simpleInt.kt"); } + @Test @TestMetadata("simpleLambda.kt") public void testSimpleLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/simpleLambda.kt"); } + @Test @TestMetadata("simpleObject.kt") public void testSimpleObject() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/simpleObject.kt"); } + @Test @TestMetadata("vararg.kt") public void testVararg() throws Exception { runTest("compiler/testData/codegen/boxInline/simple/vararg.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/smap") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Smap extends AbstractJvmOldAgainstIrBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Smap { + @Test public void testAllFilesPresentInSmap() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/smap"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true); } + @Test @TestMetadata("assertion.kt") public void testAssertion() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/assertion.kt"); } + @Test @TestMetadata("classCycle.kt") public void testClassCycle() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/classCycle.kt"); } + @Test @TestMetadata("classFromDefaultPackage.kt") public void testClassFromDefaultPackage() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/classFromDefaultPackage.kt"); } + @Test @TestMetadata("crossroutines.kt") public void testCrossroutines() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/crossroutines.kt"); } + @Test @TestMetadata("defaultFunction.kt") public void testDefaultFunction() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/defaultFunction.kt"); } + @Test @TestMetadata("defaultFunctionWithInlineCall.kt") public void testDefaultFunctionWithInlineCall() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/defaultFunctionWithInlineCall.kt"); } + @Test @TestMetadata("forInline.kt") public void testForInline() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/forInline.kt"); } + @Test @TestMetadata("interleavedFiles.kt") public void testInterleavedFiles() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/interleavedFiles.kt"); } + @Test @TestMetadata("kt23369.kt") public void testKt23369() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/kt23369.kt"); } + @Test @TestMetadata("kt23369_2.kt") public void testKt23369_2() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/kt23369_2.kt"); } + @Test @TestMetadata("kt23369_3.kt") public void testKt23369_3() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/kt23369_3.kt"); } + @Test @TestMetadata("kt35006.kt") public void testKt35006() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/kt35006.kt"); } + @Test @TestMetadata("multiFileFacade.kt") public void testMultiFileFacade() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/multiFileFacade.kt"); } + @Test @TestMetadata("oneFile.kt") public void testOneFile() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/oneFile.kt"); } + @Test @TestMetadata("rangeFolding.kt") public void testRangeFolding() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/rangeFolding.kt"); } + @Test @TestMetadata("rangeFoldingInClass.kt") public void testRangeFoldingInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/rangeFoldingInClass.kt"); } + @Test @TestMetadata("smap.kt") public void testSmap() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/smap.kt"); } + @Test @TestMetadata("smapWithNewSyntax.kt") public void testSmapWithNewSyntax() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/smapWithNewSyntax.kt"); } + @Test @TestMetadata("smapWithOldSyntax.kt") public void testSmapWithOldSyntax() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/smapWithOldSyntax.kt"); } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/smap/anonymous") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Anonymous extends AbstractJvmOldAgainstIrBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Anonymous { + @Test public void testAllFilesPresentInAnonymous() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/smap/anonymous"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true); } + @Test @TestMetadata("kt19175.kt") public void testKt19175() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/anonymous/kt19175.kt"); } + @Test @TestMetadata("lambda.kt") public void testLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/anonymous/lambda.kt"); } + @Test @TestMetadata("lambdaOnCallSite.kt") public void testLambdaOnCallSite() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/anonymous/lambdaOnCallSite.kt"); } + @Test @TestMetadata("lambdaOnInlineCallSite.kt") public void testLambdaOnInlineCallSite() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/anonymous/lambdaOnInlineCallSite.kt"); } + @Test @TestMetadata("object.kt") public void testObject() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/anonymous/object.kt"); } + @Test @TestMetadata("objectOnCallSite.kt") public void testObjectOnCallSite() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/anonymous/objectOnCallSite.kt"); } + @Test @TestMetadata("objectOnInlineCallSite.kt") public void testObjectOnInlineCallSite() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/anonymous/objectOnInlineCallSite.kt"); } + @Test @TestMetadata("objectOnInlineCallSite2.kt") public void testObjectOnInlineCallSite2() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/anonymous/objectOnInlineCallSite2.kt"); } + @Test @TestMetadata("objectOnInlineCallSiteWithCapture.kt") public void testObjectOnInlineCallSiteWithCapture() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/anonymous/objectOnInlineCallSiteWithCapture.kt"); } + @Test @TestMetadata("severalMappingsForDefaultFile.kt") public void testSeveralMappingsForDefaultFile() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/anonymous/severalMappingsForDefaultFile.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/smap/defaultLambda") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class DefaultLambda extends AbstractJvmOldAgainstIrBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class DefaultLambda { + @Test public void testAllFilesPresentInDefaultLambda() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/smap/defaultLambda"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true); } + @Test @TestMetadata("defaultLambdaInAnonymous.kt") public void testDefaultLambdaInAnonymous() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/defaultLambda/defaultLambdaInAnonymous.kt"); } + @Test @TestMetadata("inlinInDefault.kt") public void testInlinInDefault() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/defaultLambda/inlinInDefault.kt"); } + @Test @TestMetadata("inlinInDefault2.kt") public void testInlinInDefault2() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/defaultLambda/inlinInDefault2.kt"); } + @Test @TestMetadata("inlineAnonymousInDefault.kt") public void testInlineAnonymousInDefault() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/defaultLambda/inlineAnonymousInDefault.kt"); } + @Test @TestMetadata("inlineAnonymousInDefault2.kt") public void testInlineAnonymousInDefault2() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/defaultLambda/inlineAnonymousInDefault2.kt"); } + @Test @TestMetadata("kt21827.kt") public void testKt21827() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/defaultLambda/kt21827.kt"); } + @Test @TestMetadata("nested.kt") public void testNested() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/defaultLambda/nested.kt"); } + @Test @TestMetadata("simple.kt") public void testSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/defaultLambda/simple.kt"); } + @Test @TestMetadata("simple2.kt") public void testSimple2() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/defaultLambda/simple2.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/smap/inlineOnly") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class InlineOnly extends AbstractJvmOldAgainstIrBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class InlineOnly { + @Test public void testAllFilesPresentInInlineOnly() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/smap/inlineOnly"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true); } + @Test @TestMetadata("noSmap.kt") public void testNoSmap() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/inlineOnly/noSmap.kt"); } + @Test @TestMetadata("noSmapWithProperty.kt") public void testNoSmapWithProperty() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/inlineOnly/noSmapWithProperty.kt"); } + @Test @TestMetadata("reified.kt") public void testReified() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/inlineOnly/reified.kt"); } + @Test @TestMetadata("reifiedProperty.kt") public void testReifiedProperty() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/inlineOnly/reifiedProperty.kt"); } + @Test @TestMetadata("stdlibInlineOnly.kt") public void testStdlibInlineOnly() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/inlineOnly/stdlibInlineOnly.kt"); } + @Test @TestMetadata("stdlibInlineOnlyOneLine.kt") public void testStdlibInlineOnlyOneLine() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/inlineOnly/stdlibInlineOnlyOneLine.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/smap/newsmap") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Newsmap extends AbstractJvmOldAgainstIrBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Newsmap { + @Test public void testAllFilesPresentInNewsmap() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/smap/newsmap"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true); } + @Test @TestMetadata("differentMapping.kt") public void testDifferentMapping() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/newsmap/differentMapping.kt"); } + @Test @TestMetadata("mappingInInlineFunLambda.kt") public void testMappingInInlineFunLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/newsmap/mappingInInlineFunLambda.kt"); } + @Test @TestMetadata("mappingInSubInlineLambda.kt") public void testMappingInSubInlineLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/newsmap/mappingInSubInlineLambda.kt"); } + @Test @TestMetadata("mappingInSubInlineLambdaSameFileInline.kt") public void testMappingInSubInlineLambdaSameFileInline() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/newsmap/mappingInSubInlineLambdaSameFileInline.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/smap/resolve") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Resolve extends AbstractJvmOldAgainstIrBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Resolve { + @Test public void testAllFilesPresentInResolve() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/smap/resolve"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true); } + @Test @TestMetadata("inlineComponent.kt") public void testInlineComponent() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/resolve/inlineComponent.kt"); } + @Test @TestMetadata("inlineIterator.kt") public void testInlineIterator() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/resolve/inlineIterator.kt"); @@ -3842,616 +4409,695 @@ public class JvmOldAgainstIrBoxInlineTestGenerated extends AbstractJvmOldAgainst } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/special") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Special extends AbstractJvmOldAgainstIrBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Special { + @Test public void testAllFilesPresentInSpecial() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/special"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true); } + @Test @TestMetadata("identityCheck.kt") public void testIdentityCheck() throws Exception { runTest("compiler/testData/codegen/boxInline/special/identityCheck.kt"); } + @Test @TestMetadata("ifBranches.kt") public void testIfBranches() throws Exception { runTest("compiler/testData/codegen/boxInline/special/ifBranches.kt"); } + @Test @TestMetadata("iinc.kt") public void testIinc() throws Exception { runTest("compiler/testData/codegen/boxInline/special/iinc.kt"); } + @Test @TestMetadata("inlineChain.kt") public void testInlineChain() throws Exception { runTest("compiler/testData/codegen/boxInline/special/inlineChain.kt"); } + @Test @TestMetadata("loopInStoreLoadChains.kt") public void testLoopInStoreLoadChains() throws Exception { runTest("compiler/testData/codegen/boxInline/special/loopInStoreLoadChains.kt"); } + @Test @TestMetadata("loopInStoreLoadChains2.kt") public void testLoopInStoreLoadChains2() throws Exception { runTest("compiler/testData/codegen/boxInline/special/loopInStoreLoadChains2.kt"); } + @Test @TestMetadata("plusAssign.kt") public void testPlusAssign() throws Exception { runTest("compiler/testData/codegen/boxInline/special/plusAssign.kt"); } + @Test @TestMetadata("stackHeightBug.kt") public void testStackHeightBug() throws Exception { runTest("compiler/testData/codegen/boxInline/special/stackHeightBug.kt"); } + @Test @TestMetadata("unusedInlineLambda.kt") public void testUnusedInlineLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/special/unusedInlineLambda.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/stackOnReturn") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class StackOnReturn extends AbstractJvmOldAgainstIrBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class StackOnReturn { + @Test public void testAllFilesPresentInStackOnReturn() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/stackOnReturn"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true); } + @Test @TestMetadata("elvis.kt") public void testElvis() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/elvis.kt"); } + @Test @TestMetadata("ifThenElse.kt") public void testIfThenElse() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/ifThenElse.kt"); } + @Test @TestMetadata("kt11499.kt") public void testKt11499() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/kt11499.kt"); } + @Test @TestMetadata("kt17591.kt") public void testKt17591() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/kt17591.kt"); } + @Test @TestMetadata("kt17591a.kt") public void testKt17591a() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/kt17591a.kt"); } + @Test @TestMetadata("kt17591b.kt") public void testKt17591b() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/kt17591b.kt"); } + @Test @TestMetadata("mixedTypesOnStack1.kt") public void testMixedTypesOnStack1() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/mixedTypesOnStack1.kt"); } + @Test @TestMetadata("mixedTypesOnStack2.kt") public void testMixedTypesOnStack2() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/mixedTypesOnStack2.kt"); } + @Test @TestMetadata("mixedTypesOnStack3.kt") public void testMixedTypesOnStack3() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/mixedTypesOnStack3.kt"); } + @Test @TestMetadata("nonLocalReturn1.kt") public void testNonLocalReturn1() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/nonLocalReturn1.kt"); } + @Test @TestMetadata("nonLocalReturn2.kt") public void testNonLocalReturn2() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/nonLocalReturn2.kt"); } + @Test @TestMetadata("nonLocalReturn3.kt") public void testNonLocalReturn3() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/nonLocalReturn3.kt"); } + @Test @TestMetadata("poppedLocalReturn.kt") public void testPoppedLocalReturn() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/poppedLocalReturn.kt"); } + @Test @TestMetadata("poppedLocalReturn2.kt") public void testPoppedLocalReturn2() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/poppedLocalReturn2.kt"); } + @Test @TestMetadata("returnLong.kt") public void testReturnLong() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/returnLong.kt"); } + @Test @TestMetadata("tryFinally.kt") public void testTryFinally() throws Exception { runTest("compiler/testData/codegen/boxInline/stackOnReturn/tryFinally.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/suspend") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Suspend extends AbstractJvmOldAgainstIrBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Suspend { + @Test public void testAllFilesPresentInSuspend() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true); } + @Test @TestMetadata("capturedVariables.kt") public void testCapturedVariables() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/capturedVariables.kt"); } + @Test @TestMetadata("crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt") public void testCrossinlineSuspendLambdaInsideCrossinlineSuspendLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt"); } + @Test @TestMetadata("debugMetadataCrossinline.kt") public void testDebugMetadataCrossinline() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/debugMetadataCrossinline.kt"); } + @Test @TestMetadata("delegatedProperties.kt") public void testDelegatedProperties() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/delegatedProperties.kt"); } + @Test @TestMetadata("doubleRegenerationWithNonSuspendingLambda.kt") public void testDoubleRegenerationWithNonSuspendingLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/doubleRegenerationWithNonSuspendingLambda.kt"); } + @Test @TestMetadata("enclodingMethod.kt") public void testEnclodingMethod() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/enclodingMethod.kt"); } + @Test @TestMetadata("fileNameInMetadata.kt") public void testFileNameInMetadata() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/fileNameInMetadata.kt"); } + @Test @TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt") public void testInlineOrdinaryOfCrossinlineSuspend() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfCrossinlineSuspend.kt"); } + @Test @TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt") public void testInlineOrdinaryOfNoinlineSuspend() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfNoinlineSuspend.kt"); } + @Test @TestMetadata("inlineSuspendContinuation.kt") public void testInlineSuspendContinuation() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendContinuation.kt"); } + @Test @TestMetadata("inlineSuspendInMultifileClass.kt") public void testInlineSuspendInMultifileClass() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendInMultifileClass.kt"); } + @Test @TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt") public void testInlineSuspendOfCrossinlineOrdinary() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineOrdinary.kt"); } + @Test @TestMetadata("inlineSuspendOfCrossinlineSuspend.kt") public void testInlineSuspendOfCrossinlineSuspend() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineSuspend.kt"); } + @Test @TestMetadata("inlineSuspendOfNoinlineOrdinary.kt") public void testInlineSuspendOfNoinlineOrdinary() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineOrdinary.kt"); } + @Test @TestMetadata("inlineSuspendOfNoinlineSuspend.kt") public void testInlineSuspendOfNoinlineSuspend() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineSuspend.kt"); } + @Test @TestMetadata("inlineSuspendOfOrdinary.kt") public void testInlineSuspendOfOrdinary() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfOrdinary.kt"); } + @Test @TestMetadata("inlineSuspendOfSuspend.kt") public void testInlineSuspendOfSuspend() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfSuspend.kt"); } + @Test @TestMetadata("jvmName.kt") public void testJvmName() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/jvmName.kt"); } + @Test @TestMetadata("kt26658.kt") public void testKt26658() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/kt26658.kt"); } + @Test @TestMetadata("maxStackWithCrossinline.kt") public void testMaxStackWithCrossinline() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/maxStackWithCrossinline.kt"); } + @Test @TestMetadata("multipleLocals.kt") public void testMultipleLocals() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/multipleLocals.kt"); } + @Test @TestMetadata("multipleSuspensionPoints.kt") public void testMultipleSuspensionPoints() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/multipleSuspensionPoints.kt"); } + @Test @TestMetadata("nestedMethodWith2XParameter.kt") public void testNestedMethodWith2XParameter() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/nestedMethodWith2XParameter.kt"); } + @Test @TestMetadata("nonLocalReturn.kt") public void testNonLocalReturn() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/nonLocalReturn.kt"); } + @Test @TestMetadata("nonSuspendCrossinline.kt") public void testNonSuspendCrossinline() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/nonSuspendCrossinline.kt"); } + @Test @TestMetadata("returnValue.kt") public void testReturnValue() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/returnValue.kt"); } + @Test @TestMetadata("tryCatchReceiver.kt") public void testTryCatchReceiver() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/tryCatchReceiver.kt"); } + @Test @TestMetadata("tryCatchStackTransform.kt") public void testTryCatchStackTransform() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/tryCatchStackTransform.kt"); } + @Test @TestMetadata("twiceRegeneratedAnonymousObject.kt") public void testTwiceRegeneratedAnonymousObject() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/twiceRegeneratedAnonymousObject.kt"); } + @Test @TestMetadata("twiceRegeneratedSuspendLambda.kt") public void testTwiceRegeneratedSuspendLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/twiceRegeneratedSuspendLambda.kt"); } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/suspend/callableReference") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class CallableReference extends AbstractJvmOldAgainstIrBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class CallableReference { + @Test public void testAllFilesPresentInCallableReference() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/callableReference"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true); } + @Test @TestMetadata("isAsReified.kt") public void testIsAsReified() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/callableReference/isAsReified.kt"); } + @Test @TestMetadata("isAsReified2.kt") public void testIsAsReified2() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/callableReference/isAsReified2.kt"); } + @Test @TestMetadata("nonTailCall.kt") public void testNonTailCall() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/callableReference/nonTailCall.kt"); } + @Test @TestMetadata("simple.kt") public void testSimple() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/callableReference/simple.kt"); } + @Test @TestMetadata("unitReturn.kt") public void testUnitReturn() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/callableReference/unitReturn.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/suspend/defaultParameter") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class DefaultParameter extends AbstractJvmOldAgainstIrBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class DefaultParameter { + @Test public void testAllFilesPresentInDefaultParameter() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/defaultParameter"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true); } + @Test @TestMetadata("defaultValueCrossinline.kt") public void testDefaultValueCrossinline() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueCrossinline.kt"); } + @Test @TestMetadata("defaultValueInClass.kt") public void testDefaultValueInClass() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInClass.kt"); } + @Test @TestMetadata("defaultValueInline.kt") public void testDefaultValueInline() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInline.kt"); } + @Test @TestMetadata("defaultValueInlineFromMultiFileFacade.kt") public void testDefaultValueInlineFromMultiFileFacade() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInlineFromMultiFileFacade.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/suspend/inlineClass") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class InlineClass extends AbstractJvmOldAgainstIrBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class InlineClass { + @Test public void testAllFilesPresentInInlineClass() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/inlineClass"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true); } + @Test @TestMetadata("returnUnboxedDirect.kt") public void testReturnUnboxedDirect() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineClass/returnUnboxedDirect.kt"); } + @Test @TestMetadata("returnUnboxedResume.kt") public void testReturnUnboxedResume() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineClass/returnUnboxedResume.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/suspend/inlineUsedAsNoinline") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class InlineUsedAsNoinline extends AbstractJvmOldAgainstIrBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class InlineUsedAsNoinline { + @Test public void testAllFilesPresentInInlineUsedAsNoinline() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/inlineUsedAsNoinline"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true); } + @Test @TestMetadata("inlineOnly.kt") public void testInlineOnly() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineUsedAsNoinline/inlineOnly.kt"); } + @Test @TestMetadata("simpleNamed.kt") public void testSimpleNamed() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineUsedAsNoinline/simpleNamed.kt"); } + @Test @TestMetadata("withCapturedInlineLambda.kt") public void testWithCapturedInlineLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineUsedAsNoinline/withCapturedInlineLambda.kt"); } + @Test @TestMetadata("withCapturedInlineLambda2.kt") public void testWithCapturedInlineLambda2() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/inlineUsedAsNoinline/withCapturedInlineLambda2.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/suspend/receiver") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Receiver extends AbstractJvmOldAgainstIrBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Receiver { + @Test public void testAllFilesPresentInReceiver() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/receiver"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true); } + @Test @TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt") public void testInlineOrdinaryOfCrossinlineSuspend() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfCrossinlineSuspend.kt"); } + @Test @TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt") public void testInlineOrdinaryOfNoinlineSuspend() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfNoinlineSuspend.kt"); } + @Test @TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt") public void testInlineSuspendOfCrossinlineOrdinary() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineOrdinary.kt"); } + @Test @TestMetadata("inlineSuspendOfCrossinlineSuspend.kt") public void testInlineSuspendOfCrossinlineSuspend() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineSuspend.kt"); } + @Test @TestMetadata("inlineSuspendOfNoinlineOrdinary.kt") public void testInlineSuspendOfNoinlineOrdinary() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineOrdinary.kt"); } + @Test @TestMetadata("inlineSuspendOfNoinlineSuspend.kt") public void testInlineSuspendOfNoinlineSuspend() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineSuspend.kt"); } + @Test @TestMetadata("inlineSuspendOfOrdinary.kt") public void testInlineSuspendOfOrdinary() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfOrdinary.kt"); } + @Test @TestMetadata("inlineSuspendOfSuspend.kt") public void testInlineSuspendOfSuspend() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfSuspend.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class StateMachine extends AbstractJvmOldAgainstIrBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class StateMachine { + @Test public void testAllFilesPresentInStateMachine() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/stateMachine"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true); } + @Test @TestMetadata("crossingCoroutineBoundaries.kt") public void testCrossingCoroutineBoundaries() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/crossingCoroutineBoundaries.kt"); } + @Test @TestMetadata("independentInline.kt") public void testIndependentInline() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/independentInline.kt"); } + @Test @TestMetadata("innerLambda.kt") public void testInnerLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambda.kt"); } + @Test @TestMetadata("innerLambdaInsideLambda.kt") public void testInnerLambdaInsideLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaInsideLambda.kt"); } + @Test @TestMetadata("innerLambdaWithoutCrossinline.kt") public void testInnerLambdaWithoutCrossinline() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaWithoutCrossinline.kt"); } + @Test @TestMetadata("innerMadness.kt") public void testInnerMadness() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadness.kt"); } + @Test @TestMetadata("innerMadnessCallSite.kt") public void testInnerMadnessCallSite() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadnessCallSite.kt"); } + @Test @TestMetadata("innerObject.kt") public void testInnerObject() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObject.kt"); } + @Test @TestMetadata("innerObjectInsideInnerObject.kt") public void testInnerObjectInsideInnerObject() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectInsideInnerObject.kt"); } + @Test @TestMetadata("innerObjectRetransformation.kt") public void testInnerObjectRetransformation() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectRetransformation.kt"); } + @Test @TestMetadata("innerObjectSeveralFunctions.kt") public void testInnerObjectSeveralFunctions() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectSeveralFunctions.kt"); } + @Test @TestMetadata("innerObjectWithoutCapturingCrossinline.kt") public void testInnerObjectWithoutCapturingCrossinline() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectWithoutCapturingCrossinline.kt"); } + @Test @TestMetadata("insideObject.kt") public void testInsideObject() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/insideObject.kt"); } + @Test + @TestMetadata("kt30708.kt") + public void testKt30708() throws Exception { + runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/kt30708.kt"); + } + + @Test @TestMetadata("lambdaTransformation.kt") public void testLambdaTransformation() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/lambdaTransformation.kt"); } + @Test @TestMetadata("normalInline.kt") public void testNormalInline() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/normalInline.kt"); } + @Test @TestMetadata("numberOfSuspentions.kt") public void testNumberOfSuspentions() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/numberOfSuspentions.kt"); } + @Test @TestMetadata("objectInsideLambdas.kt") public void testObjectInsideLambdas() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/objectInsideLambdas.kt"); } + @Test @TestMetadata("oneInlineTwoCaptures.kt") public void testOneInlineTwoCaptures() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/oneInlineTwoCaptures.kt"); } + @Test @TestMetadata("passLambda.kt") public void testPassLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/passLambda.kt"); } + @Test @TestMetadata("passParameter.kt") public void testPassParameter() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/passParameter.kt"); } + @Test @TestMetadata("passParameterLambda.kt") public void testPassParameterLambda() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/passParameterLambda.kt"); } + @Test @TestMetadata("unreachableSuspendMarker.kt") public void testUnreachableSuspendMarker() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/unreachableSuspendMarker.kt"); @@ -4459,110 +5105,121 @@ public class JvmOldAgainstIrBoxInlineTestGenerated extends AbstractJvmOldAgainst } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/syntheticAccessors") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class SyntheticAccessors extends AbstractJvmOldAgainstIrBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class SyntheticAccessors { + @Test public void testAllFilesPresentInSyntheticAccessors() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/syntheticAccessors"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true); } + @Test @TestMetadata("constField.kt") public void testConstField() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/constField.kt"); } + @Test @TestMetadata("packagePrivateMembers.kt") public void testPackagePrivateMembers() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/packagePrivateMembers.kt"); } + @Test @TestMetadata("propertyModifiers.kt") public void testPropertyModifiers() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/propertyModifiers.kt"); } + @Test @TestMetadata("protectedMembers.kt") public void testProtectedMembers() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/protectedMembers.kt"); } + @Test @TestMetadata("protectedMembersFromSuper.kt") public void testProtectedMembersFromSuper() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/protectedMembersFromSuper.kt"); } + @Test @TestMetadata("superCall.kt") public void testSuperCall() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/superCall.kt"); } + @Test @TestMetadata("superCallFromMultipleSubclasses.kt") public void testSuperCallFromMultipleSubclasses() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/superCallFromMultipleSubclasses.kt"); } + @Test @TestMetadata("superProperty.kt") public void testSuperProperty() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/superProperty.kt"); } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class WithinInlineLambda extends AbstractJvmOldAgainstIrBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class WithinInlineLambda { + @Test public void testAllFilesPresentInWithinInlineLambda() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true); } + @Test @TestMetadata("directFieldAccess.kt") public void testDirectFieldAccess() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/directFieldAccess.kt"); } + @Test @TestMetadata("directFieldAccessInCrossInline.kt") public void testDirectFieldAccessInCrossInline() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/directFieldAccessInCrossInline.kt"); } + @Test @TestMetadata("privateCall.kt") public void testPrivateCall() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/privateCall.kt"); } + @Test @TestMetadata("privateInCrossInline.kt") public void testPrivateInCrossInline() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/privateInCrossInline.kt"); } + @Test @TestMetadata("privateInDefaultStubArgument.kt") public void testPrivateInDefaultStubArgument() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/privateInDefaultStubArgument.kt"); } + @Test @TestMetadata("protectedInCrossinline.kt") public void testProtectedInCrossinline() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/protectedInCrossinline.kt"); } + @Test @TestMetadata("protectedMembersFromSuper.kt") public void testProtectedMembersFromSuper() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/protectedMembersFromSuper.kt"); } + @Test @TestMetadata("superCall.kt") public void testSuperCall() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/superCall.kt"); } + @Test @TestMetadata("superInCrossInline.kt") public void testSuperInCrossInline() throws Exception { runTest("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/superInCrossInline.kt"); @@ -4570,79 +5227,78 @@ public class JvmOldAgainstIrBoxInlineTestGenerated extends AbstractJvmOldAgainst } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/trait") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Trait extends AbstractJvmOldAgainstIrBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Trait { + @Test public void testAllFilesPresentInTrait() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/trait"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true); } + @Test @TestMetadata("trait.kt") public void testTrait() throws Exception { runTest("compiler/testData/codegen/boxInline/trait/trait.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/tryCatchFinally") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class TryCatchFinally extends AbstractJvmOldAgainstIrBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class TryCatchFinally { + @Test public void testAllFilesPresentInTryCatchFinally() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/tryCatchFinally"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true); } + @Test @TestMetadata("kt5863.kt") public void testKt5863() throws Exception { runTest("compiler/testData/codegen/boxInline/tryCatchFinally/kt5863.kt"); } + @Test @TestMetadata("tryCatch.kt") public void testTryCatch() throws Exception { runTest("compiler/testData/codegen/boxInline/tryCatchFinally/tryCatch.kt"); } + @Test @TestMetadata("tryCatch2.kt") public void testTryCatch2() throws Exception { runTest("compiler/testData/codegen/boxInline/tryCatchFinally/tryCatch2.kt"); } + @Test @TestMetadata("tryCatchFinally.kt") public void testTryCatchFinally() throws Exception { runTest("compiler/testData/codegen/boxInline/tryCatchFinally/tryCatchFinally.kt"); } } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/varargs") @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Varargs extends AbstractJvmOldAgainstIrBoxInlineTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); - } - + public class Varargs { + @Test public void testAllFilesPresentInVarargs() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/varargs"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true); } + @Test @TestMetadata("kt17653.kt") public void testKt17653() throws Exception { runTest("compiler/testData/codegen/boxInline/varargs/kt17653.kt"); } + @Test @TestMetadata("varargAndDefaultParameters.kt") public void testVarargAndDefaultParameters() throws Exception { runTest("compiler/testData/codegen/boxInline/varargs/varargAndDefaultParameters.kt"); } + @Test @TestMetadata("varargAndDefaultParameters2.kt") public void testVarargAndDefaultParameters2() throws Exception { runTest("compiler/testData/codegen/boxInline/varargs/varargAndDefaultParameters2.kt"); diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/JvmOldAgainstIrBoxTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/JvmOldAgainstIrBoxTestGenerated.java new file mode 100644 index 00000000000..42b5144e7a8 --- /dev/null +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/JvmOldAgainstIrBoxTestGenerated.java @@ -0,0 +1,891 @@ +/* + * Copyright 2010-2021 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. + */ + +package org.jetbrains.kotlin.test.runners.codegen; + +import com.intellij.testFramework.TestDataPath; +import org.jetbrains.kotlin.test.util.KtTestUtil; +import org.jetbrains.kotlin.test.TargetBackend; +import org.jetbrains.kotlin.test.TestMetadata; +import org.junit.jupiter.api.Nested; +import org.junit.jupiter.api.Test; + +import java.io.File; +import java.util.regex.Pattern; + +/** This class is generated by {@link GenerateNewCompilerTests.kt}. DO NOT MODIFY MANUALLY */ +@SuppressWarnings("all") +@TestMetadata("compiler/testData/codegen/box/compileKotlinAgainstKotlin") +@TestDataPath("$PROJECT_ROOT") +public class JvmOldAgainstIrBoxTestGenerated extends AbstractJvmOldAgainstIrBoxTest { + @Test + public void testAllFilesPresentInCompileKotlinAgainstKotlin() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/compileKotlinAgainstKotlin"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true); + } + + @Test + @TestMetadata("annotationInInterface.kt") + public void testAnnotationInInterface() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/annotationInInterface.kt"); + } + + @Test + @TestMetadata("annotationOnTypeUseInTypeAlias.kt") + public void testAnnotationOnTypeUseInTypeAlias() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/annotationOnTypeUseInTypeAlias.kt"); + } + + @Test + @TestMetadata("annotationsOnTypeAliases.kt") + public void testAnnotationsOnTypeAliases() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/annotationsOnTypeAliases.kt"); + } + + @Test + @TestMetadata("callDeserializedPropertyOnInlineClassType.kt") + public void testCallDeserializedPropertyOnInlineClassType() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/callDeserializedPropertyOnInlineClassType.kt"); + } + + @Test + @TestMetadata("callDeserializedPropertyOnInlineClassTypeOldMangling.kt") + public void testCallDeserializedPropertyOnInlineClassTypeOldMangling() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/callDeserializedPropertyOnInlineClassTypeOldMangling.kt"); + } + + @Test + @TestMetadata("callsToMultifileClassFromOtherPackage.kt") + public void testCallsToMultifileClassFromOtherPackage() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/callsToMultifileClassFromOtherPackage.kt"); + } + + @Test + @TestMetadata("clashingFakeOverrideSignatures.kt") + public void testClashingFakeOverrideSignatures() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/clashingFakeOverrideSignatures.kt"); + } + + @Test + @TestMetadata("classInObject.kt") + public void testClassInObject() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/classInObject.kt"); + } + + @Test + @TestMetadata("companionObjectInEnum.kt") + public void testCompanionObjectInEnum() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/companionObjectInEnum.kt"); + } + + @Test + @TestMetadata("companionObjectMember.kt") + public void testCompanionObjectMember() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/companionObjectMember.kt"); + } + + @Test + @TestMetadata("constPropertyReferenceFromMultifileClass.kt") + public void testConstPropertyReferenceFromMultifileClass() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/constPropertyReferenceFromMultifileClass.kt"); + } + + @Test + @TestMetadata("constructorVararg.kt") + public void testConstructorVararg() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/constructorVararg.kt"); + } + + @Test + @TestMetadata("constructorWithInlineClassParametersInBinaryDependencies.kt") + public void testConstructorWithInlineClassParametersInBinaryDependencies() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/constructorWithInlineClassParametersInBinaryDependencies.kt"); + } + + @Test + @TestMetadata("constructorWithInlineClassParametersInBinaryDependenciesOldMangling.kt") + public void testConstructorWithInlineClassParametersInBinaryDependenciesOldMangling() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/constructorWithInlineClassParametersInBinaryDependenciesOldMangling.kt"); + } + + @Test + @TestMetadata("copySamOnInline.kt") + public void testCopySamOnInline() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/copySamOnInline.kt"); + } + + @Test + @TestMetadata("copySamOnInline2.kt") + public void testCopySamOnInline2() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/copySamOnInline2.kt"); + } + + @Test + @TestMetadata("coroutinesBinary.kt") + public void testCoroutinesBinary() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/coroutinesBinary.kt"); + } + + @Test + @TestMetadata("defaultConstructor.kt") + public void testDefaultConstructor() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/defaultConstructor.kt"); + } + + @Test + @TestMetadata("defaultLambdaRegeneration.kt") + public void testDefaultLambdaRegeneration() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/defaultLambdaRegeneration.kt"); + } + + @Test + @TestMetadata("defaultLambdaRegeneration2.kt") + public void testDefaultLambdaRegeneration2() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/defaultLambdaRegeneration2.kt"); + } + + @Test + @TestMetadata("defaultWithInlineClassAndReceivers.kt") + public void testDefaultWithInlineClassAndReceivers() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/defaultWithInlineClassAndReceivers.kt"); + } + + @Test + @TestMetadata("defaultWithInlineClassAndReceiversOldMangling.kt") + public void testDefaultWithInlineClassAndReceiversOldMangling() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/defaultWithInlineClassAndReceiversOldMangling.kt"); + } + + @Test + @TestMetadata("delegatedDefault.kt") + public void testDelegatedDefault() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/delegatedDefault.kt"); + } + + @Test + @TestMetadata("delegationAndAnnotations.kt") + public void testDelegationAndAnnotations() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/delegationAndAnnotations.kt"); + } + + @Test + @TestMetadata("doublyNestedClass.kt") + public void testDoublyNestedClass() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/doublyNestedClass.kt"); + } + + @Test + @TestMetadata("enum.kt") + public void testEnum() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/enum.kt"); + } + + @Test + @TestMetadata("expectClassActualTypeAlias.kt") + public void testExpectClassActualTypeAlias() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/expectClassActualTypeAlias.kt"); + } + + @Test + @TestMetadata("fakeOverridesForIntersectionTypes.kt") + public void testFakeOverridesForIntersectionTypes() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/fakeOverridesForIntersectionTypes.kt"); + } + + @Test + @TestMetadata("importCompanion.kt") + public void testImportCompanion() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/importCompanion.kt"); + } + + @Test + @TestMetadata("inlineClassFakeOverrideMangling.kt") + public void testInlineClassFakeOverrideMangling() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/inlineClassFakeOverrideMangling.kt"); + } + + @Test + @TestMetadata("inlineClassFakeOverrideManglingOldMangling.kt") + public void testInlineClassFakeOverrideManglingOldMangling() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/inlineClassFakeOverrideManglingOldMangling.kt"); + } + + @Test + @TestMetadata("inlineClassFromBinaryDependencies.kt") + public void testInlineClassFromBinaryDependencies() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/inlineClassFromBinaryDependencies.kt"); + } + + @Test + @TestMetadata("inlineClassFromBinaryDependenciesOldMangling.kt") + public void testInlineClassFromBinaryDependenciesOldMangling() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/inlineClassFromBinaryDependenciesOldMangling.kt"); + } + + @Test + @TestMetadata("inlineClassInlineFunctionCall.kt") + public void testInlineClassInlineFunctionCall() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/inlineClassInlineFunctionCall.kt"); + } + + @Test + @TestMetadata("inlineClassInlineFunctionCallOldMangling.kt") + public void testInlineClassInlineFunctionCallOldMangling() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/inlineClassInlineFunctionCallOldMangling.kt"); + } + + @Test + @TestMetadata("inlineClassInlineProperty.kt") + public void testInlineClassInlineProperty() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/inlineClassInlineProperty.kt"); + } + + @Test + @TestMetadata("inlineClassInlinePropertyOldMangling.kt") + public void testInlineClassInlinePropertyOldMangling() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/inlineClassInlinePropertyOldMangling.kt"); + } + + @Test + @TestMetadata("inlineClassesOldMangling.kt") + public void testInlineClassesOldMangling() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/inlineClassesOldMangling.kt"); + } + + @Test + @TestMetadata("inlinedConstants.kt") + public void testInlinedConstants() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/inlinedConstants.kt"); + } + + @Test + @TestMetadata("innerClassConstructor.kt") + public void testInnerClassConstructor() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/innerClassConstructor.kt"); + } + + @Test + @TestMetadata("interfaceDelegationAndBridgesProcessing.kt") + public void testInterfaceDelegationAndBridgesProcessing() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/interfaceDelegationAndBridgesProcessing.kt"); + } + + @Test + @TestMetadata("internalSetterOverridden.kt") + public void testInternalSetterOverridden() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/internalSetterOverridden.kt"); + } + + @Test + @TestMetadata("internalWithDefaultArgs.kt") + public void testInternalWithDefaultArgs() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/internalWithDefaultArgs.kt"); + } + + @Test + @TestMetadata("internalWithInlineClass.kt") + public void testInternalWithInlineClass() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/internalWithInlineClass.kt"); + } + + @Test + @TestMetadata("internalWithOtherModuleName.kt") + public void testInternalWithOtherModuleName() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/internalWithOtherModuleName.kt"); + } + + @Test + @TestMetadata("intersectionOverrideProperies.kt") + public void testIntersectionOverrideProperies() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/intersectionOverrideProperies.kt"); + } + + @Test + @TestMetadata("jvmField.kt") + public void testJvmField() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvmField.kt"); + } + + @Test + @TestMetadata("jvmFieldInAnnotationCompanion.kt") + public void testJvmFieldInAnnotationCompanion() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvmFieldInAnnotationCompanion.kt"); + } + + @Test + @TestMetadata("jvmFieldInConstructor.kt") + public void testJvmFieldInConstructor() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvmFieldInConstructor.kt"); + } + + @Test + @TestMetadata("jvmFieldInInterfaceCompanion.kt") + public void testJvmFieldInInterfaceCompanion() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvmFieldInInterfaceCompanion.kt"); + } + + @Test + @TestMetadata("jvmNames.kt") + public void testJvmNames() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvmNames.kt"); + } + + @Test + @TestMetadata("jvmPackageName.kt") + public void testJvmPackageName() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvmPackageName.kt"); + } + + @Test + @TestMetadata("jvmPackageNameInRootPackage.kt") + public void testJvmPackageNameInRootPackage() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvmPackageNameInRootPackage.kt"); + } + + @Test + @TestMetadata("jvmPackageNameMultifileClass.kt") + public void testJvmPackageNameMultifileClass() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvmPackageNameMultifileClass.kt"); + } + + @Test + @TestMetadata("jvmPackageNameWithJvmName.kt") + public void testJvmPackageNameWithJvmName() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvmPackageNameWithJvmName.kt"); + } + + @Test + @TestMetadata("jvmStaticInObject.kt") + public void testJvmStaticInObject() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvmStaticInObject.kt"); + } + + @Test + @TestMetadata("jvmStaticInObjectPropertyReference.kt") + public void testJvmStaticInObjectPropertyReference() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvmStaticInObjectPropertyReference.kt"); + } + + @Test + @TestMetadata("kotlinPropertyAsAnnotationParameter.kt") + public void testKotlinPropertyAsAnnotationParameter() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/kotlinPropertyAsAnnotationParameter.kt"); + } + + @Test + @TestMetadata("kt14012.kt") + public void testKt14012() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/kt14012.kt"); + } + + @Test + @TestMetadata("kt14012_multi.kt") + public void testKt14012_multi() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/kt14012_multi.kt"); + } + + @Test + @TestMetadata("kt21775.kt") + public void testKt21775() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/kt21775.kt"); + } + + @Test + @TestMetadata("metadataForMembersInLocalClassInInitializer.kt") + public void testMetadataForMembersInLocalClassInInitializer() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/metadataForMembersInLocalClassInInitializer.kt"); + } + + @Test + @TestMetadata("multifileClassInlineFunctionAccessingProperty.kt") + public void testMultifileClassInlineFunctionAccessingProperty() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/multifileClassInlineFunctionAccessingProperty.kt"); + } + + @Test + @TestMetadata("multifileClassWithTypealias.kt") + public void testMultifileClassWithTypealias() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/multifileClassWithTypealias.kt"); + } + + @Test + @TestMetadata("nestedClass.kt") + public void testNestedClass() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/nestedClass.kt"); + } + + @Test + @TestMetadata("nestedClassInAnnotationArgument.kt") + public void testNestedClassInAnnotationArgument() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/nestedClassInAnnotationArgument.kt"); + } + + @Test + @TestMetadata("nestedEnum.kt") + public void testNestedEnum() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/nestedEnum.kt"); + } + + @Test + @TestMetadata("nestedFunctionTypeAliasExpansion.kt") + public void testNestedFunctionTypeAliasExpansion() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/nestedFunctionTypeAliasExpansion.kt"); + } + + @Test + @TestMetadata("nestedObject.kt") + public void testNestedObject() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/nestedObject.kt"); + } + + @Test + @TestMetadata("nestedTypeAliasExpansion.kt") + public void testNestedTypeAliasExpansion() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/nestedTypeAliasExpansion.kt"); + } + + @Test + @TestMetadata("noExplicitOverrideForDelegatedFromSupertype.kt") + public void testNoExplicitOverrideForDelegatedFromSupertype() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/noExplicitOverrideForDelegatedFromSupertype.kt"); + } + + @Test + @TestMetadata("optionalAnnotation.kt") + public void testOptionalAnnotation() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/optionalAnnotation.kt"); + } + + @Test + @TestMetadata("platformTypes.kt") + public void testPlatformTypes() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/platformTypes.kt"); + } + + @Test + @TestMetadata("privateCompanionObjectValInDifferentModule.kt") + public void testPrivateCompanionObjectValInDifferentModule() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/privateCompanionObjectValInDifferentModule.kt"); + } + + @Test + @TestMetadata("privateCompanionObjectValInDifferentModuleOldMangling.kt") + public void testPrivateCompanionObjectValInDifferentModuleOldMangling() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/privateCompanionObjectValInDifferentModuleOldMangling.kt"); + } + + @Test + @TestMetadata("privateTopLevelValInDifferentModule.kt") + public void testPrivateTopLevelValInDifferentModule() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/privateTopLevelValInDifferentModule.kt"); + } + + @Test + @TestMetadata("privateTopLevelValInDifferentModuleOldMangling.kt") + public void testPrivateTopLevelValInDifferentModuleOldMangling() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/privateTopLevelValInDifferentModuleOldMangling.kt"); + } + + @Test + @TestMetadata("propertyReference.kt") + public void testPropertyReference() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/propertyReference.kt"); + } + + @Test + @TestMetadata("recursiveGeneric.kt") + public void testRecursiveGeneric() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/recursiveGeneric.kt"); + } + + @Test + @TestMetadata("reflectTopLevelFunctionOtherFile.kt") + public void testReflectTopLevelFunctionOtherFile() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/reflectTopLevelFunctionOtherFile.kt"); + } + + @Test + @TestMetadata("sealedClass.kt") + public void testSealedClass() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/sealedClass.kt"); + } + + @Test + @TestMetadata("secondaryConstructors.kt") + public void testSecondaryConstructors() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/secondaryConstructors.kt"); + } + + @Test + @TestMetadata("simple.kt") + public void testSimple() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/simple.kt"); + } + + @Test + @TestMetadata("simpleValAnonymousObject.kt") + public void testSimpleValAnonymousObject() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/simpleValAnonymousObject.kt"); + } + + @Test + @TestMetadata("specialBridgesInDependencies.kt") + public void testSpecialBridgesInDependencies() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/specialBridgesInDependencies.kt"); + } + + @Test + @TestMetadata("starImportEnum.kt") + public void testStarImportEnum() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/starImportEnum.kt"); + } + + @Test + @TestMetadata("suspendFunWithDefaultMangling.kt") + public void testSuspendFunWithDefaultMangling() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/suspendFunWithDefaultMangling.kt"); + } + + @Test + @TestMetadata("suspendFunWithDefaultOldMangling.kt") + public void testSuspendFunWithDefaultOldMangling() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/suspendFunWithDefaultOldMangling.kt"); + } + + @Test + @TestMetadata("targetedJvmName.kt") + public void testTargetedJvmName() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/targetedJvmName.kt"); + } + + @Test + @TestMetadata("typeAliasesKt13181.kt") + public void testTypeAliasesKt13181() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/typeAliasesKt13181.kt"); + } + + @Test + @TestMetadata("unsignedTypesInAnnotations.kt") + public void testUnsignedTypesInAnnotations() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/unsignedTypesInAnnotations.kt"); + } + + @Test + @TestMetadata("useDeserializedFunInterface.kt") + public void testUseDeserializedFunInterface() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/useDeserializedFunInterface.kt"); + } + + @Nested + @TestMetadata("compiler/testData/codegen/box/compileKotlinAgainstKotlin/fir") + @TestDataPath("$PROJECT_ROOT") + public class Fir { + @Test + public void testAllFilesPresentInFir() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/compileKotlinAgainstKotlin/fir"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true); + } + + @Test + @TestMetadata("AnonymousObjectInProperty.kt") + public void testAnonymousObjectInProperty() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/fir/AnonymousObjectInProperty.kt"); + } + + @Test + @TestMetadata("ExistingSymbolInFakeOverride.kt") + public void testExistingSymbolInFakeOverride() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/fir/ExistingSymbolInFakeOverride.kt"); + } + + @Test + @TestMetadata("IncrementalCompilerRunner.kt") + public void testIncrementalCompilerRunner() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/fir/IncrementalCompilerRunner.kt"); + } + + @Test + @TestMetadata("IrConstAcceptMultiModule.kt") + public void testIrConstAcceptMultiModule() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/fir/IrConstAcceptMultiModule.kt"); + } + + @Test + @TestMetadata("LibraryProperty.kt") + public void testLibraryProperty() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/fir/LibraryProperty.kt"); + } + } + + @Nested + @TestMetadata("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8") + @TestDataPath("$PROJECT_ROOT") + public class Jvm8 { + @Test + public void testAllFilesPresentInJvm8() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true); + } + + @Nested + @TestMetadata("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults") + @TestDataPath("$PROJECT_ROOT") + public class Defaults { + @Test + public void testAllFilesPresentInDefaults() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true); + } + + @Test + @TestMetadata("superCall.kt") + public void testSuperCall() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/superCall.kt"); + } + + @Test + @TestMetadata("superCallFromInterface.kt") + public void testSuperCallFromInterface() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/superCallFromInterface.kt"); + } + + @Test + @TestMetadata("superCallFromInterface2.kt") + public void testSuperCallFromInterface2() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/superCallFromInterface2.kt"); + } + + @Test + @TestMetadata("superPropAccess.kt") + public void testSuperPropAccess() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/superPropAccess.kt"); + } + + @Test + @TestMetadata("superPropAccessFromInterface.kt") + public void testSuperPropAccessFromInterface() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/superPropAccessFromInterface.kt"); + } + + @Test + @TestMetadata("superPropAccessFromInterface2.kt") + public void testSuperPropAccessFromInterface2() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/superPropAccessFromInterface2.kt"); + } + + @Nested + @TestMetadata("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility") + @TestDataPath("$PROJECT_ROOT") + public class AllCompatibility { + @Test + public void testAllFilesPresentInAllCompatibility() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true); + } + + @Test + @TestMetadata("callStackTrace.kt") + public void testCallStackTrace() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/callStackTrace.kt"); + } + + @Test + @TestMetadata("superCall.kt") + public void testSuperCall() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superCall.kt"); + } + + @Test + @TestMetadata("superCallFromInterface.kt") + public void testSuperCallFromInterface() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superCallFromInterface.kt"); + } + + @Test + @TestMetadata("superCallFromInterface2.kt") + public void testSuperCallFromInterface2() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superCallFromInterface2.kt"); + } + + @Test + @TestMetadata("superPropAccess.kt") + public void testSuperPropAccess() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superPropAccess.kt"); + } + + @Test + @TestMetadata("superPropAccessFromInterface.kt") + public void testSuperPropAccessFromInterface() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superPropAccessFromInterface.kt"); + } + + @Test + @TestMetadata("superPropAccessFromInterface2.kt") + public void testSuperPropAccessFromInterface2() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superPropAccessFromInterface2.kt"); + } + + @Nested + @TestMetadata("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/delegationBy") + @TestDataPath("$PROJECT_ROOT") + public class DelegationBy { + @Test + public void testAllFilesPresentInDelegationBy() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/delegationBy"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true); + } + + @Test + @TestMetadata("simple.kt") + public void testSimple() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/delegationBy/simple.kt"); + } + + @Test + @TestMetadata("simpleProperty.kt") + public void testSimpleProperty() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/delegationBy/simpleProperty.kt"); + } + } + } + + @Nested + @TestMetadata("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/interop") + @TestDataPath("$PROJECT_ROOT") + public class Interop { + @Test + public void testAllFilesPresentInInterop() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/interop"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true); + } + + @Test + @TestMetadata("likeMemberClash.kt") + public void testLikeMemberClash() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/interop/likeMemberClash.kt"); + } + + @Test + @TestMetadata("likeSpecialization.kt") + public void testLikeSpecialization() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/interop/likeSpecialization.kt"); + } + + @Test + @TestMetadata("newAndOldSchemes.kt") + public void testNewAndOldSchemes() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/interop/newAndOldSchemes.kt"); + } + + @Test + @TestMetadata("newAndOldSchemes2.kt") + public void testNewAndOldSchemes2() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/interop/newAndOldSchemes2.kt"); + } + + @Test + @TestMetadata("newAndOldSchemes2Compatibility.kt") + public void testNewAndOldSchemes2Compatibility() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/interop/newAndOldSchemes2Compatibility.kt"); + } + + @Test + @TestMetadata("newAndOldSchemes3.kt") + public void testNewAndOldSchemes3() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/interop/newAndOldSchemes3.kt"); + } + + @Test + @TestMetadata("newSchemeWithJvmDefault.kt") + public void testNewSchemeWithJvmDefault() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/interop/newSchemeWithJvmDefault.kt"); + } + } + } + + @Nested + @TestMetadata("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/jvm8against6") + @TestDataPath("$PROJECT_ROOT") + public class Jvm8against6 { + @Test + public void testAllFilesPresentInJvm8against6() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/jvm8against6"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true); + } + + @Test + @TestMetadata("jdk8Against6.kt") + public void testJdk8Against6() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/jvm8against6/jdk8Against6.kt"); + } + + @Test + @TestMetadata("simpleCall.kt") + public void testSimpleCall() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/jvm8against6/simpleCall.kt"); + } + + @Test + @TestMetadata("simpleCallWithBigHierarchy.kt") + public void testSimpleCallWithBigHierarchy() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/jvm8against6/simpleCallWithBigHierarchy.kt"); + } + + @Test + @TestMetadata("simpleCallWithHierarchy.kt") + public void testSimpleCallWithHierarchy() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/jvm8against6/simpleCallWithHierarchy.kt"); + } + + @Test + @TestMetadata("simpleProp.kt") + public void testSimpleProp() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/jvm8against6/simpleProp.kt"); + } + + @Test + @TestMetadata("simplePropWithHierarchy.kt") + public void testSimplePropWithHierarchy() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/jvm8against6/simplePropWithHierarchy.kt"); + } + + @Nested + @TestMetadata("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/jvm8against6/delegation") + @TestDataPath("$PROJECT_ROOT") + public class Delegation { + @Test + public void testAllFilesPresentInDelegation() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/jvm8against6/delegation"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true); + } + + @Test + @TestMetadata("diamond.kt") + public void testDiamond() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/jvm8against6/delegation/diamond.kt"); + } + + @Test + @TestMetadata("diamond2.kt") + public void testDiamond2() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/jvm8against6/delegation/diamond2.kt"); + } + + @Test + @TestMetadata("diamond3.kt") + public void testDiamond3() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/jvm8against6/delegation/diamond3.kt"); + } + } + } + } + + @Nested + @TestMetadata("compiler/testData/codegen/box/compileKotlinAgainstKotlin/typeAnnotations") + @TestDataPath("$PROJECT_ROOT") + public class TypeAnnotations { + @Test + public void testAllFilesPresentInTypeAnnotations() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/compileKotlinAgainstKotlin/typeAnnotations"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true); + } + + @Test + @TestMetadata("implicitReturn.kt") + public void testImplicitReturn() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/typeAnnotations/implicitReturn.kt"); + } + } +} diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/ir/IrTextTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/ir/IrTextTestGenerated.java index 17b78e950d7..9f6dbe9f456 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/ir/IrTextTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/ir/IrTextTestGenerated.java @@ -28,7 +28,7 @@ public class IrTextTestGenerated extends AbstractIrTextTest { @Nested @TestMetadata("compiler/testData/ir/irText/classes") @TestDataPath("$PROJECT_ROOT") - public class Classes extends AbstractIrTextTest { + public class Classes { @Test @TestMetadata("abstractMembers.kt") public void testAbstractMembers() throws Exception { @@ -326,7 +326,7 @@ public class IrTextTestGenerated extends AbstractIrTextTest { @Nested @TestMetadata("compiler/testData/ir/irText/declarations") @TestDataPath("$PROJECT_ROOT") - public class Declarations extends AbstractIrTextTest { + public class Declarations { @Test public void testAllFilesPresentInDeclarations() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/declarations"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -473,7 +473,7 @@ public class IrTextTestGenerated extends AbstractIrTextTest { @Nested @TestMetadata("compiler/testData/ir/irText/declarations/annotations") @TestDataPath("$PROJECT_ROOT") - public class Annotations extends AbstractIrTextTest { + public class Annotations { @Test public void testAllFilesPresentInAnnotations() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/declarations/annotations"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -675,7 +675,7 @@ public class IrTextTestGenerated extends AbstractIrTextTest { @Nested @TestMetadata("compiler/testData/ir/irText/declarations/multiplatform") @TestDataPath("$PROJECT_ROOT") - public class Multiplatform extends AbstractIrTextTest { + public class Multiplatform { @Test public void testAllFilesPresentInMultiplatform() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/declarations/multiplatform"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -703,7 +703,7 @@ public class IrTextTestGenerated extends AbstractIrTextTest { @Nested @TestMetadata("compiler/testData/ir/irText/declarations/parameters") @TestDataPath("$PROJECT_ROOT") - public class Parameters extends AbstractIrTextTest { + public class Parameters { @Test public void testAllFilesPresentInParameters() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/declarations/parameters"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -791,7 +791,7 @@ public class IrTextTestGenerated extends AbstractIrTextTest { @Nested @TestMetadata("compiler/testData/ir/irText/declarations/provideDelegate") @TestDataPath("$PROJECT_ROOT") - public class ProvideDelegate extends AbstractIrTextTest { + public class ProvideDelegate { @Test public void testAllFilesPresentInProvideDelegate() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/declarations/provideDelegate"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -838,7 +838,7 @@ public class IrTextTestGenerated extends AbstractIrTextTest { @Nested @TestMetadata("compiler/testData/ir/irText/errors") @TestDataPath("$PROJECT_ROOT") - public class Errors extends AbstractIrTextTest { + public class Errors { @Test public void testAllFilesPresentInErrors() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/errors"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -860,7 +860,7 @@ public class IrTextTestGenerated extends AbstractIrTextTest { @Nested @TestMetadata("compiler/testData/ir/irText/expressions") @TestDataPath("$PROJECT_ROOT") - public class Expressions extends AbstractIrTextTest { + public class Expressions { @Test public void testAllFilesPresentInExpressions() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/expressions"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -1721,7 +1721,7 @@ public class IrTextTestGenerated extends AbstractIrTextTest { @Nested @TestMetadata("compiler/testData/ir/irText/expressions/callableReferences") @TestDataPath("$PROJECT_ROOT") - public class CallableReferences extends AbstractIrTextTest { + public class CallableReferences { @Test @TestMetadata("adaptedExtensionFunctions.kt") public void testAdaptedExtensionFunctions() throws Exception { @@ -1839,7 +1839,7 @@ public class IrTextTestGenerated extends AbstractIrTextTest { @Nested @TestMetadata("compiler/testData/ir/irText/expressions/floatingPointComparisons") @TestDataPath("$PROJECT_ROOT") - public class FloatingPointComparisons extends AbstractIrTextTest { + public class FloatingPointComparisons { @Test public void testAllFilesPresentInFloatingPointComparisons() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/expressions/floatingPointComparisons"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -1915,7 +1915,7 @@ public class IrTextTestGenerated extends AbstractIrTextTest { @Nested @TestMetadata("compiler/testData/ir/irText/expressions/funInterface") @TestDataPath("$PROJECT_ROOT") - public class FunInterface extends AbstractIrTextTest { + public class FunInterface { @Test public void testAllFilesPresentInFunInterface() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/expressions/funInterface"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -1973,7 +1973,7 @@ public class IrTextTestGenerated extends AbstractIrTextTest { @Nested @TestMetadata("compiler/testData/ir/irText/expressions/sam") @TestDataPath("$PROJECT_ROOT") - public class Sam extends AbstractIrTextTest { + public class Sam { @Test public void testAllFilesPresentInSam() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/expressions/sam"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -2050,7 +2050,7 @@ public class IrTextTestGenerated extends AbstractIrTextTest { @Nested @TestMetadata("compiler/testData/ir/irText/firProblems") @TestDataPath("$PROJECT_ROOT") - public class FirProblems extends AbstractIrTextTest { + public class FirProblems { @Test @TestMetadata("AbstractMutableMap.kt") public void testAbstractMutableMap() throws Exception { @@ -2240,7 +2240,7 @@ public class IrTextTestGenerated extends AbstractIrTextTest { @Nested @TestMetadata("compiler/testData/ir/irText/lambdas") @TestDataPath("$PROJECT_ROOT") - public class Lambdas extends AbstractIrTextTest { + public class Lambdas { @Test public void testAllFilesPresentInLambdas() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/lambdas"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -2298,7 +2298,7 @@ public class IrTextTestGenerated extends AbstractIrTextTest { @Nested @TestMetadata("compiler/testData/ir/irText/regressions") @TestDataPath("$PROJECT_ROOT") - public class Regressions extends AbstractIrTextTest { + public class Regressions { @Test public void testAllFilesPresentInRegressions() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/regressions"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -2337,7 +2337,7 @@ public class IrTextTestGenerated extends AbstractIrTextTest { @Nested @TestMetadata("compiler/testData/ir/irText/regressions/newInference") @TestDataPath("$PROJECT_ROOT") - public class NewInference extends AbstractIrTextTest { + public class NewInference { @Test public void testAllFilesPresentInNewInference() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/regressions/newInference"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -2354,7 +2354,7 @@ public class IrTextTestGenerated extends AbstractIrTextTest { @Nested @TestMetadata("compiler/testData/ir/irText/singletons") @TestDataPath("$PROJECT_ROOT") - public class Singletons extends AbstractIrTextTest { + public class Singletons { @Test public void testAllFilesPresentInSingletons() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/singletons"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -2382,7 +2382,7 @@ public class IrTextTestGenerated extends AbstractIrTextTest { @Nested @TestMetadata("compiler/testData/ir/irText/stubs") @TestDataPath("$PROJECT_ROOT") - public class Stubs extends AbstractIrTextTest { + public class Stubs { @Test public void testAllFilesPresentInStubs() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/stubs"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -2470,7 +2470,7 @@ public class IrTextTestGenerated extends AbstractIrTextTest { @Nested @TestMetadata("compiler/testData/ir/irText/types") @TestDataPath("$PROJECT_ROOT") - public class Types extends AbstractIrTextTest { + public class Types { @Test @TestMetadata("abbreviatedTypes.kt") public void testAbbreviatedTypes() throws Exception { @@ -2623,7 +2623,7 @@ public class IrTextTestGenerated extends AbstractIrTextTest { @Nested @TestMetadata("compiler/testData/ir/irText/types/nullChecks") @TestDataPath("$PROJECT_ROOT") - public class NullChecks extends AbstractIrTextTest { + public class NullChecks { @Test public void testAllFilesPresentInNullChecks() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/types/nullChecks"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); @@ -2674,7 +2674,7 @@ public class IrTextTestGenerated extends AbstractIrTextTest { @Nested @TestMetadata("compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult") @TestDataPath("$PROJECT_ROOT") - public class NullCheckOnLambdaResult extends AbstractIrTextTest { + public class NullCheckOnLambdaResult { @Test public void testAllFilesPresentInNullCheckOnLambdaResult() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); diff --git a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/ApplicationEnvironmentDisposer.kt b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/ApplicationEnvironmentDisposer.kt index 02f1230a327..be0bbed8116 100644 --- a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/ApplicationEnvironmentDisposer.kt +++ b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/ApplicationEnvironmentDisposer.kt @@ -6,10 +6,12 @@ package org.jetbrains.kotlin.test import com.intellij.openapi.Disposable +import com.intellij.openapi.application.ApplicationManager import com.intellij.openapi.util.Disposer import org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment import org.junit.platform.launcher.TestExecutionListener import org.junit.platform.launcher.TestPlan +import java.lang.reflect.Field class ApplicationEnvironmentDisposer : TestExecutionListener { companion object { @@ -19,5 +21,8 @@ class ApplicationEnvironmentDisposer : TestExecutionListener { override fun testPlanExecutionFinished(testPlan: TestPlan) { KotlinCoreEnvironment.disposeApplicationEnvironment() Disposer.dispose(ROOT_DISPOSABLE) + val ourApplicationField: Field = ApplicationManager::class.java.getDeclaredField("ourApplication") + ourApplicationField.isAccessible = true + ourApplicationField.set(null, null) } } diff --git a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/backend/BlackBoxCodegenSuppressor.kt b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/backend/BlackBoxCodegenSuppressor.kt index 8f6388c5efd..9030f7b26f4 100644 --- a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/backend/BlackBoxCodegenSuppressor.kt +++ b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/backend/BlackBoxCodegenSuppressor.kt @@ -13,23 +13,32 @@ import org.jetbrains.kotlin.test.directives.model.DirectivesContainer import org.jetbrains.kotlin.test.directives.model.ValueDirective import org.jetbrains.kotlin.test.model.AfterAnalysisChecker import org.jetbrains.kotlin.test.model.FrontendKinds -import org.jetbrains.kotlin.test.services.TestModuleStructure -import org.jetbrains.kotlin.test.services.TestServices -import org.jetbrains.kotlin.test.services.moduleStructure +import org.jetbrains.kotlin.test.services.* import org.jetbrains.kotlin.test.util.joinToArrayString -class BlackBoxCodegenSuppressor(testServices: TestServices) : AfterAnalysisChecker(testServices) { +class BlackBoxCodegenSuppressor( + testServices: TestServices, + val customIgnoreDirective: ValueDirective? = null +) : AfterAnalysisChecker(testServices) { override val directives: List get() = listOf(CodegenTestDirectives) + @OptIn(ExperimentalStdlibApi::class) override fun suppressIfNeeded(failedAssertions: List): List { val moduleStructure = testServices.moduleStructure - val targetBackends = moduleStructure.modules.mapNotNull { it.targetBackend } - return when (moduleStructure.modules.map { it.frontendKind }.first()) { - FrontendKinds.ClassicFrontend -> processIgnoreBackend(moduleStructure, IGNORE_BACKEND, targetBackends, failedAssertions) - FrontendKinds.FIR -> processIgnoreBackend(moduleStructure, IGNORE_BACKEND_FIR, targetBackends, failedAssertions) - else -> failedAssertions + val targetBackends = buildList { + testServices.defaultsProvider.defaultTargetBackend?.let { + add(it) + return@buildList + } + moduleStructure.modules.mapNotNullTo(this) { it.targetBackend } } + val ignoreDirective = when (moduleStructure.modules.map { it.frontendKind }.first()) { + FrontendKinds.ClassicFrontend -> customIgnoreDirective ?: IGNORE_BACKEND + FrontendKinds.FIR -> IGNORE_BACKEND_FIR + else -> return failedAssertions + } + return processIgnoreBackend(moduleStructure, ignoreDirective, targetBackends, failedAssertions) } private fun processIgnoreBackend( diff --git a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/backend/classic/JavaCompilerFacade.kt b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/backend/classic/JavaCompilerFacade.kt index cba8fcead40..9fb5c884459 100644 --- a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/backend/classic/JavaCompilerFacade.kt +++ b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/backend/classic/JavaCompilerFacade.kt @@ -14,6 +14,7 @@ import org.jetbrains.kotlin.config.JVMConfigurationKeys import org.jetbrains.kotlin.config.JvmTarget import org.jetbrains.kotlin.test.compileJavaFilesExternally import org.jetbrains.kotlin.test.directives.CodegenTestDirectives +import org.jetbrains.kotlin.test.directives.CodegenTestDirectives.USE_JAVAC_BASED_ON_JVM_TARGET import org.jetbrains.kotlin.test.directives.JvmEnvironmentConfigurationDirectives import org.jetbrains.kotlin.test.model.TestModule import org.jetbrains.kotlin.test.services.TestServices @@ -51,7 +52,7 @@ class JavaCompilerFacade(private val testServices: TestServices) { val javaFiles = module.javaFiles.map { testServices.sourceFileProvider.getRealFileForSourceFile(it) } val ignoreErrors = CodegenTestDirectives.IGNORE_JAVA_ERRORS in module.directives - compileJavaFiles(configuration[JVMConfigurationKeys.JVM_TARGET] ?: JvmTarget.DEFAULT, javaFiles, finalJavacOptions, ignoreErrors) + compileJavaFiles(module, configuration[JVMConfigurationKeys.JVM_TARGET] ?: JvmTarget.DEFAULT, javaFiles, finalJavacOptions, ignoreErrors) } @OptIn(ExperimentalStdlibApi::class) @@ -73,9 +74,9 @@ class JavaCompilerFacade(private val testServices: TestServices) { } } - private fun compileJavaFiles(jvmTarget: JvmTarget, files: List, javacOptions: List, ignoreErrors: Boolean) { + private fun compileJavaFiles(module: TestModule, jvmTarget: JvmTarget, files: List, javacOptions: List, ignoreErrors: Boolean) { val targetIsJava8OrLower = System.getProperty("java.version").startsWith("1.") - if (targetIsJava8OrLower) { + if (USE_JAVAC_BASED_ON_JVM_TARGET !in module.directives || targetIsJava8OrLower) { org.jetbrains.kotlin.test.compileJavaFiles( files, javacOptions, @@ -85,6 +86,8 @@ class JavaCompilerFacade(private val testServices: TestServices) { return } val jdkHome = when (jvmTarget) { + JvmTarget.JVM_1_6 -> KtTestUtil.getJdk6Home() + JvmTarget.JVM_1_8 -> KtTestUtil.getJdk8Home() JvmTarget.JVM_9 -> KtTestUtil.getJdk9Home() JvmTarget.JVM_11 -> KtTestUtil.getJdk11Home() JvmTarget.JVM_15 -> KtTestUtil.getJdk15Home() diff --git a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/backend/handlers/AbstractIrHandler.kt b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/backend/handlers/AbstractIrHandler.kt index ddfb1a5606d..4526ed0d70f 100644 --- a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/backend/handlers/AbstractIrHandler.kt +++ b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/backend/handlers/AbstractIrHandler.kt @@ -12,5 +12,6 @@ import org.jetbrains.kotlin.test.services.TestServices abstract class AbstractIrHandler( testServices: TestServices, + failureDisablesNextSteps: Boolean = false, doNotRunIfThereWerePreviousFailures: Boolean = false -) : BackendInputHandler(testServices, BackendKinds.IrBackend, doNotRunIfThereWerePreviousFailures) +) : BackendInputHandler(testServices, BackendKinds.IrBackend, failureDisablesNextSteps, doNotRunIfThereWerePreviousFailures) diff --git a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/backend/handlers/BinaryArtifactHandlers.kt b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/backend/handlers/BinaryArtifactHandlers.kt index 2ae59632869..24a858d9f82 100644 --- a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/backend/handlers/BinaryArtifactHandlers.kt +++ b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/backend/handlers/BinaryArtifactHandlers.kt @@ -12,27 +12,33 @@ import org.jetbrains.kotlin.test.services.TestServices abstract class JvmBinaryArtifactHandler( testServices: TestServices, + failureDisablesNextSteps: Boolean = false, doNotRunIfThereWerePreviousFailures: Boolean = false ) : BinaryArtifactHandler( testServices, ArtifactKinds.Jvm, + failureDisablesNextSteps, doNotRunIfThereWerePreviousFailures ) abstract class JsBinaryArtifactHandler( testServices: TestServices, + failureDisablesNextSteps: Boolean = false, doNotRunIfThereWerePreviousFailures: Boolean = false ) : BinaryArtifactHandler( testServices, ArtifactKinds.Js, + failureDisablesNextSteps, doNotRunIfThereWerePreviousFailures ) abstract class NativeBinaryArtifactHandler( testServices: TestServices, + failureDisablesNextSteps: Boolean = false, doNotRunIfThereWerePreviousFailures: Boolean = false ) : BinaryArtifactHandler( testServices, ArtifactKinds.Native, + failureDisablesNextSteps, doNotRunIfThereWerePreviousFailures ) diff --git a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/backend/handlers/BytecodeInliningHandler.kt b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/backend/handlers/BytecodeInliningHandler.kt new file mode 100644 index 00000000000..00670637558 --- /dev/null +++ b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/backend/handlers/BytecodeInliningHandler.kt @@ -0,0 +1,39 @@ +/* + * Copyright 2010-2021 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. + */ + +package org.jetbrains.kotlin.test.backend.handlers + +import org.jetbrains.kotlin.codegen.InlineTestUtil +import org.jetbrains.kotlin.codegen.getClassFiles +import org.jetbrains.kotlin.test.directives.CodegenTestDirectives +import org.jetbrains.kotlin.test.directives.CodegenTestDirectives.NO_CHECK_LAMBDA_INLINING +import org.jetbrains.kotlin.test.directives.CodegenTestDirectives.SKIP_INLINE_CHECK_IN +import org.jetbrains.kotlin.test.directives.model.DirectivesContainer +import org.jetbrains.kotlin.test.model.ArtifactKinds +import org.jetbrains.kotlin.test.model.BinaryArtifacts +import org.jetbrains.kotlin.test.model.TestModule +import org.jetbrains.kotlin.test.services.TestServices +import org.jetbrains.kotlin.test.services.dependencyProvider +import org.jetbrains.kotlin.test.services.moduleStructure + +class BytecodeInliningHandler(testServices: TestServices) : JvmBinaryArtifactHandler(testServices) { + override val directivesContainers: List + get() = listOf(CodegenTestDirectives) + + override fun processModule(module: TestModule, info: BinaryArtifacts.Jvm) {} + + override fun processAfterAllModules(someAssertionWasFailed: Boolean) { + val classFiles = testServices.moduleStructure.modules.flatMap { + testServices.dependencyProvider.getArtifact(it, ArtifactKinds.Jvm).classFileFactory.getClassFiles() + } + val allDirectives = testServices.moduleStructure.allDirectives + InlineTestUtil.checkNoCallsToInline( + classFiles, + skipParameterCheckingInDirectives = NO_CHECK_LAMBDA_INLINING in allDirectives, + skippedMethods = allDirectives[SKIP_INLINE_CHECK_IN].toSet() + ) + + } +} diff --git a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/backend/handlers/DxCheckerHandler.kt b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/backend/handlers/DxCheckerHandler.kt index 0508bdf41e6..5d702a732e4 100644 --- a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/backend/handlers/DxCheckerHandler.kt +++ b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/backend/handlers/DxCheckerHandler.kt @@ -20,7 +20,22 @@ class DxCheckerHandler(testServices: TestServices) : JvmBinaryArtifactHandler(te override fun processModule(module: TestModule, info: BinaryArtifacts.Jvm) { if (RUN_DEX_CHECKER !in module.directives || IGNORE_DEXING in module.directives) return - D8Checker.check(info.classFileFactory) + val reportProblems = module.targetBackend !in module.directives[CodegenTestDirectives.IGNORE_BACKEND] + try { + D8Checker.check(info.classFileFactory) + } catch (e: Throwable) { + if (reportProblems) { + try { + println(info.classFileFactory.createText()) + } catch (_: Throwable) { + // In FIR we have factory which can't print bytecode + // and it throws exception otherwise. So we need + // ignore that exception to report original one + // TODO: fix original problem + } + } + throw e + } } override fun processAfterAllModules(someAssertionWasFailed: Boolean) {} diff --git a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/backend/handlers/JvmBoxRunner.kt b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/backend/handlers/JvmBoxRunner.kt index bc6d0f08b22..cd93e51eea3 100644 --- a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/backend/handlers/JvmBoxRunner.kt +++ b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/backend/handlers/JvmBoxRunner.kt @@ -8,13 +8,11 @@ package org.jetbrains.kotlin.test.backend.handlers import junit.framework.TestCase import org.jetbrains.kotlin.backend.common.CodegenUtil.getMemberDeclarationsToGenerate import org.jetbrains.kotlin.cli.jvm.config.jvmClasspathRoots -import org.jetbrains.kotlin.codegen.ClassFileFactory -import org.jetbrains.kotlin.codegen.CodegenTestUtil -import org.jetbrains.kotlin.codegen.GeneratedClassLoader -import org.jetbrains.kotlin.codegen.clearReflectionCache +import org.jetbrains.kotlin.codegen.* import org.jetbrains.kotlin.codegen.forTestCompile.ForTestCompileRuntime import org.jetbrains.kotlin.fileClasses.JvmFileClassUtil.getFileClassInfoNoResolve import org.jetbrains.kotlin.psi.KtFile +import org.jetbrains.kotlin.test.clientserver.TestProxy import org.jetbrains.kotlin.test.directives.CodegenTestDirectives import org.jetbrains.kotlin.test.model.BinaryArtifacts import org.jetbrains.kotlin.test.model.TestModule @@ -23,7 +21,9 @@ import org.jetbrains.kotlin.test.services.compilerConfigurationProvider import org.jetbrains.kotlin.test.services.configuration.JvmEnvironmentConfigurator.Companion.TEST_CONFIGURATION_KIND_KEY import org.jetbrains.kotlin.test.services.jvm.compiledClassesManager import org.jetbrains.kotlin.utils.addToStdlib.runIf +import java.io.File import java.lang.reflect.Method +import java.net.URL import java.net.URLClassLoader class JvmBoxRunner(testServices: TestServices) : JvmBinaryArtifactHandler(testServices, doNotRunIfThereWerePreviousFailures = true) { @@ -54,6 +54,7 @@ class JvmBoxRunner(testServices: TestServices) : JvmBinaryArtifactHandler(testSe val method = clazz.getBoxMethodOrNull() ?: continue boxMethodFound = true callBoxMethodAndCheckResultWithCleanup( + module, info.classFileFactory, classLoader, clazz, @@ -69,19 +70,20 @@ class JvmBoxRunner(testServices: TestServices) : JvmBinaryArtifactHandler(testSe } private fun callBoxMethodAndCheckResultWithCleanup( - factory: ClassFileFactory, + module: TestModule, + classFileFactory: ClassFileFactory, classLoader: URLClassLoader, - clazz: Class<*>?, + clazz: Class<*>, method: Method, unexpectedBehaviour: Boolean, reportProblems: Boolean ) { try { - callBoxMethodAndCheckResult(classLoader, clazz, method, unexpectedBehaviour) + callBoxMethodAndCheckResult(module, classFileFactory, classLoader, clazz, method, unexpectedBehaviour) } catch (e: Throwable) { if (reportProblems) { try { - println(factory.createText()) + println(classFileFactory.createText()) } catch (_: Throwable) { // In FIR we have factory which can't print bytecode // and it throws exception otherwise. So we need @@ -96,14 +98,15 @@ class JvmBoxRunner(testServices: TestServices) : JvmBinaryArtifactHandler(testSe } private fun callBoxMethodAndCheckResult( + module: TestModule, + classFileFactory: ClassFileFactory, classLoader: URLClassLoader, - @Suppress("UNUSED_PARAMETER") clazz: Class<*>?, + clazz: Class<*>, method: Method, unexpectedBehaviour: Boolean ) { val result = if (BOX_IN_SEPARATE_PROCESS_PORT != null) { - TODO() -// result = invokeBoxInSeparateProcess(classLoader, clazz) + invokeBoxInSeparateProcess(module, classFileFactory, classLoader, clazz) } else { val savedClassLoader = Thread.currentThread().contextClassLoader if (savedClassLoader !== classLoader) { @@ -125,6 +128,27 @@ class JvmBoxRunner(testServices: TestServices) : JvmBinaryArtifactHandler(testSe } } + private fun invokeBoxInSeparateProcess( + module: TestModule, + classFileFactory: ClassFileFactory, + classLoader: URLClassLoader, + clazz: Class<*> + ): String { + val classPath = classLoader.extractUrls().toMutableList() + if (classLoader is GeneratedClassLoader) { + val javaPath = testServices.compiledClassesManager.getCompiledJavaDirForModule(module)?.url + if (javaPath != null) { + classPath.add(0, javaPath) + } + classPath.add(0, testServices.compiledClassesManager.getCompiledKotlinDirForModule(module, classFileFactory).url) + } + val proxy = TestProxy(Integer.valueOf(BOX_IN_SEPARATE_PROCESS_PORT), clazz.canonicalName, classPath) + return proxy.runTest() + } + + private val File.url: URL + get() = toURI().toURL() + private fun createAndVerifyClassLoader( module: TestModule, classFileFactory: ClassFileFactory, diff --git a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/backend/handlers/NoCompilationErrorsHandler.kt b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/backend/handlers/NoCompilationErrorsHandler.kt index 7fb53fdb433..07516602e42 100644 --- a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/backend/handlers/NoCompilationErrorsHandler.kt +++ b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/backend/handlers/NoCompilationErrorsHandler.kt @@ -14,7 +14,10 @@ import org.jetbrains.kotlin.test.frontend.classic.handlers.ClassicFrontendAnalys import org.jetbrains.kotlin.test.model.TestModule import org.jetbrains.kotlin.test.services.TestServices -class NoCompilationErrorsHandler(testServices: TestServices) : ClassicFrontendAnalysisHandler(testServices) { +class NoCompilationErrorsHandler(testServices: TestServices) : ClassicFrontendAnalysisHandler( + testServices, + failureDisablesNextSteps = true +) { override val directivesContainers: List get() = listOf(CodegenTestDirectives) diff --git a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/backend/handlers/NoFirCompilationErrorsHandler.kt b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/backend/handlers/NoFirCompilationErrorsHandler.kt index de08fdae0eb..a25be5c8fd7 100644 --- a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/backend/handlers/NoFirCompilationErrorsHandler.kt +++ b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/backend/handlers/NoFirCompilationErrorsHandler.kt @@ -21,7 +21,7 @@ import org.jetbrains.kotlin.test.frontend.fir.handlers.FirAnalysisHandler import org.jetbrains.kotlin.test.model.TestModule import org.jetbrains.kotlin.test.services.TestServices -class NoFirCompilationErrorsHandler(testServices: TestServices) : FirAnalysisHandler(testServices) { +class NoFirCompilationErrorsHandler(testServices: TestServices) : FirAnalysisHandler(testServices, failureDisablesNextSteps = true) { override val directivesContainers: List get() = listOf(CodegenTestDirectives) diff --git a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/backend/handlers/SMAPDumpHandler.kt b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/backend/handlers/SMAPDumpHandler.kt new file mode 100644 index 00000000000..8d436f15936 --- /dev/null +++ b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/backend/handlers/SMAPDumpHandler.kt @@ -0,0 +1,110 @@ +/* + * Copyright 2010-2021 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. + */ + +package org.jetbrains.kotlin.test.backend.handlers + +import org.jetbrains.kotlin.codegen.CommonSMAPTestUtil +import org.jetbrains.kotlin.codegen.getClassFiles +import org.jetbrains.kotlin.codegen.inline.GENERATE_SMAP +import org.jetbrains.kotlin.test.directives.CodegenTestDirectives +import org.jetbrains.kotlin.test.directives.CodegenTestDirectives.DUMP_SMAP +import org.jetbrains.kotlin.test.directives.CodegenTestDirectives.NO_SMAP_DUMP +import org.jetbrains.kotlin.test.directives.CodegenTestDirectives.SEPARATE_SMAP_DUMPS +import org.jetbrains.kotlin.test.directives.model.DirectivesContainer +import org.jetbrains.kotlin.test.model.BinaryArtifacts +import org.jetbrains.kotlin.test.model.TestModule +import org.jetbrains.kotlin.test.services.TestServices +import org.jetbrains.kotlin.test.services.moduleStructure +import org.jetbrains.kotlin.test.utils.MultiModuleInfoDumperImpl +import org.jetbrains.kotlin.test.utils.withExtension + +class SMAPDumpHandler(testServices: TestServices) : JvmBinaryArtifactHandler(testServices) { + companion object { + const val SMAP_EXT = "smap" + const val SMAP_SEP_EXT = "smap-separate-compilation" + const val SMAP_NON_SEP_EXT = "smap-nonseparate-compilation" + } + + override val directivesContainers: List + get() = listOf(CodegenTestDirectives) + + private val dumper = MultiModuleInfoDumperImpl(moduleHeaderTemplate = null) + + override fun processModule(module: TestModule, info: BinaryArtifacts.Jvm) { + if (!GENERATE_SMAP) return + if (DUMP_SMAP !in module.directives) return + + val originalFileNames = module.files.map { it.name } + + val compiledSmaps = CommonSMAPTestUtil.extractSMAPFromClasses(info.classFileFactory.getClassFiles()).mapNotNull { + val name = it.sourceFile.removePrefix("/") + val index = originalFileNames.indexOf(name) + val testFile = module.files[index] + if (NO_SMAP_DUMP in testFile.directives) return@mapNotNull null + index to it + }.sortedBy { it.first }.map { it.second } + + CommonSMAPTestUtil.checkNoConflictMappings(compiledSmaps, assertions) + + val compiledData = compiledSmaps.groupBy { + it.sourceFile + }.map { + val smap = it.value.sortedByDescending(CommonSMAPTestUtil.SMAPAndFile::outputFile).mapNotNull(CommonSMAPTestUtil.SMAPAndFile::smap).joinToString("\n") + CommonSMAPTestUtil.SMAPAndFile(if (smap.isNotEmpty()) smap else null, it.key, "NOT_SORTED") + }.associateBy { it.sourceFile } + + dumper.builderForModule(module).apply { + for (source in compiledData.values) { + appendLine("// FILE: ${source.sourceFile.removePrefix("/")}") + appendLine(source.smap ?: "") + } + } + } + + override fun processAfterAllModules(someAssertionWasFailed: Boolean) { + if (dumper.isEmpty()) return + + val separateDumpEnabled = separateDumpsEnabled() + val isSeparateCompilation = isSeparateCompilation() + + val extension = when { + !separateDumpEnabled -> SMAP_EXT + isSeparateCompilation -> SMAP_SEP_EXT + else -> SMAP_NON_SEP_EXT + } + + val testDataFile = testServices.moduleStructure.originalTestDataFiles.first() + val expectedFile = testDataFile.withExtension(extension) + assertions.assertEqualsToFile(expectedFile, dumper.generateResultingDump()) + + if (separateDumpEnabled && isSeparateCompilation) { + val otherExtension = if (isSeparateCompilation) SMAP_NON_SEP_EXT else SMAP_SEP_EXT + val otherFile = expectedFile.withExtension(otherExtension) + if (!otherFile.exists()) return + val expectedText = expectedFile.readText() + if (expectedText == otherFile.readText()) { + val smapFile = expectedFile.withExtension(SMAP_EXT) + smapFile.writeText(expectedText) + expectedFile.delete() + otherFile.delete() + assertions.fail { + """ + Contents of ${expectedFile.name} and ${otherFile.name} are equals, so they are deleted + and joined to ${smapFile.name}. Please remove $SEPARATE_SMAP_DUMPS directive from + ${testDataFile.name} and rerun test + """.trimIndent() + } + } + } + } + + private fun isSeparateCompilation(): Boolean { + return testServices.moduleStructure.modules.size > 1 + } + + private fun separateDumpsEnabled(): Boolean { + return SEPARATE_SMAP_DUMPS in testServices.moduleStructure.allDirectives + } +} diff --git a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/builders/TestConfigurationBuilder.kt b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/builders/TestConfigurationBuilder.kt index 91cbadbe99e..8220e3d0c7d 100644 --- a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/builders/TestConfigurationBuilder.kt +++ b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/builders/TestConfigurationBuilder.kt @@ -5,14 +5,17 @@ package org.jetbrains.kotlin.test.builders +import com.intellij.openapi.Disposable import org.jetbrains.kotlin.test.Constructor import org.jetbrains.kotlin.test.TestConfiguration +import org.jetbrains.kotlin.test.TestInfrastructureInternals import org.jetbrains.kotlin.test.directives.model.DirectivesContainer import org.jetbrains.kotlin.test.impl.TestConfigurationImpl import org.jetbrains.kotlin.test.model.* import org.jetbrains.kotlin.test.services.* @DefaultsDsl +@OptIn(TestInfrastructureInternals::class) class TestConfigurationBuilder { val defaultsProviderBuilder: DefaultsProviderBuilder = DefaultsProviderBuilder() lateinit var assertions: AssertionsService @@ -26,6 +29,7 @@ class TestConfigurationBuilder { private val environmentConfigurators: MutableList> = mutableListOf() private val additionalSourceProviders: MutableList> = mutableListOf() + private val moduleStructureTransformers: MutableList = mutableListOf() private val metaTestConfigurators: MutableList> = mutableListOf() private val afterAnalysisCheckers: MutableList> = mutableListOf() @@ -38,6 +42,8 @@ class TestConfigurationBuilder { private val configurationsByTestDataCondition: MutableList Unit>> = mutableListOf() private val additionalServices: MutableList = mutableListOf() + private var compilerConfigurationProvider: ((Disposable, List) -> CompilerConfigurationProvider)? = null + lateinit var testInfo: KotlinTestInfo inline fun useAdditionalService(noinline serviceConstructor: (TestServices) -> T) { @@ -115,6 +121,16 @@ class TestConfigurationBuilder { additionalSourceProviders += providers } + @TestInfrastructureInternals + fun useModuleStructureTransformers(vararg transformers: ModuleStructureTransformer) { + moduleStructureTransformers += transformers + } + + @TestInfrastructureInternals + fun useCustomCompilerConfigurationProvider(provider: (Disposable, List) -> CompilerConfigurationProvider) { + compilerConfigurationProvider = provider + } + fun useMetaTestConfigurators(vararg configurators: Constructor) { metaTestConfigurators += configurators } @@ -147,8 +163,10 @@ class TestConfigurationBuilder { additionalMetaInfoProcessors, environmentConfigurators, additionalSourceProviders, + moduleStructureTransformers, metaTestConfigurators, afterAnalysisCheckers, + compilerConfigurationProvider, metaInfoHandlerEnabled, directives, defaultRegisteredDirectivesBuilder.build(), diff --git a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/directives/CodegenTestDirectives.kt b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/directives/CodegenTestDirectives.kt index dbb639e7e88..fe6f06a271e 100644 --- a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/directives/CodegenTestDirectives.kt +++ b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/directives/CodegenTestDirectives.kt @@ -6,10 +6,7 @@ package org.jetbrains.kotlin.test.directives import org.jetbrains.kotlin.test.TargetBackend -import org.jetbrains.kotlin.test.backend.handlers.BytecodeTextHandler -import org.jetbrains.kotlin.test.backend.handlers.IrPrettyKotlinDumpHandler -import org.jetbrains.kotlin.test.backend.handlers.IrTextDumpHandler -import org.jetbrains.kotlin.test.backend.handlers.NoCompilationErrorsHandler +import org.jetbrains.kotlin.test.backend.handlers.* import org.jetbrains.kotlin.test.backend.ir.JvmIrBackendFacade import org.jetbrains.kotlin.test.directives.model.DirectiveApplicability.File import org.jetbrains.kotlin.test.directives.model.DirectiveApplicability.Global @@ -26,6 +23,19 @@ object CodegenTestDirectives : SimpleDirectivesContainer() { applicability = Global ) + val IGNORE_BACKEND_MULTI_MODULE by enumDirective( + description = "Ignore failures of multimodule test on target backend", + applicability = Global + ) + + val USE_JAVAC_BASED_ON_JVM_TARGET by directive( + description = """ + Determine version of javac for compilation of java files based + on JvmTarget of module. If not enabled then javac from + current runtime will be used + """.trimIndent() + ) + val JAVAC_OPTIONS by stringDirective( description = "Specify javac options to compile java files" ) @@ -90,4 +100,30 @@ object CodegenTestDirectives : SimpleDirectivesContainer() { val TREAT_AS_ONE_FILE by directive( description = "Treat bytecode from all files as one in ${BytecodeTextHandler::class}" ) + + val NO_CHECK_LAMBDA_INLINING by directive( + description = "Skip checking of lambda inlining in ${BytecodeInliningHandler::class.java}" + ) + + val SKIP_INLINE_CHECK_IN by stringDirective( + description = "Skip checking of specific methods in ${BytecodeInliningHandler::class.java}" + ) + + val DUMP_SMAP by directive( + description = """Enables ${SMAPDumpHandler::class}""" + ) + + val NO_SMAP_DUMP by directive( + description = "Don't dump smap for marked file", + applicability = File + ) + + val SEPARATE_SMAP_DUMPS by directive( + description = """ + If enabled then ${SMAPDumpHandler::class} will dump smap dumps + into ${SMAPDumpHandler.SMAP_SEP_EXT} and ${SMAPDumpHandler.SMAP_EXT} + files instead of ${SMAPDumpHandler.SMAP_EXT} depending of module + structure of test + """.trimIndent() + ) } diff --git a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/directives/JvmEnvironmentConfigurationDirectives.kt b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/directives/JvmEnvironmentConfigurationDirectives.kt index 7284c782bea..c0155f23963 100644 --- a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/directives/JvmEnvironmentConfigurationDirectives.kt +++ b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/directives/JvmEnvironmentConfigurationDirectives.kt @@ -54,8 +54,17 @@ object JvmEnvironmentConfigurationDirectives : SimpleDirectivesContainer() { additionalParser = JVMConstructorCallNormalizationMode.Companion::fromStringOrNull ) - val SAM_CONVERSIONS by enumDirective( + val SAM_CONVERSIONS by enumDirective( description = "SAM conversion code generation scheme", - additionalParser = JvmSamConversions.Companion::fromString + additionalParser = JvmClosureGenerationScheme.Companion::fromString + ) + + val LAMBDAS by enumDirective( + description = "Lambdas code generation scheme", + additionalParser = JvmClosureGenerationScheme.Companion::fromString + ) + + val USE_OLD_INLINE_CLASSES_MANGLING_SCHEME by directive( + description = "Enable old mangling scheme for inline classes" ) } diff --git a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/frontend/classic/handlers/ClassicFrontendAnalysisHandler.kt b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/frontend/classic/handlers/ClassicFrontendAnalysisHandler.kt index 7be2d8574b2..90b031d8d45 100644 --- a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/frontend/classic/handlers/ClassicFrontendAnalysisHandler.kt +++ b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/frontend/classic/handlers/ClassicFrontendAnalysisHandler.kt @@ -12,10 +12,12 @@ import org.jetbrains.kotlin.test.services.TestServices abstract class ClassicFrontendAnalysisHandler( testServices: TestServices, + failureDisablesNextSteps: Boolean = false, doNotRunIfThereWerePreviousFailures: Boolean = false ) : FrontendOutputHandler( testServices, FrontendKinds.ClassicFrontend, + failureDisablesNextSteps, doNotRunIfThereWerePreviousFailures ) diff --git a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/frontend/fir/handlers/FirAnalysisHandler.kt b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/frontend/fir/handlers/FirAnalysisHandler.kt index f6026ff0ba8..3c7df6fd5c7 100644 --- a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/frontend/fir/handlers/FirAnalysisHandler.kt +++ b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/frontend/fir/handlers/FirAnalysisHandler.kt @@ -13,8 +13,14 @@ import java.io.File abstract class FirAnalysisHandler( testServices: TestServices, + failureDisablesNextSteps: Boolean = false, doNotRunIfThereWerePreviousFailures: Boolean = false -) : FrontendOutputHandler(testServices, FrontendKinds.FIR, doNotRunIfThereWerePreviousFailures) { +) : FrontendOutputHandler( + testServices, + FrontendKinds.FIR, + failureDisablesNextSteps, + doNotRunIfThereWerePreviousFailures +) { protected val File.nameWithoutFirExtension: String get() = nameWithoutExtension.removeSuffix(".fir") } diff --git a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/generators/NewTestGeneratorImpl.kt b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/generators/NewTestGeneratorImpl.kt index 83feaf37b59..d1d5fbc49a7 100644 --- a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/generators/NewTestGeneratorImpl.kt +++ b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/generators/NewTestGeneratorImpl.kt @@ -186,7 +186,9 @@ object NewTestGeneratorImpl : TestGenerator(METHOD_GENERATORS) { p.generateTestDataPath(testClassModel) p.generateParameterAnnotations(testClassModel) - p.println("public class ${testClassModel.name} extends $baseTestClassName {") + val extendsClause = if (!isNested) " extends $baseTestClassName" else "" + + p.println("public class ${testClassModel.name}$extendsClause {") p.pushIndent() val testMethods = testClassModel.methods diff --git a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/impl/TestConfigurationImpl.kt b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/impl/TestConfigurationImpl.kt index 1af0b7c00c3..cbfb5c47fed 100644 --- a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/impl/TestConfigurationImpl.kt +++ b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/impl/TestConfigurationImpl.kt @@ -8,6 +8,7 @@ package org.jetbrains.kotlin.test.impl import com.intellij.openapi.Disposable import org.jetbrains.kotlin.test.Constructor import org.jetbrains.kotlin.test.TestConfiguration +import org.jetbrains.kotlin.test.TestInfrastructureInternals import org.jetbrains.kotlin.test.directives.model.ComposedDirectivesContainer import org.jetbrains.kotlin.test.directives.model.DirectivesContainer import org.jetbrains.kotlin.test.directives.model.RegisteredDirectives @@ -16,6 +17,7 @@ import org.jetbrains.kotlin.test.services.* import org.jetbrains.kotlin.test.services.impl.ModuleStructureExtractorImpl import org.jetbrains.kotlin.test.utils.TestDisposable +@OptIn(TestInfrastructureInternals::class) class TestConfigurationImpl( testInfo: KotlinTestInfo, @@ -31,9 +33,12 @@ class TestConfigurationImpl( environmentConfigurators: List>, additionalSourceProviders: List>, + moduleStructureTransformers: List, metaTestConfigurators: List>, afterAnalysisCheckers: List>, + compilerConfigurationProvider: ((Disposable, List) -> CompilerConfigurationProvider)?, + override val metaInfoHandlerEnabled: Boolean, directives: List, @@ -70,6 +75,7 @@ class TestConfigurationImpl( additionalSourceProviders.map { it.invoke(testServices) }.also { it.flatMapTo(allDirectives) { provider -> provider.directives } }, + moduleStructureTransformers, this.environmentConfigurators ) @@ -92,7 +98,9 @@ class TestConfigurationImpl( val sourceFileProvider = SourceFileProviderImpl(this, sourceFilePreprocessors) register(SourceFileProvider::class, sourceFileProvider) - val environmentProvider = CompilerConfigurationProviderImpl(rootDisposable, this@TestConfigurationImpl.environmentConfigurators) + val environmentProvider = + compilerConfigurationProvider?.invoke(rootDisposable, this@TestConfigurationImpl.environmentConfigurators) + ?: CompilerConfigurationProviderImpl(rootDisposable, this@TestConfigurationImpl.environmentConfigurators) register(CompilerConfigurationProvider::class, environmentProvider) register(AssertionsService::class, assertions) diff --git a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/runners/codegen/AbstractBlackBoxInlineCodegenTest.kt b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/runners/codegen/AbstractBlackBoxInlineCodegenTest.kt new file mode 100644 index 00000000000..82f5d8516c0 --- /dev/null +++ b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/runners/codegen/AbstractBlackBoxInlineCodegenTest.kt @@ -0,0 +1,29 @@ +/* + * Copyright 2010-2021 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. + */ + +package org.jetbrains.kotlin.test.runners.codegen + +import org.jetbrains.kotlin.test.builders.TestConfigurationBuilder + +open class AbstractBlackBoxInlineCodegenTest : AbstractBlackBoxCodegenTest() { + override fun configure(builder: TestConfigurationBuilder) { + super.configure(builder) + builder.useInlineHandlers() + } +} + +open class AbstractIrBlackBoxInlineCodegenTest : AbstractIrBlackBoxCodegenTest() { + override fun configure(builder: TestConfigurationBuilder) { + super.configure(builder) + builder.useInlineHandlers() + } +} + +open class AbstractFirBlackBoxInlineCodegenTest : AbstractFirBlackBoxCodegenTest() { + override fun configure(builder: TestConfigurationBuilder) { + super.configure(builder) + builder.useInlineHandlers() + } +} diff --git a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/runners/codegen/AbstractCompileKotlinAgainstInlineKotlinTest.kt b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/runners/codegen/AbstractCompileKotlinAgainstInlineKotlinTest.kt new file mode 100644 index 00000000000..0e0e8d7306c --- /dev/null +++ b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/runners/codegen/AbstractCompileKotlinAgainstInlineKotlinTest.kt @@ -0,0 +1,67 @@ +/* + * Copyright 2010-2021 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. + */ + +package org.jetbrains.kotlin.test.runners.codegen + +import org.jetbrains.kotlin.test.Constructor +import org.jetbrains.kotlin.test.TargetBackend +import org.jetbrains.kotlin.test.TestInfrastructureInternals +import org.jetbrains.kotlin.test.backend.BlackBoxCodegenSuppressor +import org.jetbrains.kotlin.test.backend.classic.ClassicBackendInput +import org.jetbrains.kotlin.test.backend.classic.ClassicJvmBackendFacade +import org.jetbrains.kotlin.test.backend.ir.IrBackendInput +import org.jetbrains.kotlin.test.backend.ir.JvmIrBackendFacade +import org.jetbrains.kotlin.test.bind +import org.jetbrains.kotlin.test.builders.TestConfigurationBuilder +import org.jetbrains.kotlin.test.directives.CodegenTestDirectives.IGNORE_BACKEND_MULTI_MODULE +import org.jetbrains.kotlin.test.frontend.classic.ClassicFrontend2ClassicBackendConverter +import org.jetbrains.kotlin.test.frontend.classic.ClassicFrontend2IrConverter +import org.jetbrains.kotlin.test.frontend.classic.ClassicFrontendFacade +import org.jetbrains.kotlin.test.frontend.classic.ClassicFrontendOutputArtifact +import org.jetbrains.kotlin.test.model.* +import org.jetbrains.kotlin.test.runners.AbstractKotlinCompilerWithTargetBackendTest +import org.jetbrains.kotlin.test.services.ModuleTransformerForTwoFilesBoxTests + + +@OptIn(TestInfrastructureInternals::class) +abstract class AbstractCompileKotlinAgainstInlineKotlinTestBase>( + targetBackend: TargetBackend +) : AbstractKotlinCompilerWithTargetBackendTest(targetBackend) { + abstract val frontendToBackendConverter: Constructor> + abstract val backendFacade: Constructor> + + override fun TestConfigurationBuilder.configuration() { + commonConfigurationForCodegenTest( + FrontendKinds.ClassicFrontend, + ::ClassicFrontendFacade, + frontendToBackendConverter, + backendFacade + ) + useInlineHandlers() + commonHandlersForCodegenTest() + useModuleStructureTransformers( + ModuleTransformerForTwoFilesBoxTests() + ) + useAfterAnalysisCheckers(::BlackBoxCodegenSuppressor.bind(IGNORE_BACKEND_MULTI_MODULE)) + } +} + +open class AbstractCompileKotlinAgainstInlineKotlinTest : + AbstractCompileKotlinAgainstInlineKotlinTestBase(TargetBackend.JVM) { + override val frontendToBackendConverter: Constructor> + get() = ::ClassicFrontend2ClassicBackendConverter + + override val backendFacade: Constructor> + get() = ::ClassicJvmBackendFacade +} + +open class AbstractIrCompileKotlinAgainstInlineKotlinTest : + AbstractCompileKotlinAgainstInlineKotlinTestBase(TargetBackend.JVM_IR) { + override val frontendToBackendConverter: Constructor> + get() = ::ClassicFrontend2IrConverter + + override val backendFacade: Constructor> + get() = ::JvmIrBackendFacade +} diff --git a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/runners/codegen/AbstractCompileKotlinAgainstKotlinWithDifferentBackendsTest.kt b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/runners/codegen/AbstractCompileKotlinAgainstKotlinWithDifferentBackendsTest.kt new file mode 100644 index 00000000000..cef5e3616e3 --- /dev/null +++ b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/runners/codegen/AbstractCompileKotlinAgainstKotlinWithDifferentBackendsTest.kt @@ -0,0 +1,66 @@ +/* + * Copyright 2010-2021 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. + */ + +package org.jetbrains.kotlin.test.runners.codegen + +import org.jetbrains.kotlin.test.TargetBackend +import org.jetbrains.kotlin.test.TestInfrastructureInternals +import org.jetbrains.kotlin.test.backend.BlackBoxCodegenSuppressor +import org.jetbrains.kotlin.test.backend.classic.ClassicJvmBackendFacade +import org.jetbrains.kotlin.test.backend.handlers.* +import org.jetbrains.kotlin.test.backend.ir.JvmIrBackendFacade +import org.jetbrains.kotlin.test.bind +import org.jetbrains.kotlin.test.builders.TestConfigurationBuilder +import org.jetbrains.kotlin.test.directives.CodegenTestDirectives.IGNORE_BACKEND_MULTI_MODULE +import org.jetbrains.kotlin.test.frontend.classic.ClassicFrontend2ClassicBackendConverter +import org.jetbrains.kotlin.test.frontend.classic.ClassicFrontend2IrConverter +import org.jetbrains.kotlin.test.frontend.classic.ClassicFrontendFacade +import org.jetbrains.kotlin.test.model.FrontendKinds +import org.jetbrains.kotlin.test.runners.AbstractKotlinCompilerWithTargetBackendTest +import org.jetbrains.kotlin.test.runners.codegen.commonConfigurationForCodegenTest +import org.jetbrains.kotlin.test.services.ModuleTransformerForSwitchingBackend + +@OptIn(TestInfrastructureInternals::class) +abstract class AbstractJvmIrAgainstOldBoxTestBase(targetBackend: TargetBackend) : AbstractKotlinCompilerWithTargetBackendTest( + targetBackend +) { + abstract val backendForLib: TargetBackend + abstract val backendForMain: TargetBackend + + override fun TestConfigurationBuilder.configuration() { + commonConfigurationForCodegenTest( + FrontendKinds.ClassicFrontend, + ::ClassicFrontendFacade, + ::ClassicFrontend2ClassicBackendConverter, + ::ClassicJvmBackendFacade + ) + + commonHandlersForCodegenTest() + + useFrontend2BackendConverters(::ClassicFrontend2IrConverter) + useBackendFacades(::JvmIrBackendFacade) + + useModuleStructureTransformers( + ModuleTransformerForSwitchingBackend(backendForLib, backendForMain) + ) + + useAfterAnalysisCheckers(::BlackBoxCodegenSuppressor.bind(IGNORE_BACKEND_MULTI_MODULE)) + } +} + + +open class AbstractJvmIrAgainstOldBoxTest : AbstractJvmIrAgainstOldBoxTestBase(TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD) { + override val backendForLib: TargetBackend + get() = TargetBackend.JVM + override val backendForMain: TargetBackend + get() = TargetBackend.JVM_IR +} + +open class AbstractJvmOldAgainstIrBoxTest : AbstractJvmIrAgainstOldBoxTestBase(TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR) { + override val backendForLib: TargetBackend + get() = TargetBackend.JVM_IR + override val backendForMain: TargetBackend + get() = TargetBackend.JVM +} diff --git a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/runners/codegen/AbstractJvmBlackBoxCodegenTestBase.kt b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/runners/codegen/AbstractJvmBlackBoxCodegenTestBase.kt index 39058915bb5..cc4c397ae56 100644 --- a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/runners/codegen/AbstractJvmBlackBoxCodegenTestBase.kt +++ b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/runners/codegen/AbstractJvmBlackBoxCodegenTestBase.kt @@ -8,7 +8,7 @@ package org.jetbrains.kotlin.test.runners.codegen import org.jetbrains.kotlin.test.Constructor import org.jetbrains.kotlin.test.TargetBackend import org.jetbrains.kotlin.test.backend.BlackBoxCodegenSuppressor -import org.jetbrains.kotlin.test.backend.handlers.* +import org.jetbrains.kotlin.test.backend.handlers.BytecodeListingHandler import org.jetbrains.kotlin.test.builders.TestConfigurationBuilder import org.jetbrains.kotlin.test.model.* import org.jetbrains.kotlin.test.runners.AbstractKotlinCompilerWithTargetBackendTest @@ -23,19 +23,8 @@ abstract class AbstractJvmBlackBoxCodegenTestBase> TestConfigurationBuilder.commonCon } defaultDirectives { - +USE_PSI_CLASS_FILES_READING +RUN_DEX_CHECKER } @@ -49,3 +50,29 @@ fun > TestConfigurationBuilder.commonCon useFrontend2BackendConverters(frontendToBackendConverter) useBackendFacades(backendFacade) } + +fun TestConfigurationBuilder.commonHandlersForCodegenTest() { + useFrontendHandlers( + ::NoCompilationErrorsHandler, + ::NoFirCompilationErrorsHandler, + ) + + useArtifactsHandlers( + ::JvmBoxRunner, + ::NoJvmSpecificCompilationErrorsHandler, + ::DxCheckerHandler, + ) +} + +fun TestConfigurationBuilder.useInlineHandlers() { + useArtifactsHandlers( + ::BytecodeInliningHandler, + ::SMAPDumpHandler + ) + + forTestsMatching("compiler/testData/codegen/boxInline/smap/*") { + defaultDirectives { + +DUMP_SMAP + } + } +} diff --git a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/services/CompilerConfigurationProvider.kt b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/services/CompilerConfigurationProvider.kt index 929e9d5f860..48fcd38274a 100644 --- a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/services/CompilerConfigurationProvider.kt +++ b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/services/CompilerConfigurationProvider.kt @@ -56,7 +56,7 @@ abstract class CompilerConfigurationProvider : TestService { val TestServices.compilerConfigurationProvider: CompilerConfigurationProvider by TestServices.testServiceAccessor() -class CompilerConfigurationProviderImpl( +open class CompilerConfigurationProviderImpl( override val testRootDisposable: Disposable, val configurators: List ) : CompilerConfigurationProvider() { @@ -64,28 +64,32 @@ class CompilerConfigurationProviderImpl( override fun getKotlinCoreEnvironment(module: TestModule): KotlinCoreEnvironment { return cache.getOrPut(module) { - val platform = module.targetPlatform - val configFiles = when { - platform.isJvm() -> EnvironmentConfigFiles.JVM_CONFIG_FILES - platform.isJs() -> EnvironmentConfigFiles.JS_CONFIG_FILES - platform.isNative() -> EnvironmentConfigFiles.NATIVE_CONFIG_FILES - // TODO: is it correct? - platform.isCommon() -> EnvironmentConfigFiles.METADATA_CONFIG_FILES - else -> error("Unknown platform: $platform") - } - val applicationEnvironment = KotlinCoreEnvironment.getOrCreateApplicationEnvironmentForTests( - ApplicationEnvironmentDisposer.ROOT_DISPOSABLE, - CompilerConfiguration() - ) - val projectEnv = KotlinCoreEnvironment.ProjectEnvironment(testRootDisposable, applicationEnvironment) - KotlinCoreEnvironment.createForTests( - projectEnv, - createCompilerConfiguration(module, projectEnv.project), - configFiles - ) + createKotlinCoreEnvironment(module) } } + protected open fun createKotlinCoreEnvironment(module: TestModule): KotlinCoreEnvironment { + val platform = module.targetPlatform + val configFiles = when { + platform.isJvm() -> EnvironmentConfigFiles.JVM_CONFIG_FILES + platform.isJs() -> EnvironmentConfigFiles.JS_CONFIG_FILES + platform.isNative() -> EnvironmentConfigFiles.NATIVE_CONFIG_FILES + // TODO: is it correct? + platform.isCommon() -> EnvironmentConfigFiles.METADATA_CONFIG_FILES + else -> error("Unknown platform: $platform") + } + val applicationEnvironment = KotlinCoreEnvironment.getOrCreateApplicationEnvironmentForTests( + ApplicationEnvironmentDisposer.ROOT_DISPOSABLE, + CompilerConfiguration() + ) + val projectEnv = KotlinCoreEnvironment.ProjectEnvironment(testRootDisposable, applicationEnvironment) + return KotlinCoreEnvironment.createForTests( + projectEnv, + createCompilerConfiguration(module, projectEnv.project), + configFiles + ) + } + private fun createCompilerConfiguration(module: TestModule, project: MockProject): CompilerConfiguration { val configuration = CompilerConfiguration() configuration[CommonConfigurationKeys.MODULE_NAME] = module.name diff --git a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/services/ModuleTransformerForSwitchingBackend.kt b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/services/ModuleTransformerForSwitchingBackend.kt new file mode 100644 index 00000000000..134d00d2022 --- /dev/null +++ b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/services/ModuleTransformerForSwitchingBackend.kt @@ -0,0 +1,37 @@ +/* + * Copyright 2010-2021 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. + */ + +package org.jetbrains.kotlin.test.services + +import org.jetbrains.kotlin.test.TargetBackend +import org.jetbrains.kotlin.test.TestInfrastructureInternals +import org.jetbrains.kotlin.test.model.DependencyDescription +import org.jetbrains.kotlin.test.model.DependencyKind +import org.jetbrains.kotlin.test.model.DependencyRelation +import org.jetbrains.kotlin.test.model.TestModule +import org.jetbrains.kotlin.test.services.impl.TestModuleStructureImpl + +/** + * This transformers is used for transforming target backend + * in tests with exactly two modules in it + */ +@TestInfrastructureInternals +class ModuleTransformerForSwitchingBackend( + val backendForLib: TargetBackend, + val backendForMain: TargetBackend +) : ModuleStructureTransformer() { + override fun transformModuleStructure(moduleStructure: TestModuleStructure): TestModuleStructure { + if (moduleStructure.modules.size != 2) error("Test should contain only one module") + val (first, second) = moduleStructure.modules + + return TestModuleStructureImpl( + listOf( + first.copy(targetBackend = backendForLib), + second.copy(targetBackend = backendForMain) + ), + moduleStructure.originalTestDataFiles + ) + } +} diff --git a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/services/ModuleTransformerForTwoFilesBoxTests.kt b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/services/ModuleTransformerForTwoFilesBoxTests.kt new file mode 100644 index 00000000000..593fdc325b8 --- /dev/null +++ b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/services/ModuleTransformerForTwoFilesBoxTests.kt @@ -0,0 +1,57 @@ +/* + * Copyright 2010-2021 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. + */ + +package org.jetbrains.kotlin.test.services + +import org.jetbrains.kotlin.test.TestInfrastructureInternals +import org.jetbrains.kotlin.test.model.DependencyDescription +import org.jetbrains.kotlin.test.model.DependencyKind +import org.jetbrains.kotlin.test.model.DependencyRelation +import org.jetbrains.kotlin.test.model.TestModule +import org.jetbrains.kotlin.test.services.impl.TestModuleStructureImpl + +/** + * This transformers is used for transforming test with two files + * into test with two modules + * + * It will fail in case when module structure contains more than one module + * or not exactly two files in it + */ +@TestInfrastructureInternals +class ModuleTransformerForTwoFilesBoxTests : ModuleStructureTransformer() { + override fun transformModuleStructure(moduleStructure: TestModuleStructure): TestModuleStructure { + val module = moduleStructure.modules.singleOrNull() ?: error("Test should contain only one module") + val realFiles = module.files.filterNot { it.isAdditional } + if (realFiles.size != 2) error("Test should contain exactly two files") + val additionalFiles = module.files.filter { it.isAdditional } + val (first, second) = realFiles + val firstModule = TestModule( + name = "lib", + module.targetPlatform, + module.targetBackend, + module.frontendKind, + module.binaryKind, + files = listOf(first) + additionalFiles, + dependencies = emptyList(), + friends = emptyList(), + module.directives, + module.languageVersionSettings + ) + + val secondModule = TestModule( + name = "main", + module.targetPlatform, + module.targetBackend, + module.frontendKind, + module.binaryKind, + files = listOf(second) + additionalFiles, + dependencies = emptyList(), + friends = listOf(DependencyDescription("lib", DependencyKind.Binary, DependencyRelation.Dependency)), + module.directives, + module.languageVersionSettings + ) + return TestModuleStructureImpl(listOf(firstModule, secondModule), moduleStructure.originalTestDataFiles) + } +} diff --git a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/services/configuration/JvmEnvironmentConfigurator.kt b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/services/configuration/JvmEnvironmentConfigurator.kt index e69850d3bc8..1ee91629bec 100644 --- a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/services/configuration/JvmEnvironmentConfigurator.kt +++ b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/services/configuration/JvmEnvironmentConfigurator.kt @@ -15,14 +15,17 @@ import org.jetbrains.kotlin.codegen.forTestCompile.ForTestCompileRuntime import org.jetbrains.kotlin.config.CompilerConfiguration import org.jetbrains.kotlin.config.CompilerConfigurationKey import org.jetbrains.kotlin.config.JVMConfigurationKeys +import org.jetbrains.kotlin.config.JvmTarget import org.jetbrains.kotlin.platform.jvm.JvmPlatforms import org.jetbrains.kotlin.test.ConfigurationKind import org.jetbrains.kotlin.test.TestJdkKind import org.jetbrains.kotlin.test.directives.JvmEnvironmentConfigurationDirectives import org.jetbrains.kotlin.test.directives.JvmEnvironmentConfigurationDirectives.ASSERTIONS_MODE import org.jetbrains.kotlin.test.directives.JvmEnvironmentConfigurationDirectives.CONSTRUCTOR_CALL_NORMALIZATION_MODE +import org.jetbrains.kotlin.test.directives.JvmEnvironmentConfigurationDirectives.LAMBDAS import org.jetbrains.kotlin.test.directives.JvmEnvironmentConfigurationDirectives.SAM_CONVERSIONS import org.jetbrains.kotlin.test.directives.JvmEnvironmentConfigurationDirectives.STRING_CONCAT +import org.jetbrains.kotlin.test.directives.JvmEnvironmentConfigurationDirectives.USE_OLD_INLINE_CLASSES_MANGLING_SCHEME import org.jetbrains.kotlin.test.directives.LanguageSettingsDirectives import org.jetbrains.kotlin.test.directives.model.DirectivesContainer import org.jetbrains.kotlin.test.directives.model.RegisteredDirectives @@ -40,6 +43,8 @@ import java.io.File class JvmEnvironmentConfigurator(testServices: TestServices) : EnvironmentConfigurator(testServices) { companion object { val TEST_CONFIGURATION_KIND_KEY = CompilerConfigurationKey.create("ConfigurationKind") + + private val DEFAULT_JVM_TARGET_FROM_PROPERTY: String? = System.getProperty("kotlin.test.default.jvm.target") } override val directivesContainers: List @@ -53,6 +58,8 @@ class JvmEnvironmentConfigurator(testServices: TestServices) : EnvironmentConfig register(ASSERTIONS_MODE, JVMConfigurationKeys.ASSERTIONS_MODE) register(CONSTRUCTOR_CALL_NORMALIZATION_MODE, JVMConfigurationKeys.CONSTRUCTOR_CALL_NORMALIZATION_MODE) register(SAM_CONVERSIONS, JVMConfigurationKeys.SAM_CONVERSIONS) + register(LAMBDAS, JVMConfigurationKeys.LAMBDAS) + register(USE_OLD_INLINE_CLASSES_MANGLING_SCHEME, JVMConfigurationKeys.USE_OLD_INLINE_CLASSES_MANGLING_SCHEME) } override fun configureCompilerConfiguration(configuration: CompilerConfiguration, module: TestModule, project: MockProject) { @@ -64,6 +71,7 @@ class JvmEnvironmentConfigurator(testServices: TestServices) : EnvironmentConfig 1 -> configuration.put(JVMConfigurationKeys.JVM_TARGET, targets.single()) else -> error("Too many jvm targets passed: ${targets.joinToArrayString()}") } + configureDefaultJvmTarget(configuration) when (extractJdkKind(registeredDirectives)) { TestJdkKind.MOCK_JDK -> { @@ -143,6 +151,24 @@ class JvmEnvironmentConfigurator(testServices: TestServices) : EnvironmentConfig initBinaryDependencies(module, configuration) } + private fun configureDefaultJvmTarget(configuration: CompilerConfiguration) { + if (DEFAULT_JVM_TARGET_FROM_PROPERTY == null) return + val customDefaultTarget = JvmTarget.fromString(DEFAULT_JVM_TARGET_FROM_PROPERTY) + ?: error("Can't construct JvmTarget for $DEFAULT_JVM_TARGET_FROM_PROPERTY") + val originalTarget = configuration[JVMConfigurationKeys.JVM_TARGET] + if (originalTarget == null || customDefaultTarget.majorVersion > originalTarget.majorVersion) { + // It's not safe to substitute target in general + // cause it can affect generated bytecode and original behaviour should be tested somehow. + // Original behaviour testing is perfomed by + // + // codegenTest(target = 6, jvm = "Last", jdk = mostRecentJdk) + // codegenTest(target = 8, jvm = "Last", jdk = mostRecentJdk) + // + // in compiler/tests-different-jdk/build.gradle.kts + configuration.put(JVMConfigurationKeys.JVM_TARGET, customDefaultTarget) + } + } + private fun extractJdkKind(registeredDirectives: RegisteredDirectives): TestJdkKind { val fullJdkEnabled = JvmEnvironmentConfigurationDirectives.FULL_JDK in registeredDirectives val jdkKinds = registeredDirectives[JvmEnvironmentConfigurationDirectives.JDK_KIND] diff --git a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/services/impl/ModuleStructureExtractorImpl.kt b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/services/impl/ModuleStructureExtractorImpl.kt index 63077ebfd23..ca947221ebc 100644 --- a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/services/impl/ModuleStructureExtractorImpl.kt +++ b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/services/impl/ModuleStructureExtractorImpl.kt @@ -13,6 +13,7 @@ import org.jetbrains.kotlin.platform.jvm.JvmPlatforms import org.jetbrains.kotlin.platform.konan.NativePlatforms import org.jetbrains.kotlin.test.Assertions import org.jetbrains.kotlin.test.TargetBackend +import org.jetbrains.kotlin.test.TestInfrastructureInternals import org.jetbrains.kotlin.test.builders.LanguageVersionSettingsBuilder import org.jetbrains.kotlin.test.directives.AdditionalFilesDirectives import org.jetbrains.kotlin.test.directives.ModuleStructureDirectives @@ -35,11 +36,13 @@ import java.io.File * - All directives between `MODULE` and `FILE` directives belongs to module * - All directives before first `MODULE` are global and belongs to each declared module */ +@OptIn(TestInfrastructureInternals::class) class ModuleStructureExtractorImpl( testServices: TestServices, additionalSourceProviders: List, + moduleStructureTransformers: List, private val environmentConfigurators: List -) : ModuleStructureExtractor(testServices, additionalSourceProviders) { +) : ModuleStructureExtractor(testServices, additionalSourceProviders, moduleStructureTransformers) { companion object { private val allowedExtensionsForFiles = listOf(".kt", ".kts", ".java") @@ -57,7 +60,15 @@ class ModuleStructureExtractorImpl( ): TestModuleStructure { val testDataFile = File(testDataFileName) val extractor = ModuleStructureExtractorWorker(listOf(testDataFile), directivesContainer) - return extractor.splitTestDataByModules() + var result = extractor.splitTestDataByModules() + for (transformer in moduleStructureTransformers) { + result = try { + transformer.transformModuleStructure(result) + } catch (e: Throwable) { + throw ExceptionFromModuleStructureTransformer(e, result) + } + } + return result } private inner class ModuleStructureExtractorWorker constructor( @@ -90,7 +101,7 @@ class ModuleStructureExtractorImpl( private var currentFileName: String? = null private var firstFileInModule: Boolean = true private var linesOfCurrentFile = mutableListOf() - private var startLineNumberOfCurrentFile = 0 + private var endLineNumberOfLastFile = -1 private var directivesBuilder = RegisteredDirectivesParser(directivesContainer, assertions) private var moduleDirectivesBuilder: RegisteredDirectivesParser = directivesBuilder @@ -116,7 +127,7 @@ class ModuleStructureExtractorImpl( linesOfCurrentFile.add(line) } } - finishModule() + finishModule(lineNumber = -1) val sortedModules = sortModules(modules) checkCycles(modules) return TestModuleStructureImpl(sortedModules, testDataFiles) @@ -163,7 +174,7 @@ class ModuleStructureExtractorImpl( * There was previous module, so we should save it */ if (currentModuleName != null) { - finishModule() + finishModule(lineNumber) } else { finishGlobalDirectives() } @@ -206,12 +217,11 @@ class ModuleStructureExtractorImpl( } ModuleStructureDirectives.FILE -> { if (currentFileName != null) { - finishFile() + finishFile(lineNumber) } else { resetFileCaches() } currentFileName = (values.first() as String).also(::validateFileName) - startLineNumberOfCurrentFile = lineNumber } else -> return false } @@ -219,7 +229,7 @@ class ModuleStructureExtractorImpl( return true } - private fun splitRawModuleStringToNameAndDependencies(moduleDirectiveString: String): ModuleNameAndDependeciens { + private fun splitRawModuleStringToNameAndDependencies(moduleDirectiveString: String): ModuleNameAndDependencies { val matchResult = moduleDirectiveRegex.matchEntire(moduleDirectiveString) ?: error("\"$moduleDirectiveString\" doesn't matches with pattern \"moduleName(dep1, dep2)\"") val (name, _, dependencies, _, friends) = matchResult.destructured @@ -234,7 +244,7 @@ class ModuleStructureExtractorImpl( dependenciesNames = dependenciesNames.filter { it != "support" } } } - return ModuleNameAndDependeciens( + return ModuleNameAndDependencies( name, dependenciesNames, friends.takeIf { it.isNotBlank() }?.split(" ") ?: emptyList(), @@ -268,8 +278,8 @@ class ModuleStructureExtractorImpl( error("Directive $this has $applicability applicability but it declared in $context") } - private fun finishModule() { - finishFile() + private fun finishModule(lineNumber: Int) { + finishFile(lineNumber) val isImplicitModule = currentModuleName == null val moduleDirectives = moduleDirectivesBuilder.build() + testServices.defaultDirectives + globalDirectives moduleDirectives.forEach { it.checkDirectiveApplicability(contextIsGlobal = isImplicitModule, contextIsModule = true) } @@ -316,7 +326,8 @@ class ModuleStructureExtractorImpl( } } - private fun finishFile() { + @OptIn(ExperimentalStdlibApi::class) + private fun finishFile(lineNumber: Int) { val actualDefaultFileName = if (currentModuleName == null) { defaultFileName } else { @@ -329,17 +340,24 @@ class ModuleStructureExtractorImpl( val directives = fileDirectivesBuilder?.build()?.also { directives -> directives.forEach { it.checkDirectiveApplicability(contextIsFile = true) } } + val fileContent = buildString { + for (i in 0 until endLineNumberOfLastFile) { + appendLine() + } + appendLine(linesOfCurrentFile.joinToString("\n")) + } filesOfCurrentModule.add( TestFile( relativePath = filename, - originalContent = linesOfCurrentFile.joinToString(separator = "\n", postfix = "\n"), + originalContent = fileContent, originalFile = currentTestDataFile, - startLineNumberInOriginalFile = startLineNumberOfCurrentFile, + startLineNumberInOriginalFile = endLineNumberOfLastFile, isAdditional = false, directives = directives ?: RegisteredDirectives.Empty ) ) firstFileInModule = false + endLineNumberOfLastFile = lineNumber - 1 resetFileCaches() } @@ -369,7 +387,6 @@ class ModuleStructureExtractorImpl( moduleDirectivesBuilder = directivesBuilder } currentFileName = null - startLineNumberOfCurrentFile = 0 resetDirectivesBuilder() fileDirectivesBuilder = directivesBuilder } @@ -393,7 +410,7 @@ class ModuleStructureExtractorImpl( } } - private data class ModuleNameAndDependeciens( + private data class ModuleNameAndDependencies( val name: String, val dependencies: List, val friends: List diff --git a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/utils/MultiModuleInfoDumper.kt b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/utils/MultiModuleInfoDumper.kt index 58e705fc21d..885404fabef 100644 --- a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/utils/MultiModuleInfoDumper.kt +++ b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/utils/MultiModuleInfoDumper.kt @@ -14,7 +14,7 @@ abstract class MultiModuleInfoDumper { } // TODO: consider about tests with multiple testdata files -class MultiModuleInfoDumperImpl(private val moduleHeaderTemplate: String = "Module: %s") : MultiModuleInfoDumper() { +class MultiModuleInfoDumperImpl(private val moduleHeaderTemplate: String? = "Module: %s") : MultiModuleInfoDumper() { private val builderByModule = LinkedHashMap() override fun builderForModule(module: TestModule): StringBuilder { @@ -25,7 +25,7 @@ class MultiModuleInfoDumperImpl(private val moduleHeaderTemplate: String = "Modu builderByModule.values.singleOrNull()?.let { return it.toString() } return buildString { for ((module, builder) in builderByModule) { - appendLine(String.format(moduleHeaderTemplate, module.name)) + moduleHeaderTemplate?.let { appendLine(String.format(it, module.name)) } append(builder) } } diff --git a/compiler/tests-common/tests/org/jetbrains/kotlin/codegen/AbstractBlackBoxAgainstJavaCodegenTest.kt b/compiler/tests-common/tests/org/jetbrains/kotlin/codegen/AbstractBlackBoxAgainstJavaCodegenTest.kt deleted file mode 100644 index dd94b91cd42..00000000000 --- a/compiler/tests-common/tests/org/jetbrains/kotlin/codegen/AbstractBlackBoxAgainstJavaCodegenTest.kt +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright 2010-2016 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.jetbrains.kotlin.codegen - -import org.jetbrains.kotlin.ObsoleteTestInfrastructure -import org.jetbrains.kotlin.cli.jvm.config.addJvmClasspathRoot -import org.jetbrains.kotlin.config.CompilerConfiguration -import org.jetbrains.kotlin.config.JvmTarget -import org.jetbrains.kotlin.test.util.JUnit4Assertions -import java.io.File - -@OptIn(ObsoleteTestInfrastructure::class) -abstract class AbstractBlackBoxAgainstJavaCodegenTest : AbstractBlackBoxCodegenTest() { - override fun doMultiFileTest(wholeFile: File, files: List) { - javaClassesOutputDirectory = writeJavaFiles(files)!!.let { directory -> - val jvmTargets = files.mapNotNullTo(mutableSetOf()) { it.directives["JVM_TARGET"]?.let((JvmTarget)::fromString) } - val enablePreview = files.any { it.directives.contains("ENABLE_JVM_PREVIEW") } - check(jvmTargets.size <= 1) { "Having different JVM_TARGETs for different files is not supported in this test." } - CodegenTestUtil.compileJava( - CodegenTestUtil.findJavaSourcesInDirectory(directory), - emptyList(), - extractJavacOptions( - files, - jvmTargets.firstOrNull(), - enablePreview, - ), - JUnit4Assertions - ) - } - - super.doMultiFileTest(wholeFile, files.map { file -> - // This is a hack which allows to avoid compiling Java sources for the second time (which would be incorrect in this test), - // while also retaining content of all Java sources so that we could find and use test directives in Java sources - // in CodegenTestCase.compile. - if (file.name.endsWith(".java")) TestFile("${file.name}.disabled", file.content) else file - }) - } - - override fun updateConfiguration(configuration: CompilerConfiguration) { - super.updateConfiguration(configuration) - configuration.addJvmClasspathRoot(javaClassesOutputDirectory) - } -} diff --git a/compiler/tests-common/tests/org/jetbrains/kotlin/codegen/AbstractBlackBoxInlineCodegenTest.kt b/compiler/tests-common/tests/org/jetbrains/kotlin/codegen/AbstractBlackBoxInlineCodegenTest.kt index 236ff9051db..8f4c1956fb8 100644 --- a/compiler/tests-common/tests/org/jetbrains/kotlin/codegen/AbstractBlackBoxInlineCodegenTest.kt +++ b/compiler/tests-common/tests/org/jetbrains/kotlin/codegen/AbstractBlackBoxInlineCodegenTest.kt @@ -24,7 +24,11 @@ abstract class AbstractBlackBoxInlineCodegenTest : AbstractBlackBoxCodegenTest() override fun doMultiFileTest(wholeFile: File, files: List) { super.doMultiFileTest(wholeFile, files) try { - InlineTestUtil.checkNoCallsToInline(initializedClassLoader.allGeneratedFiles.filterClassFiles(), files) + InlineTestUtil.checkNoCallsToInline( + initializedClassLoader.allGeneratedFiles.filterClassFiles(), + skipParameterCheckingInDirectives = files.any { "NO_CHECK_LAMBDA_INLINING" in it.directives }, + skippedMethods = files.flatMapTo(mutableSetOf()) { it.directives.listValues("SKIP_INLINE_CHECK_IN") ?: emptyList() } + ) SMAPTestUtil.checkSMAP(files, generateClassesInFile().getClassFiles(), false) } catch (e: Throwable) { println(generateToText()) diff --git a/compiler/tests-common/tests/org/jetbrains/kotlin/codegen/AbstractCompileKotlinAgainstInlineKotlinTest.kt b/compiler/tests-common/tests/org/jetbrains/kotlin/codegen/AbstractCompileKotlinAgainstInlineKotlinTest.kt deleted file mode 100644 index ae071deb409..00000000000 --- a/compiler/tests-common/tests/org/jetbrains/kotlin/codegen/AbstractCompileKotlinAgainstInlineKotlinTest.kt +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2010-2015 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.jetbrains.kotlin.codegen - -import org.jetbrains.kotlin.test.InTextDirectivesUtils -import java.io.File - -abstract class AbstractCompileKotlinAgainstInlineKotlinTest : AbstractCompileKotlinAgainstKotlinTest() { - override fun doMultiFileTest(wholeFile: File, files: List) { - val isIgnored = InTextDirectivesUtils.isIgnoredTarget(backend, wholeFile, ignoreBackendDirectivePrefix) - val (factory1, factory2) = doTwoFileTest( - files.filter { it.name.endsWith(".kt") }, - !isIgnored - ) - try { - val allGeneratedFiles = factory1.asList() + factory2.asList() - InlineTestUtil.checkNoCallsToInline(allGeneratedFiles.filterClassFiles(), files) - SMAPTestUtil.checkSMAP(files, allGeneratedFiles.filterClassFiles(), true) - } catch (e: Throwable) { - if (!isIgnored) { - println("FIRST:\n\n${factory1.createText()}\n\nSECOND:\n\n${factory2.createText()}") - } - throw e - } - } - - override fun getIgnoreBackendDirectivePrefix(): String = "// IGNORE_BACKEND_MULTI_MODULE: " -} diff --git a/compiler/tests-common/tests/org/jetbrains/kotlin/codegen/AbstractFirCompileKotlinAgainstKotlinTest.kt b/compiler/tests-common/tests/org/jetbrains/kotlin/codegen/AbstractFirCompileKotlinAgainstKotlinTest.kt deleted file mode 100644 index 02db57411ab..00000000000 --- a/compiler/tests-common/tests/org/jetbrains/kotlin/codegen/AbstractFirCompileKotlinAgainstKotlinTest.kt +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Copyright 2010-2020 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. - */ - -package org.jetbrains.kotlin.codegen - -import org.jetbrains.kotlin.config.CommonConfigurationKeys -import org.jetbrains.kotlin.config.CompilerConfiguration -import org.jetbrains.kotlin.config.JVMConfigurationKeys - -abstract class AbstractFirCompileKotlinAgainstKotlinTest : AbstractCompileKotlinAgainstKotlinTest() { - override fun updateConfiguration(configuration: CompilerConfiguration) { - super.updateConfiguration(configuration) - configuration.put(CommonConfigurationKeys.USE_FIR, true) - configuration.put(JVMConfigurationKeys.IR, true) - } -} \ No newline at end of file diff --git a/compiler/tests-common/tests/org/jetbrains/kotlin/codegen/AbstractLightAnalysisModeTest.kt b/compiler/tests-common/tests/org/jetbrains/kotlin/codegen/AbstractLightAnalysisModeTest.kt index d2f583c2e14..71da202710b 100644 --- a/compiler/tests-common/tests/org/jetbrains/kotlin/codegen/AbstractLightAnalysisModeTest.kt +++ b/compiler/tests-common/tests/org/jetbrains/kotlin/codegen/AbstractLightAnalysisModeTest.kt @@ -28,7 +28,7 @@ abstract class AbstractLightAnalysisModeTest : CodegenTestCase() { override fun doMultiFileTest(wholeFile: File, files: List) { for (file in files) { - if (file.content.contains("// IGNORE_LIGHT_ANALYSIS")) { + if (file.content.contains("// IGNORE_LIGHT_ANALYSIS") || file.content.contains("// MODULE:")) { return } } diff --git a/compiler/tests-common/tests/org/jetbrains/kotlin/codegen/SMAPTestUtil.kt b/compiler/tests-common/tests/org/jetbrains/kotlin/codegen/SMAPTestUtil.kt index 9d84969bb37..96c7594f489 100644 --- a/compiler/tests-common/tests/org/jetbrains/kotlin/codegen/SMAPTestUtil.kt +++ b/compiler/tests-common/tests/org/jetbrains/kotlin/codegen/SMAPTestUtil.kt @@ -16,36 +16,18 @@ package org.jetbrains.kotlin.codegen -import com.intellij.openapi.util.io.FileUtil import com.intellij.openapi.util.text.StringUtil import org.jetbrains.kotlin.backend.common.output.OutputFile +import org.jetbrains.kotlin.codegen.CommonSMAPTestUtil.SMAPAndFile +import org.jetbrains.kotlin.codegen.CommonSMAPTestUtil.checkNoConflictMappings +import org.jetbrains.kotlin.codegen.CommonSMAPTestUtil.extractSMAPFromClasses import org.jetbrains.kotlin.codegen.inline.GENERATE_SMAP -import org.jetbrains.kotlin.codegen.inline.RangeMapping -import org.jetbrains.kotlin.codegen.inline.SMAPParser -import org.jetbrains.kotlin.codegen.inline.toRange import org.jetbrains.kotlin.test.KotlinBaseTest -import org.jetbrains.kotlin.utils.keysToMap -import org.jetbrains.org.objectweb.asm.ClassReader -import org.jetbrains.org.objectweb.asm.ClassVisitor -import org.jetbrains.org.objectweb.asm.Opcodes +import org.jetbrains.kotlin.test.util.JUnit4Assertions import org.junit.Assert -import java.io.File import java.io.StringReader object SMAPTestUtil { - private fun extractSMAPFromClasses(outputFiles: Iterable): List { - return outputFiles.mapNotNull { outputFile -> - var debugInfo: String? = null - ClassReader(outputFile.asByteArray()).accept(object : ClassVisitor(Opcodes.API_VERSION) { - override fun visitSource(source: String?, debug: String?) { - debugInfo = debug - } - }, 0) - - SMAPAndFile(debugInfo, outputFile.sourceFiles.single(), outputFile.relativePath) - } - } - private fun extractSmapFromTestDataFile(file: KotlinBaseTest.TestFile, separateCompilation: Boolean): SMAPAndFile? { if (!checkExtension(file, separateCompilation)) return null @@ -88,43 +70,9 @@ object SMAPTestUtil { Assert.assertEquals("Smap data differs for $ktFileName", normalize(source.smap), normalize(data?.smap)) } - checkNoConflictMappings(compiledSmaps) - } - - private fun checkNoConflictMappings(compiledSmap: List?) { - if (compiledSmap == null) return - - compiledSmap.mapNotNull(SMAPAndFile::smap).forEach { smapString -> - val smap = SMAPParser.parseOrNull(smapString) ?: throw AssertionError("bad SMAP: $smapString") - val conflictingLines = smap.fileMappings.flatMap { fileMapping -> - fileMapping.lineMappings.flatMap { lineMapping: RangeMapping -> - lineMapping.toRange.keysToMap { lineMapping }.entries - } - }.groupBy { it.key }.entries.filter { it.value.size != 1 } - - Assert.assertTrue( - conflictingLines.joinToString(separator = "\n") { - "Conflicting mapping for line ${it.key} in ${it.value.joinToString(transform = Any::toString)}" - }, - conflictingLines.isEmpty() - ) - } + checkNoConflictMappings(compiledSmaps, JUnit4Assertions) } private fun normalize(text: String?) = text?.let { StringUtil.convertLineSeparators(it.trim()) } - - private class SMAPAndFile(val smap: String?, val sourceFile: String, val outputFile: String) { - constructor(smap: String?, sourceFile: File, outputFile: String) : this(smap, getPath(sourceFile), outputFile) - - companion object { - fun getPath(file: File): String = - getPath(file.canonicalPath) - - fun getPath(canonicalPath: String): String { - //There are some problems with disk name on windows cause LightVirtualFile return it without disk name - return FileUtil.toSystemIndependentName(canonicalPath).substringAfter(":") - } - } - } } diff --git a/compiler/tests-common/tests/org/jetbrains/kotlin/codegen/ir/AbstractFirBlackBoxAgainstJavaCodegenTest.kt b/compiler/tests-common/tests/org/jetbrains/kotlin/codegen/ir/AbstractFirBlackBoxAgainstJavaCodegenTest.kt deleted file mode 100644 index e5c1659106a..00000000000 --- a/compiler/tests-common/tests/org/jetbrains/kotlin/codegen/ir/AbstractFirBlackBoxAgainstJavaCodegenTest.kt +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Copyright 2010-2020 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. - */ - -package org.jetbrains.kotlin.codegen.ir - -import org.jetbrains.kotlin.config.CommonConfigurationKeys -import org.jetbrains.kotlin.config.CompilerConfiguration -import org.jetbrains.kotlin.config.JVMConfigurationKeys - -abstract class AbstractFirBlackBoxAgainstJavaCodegenTest : AbstractIrBlackBoxAgainstJavaCodegenTest() { - override fun updateConfiguration(configuration: CompilerConfiguration) { - super.updateConfiguration(configuration) - configuration.put(CommonConfigurationKeys.USE_FIR, true) - configuration.put(JVMConfigurationKeys.IR, true) - } -} diff --git a/compiler/tests-common/tests/org/jetbrains/kotlin/codegen/ir/AbstractIrBlackBoxAgainstJavaCodegenTest.kt b/compiler/tests-common/tests/org/jetbrains/kotlin/codegen/ir/AbstractIrBlackBoxAgainstJavaCodegenTest.kt deleted file mode 100644 index ff7f1361264..00000000000 --- a/compiler/tests-common/tests/org/jetbrains/kotlin/codegen/ir/AbstractIrBlackBoxAgainstJavaCodegenTest.kt +++ /dev/null @@ -1,13 +0,0 @@ -/* - * Copyright 2010-2018 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. - */ - -package org.jetbrains.kotlin.codegen.ir - -import org.jetbrains.kotlin.codegen.AbstractBlackBoxAgainstJavaCodegenTest -import org.jetbrains.kotlin.test.TargetBackend - -abstract class AbstractIrBlackBoxAgainstJavaCodegenTest : AbstractBlackBoxAgainstJavaCodegenTest() { - override val backend = TargetBackend.JVM_IR -} diff --git a/compiler/tests-common/tests/org/jetbrains/kotlin/codegen/ir/AbstractIrCompileKotlinAgainstInlineKotlinTest.kt b/compiler/tests-common/tests/org/jetbrains/kotlin/codegen/ir/AbstractIrCompileKotlinAgainstInlineKotlinTest.kt deleted file mode 100644 index ac226c250e3..00000000000 --- a/compiler/tests-common/tests/org/jetbrains/kotlin/codegen/ir/AbstractIrCompileKotlinAgainstInlineKotlinTest.kt +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright 2010-2019 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. - */ - -package org.jetbrains.kotlin.codegen.ir - -import org.jetbrains.kotlin.codegen.AbstractCompileKotlinAgainstInlineKotlinTest -import org.jetbrains.kotlin.test.TargetBackend - -abstract class AbstractIrCompileKotlinAgainstInlineKotlinTest : AbstractCompileKotlinAgainstInlineKotlinTest() { - override val backend: TargetBackend get() = TargetBackend.JVM_IR -} - -abstract class AbstractJvmIrAgainstOldBoxInlineTest : AbstractIrCompileKotlinAgainstInlineKotlinTest() { - override val backend: TargetBackend get() = TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD - - override fun getBackendA(): TargetBackend = TargetBackend.JVM - override fun getBackendB(): TargetBackend = TargetBackend.JVM_IR -} - -abstract class AbstractJvmOldAgainstIrBoxInlineTest : AbstractIrCompileKotlinAgainstInlineKotlinTest() { - override val backend: TargetBackend get() = TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR - - override fun getBackendA(): TargetBackend = TargetBackend.JVM_IR - override fun getBackendB(): TargetBackend = TargetBackend.JVM -} diff --git a/compiler/tests-common/tests/org/jetbrains/kotlin/codegen/ir/AbstractIrCompileKotlinAgainstKotlinTest.kt b/compiler/tests-common/tests/org/jetbrains/kotlin/codegen/ir/AbstractIrCompileKotlinAgainstKotlinTest.kt deleted file mode 100644 index ea018748120..00000000000 --- a/compiler/tests-common/tests/org/jetbrains/kotlin/codegen/ir/AbstractIrCompileKotlinAgainstKotlinTest.kt +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright 2010-2019 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. - */ - -package org.jetbrains.kotlin.codegen.ir - -import org.jetbrains.kotlin.codegen.AbstractCompileKotlinAgainstKotlinTest -import org.jetbrains.kotlin.test.TargetBackend - -abstract class AbstractIrCompileKotlinAgainstKotlinTest : AbstractCompileKotlinAgainstKotlinTest() { - override val backend: TargetBackend get() = TargetBackend.JVM_IR -} - -abstract class AbstractJvmIrAgainstOldBoxTest : AbstractIrCompileKotlinAgainstKotlinTest() { - override val backend: TargetBackend get() = TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD - - override fun getBackendA(): TargetBackend = TargetBackend.JVM - override fun getBackendB(): TargetBackend = TargetBackend.JVM_IR -} - -abstract class AbstractJvmOldAgainstIrBoxTest : AbstractIrCompileKotlinAgainstKotlinTest() { - override val backend: TargetBackend get() = TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR - - override fun getBackendA(): TargetBackend = TargetBackend.JVM_IR - override fun getBackendB(): TargetBackend = TargetBackend.JVM -} diff --git a/compiler/tests-common/tests/org/jetbrains/kotlin/fir/VMCounters.kt b/compiler/tests-common/tests/org/jetbrains/kotlin/fir/VMCounters.kt index 8dfdbaeb2fd..5e34da4b055 100644 --- a/compiler/tests-common/tests/org/jetbrains/kotlin/fir/VMCounters.kt +++ b/compiler/tests-common/tests/org/jetbrains/kotlin/fir/VMCounters.kt @@ -33,10 +33,9 @@ data class VMCounters(val userTime: Long, val cpuTime: Long, val gcInfo: Map merge(first: Map, second: Map, valueOp: (V, V) -> V): Map { +private fun merge(first: Map, second: Map, valueOp: (V, V) -> V): Map { val result = first.toMutableMap() for ((k, v) in second) { - @Suppress("NULLABLE_TYPE_PARAMETER_AGAINST_NOT_NULL_TYPE_PARAMETER") // KT-43225 result.merge(k, v, valueOp) } return result diff --git a/compiler/tests-common/tests/org/jetbrains/kotlin/test/KotlinBaseTest.kt b/compiler/tests-common/tests/org/jetbrains/kotlin/test/KotlinBaseTest.kt index e76c43656e1..d48a37f5048 100644 --- a/compiler/tests-common/tests/org/jetbrains/kotlin/test/KotlinBaseTest.kt +++ b/compiler/tests-common/tests/org/jetbrains/kotlin/test/KotlinBaseTest.kt @@ -197,6 +197,9 @@ abstract class KotlinBaseTest : KtUsefulTestCase() if (InTextDirectivesUtils.isDirectiveDefined(file.content, "WITH_RUNTIME")) { addRuntime = true } + if (InTextDirectivesUtils.isDirectiveDefined(file.content, "WITH_STDLIB")) { + addRuntime = true + } if (InTextDirectivesUtils.isDirectiveDefined(file.content, "WITH_REFLECT")) { addReflect = true } diff --git a/compiler/tests-compiler-utils/tests/org/jetbrains/kotlin/test/AnalysisFlagExtractor.kt b/compiler/tests-compiler-utils/tests/org/jetbrains/kotlin/test/AnalysisFlagExtractor.kt index 77f5c192864..6e28bc0ff31 100644 --- a/compiler/tests-compiler-utils/tests/org/jetbrains/kotlin/test/AnalysisFlagExtractor.kt +++ b/compiler/tests-compiler-utils/tests/org/jetbrains/kotlin/test/AnalysisFlagExtractor.kt @@ -8,15 +8,89 @@ package org.jetbrains.kotlin.test import org.jetbrains.kotlin.cli.common.CLIConfigurationKeys import org.jetbrains.kotlin.config.* import java.lang.reflect.Field +import java.util.regex.Matcher import java.util.regex.Pattern private val BOOLEAN_FLAG_PATTERN = Pattern.compile("([+-])(([a-zA-Z_0-9]*)\\.)?([a-zA-Z_0-9]*)") -private val CONSTRUCTOR_CALL_NORMALIZATION_MODE_FLAG_PATTERN = Pattern.compile( - "CONSTRUCTOR_CALL_NORMALIZATION_MODE=([a-zA-Z_\\-0-9]*)" -) -private val ASSERTIONS_MODE_FLAG_PATTERN = Pattern.compile("ASSERTIONS_MODE=([a-zA-Z_0-9-]*)") -private val STRING_CONCAT = Pattern.compile("STRING_CONCAT=([a-zA-Z_0-9-]*)") +@OptIn(ExperimentalStdlibApi::class) +private val patterns = buildList { + createPattern( + "ASSERTIONS_MODE", + JVMConfigurationKeys.ASSERTIONS_MODE, + JVMAssertionsMode.Companion::fromString + ) + createPattern( + "STRING_CONCAT", + JVMConfigurationKeys.STRING_CONCAT, + JvmStringConcat.Companion::fromString + ) + createPattern( + "CONSTRUCTOR_CALL_NORMALIZATION_MODE", + JVMConfigurationKeys.CONSTRUCTOR_CALL_NORMALIZATION_MODE, + JVMConstructorCallNormalizationMode.Companion::fromStringOrNull + ) + createPattern( + "SAM_CONVERSIONS", + JVMConfigurationKeys.SAM_CONVERSIONS, + JvmClosureGenerationScheme.Companion::fromString + ) + createPattern( + "LAMBDAS", + JVMConfigurationKeys.LAMBDAS, + JvmClosureGenerationScheme.Companion::fromString + ) + createPattern( + "USE_OLD_INLINE_CLASSES_MANGLING_SCHEME", + JVMConfigurationKeys.USE_OLD_INLINE_CLASSES_MANGLING_SCHEME, + ) +} + +private sealed class PatternWithExtractor { + abstract val configurationKey: CompilerConfigurationKey + abstract val pattern: Pattern + + abstract fun extract(matcher: Matcher): E +} + +private class ValuePatternWithExtractor( + val directive: String, + override val configurationKey: CompilerConfigurationKey, + val extractor: (String) -> E? +) : PatternWithExtractor() { + override val pattern: Pattern = Pattern.compile("$directive=([a-zA-Z_0-9-]*)") + + override fun extract(matcher: Matcher): E { + val stringValue = matcher.group(1) + return extractor(stringValue) ?: error("Wrong $directive value: $stringValue") + } +} + +private class BooleanPatternWithExtractor( + val directive: String, + override val configurationKey: CompilerConfigurationKey +) : PatternWithExtractor() { + override val pattern: Pattern = Pattern.compile(directive) + + override fun extract(matcher: Matcher): Boolean { + return true + } +} + +private fun MutableList>.createPattern( + directive: String, + configurationKey: CompilerConfigurationKey, + extractor: (String) -> E?, +): PatternWithExtractor { + return ValuePatternWithExtractor(directive, configurationKey, extractor).also { this += it } +} + +private fun MutableList>.createPattern( + directive: String, + configurationKey: CompilerConfigurationKey +): PatternWithExtractor { + return BooleanPatternWithExtractor(directive, configurationKey).also { this += it } +} private val FLAG_CLASSES: List> = listOf( CLIConfigurationKeys::class.java, @@ -31,6 +105,7 @@ private val FLAG_NAMESPACE_TO_CLASS: Map> = mapOf( fun parseAnalysisFlags(rawFlags: List): Map, Any> { val result = mutableMapOf, Any>() + @Suppress("unused") for (flag in rawFlags) { var m = BOOLEAN_FLAG_PATTERN.matcher(flag) if (m.matches()) { @@ -40,27 +115,12 @@ fun parseAnalysisFlags(rawFlags: List): Map, tryApplyBooleanFlag(result, flag, flagEnabled, flagNamespace, flagName) continue } - m = CONSTRUCTOR_CALL_NORMALIZATION_MODE_FLAG_PATTERN.matcher(flag) - if (m.matches()) { - val flagValueString = m.group(1) - val mode = JVMConstructorCallNormalizationMode.fromStringOrNull(flagValueString) - ?: error("Wrong CONSTRUCTOR_CALL_NORMALIZATION_MODE value: $flagValueString") - result[JVMConfigurationKeys.CONSTRUCTOR_CALL_NORMALIZATION_MODE] = mode - } - m = ASSERTIONS_MODE_FLAG_PATTERN.matcher(flag) - if (m.matches()) { - val flagValueString = m.group(1) - val mode = JVMAssertionsMode.fromStringOrNull(flagValueString) - ?: error("Wrong ASSERTIONS_MODE value: $flagValueString") - result[JVMConfigurationKeys.ASSERTIONS_MODE] = mode - } - - m = STRING_CONCAT.matcher(flag) - if (m.matches()) { - val flagValueString = m.group(1) - val mode = JvmStringConcat.fromString(flagValueString) - ?: error("Wrong STRING_CONCAT value: $flagValueString") - result[JVMConfigurationKeys.STRING_CONCAT] = mode + for (pattern in patterns) { + m = pattern.pattern.matcher(flag) + if (m.matches()) { + result[pattern.configurationKey] = pattern.extract(m) + continue + } } } @@ -97,7 +157,7 @@ private fun tryApplyBooleanFlag( try { @Suppress("UNCHECKED_CAST") val configurationKey = configurationKeyField!![null] as CompilerConfigurationKey - destination.put(configurationKey, flagEnabled) + destination[configurationKey] = flagEnabled } catch (e: java.lang.Exception) { assert(false) { "Expected [+|-][namespace.]configurationKey, got: $flag" } } diff --git a/compiler/tests-different-jdk/build.gradle.kts b/compiler/tests-different-jdk/build.gradle.kts index 789490d6546..54a5604d756 100644 --- a/compiler/tests-different-jdk/build.gradle.kts +++ b/compiler/tests-different-jdk/build.gradle.kts @@ -9,11 +9,16 @@ val testJvm6ServerRuntime by configurations.creating dependencies { testCompile(projectTests(":compiler")) - testCompile(projectTests(":compiler:tests-common")) + testApi(projectTests(":compiler:test-infrastructure")) + testApi(projectTests(":compiler:test-infrastructure-utils")) + testApi(projectTests(":compiler:tests-compiler-utils")) + testCompile(projectTests(":compiler:tests-common-new")) + + testApiJUnit5(vintageEngine = true, runner = true, suiteApi = true) + testCompileOnly(intellijCoreDep()) { includeJars("intellij-core") } testRuntime(project(":kotlin-reflect")) testRuntime(intellijDep()) - testRuntime(intellijDep()) testJvm6ServerRuntime(projectTests(":compiler:tests-common-jvm6")) } @@ -34,11 +39,12 @@ fun Project.codegenTest( target: Int, jvm: String, jdk: String, targetInTestClass: String = "$target", body: Test.() -> Unit -): TaskProvider = projectTest("codegenTarget${targetInTestClass}Jvm${jvm}Test") { +): TaskProvider = projectTest("codegenTarget${targetInTestClass}Jvm${jvm}Test", jUnit5Enabled = true) { dependsOn(":dist") workingDir = rootDir - filter.includeTestsMatching("org.jetbrains.kotlin.codegen.jdk.JvmTarget${targetInTestClass}OnJvm${jvm}") + val testName = "JvmTarget${targetInTestClass}OnJvm${jvm}" + filter.includeTestsMatching("org.jetbrains.kotlin.codegen.jdk.$testName") systemProperty("kotlin.test.default.jvm.target", "${if (target <= 8) "1." else ""}$target") body() diff --git a/compiler/tests-different-jdk/tests/org/jetbrains/kotlin/codegen/jdk/CustomJvmTargetOnJvmBaseTest.kt b/compiler/tests-different-jdk/tests/org/jetbrains/kotlin/codegen/jdk/CustomJvmTargetOnJvmBaseTest.kt index 9877ff60276..3cde663b783 100644 --- a/compiler/tests-different-jdk/tests/org/jetbrains/kotlin/codegen/jdk/CustomJvmTargetOnJvmBaseTest.kt +++ b/compiler/tests-different-jdk/tests/org/jetbrains/kotlin/codegen/jdk/CustomJvmTargetOnJvmBaseTest.kt @@ -5,105 +5,65 @@ package org.jetbrains.kotlin.codegen.jdk -import org.jetbrains.kotlin.codegen.* -import org.jetbrains.kotlin.codegen.CodegenTestCase.BOX_IN_SEPARATE_PROCESS_PORT -import org.jetbrains.kotlin.test.RunOnlyJdk6Test -import org.jetbrains.kotlin.test.SuiteRunnerForCustomJdk -import org.junit.AfterClass -import org.junit.BeforeClass +import org.jetbrains.kotlin.test.runners.codegen.* +import org.junit.jupiter.api.parallel.Execution +import org.junit.jupiter.api.parallel.ExecutionMode +import org.junit.platform.runner.JUnitPlatform +import org.junit.platform.suite.api.IncludeClassNamePatterns +import org.junit.platform.suite.api.SelectClasses +import org.junit.platform.suite.api.UseTechnicalNames import org.junit.runner.RunWith -import org.junit.runners.Suite -import java.io.File -import kotlin.test.assertTrue /* * NB: ALL NECESSARY FLAGS ARE PASSED THROUGH Gradle */ -@Suite.SuiteClasses( +@SelectClasses( + BlackBoxCodegenTestGenerated::class, BlackBoxInlineCodegenTestGenerated::class, CompileKotlinAgainstInlineKotlinTestGenerated::class, - CompileKotlinAgainstKotlinTestGenerated::class, - BlackBoxAgainstJavaCodegenTestGenerated::class + + IrBlackBoxCodegenTestGenerated::class, + IrBlackBoxInlineCodegenTestGenerated::class, + IrCompileKotlinAgainstInlineKotlinTestGenerated::class ) +@IncludeClassNamePatterns(".*Test.*Generated") +@UseTechnicalNames abstract class CustomJvmTargetOnJvmBaseTest @RunOnlyJdk6Test -@RunWith(SuiteRunnerForCustomJdk::class) -class JvmTarget6OnJvm6 : CustomJvmTargetOnJvmBaseTest() { +@Execution(ExecutionMode.SAME_THREAD) +@RunWith(JUnitPlatformRunnerForJdk6::class) +class JvmTarget6OnJvm6 : CustomJvmTargetOnJvmBaseTest() - companion object { - - private lateinit var jdkProcess: Process - - @JvmStatic - @BeforeClass - fun setUp() { - println("Configuring JDK6 Test server...") - val jdkPath = System.getenv("JDK_16") ?: error("JDK_16 is not optional to run this test") - - val executable = File(jdkPath, "bin/java").canonicalPath - val main = "org.jetbrains.kotlin.test.clientserver.TestProcessServer" - val classpath = - System.getProperty("kotlin.test.box.in.separate.process.server.classpath") ?: System.getProperty("java.class.path") - - println("Server classpath: $classpath") - val port = BOX_IN_SEPARATE_PROCESS_PORT ?: error("kotlin.test.box.in.separate.process.port is not specified") - val builder = ProcessBuilder(executable, "-cp", classpath, main, port) - - builder.inheritIO() - - println("Starting JDK 6 server $executable...") - jdkProcess = builder.start() - Thread.sleep(2000) - assertTrue(jdkProcess.isAlive, "Test server process hasn't started") - println("Test server started!") - Runtime.getRuntime().addShutdownHook(object : Thread() { - override fun run() { - tearDown() - } - }) - } - - @JvmStatic - @AfterClass - fun tearDown() { - println("Stopping JDK 6 server...") - if (::jdkProcess.isInitialized) { - jdkProcess.destroy() - } - } - } -} - -@RunWith(SuiteRunnerForCustomJdk::class) +@RunWith(JUnitPlatform::class) class JvmTarget8OnJvm8 : CustomJvmTargetOnJvmBaseTest() -@RunWith(SuiteRunnerForCustomJdk::class) +@RunWith(JUnitPlatform::class) class JvmTarget6OnJvm11 : CustomJvmTargetOnJvmBaseTest() -@RunWith(SuiteRunnerForCustomJdk::class) +@RunWith(JUnitPlatform::class) class JvmTarget8OnJvm11 : CustomJvmTargetOnJvmBaseTest() -@RunWith(SuiteRunnerForCustomJdk::class) +@RunWith(JUnitPlatform::class) class JvmTarget11OnJvm11 : CustomJvmTargetOnJvmBaseTest() -@RunWith(SuiteRunnerForCustomJdk::class) +@RunWith(JUnitPlatform::class) class JvmTarget6OnJvmLast : CustomJvmTargetOnJvmBaseTest() -@RunWith(SuiteRunnerForCustomJdk::class) +@RunWith(JUnitPlatform::class) class JvmTarget8OnJvmLast : CustomJvmTargetOnJvmBaseTest() -@RunWith(SuiteRunnerForCustomJdk::class) +@RunWith(JUnitPlatform::class) class JvmTargetLastOnJvmLast : CustomJvmTargetOnJvmBaseTest() //TODO: delete old tasks -@RunWith(SuiteRunnerForCustomJdk::class) +@RunWith(JUnitPlatform::class) class JvmTarget6OnJvm9 : CustomJvmTargetOnJvmBaseTest() -@RunWith(SuiteRunnerForCustomJdk::class) +@RunWith(JUnitPlatform::class) class JvmTarget8OnJvm9 : CustomJvmTargetOnJvmBaseTest() -@RunWith(SuiteRunnerForCustomJdk::class) +@RunWith(JUnitPlatform::class) class JvmTarget9OnJvm9 : CustomJvmTargetOnJvmBaseTest() diff --git a/compiler/tests-different-jdk/tests/org/jetbrains/kotlin/codegen/jdk/JUnitPlatformRunnerForJdk6.kt b/compiler/tests-different-jdk/tests/org/jetbrains/kotlin/codegen/jdk/JUnitPlatformRunnerForJdk6.kt new file mode 100644 index 00000000000..2ca1961b934 --- /dev/null +++ b/compiler/tests-different-jdk/tests/org/jetbrains/kotlin/codegen/jdk/JUnitPlatformRunnerForJdk6.kt @@ -0,0 +1,54 @@ +/* + * Copyright 2010-2021 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. + */ + +package org.jetbrains.kotlin.codegen.jdk + +import org.jetbrains.kotlin.test.InTextDirectivesUtils +import org.jetbrains.kotlin.test.TestMetadata +import org.junit.platform.runner.JUnitPlatform +import org.junit.runner.Description +import org.junit.runner.manipulation.Filter +import org.junit.runner.notification.RunNotifier +import java.io.File + +annotation class RunOnlyJdk6Test + +class JUnitPlatformRunnerForJdk6(testClass: Class<*>) : JUnitPlatform(testClass) { + init { + if (testClass.getAnnotation(RunOnlyJdk6Test::class.java) != null) { + this.filter(object : Filter() { + override fun shouldRun(description: Description): Boolean { + if (description.isTest) { + @Suppress("NAME_SHADOWING") + val testClass = description.testClass ?: return true + val methodName = description.methodName ?: return true + + val testClassAnnotation = testClass.getAnnotation(TestMetadata::class.java) ?: return true + val method = testClass.getMethod(methodName) + val methodAnnotation = method.getAnnotation(TestMetadata::class.java) ?: return true + val path = "${testClassAnnotation.value}/${methodAnnotation.value}" + val fileText = File(path).readText() + return !InTextDirectivesUtils.isDirectiveDefined(fileText, "// JVM_TARGET:") && + !InTextDirectivesUtils.isDirectiveDefined(fileText, "// SKIP_JDK6") + } + return true + } + + override fun describe(): String { + return "skipped on JDK 6" + } + }) + } + } + + override fun run(notifier: RunNotifier?) { + SeparateJavaProcessHelper.setUp() + try { + super.run(notifier) + } finally { + SeparateJavaProcessHelper.tearDown() + } + } +} diff --git a/compiler/tests-different-jdk/tests/org/jetbrains/kotlin/codegen/jdk/SeparateJavaProcessHelper.kt b/compiler/tests-different-jdk/tests/org/jetbrains/kotlin/codegen/jdk/SeparateJavaProcessHelper.kt new file mode 100644 index 00000000000..45b90628c7a --- /dev/null +++ b/compiler/tests-different-jdk/tests/org/jetbrains/kotlin/codegen/jdk/SeparateJavaProcessHelper.kt @@ -0,0 +1,71 @@ +/* + * Copyright 2010-2021 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. + */ + +package org.jetbrains.kotlin.codegen.jdk + +import org.jetbrains.kotlin.codegen.CodegenTestCase +import java.io.File +import java.util.concurrent.locks.ReentrantLock +import kotlin.concurrent.withLock +import kotlin.test.assertTrue + +object SeparateJavaProcessHelper { + private lateinit var jdkProcess: Process + + private val lock = ReentrantLock() + private var counter = 0 + + fun setUp() { + lock.withLock { + if (counter == 0) { + initJdkProcess() + } + counter += 1 + } + } + + fun tearDown() { + lock.withLock { + counter -= 1 + if (counter == 0) { + destroyJdkProcess() + } + } + } + + private fun initJdkProcess() { + println("Configuring JDK6 Test server...") + val jdkPath = System.getenv("JDK_16") ?: error("JDK_16 is not optional to run this test") + + val executable = File(jdkPath, "bin/java").canonicalPath + val main = "org.jetbrains.kotlin.test.clientserver.TestProcessServer" + val classpath = + System.getProperty("kotlin.test.box.in.separate.process.server.classpath") ?: System.getProperty("java.class.path") + + println("Server classpath: $classpath") + val port = CodegenTestCase.BOX_IN_SEPARATE_PROCESS_PORT ?: error("kotlin.test.box.in.separate.process.port is not specified") + val builder = ProcessBuilder(executable, "-cp", classpath, main, port) + + builder.inheritIO() + + println("Starting JDK 6 server $executable...") + jdkProcess = builder.start() + Thread.sleep(2000) + assertTrue(jdkProcess.isAlive, "Test server process hasn't started") + println("Test server started!") + Runtime.getRuntime().addShutdownHook(object : Thread() { + override fun run() { + destroyJdkProcess() + } + }) + } + + private fun destroyJdkProcess() { + println("Stopping JDK 6 server...") + if (::jdkProcess.isInitialized) { + jdkProcess.destroy() + } + } +} diff --git a/compiler/tests-for-compiler-generator/build.gradle.kts b/compiler/tests-for-compiler-generator/build.gradle.kts index 2ea78ef228c..df4fb78dd2a 100644 --- a/compiler/tests-for-compiler-generator/build.gradle.kts +++ b/compiler/tests-for-compiler-generator/build.gradle.kts @@ -7,8 +7,7 @@ dependencies { testRuntimeOnly(intellijDep()) // Should come before compiler, because of "progarded" stuff needed for tests testImplementation(kotlinStdlib()) - testImplementation(platform("org.junit:junit-bom:5.7.0")) - testImplementation("org.junit.jupiter:junit-jupiter") + testApiJUnit5() testImplementation(projectTests(":compiler:tests-common")) testImplementation(projectTests(":compiler:test-infrastructure")) testImplementation(projectTests(":compiler:tests-common-new")) diff --git a/compiler/tests-for-compiler-generator/tests/org/jetbrains/kotlin/test/generators/GenerateJUnit3CompilerTests.kt b/compiler/tests-for-compiler-generator/tests/org/jetbrains/kotlin/test/generators/GenerateJUnit3CompilerTests.kt index dffe91dede0..59cb06b003b 100644 --- a/compiler/tests-for-compiler-generator/tests/org/jetbrains/kotlin/test/generators/GenerateJUnit3CompilerTests.kt +++ b/compiler/tests-for-compiler-generator/tests/org/jetbrains/kotlin/test/generators/GenerateJUnit3CompilerTests.kt @@ -97,7 +97,12 @@ fun generateJUnit3CompilerTests(args: Array) { testClass { // "ranges/stepped" is excluded because it contains hundreds of generated tests and only have a box() method. // There isn't much to be gained from running light analysis tests on them. - model("codegen/box", targetBackend = TargetBackend.JVM, skipIgnored = true, excludeDirs = listOf("ranges/stepped")) + model( + "codegen/box", + targetBackend = TargetBackend.JVM, + skipIgnored = true, + excludeDirs = listOf("ranges/stepped", "compileKotlinAgainstKotlin") + ) } testClass { @@ -108,14 +113,6 @@ fun generateJUnit3CompilerTests(args: Array) { model("codegen/asmLike", targetBackend = TargetBackend.JVM) } - testClass { - model("codegen/boxInline", targetBackend = TargetBackend.JVM) - } - - testClass { - model("codegen/boxAgainstJava") - } - testClass { model("codegen/java15/box") } @@ -263,10 +260,6 @@ fun generateJUnit3CompilerTests(args: Array) { ) } - testClass { - model("compileKotlinAgainstKotlin") - } - testClass { model("compileKotlinAgainstKotlinJdk15") } @@ -369,10 +362,6 @@ fun generateJUnit3CompilerTests(args: Array) { model("codegen/composeLikeBytecodeText", targetBackend = TargetBackend.JVM_IR) } - testClass { - model("codegen/boxAgainstJava", targetBackend = TargetBackend.JVM_IR, excludeDirs = listOf("oldLanguageVersions")) - } - testClass { model( "compileJavaAgainstKotlin", @@ -403,19 +392,6 @@ fun generateJUnit3CompilerTests(args: Array) { ) } - testClass { - model("compileKotlinAgainstKotlin", targetBackend = TargetBackend.JVM_IR) - } - testClass { - model("compileKotlinAgainstKotlin", targetBackend = TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD) - } - testClass { - model( - "compileKotlinAgainstKotlin", - targetBackend = TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR - ) - } - testClass { model("codegen/bytecodeListing", targetBackend = TargetBackend.JVM_IR) } @@ -476,10 +452,6 @@ fun generateJUnit3CompilerTests(args: Array) { model("debug/localVariables", targetBackend = TargetBackend.JVM_IR) } - testClass { - model("codegen/boxInline", targetBackend = TargetBackend.JVM_IR) - } - testClass { model("codegen/asmLike", targetBackend = TargetBackend.JVM_IR) } @@ -489,46 +461,6 @@ fun generateJUnit3CompilerTests(args: Array) { } } - testGroup( - "compiler/fir/fir2ir/tests-gen", "compiler/testData", - testRunnerMethodName = "runTestWithCustomIgnoreDirective", - additionalRunnerArguments = listOf("\"// IGNORE_BACKEND_FIR: \"") - ) { - testClass { - model("codegen/boxInline", targetBackend = TargetBackend.JVM_IR, excludeDirs = listOf("oldLanguageVersions")) - } - - testClass { - model("codegen/boxAgainstJava", targetBackend = TargetBackend.JVM_IR, excludeDirs = listOf("oldLanguageVersions")) - } - - testClass { - model("compileKotlinAgainstKotlin", targetBackend = TargetBackend.JVM_IR) - } - } - - testGroup( - "compiler/tests-gen", "compiler/testData", - testRunnerMethodName = "runTestWithCustomIgnoreDirective", - additionalRunnerArguments = listOf("\"// IGNORE_BACKEND_MULTI_MODULE: \"") - ) { - testClass { - model("codegen/boxInline", targetBackend = TargetBackend.JVM) - } - testClass { - model("codegen/boxInline", targetBackend = TargetBackend.JVM_IR) - } - testClass { - model("codegen/boxInline", targetBackend = TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD) - } - testClass { - model( - "codegen/boxInline", - targetBackend = TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR - ) - } - } - testGroup("compiler/fir/raw-fir/psi2fir/tests-gen", "compiler/fir/raw-fir/psi2fir/testData") { testClass { model("rawBuilder", testMethod = "doRawFirTest") diff --git a/compiler/tests-for-compiler-generator/tests/org/jetbrains/kotlin/test/generators/GenerateJUnit5CompilerTests.kt b/compiler/tests-for-compiler-generator/tests/org/jetbrains/kotlin/test/generators/GenerateJUnit5CompilerTests.kt index cd795baedc4..15b26f7860a 100644 --- a/compiler/tests-for-compiler-generator/tests/org/jetbrains/kotlin/test/generators/GenerateJUnit5CompilerTests.kt +++ b/compiler/tests-for-compiler-generator/tests/org/jetbrains/kotlin/test/generators/GenerateJUnit5CompilerTests.kt @@ -68,6 +68,14 @@ fun generateJUnit5CompilerTests(args: Array) { model("codegen/box", excludeDirs = listOf("oldLanguageVersions")) } + testClass { + model("codegen/box/compileKotlinAgainstKotlin") + } + + testClass { + model("codegen/box/compileKotlinAgainstKotlin") + } + testClass { model("ir/irText") } @@ -79,6 +87,30 @@ fun generateJUnit5CompilerTests(args: Array) { testClass { model("codegen/bytecodeText", excludeDirs = listOf("oldLanguageVersions")) } + + testClass { + model("codegen/boxInline") + } + + testClass { + model("codegen/boxInline") + } + + testClass { + model("codegen/boxInline") + } + + testClass { + model("codegen/boxInline") + } + + testClass { + model("codegen/boxInline") + } + + testClass { + model("codegen/boxInline") + } } // ---------------------------------------------- FIR tests ---------------------------------------------- @@ -88,10 +120,16 @@ fun generateJUnit5CompilerTests(args: Array) { model("diagnostics/tests", excludedPattern = excludedFirTestdataPattern) model("diagnostics/testsWithStdLib", excludedPattern = excludedFirTestdataPattern) } + } + testGroup(testsRoot = "compiler/fir/fir2ir/tests-gen", testDataRoot = "compiler/testData") { testClass { model("codegen/box", excludeDirs = listOf("oldLanguageVersions")) } + + testClass { + model("codegen/boxInline", excludeDirs = listOf("oldLanguageVersions")) + } } testGroup("compiler/fir/analysis-tests/tests-gen", "compiler/fir/analysis-tests/testData") { @@ -108,7 +146,7 @@ fun generateJUnit5CompilerTests(args: Array) { } } - testGroup(testsRoot = "compiler/fir/analysis-tests/tests-gen", testDataRoot = "compiler/testData") { + testGroup(testsRoot = "compiler/fir/fir2ir/tests-gen", testDataRoot = "compiler/testData") { testClass { model("ir/irText") } diff --git a/compiler/tests-gen/org/jetbrains/kotlin/asJava/CompilerLightClassTestGenerated.java b/compiler/tests-gen/org/jetbrains/kotlin/asJava/CompilerLightClassTestGenerated.java index b20a2d87734..d4cd77b162d 100644 --- a/compiler/tests-gen/org/jetbrains/kotlin/asJava/CompilerLightClassTestGenerated.java +++ b/compiler/tests-gen/org/jetbrains/kotlin/asJava/CompilerLightClassTestGenerated.java @@ -149,6 +149,11 @@ public class CompilerLightClassTestGenerated extends AbstractCompilerLightClassT runTest("compiler/testData/asJava/lightClasses/SpecialAnnotationsOnAnnotationClass.kt"); } + @TestMetadata("SpecialAnnotationsOnAnnotationClass_1_6.kt") + public void testSpecialAnnotationsOnAnnotationClass_1_6() throws Exception { + runTest("compiler/testData/asJava/lightClasses/SpecialAnnotationsOnAnnotationClass_1_6.kt"); + } + @TestMetadata("StubOrderForOverloads.kt") public void testStubOrderForOverloads() throws Exception { runTest("compiler/testData/asJava/lightClasses/StubOrderForOverloads.kt"); diff --git a/compiler/tests-gen/org/jetbrains/kotlin/cli/CliTestGenerated.java b/compiler/tests-gen/org/jetbrains/kotlin/cli/CliTestGenerated.java index 445389dac65..e434fa6c490 100644 --- a/compiler/tests-gen/org/jetbrains/kotlin/cli/CliTestGenerated.java +++ b/compiler/tests-gen/org/jetbrains/kotlin/cli/CliTestGenerated.java @@ -536,6 +536,11 @@ public class CliTestGenerated extends AbstractCliTest { runTest("compiler/testData/cli/jvm/jsr305Warn.args"); } + @TestMetadata("jvm6Target.args") + public void testJvm6Target() throws Exception { + runTest("compiler/testData/cli/jvm/jvm6Target.args"); + } + @TestMetadata("jvm8Target.args") public void testJvm8Target() throws Exception { runTest("compiler/testData/cli/jvm/jvm8Target.args"); diff --git a/compiler/tests-gen/org/jetbrains/kotlin/codegen/BlackBoxAgainstJavaCodegenTestGenerated.java b/compiler/tests-gen/org/jetbrains/kotlin/codegen/BlackBoxAgainstJavaCodegenTestGenerated.java deleted file mode 100644 index 837d3d2cbd0..00000000000 --- a/compiler/tests-gen/org/jetbrains/kotlin/codegen/BlackBoxAgainstJavaCodegenTestGenerated.java +++ /dev/null @@ -1,1309 +0,0 @@ -/* - * Copyright 2010-2021 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. - */ - -package org.jetbrains.kotlin.codegen; - -import com.intellij.testFramework.TestDataPath; -import org.jetbrains.kotlin.test.JUnit3RunnerWithInners; -import org.jetbrains.kotlin.test.KotlinTestUtils; -import org.jetbrains.kotlin.test.util.KtTestUtil; -import org.jetbrains.kotlin.test.TestMetadata; -import org.junit.runner.RunWith; - -import java.io.File; -import java.util.regex.Pattern; - -/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */ -@SuppressWarnings("all") -@TestMetadata("compiler/testData/codegen/boxAgainstJava") -@TestDataPath("$PROJECT_ROOT") -@RunWith(JUnit3RunnerWithInners.class) -public class BlackBoxAgainstJavaCodegenTestGenerated extends AbstractBlackBoxAgainstJavaCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - public void testAllFilesPresentInBoxAgainstJava() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava"), Pattern.compile("^(.+)\\.kt$"), null, true); - } - - @TestMetadata("compiler/testData/codegen/boxAgainstJava/annotations") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Annotations extends AbstractBlackBoxAgainstJavaCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - public void testAllFilesPresentInAnnotations() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/annotations"), Pattern.compile("^(.+)\\.kt$"), null, true); - } - - @TestMetadata("divisionByZeroInJava.kt") - public void testDivisionByZeroInJava() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/annotations/divisionByZeroInJava.kt"); - } - - @TestMetadata("javaAnnotationArrayValueDefault.kt") - public void testJavaAnnotationArrayValueDefault() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/annotations/javaAnnotationArrayValueDefault.kt"); - } - - @TestMetadata("javaAnnotationArrayValueNoDefault.kt") - public void testJavaAnnotationArrayValueNoDefault() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/annotations/javaAnnotationArrayValueNoDefault.kt"); - } - - @TestMetadata("javaAnnotationCall.kt") - public void testJavaAnnotationCall() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/annotations/javaAnnotationCall.kt"); - } - - @TestMetadata("javaAnnotationDefault.kt") - public void testJavaAnnotationDefault() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/annotations/javaAnnotationDefault.kt"); - } - - @TestMetadata("javaNegativePropertyAsAnnotationParameter.kt") - public void testJavaNegativePropertyAsAnnotationParameter() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/annotations/javaNegativePropertyAsAnnotationParameter.kt"); - } - - @TestMetadata("javaPropertyAsAnnotationParameter.kt") - public void testJavaPropertyAsAnnotationParameter() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/annotations/javaPropertyAsAnnotationParameter.kt"); - } - - @TestMetadata("javaPropertyWithIntInitializer.kt") - public void testJavaPropertyWithIntInitializer() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/annotations/javaPropertyWithIntInitializer.kt"); - } - - @TestMetadata("retentionInJava.kt") - public void testRetentionInJava() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/annotations/retentionInJava.kt"); - } - - @TestMetadata("compiler/testData/codegen/boxAgainstJava/annotations/kClassMapping") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class KClassMapping extends AbstractBlackBoxAgainstJavaCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - public void testAllFilesPresentInKClassMapping() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/annotations/kClassMapping"), Pattern.compile("^(.+)\\.kt$"), null, true); - } - - @TestMetadata("arrayClassParameter.kt") - public void testArrayClassParameter() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/annotations/kClassMapping/arrayClassParameter.kt"); - } - - @TestMetadata("arrayClassParameterOnJavaClass.kt") - public void testArrayClassParameterOnJavaClass() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/annotations/kClassMapping/arrayClassParameterOnJavaClass.kt"); - } - - @TestMetadata("classParameter.kt") - public void testClassParameter() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/annotations/kClassMapping/classParameter.kt"); - } - - @TestMetadata("classParameterOnJavaClass.kt") - public void testClassParameterOnJavaClass() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/annotations/kClassMapping/classParameterOnJavaClass.kt"); - } - - @TestMetadata("varargClassParameter.kt") - public void testVarargClassParameter() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/annotations/kClassMapping/varargClassParameter.kt"); - } - - @TestMetadata("varargClassParameterOnJavaClass.kt") - public void testVarargClassParameterOnJavaClass() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/annotations/kClassMapping/varargClassParameterOnJavaClass.kt"); - } - } - - @TestMetadata("compiler/testData/codegen/boxAgainstJava/annotations/typeAnnotations") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class TypeAnnotations extends AbstractBlackBoxAgainstJavaCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - public void testAllFilesPresentInTypeAnnotations() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/annotations/typeAnnotations"), Pattern.compile("^(.+)\\.kt$"), null, true); - } - - @TestMetadata("implicitReturn.kt") - public void testImplicitReturn() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/annotations/typeAnnotations/implicitReturn.kt"); - } - } - } - - @TestMetadata("compiler/testData/codegen/boxAgainstJava/callableReference") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class CallableReference extends AbstractBlackBoxAgainstJavaCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - public void testAllFilesPresentInCallableReference() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/callableReference"), Pattern.compile("^(.+)\\.kt$"), null, true); - } - - @TestMetadata("constructor.kt") - public void testConstructor() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/callableReference/constructor.kt"); - } - - @TestMetadata("kt16412.kt") - public void testKt16412() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/callableReference/kt16412.kt"); - } - - @TestMetadata("publicFinalField.kt") - public void testPublicFinalField() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/callableReference/publicFinalField.kt"); - } - - @TestMetadata("publicMutableField.kt") - public void testPublicMutableField() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/callableReference/publicMutableField.kt"); - } - - @TestMetadata("staticMethod.kt") - public void testStaticMethod() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/callableReference/staticMethod.kt"); - } - } - - @TestMetadata("compiler/testData/codegen/boxAgainstJava/constructor") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Constructor extends AbstractBlackBoxAgainstJavaCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - public void testAllFilesPresentInConstructor() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/constructor"), Pattern.compile("^(.+)\\.kt$"), null, true); - } - - @TestMetadata("genericConstructor.kt") - public void testGenericConstructor() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/constructor/genericConstructor.kt"); - } - - @TestMetadata("secondaryConstructor.kt") - public void testSecondaryConstructor() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/constructor/secondaryConstructor.kt"); - } - } - - @TestMetadata("compiler/testData/codegen/boxAgainstJava/delegation") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Delegation extends AbstractBlackBoxAgainstJavaCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - public void testAllFilesPresentInDelegation() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/delegation"), Pattern.compile("^(.+)\\.kt$"), null, true); - } - - @TestMetadata("delegationAndInheritanceFromJava.kt") - public void testDelegationAndInheritanceFromJava() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/delegation/delegationAndInheritanceFromJava.kt"); - } - } - - @TestMetadata("compiler/testData/codegen/boxAgainstJava/enum") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Enum extends AbstractBlackBoxAgainstJavaCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - public void testAllFilesPresentInEnum() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/enum"), Pattern.compile("^(.+)\\.kt$"), null, true); - } - - @TestMetadata("nameConflict.kt") - public void testNameConflict() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/enum/nameConflict.kt"); - } - - @TestMetadata("simpleJavaEnum.kt") - public void testSimpleJavaEnum() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/enum/simpleJavaEnum.kt"); - } - - @TestMetadata("simpleJavaEnumWithFunction.kt") - public void testSimpleJavaEnumWithFunction() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/enum/simpleJavaEnumWithFunction.kt"); - } - - @TestMetadata("simpleJavaEnumWithStaticImport.kt") - public void testSimpleJavaEnumWithStaticImport() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/enum/simpleJavaEnumWithStaticImport.kt"); - } - - @TestMetadata("simpleJavaInnerEnum.kt") - public void testSimpleJavaInnerEnum() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/enum/simpleJavaInnerEnum.kt"); - } - - @TestMetadata("staticField.kt") - public void testStaticField() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/enum/staticField.kt"); - } - - @TestMetadata("staticMethod.kt") - public void testStaticMethod() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/enum/staticMethod.kt"); - } - } - - @TestMetadata("compiler/testData/codegen/boxAgainstJava/functions") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Functions extends AbstractBlackBoxAgainstJavaCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - public void testAllFilesPresentInFunctions() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/functions"), Pattern.compile("^(.+)\\.kt$"), null, true); - } - - @TestMetadata("constructor.kt") - public void testConstructor() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/functions/constructor.kt"); - } - - @TestMetadata("max.kt") - public void testMax() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/functions/max.kt"); - } - - @TestMetadata("referencesStaticInnerClassMethod.kt") - public void testReferencesStaticInnerClassMethod() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/functions/referencesStaticInnerClassMethod.kt"); - } - - @TestMetadata("referencesStaticInnerClassMethodL2.kt") - public void testReferencesStaticInnerClassMethodL2() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/functions/referencesStaticInnerClassMethodL2.kt"); - } - - @TestMetadata("unrelatedUpperBounds.kt") - public void testUnrelatedUpperBounds() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/functions/unrelatedUpperBounds.kt"); - } - } - - @TestMetadata("compiler/testData/codegen/boxAgainstJava/ieee754") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Ieee754 extends AbstractBlackBoxAgainstJavaCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - public void testAllFilesPresentInIeee754() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/ieee754"), Pattern.compile("^(.+)\\.kt$"), null, true); - } - - @TestMetadata("anyToReal.kt") - public void testAnyToReal() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/ieee754/anyToReal.kt"); - } - - @TestMetadata("comparableTypeCast.kt") - public void testComparableTypeCast() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/ieee754/comparableTypeCast.kt"); - } - - @TestMetadata("double.kt") - public void testDouble() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/ieee754/double.kt"); - } - - @TestMetadata("explicitCompareCall.kt") - public void testExplicitCompareCall() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/ieee754/explicitCompareCall.kt"); - } - - @TestMetadata("explicitEqualsCall.kt") - public void testExplicitEqualsCall() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/ieee754/explicitEqualsCall.kt"); - } - - @TestMetadata("float.kt") - public void testFloat() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/ieee754/float.kt"); - } - - @TestMetadata("generic.kt") - public void testGeneric() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/ieee754/generic.kt"); - } - - @TestMetadata("nullableAnyToReal.kt") - public void testNullableAnyToReal() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/ieee754/nullableAnyToReal.kt"); - } - } - - @TestMetadata("compiler/testData/codegen/boxAgainstJava/inline") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Inline extends AbstractBlackBoxAgainstJavaCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - public void testAllFilesPresentInInline() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/inline"), Pattern.compile("^(.+)\\.kt$"), null, true); - } - - @TestMetadata("kt19910.kt") - public void testKt19910() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/inline/kt19910.kt"); - } - } - - @TestMetadata("compiler/testData/codegen/boxAgainstJava/innerClass") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class InnerClass extends AbstractBlackBoxAgainstJavaCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - public void testAllFilesPresentInInnerClass() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/innerClass"), Pattern.compile("^(.+)\\.kt$"), null, true); - } - - @TestMetadata("kt3532.kt") - public void testKt3532() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/innerClass/kt3532.kt"); - } - - @TestMetadata("kt3812.kt") - public void testKt3812() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/innerClass/kt3812.kt"); - } - - @TestMetadata("kt4036.kt") - public void testKt4036() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/innerClass/kt4036.kt"); - } - } - - @TestMetadata("compiler/testData/codegen/boxAgainstJava/interfaces") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Interfaces extends AbstractBlackBoxAgainstJavaCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - public void testAllFilesPresentInInterfaces() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/interfaces"), Pattern.compile("^(.+)\\.kt$"), null, true); - } - - @TestMetadata("defaultMethod.kt") - public void testDefaultMethod() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/interfaces/defaultMethod.kt"); - } - - @TestMetadata("inheritJavaInterface.kt") - public void testInheritJavaInterface() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/interfaces/inheritJavaInterface.kt"); - } - } - - @TestMetadata("compiler/testData/codegen/boxAgainstJava/multiplatform") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Multiplatform extends AbstractBlackBoxAgainstJavaCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - public void testAllFilesPresentInMultiplatform() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/multiplatform"), Pattern.compile("^(.+)\\.kt$"), null, true); - } - - @TestMetadata("annotationsViaActualTypeAliasFromBinary.kt") - public void testAnnotationsViaActualTypeAliasFromBinary() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/multiplatform/annotationsViaActualTypeAliasFromBinary.kt"); - } - } - - @TestMetadata("compiler/testData/codegen/boxAgainstJava/notNullAssertions") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class NotNullAssertions extends AbstractBlackBoxAgainstJavaCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - public void testAllFilesPresentInNotNullAssertions() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/notNullAssertions"), Pattern.compile("^(.+)\\.kt$"), null, true); - } - - @TestMetadata("callAssertions.kt") - public void testCallAssertions() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/notNullAssertions/callAssertions.kt"); - } - - @TestMetadata("delegation.kt") - public void testDelegation() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/notNullAssertions/delegation.kt"); - } - - @TestMetadata("doGenerateParamAssertions.kt") - public void testDoGenerateParamAssertions() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/notNullAssertions/doGenerateParamAssertions.kt"); - } - - @TestMetadata("noCallAssertions.kt") - public void testNoCallAssertions() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/notNullAssertions/noCallAssertions.kt"); - } - - @TestMetadata("rightElvisOperand.kt") - public void testRightElvisOperand() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/notNullAssertions/rightElvisOperand.kt"); - } - } - - @TestMetadata("compiler/testData/codegen/boxAgainstJava/oldLanguageVersions") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class OldLanguageVersions extends AbstractBlackBoxAgainstJavaCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - public void testAllFilesPresentInOldLanguageVersions() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/oldLanguageVersions"), Pattern.compile("^(.+)\\.kt$"), null, true); - } - - @TestMetadata("compiler/testData/codegen/boxAgainstJava/oldLanguageVersions/ieee754") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Ieee754 extends AbstractBlackBoxAgainstJavaCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - public void testAllFilesPresentInIeee754() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/oldLanguageVersions/ieee754"), Pattern.compile("^(.+)\\.kt$"), null, true); - } - - @TestMetadata("explicitEqualsCallNull.kt") - public void testExplicitEqualsCallNull() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/oldLanguageVersions/ieee754/explicitEqualsCallNull.kt"); - } - } - } - - @TestMetadata("compiler/testData/codegen/boxAgainstJava/platformTypes") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class PlatformTypes extends AbstractBlackBoxAgainstJavaCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - public void testAllFilesPresentInPlatformTypes() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/platformTypes"), Pattern.compile("^(.+)\\.kt$"), null, true); - } - - @TestMetadata("genericUnit.kt") - public void testGenericUnit() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/platformTypes/genericUnit.kt"); - } - - @TestMetadata("kt14989.kt") - public void testKt14989() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/platformTypes/kt14989.kt"); - } - - @TestMetadata("specializedMapFull.kt") - public void testSpecializedMapFull() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/platformTypes/specializedMapFull.kt"); - } - - @TestMetadata("specializedMapPut.kt") - public void testSpecializedMapPut() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/platformTypes/specializedMapPut.kt"); - } - } - - @TestMetadata("compiler/testData/codegen/boxAgainstJava/property") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Property extends AbstractBlackBoxAgainstJavaCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - public void testAllFilesPresentInProperty() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/property"), Pattern.compile("^(.+)\\.kt$"), null, true); - } - - @TestMetadata("fieldAccessFromExtensionInTraitImpl.kt") - public void testFieldAccessFromExtensionInTraitImpl() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/property/fieldAccessFromExtensionInTraitImpl.kt"); - } - - @TestMetadata("fieldAccessViaSubclass.kt") - public void testFieldAccessViaSubclass() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/property/fieldAccessViaSubclass.kt"); - } - - @TestMetadata("referenceToJavaFieldViaBridge.kt") - public void testReferenceToJavaFieldViaBridge() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/property/referenceToJavaFieldViaBridge.kt"); - } - } - - @TestMetadata("compiler/testData/codegen/boxAgainstJava/recursiveRawTypes") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class RecursiveRawTypes extends AbstractBlackBoxAgainstJavaCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - public void testAllFilesPresentInRecursiveRawTypes() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/recursiveRawTypes"), Pattern.compile("^(.+)\\.kt$"), null, true); - } - - @TestMetadata("kt16528.kt") - public void testKt16528() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/recursiveRawTypes/kt16528.kt"); - } - - @TestMetadata("kt16639.kt") - public void testKt16639() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/recursiveRawTypes/kt16639.kt"); - } - } - - @TestMetadata("compiler/testData/codegen/boxAgainstJava/reflection") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Reflection extends AbstractBlackBoxAgainstJavaCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - public void testAllFilesPresentInReflection() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/reflection"), Pattern.compile("^(.+)\\.kt$"), null, true); - } - - @TestMetadata("compiler/testData/codegen/boxAgainstJava/reflection/classLiterals") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class ClassLiterals extends AbstractBlackBoxAgainstJavaCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - public void testAllFilesPresentInClassLiterals() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/reflection/classLiterals"), Pattern.compile("^(.+)\\.kt$"), null, true); - } - - @TestMetadata("javaClassLiteral.kt") - public void testJavaClassLiteral() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/reflection/classLiterals/javaClassLiteral.kt"); - } - } - - @TestMetadata("compiler/testData/codegen/boxAgainstJava/reflection/mapping") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Mapping extends AbstractBlackBoxAgainstJavaCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - public void testAllFilesPresentInMapping() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/reflection/mapping"), Pattern.compile("^(.+)\\.kt$"), null, true); - } - - @TestMetadata("jClass2kClass.kt") - public void testJClass2kClass() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/reflection/mapping/jClass2kClass.kt"); - } - - @TestMetadata("javaConstructor.kt") - public void testJavaConstructor() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/reflection/mapping/javaConstructor.kt"); - } - - @TestMetadata("javaFields.kt") - public void testJavaFields() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/reflection/mapping/javaFields.kt"); - } - - @TestMetadata("javaMethods.kt") - public void testJavaMethods() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/reflection/mapping/javaMethods.kt"); - } - } - - @TestMetadata("compiler/testData/codegen/boxAgainstJava/reflection/properties") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Properties extends AbstractBlackBoxAgainstJavaCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - public void testAllFilesPresentInProperties() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/reflection/properties"), Pattern.compile("^(.+)\\.kt$"), null, true); - } - - @TestMetadata("equalsHashCodeToString.kt") - public void testEqualsHashCodeToString() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/reflection/properties/equalsHashCodeToString.kt"); - } - } - } - - @TestMetadata("compiler/testData/codegen/boxAgainstJava/sam") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Sam extends AbstractBlackBoxAgainstJavaCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - public void testAllFilesPresentInSam() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/sam"), Pattern.compile("^(.+)\\.kt$"), null, true); - } - - @TestMetadata("differentFqNames.kt") - public void testDifferentFqNames() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/differentFqNames.kt"); - } - - @TestMetadata("kt11519.kt") - public void testKt11519() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/kt11519.kt"); - } - - @TestMetadata("kt11519Constructor.kt") - public void testKt11519Constructor() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/kt11519Constructor.kt"); - } - - @TestMetadata("kt11696.kt") - public void testKt11696() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/kt11696.kt"); - } - - @TestMetadata("kt4753.kt") - public void testKt4753() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/kt4753.kt"); - } - - @TestMetadata("kt4753_2.kt") - public void testKt4753_2() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/kt4753_2.kt"); - } - - @TestMetadata("propertyReference.kt") - public void testPropertyReference() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/propertyReference.kt"); - } - - @TestMetadata("samConstructorGenericSignature.kt") - public void testSamConstructorGenericSignature() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/samConstructorGenericSignature.kt"); - } - - @TestMetadata("smartCastSamConversion.kt") - public void testSmartCastSamConversion() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/smartCastSamConversion.kt"); - } - - @TestMetadata("compiler/testData/codegen/boxAgainstJava/sam/adapters") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Adapters extends AbstractBlackBoxAgainstJavaCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - public void testAllFilesPresentInAdapters() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/sam/adapters"), Pattern.compile("^(.+)\\.kt$"), null, true); - } - - @TestMetadata("bridgesForOverridden.kt") - public void testBridgesForOverridden() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/bridgesForOverridden.kt"); - } - - @TestMetadata("bridgesForOverriddenComplex.kt") - public void testBridgesForOverriddenComplex() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/bridgesForOverriddenComplex.kt"); - } - - @TestMetadata("callAbstractAdapter.kt") - public void testCallAbstractAdapter() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/callAbstractAdapter.kt"); - } - - @TestMetadata("comparator.kt") - public void testComparator() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/comparator.kt"); - } - - @TestMetadata("constructor.kt") - public void testConstructor() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/constructor.kt"); - } - - @TestMetadata("doubleLongParameters.kt") - public void testDoubleLongParameters() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/doubleLongParameters.kt"); - } - - @TestMetadata("fileFilter.kt") - public void testFileFilter() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/fileFilter.kt"); - } - - @TestMetadata("genericSignature.kt") - public void testGenericSignature() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/genericSignature.kt"); - } - - @TestMetadata("implementAdapter.kt") - public void testImplementAdapter() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/implementAdapter.kt"); - } - - @TestMetadata("inheritedInKotlin.kt") - public void testInheritedInKotlin() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/inheritedInKotlin.kt"); - } - - @TestMetadata("inheritedOverriddenAdapter.kt") - public void testInheritedOverriddenAdapter() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/inheritedOverriddenAdapter.kt"); - } - - @TestMetadata("inheritedSimple.kt") - public void testInheritedSimple() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/inheritedSimple.kt"); - } - - @TestMetadata("localClass.kt") - public void testLocalClass() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/localClass.kt"); - } - - @TestMetadata("localObjectConstructor.kt") - public void testLocalObjectConstructor() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/localObjectConstructor.kt"); - } - - @TestMetadata("localObjectConstructorWithFnValue.kt") - public void testLocalObjectConstructorWithFnValue() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/localObjectConstructorWithFnValue.kt"); - } - - @TestMetadata("nonLiteralAndLiteralRunnable.kt") - public void testNonLiteralAndLiteralRunnable() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/nonLiteralAndLiteralRunnable.kt"); - } - - @TestMetadata("nonLiteralComparator.kt") - public void testNonLiteralComparator() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/nonLiteralComparator.kt"); - } - - @TestMetadata("nonLiteralInConstructor.kt") - public void testNonLiteralInConstructor() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/nonLiteralInConstructor.kt"); - } - - @TestMetadata("nonLiteralNull.kt") - public void testNonLiteralNull() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/nonLiteralNull.kt"); - } - - @TestMetadata("nonLiteralRunnable.kt") - public void testNonLiteralRunnable() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/nonLiteralRunnable.kt"); - } - - @TestMetadata("protectedFromBase.kt") - public void testProtectedFromBase() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/protectedFromBase.kt"); - } - - @TestMetadata("severalSamParameters.kt") - public void testSeveralSamParameters() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/severalSamParameters.kt"); - } - - @TestMetadata("simplest.kt") - public void testSimplest() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/simplest.kt"); - } - - @TestMetadata("superInSecondaryConstructor.kt") - public void testSuperInSecondaryConstructor() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/superInSecondaryConstructor.kt"); - } - - @TestMetadata("superconstructor.kt") - public void testSuperconstructor() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/superconstructor.kt"); - } - - @TestMetadata("superconstructorWithClosure.kt") - public void testSuperconstructorWithClosure() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/superconstructorWithClosure.kt"); - } - - @TestMetadata("typeParameterOfClass.kt") - public void testTypeParameterOfClass() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/typeParameterOfClass.kt"); - } - - @TestMetadata("typeParameterOfMethod.kt") - public void testTypeParameterOfMethod() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/typeParameterOfMethod.kt"); - } - - @TestMetadata("typeParameterOfOuterClass.kt") - public void testTypeParameterOfOuterClass() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/typeParameterOfOuterClass.kt"); - } - - @TestMetadata("compiler/testData/codegen/boxAgainstJava/sam/adapters/operators") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Operators extends AbstractBlackBoxAgainstJavaCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - public void testAllFilesPresentInOperators() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/sam/adapters/operators"), Pattern.compile("^(.+)\\.kt$"), null, true); - } - - @TestMetadata("augmentedAssignmentPure.kt") - public void testAugmentedAssignmentPure() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/operators/augmentedAssignmentPure.kt"); - } - - @TestMetadata("augmentedAssignmentViaSimpleBinary.kt") - public void testAugmentedAssignmentViaSimpleBinary() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/operators/augmentedAssignmentViaSimpleBinary.kt"); - } - - @TestMetadata("binary.kt") - public void testBinary() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/operators/binary.kt"); - } - - @TestMetadata("compareTo.kt") - public void testCompareTo() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/operators/compareTo.kt"); - } - - @TestMetadata("contains.kt") - public void testContains() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/operators/contains.kt"); - } - - @TestMetadata("get.kt") - public void testGet() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/operators/get.kt"); - } - - @TestMetadata("invoke.kt") - public void testInvoke() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/operators/invoke.kt"); - } - - @TestMetadata("legacyModOperator.kt") - public void testLegacyModOperator() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/operators/legacyModOperator.kt"); - } - - @TestMetadata("multiGetSet.kt") - public void testMultiGetSet() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/operators/multiGetSet.kt"); - } - - @TestMetadata("multiInvoke.kt") - public void testMultiInvoke() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/operators/multiInvoke.kt"); - } - - @TestMetadata("set.kt") - public void testSet() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/operators/set.kt"); - } - } - } - } - - @TestMetadata("compiler/testData/codegen/boxAgainstJava/specialBuiltins") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class SpecialBuiltins extends AbstractBlackBoxAgainstJavaCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - public void testAllFilesPresentInSpecialBuiltins() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/specialBuiltins"), Pattern.compile("^(.+)\\.kt$"), null, true); - } - - @TestMetadata("charBuffer.kt") - public void testCharBuffer() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/specialBuiltins/charBuffer.kt"); - } - } - - @TestMetadata("compiler/testData/codegen/boxAgainstJava/staticFun") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class StaticFun extends AbstractBlackBoxAgainstJavaCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - public void testAllFilesPresentInStaticFun() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/staticFun"), Pattern.compile("^(.+)\\.kt$"), null, true); - } - - @TestMetadata("classWithNestedEnum.kt") - public void testClassWithNestedEnum() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/staticFun/classWithNestedEnum.kt"); - } - } - - @TestMetadata("compiler/testData/codegen/boxAgainstJava/syntheticExtensions") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class SyntheticExtensions extends AbstractBlackBoxAgainstJavaCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - public void testAllFilesPresentInSyntheticExtensions() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/syntheticExtensions"), Pattern.compile("^(.+)\\.kt$"), null, true); - } - - @TestMetadata("fromTwoBases.kt") - public void testFromTwoBases() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/syntheticExtensions/fromTwoBases.kt"); - } - - @TestMetadata("getter.kt") - public void testGetter() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/syntheticExtensions/getter.kt"); - } - - @TestMetadata("implicitReceiver.kt") - public void testImplicitReceiver() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/syntheticExtensions/implicitReceiver.kt"); - } - - @TestMetadata("overrideOnlyGetter.kt") - public void testOverrideOnlyGetter() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/syntheticExtensions/overrideOnlyGetter.kt"); - } - - @TestMetadata("plusPlus.kt") - public void testPlusPlus() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/syntheticExtensions/plusPlus.kt"); - } - - @TestMetadata("protected.kt") - public void testProtected() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/syntheticExtensions/protected.kt"); - } - - @TestMetadata("protectedSetter.kt") - public void testProtectedSetter() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/syntheticExtensions/protectedSetter.kt"); - } - - @TestMetadata("setter.kt") - public void testSetter() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/syntheticExtensions/setter.kt"); - } - - @TestMetadata("setterNonVoid1.kt") - public void testSetterNonVoid1() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/syntheticExtensions/setterNonVoid1.kt"); - } - - @TestMetadata("setterNonVoid2.kt") - public void testSetterNonVoid2() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/syntheticExtensions/setterNonVoid2.kt"); - } - } - - @TestMetadata("compiler/testData/codegen/boxAgainstJava/throws") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Throws extends AbstractBlackBoxAgainstJavaCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - public void testAllFilesPresentInThrows() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/throws"), Pattern.compile("^(.+)\\.kt$"), null, true); - } - - @TestMetadata("delegationAndThrows.kt") - public void testDelegationAndThrows() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/throws/delegationAndThrows.kt"); - } - } - - @TestMetadata("compiler/testData/codegen/boxAgainstJava/typealias") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Typealias extends AbstractBlackBoxAgainstJavaCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - public void testAllFilesPresentInTypealias() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/typealias"), Pattern.compile("^(.+)\\.kt$"), null, true); - } - - @TestMetadata("javaStaticMembersViaTypeAlias.kt") - public void testJavaStaticMembersViaTypeAlias() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/typealias/javaStaticMembersViaTypeAlias.kt"); - } - } - - @TestMetadata("compiler/testData/codegen/boxAgainstJava/varargs") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Varargs extends AbstractBlackBoxAgainstJavaCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - public void testAllFilesPresentInVarargs() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/varargs"), Pattern.compile("^(.+)\\.kt$"), null, true); - } - - @TestMetadata("varargsOverride.kt") - public void testVarargsOverride() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/varargs/varargsOverride.kt"); - } - - @TestMetadata("varargsOverride2.kt") - public void testVarargsOverride2() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/varargs/varargsOverride2.kt"); - } - - @TestMetadata("varargsOverride3.kt") - public void testVarargsOverride3() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/varargs/varargsOverride3.kt"); - } - } - - @TestMetadata("compiler/testData/codegen/boxAgainstJava/visibility") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Visibility extends AbstractBlackBoxAgainstJavaCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - public void testAllFilesPresentInVisibility() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/visibility"), Pattern.compile("^(.+)\\.kt$"), null, true); - } - - @TestMetadata("compiler/testData/codegen/boxAgainstJava/visibility/package") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Package extends AbstractBlackBoxAgainstJavaCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - public void testAllFilesPresentInPackage() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/visibility/package"), Pattern.compile("^(.+)\\.kt$"), null, true); - } - - @TestMetadata("kt2781.kt") - public void testKt2781() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/visibility/package/kt2781.kt"); - } - - @TestMetadata("packageClass.kt") - public void testPackageClass() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/visibility/package/packageClass.kt"); - } - - @TestMetadata("packageFun.kt") - public void testPackageFun() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/visibility/package/packageFun.kt"); - } - - @TestMetadata("packageProperty.kt") - public void testPackageProperty() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/visibility/package/packageProperty.kt"); - } - } - - @TestMetadata("compiler/testData/codegen/boxAgainstJava/visibility/protectedAndPackage") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class ProtectedAndPackage extends AbstractBlackBoxAgainstJavaCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - public void testAllFilesPresentInProtectedAndPackage() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/visibility/protectedAndPackage"), Pattern.compile("^(.+)\\.kt$"), null, true); - } - - @TestMetadata("overrideProtectedFunInPackage.kt") - public void testOverrideProtectedFunInPackage() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/visibility/protectedAndPackage/overrideProtectedFunInPackage.kt"); - } - - @TestMetadata("protectedAccessor.kt") - public void testProtectedAccessor() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/visibility/protectedAndPackage/protectedAccessor.kt"); - } - - @TestMetadata("protectedFunInPackage.kt") - public void testProtectedFunInPackage() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/visibility/protectedAndPackage/protectedFunInPackage.kt"); - } - - @TestMetadata("protectedPropertyInPackage.kt") - public void testProtectedPropertyInPackage() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/visibility/protectedAndPackage/protectedPropertyInPackage.kt"); - } - - @TestMetadata("protectedPropertyInPackageFromCrossinline.kt") - public void testProtectedPropertyInPackageFromCrossinline() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/visibility/protectedAndPackage/protectedPropertyInPackageFromCrossinline.kt"); - } - - @TestMetadata("protectedStaticClass.kt") - public void testProtectedStaticClass() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/visibility/protectedAndPackage/protectedStaticClass.kt"); - } - - @TestMetadata("protectedSuperField.kt") - public void testProtectedSuperField() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/visibility/protectedAndPackage/protectedSuperField.kt"); - } - - @TestMetadata("protectedSuperMethod.kt") - public void testProtectedSuperMethod() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/visibility/protectedAndPackage/protectedSuperMethod.kt"); - } - } - - @TestMetadata("compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class ProtectedStatic extends AbstractBlackBoxAgainstJavaCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - public void testAllFilesPresentInProtectedStatic() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic"), Pattern.compile("^(.+)\\.kt$"), null, true); - } - - @TestMetadata("funCallInConstructor.kt") - public void testFunCallInConstructor() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/funCallInConstructor.kt"); - } - - @TestMetadata("funClassObject.kt") - public void testFunClassObject() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/funClassObject.kt"); - } - - @TestMetadata("funGenericClass.kt") - public void testFunGenericClass() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/funGenericClass.kt"); - } - - @TestMetadata("funNestedStaticClass.kt") - public void testFunNestedStaticClass() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/funNestedStaticClass.kt"); - } - - @TestMetadata("funNestedStaticClass2.kt") - public void testFunNestedStaticClass2() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/funNestedStaticClass2.kt"); - } - - @TestMetadata("funNestedStaticGenericClass.kt") - public void testFunNestedStaticGenericClass() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/funNestedStaticGenericClass.kt"); - } - - @TestMetadata("funNotDirectSuperClass.kt") - public void testFunNotDirectSuperClass() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/funNotDirectSuperClass.kt"); - } - - @TestMetadata("funObject.kt") - public void testFunObject() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/funObject.kt"); - } - - @TestMetadata("simpleClass.kt") - public void testSimpleClass() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/simpleClass.kt"); - } - - @TestMetadata("simpleClass2.kt") - public void testSimpleClass2() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/simpleClass2.kt"); - } - - @TestMetadata("simpleFun.kt") - public void testSimpleFun() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/simpleFun.kt"); - } - - @TestMetadata("simpleProperty.kt") - public void testSimpleProperty() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/simpleProperty.kt"); - } - } - } -} diff --git a/compiler/tests-gen/org/jetbrains/kotlin/codegen/BytecodeListingTestGenerated.java b/compiler/tests-gen/org/jetbrains/kotlin/codegen/BytecodeListingTestGenerated.java index ff9c69c972a..a1e5951d85e 100644 --- a/compiler/tests-gen/org/jetbrains/kotlin/codegen/BytecodeListingTestGenerated.java +++ b/compiler/tests-gen/org/jetbrains/kotlin/codegen/BytecodeListingTestGenerated.java @@ -41,6 +41,11 @@ public class BytecodeListingTestGenerated extends AbstractBytecodeListingTest { runTest("compiler/testData/codegen/bytecodeListing/accessorForTopLevelMembers.kt"); } + @TestMetadata("accessorsForProtectedStaticJavaFieldInOtherPackage.kt") + public void testAccessorsForProtectedStaticJavaFieldInOtherPackage() throws Exception { + runTest("compiler/testData/codegen/bytecodeListing/accessorsForProtectedStaticJavaFieldInOtherPackage.kt"); + } + public void testAllFilesPresentInBytecodeListing() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeListing"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } diff --git a/compiler/tests-gen/org/jetbrains/kotlin/codegen/CompileKotlinAgainstKotlinTestGenerated.java b/compiler/tests-gen/org/jetbrains/kotlin/codegen/CompileKotlinAgainstKotlinTestGenerated.java deleted file mode 100644 index db674468db1..00000000000 --- a/compiler/tests-gen/org/jetbrains/kotlin/codegen/CompileKotlinAgainstKotlinTestGenerated.java +++ /dev/null @@ -1,793 +0,0 @@ -/* - * Copyright 2010-2021 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. - */ - -package org.jetbrains.kotlin.codegen; - -import com.intellij.testFramework.TestDataPath; -import org.jetbrains.kotlin.test.JUnit3RunnerWithInners; -import org.jetbrains.kotlin.test.KotlinTestUtils; -import org.jetbrains.kotlin.test.util.KtTestUtil; -import org.jetbrains.kotlin.test.TestMetadata; -import org.junit.runner.RunWith; - -import java.io.File; -import java.util.regex.Pattern; - -/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */ -@SuppressWarnings("all") -@TestMetadata("compiler/testData/compileKotlinAgainstKotlin") -@TestDataPath("$PROJECT_ROOT") -@RunWith(JUnit3RunnerWithInners.class) -public class CompileKotlinAgainstKotlinTestGenerated extends AbstractCompileKotlinAgainstKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - public void testAllFilesPresentInCompileKotlinAgainstKotlin() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/compileKotlinAgainstKotlin"), Pattern.compile("^(.+)\\.kt$"), null, true); - } - - @TestMetadata("annotationInInterface.kt") - public void testAnnotationInInterface() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/annotationInInterface.kt"); - } - - @TestMetadata("annotationOnTypeUseInTypeAlias.kt") - public void testAnnotationOnTypeUseInTypeAlias() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/annotationOnTypeUseInTypeAlias.kt"); - } - - @TestMetadata("annotationsOnTypeAliases.kt") - public void testAnnotationsOnTypeAliases() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/annotationsOnTypeAliases.kt"); - } - - @TestMetadata("callDeserializedPropertyOnInlineClassType.kt") - public void testCallDeserializedPropertyOnInlineClassType() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/callDeserializedPropertyOnInlineClassType.kt"); - } - - @TestMetadata("callDeserializedPropertyOnInlineClassTypeOldMangling.kt") - public void testCallDeserializedPropertyOnInlineClassTypeOldMangling() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/callDeserializedPropertyOnInlineClassTypeOldMangling.kt"); - } - - @TestMetadata("callsToMultifileClassFromOtherPackage.kt") - public void testCallsToMultifileClassFromOtherPackage() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/callsToMultifileClassFromOtherPackage.kt"); - } - - @TestMetadata("clashingFakeOverrideSignatures.kt") - public void testClashingFakeOverrideSignatures() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/clashingFakeOverrideSignatures.kt"); - } - - @TestMetadata("classInObject.kt") - public void testClassInObject() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/classInObject.kt"); - } - - @TestMetadata("companionObjectInEnum.kt") - public void testCompanionObjectInEnum() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/companionObjectInEnum.kt"); - } - - @TestMetadata("companionObjectMember.kt") - public void testCompanionObjectMember() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/companionObjectMember.kt"); - } - - @TestMetadata("constPropertyReferenceFromMultifileClass.kt") - public void testConstPropertyReferenceFromMultifileClass() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/constPropertyReferenceFromMultifileClass.kt"); - } - - @TestMetadata("constructorVararg.kt") - public void testConstructorVararg() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/constructorVararg.kt"); - } - - @TestMetadata("constructorWithInlineClassParametersInBinaryDependencies.kt") - public void testConstructorWithInlineClassParametersInBinaryDependencies() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/constructorWithInlineClassParametersInBinaryDependencies.kt"); - } - - @TestMetadata("constructorWithInlineClassParametersInBinaryDependenciesOldMangling.kt") - public void testConstructorWithInlineClassParametersInBinaryDependenciesOldMangling() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/constructorWithInlineClassParametersInBinaryDependenciesOldMangling.kt"); - } - - @TestMetadata("copySamOnInline.kt") - public void testCopySamOnInline() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/copySamOnInline.kt"); - } - - @TestMetadata("copySamOnInline2.kt") - public void testCopySamOnInline2() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/copySamOnInline2.kt"); - } - - @TestMetadata("coroutinesBinary.kt") - public void testCoroutinesBinary() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/coroutinesBinary.kt"); - } - - @TestMetadata("defaultConstructor.kt") - public void testDefaultConstructor() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/defaultConstructor.kt"); - } - - @TestMetadata("defaultLambdaRegeneration.kt") - public void testDefaultLambdaRegeneration() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/defaultLambdaRegeneration.kt"); - } - - @TestMetadata("defaultLambdaRegeneration2.kt") - public void testDefaultLambdaRegeneration2() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/defaultLambdaRegeneration2.kt"); - } - - @TestMetadata("defaultWithInlineClassAndReceivers.kt") - public void testDefaultWithInlineClassAndReceivers() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/defaultWithInlineClassAndReceivers.kt"); - } - - @TestMetadata("defaultWithInlineClassAndReceiversOldMangling.kt") - public void testDefaultWithInlineClassAndReceiversOldMangling() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/defaultWithInlineClassAndReceiversOldMangling.kt"); - } - - @TestMetadata("delegatedDefault.kt") - public void testDelegatedDefault() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/delegatedDefault.kt"); - } - - @TestMetadata("delegationAndAnnotations.kt") - public void testDelegationAndAnnotations() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/delegationAndAnnotations.kt"); - } - - @TestMetadata("doublyNestedClass.kt") - public void testDoublyNestedClass() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/doublyNestedClass.kt"); - } - - @TestMetadata("enum.kt") - public void testEnum() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/enum.kt"); - } - - @TestMetadata("expectClassActualTypeAlias.kt") - public void testExpectClassActualTypeAlias() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/expectClassActualTypeAlias.kt"); - } - - @TestMetadata("fakeOverridesForIntersectionTypes.kt") - public void testFakeOverridesForIntersectionTypes() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/fakeOverridesForIntersectionTypes.kt"); - } - - @TestMetadata("importCompanion.kt") - public void testImportCompanion() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/importCompanion.kt"); - } - - @TestMetadata("inlineClassFakeOverrideMangling.kt") - public void testInlineClassFakeOverrideMangling() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/inlineClassFakeOverrideMangling.kt"); - } - - @TestMetadata("inlineClassFakeOverrideManglingOldMangling.kt") - public void testInlineClassFakeOverrideManglingOldMangling() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/inlineClassFakeOverrideManglingOldMangling.kt"); - } - - @TestMetadata("inlineClassFromBinaryDependencies.kt") - public void testInlineClassFromBinaryDependencies() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/inlineClassFromBinaryDependencies.kt"); - } - - @TestMetadata("inlineClassFromBinaryDependenciesOldMangling.kt") - public void testInlineClassFromBinaryDependenciesOldMangling() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/inlineClassFromBinaryDependenciesOldMangling.kt"); - } - - @TestMetadata("inlineClassInlineFunctionCall.kt") - public void testInlineClassInlineFunctionCall() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/inlineClassInlineFunctionCall.kt"); - } - - @TestMetadata("inlineClassInlineFunctionCallOldMangling.kt") - public void testInlineClassInlineFunctionCallOldMangling() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/inlineClassInlineFunctionCallOldMangling.kt"); - } - - @TestMetadata("inlineClassInlineProperty.kt") - public void testInlineClassInlineProperty() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/inlineClassInlineProperty.kt"); - } - - @TestMetadata("inlineClassInlinePropertyOldMangling.kt") - public void testInlineClassInlinePropertyOldMangling() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/inlineClassInlinePropertyOldMangling.kt"); - } - - @TestMetadata("inlineClassesOldMangling.kt") - public void testInlineClassesOldMangling() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/inlineClassesOldMangling.kt"); - } - - @TestMetadata("inlinedConstants.kt") - public void testInlinedConstants() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/inlinedConstants.kt"); - } - - @TestMetadata("innerClassConstructor.kt") - public void testInnerClassConstructor() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/innerClassConstructor.kt"); - } - - @TestMetadata("interfaceDelegationAndBridgesProcessing.kt") - public void testInterfaceDelegationAndBridgesProcessing() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/interfaceDelegationAndBridgesProcessing.kt"); - } - - @TestMetadata("internalSetterOverridden.kt") - public void testInternalSetterOverridden() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/internalSetterOverridden.kt"); - } - - @TestMetadata("internalWithDefaultArgs.kt") - public void testInternalWithDefaultArgs() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/internalWithDefaultArgs.kt"); - } - - @TestMetadata("internalWithInlineClass.kt") - public void testInternalWithInlineClass() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/internalWithInlineClass.kt"); - } - - @TestMetadata("internalWithOtherModuleName.kt") - public void testInternalWithOtherModuleName() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/internalWithOtherModuleName.kt"); - } - - @TestMetadata("intersectionOverrideProperies.kt") - public void testIntersectionOverrideProperies() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/intersectionOverrideProperies.kt"); - } - - @TestMetadata("jvmField.kt") - public void testJvmField() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvmField.kt"); - } - - @TestMetadata("jvmFieldInAnnotationCompanion.kt") - public void testJvmFieldInAnnotationCompanion() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvmFieldInAnnotationCompanion.kt"); - } - - @TestMetadata("jvmFieldInConstructor.kt") - public void testJvmFieldInConstructor() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvmFieldInConstructor.kt"); - } - - @TestMetadata("jvmFieldInInterfaceCompanion.kt") - public void testJvmFieldInInterfaceCompanion() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvmFieldInInterfaceCompanion.kt"); - } - - @TestMetadata("jvmNames.kt") - public void testJvmNames() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvmNames.kt"); - } - - @TestMetadata("jvmPackageName.kt") - public void testJvmPackageName() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvmPackageName.kt"); - } - - @TestMetadata("jvmPackageNameInRootPackage.kt") - public void testJvmPackageNameInRootPackage() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvmPackageNameInRootPackage.kt"); - } - - @TestMetadata("jvmPackageNameMultifileClass.kt") - public void testJvmPackageNameMultifileClass() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvmPackageNameMultifileClass.kt"); - } - - @TestMetadata("jvmPackageNameWithJvmName.kt") - public void testJvmPackageNameWithJvmName() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvmPackageNameWithJvmName.kt"); - } - - @TestMetadata("jvmStaticInObject.kt") - public void testJvmStaticInObject() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvmStaticInObject.kt"); - } - - @TestMetadata("jvmStaticInObjectPropertyReference.kt") - public void testJvmStaticInObjectPropertyReference() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvmStaticInObjectPropertyReference.kt"); - } - - @TestMetadata("kotlinPropertyAsAnnotationParameter.kt") - public void testKotlinPropertyAsAnnotationParameter() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/kotlinPropertyAsAnnotationParameter.kt"); - } - - @TestMetadata("kt14012.kt") - public void testKt14012() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/kt14012.kt"); - } - - @TestMetadata("kt14012_multi.kt") - public void testKt14012_multi() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/kt14012_multi.kt"); - } - - @TestMetadata("kt21775.kt") - public void testKt21775() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/kt21775.kt"); - } - - @TestMetadata("metadataForMembersInLocalClassInInitializer.kt") - public void testMetadataForMembersInLocalClassInInitializer() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/metadataForMembersInLocalClassInInitializer.kt"); - } - - @TestMetadata("multifileClassInlineFunctionAccessingProperty.kt") - public void testMultifileClassInlineFunctionAccessingProperty() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/multifileClassInlineFunctionAccessingProperty.kt"); - } - - @TestMetadata("multifileClassWithTypealias.kt") - public void testMultifileClassWithTypealias() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/multifileClassWithTypealias.kt"); - } - - @TestMetadata("nestedClass.kt") - public void testNestedClass() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/nestedClass.kt"); - } - - @TestMetadata("nestedClassInAnnotationArgument.kt") - public void testNestedClassInAnnotationArgument() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/nestedClassInAnnotationArgument.kt"); - } - - @TestMetadata("nestedEnum.kt") - public void testNestedEnum() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/nestedEnum.kt"); - } - - @TestMetadata("nestedFunctionTypeAliasExpansion.kt") - public void testNestedFunctionTypeAliasExpansion() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/nestedFunctionTypeAliasExpansion.kt"); - } - - @TestMetadata("nestedObject.kt") - public void testNestedObject() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/nestedObject.kt"); - } - - @TestMetadata("nestedTypeAliasExpansion.kt") - public void testNestedTypeAliasExpansion() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/nestedTypeAliasExpansion.kt"); - } - - @TestMetadata("noExplicitOverrideForDelegatedFromSupertype.kt") - public void testNoExplicitOverrideForDelegatedFromSupertype() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/noExplicitOverrideForDelegatedFromSupertype.kt"); - } - - @TestMetadata("optionalAnnotation.kt") - public void testOptionalAnnotation() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/optionalAnnotation.kt"); - } - - @TestMetadata("platformTypes.kt") - public void testPlatformTypes() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/platformTypes.kt"); - } - - @TestMetadata("privateCompanionObjectValInDifferentModule.kt") - public void testPrivateCompanionObjectValInDifferentModule() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/privateCompanionObjectValInDifferentModule.kt"); - } - - @TestMetadata("privateCompanionObjectValInDifferentModuleOldMangling.kt") - public void testPrivateCompanionObjectValInDifferentModuleOldMangling() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/privateCompanionObjectValInDifferentModuleOldMangling.kt"); - } - - @TestMetadata("privateTopLevelValInDifferentModule.kt") - public void testPrivateTopLevelValInDifferentModule() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/privateTopLevelValInDifferentModule.kt"); - } - - @TestMetadata("privateTopLevelValInDifferentModuleOldMangling.kt") - public void testPrivateTopLevelValInDifferentModuleOldMangling() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/privateTopLevelValInDifferentModuleOldMangling.kt"); - } - - @TestMetadata("propertyReference.kt") - public void testPropertyReference() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/propertyReference.kt"); - } - - @TestMetadata("recursiveGeneric.kt") - public void testRecursiveGeneric() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/recursiveGeneric.kt"); - } - - @TestMetadata("reflectTopLevelFunctionOtherFile.kt") - public void testReflectTopLevelFunctionOtherFile() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/reflectTopLevelFunctionOtherFile.kt"); - } - - @TestMetadata("sealedClass.kt") - public void testSealedClass() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/sealedClass.kt"); - } - - @TestMetadata("secondaryConstructors.kt") - public void testSecondaryConstructors() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/secondaryConstructors.kt"); - } - - @TestMetadata("simple.kt") - public void testSimple() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/simple.kt"); - } - - @TestMetadata("simpleValAnonymousObject.kt") - public void testSimpleValAnonymousObject() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/simpleValAnonymousObject.kt"); - } - - @TestMetadata("specialBridgesInDependencies.kt") - public void testSpecialBridgesInDependencies() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/specialBridgesInDependencies.kt"); - } - - @TestMetadata("starImportEnum.kt") - public void testStarImportEnum() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/starImportEnum.kt"); - } - - @TestMetadata("suspendFunWithDefaultMangling.kt") - public void testSuspendFunWithDefaultMangling() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/suspendFunWithDefaultMangling.kt"); - } - - @TestMetadata("suspendFunWithDefaultOldMangling.kt") - public void testSuspendFunWithDefaultOldMangling() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/suspendFunWithDefaultOldMangling.kt"); - } - - @TestMetadata("targetedJvmName.kt") - public void testTargetedJvmName() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/targetedJvmName.kt"); - } - - @TestMetadata("typeAliasesKt13181.kt") - public void testTypeAliasesKt13181() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/typeAliasesKt13181.kt"); - } - - @TestMetadata("unsignedTypesInAnnotations.kt") - public void testUnsignedTypesInAnnotations() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/unsignedTypesInAnnotations.kt"); - } - - @TestMetadata("useDeserializedFunInterface.kt") - public void testUseDeserializedFunInterface() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/useDeserializedFunInterface.kt"); - } - - @TestMetadata("compiler/testData/compileKotlinAgainstKotlin/fir") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Fir extends AbstractCompileKotlinAgainstKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - public void testAllFilesPresentInFir() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/compileKotlinAgainstKotlin/fir"), Pattern.compile("^(.+)\\.kt$"), null, true); - } - - @TestMetadata("AnonymousObjectInProperty.kt") - public void testAnonymousObjectInProperty() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/fir/AnonymousObjectInProperty.kt"); - } - - @TestMetadata("ExistingSymbolInFakeOverride.kt") - public void testExistingSymbolInFakeOverride() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/fir/ExistingSymbolInFakeOverride.kt"); - } - - @TestMetadata("IncrementalCompilerRunner.kt") - public void testIncrementalCompilerRunner() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/fir/IncrementalCompilerRunner.kt"); - } - - @TestMetadata("IrConstAcceptMultiModule.kt") - public void testIrConstAcceptMultiModule() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/fir/IrConstAcceptMultiModule.kt"); - } - - @TestMetadata("LibraryProperty.kt") - public void testLibraryProperty() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/fir/LibraryProperty.kt"); - } - } - - @TestMetadata("compiler/testData/compileKotlinAgainstKotlin/jvm8") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Jvm8 extends AbstractCompileKotlinAgainstKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - public void testAllFilesPresentInJvm8() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/compileKotlinAgainstKotlin/jvm8"), Pattern.compile("^(.+)\\.kt$"), null, true); - } - - @TestMetadata("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Defaults extends AbstractCompileKotlinAgainstKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - public void testAllFilesPresentInDefaults() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults"), Pattern.compile("^(.+)\\.kt$"), null, true); - } - - @TestMetadata("superCall.kt") - public void testSuperCall() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/superCall.kt"); - } - - @TestMetadata("superCallFromInterface.kt") - public void testSuperCallFromInterface() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/superCallFromInterface.kt"); - } - - @TestMetadata("superCallFromInterface2.kt") - public void testSuperCallFromInterface2() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/superCallFromInterface2.kt"); - } - - @TestMetadata("superPropAccess.kt") - public void testSuperPropAccess() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/superPropAccess.kt"); - } - - @TestMetadata("superPropAccessFromInterface.kt") - public void testSuperPropAccessFromInterface() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/superPropAccessFromInterface.kt"); - } - - @TestMetadata("superPropAccessFromInterface2.kt") - public void testSuperPropAccessFromInterface2() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/superPropAccessFromInterface2.kt"); - } - - @TestMetadata("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class AllCompatibility extends AbstractCompileKotlinAgainstKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - public void testAllFilesPresentInAllCompatibility() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility"), Pattern.compile("^(.+)\\.kt$"), null, true); - } - - @TestMetadata("callStackTrace.kt") - public void testCallStackTrace() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/callStackTrace.kt"); - } - - @TestMetadata("superCall.kt") - public void testSuperCall() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superCall.kt"); - } - - @TestMetadata("superCallFromInterface.kt") - public void testSuperCallFromInterface() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superCallFromInterface.kt"); - } - - @TestMetadata("superCallFromInterface2.kt") - public void testSuperCallFromInterface2() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superCallFromInterface2.kt"); - } - - @TestMetadata("superPropAccess.kt") - public void testSuperPropAccess() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superPropAccess.kt"); - } - - @TestMetadata("superPropAccessFromInterface.kt") - public void testSuperPropAccessFromInterface() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superPropAccessFromInterface.kt"); - } - - @TestMetadata("superPropAccessFromInterface2.kt") - public void testSuperPropAccessFromInterface2() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superPropAccessFromInterface2.kt"); - } - - @TestMetadata("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/delegationBy") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class DelegationBy extends AbstractCompileKotlinAgainstKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - public void testAllFilesPresentInDelegationBy() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/delegationBy"), Pattern.compile("^(.+)\\.kt$"), null, true); - } - - @TestMetadata("simple.kt") - public void testSimple() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/delegationBy/simple.kt"); - } - - @TestMetadata("simpleProperty.kt") - public void testSimpleProperty() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/delegationBy/simpleProperty.kt"); - } - } - } - - @TestMetadata("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Interop extends AbstractCompileKotlinAgainstKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - public void testAllFilesPresentInInterop() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop"), Pattern.compile("^(.+)\\.kt$"), null, true); - } - - @TestMetadata("likeMemberClash.kt") - public void testLikeMemberClash() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop/likeMemberClash.kt"); - } - - @TestMetadata("likeSpecialization.kt") - public void testLikeSpecialization() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop/likeSpecialization.kt"); - } - - @TestMetadata("newAndOldSchemes.kt") - public void testNewAndOldSchemes() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop/newAndOldSchemes.kt"); - } - - @TestMetadata("newAndOldSchemes2.kt") - public void testNewAndOldSchemes2() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop/newAndOldSchemes2.kt"); - } - - @TestMetadata("newAndOldSchemes2Compatibility.kt") - public void testNewAndOldSchemes2Compatibility() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop/newAndOldSchemes2Compatibility.kt"); - } - - @TestMetadata("newAndOldSchemes3.kt") - public void testNewAndOldSchemes3() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop/newAndOldSchemes3.kt"); - } - - @TestMetadata("newSchemeWithJvmDefault.kt") - public void testNewSchemeWithJvmDefault() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop/newSchemeWithJvmDefault.kt"); - } - } - } - - @TestMetadata("compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Jvm8against6 extends AbstractCompileKotlinAgainstKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - public void testAllFilesPresentInJvm8against6() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6"), Pattern.compile("^(.+)\\.kt$"), null, true); - } - - @TestMetadata("jdk8Against6.kt") - public void testJdk8Against6() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/jdk8Against6.kt"); - } - - @TestMetadata("simpleCall.kt") - public void testSimpleCall() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/simpleCall.kt"); - } - - @TestMetadata("simpleCallWithBigHierarchy.kt") - public void testSimpleCallWithBigHierarchy() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/simpleCallWithBigHierarchy.kt"); - } - - @TestMetadata("simpleCallWithHierarchy.kt") - public void testSimpleCallWithHierarchy() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/simpleCallWithHierarchy.kt"); - } - - @TestMetadata("simpleProp.kt") - public void testSimpleProp() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/simpleProp.kt"); - } - - @TestMetadata("simplePropWithHierarchy.kt") - public void testSimplePropWithHierarchy() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/simplePropWithHierarchy.kt"); - } - - @TestMetadata("compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/delegation") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Delegation extends AbstractCompileKotlinAgainstKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - public void testAllFilesPresentInDelegation() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/delegation"), Pattern.compile("^(.+)\\.kt$"), null, true); - } - - @TestMetadata("diamond.kt") - public void testDiamond() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/delegation/diamond.kt"); - } - - @TestMetadata("diamond2.kt") - public void testDiamond2() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/delegation/diamond2.kt"); - } - - @TestMetadata("diamond3.kt") - public void testDiamond3() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/delegation/diamond3.kt"); - } - } - } - } - - @TestMetadata("compiler/testData/compileKotlinAgainstKotlin/typeAnnotations") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class TypeAnnotations extends AbstractCompileKotlinAgainstKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - public void testAllFilesPresentInTypeAnnotations() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/compileKotlinAgainstKotlin/typeAnnotations"), Pattern.compile("^(.+)\\.kt$"), null, true); - } - - @TestMetadata("implicitReturn.kt") - public void testImplicitReturn() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/typeAnnotations/implicitReturn.kt"); - } - } -} diff --git a/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java b/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java index 45e0b541a0d..037244e41a9 100644 --- a/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java +++ b/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java @@ -27,7 +27,7 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes } public void testAllFilesPresentInBox() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true, "ranges/stepped"); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true, "ranges/stepped", "compileKotlinAgainstKotlin"); } @TestMetadata("compiler/testData/codegen/box/annotations") @@ -117,16 +117,56 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/annotations/delegatedPropertySetter.kt"); } + @TestMetadata("divisionByZeroInJava.kt") + public void testDivisionByZeroInJava() throws Exception { + runTest("compiler/testData/codegen/box/annotations/divisionByZeroInJava.kt"); + } + @TestMetadata("fileClassWithFileAnnotation.kt") public void testFileClassWithFileAnnotation() throws Exception { runTest("compiler/testData/codegen/box/annotations/fileClassWithFileAnnotation.kt"); } + @TestMetadata("javaAnnotationArrayValueDefault.kt") + public void testJavaAnnotationArrayValueDefault() throws Exception { + runTest("compiler/testData/codegen/box/annotations/javaAnnotationArrayValueDefault.kt"); + } + + @TestMetadata("javaAnnotationArrayValueNoDefault.kt") + public void testJavaAnnotationArrayValueNoDefault() throws Exception { + runTest("compiler/testData/codegen/box/annotations/javaAnnotationArrayValueNoDefault.kt"); + } + + @TestMetadata("javaAnnotationCall.kt") + public void testJavaAnnotationCall() throws Exception { + runTest("compiler/testData/codegen/box/annotations/javaAnnotationCall.kt"); + } + + @TestMetadata("javaAnnotationDefault.kt") + public void testJavaAnnotationDefault() throws Exception { + runTest("compiler/testData/codegen/box/annotations/javaAnnotationDefault.kt"); + } + @TestMetadata("javaAnnotationOnProperty.kt") public void testJavaAnnotationOnProperty() throws Exception { runTest("compiler/testData/codegen/box/annotations/javaAnnotationOnProperty.kt"); } + @TestMetadata("javaNegativePropertyAsAnnotationParameter.kt") + public void testJavaNegativePropertyAsAnnotationParameter() throws Exception { + runTest("compiler/testData/codegen/box/annotations/javaNegativePropertyAsAnnotationParameter.kt"); + } + + @TestMetadata("javaPropertyAsAnnotationParameter.kt") + public void testJavaPropertyAsAnnotationParameter() throws Exception { + runTest("compiler/testData/codegen/box/annotations/javaPropertyAsAnnotationParameter.kt"); + } + + @TestMetadata("javaPropertyWithIntInitializer.kt") + public void testJavaPropertyWithIntInitializer() throws Exception { + runTest("compiler/testData/codegen/box/annotations/javaPropertyWithIntInitializer.kt"); + } + @TestMetadata("jvmAnnotationFlags.kt") public void testJvmAnnotationFlags() throws Exception { runTest("compiler/testData/codegen/box/annotations/jvmAnnotationFlags.kt"); @@ -197,6 +237,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/annotations/resolveWithLowPriorityAnnotation.kt"); } + @TestMetadata("retentionInJava.kt") + public void testRetentionInJava() throws Exception { + runTest("compiler/testData/codegen/box/annotations/retentionInJava.kt"); + } + @TestMetadata("singleAssignmentToVarargInAnnotation.kt") public void testSingleAssignmentToVarargInAnnotation() throws Exception { runTest("compiler/testData/codegen/box/annotations/singleAssignmentToVarargInAnnotation.kt"); @@ -270,6 +315,49 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes } } + @TestMetadata("compiler/testData/codegen/box/annotations/kClassMapping") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class KClassMapping extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + + public void testAllFilesPresentInKClassMapping() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/annotations/kClassMapping"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); + } + + @TestMetadata("arrayClassParameter.kt") + public void testArrayClassParameter() throws Exception { + runTest("compiler/testData/codegen/box/annotations/kClassMapping/arrayClassParameter.kt"); + } + + @TestMetadata("arrayClassParameterOnJavaClass.kt") + public void testArrayClassParameterOnJavaClass() throws Exception { + runTest("compiler/testData/codegen/box/annotations/kClassMapping/arrayClassParameterOnJavaClass.kt"); + } + + @TestMetadata("classParameter.kt") + public void testClassParameter() throws Exception { + runTest("compiler/testData/codegen/box/annotations/kClassMapping/classParameter.kt"); + } + + @TestMetadata("classParameterOnJavaClass.kt") + public void testClassParameterOnJavaClass() throws Exception { + runTest("compiler/testData/codegen/box/annotations/kClassMapping/classParameterOnJavaClass.kt"); + } + + @TestMetadata("varargClassParameter.kt") + public void testVarargClassParameter() throws Exception { + runTest("compiler/testData/codegen/box/annotations/kClassMapping/varargClassParameter.kt"); + } + + @TestMetadata("varargClassParameterOnJavaClass.kt") + public void testVarargClassParameterOnJavaClass() throws Exception { + runTest("compiler/testData/codegen/box/annotations/kClassMapping/varargClassParameterOnJavaClass.kt"); + } + } + @TestMetadata("compiler/testData/codegen/box/annotations/typeAnnotations") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) @@ -292,6 +380,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/annotations/typeAnnotations/implicitReturn.kt"); } + @TestMetadata("implicitReturnAgainstCompiled.kt") + public void testImplicitReturnAgainstCompiled() throws Exception { + runTest("compiler/testData/codegen/box/annotations/typeAnnotations/implicitReturnAgainstCompiled.kt"); + } + @TestMetadata("kt41484.kt") public void testKt41484() throws Exception { runTest("compiler/testData/codegen/box/annotations/typeAnnotations/kt41484.kt"); @@ -2022,6 +2115,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/callableReference/classesAreSynthetic.kt"); } + @TestMetadata("constructor.kt") + public void testConstructor() throws Exception { + runTest("compiler/testData/codegen/box/callableReference/constructor.kt"); + } + @TestMetadata("genericConstructorReference.kt") public void testGenericConstructorReference() throws Exception { runTest("compiler/testData/codegen/box/callableReference/genericConstructorReference.kt"); @@ -2037,6 +2135,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/callableReference/javaField.kt"); } + @TestMetadata("kt16412.kt") + public void testKt16412() throws Exception { + runTest("compiler/testData/codegen/box/callableReference/kt16412.kt"); + } + @TestMetadata("kt37604.kt") public void testKt37604() throws Exception { runTest("compiler/testData/codegen/box/callableReference/kt37604.kt"); @@ -2057,6 +2160,21 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/callableReference/optimizedSuperclasses_before.kt"); } + @TestMetadata("publicFinalField.kt") + public void testPublicFinalField() throws Exception { + runTest("compiler/testData/codegen/box/callableReference/publicFinalField.kt"); + } + + @TestMetadata("publicMutableField.kt") + public void testPublicMutableField() throws Exception { + runTest("compiler/testData/codegen/box/callableReference/publicMutableField.kt"); + } + + @TestMetadata("staticMethod.kt") + public void testStaticMethod() throws Exception { + runTest("compiler/testData/codegen/box/callableReference/staticMethod.kt"); + } + @TestMetadata("compiler/testData/codegen/box/callableReference/adaptedReferences") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) @@ -4357,6 +4475,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Closures extends AbstractLightAnalysisModeTest { + @TestMetadata("kt23881.kt") + public void ignoreKt23881() throws Exception { + runTest("compiler/testData/codegen/box/closures/kt23881.kt"); + } + private void runTest(String testDataFilePath) throws Exception { KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); } @@ -5258,6 +5381,29 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes } } + @TestMetadata("compiler/testData/codegen/box/constructor") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Constructor extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + + public void testAllFilesPresentInConstructor() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/constructor"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); + } + + @TestMetadata("genericConstructor.kt") + public void testGenericConstructor() throws Exception { + runTest("compiler/testData/codegen/box/constructor/genericConstructor.kt"); + } + + @TestMetadata("secondaryConstructor.kt") + public void testSecondaryConstructor() throws Exception { + runTest("compiler/testData/codegen/box/constructor/secondaryConstructor.kt"); + } + } + @TestMetadata("compiler/testData/codegen/box/constructorCall") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) @@ -6540,6 +6686,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Coroutines extends AbstractLightAnalysisModeTest { + @TestMetadata("kt24135.kt") + public void ignoreKt24135() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/kt24135.kt"); + } + private void runTest(String testDataFilePath) throws Exception { KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); } @@ -7165,6 +7316,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ControlFlow extends AbstractLightAnalysisModeTest { + @TestMetadata("doWhileWithInline.kt") + public void ignoreDoWhileWithInline() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/controlFlow/doWhileWithInline.kt"); + } + private void runTest(String testDataFilePath) throws Exception { KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); } @@ -7622,6 +7778,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/inlineClasses"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @TestMetadata("genericParameterResult.kt") + public void testGenericParameterResult() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/genericParameterResult.kt"); + } + @TestMetadata("nonLocalReturn.kt") public void testNonLocalReturn() throws Exception { runTest("compiler/testData/codegen/box/coroutines/inlineClasses/nonLocalReturn.kt"); @@ -8397,6 +8558,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/coroutines/intrinsicSemantics/intercepted.kt"); } + @TestMetadata("resultExceptionOrNullInLambda.kt") + public void testResultExceptionOrNullInLambda() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/intrinsicSemantics/resultExceptionOrNullInLambda.kt"); + } + @TestMetadata("startCoroutine.kt") public void testStartCoroutine() throws Exception { runTest("compiler/testData/codegen/box/coroutines/intrinsicSemantics/startCoroutine.kt"); @@ -8490,6 +8656,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Named extends AbstractLightAnalysisModeTest { + @TestMetadata("defaultArgument.kt") + public void ignoreDefaultArgument() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/localFunctions/named/defaultArgument.kt"); + } + private void runTest(String testDataFilePath) throws Exception { KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); } @@ -10532,6 +10703,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/delegation/defaultOverride.kt"); } + @TestMetadata("delegationAndInheritanceFromJava.kt") + public void testDelegationAndInheritanceFromJava() throws Exception { + runTest("compiler/testData/codegen/box/delegation/delegationAndInheritanceFromJava.kt"); + } + @TestMetadata("delegationToMap.kt") public void testDelegationToMap() throws Exception { runTest("compiler/testData/codegen/box/delegation/delegationToMap.kt"); @@ -11357,6 +11533,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/enum/modifierFlags.kt"); } + @TestMetadata("nameConflict.kt") + public void testNameConflict() throws Exception { + runTest("compiler/testData/codegen/box/enum/nameConflict.kt"); + } + @TestMetadata("noClassForSimpleEnum.kt") public void testNoClassForSimpleEnum() throws Exception { runTest("compiler/testData/codegen/box/enum/noClassForSimpleEnum.kt"); @@ -11382,11 +11563,41 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/enum/simple.kt"); } + @TestMetadata("simpleJavaEnum.kt") + public void testSimpleJavaEnum() throws Exception { + runTest("compiler/testData/codegen/box/enum/simpleJavaEnum.kt"); + } + + @TestMetadata("simpleJavaEnumWithFunction.kt") + public void testSimpleJavaEnumWithFunction() throws Exception { + runTest("compiler/testData/codegen/box/enum/simpleJavaEnumWithFunction.kt"); + } + + @TestMetadata("simpleJavaEnumWithStaticImport.kt") + public void testSimpleJavaEnumWithStaticImport() throws Exception { + runTest("compiler/testData/codegen/box/enum/simpleJavaEnumWithStaticImport.kt"); + } + + @TestMetadata("simpleJavaInnerEnum.kt") + public void testSimpleJavaInnerEnum() throws Exception { + runTest("compiler/testData/codegen/box/enum/simpleJavaInnerEnum.kt"); + } + @TestMetadata("sortEnumEntries.kt") public void testSortEnumEntries() throws Exception { runTest("compiler/testData/codegen/box/enum/sortEnumEntries.kt"); } + @TestMetadata("staticField.kt") + public void testStaticField() throws Exception { + runTest("compiler/testData/codegen/box/enum/staticField.kt"); + } + + @TestMetadata("staticMethod.kt") + public void testStaticMethod() throws Exception { + runTest("compiler/testData/codegen/box/enum/staticMethod.kt"); + } + @TestMetadata("superCallInEnumLiteral.kt") public void testSuperCallInEnumLiteral() throws Exception { runTest("compiler/testData/codegen/box/enum/superCallInEnumLiteral.kt"); @@ -12199,6 +12410,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/funInterface/funConversionInVararg.kt"); } + @TestMetadata("funInterfaceCallInLambda.kt") + public void testFunInterfaceCallInLambda() throws Exception { + runTest("compiler/testData/codegen/box/funInterface/funInterfaceCallInLambda.kt"); + } + @TestMetadata("funInterfaceInheritance.kt") public void testFunInterfaceInheritance() throws Exception { runTest("compiler/testData/codegen/box/funInterface/funInterfaceInheritance.kt"); @@ -12340,6 +12556,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/functions/coerceVoidToObject.kt"); } + @TestMetadata("constructor.kt") + public void testConstructor() throws Exception { + runTest("compiler/testData/codegen/box/functions/constructor.kt"); + } + @TestMetadata("dataLocalVariable.kt") public void testDataLocalVariable() throws Exception { runTest("compiler/testData/codegen/box/functions/dataLocalVariable.kt"); @@ -12525,6 +12746,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/functions/localReturnInsideFunctionExpression.kt"); } + @TestMetadata("max.kt") + public void testMax() throws Exception { + runTest("compiler/testData/codegen/box/functions/max.kt"); + } + @TestMetadata("nothisnoclosure.kt") public void testNothisnoclosure() throws Exception { runTest("compiler/testData/codegen/box/functions/nothisnoclosure.kt"); @@ -12545,6 +12771,16 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/functions/recursiveIncrementCall.kt"); } + @TestMetadata("referencesStaticInnerClassMethod.kt") + public void testReferencesStaticInnerClassMethod() throws Exception { + runTest("compiler/testData/codegen/box/functions/referencesStaticInnerClassMethod.kt"); + } + + @TestMetadata("referencesStaticInnerClassMethodL2.kt") + public void testReferencesStaticInnerClassMethodL2() throws Exception { + runTest("compiler/testData/codegen/box/functions/referencesStaticInnerClassMethodL2.kt"); + } + @TestMetadata("typeParameterAsUpperBound.kt") public void testTypeParameterAsUpperBound() throws Exception { runTest("compiler/testData/codegen/box/functions/typeParameterAsUpperBound.kt"); @@ -12555,6 +12791,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/functions/typeParametersInLocalFunction.kt"); } + @TestMetadata("unrelatedUpperBounds.kt") + public void testUnrelatedUpperBounds() throws Exception { + runTest("compiler/testData/codegen/box/functions/unrelatedUpperBounds.kt"); + } + @TestMetadata("compiler/testData/codegen/box/functions/bigArity") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) @@ -12978,6 +13219,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/ieee754/anyToReal.kt"); } + @TestMetadata("anyToReal_AgainstCompiled.kt") + public void testAnyToReal_AgainstCompiled() throws Exception { + runTest("compiler/testData/codegen/box/ieee754/anyToReal_AgainstCompiled.kt"); + } + @TestMetadata("asComparableToDouble.kt") public void testAsComparableToDouble() throws Exception { runTest("compiler/testData/codegen/box/ieee754/asComparableToDouble.kt"); @@ -12998,6 +13244,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/ieee754/comparableTypeCast.kt"); } + @TestMetadata("comparableTypeCast_AgainstCompiled.kt") + public void testComparableTypeCast_AgainstCompiled() throws Exception { + runTest("compiler/testData/codegen/box/ieee754/comparableTypeCast_AgainstCompiled.kt"); + } + @TestMetadata("dataClass.kt") public void testDataClass() throws Exception { runTest("compiler/testData/codegen/box/ieee754/dataClass.kt"); @@ -13008,6 +13259,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/ieee754/differentTypesComparison.kt"); } + @TestMetadata("double.kt") + public void testDouble() throws Exception { + runTest("compiler/testData/codegen/box/ieee754/double.kt"); + } + @TestMetadata("equalsDouble.kt") public void testEqualsDouble() throws Exception { runTest("compiler/testData/codegen/box/ieee754/equalsDouble.kt"); @@ -13063,16 +13319,36 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/ieee754/explicitCompareCall.kt"); } + @TestMetadata("explicitCompareCall_AgainstCompiled.kt") + public void testExplicitCompareCall_AgainstCompiled() throws Exception { + runTest("compiler/testData/codegen/box/ieee754/explicitCompareCall_AgainstCompiled.kt"); + } + @TestMetadata("explicitEqualsCall.kt") public void testExplicitEqualsCall() throws Exception { runTest("compiler/testData/codegen/box/ieee754/explicitEqualsCall.kt"); } + @TestMetadata("explicitEqualsCall_AgainstCompiled.kt") + public void testExplicitEqualsCall_AgainstCompiled() throws Exception { + runTest("compiler/testData/codegen/box/ieee754/explicitEqualsCall_AgainstCompiled.kt"); + } + + @TestMetadata("float.kt") + public void testFloat() throws Exception { + runTest("compiler/testData/codegen/box/ieee754/float.kt"); + } + @TestMetadata("generic.kt") public void testGeneric() throws Exception { runTest("compiler/testData/codegen/box/ieee754/generic.kt"); } + @TestMetadata("generic_AgainstCompiled.kt") + public void testGeneric_AgainstCompiled() throws Exception { + runTest("compiler/testData/codegen/box/ieee754/generic_AgainstCompiled.kt"); + } + @TestMetadata("greaterDouble.kt") public void testGreaterDouble() throws Exception { runTest("compiler/testData/codegen/box/ieee754/greaterDouble.kt"); @@ -13128,6 +13404,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/ieee754/nullableAnyToReal.kt"); } + @TestMetadata("nullableAnyToReal_AgainstCompiled.kt") + public void testNullableAnyToReal_AgainstCompiled() throws Exception { + runTest("compiler/testData/codegen/box/ieee754/nullableAnyToReal_AgainstCompiled.kt"); + } + @TestMetadata("nullableDoubleEquals.kt") public void testNullableDoubleEquals() throws Exception { runTest("compiler/testData/codegen/box/ieee754/nullableDoubleEquals.kt"); @@ -13618,6 +13899,24 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes } } + @TestMetadata("compiler/testData/codegen/box/inline") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Inline extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + + public void testAllFilesPresentInInline() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inline"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); + } + + @TestMetadata("kt19910.kt") + public void testKt19910() throws Exception { + runTest("compiler/testData/codegen/box/inline/kt19910.kt"); + } + } + @TestMetadata("compiler/testData/codegen/box/inlineClasses") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) @@ -13632,6 +13931,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/inlineClasses/inlineClassWithCustomEquals.kt"); } + @TestMetadata("kt32793.kt") + public void ignoreKt32793() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/kt32793.kt"); + } + @TestMetadata("simpleSecondaryConstructor.kt") public void ignoreSimpleSecondaryConstructor() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/simpleSecondaryConstructor.kt"); @@ -15186,6 +15490,34 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes } } + @TestMetadata("compiler/testData/codegen/box/inlineClasses/inlineClassCollection") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class InlineClassCollection extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + + public void testAllFilesPresentInInlineClassCollection() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/inlineClassCollection"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); + } + + @TestMetadata("inlineCollectionOfInlineClass.kt") + public void testInlineCollectionOfInlineClass() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/inlineClassCollection/inlineCollectionOfInlineClass.kt"); + } + + @TestMetadata("inlineListOfInlineClass.kt") + public void testInlineListOfInlineClass() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/inlineClassCollection/inlineListOfInlineClass.kt"); + } + + @TestMetadata("inlineMapOfInlineClass.kt") + public void testInlineMapOfInlineClass() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/inlineClassCollection/inlineMapOfInlineClass.kt"); + } + } + @TestMetadata("compiler/testData/codegen/box/inlineClasses/interfaceDelegation") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) @@ -15654,6 +15986,34 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes } } + @TestMetadata("compiler/testData/codegen/box/innerClass") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class InnerClass extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + + public void testAllFilesPresentInInnerClass() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/innerClass"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); + } + + @TestMetadata("kt3532.kt") + public void testKt3532() throws Exception { + runTest("compiler/testData/codegen/box/innerClass/kt3532.kt"); + } + + @TestMetadata("kt3812.kt") + public void testKt3812() throws Exception { + runTest("compiler/testData/codegen/box/innerClass/kt3812.kt"); + } + + @TestMetadata("kt4036.kt") + public void testKt4036() throws Exception { + runTest("compiler/testData/codegen/box/innerClass/kt4036.kt"); + } + } + @TestMetadata("compiler/testData/codegen/box/innerNested") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) @@ -15961,6 +16321,29 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes } } + @TestMetadata("compiler/testData/codegen/box/interfaces") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Interfaces extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + + public void testAllFilesPresentInInterfaces() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/interfaces"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); + } + + @TestMetadata("defaultMethod.kt") + public void testDefaultMethod() throws Exception { + runTest("compiler/testData/codegen/box/interfaces/defaultMethod.kt"); + } + + @TestMetadata("inheritJavaInterface.kt") + public void testInheritJavaInterface() throws Exception { + runTest("compiler/testData/codegen/box/interfaces/inheritJavaInterface.kt"); + } + } + @TestMetadata("compiler/testData/codegen/box/intrinsics") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) @@ -16121,6 +16504,132 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/invokedynamic"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @TestMetadata("compiler/testData/codegen/box/invokedynamic/lambdas") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Lambdas extends AbstractLightAnalysisModeTest { + @TestMetadata("bigArityExtLambda.kt") + public void ignoreBigArityExtLambda() throws Exception { + runTest("compiler/testData/codegen/box/invokedynamic/lambdas/bigArityExtLambda.kt"); + } + + @TestMetadata("lambdaSerializable.kt") + public void ignoreLambdaSerializable() throws Exception { + runTest("compiler/testData/codegen/box/invokedynamic/lambdas/lambdaSerializable.kt"); + } + + @TestMetadata("lambdaToSting.kt") + public void ignoreLambdaToSting() throws Exception { + runTest("compiler/testData/codegen/box/invokedynamic/lambdas/lambdaToSting.kt"); + } + + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + + public void testAllFilesPresentInLambdas() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/invokedynamic/lambdas"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); + } + + @TestMetadata("bigArityLambda.kt") + public void testBigArityLambda() throws Exception { + runTest("compiler/testData/codegen/box/invokedynamic/lambdas/bigArityLambda.kt"); + } + + @TestMetadata("capturedDispatchReceiver.kt") + public void testCapturedDispatchReceiver() throws Exception { + runTest("compiler/testData/codegen/box/invokedynamic/lambdas/capturedDispatchReceiver.kt"); + } + + @TestMetadata("capturedExtensionReceiver.kt") + public void testCapturedExtensionReceiver() throws Exception { + runTest("compiler/testData/codegen/box/invokedynamic/lambdas/capturedExtensionReceiver.kt"); + } + + @TestMetadata("capturingValue.kt") + public void testCapturingValue() throws Exception { + runTest("compiler/testData/codegen/box/invokedynamic/lambdas/capturingValue.kt"); + } + + @TestMetadata("capturingVar.kt") + public void testCapturingVar() throws Exception { + runTest("compiler/testData/codegen/box/invokedynamic/lambdas/capturingVar.kt"); + } + + @TestMetadata("extensionLambda.kt") + public void testExtensionLambda() throws Exception { + runTest("compiler/testData/codegen/box/invokedynamic/lambdas/extensionLambda.kt"); + } + + @TestMetadata("nestedIndyLambdas.kt") + public void testNestedIndyLambdas() throws Exception { + runTest("compiler/testData/codegen/box/invokedynamic/lambdas/nestedIndyLambdas.kt"); + } + + @TestMetadata("primitiveValueParameters.kt") + public void testPrimitiveValueParameters() throws Exception { + runTest("compiler/testData/codegen/box/invokedynamic/lambdas/primitiveValueParameters.kt"); + } + + @TestMetadata("simpleIndyLambda.kt") + public void testSimpleIndyLambda() throws Exception { + runTest("compiler/testData/codegen/box/invokedynamic/lambdas/simpleIndyLambda.kt"); + } + + @TestMetadata("suspendLambda.kt") + public void testSuspendLambda() throws Exception { + runTest("compiler/testData/codegen/box/invokedynamic/lambdas/suspendLambda.kt"); + } + + @TestMetadata("voidReturnType.kt") + public void testVoidReturnType() throws Exception { + runTest("compiler/testData/codegen/box/invokedynamic/lambdas/voidReturnType.kt"); + } + + @TestMetadata("compiler/testData/codegen/box/invokedynamic/lambdas/inlineClassInSignature") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class InlineClassInSignature extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + + public void testAllFilesPresentInInlineClassInSignature() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/invokedynamic/lambdas/inlineClassInSignature"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); + } + + @TestMetadata("lambdaWithInlineAny.kt") + public void testLambdaWithInlineAny() throws Exception { + runTest("compiler/testData/codegen/box/invokedynamic/lambdas/inlineClassInSignature/lambdaWithInlineAny.kt"); + } + + @TestMetadata("lambdaWithInlineInt.kt") + public void testLambdaWithInlineInt() throws Exception { + runTest("compiler/testData/codegen/box/invokedynamic/lambdas/inlineClassInSignature/lambdaWithInlineInt.kt"); + } + + @TestMetadata("lambdaWithInlineNAny.kt") + public void testLambdaWithInlineNAny() throws Exception { + runTest("compiler/testData/codegen/box/invokedynamic/lambdas/inlineClassInSignature/lambdaWithInlineNAny.kt"); + } + + @TestMetadata("lambdaWithInlineNInt.kt") + public void testLambdaWithInlineNInt() throws Exception { + runTest("compiler/testData/codegen/box/invokedynamic/lambdas/inlineClassInSignature/lambdaWithInlineNInt.kt"); + } + + @TestMetadata("lambdaWithInlineNString.kt") + public void testLambdaWithInlineNString() throws Exception { + runTest("compiler/testData/codegen/box/invokedynamic/lambdas/inlineClassInSignature/lambdaWithInlineNString.kt"); + } + + @TestMetadata("lambdaWithInlineString.kt") + public void testLambdaWithInlineString() throws Exception { + runTest("compiler/testData/codegen/box/invokedynamic/lambdas/inlineClassInSignature/lambdaWithInlineString.kt"); + } + } + } + @TestMetadata("compiler/testData/codegen/box/invokedynamic/sam") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) @@ -16238,37 +16747,9 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/invokedynamic/sam/unboundFunctionReferenceEquality.kt"); } - @TestMetadata("compiler/testData/codegen/box/invokedynamic/sam/inline") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Inline extends AbstractLightAnalysisModeTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); - } - - public void testAllFilesPresentInInline() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/invokedynamic/sam/inline"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); - } - - @TestMetadata("crossinlineLambda1.kt") - public void testCrossinlineLambda1() throws Exception { - runTest("compiler/testData/codegen/box/invokedynamic/sam/inline/crossinlineLambda1.kt"); - } - - @TestMetadata("crossinlineLambda2.kt") - public void testCrossinlineLambda2() throws Exception { - runTest("compiler/testData/codegen/box/invokedynamic/sam/inline/crossinlineLambda2.kt"); - } - - @TestMetadata("inlineFunInDifferentPackage.kt") - public void testInlineFunInDifferentPackage() throws Exception { - runTest("compiler/testData/codegen/box/invokedynamic/sam/inline/inlineFunInDifferentPackage.kt"); - } - - @TestMetadata("inlineLambda1.kt") - public void testInlineLambda1() throws Exception { - runTest("compiler/testData/codegen/box/invokedynamic/sam/inline/inlineLambda1.kt"); - } + @TestMetadata("voidReturnTypeAsGeneric.kt") + public void testVoidReturnTypeAsGeneric() throws Exception { + runTest("compiler/testData/codegen/box/invokedynamic/sam/voidReturnTypeAsGeneric.kt"); } @TestMetadata("compiler/testData/codegen/box/invokedynamic/sam/inlineClassInSignature") @@ -17318,10 +17799,20 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/jvm8/defaults/superCall.kt"); } + @TestMetadata("suspendFunction.kt") + public void testSuspendFunction() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/suspendFunction.kt"); + } + @TestMetadata("compiler/testData/codegen/box/jvm8/defaults/allCompatibility") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class AllCompatibility extends AbstractLightAnalysisModeTest { + @TestMetadata("suspendFunction.kt") + public void ignoreSuspendFunction() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/allCompatibility/suspendFunction.kt"); + } + private void runTest(String testDataFilePath) throws Exception { KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); } @@ -17757,6 +18248,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/simpleFunction.kt"); } + @TestMetadata("suspendFunction.kt") + public void testSuspendFunction() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/suspendFunction.kt"); + } + @TestMetadata("compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/delegationBy") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) @@ -19638,6 +20134,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @TestMetadata("annotationsViaActualTypeAliasFromBinary.kt") + public void testAnnotationsViaActualTypeAliasFromBinary() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/annotationsViaActualTypeAliasFromBinary.kt"); + } + @TestMetadata("expectClassInJvmMultifileFacade.kt") public void testExpectClassInJvmMultifileFacade() throws Exception { runTest("compiler/testData/codegen/box/multiplatform/expectClassInJvmMultifileFacade.kt"); @@ -19848,6 +20349,44 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes } } + @TestMetadata("compiler/testData/codegen/box/notNullAssertions") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class NotNullAssertions extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + + public void testAllFilesPresentInNotNullAssertions() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/notNullAssertions"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); + } + + @TestMetadata("callAssertions.kt") + public void testCallAssertions() throws Exception { + runTest("compiler/testData/codegen/box/notNullAssertions/callAssertions.kt"); + } + + @TestMetadata("delegation.kt") + public void testDelegation() throws Exception { + runTest("compiler/testData/codegen/box/notNullAssertions/delegation.kt"); + } + + @TestMetadata("doGenerateParamAssertions.kt") + public void testDoGenerateParamAssertions() throws Exception { + runTest("compiler/testData/codegen/box/notNullAssertions/doGenerateParamAssertions.kt"); + } + + @TestMetadata("noCallAssertions.kt") + public void testNoCallAssertions() throws Exception { + runTest("compiler/testData/codegen/box/notNullAssertions/noCallAssertions.kt"); + } + + @TestMetadata("rightElvisOperand.kt") + public void testRightElvisOperand() throws Exception { + runTest("compiler/testData/codegen/box/notNullAssertions/rightElvisOperand.kt"); + } + } + @TestMetadata("compiler/testData/codegen/box/nothingValue") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) @@ -20650,6 +21189,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/oldLanguageVersions/ieee754"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @TestMetadata("explicitEqualsCallNull.kt") + public void testExplicitEqualsCallNull() throws Exception { + runTest("compiler/testData/codegen/box/oldLanguageVersions/ieee754/explicitEqualsCallNull.kt"); + } + @TestMetadata("nullableDoubleEquals10.kt") public void testNullableDoubleEquals10() throws Exception { runTest("compiler/testData/codegen/box/oldLanguageVersions/ieee754/nullableDoubleEquals10.kt"); @@ -21129,11 +21673,31 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/platformTypes"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @TestMetadata("genericUnit.kt") + public void testGenericUnit() throws Exception { + runTest("compiler/testData/codegen/box/platformTypes/genericUnit.kt"); + } + @TestMetadata("inferenceFlexibleTToNullable.kt") public void testInferenceFlexibleTToNullable() throws Exception { runTest("compiler/testData/codegen/box/platformTypes/inferenceFlexibleTToNullable.kt"); } + @TestMetadata("kt14989.kt") + public void testKt14989() throws Exception { + runTest("compiler/testData/codegen/box/platformTypes/kt14989.kt"); + } + + @TestMetadata("specializedMapFull.kt") + public void testSpecializedMapFull() throws Exception { + runTest("compiler/testData/codegen/box/platformTypes/specializedMapFull.kt"); + } + + @TestMetadata("specializedMapPut.kt") + public void testSpecializedMapPut() throws Exception { + runTest("compiler/testData/codegen/box/platformTypes/specializedMapPut.kt"); + } + @TestMetadata("unsafeNullCheck.kt") public void testUnsafeNullCheck() throws Exception { runTest("compiler/testData/codegen/box/platformTypes/unsafeNullCheck.kt"); @@ -22609,6 +23173,34 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes } } + @TestMetadata("compiler/testData/codegen/box/property") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Property extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + + public void testAllFilesPresentInProperty() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/property"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); + } + + @TestMetadata("fieldAccessFromExtensionInTraitImpl.kt") + public void testFieldAccessFromExtensionInTraitImpl() throws Exception { + runTest("compiler/testData/codegen/box/property/fieldAccessFromExtensionInTraitImpl.kt"); + } + + @TestMetadata("fieldAccessViaSubclass.kt") + public void testFieldAccessViaSubclass() throws Exception { + runTest("compiler/testData/codegen/box/property/fieldAccessViaSubclass.kt"); + } + + @TestMetadata("referenceToJavaFieldViaBridge.kt") + public void testReferenceToJavaFieldViaBridge() throws Exception { + runTest("compiler/testData/codegen/box/property/referenceToJavaFieldViaBridge.kt"); + } + } + @TestMetadata("compiler/testData/codegen/box/publishedApi") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) @@ -24706,6 +25298,29 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes } } + @TestMetadata("compiler/testData/codegen/box/recursiveRawTypes") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class RecursiveRawTypes extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + + public void testAllFilesPresentInRecursiveRawTypes() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/recursiveRawTypes"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); + } + + @TestMetadata("kt16528.kt") + public void testKt16528() throws Exception { + runTest("compiler/testData/codegen/box/recursiveRawTypes/kt16528.kt"); + } + + @TestMetadata("kt16639.kt") + public void testKt16639() throws Exception { + runTest("compiler/testData/codegen/box/recursiveRawTypes/kt16639.kt"); + } + } + @TestMetadata("compiler/testData/codegen/box/reflection") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) @@ -25366,6 +25981,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/reflection/classLiterals/genericClass.kt"); } + @TestMetadata("javaClassLiteral.kt") + public void testJavaClassLiteral() throws Exception { + runTest("compiler/testData/codegen/box/reflection/classLiterals/javaClassLiteral.kt"); + } + @TestMetadata("lambdaClass.kt") public void testLambdaClass() throws Exception { runTest("compiler/testData/codegen/box/reflection/classLiterals/lambdaClass.kt"); @@ -26086,6 +26706,26 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/reflection/mapping/interfaceCompanionPropertyWithJvmField.kt"); } + @TestMetadata("jClass2kClass.kt") + public void testJClass2kClass() throws Exception { + runTest("compiler/testData/codegen/box/reflection/mapping/jClass2kClass.kt"); + } + + @TestMetadata("javaConstructor.kt") + public void testJavaConstructor() throws Exception { + runTest("compiler/testData/codegen/box/reflection/mapping/javaConstructor.kt"); + } + + @TestMetadata("javaFields.kt") + public void testJavaFields() throws Exception { + runTest("compiler/testData/codegen/box/reflection/mapping/javaFields.kt"); + } + + @TestMetadata("javaMethods.kt") + public void testJavaMethods() throws Exception { + runTest("compiler/testData/codegen/box/reflection/mapping/javaMethods.kt"); + } + @TestMetadata("lateinitProperty.kt") public void testLateinitProperty() throws Exception { runTest("compiler/testData/codegen/box/reflection/mapping/lateinitProperty.kt"); @@ -26739,6 +27379,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/reflection/properties/declaredVsInheritedProperties.kt"); } + @TestMetadata("equalsHashCodeToString.kt") + public void testEqualsHashCodeToString() throws Exception { + runTest("compiler/testData/codegen/box/reflection/properties/equalsHashCodeToString.kt"); + } + @TestMetadata("fakeOverridesInSubclass.kt") public void testFakeOverridesInSubclass() throws Exception { runTest("compiler/testData/codegen/box/reflection/properties/fakeOverridesInSubclass.kt"); @@ -28098,6 +28743,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/reified/javaClass.kt"); } + @TestMetadata("kt16445.kt") + public void testKt16445() throws Exception { + runTest("compiler/testData/codegen/box/reified/kt16445.kt"); + } + @TestMetadata("nestedReified.kt") public void testNestedReified() throws Exception { runTest("compiler/testData/codegen/box/reified/nestedReified.kt"); @@ -28342,6 +28992,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/sam/castFromAny.kt"); } + @TestMetadata("differentFqNames.kt") + public void testDifferentFqNames() throws Exception { + runTest("compiler/testData/codegen/box/sam/differentFqNames.kt"); + } + @TestMetadata("inlinedSamWrapper.kt") public void testInlinedSamWrapper() throws Exception { runTest("compiler/testData/codegen/box/sam/inlinedSamWrapper.kt"); @@ -28352,6 +29007,21 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/sam/irrelevantStaticProperty.kt"); } + @TestMetadata("kt11519.kt") + public void testKt11519() throws Exception { + runTest("compiler/testData/codegen/box/sam/kt11519.kt"); + } + + @TestMetadata("kt11519Constructor.kt") + public void testKt11519Constructor() throws Exception { + runTest("compiler/testData/codegen/box/sam/kt11519Constructor.kt"); + } + + @TestMetadata("kt11696.kt") + public void testKt11696() throws Exception { + runTest("compiler/testData/codegen/box/sam/kt11696.kt"); + } + @TestMetadata("kt17091.kt") public void testKt17091() throws Exception { runTest("compiler/testData/codegen/box/sam/kt17091.kt"); @@ -28392,6 +29062,16 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/sam/kt31908.kt"); } + @TestMetadata("kt4753.kt") + public void testKt4753() throws Exception { + runTest("compiler/testData/codegen/box/sam/kt4753.kt"); + } + + @TestMetadata("kt4753_2.kt") + public void testKt4753_2() throws Exception { + runTest("compiler/testData/codegen/box/sam/kt4753_2.kt"); + } + @TestMetadata("nonInlinedSamWrapper.kt") public void testNonInlinedSamWrapper() throws Exception { runTest("compiler/testData/codegen/box/sam/nonInlinedSamWrapper.kt"); @@ -28422,6 +29102,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/sam/predicateSamWrapper.kt"); } + @TestMetadata("propertyReference.kt") + public void testPropertyReference() throws Exception { + runTest("compiler/testData/codegen/box/sam/propertyReference.kt"); + } + @TestMetadata("receiverEvaluatedOnce.kt") public void testReceiverEvaluatedOnce() throws Exception { runTest("compiler/testData/codegen/box/sam/receiverEvaluatedOnce.kt"); @@ -28432,6 +29117,242 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/sam/recordSubstitutedTypeForCallableSamParameter.kt"); } + @TestMetadata("samConstructorGenericSignature.kt") + public void testSamConstructorGenericSignature() throws Exception { + runTest("compiler/testData/codegen/box/sam/samConstructorGenericSignature.kt"); + } + + @TestMetadata("smartCastSamConversion.kt") + public void testSmartCastSamConversion() throws Exception { + runTest("compiler/testData/codegen/box/sam/smartCastSamConversion.kt"); + } + + @TestMetadata("compiler/testData/codegen/box/sam/adapters") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Adapters extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + + public void testAllFilesPresentInAdapters() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/sam/adapters"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); + } + + @TestMetadata("bridgesForOverridden.kt") + public void testBridgesForOverridden() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/bridgesForOverridden.kt"); + } + + @TestMetadata("bridgesForOverriddenComplex.kt") + public void testBridgesForOverriddenComplex() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/bridgesForOverriddenComplex.kt"); + } + + @TestMetadata("callAbstractAdapter.kt") + public void testCallAbstractAdapter() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/callAbstractAdapter.kt"); + } + + @TestMetadata("comparator.kt") + public void testComparator() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/comparator.kt"); + } + + @TestMetadata("constructor.kt") + public void testConstructor() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/constructor.kt"); + } + + @TestMetadata("doubleLongParameters.kt") + public void testDoubleLongParameters() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/doubleLongParameters.kt"); + } + + @TestMetadata("fileFilter.kt") + public void testFileFilter() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/fileFilter.kt"); + } + + @TestMetadata("genericSignature.kt") + public void testGenericSignature() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/genericSignature.kt"); + } + + @TestMetadata("implementAdapter.kt") + public void testImplementAdapter() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/implementAdapter.kt"); + } + + @TestMetadata("inheritedInKotlin.kt") + public void testInheritedInKotlin() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/inheritedInKotlin.kt"); + } + + @TestMetadata("inheritedOverriddenAdapter.kt") + public void testInheritedOverriddenAdapter() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/inheritedOverriddenAdapter.kt"); + } + + @TestMetadata("inheritedSimple.kt") + public void testInheritedSimple() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/inheritedSimple.kt"); + } + + @TestMetadata("localClass.kt") + public void testLocalClass() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/localClass.kt"); + } + + @TestMetadata("localObjectConstructor.kt") + public void testLocalObjectConstructor() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/localObjectConstructor.kt"); + } + + @TestMetadata("localObjectConstructorWithFnValue.kt") + public void testLocalObjectConstructorWithFnValue() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/localObjectConstructorWithFnValue.kt"); + } + + @TestMetadata("nonLiteralAndLiteralRunnable.kt") + public void testNonLiteralAndLiteralRunnable() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/nonLiteralAndLiteralRunnable.kt"); + } + + @TestMetadata("nonLiteralComparator.kt") + public void testNonLiteralComparator() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/nonLiteralComparator.kt"); + } + + @TestMetadata("nonLiteralInConstructor.kt") + public void testNonLiteralInConstructor() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/nonLiteralInConstructor.kt"); + } + + @TestMetadata("nonLiteralNull.kt") + public void testNonLiteralNull() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/nonLiteralNull.kt"); + } + + @TestMetadata("nonLiteralRunnable.kt") + public void testNonLiteralRunnable() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/nonLiteralRunnable.kt"); + } + + @TestMetadata("protectedFromBase.kt") + public void testProtectedFromBase() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/protectedFromBase.kt"); + } + + @TestMetadata("severalSamParameters.kt") + public void testSeveralSamParameters() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/severalSamParameters.kt"); + } + + @TestMetadata("simplest.kt") + public void testSimplest() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/simplest.kt"); + } + + @TestMetadata("superInSecondaryConstructor.kt") + public void testSuperInSecondaryConstructor() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/superInSecondaryConstructor.kt"); + } + + @TestMetadata("superconstructor.kt") + public void testSuperconstructor() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/superconstructor.kt"); + } + + @TestMetadata("superconstructorWithClosure.kt") + public void testSuperconstructorWithClosure() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/superconstructorWithClosure.kt"); + } + + @TestMetadata("typeParameterOfClass.kt") + public void testTypeParameterOfClass() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/typeParameterOfClass.kt"); + } + + @TestMetadata("typeParameterOfMethod.kt") + public void testTypeParameterOfMethod() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/typeParameterOfMethod.kt"); + } + + @TestMetadata("typeParameterOfOuterClass.kt") + public void testTypeParameterOfOuterClass() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/typeParameterOfOuterClass.kt"); + } + + @TestMetadata("compiler/testData/codegen/box/sam/adapters/operators") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Operators extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + + public void testAllFilesPresentInOperators() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/sam/adapters/operators"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); + } + + @TestMetadata("augmentedAssignmentPure.kt") + public void testAugmentedAssignmentPure() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/operators/augmentedAssignmentPure.kt"); + } + + @TestMetadata("augmentedAssignmentViaSimpleBinary.kt") + public void testAugmentedAssignmentViaSimpleBinary() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/operators/augmentedAssignmentViaSimpleBinary.kt"); + } + + @TestMetadata("binary.kt") + public void testBinary() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/operators/binary.kt"); + } + + @TestMetadata("compareTo.kt") + public void testCompareTo() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/operators/compareTo.kt"); + } + + @TestMetadata("contains.kt") + public void testContains() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/operators/contains.kt"); + } + + @TestMetadata("get.kt") + public void testGet() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/operators/get.kt"); + } + + @TestMetadata("invoke.kt") + public void testInvoke() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/operators/invoke.kt"); + } + + @TestMetadata("legacyModOperator.kt") + public void testLegacyModOperator() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/operators/legacyModOperator.kt"); + } + + @TestMetadata("multiGetSet.kt") + public void testMultiGetSet() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/operators/multiGetSet.kt"); + } + + @TestMetadata("multiInvoke.kt") + public void testMultiInvoke() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/operators/multiInvoke.kt"); + } + + @TestMetadata("set.kt") + public void testSet() throws Exception { + runTest("compiler/testData/codegen/box/sam/adapters/operators/set.kt"); + } + } + } + @TestMetadata("compiler/testData/codegen/box/sam/constructors") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) @@ -29026,6 +29947,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/specialBuiltins/bridges.kt"); } + @TestMetadata("charBuffer.kt") + public void testCharBuffer() throws Exception { + runTest("compiler/testData/codegen/box/specialBuiltins/charBuffer.kt"); + } + @TestMetadata("collectionImpl.kt") public void testCollectionImpl() throws Exception { runTest("compiler/testData/codegen/box/specialBuiltins/collectionImpl.kt"); @@ -29152,6 +30078,24 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes } } + @TestMetadata("compiler/testData/codegen/box/staticFun") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class StaticFun extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + + public void testAllFilesPresentInStaticFun() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/staticFun"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); + } + + @TestMetadata("classWithNestedEnum.kt") + public void testClassWithNestedEnum() throws Exception { + runTest("compiler/testData/codegen/box/staticFun/classWithNestedEnum.kt"); + } + } + @TestMetadata("compiler/testData/codegen/box/statics") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) @@ -29244,6 +30188,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/statics/protectedStaticAndInline.kt"); } + @TestMetadata("simpleStaticInJavaSuperChain.kt") + public void testSimpleStaticInJavaSuperChain() throws Exception { + runTest("compiler/testData/codegen/box/statics/simpleStaticInJavaSuperChain.kt"); + } + @TestMetadata("syntheticAccessor.kt") public void testSyntheticAccessor() throws Exception { runTest("compiler/testData/codegen/box/statics/syntheticAccessor.kt"); @@ -29823,6 +30772,69 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes } } + @TestMetadata("compiler/testData/codegen/box/syntheticExtensions") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class SyntheticExtensions extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + + public void testAllFilesPresentInSyntheticExtensions() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/syntheticExtensions"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); + } + + @TestMetadata("fromTwoBases.kt") + public void testFromTwoBases() throws Exception { + runTest("compiler/testData/codegen/box/syntheticExtensions/fromTwoBases.kt"); + } + + @TestMetadata("getter.kt") + public void testGetter() throws Exception { + runTest("compiler/testData/codegen/box/syntheticExtensions/getter.kt"); + } + + @TestMetadata("implicitReceiver.kt") + public void testImplicitReceiver() throws Exception { + runTest("compiler/testData/codegen/box/syntheticExtensions/implicitReceiver.kt"); + } + + @TestMetadata("overrideOnlyGetter.kt") + public void testOverrideOnlyGetter() throws Exception { + runTest("compiler/testData/codegen/box/syntheticExtensions/overrideOnlyGetter.kt"); + } + + @TestMetadata("plusPlus.kt") + public void testPlusPlus() throws Exception { + runTest("compiler/testData/codegen/box/syntheticExtensions/plusPlus.kt"); + } + + @TestMetadata("protected.kt") + public void testProtected() throws Exception { + runTest("compiler/testData/codegen/box/syntheticExtensions/protected.kt"); + } + + @TestMetadata("protectedSetter.kt") + public void testProtectedSetter() throws Exception { + runTest("compiler/testData/codegen/box/syntheticExtensions/protectedSetter.kt"); + } + + @TestMetadata("setter.kt") + public void testSetter() throws Exception { + runTest("compiler/testData/codegen/box/syntheticExtensions/setter.kt"); + } + + @TestMetadata("setterNonVoid1.kt") + public void testSetterNonVoid1() throws Exception { + runTest("compiler/testData/codegen/box/syntheticExtensions/setterNonVoid1.kt"); + } + + @TestMetadata("setterNonVoid2.kt") + public void testSetterNonVoid2() throws Exception { + runTest("compiler/testData/codegen/box/syntheticExtensions/setterNonVoid2.kt"); + } + } + @TestMetadata("compiler/testData/codegen/box/throws") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) @@ -29844,6 +30856,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes public void testDelegationAndThrows_1_3() throws Exception { runTest("compiler/testData/codegen/box/throws/delegationAndThrows_1_3.kt"); } + + @TestMetadata("delegationAndThrows_AgainstCompiled.kt") + public void testDelegationAndThrows_AgainstCompiled() throws Exception { + runTest("compiler/testData/codegen/box/throws/delegationAndThrows_AgainstCompiled.kt"); + } } @TestMetadata("compiler/testData/codegen/box/toArray") @@ -30326,6 +31343,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/typealias/innerClassTypeAliasConstructorInSupertypes.kt"); } + @TestMetadata("javaStaticMembersViaTypeAlias.kt") + public void testJavaStaticMembersViaTypeAlias() throws Exception { + runTest("compiler/testData/codegen/box/typealias/javaStaticMembersViaTypeAlias.kt"); + } + @TestMetadata("kt15109.kt") public void testKt15109() throws Exception { runTest("compiler/testData/codegen/box/typealias/kt15109.kt"); @@ -30376,6 +31398,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/typealias/typeAliasConstructorInSuperCall.kt"); } + @TestMetadata("typeAliasFunction.kt") + public void testTypeAliasFunction() throws Exception { + runTest("compiler/testData/codegen/box/typealias/typeAliasFunction.kt"); + } + @TestMetadata("typeAliasInAnonymousObjectType.kt") public void testTypeAliasInAnonymousObjectType() throws Exception { runTest("compiler/testData/codegen/box/typealias/typeAliasInAnonymousObjectType.kt"); @@ -30905,6 +31932,206 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes } } + @TestMetadata("compiler/testData/codegen/box/varargs") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Varargs extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + + public void testAllFilesPresentInVarargs() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/varargs"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); + } + + @TestMetadata("varargsOverride.kt") + public void testVarargsOverride() throws Exception { + runTest("compiler/testData/codegen/box/varargs/varargsOverride.kt"); + } + + @TestMetadata("varargsOverride2.kt") + public void testVarargsOverride2() throws Exception { + runTest("compiler/testData/codegen/box/varargs/varargsOverride2.kt"); + } + + @TestMetadata("varargsOverride3.kt") + public void testVarargsOverride3() throws Exception { + runTest("compiler/testData/codegen/box/varargs/varargsOverride3.kt"); + } + } + + @TestMetadata("compiler/testData/codegen/box/visibility") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Visibility extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + + public void testAllFilesPresentInVisibility() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/visibility"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); + } + + @TestMetadata("compiler/testData/codegen/box/visibility/package") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Package extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + + public void testAllFilesPresentInPackage() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/visibility/package"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); + } + + @TestMetadata("kt2781.kt") + public void testKt2781() throws Exception { + runTest("compiler/testData/codegen/box/visibility/package/kt2781.kt"); + } + + @TestMetadata("packageClass.kt") + public void testPackageClass() throws Exception { + runTest("compiler/testData/codegen/box/visibility/package/packageClass.kt"); + } + + @TestMetadata("packageFun.kt") + public void testPackageFun() throws Exception { + runTest("compiler/testData/codegen/box/visibility/package/packageFun.kt"); + } + + @TestMetadata("packageProperty.kt") + public void testPackageProperty() throws Exception { + runTest("compiler/testData/codegen/box/visibility/package/packageProperty.kt"); + } + } + + @TestMetadata("compiler/testData/codegen/box/visibility/protectedAndPackage") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ProtectedAndPackage extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + + public void testAllFilesPresentInProtectedAndPackage() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/visibility/protectedAndPackage"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); + } + + @TestMetadata("overrideProtectedFunInPackage.kt") + public void testOverrideProtectedFunInPackage() throws Exception { + runTest("compiler/testData/codegen/box/visibility/protectedAndPackage/overrideProtectedFunInPackage.kt"); + } + + @TestMetadata("protectedAccessor.kt") + public void testProtectedAccessor() throws Exception { + runTest("compiler/testData/codegen/box/visibility/protectedAndPackage/protectedAccessor.kt"); + } + + @TestMetadata("protectedFunInPackage.kt") + public void testProtectedFunInPackage() throws Exception { + runTest("compiler/testData/codegen/box/visibility/protectedAndPackage/protectedFunInPackage.kt"); + } + + @TestMetadata("protectedPropertyInPackage.kt") + public void testProtectedPropertyInPackage() throws Exception { + runTest("compiler/testData/codegen/box/visibility/protectedAndPackage/protectedPropertyInPackage.kt"); + } + + @TestMetadata("protectedPropertyInPackageFromCrossinline.kt") + public void testProtectedPropertyInPackageFromCrossinline() throws Exception { + runTest("compiler/testData/codegen/box/visibility/protectedAndPackage/protectedPropertyInPackageFromCrossinline.kt"); + } + + @TestMetadata("protectedStaticClass.kt") + public void testProtectedStaticClass() throws Exception { + runTest("compiler/testData/codegen/box/visibility/protectedAndPackage/protectedStaticClass.kt"); + } + + @TestMetadata("protectedSuperField.kt") + public void testProtectedSuperField() throws Exception { + runTest("compiler/testData/codegen/box/visibility/protectedAndPackage/protectedSuperField.kt"); + } + + @TestMetadata("protectedSuperMethod.kt") + public void testProtectedSuperMethod() throws Exception { + runTest("compiler/testData/codegen/box/visibility/protectedAndPackage/protectedSuperMethod.kt"); + } + } + + @TestMetadata("compiler/testData/codegen/box/visibility/protectedStatic") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ProtectedStatic extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + + public void testAllFilesPresentInProtectedStatic() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/visibility/protectedStatic"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); + } + + @TestMetadata("funCallInConstructor.kt") + public void testFunCallInConstructor() throws Exception { + runTest("compiler/testData/codegen/box/visibility/protectedStatic/funCallInConstructor.kt"); + } + + @TestMetadata("funClassObject.kt") + public void testFunClassObject() throws Exception { + runTest("compiler/testData/codegen/box/visibility/protectedStatic/funClassObject.kt"); + } + + @TestMetadata("funGenericClass.kt") + public void testFunGenericClass() throws Exception { + runTest("compiler/testData/codegen/box/visibility/protectedStatic/funGenericClass.kt"); + } + + @TestMetadata("funNestedStaticClass.kt") + public void testFunNestedStaticClass() throws Exception { + runTest("compiler/testData/codegen/box/visibility/protectedStatic/funNestedStaticClass.kt"); + } + + @TestMetadata("funNestedStaticClass2.kt") + public void testFunNestedStaticClass2() throws Exception { + runTest("compiler/testData/codegen/box/visibility/protectedStatic/funNestedStaticClass2.kt"); + } + + @TestMetadata("funNestedStaticGenericClass.kt") + public void testFunNestedStaticGenericClass() throws Exception { + runTest("compiler/testData/codegen/box/visibility/protectedStatic/funNestedStaticGenericClass.kt"); + } + + @TestMetadata("funNotDirectSuperClass.kt") + public void testFunNotDirectSuperClass() throws Exception { + runTest("compiler/testData/codegen/box/visibility/protectedStatic/funNotDirectSuperClass.kt"); + } + + @TestMetadata("funObject.kt") + public void testFunObject() throws Exception { + runTest("compiler/testData/codegen/box/visibility/protectedStatic/funObject.kt"); + } + + @TestMetadata("simpleClass.kt") + public void testSimpleClass() throws Exception { + runTest("compiler/testData/codegen/box/visibility/protectedStatic/simpleClass.kt"); + } + + @TestMetadata("simpleClass2.kt") + public void testSimpleClass2() throws Exception { + runTest("compiler/testData/codegen/box/visibility/protectedStatic/simpleClass2.kt"); + } + + @TestMetadata("simpleFun.kt") + public void testSimpleFun() throws Exception { + runTest("compiler/testData/codegen/box/visibility/protectedStatic/simpleFun.kt"); + } + + @TestMetadata("simpleProperty.kt") + public void testSimpleProperty() throws Exception { + runTest("compiler/testData/codegen/box/visibility/protectedStatic/simpleProperty.kt"); + } + } + } + @TestMetadata("compiler/testData/codegen/box/when") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) diff --git a/compiler/tests-gen/org/jetbrains/kotlin/codegen/debugInformation/IrSteppingTestGenerated.java b/compiler/tests-gen/org/jetbrains/kotlin/codegen/debugInformation/IrSteppingTestGenerated.java index 3f4c484da59..653fd46620b 100644 --- a/compiler/tests-gen/org/jetbrains/kotlin/codegen/debugInformation/IrSteppingTestGenerated.java +++ b/compiler/tests-gen/org/jetbrains/kotlin/codegen/debugInformation/IrSteppingTestGenerated.java @@ -98,6 +98,12 @@ public class IrSteppingTestGenerated extends AbstractIrSteppingTest { runTest("compiler/testData/debug/stepping/conjunction.kt"); } + @Test + @TestMetadata("constantConditions.kt") + public void testConstantConditions() throws Exception { + runTest("compiler/testData/debug/stepping/constantConditions.kt"); + } + @Test @TestMetadata("constructorCall.kt") public void testConstructorCall() throws Exception { @@ -272,6 +278,12 @@ public class IrSteppingTestGenerated extends AbstractIrSteppingTest { runTest("compiler/testData/debug/stepping/localFunctionWIthOnelineExpressionBody.kt"); } + @Test + @TestMetadata("multilineExpression.kt") + public void testMultilineExpression() throws Exception { + runTest("compiler/testData/debug/stepping/multilineExpression.kt"); + } + @Test @TestMetadata("multilineFunctionCall.kt") public void testMultilineFunctionCall() throws Exception { diff --git a/compiler/tests-gen/org/jetbrains/kotlin/codegen/debugInformation/SteppingTestGenerated.java b/compiler/tests-gen/org/jetbrains/kotlin/codegen/debugInformation/SteppingTestGenerated.java index eacf41515d0..b2ccbb9fb7e 100644 --- a/compiler/tests-gen/org/jetbrains/kotlin/codegen/debugInformation/SteppingTestGenerated.java +++ b/compiler/tests-gen/org/jetbrains/kotlin/codegen/debugInformation/SteppingTestGenerated.java @@ -98,6 +98,12 @@ public class SteppingTestGenerated extends AbstractSteppingTest { runTest("compiler/testData/debug/stepping/conjunction.kt"); } + @Test + @TestMetadata("constantConditions.kt") + public void testConstantConditions() throws Exception { + runTest("compiler/testData/debug/stepping/constantConditions.kt"); + } + @Test @TestMetadata("constructorCall.kt") public void testConstructorCall() throws Exception { @@ -272,6 +278,12 @@ public class SteppingTestGenerated extends AbstractSteppingTest { runTest("compiler/testData/debug/stepping/localFunctionWIthOnelineExpressionBody.kt"); } + @Test + @TestMetadata("multilineExpression.kt") + public void testMultilineExpression() throws Exception { + runTest("compiler/testData/debug/stepping/multilineExpression.kt"); + } + @Test @TestMetadata("multilineFunctionCall.kt") public void testMultilineFunctionCall() throws Exception { diff --git a/compiler/tests-gen/org/jetbrains/kotlin/codegen/ir/IrBlackBoxAgainstJavaCodegenTestGenerated.java b/compiler/tests-gen/org/jetbrains/kotlin/codegen/ir/IrBlackBoxAgainstJavaCodegenTestGenerated.java deleted file mode 100644 index c9eb23e2af2..00000000000 --- a/compiler/tests-gen/org/jetbrains/kotlin/codegen/ir/IrBlackBoxAgainstJavaCodegenTestGenerated.java +++ /dev/null @@ -1,1279 +0,0 @@ -/* - * Copyright 2010-2021 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. - */ - -package org.jetbrains.kotlin.codegen.ir; - -import com.intellij.testFramework.TestDataPath; -import org.jetbrains.kotlin.test.JUnit3RunnerWithInners; -import org.jetbrains.kotlin.test.KotlinTestUtils; -import org.jetbrains.kotlin.test.util.KtTestUtil; -import org.jetbrains.kotlin.test.TargetBackend; -import org.jetbrains.kotlin.test.TestMetadata; -import org.junit.runner.RunWith; - -import java.io.File; -import java.util.regex.Pattern; - -/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */ -@SuppressWarnings("all") -@TestMetadata("compiler/testData/codegen/boxAgainstJava") -@TestDataPath("$PROJECT_ROOT") -@RunWith(JUnit3RunnerWithInners.class) -public class IrBlackBoxAgainstJavaCodegenTestGenerated extends AbstractIrBlackBoxAgainstJavaCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - - public void testAllFilesPresentInBoxAgainstJava() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true, "oldLanguageVersions"); - } - - @TestMetadata("compiler/testData/codegen/boxAgainstJava/annotations") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Annotations extends AbstractIrBlackBoxAgainstJavaCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - - public void testAllFilesPresentInAnnotations() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/annotations"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); - } - - @TestMetadata("divisionByZeroInJava.kt") - public void testDivisionByZeroInJava() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/annotations/divisionByZeroInJava.kt"); - } - - @TestMetadata("javaAnnotationArrayValueDefault.kt") - public void testJavaAnnotationArrayValueDefault() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/annotations/javaAnnotationArrayValueDefault.kt"); - } - - @TestMetadata("javaAnnotationArrayValueNoDefault.kt") - public void testJavaAnnotationArrayValueNoDefault() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/annotations/javaAnnotationArrayValueNoDefault.kt"); - } - - @TestMetadata("javaAnnotationCall.kt") - public void testJavaAnnotationCall() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/annotations/javaAnnotationCall.kt"); - } - - @TestMetadata("javaAnnotationDefault.kt") - public void testJavaAnnotationDefault() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/annotations/javaAnnotationDefault.kt"); - } - - @TestMetadata("javaNegativePropertyAsAnnotationParameter.kt") - public void testJavaNegativePropertyAsAnnotationParameter() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/annotations/javaNegativePropertyAsAnnotationParameter.kt"); - } - - @TestMetadata("javaPropertyAsAnnotationParameter.kt") - public void testJavaPropertyAsAnnotationParameter() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/annotations/javaPropertyAsAnnotationParameter.kt"); - } - - @TestMetadata("javaPropertyWithIntInitializer.kt") - public void testJavaPropertyWithIntInitializer() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/annotations/javaPropertyWithIntInitializer.kt"); - } - - @TestMetadata("retentionInJava.kt") - public void testRetentionInJava() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/annotations/retentionInJava.kt"); - } - - @TestMetadata("compiler/testData/codegen/boxAgainstJava/annotations/kClassMapping") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class KClassMapping extends AbstractIrBlackBoxAgainstJavaCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - - public void testAllFilesPresentInKClassMapping() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/annotations/kClassMapping"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); - } - - @TestMetadata("arrayClassParameter.kt") - public void testArrayClassParameter() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/annotations/kClassMapping/arrayClassParameter.kt"); - } - - @TestMetadata("arrayClassParameterOnJavaClass.kt") - public void testArrayClassParameterOnJavaClass() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/annotations/kClassMapping/arrayClassParameterOnJavaClass.kt"); - } - - @TestMetadata("classParameter.kt") - public void testClassParameter() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/annotations/kClassMapping/classParameter.kt"); - } - - @TestMetadata("classParameterOnJavaClass.kt") - public void testClassParameterOnJavaClass() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/annotations/kClassMapping/classParameterOnJavaClass.kt"); - } - - @TestMetadata("varargClassParameter.kt") - public void testVarargClassParameter() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/annotations/kClassMapping/varargClassParameter.kt"); - } - - @TestMetadata("varargClassParameterOnJavaClass.kt") - public void testVarargClassParameterOnJavaClass() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/annotations/kClassMapping/varargClassParameterOnJavaClass.kt"); - } - } - - @TestMetadata("compiler/testData/codegen/boxAgainstJava/annotations/typeAnnotations") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class TypeAnnotations extends AbstractIrBlackBoxAgainstJavaCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - - public void testAllFilesPresentInTypeAnnotations() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/annotations/typeAnnotations"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); - } - - @TestMetadata("implicitReturn.kt") - public void testImplicitReturn() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/annotations/typeAnnotations/implicitReturn.kt"); - } - } - } - - @TestMetadata("compiler/testData/codegen/boxAgainstJava/callableReference") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class CallableReference extends AbstractIrBlackBoxAgainstJavaCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - - public void testAllFilesPresentInCallableReference() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/callableReference"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); - } - - @TestMetadata("constructor.kt") - public void testConstructor() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/callableReference/constructor.kt"); - } - - @TestMetadata("kt16412.kt") - public void testKt16412() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/callableReference/kt16412.kt"); - } - - @TestMetadata("publicFinalField.kt") - public void testPublicFinalField() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/callableReference/publicFinalField.kt"); - } - - @TestMetadata("publicMutableField.kt") - public void testPublicMutableField() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/callableReference/publicMutableField.kt"); - } - - @TestMetadata("staticMethod.kt") - public void testStaticMethod() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/callableReference/staticMethod.kt"); - } - } - - @TestMetadata("compiler/testData/codegen/boxAgainstJava/constructor") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Constructor extends AbstractIrBlackBoxAgainstJavaCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - - public void testAllFilesPresentInConstructor() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/constructor"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); - } - - @TestMetadata("genericConstructor.kt") - public void testGenericConstructor() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/constructor/genericConstructor.kt"); - } - - @TestMetadata("secondaryConstructor.kt") - public void testSecondaryConstructor() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/constructor/secondaryConstructor.kt"); - } - } - - @TestMetadata("compiler/testData/codegen/boxAgainstJava/delegation") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Delegation extends AbstractIrBlackBoxAgainstJavaCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - - public void testAllFilesPresentInDelegation() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/delegation"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); - } - - @TestMetadata("delegationAndInheritanceFromJava.kt") - public void testDelegationAndInheritanceFromJava() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/delegation/delegationAndInheritanceFromJava.kt"); - } - } - - @TestMetadata("compiler/testData/codegen/boxAgainstJava/enum") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Enum extends AbstractIrBlackBoxAgainstJavaCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - - public void testAllFilesPresentInEnum() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/enum"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); - } - - @TestMetadata("nameConflict.kt") - public void testNameConflict() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/enum/nameConflict.kt"); - } - - @TestMetadata("simpleJavaEnum.kt") - public void testSimpleJavaEnum() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/enum/simpleJavaEnum.kt"); - } - - @TestMetadata("simpleJavaEnumWithFunction.kt") - public void testSimpleJavaEnumWithFunction() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/enum/simpleJavaEnumWithFunction.kt"); - } - - @TestMetadata("simpleJavaEnumWithStaticImport.kt") - public void testSimpleJavaEnumWithStaticImport() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/enum/simpleJavaEnumWithStaticImport.kt"); - } - - @TestMetadata("simpleJavaInnerEnum.kt") - public void testSimpleJavaInnerEnum() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/enum/simpleJavaInnerEnum.kt"); - } - - @TestMetadata("staticField.kt") - public void testStaticField() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/enum/staticField.kt"); - } - - @TestMetadata("staticMethod.kt") - public void testStaticMethod() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/enum/staticMethod.kt"); - } - } - - @TestMetadata("compiler/testData/codegen/boxAgainstJava/functions") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Functions extends AbstractIrBlackBoxAgainstJavaCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - - public void testAllFilesPresentInFunctions() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/functions"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); - } - - @TestMetadata("constructor.kt") - public void testConstructor() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/functions/constructor.kt"); - } - - @TestMetadata("max.kt") - public void testMax() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/functions/max.kt"); - } - - @TestMetadata("referencesStaticInnerClassMethod.kt") - public void testReferencesStaticInnerClassMethod() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/functions/referencesStaticInnerClassMethod.kt"); - } - - @TestMetadata("referencesStaticInnerClassMethodL2.kt") - public void testReferencesStaticInnerClassMethodL2() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/functions/referencesStaticInnerClassMethodL2.kt"); - } - - @TestMetadata("unrelatedUpperBounds.kt") - public void testUnrelatedUpperBounds() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/functions/unrelatedUpperBounds.kt"); - } - } - - @TestMetadata("compiler/testData/codegen/boxAgainstJava/ieee754") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Ieee754 extends AbstractIrBlackBoxAgainstJavaCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - - public void testAllFilesPresentInIeee754() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/ieee754"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); - } - - @TestMetadata("anyToReal.kt") - public void testAnyToReal() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/ieee754/anyToReal.kt"); - } - - @TestMetadata("comparableTypeCast.kt") - public void testComparableTypeCast() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/ieee754/comparableTypeCast.kt"); - } - - @TestMetadata("double.kt") - public void testDouble() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/ieee754/double.kt"); - } - - @TestMetadata("explicitCompareCall.kt") - public void testExplicitCompareCall() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/ieee754/explicitCompareCall.kt"); - } - - @TestMetadata("explicitEqualsCall.kt") - public void testExplicitEqualsCall() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/ieee754/explicitEqualsCall.kt"); - } - - @TestMetadata("float.kt") - public void testFloat() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/ieee754/float.kt"); - } - - @TestMetadata("generic.kt") - public void testGeneric() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/ieee754/generic.kt"); - } - - @TestMetadata("nullableAnyToReal.kt") - public void testNullableAnyToReal() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/ieee754/nullableAnyToReal.kt"); - } - } - - @TestMetadata("compiler/testData/codegen/boxAgainstJava/inline") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Inline extends AbstractIrBlackBoxAgainstJavaCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - - public void testAllFilesPresentInInline() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/inline"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); - } - - @TestMetadata("kt19910.kt") - public void testKt19910() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/inline/kt19910.kt"); - } - } - - @TestMetadata("compiler/testData/codegen/boxAgainstJava/innerClass") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class InnerClass extends AbstractIrBlackBoxAgainstJavaCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - - public void testAllFilesPresentInInnerClass() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/innerClass"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); - } - - @TestMetadata("kt3532.kt") - public void testKt3532() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/innerClass/kt3532.kt"); - } - - @TestMetadata("kt3812.kt") - public void testKt3812() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/innerClass/kt3812.kt"); - } - - @TestMetadata("kt4036.kt") - public void testKt4036() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/innerClass/kt4036.kt"); - } - } - - @TestMetadata("compiler/testData/codegen/boxAgainstJava/interfaces") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Interfaces extends AbstractIrBlackBoxAgainstJavaCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - - public void testAllFilesPresentInInterfaces() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/interfaces"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); - } - - @TestMetadata("defaultMethod.kt") - public void testDefaultMethod() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/interfaces/defaultMethod.kt"); - } - - @TestMetadata("inheritJavaInterface.kt") - public void testInheritJavaInterface() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/interfaces/inheritJavaInterface.kt"); - } - } - - @TestMetadata("compiler/testData/codegen/boxAgainstJava/multiplatform") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Multiplatform extends AbstractIrBlackBoxAgainstJavaCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - - public void testAllFilesPresentInMultiplatform() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/multiplatform"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); - } - - @TestMetadata("annotationsViaActualTypeAliasFromBinary.kt") - public void testAnnotationsViaActualTypeAliasFromBinary() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/multiplatform/annotationsViaActualTypeAliasFromBinary.kt"); - } - } - - @TestMetadata("compiler/testData/codegen/boxAgainstJava/notNullAssertions") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class NotNullAssertions extends AbstractIrBlackBoxAgainstJavaCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - - public void testAllFilesPresentInNotNullAssertions() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/notNullAssertions"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); - } - - @TestMetadata("callAssertions.kt") - public void testCallAssertions() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/notNullAssertions/callAssertions.kt"); - } - - @TestMetadata("delegation.kt") - public void testDelegation() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/notNullAssertions/delegation.kt"); - } - - @TestMetadata("doGenerateParamAssertions.kt") - public void testDoGenerateParamAssertions() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/notNullAssertions/doGenerateParamAssertions.kt"); - } - - @TestMetadata("noCallAssertions.kt") - public void testNoCallAssertions() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/notNullAssertions/noCallAssertions.kt"); - } - - @TestMetadata("rightElvisOperand.kt") - public void testRightElvisOperand() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/notNullAssertions/rightElvisOperand.kt"); - } - } - - @TestMetadata("compiler/testData/codegen/boxAgainstJava/platformTypes") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class PlatformTypes extends AbstractIrBlackBoxAgainstJavaCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - - public void testAllFilesPresentInPlatformTypes() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/platformTypes"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); - } - - @TestMetadata("genericUnit.kt") - public void testGenericUnit() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/platformTypes/genericUnit.kt"); - } - - @TestMetadata("kt14989.kt") - public void testKt14989() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/platformTypes/kt14989.kt"); - } - - @TestMetadata("specializedMapFull.kt") - public void testSpecializedMapFull() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/platformTypes/specializedMapFull.kt"); - } - - @TestMetadata("specializedMapPut.kt") - public void testSpecializedMapPut() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/platformTypes/specializedMapPut.kt"); - } - } - - @TestMetadata("compiler/testData/codegen/boxAgainstJava/property") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Property extends AbstractIrBlackBoxAgainstJavaCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - - public void testAllFilesPresentInProperty() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/property"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); - } - - @TestMetadata("fieldAccessFromExtensionInTraitImpl.kt") - public void testFieldAccessFromExtensionInTraitImpl() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/property/fieldAccessFromExtensionInTraitImpl.kt"); - } - - @TestMetadata("fieldAccessViaSubclass.kt") - public void testFieldAccessViaSubclass() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/property/fieldAccessViaSubclass.kt"); - } - - @TestMetadata("referenceToJavaFieldViaBridge.kt") - public void testReferenceToJavaFieldViaBridge() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/property/referenceToJavaFieldViaBridge.kt"); - } - } - - @TestMetadata("compiler/testData/codegen/boxAgainstJava/recursiveRawTypes") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class RecursiveRawTypes extends AbstractIrBlackBoxAgainstJavaCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - - public void testAllFilesPresentInRecursiveRawTypes() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/recursiveRawTypes"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); - } - - @TestMetadata("kt16528.kt") - public void testKt16528() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/recursiveRawTypes/kt16528.kt"); - } - - @TestMetadata("kt16639.kt") - public void testKt16639() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/recursiveRawTypes/kt16639.kt"); - } - } - - @TestMetadata("compiler/testData/codegen/boxAgainstJava/reflection") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Reflection extends AbstractIrBlackBoxAgainstJavaCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - - public void testAllFilesPresentInReflection() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/reflection"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); - } - - @TestMetadata("compiler/testData/codegen/boxAgainstJava/reflection/classLiterals") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class ClassLiterals extends AbstractIrBlackBoxAgainstJavaCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - - public void testAllFilesPresentInClassLiterals() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/reflection/classLiterals"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); - } - - @TestMetadata("javaClassLiteral.kt") - public void testJavaClassLiteral() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/reflection/classLiterals/javaClassLiteral.kt"); - } - } - - @TestMetadata("compiler/testData/codegen/boxAgainstJava/reflection/mapping") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Mapping extends AbstractIrBlackBoxAgainstJavaCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - - public void testAllFilesPresentInMapping() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/reflection/mapping"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); - } - - @TestMetadata("jClass2kClass.kt") - public void testJClass2kClass() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/reflection/mapping/jClass2kClass.kt"); - } - - @TestMetadata("javaConstructor.kt") - public void testJavaConstructor() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/reflection/mapping/javaConstructor.kt"); - } - - @TestMetadata("javaFields.kt") - public void testJavaFields() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/reflection/mapping/javaFields.kt"); - } - - @TestMetadata("javaMethods.kt") - public void testJavaMethods() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/reflection/mapping/javaMethods.kt"); - } - } - - @TestMetadata("compiler/testData/codegen/boxAgainstJava/reflection/properties") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Properties extends AbstractIrBlackBoxAgainstJavaCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - - public void testAllFilesPresentInProperties() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/reflection/properties"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); - } - - @TestMetadata("equalsHashCodeToString.kt") - public void testEqualsHashCodeToString() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/reflection/properties/equalsHashCodeToString.kt"); - } - } - } - - @TestMetadata("compiler/testData/codegen/boxAgainstJava/sam") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Sam extends AbstractIrBlackBoxAgainstJavaCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - - public void testAllFilesPresentInSam() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/sam"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); - } - - @TestMetadata("differentFqNames.kt") - public void testDifferentFqNames() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/differentFqNames.kt"); - } - - @TestMetadata("kt11519.kt") - public void testKt11519() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/kt11519.kt"); - } - - @TestMetadata("kt11519Constructor.kt") - public void testKt11519Constructor() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/kt11519Constructor.kt"); - } - - @TestMetadata("kt11696.kt") - public void testKt11696() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/kt11696.kt"); - } - - @TestMetadata("kt4753.kt") - public void testKt4753() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/kt4753.kt"); - } - - @TestMetadata("kt4753_2.kt") - public void testKt4753_2() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/kt4753_2.kt"); - } - - @TestMetadata("propertyReference.kt") - public void testPropertyReference() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/propertyReference.kt"); - } - - @TestMetadata("samConstructorGenericSignature.kt") - public void testSamConstructorGenericSignature() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/samConstructorGenericSignature.kt"); - } - - @TestMetadata("smartCastSamConversion.kt") - public void testSmartCastSamConversion() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/smartCastSamConversion.kt"); - } - - @TestMetadata("compiler/testData/codegen/boxAgainstJava/sam/adapters") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Adapters extends AbstractIrBlackBoxAgainstJavaCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - - public void testAllFilesPresentInAdapters() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/sam/adapters"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); - } - - @TestMetadata("bridgesForOverridden.kt") - public void testBridgesForOverridden() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/bridgesForOverridden.kt"); - } - - @TestMetadata("bridgesForOverriddenComplex.kt") - public void testBridgesForOverriddenComplex() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/bridgesForOverriddenComplex.kt"); - } - - @TestMetadata("callAbstractAdapter.kt") - public void testCallAbstractAdapter() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/callAbstractAdapter.kt"); - } - - @TestMetadata("comparator.kt") - public void testComparator() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/comparator.kt"); - } - - @TestMetadata("constructor.kt") - public void testConstructor() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/constructor.kt"); - } - - @TestMetadata("doubleLongParameters.kt") - public void testDoubleLongParameters() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/doubleLongParameters.kt"); - } - - @TestMetadata("fileFilter.kt") - public void testFileFilter() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/fileFilter.kt"); - } - - @TestMetadata("genericSignature.kt") - public void testGenericSignature() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/genericSignature.kt"); - } - - @TestMetadata("implementAdapter.kt") - public void testImplementAdapter() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/implementAdapter.kt"); - } - - @TestMetadata("inheritedInKotlin.kt") - public void testInheritedInKotlin() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/inheritedInKotlin.kt"); - } - - @TestMetadata("inheritedOverriddenAdapter.kt") - public void testInheritedOverriddenAdapter() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/inheritedOverriddenAdapter.kt"); - } - - @TestMetadata("inheritedSimple.kt") - public void testInheritedSimple() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/inheritedSimple.kt"); - } - - @TestMetadata("localClass.kt") - public void testLocalClass() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/localClass.kt"); - } - - @TestMetadata("localObjectConstructor.kt") - public void testLocalObjectConstructor() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/localObjectConstructor.kt"); - } - - @TestMetadata("localObjectConstructorWithFnValue.kt") - public void testLocalObjectConstructorWithFnValue() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/localObjectConstructorWithFnValue.kt"); - } - - @TestMetadata("nonLiteralAndLiteralRunnable.kt") - public void testNonLiteralAndLiteralRunnable() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/nonLiteralAndLiteralRunnable.kt"); - } - - @TestMetadata("nonLiteralComparator.kt") - public void testNonLiteralComparator() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/nonLiteralComparator.kt"); - } - - @TestMetadata("nonLiteralInConstructor.kt") - public void testNonLiteralInConstructor() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/nonLiteralInConstructor.kt"); - } - - @TestMetadata("nonLiteralNull.kt") - public void testNonLiteralNull() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/nonLiteralNull.kt"); - } - - @TestMetadata("nonLiteralRunnable.kt") - public void testNonLiteralRunnable() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/nonLiteralRunnable.kt"); - } - - @TestMetadata("protectedFromBase.kt") - public void testProtectedFromBase() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/protectedFromBase.kt"); - } - - @TestMetadata("severalSamParameters.kt") - public void testSeveralSamParameters() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/severalSamParameters.kt"); - } - - @TestMetadata("simplest.kt") - public void testSimplest() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/simplest.kt"); - } - - @TestMetadata("superInSecondaryConstructor.kt") - public void testSuperInSecondaryConstructor() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/superInSecondaryConstructor.kt"); - } - - @TestMetadata("superconstructor.kt") - public void testSuperconstructor() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/superconstructor.kt"); - } - - @TestMetadata("superconstructorWithClosure.kt") - public void testSuperconstructorWithClosure() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/superconstructorWithClosure.kt"); - } - - @TestMetadata("typeParameterOfClass.kt") - public void testTypeParameterOfClass() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/typeParameterOfClass.kt"); - } - - @TestMetadata("typeParameterOfMethod.kt") - public void testTypeParameterOfMethod() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/typeParameterOfMethod.kt"); - } - - @TestMetadata("typeParameterOfOuterClass.kt") - public void testTypeParameterOfOuterClass() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/typeParameterOfOuterClass.kt"); - } - - @TestMetadata("compiler/testData/codegen/boxAgainstJava/sam/adapters/operators") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Operators extends AbstractIrBlackBoxAgainstJavaCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - - public void testAllFilesPresentInOperators() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/sam/adapters/operators"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); - } - - @TestMetadata("augmentedAssignmentPure.kt") - public void testAugmentedAssignmentPure() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/operators/augmentedAssignmentPure.kt"); - } - - @TestMetadata("augmentedAssignmentViaSimpleBinary.kt") - public void testAugmentedAssignmentViaSimpleBinary() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/operators/augmentedAssignmentViaSimpleBinary.kt"); - } - - @TestMetadata("binary.kt") - public void testBinary() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/operators/binary.kt"); - } - - @TestMetadata("compareTo.kt") - public void testCompareTo() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/operators/compareTo.kt"); - } - - @TestMetadata("contains.kt") - public void testContains() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/operators/contains.kt"); - } - - @TestMetadata("get.kt") - public void testGet() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/operators/get.kt"); - } - - @TestMetadata("invoke.kt") - public void testInvoke() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/operators/invoke.kt"); - } - - @TestMetadata("legacyModOperator.kt") - public void testLegacyModOperator() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/operators/legacyModOperator.kt"); - } - - @TestMetadata("multiGetSet.kt") - public void testMultiGetSet() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/operators/multiGetSet.kt"); - } - - @TestMetadata("multiInvoke.kt") - public void testMultiInvoke() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/operators/multiInvoke.kt"); - } - - @TestMetadata("set.kt") - public void testSet() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/operators/set.kt"); - } - } - } - } - - @TestMetadata("compiler/testData/codegen/boxAgainstJava/specialBuiltins") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class SpecialBuiltins extends AbstractIrBlackBoxAgainstJavaCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - - public void testAllFilesPresentInSpecialBuiltins() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/specialBuiltins"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); - } - - @TestMetadata("charBuffer.kt") - public void testCharBuffer() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/specialBuiltins/charBuffer.kt"); - } - } - - @TestMetadata("compiler/testData/codegen/boxAgainstJava/staticFun") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class StaticFun extends AbstractIrBlackBoxAgainstJavaCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - - public void testAllFilesPresentInStaticFun() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/staticFun"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); - } - - @TestMetadata("classWithNestedEnum.kt") - public void testClassWithNestedEnum() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/staticFun/classWithNestedEnum.kt"); - } - } - - @TestMetadata("compiler/testData/codegen/boxAgainstJava/syntheticExtensions") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class SyntheticExtensions extends AbstractIrBlackBoxAgainstJavaCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - - public void testAllFilesPresentInSyntheticExtensions() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/syntheticExtensions"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); - } - - @TestMetadata("fromTwoBases.kt") - public void testFromTwoBases() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/syntheticExtensions/fromTwoBases.kt"); - } - - @TestMetadata("getter.kt") - public void testGetter() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/syntheticExtensions/getter.kt"); - } - - @TestMetadata("implicitReceiver.kt") - public void testImplicitReceiver() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/syntheticExtensions/implicitReceiver.kt"); - } - - @TestMetadata("overrideOnlyGetter.kt") - public void testOverrideOnlyGetter() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/syntheticExtensions/overrideOnlyGetter.kt"); - } - - @TestMetadata("plusPlus.kt") - public void testPlusPlus() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/syntheticExtensions/plusPlus.kt"); - } - - @TestMetadata("protected.kt") - public void testProtected() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/syntheticExtensions/protected.kt"); - } - - @TestMetadata("protectedSetter.kt") - public void testProtectedSetter() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/syntheticExtensions/protectedSetter.kt"); - } - - @TestMetadata("setter.kt") - public void testSetter() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/syntheticExtensions/setter.kt"); - } - - @TestMetadata("setterNonVoid1.kt") - public void testSetterNonVoid1() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/syntheticExtensions/setterNonVoid1.kt"); - } - - @TestMetadata("setterNonVoid2.kt") - public void testSetterNonVoid2() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/syntheticExtensions/setterNonVoid2.kt"); - } - } - - @TestMetadata("compiler/testData/codegen/boxAgainstJava/throws") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Throws extends AbstractIrBlackBoxAgainstJavaCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - - public void testAllFilesPresentInThrows() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/throws"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); - } - - @TestMetadata("delegationAndThrows.kt") - public void testDelegationAndThrows() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/throws/delegationAndThrows.kt"); - } - } - - @TestMetadata("compiler/testData/codegen/boxAgainstJava/typealias") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Typealias extends AbstractIrBlackBoxAgainstJavaCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - - public void testAllFilesPresentInTypealias() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/typealias"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); - } - - @TestMetadata("javaStaticMembersViaTypeAlias.kt") - public void testJavaStaticMembersViaTypeAlias() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/typealias/javaStaticMembersViaTypeAlias.kt"); - } - } - - @TestMetadata("compiler/testData/codegen/boxAgainstJava/varargs") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Varargs extends AbstractIrBlackBoxAgainstJavaCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - - public void testAllFilesPresentInVarargs() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/varargs"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); - } - - @TestMetadata("varargsOverride.kt") - public void testVarargsOverride() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/varargs/varargsOverride.kt"); - } - - @TestMetadata("varargsOverride2.kt") - public void testVarargsOverride2() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/varargs/varargsOverride2.kt"); - } - - @TestMetadata("varargsOverride3.kt") - public void testVarargsOverride3() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/varargs/varargsOverride3.kt"); - } - } - - @TestMetadata("compiler/testData/codegen/boxAgainstJava/visibility") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Visibility extends AbstractIrBlackBoxAgainstJavaCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - - public void testAllFilesPresentInVisibility() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/visibility"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); - } - - @TestMetadata("compiler/testData/codegen/boxAgainstJava/visibility/package") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Package extends AbstractIrBlackBoxAgainstJavaCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - - public void testAllFilesPresentInPackage() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/visibility/package"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); - } - - @TestMetadata("kt2781.kt") - public void testKt2781() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/visibility/package/kt2781.kt"); - } - - @TestMetadata("packageClass.kt") - public void testPackageClass() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/visibility/package/packageClass.kt"); - } - - @TestMetadata("packageFun.kt") - public void testPackageFun() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/visibility/package/packageFun.kt"); - } - - @TestMetadata("packageProperty.kt") - public void testPackageProperty() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/visibility/package/packageProperty.kt"); - } - } - - @TestMetadata("compiler/testData/codegen/boxAgainstJava/visibility/protectedAndPackage") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class ProtectedAndPackage extends AbstractIrBlackBoxAgainstJavaCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - - public void testAllFilesPresentInProtectedAndPackage() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/visibility/protectedAndPackage"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); - } - - @TestMetadata("overrideProtectedFunInPackage.kt") - public void testOverrideProtectedFunInPackage() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/visibility/protectedAndPackage/overrideProtectedFunInPackage.kt"); - } - - @TestMetadata("protectedAccessor.kt") - public void testProtectedAccessor() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/visibility/protectedAndPackage/protectedAccessor.kt"); - } - - @TestMetadata("protectedFunInPackage.kt") - public void testProtectedFunInPackage() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/visibility/protectedAndPackage/protectedFunInPackage.kt"); - } - - @TestMetadata("protectedPropertyInPackage.kt") - public void testProtectedPropertyInPackage() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/visibility/protectedAndPackage/protectedPropertyInPackage.kt"); - } - - @TestMetadata("protectedPropertyInPackageFromCrossinline.kt") - public void testProtectedPropertyInPackageFromCrossinline() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/visibility/protectedAndPackage/protectedPropertyInPackageFromCrossinline.kt"); - } - - @TestMetadata("protectedStaticClass.kt") - public void testProtectedStaticClass() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/visibility/protectedAndPackage/protectedStaticClass.kt"); - } - - @TestMetadata("protectedSuperField.kt") - public void testProtectedSuperField() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/visibility/protectedAndPackage/protectedSuperField.kt"); - } - - @TestMetadata("protectedSuperMethod.kt") - public void testProtectedSuperMethod() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/visibility/protectedAndPackage/protectedSuperMethod.kt"); - } - } - - @TestMetadata("compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class ProtectedStatic extends AbstractIrBlackBoxAgainstJavaCodegenTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - - public void testAllFilesPresentInProtectedStatic() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); - } - - @TestMetadata("funCallInConstructor.kt") - public void testFunCallInConstructor() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/funCallInConstructor.kt"); - } - - @TestMetadata("funClassObject.kt") - public void testFunClassObject() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/funClassObject.kt"); - } - - @TestMetadata("funGenericClass.kt") - public void testFunGenericClass() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/funGenericClass.kt"); - } - - @TestMetadata("funNestedStaticClass.kt") - public void testFunNestedStaticClass() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/funNestedStaticClass.kt"); - } - - @TestMetadata("funNestedStaticClass2.kt") - public void testFunNestedStaticClass2() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/funNestedStaticClass2.kt"); - } - - @TestMetadata("funNestedStaticGenericClass.kt") - public void testFunNestedStaticGenericClass() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/funNestedStaticGenericClass.kt"); - } - - @TestMetadata("funNotDirectSuperClass.kt") - public void testFunNotDirectSuperClass() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/funNotDirectSuperClass.kt"); - } - - @TestMetadata("funObject.kt") - public void testFunObject() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/funObject.kt"); - } - - @TestMetadata("simpleClass.kt") - public void testSimpleClass() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/simpleClass.kt"); - } - - @TestMetadata("simpleClass2.kt") - public void testSimpleClass2() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/simpleClass2.kt"); - } - - @TestMetadata("simpleFun.kt") - public void testSimpleFun() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/simpleFun.kt"); - } - - @TestMetadata("simpleProperty.kt") - public void testSimpleProperty() throws Exception { - runTest("compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/simpleProperty.kt"); - } - } - } -} diff --git a/compiler/tests-gen/org/jetbrains/kotlin/codegen/ir/IrBytecodeListingTestGenerated.java b/compiler/tests-gen/org/jetbrains/kotlin/codegen/ir/IrBytecodeListingTestGenerated.java index 096199f57f7..3538229668d 100644 --- a/compiler/tests-gen/org/jetbrains/kotlin/codegen/ir/IrBytecodeListingTestGenerated.java +++ b/compiler/tests-gen/org/jetbrains/kotlin/codegen/ir/IrBytecodeListingTestGenerated.java @@ -41,6 +41,11 @@ public class IrBytecodeListingTestGenerated extends AbstractIrBytecodeListingTes runTest("compiler/testData/codegen/bytecodeListing/accessorForTopLevelMembers.kt"); } + @TestMetadata("accessorsForProtectedStaticJavaFieldInOtherPackage.kt") + public void testAccessorsForProtectedStaticJavaFieldInOtherPackage() throws Exception { + runTest("compiler/testData/codegen/bytecodeListing/accessorsForProtectedStaticJavaFieldInOtherPackage.kt"); + } + public void testAllFilesPresentInBytecodeListing() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeListing"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } diff --git a/compiler/tests-gen/org/jetbrains/kotlin/codegen/ir/IrCompileKotlinAgainstKotlinTestGenerated.java b/compiler/tests-gen/org/jetbrains/kotlin/codegen/ir/IrCompileKotlinAgainstKotlinTestGenerated.java deleted file mode 100644 index 5d113d872e1..00000000000 --- a/compiler/tests-gen/org/jetbrains/kotlin/codegen/ir/IrCompileKotlinAgainstKotlinTestGenerated.java +++ /dev/null @@ -1,794 +0,0 @@ -/* - * Copyright 2010-2021 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. - */ - -package org.jetbrains.kotlin.codegen.ir; - -import com.intellij.testFramework.TestDataPath; -import org.jetbrains.kotlin.test.JUnit3RunnerWithInners; -import org.jetbrains.kotlin.test.KotlinTestUtils; -import org.jetbrains.kotlin.test.util.KtTestUtil; -import org.jetbrains.kotlin.test.TargetBackend; -import org.jetbrains.kotlin.test.TestMetadata; -import org.junit.runner.RunWith; - -import java.io.File; -import java.util.regex.Pattern; - -/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */ -@SuppressWarnings("all") -@TestMetadata("compiler/testData/compileKotlinAgainstKotlin") -@TestDataPath("$PROJECT_ROOT") -@RunWith(JUnit3RunnerWithInners.class) -public class IrCompileKotlinAgainstKotlinTestGenerated extends AbstractIrCompileKotlinAgainstKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - - public void testAllFilesPresentInCompileKotlinAgainstKotlin() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/compileKotlinAgainstKotlin"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); - } - - @TestMetadata("annotationInInterface.kt") - public void testAnnotationInInterface() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/annotationInInterface.kt"); - } - - @TestMetadata("annotationOnTypeUseInTypeAlias.kt") - public void testAnnotationOnTypeUseInTypeAlias() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/annotationOnTypeUseInTypeAlias.kt"); - } - - @TestMetadata("annotationsOnTypeAliases.kt") - public void testAnnotationsOnTypeAliases() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/annotationsOnTypeAliases.kt"); - } - - @TestMetadata("callDeserializedPropertyOnInlineClassType.kt") - public void testCallDeserializedPropertyOnInlineClassType() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/callDeserializedPropertyOnInlineClassType.kt"); - } - - @TestMetadata("callDeserializedPropertyOnInlineClassTypeOldMangling.kt") - public void testCallDeserializedPropertyOnInlineClassTypeOldMangling() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/callDeserializedPropertyOnInlineClassTypeOldMangling.kt"); - } - - @TestMetadata("callsToMultifileClassFromOtherPackage.kt") - public void testCallsToMultifileClassFromOtherPackage() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/callsToMultifileClassFromOtherPackage.kt"); - } - - @TestMetadata("clashingFakeOverrideSignatures.kt") - public void testClashingFakeOverrideSignatures() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/clashingFakeOverrideSignatures.kt"); - } - - @TestMetadata("classInObject.kt") - public void testClassInObject() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/classInObject.kt"); - } - - @TestMetadata("companionObjectInEnum.kt") - public void testCompanionObjectInEnum() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/companionObjectInEnum.kt"); - } - - @TestMetadata("companionObjectMember.kt") - public void testCompanionObjectMember() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/companionObjectMember.kt"); - } - - @TestMetadata("constPropertyReferenceFromMultifileClass.kt") - public void testConstPropertyReferenceFromMultifileClass() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/constPropertyReferenceFromMultifileClass.kt"); - } - - @TestMetadata("constructorVararg.kt") - public void testConstructorVararg() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/constructorVararg.kt"); - } - - @TestMetadata("constructorWithInlineClassParametersInBinaryDependencies.kt") - public void testConstructorWithInlineClassParametersInBinaryDependencies() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/constructorWithInlineClassParametersInBinaryDependencies.kt"); - } - - @TestMetadata("constructorWithInlineClassParametersInBinaryDependenciesOldMangling.kt") - public void testConstructorWithInlineClassParametersInBinaryDependenciesOldMangling() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/constructorWithInlineClassParametersInBinaryDependenciesOldMangling.kt"); - } - - @TestMetadata("copySamOnInline.kt") - public void testCopySamOnInline() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/copySamOnInline.kt"); - } - - @TestMetadata("copySamOnInline2.kt") - public void testCopySamOnInline2() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/copySamOnInline2.kt"); - } - - @TestMetadata("coroutinesBinary.kt") - public void testCoroutinesBinary() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/coroutinesBinary.kt"); - } - - @TestMetadata("defaultConstructor.kt") - public void testDefaultConstructor() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/defaultConstructor.kt"); - } - - @TestMetadata("defaultLambdaRegeneration.kt") - public void testDefaultLambdaRegeneration() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/defaultLambdaRegeneration.kt"); - } - - @TestMetadata("defaultLambdaRegeneration2.kt") - public void testDefaultLambdaRegeneration2() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/defaultLambdaRegeneration2.kt"); - } - - @TestMetadata("defaultWithInlineClassAndReceivers.kt") - public void testDefaultWithInlineClassAndReceivers() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/defaultWithInlineClassAndReceivers.kt"); - } - - @TestMetadata("defaultWithInlineClassAndReceiversOldMangling.kt") - public void testDefaultWithInlineClassAndReceiversOldMangling() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/defaultWithInlineClassAndReceiversOldMangling.kt"); - } - - @TestMetadata("delegatedDefault.kt") - public void testDelegatedDefault() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/delegatedDefault.kt"); - } - - @TestMetadata("delegationAndAnnotations.kt") - public void testDelegationAndAnnotations() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/delegationAndAnnotations.kt"); - } - - @TestMetadata("doublyNestedClass.kt") - public void testDoublyNestedClass() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/doublyNestedClass.kt"); - } - - @TestMetadata("enum.kt") - public void testEnum() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/enum.kt"); - } - - @TestMetadata("expectClassActualTypeAlias.kt") - public void testExpectClassActualTypeAlias() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/expectClassActualTypeAlias.kt"); - } - - @TestMetadata("fakeOverridesForIntersectionTypes.kt") - public void testFakeOverridesForIntersectionTypes() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/fakeOverridesForIntersectionTypes.kt"); - } - - @TestMetadata("importCompanion.kt") - public void testImportCompanion() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/importCompanion.kt"); - } - - @TestMetadata("inlineClassFakeOverrideMangling.kt") - public void testInlineClassFakeOverrideMangling() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/inlineClassFakeOverrideMangling.kt"); - } - - @TestMetadata("inlineClassFakeOverrideManglingOldMangling.kt") - public void testInlineClassFakeOverrideManglingOldMangling() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/inlineClassFakeOverrideManglingOldMangling.kt"); - } - - @TestMetadata("inlineClassFromBinaryDependencies.kt") - public void testInlineClassFromBinaryDependencies() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/inlineClassFromBinaryDependencies.kt"); - } - - @TestMetadata("inlineClassFromBinaryDependenciesOldMangling.kt") - public void testInlineClassFromBinaryDependenciesOldMangling() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/inlineClassFromBinaryDependenciesOldMangling.kt"); - } - - @TestMetadata("inlineClassInlineFunctionCall.kt") - public void testInlineClassInlineFunctionCall() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/inlineClassInlineFunctionCall.kt"); - } - - @TestMetadata("inlineClassInlineFunctionCallOldMangling.kt") - public void testInlineClassInlineFunctionCallOldMangling() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/inlineClassInlineFunctionCallOldMangling.kt"); - } - - @TestMetadata("inlineClassInlineProperty.kt") - public void testInlineClassInlineProperty() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/inlineClassInlineProperty.kt"); - } - - @TestMetadata("inlineClassInlinePropertyOldMangling.kt") - public void testInlineClassInlinePropertyOldMangling() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/inlineClassInlinePropertyOldMangling.kt"); - } - - @TestMetadata("inlineClassesOldMangling.kt") - public void testInlineClassesOldMangling() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/inlineClassesOldMangling.kt"); - } - - @TestMetadata("inlinedConstants.kt") - public void testInlinedConstants() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/inlinedConstants.kt"); - } - - @TestMetadata("innerClassConstructor.kt") - public void testInnerClassConstructor() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/innerClassConstructor.kt"); - } - - @TestMetadata("interfaceDelegationAndBridgesProcessing.kt") - public void testInterfaceDelegationAndBridgesProcessing() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/interfaceDelegationAndBridgesProcessing.kt"); - } - - @TestMetadata("internalSetterOverridden.kt") - public void testInternalSetterOverridden() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/internalSetterOverridden.kt"); - } - - @TestMetadata("internalWithDefaultArgs.kt") - public void testInternalWithDefaultArgs() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/internalWithDefaultArgs.kt"); - } - - @TestMetadata("internalWithInlineClass.kt") - public void testInternalWithInlineClass() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/internalWithInlineClass.kt"); - } - - @TestMetadata("internalWithOtherModuleName.kt") - public void testInternalWithOtherModuleName() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/internalWithOtherModuleName.kt"); - } - - @TestMetadata("intersectionOverrideProperies.kt") - public void testIntersectionOverrideProperies() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/intersectionOverrideProperies.kt"); - } - - @TestMetadata("jvmField.kt") - public void testJvmField() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvmField.kt"); - } - - @TestMetadata("jvmFieldInAnnotationCompanion.kt") - public void testJvmFieldInAnnotationCompanion() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvmFieldInAnnotationCompanion.kt"); - } - - @TestMetadata("jvmFieldInConstructor.kt") - public void testJvmFieldInConstructor() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvmFieldInConstructor.kt"); - } - - @TestMetadata("jvmFieldInInterfaceCompanion.kt") - public void testJvmFieldInInterfaceCompanion() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvmFieldInInterfaceCompanion.kt"); - } - - @TestMetadata("jvmNames.kt") - public void testJvmNames() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvmNames.kt"); - } - - @TestMetadata("jvmPackageName.kt") - public void testJvmPackageName() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvmPackageName.kt"); - } - - @TestMetadata("jvmPackageNameInRootPackage.kt") - public void testJvmPackageNameInRootPackage() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvmPackageNameInRootPackage.kt"); - } - - @TestMetadata("jvmPackageNameMultifileClass.kt") - public void testJvmPackageNameMultifileClass() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvmPackageNameMultifileClass.kt"); - } - - @TestMetadata("jvmPackageNameWithJvmName.kt") - public void testJvmPackageNameWithJvmName() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvmPackageNameWithJvmName.kt"); - } - - @TestMetadata("jvmStaticInObject.kt") - public void testJvmStaticInObject() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvmStaticInObject.kt"); - } - - @TestMetadata("jvmStaticInObjectPropertyReference.kt") - public void testJvmStaticInObjectPropertyReference() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvmStaticInObjectPropertyReference.kt"); - } - - @TestMetadata("kotlinPropertyAsAnnotationParameter.kt") - public void testKotlinPropertyAsAnnotationParameter() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/kotlinPropertyAsAnnotationParameter.kt"); - } - - @TestMetadata("kt14012.kt") - public void testKt14012() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/kt14012.kt"); - } - - @TestMetadata("kt14012_multi.kt") - public void testKt14012_multi() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/kt14012_multi.kt"); - } - - @TestMetadata("kt21775.kt") - public void testKt21775() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/kt21775.kt"); - } - - @TestMetadata("metadataForMembersInLocalClassInInitializer.kt") - public void testMetadataForMembersInLocalClassInInitializer() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/metadataForMembersInLocalClassInInitializer.kt"); - } - - @TestMetadata("multifileClassInlineFunctionAccessingProperty.kt") - public void testMultifileClassInlineFunctionAccessingProperty() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/multifileClassInlineFunctionAccessingProperty.kt"); - } - - @TestMetadata("multifileClassWithTypealias.kt") - public void testMultifileClassWithTypealias() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/multifileClassWithTypealias.kt"); - } - - @TestMetadata("nestedClass.kt") - public void testNestedClass() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/nestedClass.kt"); - } - - @TestMetadata("nestedClassInAnnotationArgument.kt") - public void testNestedClassInAnnotationArgument() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/nestedClassInAnnotationArgument.kt"); - } - - @TestMetadata("nestedEnum.kt") - public void testNestedEnum() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/nestedEnum.kt"); - } - - @TestMetadata("nestedFunctionTypeAliasExpansion.kt") - public void testNestedFunctionTypeAliasExpansion() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/nestedFunctionTypeAliasExpansion.kt"); - } - - @TestMetadata("nestedObject.kt") - public void testNestedObject() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/nestedObject.kt"); - } - - @TestMetadata("nestedTypeAliasExpansion.kt") - public void testNestedTypeAliasExpansion() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/nestedTypeAliasExpansion.kt"); - } - - @TestMetadata("noExplicitOverrideForDelegatedFromSupertype.kt") - public void testNoExplicitOverrideForDelegatedFromSupertype() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/noExplicitOverrideForDelegatedFromSupertype.kt"); - } - - @TestMetadata("optionalAnnotation.kt") - public void testOptionalAnnotation() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/optionalAnnotation.kt"); - } - - @TestMetadata("platformTypes.kt") - public void testPlatformTypes() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/platformTypes.kt"); - } - - @TestMetadata("privateCompanionObjectValInDifferentModule.kt") - public void testPrivateCompanionObjectValInDifferentModule() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/privateCompanionObjectValInDifferentModule.kt"); - } - - @TestMetadata("privateCompanionObjectValInDifferentModuleOldMangling.kt") - public void testPrivateCompanionObjectValInDifferentModuleOldMangling() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/privateCompanionObjectValInDifferentModuleOldMangling.kt"); - } - - @TestMetadata("privateTopLevelValInDifferentModule.kt") - public void testPrivateTopLevelValInDifferentModule() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/privateTopLevelValInDifferentModule.kt"); - } - - @TestMetadata("privateTopLevelValInDifferentModuleOldMangling.kt") - public void testPrivateTopLevelValInDifferentModuleOldMangling() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/privateTopLevelValInDifferentModuleOldMangling.kt"); - } - - @TestMetadata("propertyReference.kt") - public void testPropertyReference() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/propertyReference.kt"); - } - - @TestMetadata("recursiveGeneric.kt") - public void testRecursiveGeneric() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/recursiveGeneric.kt"); - } - - @TestMetadata("reflectTopLevelFunctionOtherFile.kt") - public void testReflectTopLevelFunctionOtherFile() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/reflectTopLevelFunctionOtherFile.kt"); - } - - @TestMetadata("sealedClass.kt") - public void testSealedClass() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/sealedClass.kt"); - } - - @TestMetadata("secondaryConstructors.kt") - public void testSecondaryConstructors() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/secondaryConstructors.kt"); - } - - @TestMetadata("simple.kt") - public void testSimple() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/simple.kt"); - } - - @TestMetadata("simpleValAnonymousObject.kt") - public void testSimpleValAnonymousObject() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/simpleValAnonymousObject.kt"); - } - - @TestMetadata("specialBridgesInDependencies.kt") - public void testSpecialBridgesInDependencies() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/specialBridgesInDependencies.kt"); - } - - @TestMetadata("starImportEnum.kt") - public void testStarImportEnum() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/starImportEnum.kt"); - } - - @TestMetadata("suspendFunWithDefaultMangling.kt") - public void testSuspendFunWithDefaultMangling() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/suspendFunWithDefaultMangling.kt"); - } - - @TestMetadata("suspendFunWithDefaultOldMangling.kt") - public void testSuspendFunWithDefaultOldMangling() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/suspendFunWithDefaultOldMangling.kt"); - } - - @TestMetadata("targetedJvmName.kt") - public void testTargetedJvmName() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/targetedJvmName.kt"); - } - - @TestMetadata("typeAliasesKt13181.kt") - public void testTypeAliasesKt13181() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/typeAliasesKt13181.kt"); - } - - @TestMetadata("unsignedTypesInAnnotations.kt") - public void testUnsignedTypesInAnnotations() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/unsignedTypesInAnnotations.kt"); - } - - @TestMetadata("useDeserializedFunInterface.kt") - public void testUseDeserializedFunInterface() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/useDeserializedFunInterface.kt"); - } - - @TestMetadata("compiler/testData/compileKotlinAgainstKotlin/fir") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Fir extends AbstractIrCompileKotlinAgainstKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - - public void testAllFilesPresentInFir() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/compileKotlinAgainstKotlin/fir"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); - } - - @TestMetadata("AnonymousObjectInProperty.kt") - public void testAnonymousObjectInProperty() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/fir/AnonymousObjectInProperty.kt"); - } - - @TestMetadata("ExistingSymbolInFakeOverride.kt") - public void testExistingSymbolInFakeOverride() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/fir/ExistingSymbolInFakeOverride.kt"); - } - - @TestMetadata("IncrementalCompilerRunner.kt") - public void testIncrementalCompilerRunner() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/fir/IncrementalCompilerRunner.kt"); - } - - @TestMetadata("IrConstAcceptMultiModule.kt") - public void testIrConstAcceptMultiModule() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/fir/IrConstAcceptMultiModule.kt"); - } - - @TestMetadata("LibraryProperty.kt") - public void testLibraryProperty() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/fir/LibraryProperty.kt"); - } - } - - @TestMetadata("compiler/testData/compileKotlinAgainstKotlin/jvm8") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Jvm8 extends AbstractIrCompileKotlinAgainstKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - - public void testAllFilesPresentInJvm8() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/compileKotlinAgainstKotlin/jvm8"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); - } - - @TestMetadata("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Defaults extends AbstractIrCompileKotlinAgainstKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - - public void testAllFilesPresentInDefaults() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); - } - - @TestMetadata("superCall.kt") - public void testSuperCall() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/superCall.kt"); - } - - @TestMetadata("superCallFromInterface.kt") - public void testSuperCallFromInterface() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/superCallFromInterface.kt"); - } - - @TestMetadata("superCallFromInterface2.kt") - public void testSuperCallFromInterface2() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/superCallFromInterface2.kt"); - } - - @TestMetadata("superPropAccess.kt") - public void testSuperPropAccess() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/superPropAccess.kt"); - } - - @TestMetadata("superPropAccessFromInterface.kt") - public void testSuperPropAccessFromInterface() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/superPropAccessFromInterface.kt"); - } - - @TestMetadata("superPropAccessFromInterface2.kt") - public void testSuperPropAccessFromInterface2() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/superPropAccessFromInterface2.kt"); - } - - @TestMetadata("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class AllCompatibility extends AbstractIrCompileKotlinAgainstKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - - public void testAllFilesPresentInAllCompatibility() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); - } - - @TestMetadata("callStackTrace.kt") - public void testCallStackTrace() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/callStackTrace.kt"); - } - - @TestMetadata("superCall.kt") - public void testSuperCall() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superCall.kt"); - } - - @TestMetadata("superCallFromInterface.kt") - public void testSuperCallFromInterface() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superCallFromInterface.kt"); - } - - @TestMetadata("superCallFromInterface2.kt") - public void testSuperCallFromInterface2() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superCallFromInterface2.kt"); - } - - @TestMetadata("superPropAccess.kt") - public void testSuperPropAccess() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superPropAccess.kt"); - } - - @TestMetadata("superPropAccessFromInterface.kt") - public void testSuperPropAccessFromInterface() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superPropAccessFromInterface.kt"); - } - - @TestMetadata("superPropAccessFromInterface2.kt") - public void testSuperPropAccessFromInterface2() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superPropAccessFromInterface2.kt"); - } - - @TestMetadata("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/delegationBy") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class DelegationBy extends AbstractIrCompileKotlinAgainstKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - - public void testAllFilesPresentInDelegationBy() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/delegationBy"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); - } - - @TestMetadata("simple.kt") - public void testSimple() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/delegationBy/simple.kt"); - } - - @TestMetadata("simpleProperty.kt") - public void testSimpleProperty() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/delegationBy/simpleProperty.kt"); - } - } - } - - @TestMetadata("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Interop extends AbstractIrCompileKotlinAgainstKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - - public void testAllFilesPresentInInterop() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); - } - - @TestMetadata("likeMemberClash.kt") - public void testLikeMemberClash() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop/likeMemberClash.kt"); - } - - @TestMetadata("likeSpecialization.kt") - public void testLikeSpecialization() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop/likeSpecialization.kt"); - } - - @TestMetadata("newAndOldSchemes.kt") - public void testNewAndOldSchemes() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop/newAndOldSchemes.kt"); - } - - @TestMetadata("newAndOldSchemes2.kt") - public void testNewAndOldSchemes2() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop/newAndOldSchemes2.kt"); - } - - @TestMetadata("newAndOldSchemes2Compatibility.kt") - public void testNewAndOldSchemes2Compatibility() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop/newAndOldSchemes2Compatibility.kt"); - } - - @TestMetadata("newAndOldSchemes3.kt") - public void testNewAndOldSchemes3() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop/newAndOldSchemes3.kt"); - } - - @TestMetadata("newSchemeWithJvmDefault.kt") - public void testNewSchemeWithJvmDefault() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop/newSchemeWithJvmDefault.kt"); - } - } - } - - @TestMetadata("compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Jvm8against6 extends AbstractIrCompileKotlinAgainstKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - - public void testAllFilesPresentInJvm8against6() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); - } - - @TestMetadata("jdk8Against6.kt") - public void testJdk8Against6() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/jdk8Against6.kt"); - } - - @TestMetadata("simpleCall.kt") - public void testSimpleCall() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/simpleCall.kt"); - } - - @TestMetadata("simpleCallWithBigHierarchy.kt") - public void testSimpleCallWithBigHierarchy() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/simpleCallWithBigHierarchy.kt"); - } - - @TestMetadata("simpleCallWithHierarchy.kt") - public void testSimpleCallWithHierarchy() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/simpleCallWithHierarchy.kt"); - } - - @TestMetadata("simpleProp.kt") - public void testSimpleProp() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/simpleProp.kt"); - } - - @TestMetadata("simplePropWithHierarchy.kt") - public void testSimplePropWithHierarchy() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/simplePropWithHierarchy.kt"); - } - - @TestMetadata("compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/delegation") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Delegation extends AbstractIrCompileKotlinAgainstKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - - public void testAllFilesPresentInDelegation() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/delegation"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); - } - - @TestMetadata("diamond.kt") - public void testDiamond() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/delegation/diamond.kt"); - } - - @TestMetadata("diamond2.kt") - public void testDiamond2() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/delegation/diamond2.kt"); - } - - @TestMetadata("diamond3.kt") - public void testDiamond3() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/delegation/diamond3.kt"); - } - } - } - } - - @TestMetadata("compiler/testData/compileKotlinAgainstKotlin/typeAnnotations") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class TypeAnnotations extends AbstractIrCompileKotlinAgainstKotlinTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); - } - - public void testAllFilesPresentInTypeAnnotations() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/compileKotlinAgainstKotlin/typeAnnotations"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); - } - - @TestMetadata("implicitReturn.kt") - public void testImplicitReturn() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/typeAnnotations/implicitReturn.kt"); - } - } -} diff --git a/compiler/tests-gen/org/jetbrains/kotlin/codegen/ir/JvmIrAgainstOldBoxTestGenerated.java b/compiler/tests-gen/org/jetbrains/kotlin/codegen/ir/JvmIrAgainstOldBoxTestGenerated.java deleted file mode 100644 index 7a938973a5b..00000000000 --- a/compiler/tests-gen/org/jetbrains/kotlin/codegen/ir/JvmIrAgainstOldBoxTestGenerated.java +++ /dev/null @@ -1,794 +0,0 @@ -/* - * Copyright 2010-2021 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. - */ - -package org.jetbrains.kotlin.codegen.ir; - -import com.intellij.testFramework.TestDataPath; -import org.jetbrains.kotlin.test.JUnit3RunnerWithInners; -import org.jetbrains.kotlin.test.KotlinTestUtils; -import org.jetbrains.kotlin.test.util.KtTestUtil; -import org.jetbrains.kotlin.test.TargetBackend; -import org.jetbrains.kotlin.test.TestMetadata; -import org.junit.runner.RunWith; - -import java.io.File; -import java.util.regex.Pattern; - -/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */ -@SuppressWarnings("all") -@TestMetadata("compiler/testData/compileKotlinAgainstKotlin") -@TestDataPath("$PROJECT_ROOT") -@RunWith(JUnit3RunnerWithInners.class) -public class JvmIrAgainstOldBoxTestGenerated extends AbstractJvmIrAgainstOldBoxTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath); - } - - public void testAllFilesPresentInCompileKotlinAgainstKotlin() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/compileKotlinAgainstKotlin"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true); - } - - @TestMetadata("annotationInInterface.kt") - public void testAnnotationInInterface() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/annotationInInterface.kt"); - } - - @TestMetadata("annotationOnTypeUseInTypeAlias.kt") - public void testAnnotationOnTypeUseInTypeAlias() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/annotationOnTypeUseInTypeAlias.kt"); - } - - @TestMetadata("annotationsOnTypeAliases.kt") - public void testAnnotationsOnTypeAliases() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/annotationsOnTypeAliases.kt"); - } - - @TestMetadata("callDeserializedPropertyOnInlineClassType.kt") - public void testCallDeserializedPropertyOnInlineClassType() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/callDeserializedPropertyOnInlineClassType.kt"); - } - - @TestMetadata("callDeserializedPropertyOnInlineClassTypeOldMangling.kt") - public void testCallDeserializedPropertyOnInlineClassTypeOldMangling() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/callDeserializedPropertyOnInlineClassTypeOldMangling.kt"); - } - - @TestMetadata("callsToMultifileClassFromOtherPackage.kt") - public void testCallsToMultifileClassFromOtherPackage() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/callsToMultifileClassFromOtherPackage.kt"); - } - - @TestMetadata("clashingFakeOverrideSignatures.kt") - public void testClashingFakeOverrideSignatures() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/clashingFakeOverrideSignatures.kt"); - } - - @TestMetadata("classInObject.kt") - public void testClassInObject() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/classInObject.kt"); - } - - @TestMetadata("companionObjectInEnum.kt") - public void testCompanionObjectInEnum() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/companionObjectInEnum.kt"); - } - - @TestMetadata("companionObjectMember.kt") - public void testCompanionObjectMember() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/companionObjectMember.kt"); - } - - @TestMetadata("constPropertyReferenceFromMultifileClass.kt") - public void testConstPropertyReferenceFromMultifileClass() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/constPropertyReferenceFromMultifileClass.kt"); - } - - @TestMetadata("constructorVararg.kt") - public void testConstructorVararg() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/constructorVararg.kt"); - } - - @TestMetadata("constructorWithInlineClassParametersInBinaryDependencies.kt") - public void testConstructorWithInlineClassParametersInBinaryDependencies() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/constructorWithInlineClassParametersInBinaryDependencies.kt"); - } - - @TestMetadata("constructorWithInlineClassParametersInBinaryDependenciesOldMangling.kt") - public void testConstructorWithInlineClassParametersInBinaryDependenciesOldMangling() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/constructorWithInlineClassParametersInBinaryDependenciesOldMangling.kt"); - } - - @TestMetadata("copySamOnInline.kt") - public void testCopySamOnInline() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/copySamOnInline.kt"); - } - - @TestMetadata("copySamOnInline2.kt") - public void testCopySamOnInline2() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/copySamOnInline2.kt"); - } - - @TestMetadata("coroutinesBinary.kt") - public void testCoroutinesBinary() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/coroutinesBinary.kt"); - } - - @TestMetadata("defaultConstructor.kt") - public void testDefaultConstructor() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/defaultConstructor.kt"); - } - - @TestMetadata("defaultLambdaRegeneration.kt") - public void testDefaultLambdaRegeneration() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/defaultLambdaRegeneration.kt"); - } - - @TestMetadata("defaultLambdaRegeneration2.kt") - public void testDefaultLambdaRegeneration2() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/defaultLambdaRegeneration2.kt"); - } - - @TestMetadata("defaultWithInlineClassAndReceivers.kt") - public void testDefaultWithInlineClassAndReceivers() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/defaultWithInlineClassAndReceivers.kt"); - } - - @TestMetadata("defaultWithInlineClassAndReceiversOldMangling.kt") - public void testDefaultWithInlineClassAndReceiversOldMangling() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/defaultWithInlineClassAndReceiversOldMangling.kt"); - } - - @TestMetadata("delegatedDefault.kt") - public void testDelegatedDefault() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/delegatedDefault.kt"); - } - - @TestMetadata("delegationAndAnnotations.kt") - public void testDelegationAndAnnotations() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/delegationAndAnnotations.kt"); - } - - @TestMetadata("doublyNestedClass.kt") - public void testDoublyNestedClass() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/doublyNestedClass.kt"); - } - - @TestMetadata("enum.kt") - public void testEnum() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/enum.kt"); - } - - @TestMetadata("expectClassActualTypeAlias.kt") - public void testExpectClassActualTypeAlias() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/expectClassActualTypeAlias.kt"); - } - - @TestMetadata("fakeOverridesForIntersectionTypes.kt") - public void testFakeOverridesForIntersectionTypes() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/fakeOverridesForIntersectionTypes.kt"); - } - - @TestMetadata("importCompanion.kt") - public void testImportCompanion() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/importCompanion.kt"); - } - - @TestMetadata("inlineClassFakeOverrideMangling.kt") - public void testInlineClassFakeOverrideMangling() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/inlineClassFakeOverrideMangling.kt"); - } - - @TestMetadata("inlineClassFakeOverrideManglingOldMangling.kt") - public void testInlineClassFakeOverrideManglingOldMangling() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/inlineClassFakeOverrideManglingOldMangling.kt"); - } - - @TestMetadata("inlineClassFromBinaryDependencies.kt") - public void testInlineClassFromBinaryDependencies() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/inlineClassFromBinaryDependencies.kt"); - } - - @TestMetadata("inlineClassFromBinaryDependenciesOldMangling.kt") - public void testInlineClassFromBinaryDependenciesOldMangling() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/inlineClassFromBinaryDependenciesOldMangling.kt"); - } - - @TestMetadata("inlineClassInlineFunctionCall.kt") - public void testInlineClassInlineFunctionCall() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/inlineClassInlineFunctionCall.kt"); - } - - @TestMetadata("inlineClassInlineFunctionCallOldMangling.kt") - public void testInlineClassInlineFunctionCallOldMangling() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/inlineClassInlineFunctionCallOldMangling.kt"); - } - - @TestMetadata("inlineClassInlineProperty.kt") - public void testInlineClassInlineProperty() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/inlineClassInlineProperty.kt"); - } - - @TestMetadata("inlineClassInlinePropertyOldMangling.kt") - public void testInlineClassInlinePropertyOldMangling() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/inlineClassInlinePropertyOldMangling.kt"); - } - - @TestMetadata("inlineClassesOldMangling.kt") - public void testInlineClassesOldMangling() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/inlineClassesOldMangling.kt"); - } - - @TestMetadata("inlinedConstants.kt") - public void testInlinedConstants() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/inlinedConstants.kt"); - } - - @TestMetadata("innerClassConstructor.kt") - public void testInnerClassConstructor() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/innerClassConstructor.kt"); - } - - @TestMetadata("interfaceDelegationAndBridgesProcessing.kt") - public void testInterfaceDelegationAndBridgesProcessing() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/interfaceDelegationAndBridgesProcessing.kt"); - } - - @TestMetadata("internalSetterOverridden.kt") - public void testInternalSetterOverridden() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/internalSetterOverridden.kt"); - } - - @TestMetadata("internalWithDefaultArgs.kt") - public void testInternalWithDefaultArgs() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/internalWithDefaultArgs.kt"); - } - - @TestMetadata("internalWithInlineClass.kt") - public void testInternalWithInlineClass() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/internalWithInlineClass.kt"); - } - - @TestMetadata("internalWithOtherModuleName.kt") - public void testInternalWithOtherModuleName() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/internalWithOtherModuleName.kt"); - } - - @TestMetadata("intersectionOverrideProperies.kt") - public void testIntersectionOverrideProperies() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/intersectionOverrideProperies.kt"); - } - - @TestMetadata("jvmField.kt") - public void testJvmField() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvmField.kt"); - } - - @TestMetadata("jvmFieldInAnnotationCompanion.kt") - public void testJvmFieldInAnnotationCompanion() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvmFieldInAnnotationCompanion.kt"); - } - - @TestMetadata("jvmFieldInConstructor.kt") - public void testJvmFieldInConstructor() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvmFieldInConstructor.kt"); - } - - @TestMetadata("jvmFieldInInterfaceCompanion.kt") - public void testJvmFieldInInterfaceCompanion() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvmFieldInInterfaceCompanion.kt"); - } - - @TestMetadata("jvmNames.kt") - public void testJvmNames() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvmNames.kt"); - } - - @TestMetadata("jvmPackageName.kt") - public void testJvmPackageName() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvmPackageName.kt"); - } - - @TestMetadata("jvmPackageNameInRootPackage.kt") - public void testJvmPackageNameInRootPackage() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvmPackageNameInRootPackage.kt"); - } - - @TestMetadata("jvmPackageNameMultifileClass.kt") - public void testJvmPackageNameMultifileClass() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvmPackageNameMultifileClass.kt"); - } - - @TestMetadata("jvmPackageNameWithJvmName.kt") - public void testJvmPackageNameWithJvmName() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvmPackageNameWithJvmName.kt"); - } - - @TestMetadata("jvmStaticInObject.kt") - public void testJvmStaticInObject() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvmStaticInObject.kt"); - } - - @TestMetadata("jvmStaticInObjectPropertyReference.kt") - public void testJvmStaticInObjectPropertyReference() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvmStaticInObjectPropertyReference.kt"); - } - - @TestMetadata("kotlinPropertyAsAnnotationParameter.kt") - public void testKotlinPropertyAsAnnotationParameter() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/kotlinPropertyAsAnnotationParameter.kt"); - } - - @TestMetadata("kt14012.kt") - public void testKt14012() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/kt14012.kt"); - } - - @TestMetadata("kt14012_multi.kt") - public void testKt14012_multi() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/kt14012_multi.kt"); - } - - @TestMetadata("kt21775.kt") - public void testKt21775() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/kt21775.kt"); - } - - @TestMetadata("metadataForMembersInLocalClassInInitializer.kt") - public void testMetadataForMembersInLocalClassInInitializer() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/metadataForMembersInLocalClassInInitializer.kt"); - } - - @TestMetadata("multifileClassInlineFunctionAccessingProperty.kt") - public void testMultifileClassInlineFunctionAccessingProperty() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/multifileClassInlineFunctionAccessingProperty.kt"); - } - - @TestMetadata("multifileClassWithTypealias.kt") - public void testMultifileClassWithTypealias() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/multifileClassWithTypealias.kt"); - } - - @TestMetadata("nestedClass.kt") - public void testNestedClass() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/nestedClass.kt"); - } - - @TestMetadata("nestedClassInAnnotationArgument.kt") - public void testNestedClassInAnnotationArgument() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/nestedClassInAnnotationArgument.kt"); - } - - @TestMetadata("nestedEnum.kt") - public void testNestedEnum() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/nestedEnum.kt"); - } - - @TestMetadata("nestedFunctionTypeAliasExpansion.kt") - public void testNestedFunctionTypeAliasExpansion() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/nestedFunctionTypeAliasExpansion.kt"); - } - - @TestMetadata("nestedObject.kt") - public void testNestedObject() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/nestedObject.kt"); - } - - @TestMetadata("nestedTypeAliasExpansion.kt") - public void testNestedTypeAliasExpansion() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/nestedTypeAliasExpansion.kt"); - } - - @TestMetadata("noExplicitOverrideForDelegatedFromSupertype.kt") - public void testNoExplicitOverrideForDelegatedFromSupertype() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/noExplicitOverrideForDelegatedFromSupertype.kt"); - } - - @TestMetadata("optionalAnnotation.kt") - public void testOptionalAnnotation() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/optionalAnnotation.kt"); - } - - @TestMetadata("platformTypes.kt") - public void testPlatformTypes() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/platformTypes.kt"); - } - - @TestMetadata("privateCompanionObjectValInDifferentModule.kt") - public void testPrivateCompanionObjectValInDifferentModule() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/privateCompanionObjectValInDifferentModule.kt"); - } - - @TestMetadata("privateCompanionObjectValInDifferentModuleOldMangling.kt") - public void testPrivateCompanionObjectValInDifferentModuleOldMangling() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/privateCompanionObjectValInDifferentModuleOldMangling.kt"); - } - - @TestMetadata("privateTopLevelValInDifferentModule.kt") - public void testPrivateTopLevelValInDifferentModule() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/privateTopLevelValInDifferentModule.kt"); - } - - @TestMetadata("privateTopLevelValInDifferentModuleOldMangling.kt") - public void testPrivateTopLevelValInDifferentModuleOldMangling() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/privateTopLevelValInDifferentModuleOldMangling.kt"); - } - - @TestMetadata("propertyReference.kt") - public void testPropertyReference() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/propertyReference.kt"); - } - - @TestMetadata("recursiveGeneric.kt") - public void testRecursiveGeneric() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/recursiveGeneric.kt"); - } - - @TestMetadata("reflectTopLevelFunctionOtherFile.kt") - public void testReflectTopLevelFunctionOtherFile() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/reflectTopLevelFunctionOtherFile.kt"); - } - - @TestMetadata("sealedClass.kt") - public void testSealedClass() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/sealedClass.kt"); - } - - @TestMetadata("secondaryConstructors.kt") - public void testSecondaryConstructors() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/secondaryConstructors.kt"); - } - - @TestMetadata("simple.kt") - public void testSimple() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/simple.kt"); - } - - @TestMetadata("simpleValAnonymousObject.kt") - public void testSimpleValAnonymousObject() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/simpleValAnonymousObject.kt"); - } - - @TestMetadata("specialBridgesInDependencies.kt") - public void testSpecialBridgesInDependencies() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/specialBridgesInDependencies.kt"); - } - - @TestMetadata("starImportEnum.kt") - public void testStarImportEnum() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/starImportEnum.kt"); - } - - @TestMetadata("suspendFunWithDefaultMangling.kt") - public void testSuspendFunWithDefaultMangling() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/suspendFunWithDefaultMangling.kt"); - } - - @TestMetadata("suspendFunWithDefaultOldMangling.kt") - public void testSuspendFunWithDefaultOldMangling() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/suspendFunWithDefaultOldMangling.kt"); - } - - @TestMetadata("targetedJvmName.kt") - public void testTargetedJvmName() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/targetedJvmName.kt"); - } - - @TestMetadata("typeAliasesKt13181.kt") - public void testTypeAliasesKt13181() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/typeAliasesKt13181.kt"); - } - - @TestMetadata("unsignedTypesInAnnotations.kt") - public void testUnsignedTypesInAnnotations() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/unsignedTypesInAnnotations.kt"); - } - - @TestMetadata("useDeserializedFunInterface.kt") - public void testUseDeserializedFunInterface() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/useDeserializedFunInterface.kt"); - } - - @TestMetadata("compiler/testData/compileKotlinAgainstKotlin/fir") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Fir extends AbstractJvmIrAgainstOldBoxTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath); - } - - public void testAllFilesPresentInFir() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/compileKotlinAgainstKotlin/fir"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true); - } - - @TestMetadata("AnonymousObjectInProperty.kt") - public void testAnonymousObjectInProperty() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/fir/AnonymousObjectInProperty.kt"); - } - - @TestMetadata("ExistingSymbolInFakeOverride.kt") - public void testExistingSymbolInFakeOverride() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/fir/ExistingSymbolInFakeOverride.kt"); - } - - @TestMetadata("IncrementalCompilerRunner.kt") - public void testIncrementalCompilerRunner() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/fir/IncrementalCompilerRunner.kt"); - } - - @TestMetadata("IrConstAcceptMultiModule.kt") - public void testIrConstAcceptMultiModule() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/fir/IrConstAcceptMultiModule.kt"); - } - - @TestMetadata("LibraryProperty.kt") - public void testLibraryProperty() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/fir/LibraryProperty.kt"); - } - } - - @TestMetadata("compiler/testData/compileKotlinAgainstKotlin/jvm8") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Jvm8 extends AbstractJvmIrAgainstOldBoxTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath); - } - - public void testAllFilesPresentInJvm8() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/compileKotlinAgainstKotlin/jvm8"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true); - } - - @TestMetadata("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Defaults extends AbstractJvmIrAgainstOldBoxTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath); - } - - public void testAllFilesPresentInDefaults() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true); - } - - @TestMetadata("superCall.kt") - public void testSuperCall() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/superCall.kt"); - } - - @TestMetadata("superCallFromInterface.kt") - public void testSuperCallFromInterface() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/superCallFromInterface.kt"); - } - - @TestMetadata("superCallFromInterface2.kt") - public void testSuperCallFromInterface2() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/superCallFromInterface2.kt"); - } - - @TestMetadata("superPropAccess.kt") - public void testSuperPropAccess() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/superPropAccess.kt"); - } - - @TestMetadata("superPropAccessFromInterface.kt") - public void testSuperPropAccessFromInterface() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/superPropAccessFromInterface.kt"); - } - - @TestMetadata("superPropAccessFromInterface2.kt") - public void testSuperPropAccessFromInterface2() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/superPropAccessFromInterface2.kt"); - } - - @TestMetadata("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class AllCompatibility extends AbstractJvmIrAgainstOldBoxTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath); - } - - public void testAllFilesPresentInAllCompatibility() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true); - } - - @TestMetadata("callStackTrace.kt") - public void testCallStackTrace() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/callStackTrace.kt"); - } - - @TestMetadata("superCall.kt") - public void testSuperCall() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superCall.kt"); - } - - @TestMetadata("superCallFromInterface.kt") - public void testSuperCallFromInterface() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superCallFromInterface.kt"); - } - - @TestMetadata("superCallFromInterface2.kt") - public void testSuperCallFromInterface2() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superCallFromInterface2.kt"); - } - - @TestMetadata("superPropAccess.kt") - public void testSuperPropAccess() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superPropAccess.kt"); - } - - @TestMetadata("superPropAccessFromInterface.kt") - public void testSuperPropAccessFromInterface() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superPropAccessFromInterface.kt"); - } - - @TestMetadata("superPropAccessFromInterface2.kt") - public void testSuperPropAccessFromInterface2() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superPropAccessFromInterface2.kt"); - } - - @TestMetadata("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/delegationBy") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class DelegationBy extends AbstractJvmIrAgainstOldBoxTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath); - } - - public void testAllFilesPresentInDelegationBy() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/delegationBy"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true); - } - - @TestMetadata("simple.kt") - public void testSimple() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/delegationBy/simple.kt"); - } - - @TestMetadata("simpleProperty.kt") - public void testSimpleProperty() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/delegationBy/simpleProperty.kt"); - } - } - } - - @TestMetadata("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Interop extends AbstractJvmIrAgainstOldBoxTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath); - } - - public void testAllFilesPresentInInterop() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true); - } - - @TestMetadata("likeMemberClash.kt") - public void testLikeMemberClash() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop/likeMemberClash.kt"); - } - - @TestMetadata("likeSpecialization.kt") - public void testLikeSpecialization() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop/likeSpecialization.kt"); - } - - @TestMetadata("newAndOldSchemes.kt") - public void testNewAndOldSchemes() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop/newAndOldSchemes.kt"); - } - - @TestMetadata("newAndOldSchemes2.kt") - public void testNewAndOldSchemes2() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop/newAndOldSchemes2.kt"); - } - - @TestMetadata("newAndOldSchemes2Compatibility.kt") - public void testNewAndOldSchemes2Compatibility() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop/newAndOldSchemes2Compatibility.kt"); - } - - @TestMetadata("newAndOldSchemes3.kt") - public void testNewAndOldSchemes3() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop/newAndOldSchemes3.kt"); - } - - @TestMetadata("newSchemeWithJvmDefault.kt") - public void testNewSchemeWithJvmDefault() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop/newSchemeWithJvmDefault.kt"); - } - } - } - - @TestMetadata("compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Jvm8against6 extends AbstractJvmIrAgainstOldBoxTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath); - } - - public void testAllFilesPresentInJvm8against6() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true); - } - - @TestMetadata("jdk8Against6.kt") - public void testJdk8Against6() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/jdk8Against6.kt"); - } - - @TestMetadata("simpleCall.kt") - public void testSimpleCall() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/simpleCall.kt"); - } - - @TestMetadata("simpleCallWithBigHierarchy.kt") - public void testSimpleCallWithBigHierarchy() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/simpleCallWithBigHierarchy.kt"); - } - - @TestMetadata("simpleCallWithHierarchy.kt") - public void testSimpleCallWithHierarchy() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/simpleCallWithHierarchy.kt"); - } - - @TestMetadata("simpleProp.kt") - public void testSimpleProp() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/simpleProp.kt"); - } - - @TestMetadata("simplePropWithHierarchy.kt") - public void testSimplePropWithHierarchy() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/simplePropWithHierarchy.kt"); - } - - @TestMetadata("compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/delegation") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Delegation extends AbstractJvmIrAgainstOldBoxTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath); - } - - public void testAllFilesPresentInDelegation() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/delegation"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true); - } - - @TestMetadata("diamond.kt") - public void testDiamond() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/delegation/diamond.kt"); - } - - @TestMetadata("diamond2.kt") - public void testDiamond2() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/delegation/diamond2.kt"); - } - - @TestMetadata("diamond3.kt") - public void testDiamond3() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/delegation/diamond3.kt"); - } - } - } - } - - @TestMetadata("compiler/testData/compileKotlinAgainstKotlin/typeAnnotations") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class TypeAnnotations extends AbstractJvmIrAgainstOldBoxTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath); - } - - public void testAllFilesPresentInTypeAnnotations() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/compileKotlinAgainstKotlin/typeAnnotations"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true); - } - - @TestMetadata("implicitReturn.kt") - public void testImplicitReturn() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/typeAnnotations/implicitReturn.kt"); - } - } -} diff --git a/compiler/tests-gen/org/jetbrains/kotlin/codegen/ir/JvmOldAgainstIrBoxTestGenerated.java b/compiler/tests-gen/org/jetbrains/kotlin/codegen/ir/JvmOldAgainstIrBoxTestGenerated.java deleted file mode 100644 index 05848569b43..00000000000 --- a/compiler/tests-gen/org/jetbrains/kotlin/codegen/ir/JvmOldAgainstIrBoxTestGenerated.java +++ /dev/null @@ -1,794 +0,0 @@ -/* - * Copyright 2010-2021 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. - */ - -package org.jetbrains.kotlin.codegen.ir; - -import com.intellij.testFramework.TestDataPath; -import org.jetbrains.kotlin.test.JUnit3RunnerWithInners; -import org.jetbrains.kotlin.test.KotlinTestUtils; -import org.jetbrains.kotlin.test.util.KtTestUtil; -import org.jetbrains.kotlin.test.TargetBackend; -import org.jetbrains.kotlin.test.TestMetadata; -import org.junit.runner.RunWith; - -import java.io.File; -import java.util.regex.Pattern; - -/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */ -@SuppressWarnings("all") -@TestMetadata("compiler/testData/compileKotlinAgainstKotlin") -@TestDataPath("$PROJECT_ROOT") -@RunWith(JUnit3RunnerWithInners.class) -public class JvmOldAgainstIrBoxTestGenerated extends AbstractJvmOldAgainstIrBoxTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath); - } - - public void testAllFilesPresentInCompileKotlinAgainstKotlin() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/compileKotlinAgainstKotlin"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true); - } - - @TestMetadata("annotationInInterface.kt") - public void testAnnotationInInterface() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/annotationInInterface.kt"); - } - - @TestMetadata("annotationOnTypeUseInTypeAlias.kt") - public void testAnnotationOnTypeUseInTypeAlias() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/annotationOnTypeUseInTypeAlias.kt"); - } - - @TestMetadata("annotationsOnTypeAliases.kt") - public void testAnnotationsOnTypeAliases() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/annotationsOnTypeAliases.kt"); - } - - @TestMetadata("callDeserializedPropertyOnInlineClassType.kt") - public void testCallDeserializedPropertyOnInlineClassType() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/callDeserializedPropertyOnInlineClassType.kt"); - } - - @TestMetadata("callDeserializedPropertyOnInlineClassTypeOldMangling.kt") - public void testCallDeserializedPropertyOnInlineClassTypeOldMangling() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/callDeserializedPropertyOnInlineClassTypeOldMangling.kt"); - } - - @TestMetadata("callsToMultifileClassFromOtherPackage.kt") - public void testCallsToMultifileClassFromOtherPackage() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/callsToMultifileClassFromOtherPackage.kt"); - } - - @TestMetadata("clashingFakeOverrideSignatures.kt") - public void testClashingFakeOverrideSignatures() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/clashingFakeOverrideSignatures.kt"); - } - - @TestMetadata("classInObject.kt") - public void testClassInObject() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/classInObject.kt"); - } - - @TestMetadata("companionObjectInEnum.kt") - public void testCompanionObjectInEnum() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/companionObjectInEnum.kt"); - } - - @TestMetadata("companionObjectMember.kt") - public void testCompanionObjectMember() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/companionObjectMember.kt"); - } - - @TestMetadata("constPropertyReferenceFromMultifileClass.kt") - public void testConstPropertyReferenceFromMultifileClass() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/constPropertyReferenceFromMultifileClass.kt"); - } - - @TestMetadata("constructorVararg.kt") - public void testConstructorVararg() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/constructorVararg.kt"); - } - - @TestMetadata("constructorWithInlineClassParametersInBinaryDependencies.kt") - public void testConstructorWithInlineClassParametersInBinaryDependencies() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/constructorWithInlineClassParametersInBinaryDependencies.kt"); - } - - @TestMetadata("constructorWithInlineClassParametersInBinaryDependenciesOldMangling.kt") - public void testConstructorWithInlineClassParametersInBinaryDependenciesOldMangling() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/constructorWithInlineClassParametersInBinaryDependenciesOldMangling.kt"); - } - - @TestMetadata("copySamOnInline.kt") - public void testCopySamOnInline() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/copySamOnInline.kt"); - } - - @TestMetadata("copySamOnInline2.kt") - public void testCopySamOnInline2() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/copySamOnInline2.kt"); - } - - @TestMetadata("coroutinesBinary.kt") - public void testCoroutinesBinary() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/coroutinesBinary.kt"); - } - - @TestMetadata("defaultConstructor.kt") - public void testDefaultConstructor() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/defaultConstructor.kt"); - } - - @TestMetadata("defaultLambdaRegeneration.kt") - public void testDefaultLambdaRegeneration() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/defaultLambdaRegeneration.kt"); - } - - @TestMetadata("defaultLambdaRegeneration2.kt") - public void testDefaultLambdaRegeneration2() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/defaultLambdaRegeneration2.kt"); - } - - @TestMetadata("defaultWithInlineClassAndReceivers.kt") - public void testDefaultWithInlineClassAndReceivers() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/defaultWithInlineClassAndReceivers.kt"); - } - - @TestMetadata("defaultWithInlineClassAndReceiversOldMangling.kt") - public void testDefaultWithInlineClassAndReceiversOldMangling() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/defaultWithInlineClassAndReceiversOldMangling.kt"); - } - - @TestMetadata("delegatedDefault.kt") - public void testDelegatedDefault() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/delegatedDefault.kt"); - } - - @TestMetadata("delegationAndAnnotations.kt") - public void testDelegationAndAnnotations() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/delegationAndAnnotations.kt"); - } - - @TestMetadata("doublyNestedClass.kt") - public void testDoublyNestedClass() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/doublyNestedClass.kt"); - } - - @TestMetadata("enum.kt") - public void testEnum() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/enum.kt"); - } - - @TestMetadata("expectClassActualTypeAlias.kt") - public void testExpectClassActualTypeAlias() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/expectClassActualTypeAlias.kt"); - } - - @TestMetadata("fakeOverridesForIntersectionTypes.kt") - public void testFakeOverridesForIntersectionTypes() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/fakeOverridesForIntersectionTypes.kt"); - } - - @TestMetadata("importCompanion.kt") - public void testImportCompanion() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/importCompanion.kt"); - } - - @TestMetadata("inlineClassFakeOverrideMangling.kt") - public void testInlineClassFakeOverrideMangling() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/inlineClassFakeOverrideMangling.kt"); - } - - @TestMetadata("inlineClassFakeOverrideManglingOldMangling.kt") - public void testInlineClassFakeOverrideManglingOldMangling() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/inlineClassFakeOverrideManglingOldMangling.kt"); - } - - @TestMetadata("inlineClassFromBinaryDependencies.kt") - public void testInlineClassFromBinaryDependencies() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/inlineClassFromBinaryDependencies.kt"); - } - - @TestMetadata("inlineClassFromBinaryDependenciesOldMangling.kt") - public void testInlineClassFromBinaryDependenciesOldMangling() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/inlineClassFromBinaryDependenciesOldMangling.kt"); - } - - @TestMetadata("inlineClassInlineFunctionCall.kt") - public void testInlineClassInlineFunctionCall() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/inlineClassInlineFunctionCall.kt"); - } - - @TestMetadata("inlineClassInlineFunctionCallOldMangling.kt") - public void testInlineClassInlineFunctionCallOldMangling() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/inlineClassInlineFunctionCallOldMangling.kt"); - } - - @TestMetadata("inlineClassInlineProperty.kt") - public void testInlineClassInlineProperty() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/inlineClassInlineProperty.kt"); - } - - @TestMetadata("inlineClassInlinePropertyOldMangling.kt") - public void testInlineClassInlinePropertyOldMangling() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/inlineClassInlinePropertyOldMangling.kt"); - } - - @TestMetadata("inlineClassesOldMangling.kt") - public void testInlineClassesOldMangling() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/inlineClassesOldMangling.kt"); - } - - @TestMetadata("inlinedConstants.kt") - public void testInlinedConstants() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/inlinedConstants.kt"); - } - - @TestMetadata("innerClassConstructor.kt") - public void testInnerClassConstructor() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/innerClassConstructor.kt"); - } - - @TestMetadata("interfaceDelegationAndBridgesProcessing.kt") - public void testInterfaceDelegationAndBridgesProcessing() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/interfaceDelegationAndBridgesProcessing.kt"); - } - - @TestMetadata("internalSetterOverridden.kt") - public void testInternalSetterOverridden() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/internalSetterOverridden.kt"); - } - - @TestMetadata("internalWithDefaultArgs.kt") - public void testInternalWithDefaultArgs() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/internalWithDefaultArgs.kt"); - } - - @TestMetadata("internalWithInlineClass.kt") - public void testInternalWithInlineClass() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/internalWithInlineClass.kt"); - } - - @TestMetadata("internalWithOtherModuleName.kt") - public void testInternalWithOtherModuleName() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/internalWithOtherModuleName.kt"); - } - - @TestMetadata("intersectionOverrideProperies.kt") - public void testIntersectionOverrideProperies() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/intersectionOverrideProperies.kt"); - } - - @TestMetadata("jvmField.kt") - public void testJvmField() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvmField.kt"); - } - - @TestMetadata("jvmFieldInAnnotationCompanion.kt") - public void testJvmFieldInAnnotationCompanion() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvmFieldInAnnotationCompanion.kt"); - } - - @TestMetadata("jvmFieldInConstructor.kt") - public void testJvmFieldInConstructor() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvmFieldInConstructor.kt"); - } - - @TestMetadata("jvmFieldInInterfaceCompanion.kt") - public void testJvmFieldInInterfaceCompanion() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvmFieldInInterfaceCompanion.kt"); - } - - @TestMetadata("jvmNames.kt") - public void testJvmNames() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvmNames.kt"); - } - - @TestMetadata("jvmPackageName.kt") - public void testJvmPackageName() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvmPackageName.kt"); - } - - @TestMetadata("jvmPackageNameInRootPackage.kt") - public void testJvmPackageNameInRootPackage() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvmPackageNameInRootPackage.kt"); - } - - @TestMetadata("jvmPackageNameMultifileClass.kt") - public void testJvmPackageNameMultifileClass() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvmPackageNameMultifileClass.kt"); - } - - @TestMetadata("jvmPackageNameWithJvmName.kt") - public void testJvmPackageNameWithJvmName() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvmPackageNameWithJvmName.kt"); - } - - @TestMetadata("jvmStaticInObject.kt") - public void testJvmStaticInObject() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvmStaticInObject.kt"); - } - - @TestMetadata("jvmStaticInObjectPropertyReference.kt") - public void testJvmStaticInObjectPropertyReference() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvmStaticInObjectPropertyReference.kt"); - } - - @TestMetadata("kotlinPropertyAsAnnotationParameter.kt") - public void testKotlinPropertyAsAnnotationParameter() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/kotlinPropertyAsAnnotationParameter.kt"); - } - - @TestMetadata("kt14012.kt") - public void testKt14012() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/kt14012.kt"); - } - - @TestMetadata("kt14012_multi.kt") - public void testKt14012_multi() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/kt14012_multi.kt"); - } - - @TestMetadata("kt21775.kt") - public void testKt21775() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/kt21775.kt"); - } - - @TestMetadata("metadataForMembersInLocalClassInInitializer.kt") - public void testMetadataForMembersInLocalClassInInitializer() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/metadataForMembersInLocalClassInInitializer.kt"); - } - - @TestMetadata("multifileClassInlineFunctionAccessingProperty.kt") - public void testMultifileClassInlineFunctionAccessingProperty() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/multifileClassInlineFunctionAccessingProperty.kt"); - } - - @TestMetadata("multifileClassWithTypealias.kt") - public void testMultifileClassWithTypealias() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/multifileClassWithTypealias.kt"); - } - - @TestMetadata("nestedClass.kt") - public void testNestedClass() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/nestedClass.kt"); - } - - @TestMetadata("nestedClassInAnnotationArgument.kt") - public void testNestedClassInAnnotationArgument() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/nestedClassInAnnotationArgument.kt"); - } - - @TestMetadata("nestedEnum.kt") - public void testNestedEnum() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/nestedEnum.kt"); - } - - @TestMetadata("nestedFunctionTypeAliasExpansion.kt") - public void testNestedFunctionTypeAliasExpansion() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/nestedFunctionTypeAliasExpansion.kt"); - } - - @TestMetadata("nestedObject.kt") - public void testNestedObject() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/nestedObject.kt"); - } - - @TestMetadata("nestedTypeAliasExpansion.kt") - public void testNestedTypeAliasExpansion() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/nestedTypeAliasExpansion.kt"); - } - - @TestMetadata("noExplicitOverrideForDelegatedFromSupertype.kt") - public void testNoExplicitOverrideForDelegatedFromSupertype() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/noExplicitOverrideForDelegatedFromSupertype.kt"); - } - - @TestMetadata("optionalAnnotation.kt") - public void testOptionalAnnotation() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/optionalAnnotation.kt"); - } - - @TestMetadata("platformTypes.kt") - public void testPlatformTypes() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/platformTypes.kt"); - } - - @TestMetadata("privateCompanionObjectValInDifferentModule.kt") - public void testPrivateCompanionObjectValInDifferentModule() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/privateCompanionObjectValInDifferentModule.kt"); - } - - @TestMetadata("privateCompanionObjectValInDifferentModuleOldMangling.kt") - public void testPrivateCompanionObjectValInDifferentModuleOldMangling() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/privateCompanionObjectValInDifferentModuleOldMangling.kt"); - } - - @TestMetadata("privateTopLevelValInDifferentModule.kt") - public void testPrivateTopLevelValInDifferentModule() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/privateTopLevelValInDifferentModule.kt"); - } - - @TestMetadata("privateTopLevelValInDifferentModuleOldMangling.kt") - public void testPrivateTopLevelValInDifferentModuleOldMangling() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/privateTopLevelValInDifferentModuleOldMangling.kt"); - } - - @TestMetadata("propertyReference.kt") - public void testPropertyReference() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/propertyReference.kt"); - } - - @TestMetadata("recursiveGeneric.kt") - public void testRecursiveGeneric() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/recursiveGeneric.kt"); - } - - @TestMetadata("reflectTopLevelFunctionOtherFile.kt") - public void testReflectTopLevelFunctionOtherFile() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/reflectTopLevelFunctionOtherFile.kt"); - } - - @TestMetadata("sealedClass.kt") - public void testSealedClass() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/sealedClass.kt"); - } - - @TestMetadata("secondaryConstructors.kt") - public void testSecondaryConstructors() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/secondaryConstructors.kt"); - } - - @TestMetadata("simple.kt") - public void testSimple() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/simple.kt"); - } - - @TestMetadata("simpleValAnonymousObject.kt") - public void testSimpleValAnonymousObject() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/simpleValAnonymousObject.kt"); - } - - @TestMetadata("specialBridgesInDependencies.kt") - public void testSpecialBridgesInDependencies() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/specialBridgesInDependencies.kt"); - } - - @TestMetadata("starImportEnum.kt") - public void testStarImportEnum() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/starImportEnum.kt"); - } - - @TestMetadata("suspendFunWithDefaultMangling.kt") - public void testSuspendFunWithDefaultMangling() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/suspendFunWithDefaultMangling.kt"); - } - - @TestMetadata("suspendFunWithDefaultOldMangling.kt") - public void testSuspendFunWithDefaultOldMangling() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/suspendFunWithDefaultOldMangling.kt"); - } - - @TestMetadata("targetedJvmName.kt") - public void testTargetedJvmName() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/targetedJvmName.kt"); - } - - @TestMetadata("typeAliasesKt13181.kt") - public void testTypeAliasesKt13181() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/typeAliasesKt13181.kt"); - } - - @TestMetadata("unsignedTypesInAnnotations.kt") - public void testUnsignedTypesInAnnotations() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/unsignedTypesInAnnotations.kt"); - } - - @TestMetadata("useDeserializedFunInterface.kt") - public void testUseDeserializedFunInterface() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/useDeserializedFunInterface.kt"); - } - - @TestMetadata("compiler/testData/compileKotlinAgainstKotlin/fir") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Fir extends AbstractJvmOldAgainstIrBoxTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath); - } - - public void testAllFilesPresentInFir() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/compileKotlinAgainstKotlin/fir"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true); - } - - @TestMetadata("AnonymousObjectInProperty.kt") - public void testAnonymousObjectInProperty() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/fir/AnonymousObjectInProperty.kt"); - } - - @TestMetadata("ExistingSymbolInFakeOverride.kt") - public void testExistingSymbolInFakeOverride() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/fir/ExistingSymbolInFakeOverride.kt"); - } - - @TestMetadata("IncrementalCompilerRunner.kt") - public void testIncrementalCompilerRunner() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/fir/IncrementalCompilerRunner.kt"); - } - - @TestMetadata("IrConstAcceptMultiModule.kt") - public void testIrConstAcceptMultiModule() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/fir/IrConstAcceptMultiModule.kt"); - } - - @TestMetadata("LibraryProperty.kt") - public void testLibraryProperty() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/fir/LibraryProperty.kt"); - } - } - - @TestMetadata("compiler/testData/compileKotlinAgainstKotlin/jvm8") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Jvm8 extends AbstractJvmOldAgainstIrBoxTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath); - } - - public void testAllFilesPresentInJvm8() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/compileKotlinAgainstKotlin/jvm8"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true); - } - - @TestMetadata("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Defaults extends AbstractJvmOldAgainstIrBoxTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath); - } - - public void testAllFilesPresentInDefaults() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true); - } - - @TestMetadata("superCall.kt") - public void testSuperCall() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/superCall.kt"); - } - - @TestMetadata("superCallFromInterface.kt") - public void testSuperCallFromInterface() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/superCallFromInterface.kt"); - } - - @TestMetadata("superCallFromInterface2.kt") - public void testSuperCallFromInterface2() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/superCallFromInterface2.kt"); - } - - @TestMetadata("superPropAccess.kt") - public void testSuperPropAccess() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/superPropAccess.kt"); - } - - @TestMetadata("superPropAccessFromInterface.kt") - public void testSuperPropAccessFromInterface() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/superPropAccessFromInterface.kt"); - } - - @TestMetadata("superPropAccessFromInterface2.kt") - public void testSuperPropAccessFromInterface2() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/superPropAccessFromInterface2.kt"); - } - - @TestMetadata("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class AllCompatibility extends AbstractJvmOldAgainstIrBoxTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath); - } - - public void testAllFilesPresentInAllCompatibility() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true); - } - - @TestMetadata("callStackTrace.kt") - public void testCallStackTrace() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/callStackTrace.kt"); - } - - @TestMetadata("superCall.kt") - public void testSuperCall() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superCall.kt"); - } - - @TestMetadata("superCallFromInterface.kt") - public void testSuperCallFromInterface() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superCallFromInterface.kt"); - } - - @TestMetadata("superCallFromInterface2.kt") - public void testSuperCallFromInterface2() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superCallFromInterface2.kt"); - } - - @TestMetadata("superPropAccess.kt") - public void testSuperPropAccess() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superPropAccess.kt"); - } - - @TestMetadata("superPropAccessFromInterface.kt") - public void testSuperPropAccessFromInterface() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superPropAccessFromInterface.kt"); - } - - @TestMetadata("superPropAccessFromInterface2.kt") - public void testSuperPropAccessFromInterface2() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superPropAccessFromInterface2.kt"); - } - - @TestMetadata("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/delegationBy") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class DelegationBy extends AbstractJvmOldAgainstIrBoxTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath); - } - - public void testAllFilesPresentInDelegationBy() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/delegationBy"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true); - } - - @TestMetadata("simple.kt") - public void testSimple() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/delegationBy/simple.kt"); - } - - @TestMetadata("simpleProperty.kt") - public void testSimpleProperty() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/delegationBy/simpleProperty.kt"); - } - } - } - - @TestMetadata("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Interop extends AbstractJvmOldAgainstIrBoxTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath); - } - - public void testAllFilesPresentInInterop() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true); - } - - @TestMetadata("likeMemberClash.kt") - public void testLikeMemberClash() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop/likeMemberClash.kt"); - } - - @TestMetadata("likeSpecialization.kt") - public void testLikeSpecialization() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop/likeSpecialization.kt"); - } - - @TestMetadata("newAndOldSchemes.kt") - public void testNewAndOldSchemes() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop/newAndOldSchemes.kt"); - } - - @TestMetadata("newAndOldSchemes2.kt") - public void testNewAndOldSchemes2() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop/newAndOldSchemes2.kt"); - } - - @TestMetadata("newAndOldSchemes2Compatibility.kt") - public void testNewAndOldSchemes2Compatibility() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop/newAndOldSchemes2Compatibility.kt"); - } - - @TestMetadata("newAndOldSchemes3.kt") - public void testNewAndOldSchemes3() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop/newAndOldSchemes3.kt"); - } - - @TestMetadata("newSchemeWithJvmDefault.kt") - public void testNewSchemeWithJvmDefault() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop/newSchemeWithJvmDefault.kt"); - } - } - } - - @TestMetadata("compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Jvm8against6 extends AbstractJvmOldAgainstIrBoxTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath); - } - - public void testAllFilesPresentInJvm8against6() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true); - } - - @TestMetadata("jdk8Against6.kt") - public void testJdk8Against6() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/jdk8Against6.kt"); - } - - @TestMetadata("simpleCall.kt") - public void testSimpleCall() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/simpleCall.kt"); - } - - @TestMetadata("simpleCallWithBigHierarchy.kt") - public void testSimpleCallWithBigHierarchy() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/simpleCallWithBigHierarchy.kt"); - } - - @TestMetadata("simpleCallWithHierarchy.kt") - public void testSimpleCallWithHierarchy() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/simpleCallWithHierarchy.kt"); - } - - @TestMetadata("simpleProp.kt") - public void testSimpleProp() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/simpleProp.kt"); - } - - @TestMetadata("simplePropWithHierarchy.kt") - public void testSimplePropWithHierarchy() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/simplePropWithHierarchy.kt"); - } - - @TestMetadata("compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/delegation") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Delegation extends AbstractJvmOldAgainstIrBoxTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath); - } - - public void testAllFilesPresentInDelegation() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/delegation"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true); - } - - @TestMetadata("diamond.kt") - public void testDiamond() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/delegation/diamond.kt"); - } - - @TestMetadata("diamond2.kt") - public void testDiamond2() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/delegation/diamond2.kt"); - } - - @TestMetadata("diamond3.kt") - public void testDiamond3() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6/delegation/diamond3.kt"); - } - } - } - } - - @TestMetadata("compiler/testData/compileKotlinAgainstKotlin/typeAnnotations") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class TypeAnnotations extends AbstractJvmOldAgainstIrBoxTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath); - } - - public void testAllFilesPresentInTypeAnnotations() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/compileKotlinAgainstKotlin/typeAnnotations"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true); - } - - @TestMetadata("implicitReturn.kt") - public void testImplicitReturn() throws Exception { - runTest("compiler/testData/compileKotlinAgainstKotlin/typeAnnotations/implicitReturn.kt"); - } - } -} diff --git a/compiler/tests-spec/testData/diagnostics/linked/declarations/classifier-declaration/class-declaration/abstract-classes/p-2/neg/1.1.fir.kt b/compiler/tests-spec/testData/diagnostics/linked/declarations/classifier-declaration/class-declaration/abstract-classes/p-2/neg/1.1.fir.kt index d07c8bf1aca..6686fdbde50 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/declarations/classifier-declaration/class-declaration/abstract-classes/p-2/neg/1.1.fir.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/declarations/classifier-declaration/class-declaration/abstract-classes/p-2/neg/1.1.fir.kt @@ -22,9 +22,9 @@ fun case1() { class BaseImplCase2( override var a: Any, override - val b: Any, override var c: Any, override + val b: Any, override var c: Any, override - val d: Any = "5") : Base() + val d: Any = "5") : Base() { override fun foo() {} override internal fun boo() {} @@ -42,14 +42,14 @@ class ImplBaseCase2() : Base() { set(value) {} override - val b: Any + val b: Any get() = TODO() override var c: Any get() = TODO() set(value) {} override - val d: Any + val d: Any get() = TODO() override fun foo() {} diff --git a/compiler/tests-spec/testData/diagnostics/linked/type-system/introduction-1/p-6/neg/2.2.fir.kt b/compiler/tests-spec/testData/diagnostics/linked/type-system/introduction-1/p-6/neg/2.2.fir.kt index 41b8ba44cf3..eee44c28622 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/type-system/introduction-1/p-6/neg/2.2.fir.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/type-system/introduction-1/p-6/neg/2.2.fir.kt @@ -70,7 +70,7 @@ open class Case13_1 { } class Case13: Case13_1() { - override val x = null + override val x = null } // TESTCASE NUMBER: 14 @@ -79,7 +79,7 @@ abstract class Case14_1 { } class Case14: Case14_1() { - override val x = null + override val x = null } // TESTCASE NUMBER: 15 @@ -88,5 +88,5 @@ interface Case15_1 { } class Case15(): Case15_1 { - override fun foo() = null + override fun foo() = null } diff --git a/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/checkers/DiagnosticsTestSpecGenerated.java b/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/checkers/DiagnosticsTestSpecGenerated.java index 1808f929fa9..2b6baaed95f 100644 --- a/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/checkers/DiagnosticsTestSpecGenerated.java +++ b/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/checkers/DiagnosticsTestSpecGenerated.java @@ -1,5 +1,5 @@ /* - * Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Copyright 2010-2021 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. */ @@ -8,6 +8,7 @@ package org.jetbrains.kotlin.spec.checkers; import com.intellij.testFramework.TestDataPath; import org.jetbrains.kotlin.test.JUnit3RunnerWithInners; import org.jetbrains.kotlin.test.KotlinTestUtils; +import org.jetbrains.kotlin.test.util.KtTestUtil; import org.jetbrains.kotlin.test.TestMetadata; import org.junit.runner.RunWith; @@ -25,7 +26,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInDiagnostics() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true, "helpers", "linked/annotations", "linked/built-in-types-and-their-semantics", "linked/control--and-data-flow-analysis.control-flow-graph.expressions-1.conditional-expressions", "linked/control--and-data-flow-analysis/performing-analysis-on-the-control-flow-graph", "linked/declarations/classifier-declaration/class-declaration/nested-and-inner-classifiers", "linked/declarations/classifier-declaration/classifier-initialization", "linked/declarations/classifier-declaration/data-class-declaration", "linked/declarations/function-declaration", "linked/declarations/property-declaration/property-initialization", "linked/declarations/type-alias", "linked/expressions/call-and-property-access-expressions", "linked/expressions/function-literals", "linked/inheritance", "linked/overload-resolution/c-level-partition", "linked/overload-resolution/determining-function-applicability-for-a-specific-call/rationale", "linked/overloadable-operators", "linked/statements/assignments/simple-assignments", "linked/type-inference/local-type-inference", "linked/type-inference/smart-casts/smart-cast-types", "linked/type-system/subtyping/subtyping-for-nullable-types", "linked/type-system/type-kinds/type-parameters"); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true, "helpers", "linked/annotations", "linked/built-in-types-and-their-semantics", "linked/control--and-data-flow-analysis.control-flow-graph.expressions-1.conditional-expressions", "linked/control--and-data-flow-analysis/performing-analysis-on-the-control-flow-graph", "linked/declarations/classifier-declaration/class-declaration/nested-and-inner-classifiers", "linked/declarations/classifier-declaration/classifier-initialization", "linked/declarations/classifier-declaration/data-class-declaration", "linked/declarations/function-declaration", "linked/declarations/property-declaration/property-initialization", "linked/declarations/type-alias", "linked/expressions/call-and-property-access-expressions", "linked/expressions/function-literals", "linked/inheritance", "linked/overload-resolution/c-level-partition", "linked/overload-resolution/determining-function-applicability-for-a-specific-call/rationale", "linked/overloadable-operators", "linked/statements/assignments/simple-assignments", "linked/type-inference/local-type-inference", "linked/type-inference/smart-casts/smart-cast-types", "linked/type-system/subtyping/subtyping-for-nullable-types", "linked/type-system/type-kinds/type-parameters"); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked") @@ -37,7 +38,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInLinked() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true, "annotations", "built-in-types-and-their-semantics", "control--and-data-flow-analysis.control-flow-graph.expressions-1.conditional-expressions", "control--and-data-flow-analysis/performing-analysis-on-the-control-flow-graph", "declarations/classifier-declaration/class-declaration/nested-and-inner-classifiers", "declarations/classifier-declaration/classifier-initialization", "declarations/classifier-declaration/data-class-declaration", "declarations/function-declaration", "declarations/property-declaration/property-initialization", "declarations/type-alias", "expressions/call-and-property-access-expressions", "expressions/function-literals", "inheritance", "overload-resolution/c-level-partition", "overload-resolution/determining-function-applicability-for-a-specific-call/rationale", "overloadable-operators", "statements/assignments/simple-assignments", "type-inference/local-type-inference", "type-inference/smart-casts/smart-cast-types", "type-system/subtyping/subtyping-for-nullable-types", "type-system/type-kinds/type-parameters"); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true, "annotations", "built-in-types-and-their-semantics", "control--and-data-flow-analysis.control-flow-graph.expressions-1.conditional-expressions", "control--and-data-flow-analysis/performing-analysis-on-the-control-flow-graph", "declarations/classifier-declaration/class-declaration/nested-and-inner-classifiers", "declarations/classifier-declaration/classifier-initialization", "declarations/classifier-declaration/data-class-declaration", "declarations/function-declaration", "declarations/property-declaration/property-initialization", "declarations/type-alias", "expressions/call-and-property-access-expressions", "expressions/function-literals", "inheritance", "overload-resolution/c-level-partition", "overload-resolution/determining-function-applicability-for-a-specific-call/rationale", "overloadable-operators", "statements/assignments/simple-assignments", "type-inference/local-type-inference", "type-inference/smart-casts/smart-cast-types", "type-system/subtyping/subtyping-for-nullable-types", "type-system/type-kinds/type-parameters"); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/control--and-data-flow-analysis") @@ -49,7 +50,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInControl__and_data_flow_analysis() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/control--and-data-flow-analysis"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true, "performing-analysis-on-the-control-flow-graph"); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/control--and-data-flow-analysis"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true, "performing-analysis-on-the-control-flow-graph"); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/control--and-data-flow-analysis/control-flow-graph") @@ -61,7 +62,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInControl_flow_graph() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/control--and-data-flow-analysis/control-flow-graph"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/control--and-data-flow-analysis/control-flow-graph"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/control--and-data-flow-analysis/control-flow-graph/expressions-1") @@ -73,7 +74,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInExpressions_1() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/control--and-data-flow-analysis/control-flow-graph/expressions-1"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/control--and-data-flow-analysis/control-flow-graph/expressions-1"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/control--and-data-flow-analysis/control-flow-graph/expressions-1/conditional-expressions") @@ -85,7 +86,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInConditional_expressions() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/control--and-data-flow-analysis/control-flow-graph/expressions-1/conditional-expressions"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/control--and-data-flow-analysis/control-flow-graph/expressions-1/conditional-expressions"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/control--and-data-flow-analysis/control-flow-graph/expressions-1/conditional-expressions/p-1") @@ -97,7 +98,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInP_1() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/control--and-data-flow-analysis/control-flow-graph/expressions-1/conditional-expressions/p-1"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/control--and-data-flow-analysis/control-flow-graph/expressions-1/conditional-expressions/p-1"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/control--and-data-flow-analysis/control-flow-graph/expressions-1/conditional-expressions/p-1/neg") @@ -134,7 +135,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInNeg() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/control--and-data-flow-analysis/control-flow-graph/expressions-1/conditional-expressions/p-1/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/control--and-data-flow-analysis/control-flow-graph/expressions-1/conditional-expressions/p-1/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } @@ -162,7 +163,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/control--and-data-flow-analysis/control-flow-graph/expressions-1/conditional-expressions/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/control--and-data-flow-analysis/control-flow-graph/expressions-1/conditional-expressions/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -180,7 +181,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInDeclarations() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/declarations"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true, "classifier-declaration/class-declaration/nested-and-inner-classifiers", "classifier-declaration/classifier-initialization", "classifier-declaration/data-class-declaration", "function-declaration", "property-declaration/property-initialization", "type-alias"); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/declarations"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true, "classifier-declaration/class-declaration/nested-and-inner-classifiers", "classifier-declaration/classifier-initialization", "classifier-declaration/data-class-declaration", "function-declaration", "property-declaration/property-initialization", "type-alias"); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/declarations/classifier-declaration") @@ -192,7 +193,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInClassifier_declaration() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/declarations/classifier-declaration"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true, "class-declaration/nested-and-inner-classifiers", "classifier-initialization", "data-class-declaration"); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/declarations/classifier-declaration"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true, "class-declaration/nested-and-inner-classifiers", "classifier-initialization", "data-class-declaration"); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/declarations/classifier-declaration/class-declaration") @@ -204,7 +205,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInClass_declaration() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/declarations/classifier-declaration/class-declaration"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true, "nested-and-inner-classifiers"); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/declarations/classifier-declaration/class-declaration"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true, "nested-and-inner-classifiers"); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/declarations/classifier-declaration/class-declaration/abstract-classes") @@ -216,7 +217,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInAbstract_classes() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/declarations/classifier-declaration/class-declaration/abstract-classes"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/declarations/classifier-declaration/class-declaration/abstract-classes"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/declarations/classifier-declaration/class-declaration/abstract-classes/p-1") @@ -228,7 +229,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInP_1() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/declarations/classifier-declaration/class-declaration/abstract-classes/p-1"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/declarations/classifier-declaration/class-declaration/abstract-classes/p-1"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/declarations/classifier-declaration/class-declaration/abstract-classes/p-1/neg") @@ -250,7 +251,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInNeg() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/declarations/classifier-declaration/class-declaration/abstract-classes/p-1/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/declarations/classifier-declaration/class-declaration/abstract-classes/p-1/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } @@ -268,7 +269,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/declarations/classifier-declaration/class-declaration/abstract-classes/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/declarations/classifier-declaration/class-declaration/abstract-classes/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -282,7 +283,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInP_2() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/declarations/classifier-declaration/class-declaration/abstract-classes/p-2"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/declarations/classifier-declaration/class-declaration/abstract-classes/p-2"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/declarations/classifier-declaration/class-declaration/abstract-classes/p-2/neg") @@ -344,7 +345,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInNeg() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/declarations/classifier-declaration/class-declaration/abstract-classes/p-2/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/declarations/classifier-declaration/class-declaration/abstract-classes/p-2/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } @@ -377,7 +378,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/declarations/classifier-declaration/class-declaration/abstract-classes/p-2/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/declarations/classifier-declaration/class-declaration/abstract-classes/p-2/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -392,7 +393,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInConstructor_declaration() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/declarations/classifier-declaration/class-declaration/constructor-declaration"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/declarations/classifier-declaration/class-declaration/constructor-declaration"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/declarations/classifier-declaration/class-declaration/constructor-declaration/p-4") @@ -404,7 +405,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInP_4() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/declarations/classifier-declaration/class-declaration/constructor-declaration/p-4"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/declarations/classifier-declaration/class-declaration/constructor-declaration/p-4"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/declarations/classifier-declaration/class-declaration/constructor-declaration/p-4/pos") @@ -421,7 +422,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/declarations/classifier-declaration/class-declaration/constructor-declaration/p-4/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/declarations/classifier-declaration/class-declaration/constructor-declaration/p-4/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -435,7 +436,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInP_5() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/declarations/classifier-declaration/class-declaration/constructor-declaration/p-5"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/declarations/classifier-declaration/class-declaration/constructor-declaration/p-5"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/declarations/classifier-declaration/class-declaration/constructor-declaration/p-5/neg") @@ -467,7 +468,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInNeg() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/declarations/classifier-declaration/class-declaration/constructor-declaration/p-5/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/declarations/classifier-declaration/class-declaration/constructor-declaration/p-5/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } @@ -545,7 +546,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/declarations/classifier-declaration/class-declaration/constructor-declaration/p-5/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/declarations/classifier-declaration/class-declaration/constructor-declaration/p-5/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -562,7 +563,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInProperty_declaration() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/declarations/property-declaration"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true, "property-initialization"); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/declarations/property-declaration"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true, "property-initialization"); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/declarations/property-declaration/local-property-declaration") @@ -574,7 +575,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInLocal_property_declaration() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/declarations/property-declaration/local-property-declaration"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/declarations/property-declaration/local-property-declaration"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/declarations/property-declaration/local-property-declaration/p-1") @@ -586,7 +587,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInP_1() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/declarations/property-declaration/local-property-declaration/p-1"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/declarations/property-declaration/local-property-declaration/p-1"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/declarations/property-declaration/local-property-declaration/p-1/neg") @@ -603,7 +604,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInNeg() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/declarations/property-declaration/local-property-declaration/p-1/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/declarations/property-declaration/local-property-declaration/p-1/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -620,7 +621,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInExpressions() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true, "call-and-property-access-expressions", "function-literals"); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true, "call-and-property-access-expressions", "function-literals"); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/additive-expression") @@ -632,7 +633,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInAdditive_expression() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/additive-expression"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/additive-expression"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/additive-expression/p-4") @@ -644,7 +645,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInP_4() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/additive-expression/p-4"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/additive-expression/p-4"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/additive-expression/p-4/pos") @@ -661,7 +662,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/additive-expression/p-4/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/additive-expression/p-4/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -676,7 +677,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInBuilt_in_types_and_their_semantics() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/built-in-types-and-their-semantics"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/built-in-types-and-their-semantics"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/built-in-types-and-their-semantics/kotlin.nothing-1") @@ -688,7 +689,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInKotlin_nothing_1() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/built-in-types-and-their-semantics/kotlin.nothing-1"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/built-in-types-and-their-semantics/kotlin.nothing-1"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/built-in-types-and-their-semantics/kotlin.nothing-1/p-1") @@ -700,7 +701,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInP_1() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/built-in-types-and-their-semantics/kotlin.nothing-1/p-1"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/built-in-types-and-their-semantics/kotlin.nothing-1/p-1"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/built-in-types-and-their-semantics/kotlin.nothing-1/p-1/pos") @@ -717,7 +718,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/built-in-types-and-their-semantics/kotlin.nothing-1/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/built-in-types-and-their-semantics/kotlin.nothing-1/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -732,7 +733,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInKotlin_unit() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/built-in-types-and-their-semantics/kotlin.unit"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/built-in-types-and-their-semantics/kotlin.unit"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/built-in-types-and-their-semantics/kotlin.unit/p-1") @@ -744,7 +745,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInP_1() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/built-in-types-and-their-semantics/kotlin.unit/p-1"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/built-in-types-and-their-semantics/kotlin.unit/p-1"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/built-in-types-and-their-semantics/kotlin.unit/p-1/pos") @@ -761,7 +762,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/built-in-types-and-their-semantics/kotlin.unit/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/built-in-types-and-their-semantics/kotlin.unit/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -777,7 +778,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInComparison_expressions() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/comparison-expressions"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/comparison-expressions"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/comparison-expressions/p-1") @@ -789,7 +790,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInP_1() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/comparison-expressions/p-1"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/comparison-expressions/p-1"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/comparison-expressions/p-1/neg") @@ -806,7 +807,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInNeg() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/comparison-expressions/p-1/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/comparison-expressions/p-1/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -820,7 +821,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInP_4() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/comparison-expressions/p-4"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/comparison-expressions/p-4"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/comparison-expressions/p-4/neg") @@ -837,7 +838,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInNeg() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/comparison-expressions/p-4/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/comparison-expressions/p-4/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -851,7 +852,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInP_5() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/comparison-expressions/p-5"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/comparison-expressions/p-5"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/comparison-expressions/p-5/pos") @@ -868,7 +869,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/comparison-expressions/p-5/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/comparison-expressions/p-5/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -883,7 +884,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInConditional_expression() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/conditional-expression"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/conditional-expression"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/conditional-expression/p-6") @@ -895,7 +896,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInP_6() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/conditional-expression/p-6"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/conditional-expression/p-6"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/conditional-expression/p-6/neg") @@ -912,7 +913,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInNeg() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/conditional-expression/p-6/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/conditional-expression/p-6/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } @@ -930,7 +931,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/conditional-expression/p-6/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/conditional-expression/p-6/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -945,7 +946,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInConstant_literals() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/boolean-literals") @@ -957,7 +958,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInBoolean_literals() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/boolean-literals"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/boolean-literals"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/boolean-literals/p-1") @@ -969,7 +970,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInP_1() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/boolean-literals/p-1"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/boolean-literals/p-1"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/boolean-literals/p-1/neg") @@ -991,7 +992,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInNeg() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/boolean-literals/p-1/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/boolean-literals/p-1/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } @@ -1019,7 +1020,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/boolean-literals/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/boolean-literals/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -1034,7 +1035,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInCharacter_literals() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/character-literals"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/character-literals"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/character-literals/p-1") @@ -1046,7 +1047,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInP_1() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/character-literals/p-1"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/character-literals/p-1"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/character-literals/p-1/neg") @@ -1063,7 +1064,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInNeg() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/character-literals/p-1/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/character-literals/p-1/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } @@ -1081,7 +1082,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/character-literals/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/character-literals/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -1095,7 +1096,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInP_4() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/character-literals/p-4"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/character-literals/p-4"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/character-literals/p-4/neg") @@ -1112,7 +1113,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInNeg() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/character-literals/p-4/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/character-literals/p-4/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } @@ -1135,7 +1136,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/character-literals/p-4/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/character-literals/p-4/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -1150,7 +1151,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInInteger_literals() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/binary-integer-literals") @@ -1162,7 +1163,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInBinary_integer_literals() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/binary-integer-literals"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/binary-integer-literals"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/binary-integer-literals/p-1") @@ -1174,7 +1175,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInP_1() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/binary-integer-literals/p-1"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/binary-integer-literals/p-1"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/binary-integer-literals/p-1/neg") @@ -1206,7 +1207,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInNeg() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/binary-integer-literals/p-1/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/binary-integer-literals/p-1/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -1221,7 +1222,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInDecimal_integer_literals() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/decimal-integer-literals"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/decimal-integer-literals"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/decimal-integer-literals/p-1") @@ -1233,7 +1234,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInP_1() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/decimal-integer-literals/p-1"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/decimal-integer-literals/p-1"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/decimal-integer-literals/p-1/neg") @@ -1260,7 +1261,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInNeg() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/decimal-integer-literals/p-1/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/decimal-integer-literals/p-1/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -1275,7 +1276,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInHexadecimal_integer_literals() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/hexadecimal-integer-literals"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/hexadecimal-integer-literals"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/hexadecimal-integer-literals/p-1") @@ -1287,7 +1288,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInP_1() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/hexadecimal-integer-literals/p-1"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/hexadecimal-integer-literals/p-1"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/neg") @@ -1324,7 +1325,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInNeg() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -1340,7 +1341,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInReal_literals() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-1") @@ -1352,7 +1353,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInP_1() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-1"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-1"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-1/neg") @@ -1374,7 +1375,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInNeg() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-1/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-1/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } @@ -1407,7 +1408,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -1421,7 +1422,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInP_2() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-2"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-2"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-2/neg") @@ -1453,7 +1454,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInNeg() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-2/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-2/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } @@ -1476,7 +1477,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-2/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-2/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -1490,7 +1491,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInP_3() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-3"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-3"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-3/neg") @@ -1517,7 +1518,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInNeg() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-3/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-3/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } @@ -1570,7 +1571,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-3/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-3/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -1584,7 +1585,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInP_4() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-4"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-4"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-4/neg") @@ -1621,7 +1622,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInNeg() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-4/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-4/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } @@ -1659,7 +1660,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-4/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-4/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -1673,7 +1674,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInP_5() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-5"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-5"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-5/pos") @@ -1710,7 +1711,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-5/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-5/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -1725,7 +1726,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInThe_types_for_integer_literals() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/the-types-for-integer-literals"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/the-types-for-integer-literals"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/the-types-for-integer-literals/p-1") @@ -1737,7 +1738,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInP_1() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/the-types-for-integer-literals/p-1"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/the-types-for-integer-literals/p-1"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/the-types-for-integer-literals/p-1/neg") @@ -1789,7 +1790,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInNeg() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/the-types-for-integer-literals/p-1/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/the-types-for-integer-literals/p-1/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } @@ -1827,7 +1828,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/the-types-for-integer-literals/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/the-types-for-integer-literals/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -1843,7 +1844,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInElvis_operator_expression() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/elvis-operator-expression"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/elvis-operator-expression"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/elvis-operator-expression/p-3") @@ -1855,7 +1856,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInP_3() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/elvis-operator-expression/p-3"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/elvis-operator-expression/p-3"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/elvis-operator-expression/p-3/pos") @@ -1872,7 +1873,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/elvis-operator-expression/p-3/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/elvis-operator-expression/p-3/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -1887,7 +1888,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInEquality_expressions() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/equality-expressions"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/equality-expressions"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/equality-expressions/value-equality-expressions") @@ -1899,7 +1900,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInValue_equality_expressions() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/equality-expressions/value-equality-expressions"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/equality-expressions/value-equality-expressions"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/equality-expressions/value-equality-expressions/p-3") @@ -1911,7 +1912,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInP_3() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/equality-expressions/value-equality-expressions/p-3"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/equality-expressions/value-equality-expressions/p-3"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/equality-expressions/value-equality-expressions/p-3/pos") @@ -1928,7 +1929,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/equality-expressions/value-equality-expressions/p-3/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/equality-expressions/value-equality-expressions/p-3/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -1944,7 +1945,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInJump_expressions() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/jump-expressions"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/jump-expressions"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/jump-expressions/break-expression") @@ -1956,7 +1957,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInBreak_expression() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/jump-expressions/break-expression"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/jump-expressions/break-expression"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/jump-expressions/break-expression/p-1") @@ -1968,7 +1969,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInP_1() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/jump-expressions/break-expression/p-1"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/jump-expressions/break-expression/p-1"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/jump-expressions/break-expression/p-1/neg") @@ -1985,7 +1986,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInNeg() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/jump-expressions/break-expression/p-1/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/jump-expressions/break-expression/p-1/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -2000,7 +2001,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInContinue_expression() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/jump-expressions/continue-expression"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/jump-expressions/continue-expression"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/jump-expressions/continue-expression/p-1") @@ -2012,7 +2013,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInP_1() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/jump-expressions/continue-expression/p-1"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/jump-expressions/continue-expression/p-1"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/jump-expressions/continue-expression/p-1/neg") @@ -2029,7 +2030,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInNeg() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/jump-expressions/continue-expression/p-1/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/jump-expressions/continue-expression/p-1/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -2044,7 +2045,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInP_2() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/jump-expressions/p-2"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/jump-expressions/p-2"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/jump-expressions/p-2/pos") @@ -2061,7 +2062,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/jump-expressions/p-2/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/jump-expressions/p-2/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -2075,7 +2076,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInReturn_expressions() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/jump-expressions/return-expressions"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/jump-expressions/return-expressions"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/jump-expressions/return-expressions/p-1") @@ -2087,7 +2088,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInP_1() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/jump-expressions/return-expressions/p-1"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/jump-expressions/return-expressions/p-1"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/jump-expressions/return-expressions/p-1/pos") @@ -2104,7 +2105,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/jump-expressions/return-expressions/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/jump-expressions/return-expressions/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -2118,7 +2119,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInP_4() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/jump-expressions/return-expressions/p-4"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/jump-expressions/return-expressions/p-4"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/jump-expressions/return-expressions/p-4/neg") @@ -2135,7 +2136,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInNeg() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/jump-expressions/return-expressions/p-4/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/jump-expressions/return-expressions/p-4/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -2151,7 +2152,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInLogical_conjunction_expression() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/logical-conjunction-expression"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/logical-conjunction-expression"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/logical-conjunction-expression/p-2") @@ -2163,7 +2164,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInP_2() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/logical-conjunction-expression/p-2"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/logical-conjunction-expression/p-2"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/logical-conjunction-expression/p-2/neg") @@ -2180,7 +2181,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInNeg() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/logical-conjunction-expression/p-2/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/logical-conjunction-expression/p-2/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } @@ -2198,7 +2199,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/logical-conjunction-expression/p-2/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/logical-conjunction-expression/p-2/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -2213,7 +2214,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInLogical_disjunction_expression() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/logical-disjunction-expression"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/logical-disjunction-expression"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/logical-disjunction-expression/p-2") @@ -2225,7 +2226,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInP_2() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/logical-disjunction-expression/p-2"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/logical-disjunction-expression/p-2"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/logical-disjunction-expression/p-2/neg") @@ -2242,7 +2243,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInNeg() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/logical-disjunction-expression/p-2/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/logical-disjunction-expression/p-2/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } @@ -2260,7 +2261,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/logical-disjunction-expression/p-2/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/logical-disjunction-expression/p-2/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -2275,7 +2276,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInMultiplicative_expression() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/multiplicative-expression"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/multiplicative-expression"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/multiplicative-expression/p-5") @@ -2287,7 +2288,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInP_5() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/multiplicative-expression/p-5"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/multiplicative-expression/p-5"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/multiplicative-expression/p-5/pos") @@ -2304,7 +2305,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/multiplicative-expression/p-5/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/multiplicative-expression/p-5/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -2319,7 +2320,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInNot_null_assertion_expression() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/not-null-assertion-expression"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/not-null-assertion-expression"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/not-null-assertion-expression/p-2") @@ -2331,7 +2332,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInP_2() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/not-null-assertion-expression/p-2"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/not-null-assertion-expression/p-2"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/not-null-assertion-expression/p-2/pos") @@ -2348,7 +2349,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/not-null-assertion-expression/p-2/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/not-null-assertion-expression/p-2/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -2362,7 +2363,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInP_3() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/not-null-assertion-expression/p-3"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/not-null-assertion-expression/p-3"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/not-null-assertion-expression/p-3/pos") @@ -2379,7 +2380,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/not-null-assertion-expression/p-3/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/not-null-assertion-expression/p-3/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -2394,7 +2395,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInPrefix_expressions() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/prefix-expressions"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/prefix-expressions"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/prefix-expressions/logical-not-expression") @@ -2406,7 +2407,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInLogical_not_expression() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/prefix-expressions/logical-not-expression"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/prefix-expressions/logical-not-expression"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/prefix-expressions/logical-not-expression/p-3") @@ -2418,7 +2419,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInP_3() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/prefix-expressions/logical-not-expression/p-3"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/prefix-expressions/logical-not-expression/p-3"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/prefix-expressions/logical-not-expression/p-3/pos") @@ -2435,7 +2436,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/prefix-expressions/logical-not-expression/p-3/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/prefix-expressions/logical-not-expression/p-3/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -2450,7 +2451,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInPrefix_decrement_expression() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/prefix-expressions/prefix-decrement-expression"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/prefix-expressions/prefix-decrement-expression"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/prefix-expressions/prefix-decrement-expression/p-4") @@ -2462,7 +2463,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInP_4() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/prefix-expressions/prefix-decrement-expression/p-4"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/prefix-expressions/prefix-decrement-expression/p-4"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/prefix-expressions/prefix-decrement-expression/p-4/neg") @@ -2479,7 +2480,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInNeg() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/prefix-expressions/prefix-decrement-expression/p-4/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/prefix-expressions/prefix-decrement-expression/p-4/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -2493,7 +2494,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInP_5() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/prefix-expressions/prefix-decrement-expression/p-5"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/prefix-expressions/prefix-decrement-expression/p-5"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/prefix-expressions/prefix-decrement-expression/p-5/neg") @@ -2510,7 +2511,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInNeg() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/prefix-expressions/prefix-decrement-expression/p-5/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/prefix-expressions/prefix-decrement-expression/p-5/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -2525,7 +2526,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInPrefix_increment_expression() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/prefix-expressions/prefix-increment-expression"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/prefix-expressions/prefix-increment-expression"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/prefix-expressions/prefix-increment-expression/p-4") @@ -2537,7 +2538,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInP_4() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/prefix-expressions/prefix-increment-expression/p-4"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/prefix-expressions/prefix-increment-expression/p-4"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/prefix-expressions/prefix-increment-expression/p-4/neg") @@ -2554,7 +2555,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInNeg() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/prefix-expressions/prefix-increment-expression/p-4/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/prefix-expressions/prefix-increment-expression/p-4/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -2568,7 +2569,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInP_5() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/prefix-expressions/prefix-increment-expression/p-5"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/prefix-expressions/prefix-increment-expression/p-5"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/prefix-expressions/prefix-increment-expression/p-5/neg") @@ -2585,7 +2586,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInNeg() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/prefix-expressions/prefix-increment-expression/p-5/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/prefix-expressions/prefix-increment-expression/p-5/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -2600,7 +2601,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInUnary_minus_expression() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/prefix-expressions/unary-minus-expression"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/prefix-expressions/unary-minus-expression"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/prefix-expressions/unary-minus-expression/p-3") @@ -2612,7 +2613,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInP_3() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/prefix-expressions/unary-minus-expression/p-3"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/prefix-expressions/unary-minus-expression/p-3"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/prefix-expressions/unary-minus-expression/p-3/pos") @@ -2629,7 +2630,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/prefix-expressions/unary-minus-expression/p-3/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/prefix-expressions/unary-minus-expression/p-3/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -2644,7 +2645,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInUnary_plus_expression() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/prefix-expressions/unary-plus-expression"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/prefix-expressions/unary-plus-expression"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/prefix-expressions/unary-plus-expression/p-3") @@ -2656,7 +2657,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInP_3() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/prefix-expressions/unary-plus-expression/p-3"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/prefix-expressions/unary-plus-expression/p-3"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/prefix-expressions/unary-plus-expression/p-3/pos") @@ -2673,7 +2674,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/prefix-expressions/unary-plus-expression/p-3/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/prefix-expressions/unary-plus-expression/p-3/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -2689,7 +2690,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInRange_expression() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/range-expression"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/range-expression"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/range-expression/p-4") @@ -2701,7 +2702,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInP_4() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/range-expression/p-4"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/range-expression/p-4"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/range-expression/p-4/pos") @@ -2718,7 +2719,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/range-expression/p-4/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/range-expression/p-4/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -2733,7 +2734,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInTry_expression() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/try-expression"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/try-expression"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/try-expression/p-1") @@ -2745,7 +2746,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInP_1() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/try-expression/p-1"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/try-expression/p-1"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/try-expression/p-1/neg") @@ -2777,7 +2778,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInNeg() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/try-expression/p-1/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/try-expression/p-1/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } @@ -2815,7 +2816,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/try-expression/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/try-expression/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -2829,7 +2830,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInP_2() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/try-expression/p-2"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/try-expression/p-2"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/try-expression/p-2/pos") @@ -2846,7 +2847,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/try-expression/p-2/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/try-expression/p-2/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -2860,7 +2861,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInP_5() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/try-expression/p-5"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/try-expression/p-5"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/try-expression/p-5/pos") @@ -2882,7 +2883,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/try-expression/p-5/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/try-expression/p-5/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -2896,7 +2897,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInP_8() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/try-expression/p-8"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/try-expression/p-8"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/try-expression/p-8/neg") @@ -2913,7 +2914,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInNeg() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/try-expression/p-8/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/try-expression/p-8/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } @@ -2931,7 +2932,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/try-expression/p-8/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/try-expression/p-8/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -2946,7 +2947,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInType_checking_and_containment_checking_expressions() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/type-checking-and-containment-checking-expressions"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/type-checking-and-containment-checking-expressions"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/type-checking-and-containment-checking-expressions/containment-checking-expression") @@ -2958,7 +2959,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInContainment_checking_expression() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/type-checking-and-containment-checking-expressions/containment-checking-expression"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/type-checking-and-containment-checking-expressions/containment-checking-expression"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/type-checking-and-containment-checking-expressions/containment-checking-expression/p-5") @@ -2970,7 +2971,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInP_5() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/type-checking-and-containment-checking-expressions/containment-checking-expression/p-5"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/type-checking-and-containment-checking-expressions/containment-checking-expression/p-5"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/type-checking-and-containment-checking-expressions/containment-checking-expression/p-5/pos") @@ -2987,7 +2988,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/type-checking-and-containment-checking-expressions/containment-checking-expression/p-5/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/type-checking-and-containment-checking-expressions/containment-checking-expression/p-5/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -3002,7 +3003,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInType_checking_expression() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/type-checking-and-containment-checking-expressions/type-checking-expression"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/type-checking-and-containment-checking-expressions/type-checking-expression"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/type-checking-and-containment-checking-expressions/type-checking-expression/p-4") @@ -3014,7 +3015,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInP_4() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/type-checking-and-containment-checking-expressions/type-checking-expression/p-4"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/type-checking-and-containment-checking-expressions/type-checking-expression/p-4"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/type-checking-and-containment-checking-expressions/type-checking-expression/p-4/pos") @@ -3031,7 +3032,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/type-checking-and-containment-checking-expressions/type-checking-expression/p-4/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/type-checking-and-containment-checking-expressions/type-checking-expression/p-4/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -3047,7 +3048,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInWhen_expression() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions") @@ -3059,7 +3060,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInExhaustive_when_expressions() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2") @@ -3071,7 +3072,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInP_2() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg") @@ -3118,7 +3119,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInNeg() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } @@ -3176,7 +3177,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -3191,7 +3192,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInP_1() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-1"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-1"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-1/pos") @@ -3213,7 +3214,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -3227,7 +3228,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInP_2() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-2"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-2"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-2/neg") @@ -3249,7 +3250,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInNeg() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-2/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-2/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } @@ -3287,7 +3288,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-2/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-2/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -3301,7 +3302,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInP_3() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-3"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-3"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-3/neg") @@ -3318,7 +3319,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInNeg() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-3/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-3/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -3332,7 +3333,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInP_4() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-4"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-4"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-4/neg") @@ -3349,7 +3350,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInNeg() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-4/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-4/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } @@ -3367,7 +3368,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-4/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-4/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -3381,7 +3382,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInP_5() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-5"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-5"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-5/pos") @@ -3403,7 +3404,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-5/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-5/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -3417,7 +3418,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInP_6() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/neg") @@ -3459,7 +3460,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInNeg() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } @@ -3527,7 +3528,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -3543,7 +3544,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInOverload_resolution() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true, "c-level-partition", "determining-function-applicability-for-a-specific-call/rationale"); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true, "c-level-partition", "determining-function-applicability-for-a-specific-call/rationale"); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs") @@ -3555,7 +3556,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInBuilding_the_overload_candidate_set_ocs() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-with-an-explicit-receiver") @@ -3567,7 +3568,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInCall_with_an_explicit_receiver() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-with-an-explicit-receiver"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-with-an-explicit-receiver"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-with-an-explicit-receiver/call-with-an-explicit-type-receiver") @@ -3579,7 +3580,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInCall_with_an_explicit_type_receiver() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-with-an-explicit-receiver/call-with-an-explicit-type-receiver"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-with-an-explicit-receiver/call-with-an-explicit-type-receiver"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-with-an-explicit-receiver/call-with-an-explicit-type-receiver/p-3") @@ -3591,7 +3592,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInP_3() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-with-an-explicit-receiver/call-with-an-explicit-type-receiver/p-3"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-with-an-explicit-receiver/call-with-an-explicit-type-receiver/p-3"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-with-an-explicit-receiver/call-with-an-explicit-type-receiver/p-3/pos") @@ -3608,7 +3609,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-with-an-explicit-receiver/call-with-an-explicit-type-receiver/p-3/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-with-an-explicit-receiver/call-with-an-explicit-type-receiver/p-3/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -3623,7 +3624,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInP_6() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-with-an-explicit-receiver/p-6"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-with-an-explicit-receiver/p-6"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-with-an-explicit-receiver/p-6/pos") @@ -3715,7 +3716,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-with-an-explicit-receiver/p-6/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-with-an-explicit-receiver/p-6/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -3730,7 +3731,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInCall_with_named_parameters() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-with-named-parameters"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-with-named-parameters"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-with-named-parameters/p-1") @@ -3742,7 +3743,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInP_1() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-with-named-parameters/p-1"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-with-named-parameters/p-1"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-with-named-parameters/p-1/pos") @@ -3834,7 +3835,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-with-named-parameters/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-with-named-parameters/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -3848,7 +3849,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInP_5() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-with-named-parameters/p-5"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-with-named-parameters/p-5"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-with-named-parameters/p-5/pos") @@ -3860,7 +3861,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-with-named-parameters/p-5/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-with-named-parameters/p-5/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -3875,7 +3876,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInCall_with_specified_type_parameters() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-with-specified-type-parameters"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-with-specified-type-parameters"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-with-specified-type-parameters/p-2") @@ -3887,7 +3888,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInP_2() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-with-specified-type-parameters/p-2"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-with-specified-type-parameters/p-2"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-with-specified-type-parameters/p-2/pos") @@ -3904,7 +3905,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-with-specified-type-parameters/p-2/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-with-specified-type-parameters/p-2/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -3919,7 +3920,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInCall_with_trailing_lambda_expressions() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-with-trailing-lambda-expressions"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-with-trailing-lambda-expressions"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-with-trailing-lambda-expressions/p-1") @@ -3931,7 +3932,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInP_1() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-with-trailing-lambda-expressions/p-1"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-with-trailing-lambda-expressions/p-1"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-with-trailing-lambda-expressions/p-1/pos") @@ -4048,7 +4049,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-with-trailing-lambda-expressions/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-with-trailing-lambda-expressions/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -4063,7 +4064,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInCall_without_an_explicit_receiver() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-without-an-explicit-receiver"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-without-an-explicit-receiver"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-without-an-explicit-receiver/p-5") @@ -4075,7 +4076,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInP_5() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-without-an-explicit-receiver/p-5"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-without-an-explicit-receiver/p-5"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-without-an-explicit-receiver/p-5/neg") @@ -4122,7 +4123,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInNeg() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-without-an-explicit-receiver/p-5/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-without-an-explicit-receiver/p-5/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } @@ -4215,7 +4216,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-without-an-explicit-receiver/p-5/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-without-an-explicit-receiver/p-5/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -4230,7 +4231,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInInfix_function_call() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/infix-function-call"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/infix-function-call"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/infix-function-call/p-2") @@ -4242,7 +4243,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInP_2() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/infix-function-call/p-2"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/infix-function-call/p-2"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/infix-function-call/p-2/neg") @@ -4279,7 +4280,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInNeg() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/infix-function-call/p-2/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/infix-function-call/p-2/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } @@ -4317,7 +4318,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/infix-function-call/p-2/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/infix-function-call/p-2/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -4332,7 +4333,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInOperator_call() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1") @@ -4344,7 +4345,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInP_1() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/neg") @@ -4396,7 +4397,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInNeg() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } @@ -4419,7 +4420,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -4433,7 +4434,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInP_2() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-2"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-2"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-2/pos") @@ -4475,7 +4476,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-2/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-2/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -4489,7 +4490,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInP_4() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-4"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-4"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-4/neg") @@ -4506,7 +4507,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInNeg() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-4/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-4/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } @@ -4524,7 +4525,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-4/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-4/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -4540,7 +4541,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInCallables_and_invoke_convention() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/callables-and-invoke-convention"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/callables-and-invoke-convention"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/callables-and-invoke-convention/p-2") @@ -4552,7 +4553,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInP_2() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/callables-and-invoke-convention/p-2"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/callables-and-invoke-convention/p-2"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/callables-and-invoke-convention/p-2/pos") @@ -4579,7 +4580,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/callables-and-invoke-convention/p-2/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/callables-and-invoke-convention/p-2/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -4594,7 +4595,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInChoosing_the_most_specific_candidate_from_the_overload_candidate_set() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection") @@ -4606,7 +4607,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInAlgorithm_of_msc_selection() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-11") @@ -4618,7 +4619,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInP_11() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-11"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-11"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-11/pos") @@ -4670,7 +4671,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-11/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-11/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -4684,7 +4685,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInP_12() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-12"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-12"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-12/pos") @@ -4731,7 +4732,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-12/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-12/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -4745,7 +4746,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInP_14() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-14"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-14"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-14/neg") @@ -4792,7 +4793,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInNeg() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-14/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-14/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -4806,7 +4807,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInP_17() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-17"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-17"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-17/neg") @@ -4828,7 +4829,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInNeg() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-17/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-17/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -4842,7 +4843,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInP_3() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-3"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-3"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-3/pos") @@ -4874,7 +4875,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-3/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-3/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -4888,7 +4889,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInP_9() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-9"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-9"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-9/neg") @@ -4915,7 +4916,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInNeg() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-9/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-9/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } @@ -4933,7 +4934,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-9/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-9/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -4948,7 +4949,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInRationale_1() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/rationale-1"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/rationale-1"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/rationale-1/p-2") @@ -4960,7 +4961,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInP_2() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/rationale-1/p-2"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/rationale-1/p-2"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/rationale-1/p-2/pos") @@ -4977,7 +4978,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/rationale-1/p-2/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/rationale-1/p-2/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -4991,7 +4992,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInP_3() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/rationale-1/p-3"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/rationale-1/p-3"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/rationale-1/p-3/neg") @@ -5008,7 +5009,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInNeg() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/rationale-1/p-3/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/rationale-1/p-3/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -5024,7 +5025,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInDetermining_function_applicability_for_a_specific_call() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/determining-function-applicability-for-a-specific-call"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true, "rationale"); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/determining-function-applicability-for-a-specific-call"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true, "rationale"); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/determining-function-applicability-for-a-specific-call/description") @@ -5036,7 +5037,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInDescription() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/determining-function-applicability-for-a-specific-call/description"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/determining-function-applicability-for-a-specific-call/description"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/determining-function-applicability-for-a-specific-call/description/p-2") @@ -5048,7 +5049,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInP_2() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/determining-function-applicability-for-a-specific-call/description/p-2"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/determining-function-applicability-for-a-specific-call/description/p-2"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/determining-function-applicability-for-a-specific-call/description/p-2/neg") @@ -5065,7 +5066,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInNeg() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/determining-function-applicability-for-a-specific-call/description/p-2/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/determining-function-applicability-for-a-specific-call/description/p-2/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -5081,7 +5082,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInReceivers() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/receivers"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/receivers"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/receivers/p-5") @@ -5093,7 +5094,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInP_5() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/receivers/p-5"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/receivers/p-5"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/receivers/p-5/pos") @@ -5120,7 +5121,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/receivers/p-5/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/receivers/p-5/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -5135,7 +5136,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInResolving_callable_references() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/bidirectional-resolution-for-callable-calls") @@ -5147,7 +5148,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInBidirectional_resolution_for_callable_calls() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/bidirectional-resolution-for-callable-calls"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/bidirectional-resolution-for-callable-calls"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/bidirectional-resolution-for-callable-calls/p-1") @@ -5159,7 +5160,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInP_1() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/bidirectional-resolution-for-callable-calls/p-1"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/bidirectional-resolution-for-callable-calls/p-1"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/bidirectional-resolution-for-callable-calls/p-1/pos") @@ -5176,7 +5177,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/bidirectional-resolution-for-callable-calls/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/bidirectional-resolution-for-callable-calls/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -5190,7 +5191,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInP_3() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/bidirectional-resolution-for-callable-calls/p-3"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/bidirectional-resolution-for-callable-calls/p-3"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/bidirectional-resolution-for-callable-calls/p-3/neg") @@ -5207,7 +5208,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInNeg() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/bidirectional-resolution-for-callable-calls/p-3/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/bidirectional-resolution-for-callable-calls/p-3/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } @@ -5240,7 +5241,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/bidirectional-resolution-for-callable-calls/p-3/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/bidirectional-resolution-for-callable-calls/p-3/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -5255,7 +5256,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInP_2() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/p-2"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/p-2"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/p-2/pos") @@ -5272,7 +5273,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/p-2/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/p-2/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -5286,7 +5287,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInResolving_callable_references_not_used_as_arguments_to_a_call() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/resolving-callable-references-not-used-as-arguments-to-a-call"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/resolving-callable-references-not-used-as-arguments-to-a-call"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/resolving-callable-references-not-used-as-arguments-to-a-call/p-1") @@ -5298,7 +5299,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInP_1() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/resolving-callable-references-not-used-as-arguments-to-a-call/p-1"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/resolving-callable-references-not-used-as-arguments-to-a-call/p-1"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/resolving-callable-references-not-used-as-arguments-to-a-call/p-1/neg") @@ -5335,7 +5336,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInNeg() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/resolving-callable-references-not-used-as-arguments-to-a-call/p-1/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/resolving-callable-references-not-used-as-arguments-to-a-call/p-1/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } @@ -5363,7 +5364,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/resolving-callable-references-not-used-as-arguments-to-a-call/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/resolving-callable-references/resolving-callable-references-not-used-as-arguments-to-a-call/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -5380,7 +5381,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInStatements() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/statements"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true, "assignments/simple-assignments"); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/statements"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true, "assignments/simple-assignments"); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/statements/assignments") @@ -5392,7 +5393,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInAssignments() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/statements/assignments"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true, "simple-assignments"); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/statements/assignments"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true, "simple-assignments"); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/statements/assignments/operator-assignments") @@ -5404,7 +5405,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInOperator_assignments() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/statements/assignments/operator-assignments"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/statements/assignments/operator-assignments"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/statements/assignments/operator-assignments/p-2") @@ -5416,7 +5417,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInP_2() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/statements/assignments/operator-assignments/p-2"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/statements/assignments/operator-assignments/p-2"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/statements/assignments/operator-assignments/p-2/neg") @@ -5433,7 +5434,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInNeg() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/statements/assignments/operator-assignments/p-2/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/statements/assignments/operator-assignments/p-2/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } @@ -5451,7 +5452,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/statements/assignments/operator-assignments/p-2/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/statements/assignments/operator-assignments/p-2/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -5466,7 +5467,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInP_1() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/statements/assignments/p-1"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/statements/assignments/p-1"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/statements/assignments/p-1/neg") @@ -5483,7 +5484,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInNeg() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/statements/assignments/p-1/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/statements/assignments/p-1/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -5497,7 +5498,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInP_2() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/statements/assignments/p-2"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/statements/assignments/p-2"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/statements/assignments/p-2/neg") @@ -5519,7 +5520,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInNeg() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/statements/assignments/p-2/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/statements/assignments/p-2/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -5534,7 +5535,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInLoop_statements() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/statements/loop-statements"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/statements/loop-statements"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/statements/loop-statements/do-while-loop-statement") @@ -5546,7 +5547,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInDo_while_loop_statement() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/statements/loop-statements/do-while-loop-statement"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/statements/loop-statements/do-while-loop-statement"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/statements/loop-statements/do-while-loop-statement/p-1") @@ -5558,7 +5559,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInP_1() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/statements/loop-statements/do-while-loop-statement/p-1"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/statements/loop-statements/do-while-loop-statement/p-1"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/statements/loop-statements/do-while-loop-statement/p-1/pos") @@ -5575,7 +5576,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/statements/loop-statements/do-while-loop-statement/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/statements/loop-statements/do-while-loop-statement/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -5589,7 +5590,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInP_3() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/statements/loop-statements/do-while-loop-statement/p-3"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/statements/loop-statements/do-while-loop-statement/p-3"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/statements/loop-statements/do-while-loop-statement/p-3/neg") @@ -5606,7 +5607,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInNeg() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/statements/loop-statements/do-while-loop-statement/p-3/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/statements/loop-statements/do-while-loop-statement/p-3/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -5621,7 +5622,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInWhile_loop_statement() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/statements/loop-statements/while-loop-statement"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/statements/loop-statements/while-loop-statement"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/statements/loop-statements/while-loop-statement/p-1") @@ -5633,7 +5634,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInP_1() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/statements/loop-statements/while-loop-statement/p-1"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/statements/loop-statements/while-loop-statement/p-1"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/statements/loop-statements/while-loop-statement/p-1/pos") @@ -5650,7 +5651,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/statements/loop-statements/while-loop-statement/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/statements/loop-statements/while-loop-statement/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -5664,7 +5665,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInP_3() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/statements/loop-statements/while-loop-statement/p-3"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/statements/loop-statements/while-loop-statement/p-3"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/statements/loop-statements/while-loop-statement/p-3/neg") @@ -5681,7 +5682,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInNeg() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/statements/loop-statements/while-loop-statement/p-3/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/statements/loop-statements/while-loop-statement/p-3/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -5698,7 +5699,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInType_inference() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-inference"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true, "local-type-inference", "smart-casts/smart-cast-types"); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-inference"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true, "local-type-inference", "smart-casts/smart-cast-types"); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/type-inference/smart-casts") @@ -5710,7 +5711,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInSmart_casts() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-inference/smart-casts"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true, "smart-cast-types"); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-inference/smart-casts"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true, "smart-cast-types"); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/type-inference/smart-casts/smart-cast-sink-stability") @@ -5722,7 +5723,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInSmart_cast_sink_stability() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-inference/smart-casts/smart-cast-sink-stability"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-inference/smart-casts/smart-cast-sink-stability"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/type-inference/smart-casts/smart-cast-sink-stability/p-5") @@ -5734,7 +5735,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInP_5() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-inference/smart-casts/smart-cast-sink-stability/p-5"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-inference/smart-casts/smart-cast-sink-stability/p-5"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/type-inference/smart-casts/smart-cast-sink-stability/p-5/neg") @@ -5751,7 +5752,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInNeg() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-inference/smart-casts/smart-cast-sink-stability/p-5/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-inference/smart-casts/smart-cast-sink-stability/p-5/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } @@ -5769,7 +5770,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-inference/smart-casts/smart-cast-sink-stability/p-5/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-inference/smart-casts/smart-cast-sink-stability/p-5/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -5786,7 +5787,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInType_system() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-system"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true, "subtyping/subtyping-for-nullable-types", "type-kinds/type-parameters"); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-system"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true, "subtyping/subtyping-for-nullable-types", "type-kinds/type-parameters"); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/type-system/introduction-1") @@ -5798,7 +5799,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInIntroduction_1() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-system/introduction-1"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-system/introduction-1"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/type-system/introduction-1/p-6") @@ -5810,7 +5811,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInP_6() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-system/introduction-1/p-6"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-system/introduction-1/p-6"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/type-system/introduction-1/p-6/neg") @@ -5837,7 +5838,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInNeg() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-system/introduction-1/p-6/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-system/introduction-1/p-6/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -5851,7 +5852,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInP_8() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-system/introduction-1/p-8"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-system/introduction-1/p-8"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/type-system/introduction-1/p-8/pos") @@ -5873,7 +5874,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-system/introduction-1/p-8/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-system/introduction-1/p-8/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -5888,7 +5889,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInSubtyping() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-system/subtyping"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true, "subtyping-for-nullable-types"); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-system/subtyping"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true, "subtyping-for-nullable-types"); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/type-system/subtyping/subtyping-for-intersection-types") @@ -5900,7 +5901,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInSubtyping_for_intersection_types() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-system/subtyping/subtyping-for-intersection-types"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-system/subtyping/subtyping-for-intersection-types"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/type-system/subtyping/subtyping-for-intersection-types/p-1") @@ -5912,7 +5913,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInP_1() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-system/subtyping/subtyping-for-intersection-types/p-1"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-system/subtyping/subtyping-for-intersection-types/p-1"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/type-system/subtyping/subtyping-for-intersection-types/p-1/pos") @@ -5939,7 +5940,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-system/subtyping/subtyping-for-intersection-types/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-system/subtyping/subtyping-for-intersection-types/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -5954,7 +5955,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInSubtyping_rules() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-system/subtyping/subtyping-rules"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-system/subtyping/subtyping-rules"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/type-system/subtyping/subtyping-rules/p-2") @@ -5966,7 +5967,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInP_2() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-system/subtyping/subtyping-rules/p-2"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-system/subtyping/subtyping-rules/p-2"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/type-system/subtyping/subtyping-rules/p-2/pos") @@ -5983,7 +5984,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-system/subtyping/subtyping-rules/p-2/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-system/subtyping/subtyping-rules/p-2/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -5999,7 +6000,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInType_contexts_and_scopes() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes/inner-and-nested-type-contexts") @@ -6011,7 +6012,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInInner_and_nested_type_contexts() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes/inner-and-nested-type-contexts"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes/inner-and-nested-type-contexts"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes/inner-and-nested-type-contexts/p-1") @@ -6023,7 +6024,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInP_1() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes/inner-and-nested-type-contexts/p-1"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes/inner-and-nested-type-contexts/p-1"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes/inner-and-nested-type-contexts/p-1/neg") @@ -6050,7 +6051,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInNeg() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes/inner-and-nested-type-contexts/p-1/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes/inner-and-nested-type-contexts/p-1/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } @@ -6073,7 +6074,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes/inner-and-nested-type-contexts/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes/inner-and-nested-type-contexts/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -6089,7 +6090,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInType_kinds() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-system/type-kinds"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true, "type-parameters"); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-system/type-kinds"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true, "type-parameters"); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/type-system/type-kinds/built-in-types") @@ -6101,7 +6102,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInBuilt_in_types() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-system/type-kinds/built-in-types"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-system/type-kinds/built-in-types"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/type-system/type-kinds/built-in-types/kotlin.any") @@ -6113,7 +6114,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInKotlin_any() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-system/type-kinds/built-in-types/kotlin.any"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-system/type-kinds/built-in-types/kotlin.any"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/type-system/type-kinds/built-in-types/kotlin.any/p-1") @@ -6125,7 +6126,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInP_1() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-system/type-kinds/built-in-types/kotlin.any/p-1"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-system/type-kinds/built-in-types/kotlin.any/p-1"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/type-system/type-kinds/built-in-types/kotlin.any/p-1/pos") @@ -6147,7 +6148,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-system/type-kinds/built-in-types/kotlin.any/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-system/type-kinds/built-in-types/kotlin.any/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -6162,7 +6163,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInKotlin_nothing() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-system/type-kinds/built-in-types/kotlin.nothing"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-system/type-kinds/built-in-types/kotlin.nothing"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/type-system/type-kinds/built-in-types/kotlin.nothing/p-1") @@ -6174,7 +6175,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInP_1() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-system/type-kinds/built-in-types/kotlin.nothing/p-1"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-system/type-kinds/built-in-types/kotlin.nothing/p-1"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/type-system/type-kinds/built-in-types/kotlin.nothing/p-1/neg") @@ -6191,7 +6192,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInNeg() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-system/type-kinds/built-in-types/kotlin.nothing/p-1/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-system/type-kinds/built-in-types/kotlin.nothing/p-1/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } @@ -6214,7 +6215,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-system/type-kinds/built-in-types/kotlin.nothing/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-system/type-kinds/built-in-types/kotlin.nothing/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -6233,7 +6234,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInNotLinked() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/notLinked"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/notLinked"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/notLinked/annotations") @@ -6245,7 +6246,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInAnnotations() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/notLinked/annotations"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/notLinked/annotations"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/notLinked/annotations/annotation-classes") @@ -6257,7 +6258,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInAnnotation_classes() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/notLinked/annotations/annotation-classes"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/notLinked/annotations/annotation-classes"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/notLinked/annotations/annotation-classes/neg") @@ -6274,7 +6275,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInNeg() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/notLinked/annotations/annotation-classes/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/notLinked/annotations/annotation-classes/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -6288,7 +6289,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInType_annotations() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/notLinked/annotations/type-annotations"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/notLinked/annotations/type-annotations"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/notLinked/annotations/type-annotations/neg") @@ -6355,7 +6356,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInNeg() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/notLinked/annotations/type-annotations/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/notLinked/annotations/type-annotations/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -6370,7 +6371,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInCoercion_to_unit() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/notLinked/coercion-to-unit"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/notLinked/coercion-to-unit"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/notLinked/coercion-to-unit/neg") @@ -6387,7 +6388,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInNeg() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/notLinked/coercion-to-unit/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/notLinked/coercion-to-unit/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -6401,7 +6402,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInContracts() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/notLinked/contracts"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/notLinked/contracts"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis") @@ -6413,7 +6414,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInAnalysis() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/common") @@ -6425,7 +6426,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInCommon() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/common"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/common"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/common/neg") @@ -6442,7 +6443,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInNeg() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/common/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/common/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } @@ -6465,7 +6466,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/common/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/common/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -6479,7 +6480,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInControlFlow() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/controlFlow"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/controlFlow"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/controlFlow/initialization") @@ -6491,7 +6492,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInInitialization() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/controlFlow/initialization"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/controlFlow/initialization"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/controlFlow/initialization/neg") @@ -6528,7 +6529,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInNeg() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/controlFlow/initialization/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/controlFlow/initialization/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } @@ -6576,7 +6577,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/controlFlow/initialization/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/controlFlow/initialization/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -6590,7 +6591,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInUnreachableCode() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/controlFlow/unreachableCode"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/controlFlow/unreachableCode"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/controlFlow/unreachableCode/neg") @@ -6607,7 +6608,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInNeg() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/controlFlow/unreachableCode/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/controlFlow/unreachableCode/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } @@ -6655,7 +6656,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/controlFlow/unreachableCode/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/controlFlow/unreachableCode/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -6670,7 +6671,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInSmartcasts() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/smartcasts"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/smartcasts"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/smartcasts/neg") @@ -6757,7 +6758,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInNeg() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/smartcasts/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/smartcasts/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } @@ -6840,7 +6841,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/smartcasts/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/smartcasts/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -6855,7 +6856,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInDeclarations() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/notLinked/contracts/declarations"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/notLinked/contracts/declarations"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/notLinked/contracts/declarations/contractBuilder") @@ -6867,7 +6868,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInContractBuilder() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/notLinked/contracts/declarations/contractBuilder"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/notLinked/contracts/declarations/contractBuilder"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/notLinked/contracts/declarations/contractBuilder/common") @@ -6879,7 +6880,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInCommon() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/notLinked/contracts/declarations/contractBuilder/common"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/notLinked/contracts/declarations/contractBuilder/common"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/notLinked/contracts/declarations/contractBuilder/common/neg") @@ -6981,7 +6982,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInNeg() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/notLinked/contracts/declarations/contractBuilder/common/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/notLinked/contracts/declarations/contractBuilder/common/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } @@ -7004,7 +7005,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/notLinked/contracts/declarations/contractBuilder/common/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/notLinked/contracts/declarations/contractBuilder/common/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -7018,7 +7019,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInEffects() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/notLinked/contracts/declarations/contractBuilder/effects"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/notLinked/contracts/declarations/contractBuilder/effects"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/notLinked/contracts/declarations/contractBuilder/effects/callsInPlace") @@ -7030,7 +7031,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInCallsInPlace() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/notLinked/contracts/declarations/contractBuilder/effects/callsInPlace"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/notLinked/contracts/declarations/contractBuilder/effects/callsInPlace"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/notLinked/contracts/declarations/contractBuilder/effects/callsInPlace/neg") @@ -7052,7 +7053,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInNeg() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/notLinked/contracts/declarations/contractBuilder/effects/callsInPlace/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/notLinked/contracts/declarations/contractBuilder/effects/callsInPlace/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } @@ -7080,7 +7081,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/notLinked/contracts/declarations/contractBuilder/effects/callsInPlace/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/notLinked/contracts/declarations/contractBuilder/effects/callsInPlace/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -7094,7 +7095,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInCommon() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/notLinked/contracts/declarations/contractBuilder/effects/common"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/notLinked/contracts/declarations/contractBuilder/effects/common"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/notLinked/contracts/declarations/contractBuilder/effects/common/neg") @@ -7111,7 +7112,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInNeg() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/notLinked/contracts/declarations/contractBuilder/effects/common/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/notLinked/contracts/declarations/contractBuilder/effects/common/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -7125,7 +7126,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInReturns() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/notLinked/contracts/declarations/contractBuilder/effects/returns"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/notLinked/contracts/declarations/contractBuilder/effects/returns"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/notLinked/contracts/declarations/contractBuilder/effects/returns/neg") @@ -7172,7 +7173,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInNeg() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/notLinked/contracts/declarations/contractBuilder/effects/returns/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/notLinked/contracts/declarations/contractBuilder/effects/returns/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } @@ -7205,7 +7206,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/notLinked/contracts/declarations/contractBuilder/effects/returns/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/notLinked/contracts/declarations/contractBuilder/effects/returns/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -7221,7 +7222,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInContractFunction() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/notLinked/contracts/declarations/contractFunction"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/notLinked/contracts/declarations/contractFunction"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/notLinked/contracts/declarations/contractFunction/neg") @@ -7253,7 +7254,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInNeg() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/notLinked/contracts/declarations/contractFunction/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/notLinked/contracts/declarations/contractFunction/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } @@ -7276,7 +7277,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/notLinked/contracts/declarations/contractFunction/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/notLinked/contracts/declarations/contractFunction/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -7292,7 +7293,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInDfa() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/notLinked/dfa"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/notLinked/dfa"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/notLinked/dfa/neg") @@ -7529,7 +7530,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInNeg() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/notLinked/dfa/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/notLinked/dfa/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } @@ -7907,7 +7908,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -7921,7 +7922,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInLocal_variables() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/notLinked/local-variables"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/notLinked/local-variables"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/notLinked/local-variables/type-parameters") @@ -7933,7 +7934,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInType_parameters() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/notLinked/local-variables/type-parameters"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/notLinked/local-variables/type-parameters"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/notLinked/local-variables/type-parameters/neg") @@ -7950,7 +7951,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInNeg() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/notLinked/local-variables/type-parameters/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/notLinked/local-variables/type-parameters/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } @@ -7965,7 +7966,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInOverload_resolution() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/notLinked/overload-resolution"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/notLinked/overload-resolution"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/notLinked/overload-resolution/building-the-overload-candidate-set-ocs") @@ -7977,7 +7978,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInBuilding_the_overload_candidate_set_ocs() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/notLinked/overload-resolution/building-the-overload-candidate-set-ocs"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/notLinked/overload-resolution/building-the-overload-candidate-set-ocs"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/notLinked/overload-resolution/building-the-overload-candidate-set-ocs/infix-function-call") @@ -7989,7 +7990,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInInfix_function_call() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/notLinked/overload-resolution/building-the-overload-candidate-set-ocs/infix-function-call"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/notLinked/overload-resolution/building-the-overload-candidate-set-ocs/infix-function-call"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } @TestMetadata("compiler/tests-spec/testData/diagnostics/notLinked/overload-resolution/building-the-overload-candidate-set-ocs/infix-function-call/pos") @@ -8021,7 +8022,7 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/notLinked/overload-resolution/building-the-overload-candidate-set-ocs/infix-function-call/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/notLinked/overload-resolution/building-the-overload-candidate-set-ocs/infix-function-call/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); } } } diff --git a/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/codegen/BlackBoxCodegenTestSpecGenerated.java b/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/codegen/BlackBoxCodegenTestSpecGenerated.java index 41482ef7def..75443eab388 100644 --- a/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/codegen/BlackBoxCodegenTestSpecGenerated.java +++ b/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/codegen/BlackBoxCodegenTestSpecGenerated.java @@ -1,5 +1,5 @@ /* - * Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Copyright 2010-2021 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. */ @@ -8,6 +8,7 @@ package org.jetbrains.kotlin.spec.codegen; import com.intellij.testFramework.TestDataPath; import org.jetbrains.kotlin.test.JUnit3RunnerWithInners; import org.jetbrains.kotlin.test.KotlinTestUtils; +import org.jetbrains.kotlin.test.util.KtTestUtil; import org.jetbrains.kotlin.test.TestMetadata; import org.junit.runner.RunWith; @@ -25,7 +26,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInBox() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box"), Pattern.compile("^(.+)\\.kt$"), null, true, "helpers", "templates", "linked/exceptions", "linked/operator-call", "linked/overload-resolution/building-the-overload-candidate-set-ocs/call-with-an-explicit-receiver", "linked/overloadable-operators"); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box"), Pattern.compile("^(.+)\\.kt$"), null, true, "helpers", "templates", "linked/exceptions", "linked/operator-call", "linked/overload-resolution/building-the-overload-candidate-set-ocs/call-with-an-explicit-receiver", "linked/overloadable-operators"); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked") @@ -37,7 +38,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInLinked() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked"), Pattern.compile("^(.+)\\.kt$"), null, true, "exceptions", "operator-call", "overload-resolution/building-the-overload-candidate-set-ocs/call-with-an-explicit-receiver", "overloadable-operators"); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked"), Pattern.compile("^(.+)\\.kt$"), null, true, "exceptions", "operator-call", "overload-resolution/building-the-overload-candidate-set-ocs/call-with-an-explicit-receiver", "overloadable-operators"); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions") @@ -49,7 +50,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInExpressions() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/additive-expression") @@ -61,7 +62,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInAdditive_expression() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/additive-expression"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/additive-expression"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/additive-expression/p-2") @@ -73,7 +74,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInP_2() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/additive-expression/p-2"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/additive-expression/p-2"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/additive-expression/p-2/pos") @@ -95,7 +96,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/additive-expression/p-2/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/additive-expression/p-2/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); } } } @@ -110,7 +111,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInBuilt_in_types_and_their_semantics() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/built-in-types-and-their-semantics"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/built-in-types-and-their-semantics"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/built-in-types-and-their-semantics/kotlin.nothing-1") @@ -122,7 +123,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInKotlin_nothing_1() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/built-in-types-and-their-semantics/kotlin.nothing-1"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/built-in-types-and-their-semantics/kotlin.nothing-1"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/built-in-types-and-their-semantics/kotlin.nothing-1/p-1") @@ -134,7 +135,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInP_1() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/built-in-types-and-their-semantics/kotlin.nothing-1/p-1"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/built-in-types-and-their-semantics/kotlin.nothing-1/p-1"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/built-in-types-and-their-semantics/kotlin.nothing-1/p-1/pos") @@ -196,7 +197,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/built-in-types-and-their-semantics/kotlin.nothing-1/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/built-in-types-and-their-semantics/kotlin.nothing-1/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); } } } @@ -211,7 +212,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInKotlin_unit() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/built-in-types-and-their-semantics/kotlin.unit"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/built-in-types-and-their-semantics/kotlin.unit"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/built-in-types-and-their-semantics/kotlin.unit/p-1") @@ -223,7 +224,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInP_1() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/built-in-types-and-their-semantics/kotlin.unit/p-1"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/built-in-types-and-their-semantics/kotlin.unit/p-1"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/built-in-types-and-their-semantics/kotlin.unit/p-1/pos") @@ -240,7 +241,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/built-in-types-and-their-semantics/kotlin.unit/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/built-in-types-and-their-semantics/kotlin.unit/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); } } } @@ -256,7 +257,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInCast_expression() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/cast-expression"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/cast-expression"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/cast-expression/p-1") @@ -268,7 +269,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInP_1() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/cast-expression/p-1"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/cast-expression/p-1"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/cast-expression/p-1/pos") @@ -285,7 +286,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/cast-expression/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/cast-expression/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); } } } @@ -300,7 +301,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInComparison_expressions() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/comparison-expressions"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/comparison-expressions"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/comparison-expressions/p-1") @@ -312,7 +313,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInP_1() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/comparison-expressions/p-1"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/comparison-expressions/p-1"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/comparison-expressions/p-1/pos") @@ -344,7 +345,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/comparison-expressions/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/comparison-expressions/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); } } } @@ -359,7 +360,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInConditional_expression() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/conditional-expression"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/conditional-expression"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/conditional-expression/p-1") @@ -371,7 +372,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInP_1() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/conditional-expression/p-1"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/conditional-expression/p-1"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/conditional-expression/p-1/pos") @@ -423,7 +424,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/conditional-expression/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/conditional-expression/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); } } } @@ -437,7 +438,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInP_2() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/conditional-expression/p-2"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/conditional-expression/p-2"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/conditional-expression/p-2/pos") @@ -454,7 +455,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/conditional-expression/p-2/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/conditional-expression/p-2/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); } } } @@ -468,7 +469,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInP_6() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/conditional-expression/p-6"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/conditional-expression/p-6"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/conditional-expression/p-6/pos") @@ -485,7 +486,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/conditional-expression/p-6/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/conditional-expression/p-6/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); } } } @@ -500,7 +501,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInConstant_literals() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/boolean-literals") @@ -512,7 +513,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInBoolean_literals() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/boolean-literals"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/boolean-literals"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/boolean-literals/p-1") @@ -524,7 +525,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInP_1() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/boolean-literals/p-1"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/boolean-literals/p-1"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/boolean-literals/p-1/pos") @@ -666,7 +667,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/boolean-literals/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/boolean-literals/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); } } } @@ -681,7 +682,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInCharacter_literals() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/character-literals"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/character-literals"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/character-literals/p-4") @@ -693,7 +694,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInP_4() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/character-literals/p-4"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/character-literals/p-4"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/character-literals/p-4/pos") @@ -710,7 +711,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/character-literals/p-4/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/character-literals/p-4/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); } } } @@ -725,7 +726,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInInteger_literals() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/integer-literals"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/integer-literals"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/integer-literals/binary-integer-literals") @@ -737,7 +738,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInBinary_integer_literals() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/integer-literals/binary-integer-literals"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/integer-literals/binary-integer-literals"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/integer-literals/binary-integer-literals/p-1") @@ -749,7 +750,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInP_1() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/integer-literals/binary-integer-literals/p-1"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/integer-literals/binary-integer-literals/p-1"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/integer-literals/binary-integer-literals/p-1/pos") @@ -771,7 +772,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/integer-literals/binary-integer-literals/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/integer-literals/binary-integer-literals/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); } } } @@ -786,7 +787,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInDecimal_integer_literals() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/integer-literals/decimal-integer-literals"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/integer-literals/decimal-integer-literals"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/integer-literals/decimal-integer-literals/p-1") @@ -798,7 +799,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInP_1() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/integer-literals/decimal-integer-literals/p-1"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/integer-literals/decimal-integer-literals/p-1"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/integer-literals/decimal-integer-literals/p-1/pos") @@ -820,7 +821,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/integer-literals/decimal-integer-literals/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/integer-literals/decimal-integer-literals/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); } } } @@ -835,7 +836,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInHexadecimal_integer_literals() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/integer-literals/hexadecimal-integer-literals"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/integer-literals/hexadecimal-integer-literals"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/integer-literals/hexadecimal-integer-literals/p-1") @@ -847,7 +848,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInP_1() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/integer-literals/hexadecimal-integer-literals/p-1"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/integer-literals/hexadecimal-integer-literals/p-1"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/pos") @@ -869,7 +870,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); } } } @@ -885,7 +886,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInReal_literals() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/real-literals"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/real-literals"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/real-literals/p-1") @@ -897,7 +898,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInP_1() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/real-literals/p-1"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/real-literals/p-1"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/real-literals/p-1/pos") @@ -919,7 +920,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/real-literals/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/real-literals/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); } } } @@ -933,7 +934,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInP_2() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/real-literals/p-2"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/real-literals/p-2"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/real-literals/p-2/pos") @@ -955,7 +956,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/real-literals/p-2/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/real-literals/p-2/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); } } } @@ -969,7 +970,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInP_3() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/real-literals/p-3"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/real-literals/p-3"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/real-literals/p-3/pos") @@ -1016,7 +1017,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/real-literals/p-3/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/real-literals/p-3/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); } } } @@ -1030,7 +1031,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInP_4() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/real-literals/p-4"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/real-literals/p-4"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/real-literals/p-4/pos") @@ -1067,7 +1068,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/real-literals/p-4/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/real-literals/p-4/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); } } } @@ -1082,7 +1083,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInThe_types_for_integer_literals() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/the-types-for-integer-literals"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/the-types-for-integer-literals"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/the-types-for-integer-literals/p-1") @@ -1094,7 +1095,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInP_1() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/the-types-for-integer-literals/p-1"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/the-types-for-integer-literals/p-1"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/the-types-for-integer-literals/p-1/pos") @@ -1121,7 +1122,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/the-types-for-integer-literals/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/constant-literals/the-types-for-integer-literals/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); } } } @@ -1137,7 +1138,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInElvis_operator_expression() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/elvis-operator-expression"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/elvis-operator-expression"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/elvis-operator-expression/p-1") @@ -1149,7 +1150,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInP_1() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/elvis-operator-expression/p-1"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/elvis-operator-expression/p-1"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/elvis-operator-expression/p-1/pos") @@ -1166,7 +1167,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/elvis-operator-expression/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/elvis-operator-expression/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); } } } @@ -1181,7 +1182,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInEquality_expressions() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/equality-expressions"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/equality-expressions"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/equality-expressions/reference-equality-expressions") @@ -1193,7 +1194,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInReference_equality_expressions() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/equality-expressions/reference-equality-expressions"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/equality-expressions/reference-equality-expressions"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/equality-expressions/reference-equality-expressions/p-1") @@ -1205,7 +1206,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInP_1() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/equality-expressions/reference-equality-expressions/p-1"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/equality-expressions/reference-equality-expressions/p-1"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/equality-expressions/reference-equality-expressions/p-1/pos") @@ -1247,7 +1248,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/equality-expressions/reference-equality-expressions/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/equality-expressions/reference-equality-expressions/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); } } } @@ -1261,7 +1262,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInP_3() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/equality-expressions/reference-equality-expressions/p-3"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/equality-expressions/reference-equality-expressions/p-3"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/equality-expressions/reference-equality-expressions/p-3/pos") @@ -1288,7 +1289,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/equality-expressions/reference-equality-expressions/p-3/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/equality-expressions/reference-equality-expressions/p-3/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); } } } @@ -1303,7 +1304,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInValue_equality_expressions() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/equality-expressions/value-equality-expressions"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/equality-expressions/value-equality-expressions"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/equality-expressions/value-equality-expressions/p-2") @@ -1315,7 +1316,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInP_2() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/equality-expressions/value-equality-expressions/p-2"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/equality-expressions/value-equality-expressions/p-2"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/equality-expressions/value-equality-expressions/p-2/pos") @@ -1377,7 +1378,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/equality-expressions/value-equality-expressions/p-2/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/equality-expressions/value-equality-expressions/p-2/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); } } } @@ -1393,7 +1394,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInIndexing_expressions() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/indexing-expressions"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/indexing-expressions"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/indexing-expressions/p-3") @@ -1405,7 +1406,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInP_3() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/indexing-expressions/p-3"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/indexing-expressions/p-3"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/indexing-expressions/p-3/pos") @@ -1442,7 +1443,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/indexing-expressions/p-3/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/indexing-expressions/p-3/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); } } } @@ -1457,7 +1458,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInJump_expressions() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/jump-expressions"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/jump-expressions"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/jump-expressions/break-expression") @@ -1469,7 +1470,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInBreak_expression() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/jump-expressions/break-expression"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/jump-expressions/break-expression"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/jump-expressions/break-expression/p-3") @@ -1481,7 +1482,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInP_3() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/jump-expressions/break-expression/p-3"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/jump-expressions/break-expression/p-3"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/jump-expressions/break-expression/p-3/pos") @@ -1513,7 +1514,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/jump-expressions/break-expression/p-3/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/jump-expressions/break-expression/p-3/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); } } } @@ -1528,7 +1529,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInContinue_expression() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/jump-expressions/continue-expression"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/jump-expressions/continue-expression"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/jump-expressions/continue-expression/p-3") @@ -1540,7 +1541,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInP_3() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/jump-expressions/continue-expression/p-3"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/jump-expressions/continue-expression/p-3"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/jump-expressions/continue-expression/p-3/pos") @@ -1572,7 +1573,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/jump-expressions/continue-expression/p-3/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/jump-expressions/continue-expression/p-3/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); } } } @@ -1587,7 +1588,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInReturn_expressions() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/jump-expressions/return-expressions"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/jump-expressions/return-expressions"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/jump-expressions/return-expressions/p-1") @@ -1599,7 +1600,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInP_1() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/jump-expressions/return-expressions/p-1"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/jump-expressions/return-expressions/p-1"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/jump-expressions/return-expressions/p-1/pos") @@ -1626,7 +1627,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/jump-expressions/return-expressions/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/jump-expressions/return-expressions/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); } } } @@ -1640,7 +1641,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInP_3() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/jump-expressions/return-expressions/p-3"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/jump-expressions/return-expressions/p-3"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/jump-expressions/return-expressions/p-3/pos") @@ -1662,7 +1663,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/jump-expressions/return-expressions/p-3/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/jump-expressions/return-expressions/p-3/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); } } } @@ -1678,7 +1679,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInLogical_conjunction_expression() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/logical-conjunction-expression"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/logical-conjunction-expression"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/logical-conjunction-expression/p-1") @@ -1690,7 +1691,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInP_1() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/logical-conjunction-expression/p-1"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/logical-conjunction-expression/p-1"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/logical-conjunction-expression/p-1/pos") @@ -1717,7 +1718,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/logical-conjunction-expression/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/logical-conjunction-expression/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); } } } @@ -1732,7 +1733,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInLogical_disjunction_expression() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/logical-disjunction-expression"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/logical-disjunction-expression"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/logical-disjunction-expression/p-1") @@ -1744,7 +1745,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInP_1() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/logical-disjunction-expression/p-1"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/logical-disjunction-expression/p-1"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/logical-disjunction-expression/p-1/pos") @@ -1771,7 +1772,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/logical-disjunction-expression/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/logical-disjunction-expression/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); } } } @@ -1786,7 +1787,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInMultiplicative_expression() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/multiplicative-expression"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/multiplicative-expression"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/multiplicative-expression/p-2") @@ -1798,7 +1799,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInP_2() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/multiplicative-expression/p-2"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/multiplicative-expression/p-2"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/multiplicative-expression/p-2/pos") @@ -1825,7 +1826,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/multiplicative-expression/p-2/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/multiplicative-expression/p-2/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); } } } @@ -1840,7 +1841,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInNot_null_assertion_expression() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/not-null-assertion-expression"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/not-null-assertion-expression"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/not-null-assertion-expression/p-2") @@ -1852,7 +1853,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInP_2() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/not-null-assertion-expression/p-2"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/not-null-assertion-expression/p-2"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/not-null-assertion-expression/p-2/pos") @@ -1879,7 +1880,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/not-null-assertion-expression/p-2/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/not-null-assertion-expression/p-2/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); } } } @@ -1894,7 +1895,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInPostfix_operator_expressions() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/postfix-operator-expressions"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/postfix-operator-expressions"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/postfix-operator-expressions/postfix-decrement-expression") @@ -1906,7 +1907,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInPostfix_decrement_expression() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/postfix-operator-expressions/postfix-decrement-expression"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/postfix-operator-expressions/postfix-decrement-expression"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/postfix-operator-expressions/postfix-decrement-expression/p-1") @@ -1918,7 +1919,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInP_1() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/postfix-operator-expressions/postfix-decrement-expression/p-1"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/postfix-operator-expressions/postfix-decrement-expression/p-1"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/postfix-operator-expressions/postfix-decrement-expression/p-1/pos") @@ -1940,7 +1941,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/postfix-operator-expressions/postfix-decrement-expression/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/postfix-operator-expressions/postfix-decrement-expression/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); } } } @@ -1954,7 +1955,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInP_4() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/postfix-operator-expressions/postfix-decrement-expression/p-4"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/postfix-operator-expressions/postfix-decrement-expression/p-4"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/postfix-operator-expressions/postfix-decrement-expression/p-4/pos") @@ -1976,7 +1977,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/postfix-operator-expressions/postfix-decrement-expression/p-4/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/postfix-operator-expressions/postfix-decrement-expression/p-4/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); } } } @@ -1990,7 +1991,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInP_5() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/postfix-operator-expressions/postfix-decrement-expression/p-5"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/postfix-operator-expressions/postfix-decrement-expression/p-5"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/postfix-operator-expressions/postfix-decrement-expression/p-5/pos") @@ -2007,7 +2008,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/postfix-operator-expressions/postfix-decrement-expression/p-5/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/postfix-operator-expressions/postfix-decrement-expression/p-5/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); } } } @@ -2021,7 +2022,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInP_6() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/postfix-operator-expressions/postfix-decrement-expression/p-6"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/postfix-operator-expressions/postfix-decrement-expression/p-6"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/postfix-operator-expressions/postfix-decrement-expression/p-6/pos") @@ -2043,7 +2044,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/postfix-operator-expressions/postfix-decrement-expression/p-6/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/postfix-operator-expressions/postfix-decrement-expression/p-6/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); } } } @@ -2058,7 +2059,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInPostfix_increment_expression() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/postfix-operator-expressions/postfix-increment-expression"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/postfix-operator-expressions/postfix-increment-expression"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/postfix-operator-expressions/postfix-increment-expression/p-1") @@ -2070,7 +2071,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInP_1() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/postfix-operator-expressions/postfix-increment-expression/p-1"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/postfix-operator-expressions/postfix-increment-expression/p-1"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/postfix-operator-expressions/postfix-increment-expression/p-1/pos") @@ -2092,7 +2093,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/postfix-operator-expressions/postfix-increment-expression/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/postfix-operator-expressions/postfix-increment-expression/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); } } } @@ -2106,7 +2107,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInP_4() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/postfix-operator-expressions/postfix-increment-expression/p-4"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/postfix-operator-expressions/postfix-increment-expression/p-4"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/postfix-operator-expressions/postfix-increment-expression/p-4/pos") @@ -2128,7 +2129,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/postfix-operator-expressions/postfix-increment-expression/p-4/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/postfix-operator-expressions/postfix-increment-expression/p-4/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); } } } @@ -2142,7 +2143,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInP_5() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/postfix-operator-expressions/postfix-increment-expression/p-5"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/postfix-operator-expressions/postfix-increment-expression/p-5"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/postfix-operator-expressions/postfix-increment-expression/p-5/pos") @@ -2159,7 +2160,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/postfix-operator-expressions/postfix-increment-expression/p-5/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/postfix-operator-expressions/postfix-increment-expression/p-5/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); } } } @@ -2173,7 +2174,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInP_6() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/postfix-operator-expressions/postfix-increment-expression/p-6"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/postfix-operator-expressions/postfix-increment-expression/p-6"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/postfix-operator-expressions/postfix-increment-expression/p-6/pos") @@ -2195,7 +2196,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/postfix-operator-expressions/postfix-increment-expression/p-6/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/postfix-operator-expressions/postfix-increment-expression/p-6/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); } } } @@ -2211,7 +2212,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInPrefix_expressions() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions/logical-not-expression") @@ -2223,7 +2224,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInLogical_not_expression() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions/logical-not-expression"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions/logical-not-expression"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions/logical-not-expression/p-2") @@ -2235,7 +2236,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInP_2() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions/logical-not-expression/p-2"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions/logical-not-expression/p-2"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions/logical-not-expression/p-2/pos") @@ -2252,7 +2253,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions/logical-not-expression/p-2/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions/logical-not-expression/p-2/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); } } } @@ -2267,7 +2268,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInPrefix_decrement_expression() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions/prefix-decrement-expression"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions/prefix-decrement-expression"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions/prefix-decrement-expression/p-1") @@ -2279,7 +2280,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInP_1() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions/prefix-decrement-expression/p-1"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions/prefix-decrement-expression/p-1"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions/prefix-decrement-expression/p-1/pos") @@ -2301,7 +2302,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions/prefix-decrement-expression/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions/prefix-decrement-expression/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); } } } @@ -2315,7 +2316,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInP_4() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions/prefix-decrement-expression/p-4"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions/prefix-decrement-expression/p-4"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions/prefix-decrement-expression/p-4/pos") @@ -2337,7 +2338,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions/prefix-decrement-expression/p-4/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions/prefix-decrement-expression/p-4/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); } } } @@ -2351,7 +2352,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInP_5() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions/prefix-decrement-expression/p-5"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions/prefix-decrement-expression/p-5"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions/prefix-decrement-expression/p-5/pos") @@ -2368,7 +2369,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions/prefix-decrement-expression/p-5/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions/prefix-decrement-expression/p-5/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); } } } @@ -2382,7 +2383,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInP_6() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions/prefix-decrement-expression/p-6"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions/prefix-decrement-expression/p-6"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions/prefix-decrement-expression/p-6/pos") @@ -2404,7 +2405,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions/prefix-decrement-expression/p-6/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions/prefix-decrement-expression/p-6/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); } } } @@ -2419,7 +2420,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInPrefix_increment_expression() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions/prefix-increment-expression"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions/prefix-increment-expression"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions/prefix-increment-expression/p-1") @@ -2431,7 +2432,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInP_1() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions/prefix-increment-expression/p-1"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions/prefix-increment-expression/p-1"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions/prefix-increment-expression/p-1/pos") @@ -2453,7 +2454,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions/prefix-increment-expression/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions/prefix-increment-expression/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); } } } @@ -2467,7 +2468,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInP_4() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions/prefix-increment-expression/p-4"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions/prefix-increment-expression/p-4"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions/prefix-increment-expression/p-4/pos") @@ -2489,7 +2490,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions/prefix-increment-expression/p-4/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions/prefix-increment-expression/p-4/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); } } } @@ -2503,7 +2504,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInP_5() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions/prefix-increment-expression/p-5"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions/prefix-increment-expression/p-5"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions/prefix-increment-expression/p-5/pos") @@ -2520,7 +2521,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions/prefix-increment-expression/p-5/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions/prefix-increment-expression/p-5/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); } } } @@ -2534,7 +2535,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInP_6() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions/prefix-increment-expression/p-6"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions/prefix-increment-expression/p-6"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions/prefix-increment-expression/p-6/pos") @@ -2556,7 +2557,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions/prefix-increment-expression/p-6/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions/prefix-increment-expression/p-6/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); } } } @@ -2571,7 +2572,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInUnary_minus_expression() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions/unary-minus-expression"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions/unary-minus-expression"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions/unary-minus-expression/p-2") @@ -2583,7 +2584,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInP_2() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions/unary-minus-expression/p-2"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions/unary-minus-expression/p-2"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions/unary-minus-expression/p-2/pos") @@ -2600,7 +2601,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions/unary-minus-expression/p-2/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions/unary-minus-expression/p-2/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); } } } @@ -2615,7 +2616,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInUnary_plus_expression() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions/unary-plus-expression"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions/unary-plus-expression"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions/unary-plus-expression/p-2") @@ -2627,7 +2628,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInP_2() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions/unary-plus-expression/p-2"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions/unary-plus-expression/p-2"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions/unary-plus-expression/p-2/pos") @@ -2644,7 +2645,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions/unary-plus-expression/p-2/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions/unary-plus-expression/p-2/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); } } } @@ -2660,7 +2661,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInRange_expression() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/range-expression"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/range-expression"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/range-expression/p-2") @@ -2672,7 +2673,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInP_2() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/range-expression/p-2"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/range-expression/p-2"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/range-expression/p-2/pos") @@ -2689,7 +2690,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/range-expression/p-2/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/range-expression/p-2/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); } } } @@ -2704,7 +2705,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInTry_expression() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/try-expression"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/try-expression"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/try-expression/p-2") @@ -2716,7 +2717,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInP_2() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/try-expression/p-2"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/try-expression/p-2"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/try-expression/p-2/neg") @@ -2733,7 +2734,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInNeg() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/try-expression/p-2/neg"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/try-expression/p-2/neg"), Pattern.compile("^(.+)\\.kt$"), null, true); } } @@ -2771,7 +2772,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/try-expression/p-2/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/try-expression/p-2/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); } } } @@ -2785,7 +2786,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInP_5() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/try-expression/p-5"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/try-expression/p-5"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/try-expression/p-5/neg") @@ -2802,7 +2803,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInNeg() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/try-expression/p-5/neg"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/try-expression/p-5/neg"), Pattern.compile("^(.+)\\.kt$"), null, true); } } @@ -2830,7 +2831,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/try-expression/p-5/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/try-expression/p-5/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); } } } @@ -2844,7 +2845,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInP_6() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/try-expression/p-6"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/try-expression/p-6"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/try-expression/p-6/pos") @@ -2861,7 +2862,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/try-expression/p-6/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/try-expression/p-6/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); } } } @@ -2875,7 +2876,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInP_7() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/try-expression/p-7"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/try-expression/p-7"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/try-expression/p-7/pos") @@ -2892,7 +2893,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/try-expression/p-7/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/try-expression/p-7/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); } } } @@ -2907,7 +2908,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInType_checking_and_containment_checking_expressions() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/type-checking-and-containment-checking-expressions"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/type-checking-and-containment-checking-expressions"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/type-checking-and-containment-checking-expressions/containment-checking-expression") @@ -2919,7 +2920,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInContainment_checking_expression() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/type-checking-and-containment-checking-expressions/containment-checking-expression"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/type-checking-and-containment-checking-expressions/containment-checking-expression"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/type-checking-and-containment-checking-expressions/containment-checking-expression/p-2") @@ -2931,7 +2932,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInP_2() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/type-checking-and-containment-checking-expressions/containment-checking-expression/p-2"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/type-checking-and-containment-checking-expressions/containment-checking-expression/p-2"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/type-checking-and-containment-checking-expressions/containment-checking-expression/p-2/pos") @@ -2953,7 +2954,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/type-checking-and-containment-checking-expressions/containment-checking-expression/p-2/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/type-checking-and-containment-checking-expressions/containment-checking-expression/p-2/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); } } } @@ -2967,7 +2968,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInP_4() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/type-checking-and-containment-checking-expressions/containment-checking-expression/p-4"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/type-checking-and-containment-checking-expressions/containment-checking-expression/p-4"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/type-checking-and-containment-checking-expressions/containment-checking-expression/p-4/pos") @@ -2989,7 +2990,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/type-checking-and-containment-checking-expressions/containment-checking-expression/p-4/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/type-checking-and-containment-checking-expressions/containment-checking-expression/p-4/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); } } } @@ -3003,7 +3004,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInP_5() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/type-checking-and-containment-checking-expressions/containment-checking-expression/p-5"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/type-checking-and-containment-checking-expressions/containment-checking-expression/p-5"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/type-checking-and-containment-checking-expressions/containment-checking-expression/p-5/neg") @@ -3020,7 +3021,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInNeg() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/type-checking-and-containment-checking-expressions/containment-checking-expression/p-5/neg"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/type-checking-and-containment-checking-expressions/containment-checking-expression/p-5/neg"), Pattern.compile("^(.+)\\.kt$"), null, true); } } } @@ -3035,7 +3036,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInType_checking_expression() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/type-checking-and-containment-checking-expressions/type-checking-expression"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/type-checking-and-containment-checking-expressions/type-checking-expression"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/type-checking-and-containment-checking-expressions/type-checking-expression/p-1") @@ -3047,7 +3048,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInP_1() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/type-checking-and-containment-checking-expressions/type-checking-expression/p-1"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/type-checking-and-containment-checking-expressions/type-checking-expression/p-1"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/type-checking-and-containment-checking-expressions/type-checking-expression/p-1/neg") @@ -3059,7 +3060,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInNeg() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/type-checking-and-containment-checking-expressions/type-checking-expression/p-1/neg"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/type-checking-and-containment-checking-expressions/type-checking-expression/p-1/neg"), Pattern.compile("^(.+)\\.kt$"), null, true); } } @@ -3082,7 +3083,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/type-checking-and-containment-checking-expressions/type-checking-expression/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/type-checking-and-containment-checking-expressions/type-checking-expression/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); } } } @@ -3096,7 +3097,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInP_2() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/type-checking-and-containment-checking-expressions/type-checking-expression/p-2"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/type-checking-and-containment-checking-expressions/type-checking-expression/p-2"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/type-checking-and-containment-checking-expressions/type-checking-expression/p-2/neg") @@ -3113,7 +3114,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInNeg() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/type-checking-and-containment-checking-expressions/type-checking-expression/p-2/neg"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/type-checking-and-containment-checking-expressions/type-checking-expression/p-2/neg"), Pattern.compile("^(.+)\\.kt$"), null, true); } } } @@ -3127,7 +3128,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInP_5() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/type-checking-and-containment-checking-expressions/type-checking-expression/p-5"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/type-checking-and-containment-checking-expressions/type-checking-expression/p-5"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/type-checking-and-containment-checking-expressions/type-checking-expression/p-5/pos") @@ -3144,7 +3145,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/type-checking-and-containment-checking-expressions/type-checking-expression/p-5/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/type-checking-and-containment-checking-expressions/type-checking-expression/p-5/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); } } } @@ -3160,7 +3161,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInWhen_expression() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/when-expression"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/when-expression"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/when-expression/p-4") @@ -3172,7 +3173,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInP_4() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/when-expression/p-4"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/when-expression/p-4"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/when-expression/p-4/neg") @@ -3204,7 +3205,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInNeg() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/when-expression/p-4/neg"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/when-expression/p-4/neg"), Pattern.compile("^(.+)\\.kt$"), null, true); } } @@ -3237,7 +3238,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/when-expression/p-4/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/when-expression/p-4/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); } } } @@ -3251,7 +3252,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInP_5() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/when-expression/p-5"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/when-expression/p-5"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/when-expression/p-5/neg") @@ -3268,7 +3269,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInNeg() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/when-expression/p-5/neg"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/when-expression/p-5/neg"), Pattern.compile("^(.+)\\.kt$"), null, true); } } @@ -3286,7 +3287,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/when-expression/p-5/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/when-expression/p-5/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); } } } @@ -3302,7 +3303,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInOverload_resolution() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/overload-resolution"), Pattern.compile("^(.+)\\.kt$"), null, true, "building-the-overload-candidate-set-ocs/call-with-an-explicit-receiver"); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/overload-resolution"), Pattern.compile("^(.+)\\.kt$"), null, true, "building-the-overload-candidate-set-ocs/call-with-an-explicit-receiver"); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs") @@ -3314,7 +3315,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInBuilding_the_overload_candidate_set_ocs() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs"), Pattern.compile("^(.+)\\.kt$"), null, true, "call-with-an-explicit-receiver"); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs"), Pattern.compile("^(.+)\\.kt$"), null, true, "call-with-an-explicit-receiver"); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/infix-function-call") @@ -3326,7 +3327,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInInfix_function_call() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/infix-function-call"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/infix-function-call"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/infix-function-call/p-2") @@ -3338,7 +3339,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInP_2() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/infix-function-call/p-2"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/infix-function-call/p-2"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/infix-function-call/p-2/pos") @@ -3355,7 +3356,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/infix-function-call/p-2/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/infix-function-call/p-2/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); } } } @@ -3370,7 +3371,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInOperator_call() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1") @@ -3382,7 +3383,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInP_1() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/neg") @@ -3424,7 +3425,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInNeg() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/neg"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/neg"), Pattern.compile("^(.+)\\.kt$"), null, true); } } @@ -3487,7 +3488,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); } } } @@ -3501,7 +3502,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInP_2() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-2"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-2"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-2/pos") @@ -3563,7 +3564,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-2/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-2/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); } } } @@ -3579,7 +3580,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInCallables_and_invoke_convention() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/overload-resolution/callables-and-invoke-convention"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/overload-resolution/callables-and-invoke-convention"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/overload-resolution/callables-and-invoke-convention/p-5") @@ -3591,7 +3592,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInP_5() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/overload-resolution/callables-and-invoke-convention/p-5"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/overload-resolution/callables-and-invoke-convention/p-5"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/overload-resolution/callables-and-invoke-convention/p-5/pos") @@ -3648,7 +3649,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/overload-resolution/callables-and-invoke-convention/p-5/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/overload-resolution/callables-and-invoke-convention/p-5/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); } } } @@ -3663,7 +3664,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInChoosing_the_most_specific_candidate_from_the_overload_candidate_set() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection") @@ -3675,7 +3676,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInAlgorithm_of_msc_selection() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-3") @@ -3687,7 +3688,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInP_3() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-3"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-3"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-3/pos") @@ -3709,7 +3710,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-3/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-3/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); } } } @@ -3725,7 +3726,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInReceivers() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/overload-resolution/receivers"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/overload-resolution/receivers"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/overload-resolution/receivers/p-6") @@ -3737,7 +3738,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInP_6() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/overload-resolution/receivers/p-6"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/overload-resolution/receivers/p-6"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/overload-resolution/receivers/p-6/pos") @@ -3774,7 +3775,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/overload-resolution/receivers/p-6/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/overload-resolution/receivers/p-6/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); } } } @@ -3790,7 +3791,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInStatements() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/statements"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/statements"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/statements/assignments") @@ -3802,7 +3803,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInAssignments() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/statements/assignments"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/statements/assignments"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/statements/assignments/operator-assignments") @@ -3814,7 +3815,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInOperator_assignments() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/statements/assignments/operator-assignments"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/statements/assignments/operator-assignments"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/statements/assignments/operator-assignments/p-2") @@ -3826,7 +3827,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInP_2() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/statements/assignments/operator-assignments/p-2"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/statements/assignments/operator-assignments/p-2"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/statements/assignments/operator-assignments/p-2/neg") @@ -3888,7 +3889,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInNeg() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/statements/assignments/operator-assignments/p-2/neg"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/statements/assignments/operator-assignments/p-2/neg"), Pattern.compile("^(.+)\\.kt$"), null, true); } } @@ -3951,7 +3952,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/statements/assignments/operator-assignments/p-2/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/statements/assignments/operator-assignments/p-2/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); } } } @@ -3966,7 +3967,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInSimple_assignments() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/statements/assignments/simple-assignments"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/statements/assignments/simple-assignments"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/statements/assignments/simple-assignments/p-2") @@ -3978,7 +3979,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInP_2() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/statements/assignments/simple-assignments/p-2"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/statements/assignments/simple-assignments/p-2"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/statements/assignments/simple-assignments/p-2/pos") @@ -4045,7 +4046,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/statements/assignments/simple-assignments/p-2/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/statements/assignments/simple-assignments/p-2/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); } } } @@ -4059,7 +4060,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInP_6() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/statements/assignments/simple-assignments/p-6"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/statements/assignments/simple-assignments/p-6"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/statements/assignments/simple-assignments/p-6/pos") @@ -4076,7 +4077,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/statements/assignments/simple-assignments/p-6/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/statements/assignments/simple-assignments/p-6/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); } } } @@ -4092,7 +4093,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInLoop_statements() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/statements/loop-statements"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/statements/loop-statements"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/statements/loop-statements/do-while-loop-statement") @@ -4104,7 +4105,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInDo_while_loop_statement() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/statements/loop-statements/do-while-loop-statement"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/statements/loop-statements/do-while-loop-statement"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/statements/loop-statements/do-while-loop-statement/p-1") @@ -4116,7 +4117,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInP_1() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/statements/loop-statements/do-while-loop-statement/p-1"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/statements/loop-statements/do-while-loop-statement/p-1"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/statements/loop-statements/do-while-loop-statement/p-1/pos") @@ -4138,7 +4139,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/statements/loop-statements/do-while-loop-statement/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/statements/loop-statements/do-while-loop-statement/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); } } } @@ -4153,7 +4154,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInWhile_loop_statement() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/statements/loop-statements/while-loop-statement"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/statements/loop-statements/while-loop-statement"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/statements/loop-statements/while-loop-statement/p-1") @@ -4165,7 +4166,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInP_1() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/statements/loop-statements/while-loop-statement/p-1"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/statements/loop-statements/while-loop-statement/p-1"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/statements/loop-statements/while-loop-statement/p-1/pos") @@ -4187,7 +4188,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/statements/loop-statements/while-loop-statement/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/statements/loop-statements/while-loop-statement/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); } } } @@ -4204,7 +4205,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInType_system() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/type-system"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/type-system"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/type-system/introduction-1") @@ -4216,7 +4217,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInIntroduction_1() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/type-system/introduction-1"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/type-system/introduction-1"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/type-system/introduction-1/p-5") @@ -4228,7 +4229,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInP_5() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/type-system/introduction-1/p-5"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/type-system/introduction-1/p-5"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/type-system/introduction-1/p-5/pos") @@ -4245,7 +4246,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/type-system/introduction-1/p-5/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/type-system/introduction-1/p-5/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); } } } @@ -4260,7 +4261,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInType_kinds() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/type-system/type-kinds"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/type-system/type-kinds"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/type-system/type-kinds/built-in-types") @@ -4272,7 +4273,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInBuilt_in_types() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/type-system/type-kinds/built-in-types"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/type-system/type-kinds/built-in-types"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/type-system/type-kinds/built-in-types/kotlin.nothing") @@ -4284,7 +4285,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInKotlin_nothing() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/type-system/type-kinds/built-in-types/kotlin.nothing"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/type-system/type-kinds/built-in-types/kotlin.nothing"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/type-system/type-kinds/built-in-types/kotlin.nothing/p-1") @@ -4296,7 +4297,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInP_1() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/type-system/type-kinds/built-in-types/kotlin.nothing/p-1"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/type-system/type-kinds/built-in-types/kotlin.nothing/p-1"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/type-system/type-kinds/built-in-types/kotlin.nothing/p-1/pos") @@ -4318,7 +4319,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/type-system/type-kinds/built-in-types/kotlin.nothing/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/type-system/type-kinds/built-in-types/kotlin.nothing/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); } } } @@ -4337,7 +4338,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInNotLinked() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/notLinked"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/notLinked"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/notLinked/annotations") @@ -4349,7 +4350,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInAnnotations() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/notLinked/annotations"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/notLinked/annotations"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/notLinked/annotations/type-annotations") @@ -4361,7 +4362,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInType_annotations() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/notLinked/annotations/type-annotations"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/notLinked/annotations/type-annotations"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/notLinked/annotations/type-annotations/neg") @@ -4428,7 +4429,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInNeg() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/notLinked/annotations/type-annotations/neg"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/notLinked/annotations/type-annotations/neg"), Pattern.compile("^(.+)\\.kt$"), null, true); } } } @@ -4443,7 +4444,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInFlexibility() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/notLinked/flexibility"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/notLinked/flexibility"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/notLinked/flexibility/neg") @@ -4465,7 +4466,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInNeg() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/notLinked/flexibility/neg"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/notLinked/flexibility/neg"), Pattern.compile("^(.+)\\.kt$"), null, true); } } } @@ -4479,7 +4480,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInObjects() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/notLinked/objects"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/notLinked/objects"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/notLinked/objects/inheritance") @@ -4491,7 +4492,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInInheritance() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/notLinked/objects/inheritance"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/notLinked/objects/inheritance"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/codegen/box/notLinked/objects/inheritance/neg") @@ -4598,7 +4599,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInNeg() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/notLinked/objects/inheritance/neg"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/notLinked/objects/inheritance/neg"), Pattern.compile("^(.+)\\.kt$"), null, true); } } @@ -4621,7 +4622,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/notLinked/objects/inheritance/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/notLinked/objects/inheritance/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); } } } diff --git a/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/parsing/ParsingTestSpecGenerated.java b/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/parsing/ParsingTestSpecGenerated.java index c318eeaa3ba..dc745ab87ba 100644 --- a/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/parsing/ParsingTestSpecGenerated.java +++ b/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/parsing/ParsingTestSpecGenerated.java @@ -1,5 +1,5 @@ /* - * Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Copyright 2010-2021 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. */ @@ -8,6 +8,7 @@ package org.jetbrains.kotlin.spec.parsing; import com.intellij.testFramework.TestDataPath; import org.jetbrains.kotlin.test.JUnit3RunnerWithInners; import org.jetbrains.kotlin.test.KotlinTestUtils; +import org.jetbrains.kotlin.test.util.KtTestUtil; import org.jetbrains.kotlin.test.TestMetadata; import org.junit.runner.RunWith; @@ -25,7 +26,7 @@ public class ParsingTestSpecGenerated extends AbstractParsingTestSpec { } public void testAllFilesPresentInPsi() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/psi"), Pattern.compile("^(.+)\\.kt$"), null, true, "helpers", "templates"); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/psi"), Pattern.compile("^(.+)\\.kt$"), null, true, "helpers", "templates"); } @TestMetadata("compiler/tests-spec/testData/psi/linked") @@ -37,7 +38,7 @@ public class ParsingTestSpecGenerated extends AbstractParsingTestSpec { } public void testAllFilesPresentInLinked() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/psi/linked"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/psi/linked"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/psi/linked/expressions") @@ -49,7 +50,7 @@ public class ParsingTestSpecGenerated extends AbstractParsingTestSpec { } public void testAllFilesPresentInExpressions() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/psi/linked/expressions/constant-literals") @@ -61,7 +62,7 @@ public class ParsingTestSpecGenerated extends AbstractParsingTestSpec { } public void testAllFilesPresentInConstant_literals() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/constant-literals"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/constant-literals"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/integer-literals") @@ -73,7 +74,7 @@ public class ParsingTestSpecGenerated extends AbstractParsingTestSpec { } public void testAllFilesPresentInInteger_literals() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/integer-literals"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/integer-literals"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/integer-literals/binary-integer-literals") @@ -85,7 +86,7 @@ public class ParsingTestSpecGenerated extends AbstractParsingTestSpec { } public void testAllFilesPresentInBinary_integer_literals() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/integer-literals/binary-integer-literals"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/integer-literals/binary-integer-literals"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/integer-literals/binary-integer-literals/p-1") @@ -97,7 +98,7 @@ public class ParsingTestSpecGenerated extends AbstractParsingTestSpec { } public void testAllFilesPresentInP_1() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/integer-literals/binary-integer-literals/p-1"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/integer-literals/binary-integer-literals/p-1"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/integer-literals/binary-integer-literals/p-1/neg") @@ -124,7 +125,7 @@ public class ParsingTestSpecGenerated extends AbstractParsingTestSpec { } public void testAllFilesPresentInNeg() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/integer-literals/binary-integer-literals/p-1/neg"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/integer-literals/binary-integer-literals/p-1/neg"), Pattern.compile("^(.+)\\.kt$"), null, true); } } @@ -172,7 +173,7 @@ public class ParsingTestSpecGenerated extends AbstractParsingTestSpec { } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/integer-literals/binary-integer-literals/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/integer-literals/binary-integer-literals/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); } } } @@ -187,7 +188,7 @@ public class ParsingTestSpecGenerated extends AbstractParsingTestSpec { } public void testAllFilesPresentInDecimal_integer_literals() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/integer-literals/decimal-integer-literals"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/integer-literals/decimal-integer-literals"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/integer-literals/decimal-integer-literals/p-1") @@ -199,7 +200,7 @@ public class ParsingTestSpecGenerated extends AbstractParsingTestSpec { } public void testAllFilesPresentInP_1() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/integer-literals/decimal-integer-literals/p-1"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/integer-literals/decimal-integer-literals/p-1"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/integer-literals/decimal-integer-literals/p-1/neg") @@ -216,7 +217,7 @@ public class ParsingTestSpecGenerated extends AbstractParsingTestSpec { } public void testAllFilesPresentInNeg() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/integer-literals/decimal-integer-literals/p-1/neg"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/integer-literals/decimal-integer-literals/p-1/neg"), Pattern.compile("^(.+)\\.kt$"), null, true); } } @@ -249,7 +250,7 @@ public class ParsingTestSpecGenerated extends AbstractParsingTestSpec { } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/integer-literals/decimal-integer-literals/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/integer-literals/decimal-integer-literals/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); } } } @@ -263,7 +264,7 @@ public class ParsingTestSpecGenerated extends AbstractParsingTestSpec { } public void testAllFilesPresentInP_2() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/integer-literals/decimal-integer-literals/p-2"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/integer-literals/decimal-integer-literals/p-2"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/integer-literals/decimal-integer-literals/p-2/neg") @@ -275,7 +276,7 @@ public class ParsingTestSpecGenerated extends AbstractParsingTestSpec { } public void testAllFilesPresentInNeg() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/integer-literals/decimal-integer-literals/p-2/neg"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/integer-literals/decimal-integer-literals/p-2/neg"), Pattern.compile("^(.+)\\.kt$"), null, true); } } } @@ -290,7 +291,7 @@ public class ParsingTestSpecGenerated extends AbstractParsingTestSpec { } public void testAllFilesPresentInHexadecimal_integer_literals() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/integer-literals/hexadecimal-integer-literals"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/integer-literals/hexadecimal-integer-literals"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/integer-literals/hexadecimal-integer-literals/p-1") @@ -302,7 +303,7 @@ public class ParsingTestSpecGenerated extends AbstractParsingTestSpec { } public void testAllFilesPresentInP_1() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/integer-literals/hexadecimal-integer-literals/p-1"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/integer-literals/hexadecimal-integer-literals/p-1"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/neg") @@ -329,7 +330,7 @@ public class ParsingTestSpecGenerated extends AbstractParsingTestSpec { } public void testAllFilesPresentInNeg() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/neg"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/neg"), Pattern.compile("^(.+)\\.kt$"), null, true); } } @@ -372,7 +373,7 @@ public class ParsingTestSpecGenerated extends AbstractParsingTestSpec { } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); } } } @@ -388,7 +389,7 @@ public class ParsingTestSpecGenerated extends AbstractParsingTestSpec { } public void testAllFilesPresentInReal_literals() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-1") @@ -400,7 +401,7 @@ public class ParsingTestSpecGenerated extends AbstractParsingTestSpec { } public void testAllFilesPresentInP_1() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-1"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-1"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-1/neg") @@ -457,7 +458,7 @@ public class ParsingTestSpecGenerated extends AbstractParsingTestSpec { } public void testAllFilesPresentInNeg() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-1/neg"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-1/neg"), Pattern.compile("^(.+)\\.kt$"), null, true); } } @@ -490,7 +491,7 @@ public class ParsingTestSpecGenerated extends AbstractParsingTestSpec { } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); } } } @@ -504,7 +505,7 @@ public class ParsingTestSpecGenerated extends AbstractParsingTestSpec { } public void testAllFilesPresentInP_2() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-2"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-2"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-2/neg") @@ -536,7 +537,7 @@ public class ParsingTestSpecGenerated extends AbstractParsingTestSpec { } public void testAllFilesPresentInNeg() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-2/neg"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-2/neg"), Pattern.compile("^(.+)\\.kt$"), null, true); } } @@ -579,7 +580,7 @@ public class ParsingTestSpecGenerated extends AbstractParsingTestSpec { } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-2/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-2/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); } } } @@ -593,7 +594,7 @@ public class ParsingTestSpecGenerated extends AbstractParsingTestSpec { } public void testAllFilesPresentInP_3() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-3"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-3"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-3/neg") @@ -640,7 +641,7 @@ public class ParsingTestSpecGenerated extends AbstractParsingTestSpec { } public void testAllFilesPresentInNeg() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-3/neg"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-3/neg"), Pattern.compile("^(.+)\\.kt$"), null, true); } } @@ -703,7 +704,7 @@ public class ParsingTestSpecGenerated extends AbstractParsingTestSpec { } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-3/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-3/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); } } } @@ -717,7 +718,7 @@ public class ParsingTestSpecGenerated extends AbstractParsingTestSpec { } public void testAllFilesPresentInP_4() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-4"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-4"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-4/neg") @@ -749,7 +750,7 @@ public class ParsingTestSpecGenerated extends AbstractParsingTestSpec { } public void testAllFilesPresentInNeg() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-4/neg"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-4/neg"), Pattern.compile("^(.+)\\.kt$"), null, true); } } @@ -812,7 +813,7 @@ public class ParsingTestSpecGenerated extends AbstractParsingTestSpec { } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-4/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-4/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); } } } @@ -826,7 +827,7 @@ public class ParsingTestSpecGenerated extends AbstractParsingTestSpec { } public void testAllFilesPresentInP_6() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-6"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-6"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-6/neg") @@ -843,7 +844,7 @@ public class ParsingTestSpecGenerated extends AbstractParsingTestSpec { } public void testAllFilesPresentInNeg() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-6/neg"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/real-literals/p-6/neg"), Pattern.compile("^(.+)\\.kt$"), null, true); } } } @@ -858,7 +859,7 @@ public class ParsingTestSpecGenerated extends AbstractParsingTestSpec { } public void testAllFilesPresentInThe_types_for_integer_literals() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/the-types-for-integer-literals"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/the-types-for-integer-literals"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/the-types-for-integer-literals/p-1") @@ -870,7 +871,7 @@ public class ParsingTestSpecGenerated extends AbstractParsingTestSpec { } public void testAllFilesPresentInP_1() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/the-types-for-integer-literals/p-1"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/the-types-for-integer-literals/p-1"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/the-types-for-integer-literals/p-1/neg") @@ -902,7 +903,7 @@ public class ParsingTestSpecGenerated extends AbstractParsingTestSpec { } public void testAllFilesPresentInNeg() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/the-types-for-integer-literals/p-1/neg"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/the-types-for-integer-literals/p-1/neg"), Pattern.compile("^(.+)\\.kt$"), null, true); } } @@ -965,7 +966,7 @@ public class ParsingTestSpecGenerated extends AbstractParsingTestSpec { } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/the-types-for-integer-literals/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/constant-literals/the-types-for-integer-literals/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); } } } @@ -981,7 +982,7 @@ public class ParsingTestSpecGenerated extends AbstractParsingTestSpec { } public void testAllFilesPresentInWhen_expression() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/when-expression"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/when-expression"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/psi/linked/expressions/when-expression/p-1") @@ -993,7 +994,7 @@ public class ParsingTestSpecGenerated extends AbstractParsingTestSpec { } public void testAllFilesPresentInP_1() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/when-expression/p-1"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/when-expression/p-1"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/psi/linked/expressions/when-expression/p-1/neg") @@ -1015,7 +1016,7 @@ public class ParsingTestSpecGenerated extends AbstractParsingTestSpec { } public void testAllFilesPresentInNeg() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/when-expression/p-1/neg"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/when-expression/p-1/neg"), Pattern.compile("^(.+)\\.kt$"), null, true); } } @@ -1038,7 +1039,7 @@ public class ParsingTestSpecGenerated extends AbstractParsingTestSpec { } public void testAllFilesPresentInPos() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/when-expression/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/when-expression/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), null, true); } } } @@ -1052,7 +1053,7 @@ public class ParsingTestSpecGenerated extends AbstractParsingTestSpec { } public void testAllFilesPresentInP_2() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/when-expression/p-2"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/when-expression/p-2"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/psi/linked/expressions/when-expression/p-2/neg") @@ -1084,7 +1085,7 @@ public class ParsingTestSpecGenerated extends AbstractParsingTestSpec { } public void testAllFilesPresentInNeg() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/when-expression/p-2/neg"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/when-expression/p-2/neg"), Pattern.compile("^(.+)\\.kt$"), null, true); } } } @@ -1098,7 +1099,7 @@ public class ParsingTestSpecGenerated extends AbstractParsingTestSpec { } public void testAllFilesPresentInP_5() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/when-expression/p-5"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/when-expression/p-5"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/psi/linked/expressions/when-expression/p-5/neg") @@ -1125,7 +1126,7 @@ public class ParsingTestSpecGenerated extends AbstractParsingTestSpec { } public void testAllFilesPresentInNeg() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/when-expression/p-5/neg"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/when-expression/p-5/neg"), Pattern.compile("^(.+)\\.kt$"), null, true); } } } @@ -1139,7 +1140,7 @@ public class ParsingTestSpecGenerated extends AbstractParsingTestSpec { } public void testAllFilesPresentInP_6() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/when-expression/p-6"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/when-expression/p-6"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("compiler/tests-spec/testData/psi/linked/expressions/when-expression/p-6/neg") @@ -1176,7 +1177,7 @@ public class ParsingTestSpecGenerated extends AbstractParsingTestSpec { } public void testAllFilesPresentInNeg() throws Exception { - org.jetbrains.kotlin.test.util.KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/when-expression/p-6/neg"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/psi/linked/expressions/when-expression/p-6/neg"), Pattern.compile("^(.+)\\.kt$"), null, true); } } } diff --git a/compiler/tests/org/jetbrains/kotlin/integration/CompilerSmokeTest.java b/compiler/tests/org/jetbrains/kotlin/integration/CompilerSmokeTest.java index 4f4f3dd337e..1fb05ee2b88 100644 --- a/compiler/tests/org/jetbrains/kotlin/integration/CompilerSmokeTest.java +++ b/compiler/tests/org/jetbrains/kotlin/integration/CompilerSmokeTest.java @@ -187,4 +187,18 @@ public class CompilerSmokeTest extends CompilerSmokeTestBase { ); run("buildFile.run", "-cp", tmpdir.getAbsolutePath(), "MainKt"); } + + public void testReflect() throws Exception { + String jar = tmpdir.getAbsolutePath() + File.separator + "reflect.jar"; + assertEquals("compilation failed", 0, + runCompiler("reflect.compile", "-include-runtime", "reflect.kt", "-d", jar)); + run("reflect.run", "-cp", jar, "reflect.ReflectKt"); + } + + public void testNoReflect() throws Exception { + String jar = tmpdir.getAbsolutePath() + File.separator + "noReflect.jar"; + assertEquals("compilation failed", 0, + runCompiler("noReflect.compile", "-include-runtime", "-no-reflect", "noReflect.kt", "-d", jar)); + run("noReflect.run", "-cp", jar, "noReflect.NoReflectKt"); + } } diff --git a/compiler/tests/org/jetbrains/kotlin/jvm/compiler/CompileKotlinAgainstCustomBinariesTest.kt b/compiler/tests/org/jetbrains/kotlin/jvm/compiler/CompileKotlinAgainstCustomBinariesTest.kt index 7e218e9c4c1..c36330550c9 100644 --- a/compiler/tests/org/jetbrains/kotlin/jvm/compiler/CompileKotlinAgainstCustomBinariesTest.kt +++ b/compiler/tests/org/jetbrains/kotlin/jvm/compiler/CompileKotlinAgainstCustomBinariesTest.kt @@ -22,6 +22,7 @@ import org.jetbrains.kotlin.codegen.forTestCompile.ForTestCompileRuntime import org.jetbrains.kotlin.codegen.inline.remove import org.jetbrains.kotlin.codegen.optimization.common.asSequence import org.jetbrains.kotlin.codegen.optimization.common.intConstant +import org.jetbrains.kotlin.config.JvmTarget import org.jetbrains.kotlin.config.KotlinCompilerVersion import org.jetbrains.kotlin.config.KotlinCompilerVersion.TEST_IS_PRE_RELEASE_SYSTEM_PROPERTY import org.jetbrains.kotlin.config.LanguageFeature @@ -43,6 +44,7 @@ import org.jetbrains.kotlin.test.util.RecursiveDescriptorComparatorAdaptor.valid import org.jetbrains.kotlin.utils.PathUtil import org.jetbrains.org.objectweb.asm.* import org.jetbrains.org.objectweb.asm.tree.AbstractInsnNode +import org.jetbrains.org.objectweb.asm.tree.ClassNode import org.jetbrains.org.objectweb.asm.tree.MethodInsnNode import org.jetbrains.org.objectweb.asm.tree.MethodNode import java.io.ByteArrayInputStream @@ -526,9 +528,9 @@ class CompileKotlinAgainstCustomBinariesTest : AbstractKotlinCompilerIntegration } fun testWrongInlineTarget() { - val library = compileLibrary("library", additionalOptions = listOf("-jvm-target", "1.8")) + val library = compileLibrary("library", additionalOptions = listOf("-jvm-target", "11")) - compileKotlin("source.kt", tmpdir, listOf(library)) + compileKotlin("source.kt", tmpdir, listOf(library), additionalOptions = listOf("-jvm-target", "1.8")) compileKotlin( "warningsOnly_1_3.kt", tmpdir, listOf(library), @@ -609,11 +611,13 @@ class CompileKotlinAgainstCustomBinariesTest : AbstractKotlinCompilerIntegration } fun testInlineAnonymousObjectWithDifferentTarget() { - val library = compileLibrary("library", additionalOptions = listOf("-jvm-target", "1.6")) - compileKotlin("source.kt", tmpdir, listOf(library), additionalOptions = listOf("-jvm-target", "1.8")) - val classLoader = - URLClassLoader(arrayOf(library.toURI().toURL(), tmpdir.toURI().toURL()), ForTestCompileRuntime.runtimeJarClassLoader()) - classLoader.loadClass("SourceKt").getDeclaredMethod("main").invoke(null) + val library = compileLibrary("library", additionalOptions = listOf("-jvm-target", JvmTarget.JVM_1_8.description)) + compileKotlin("source.kt", tmpdir, listOf(library), additionalOptions = listOf("-jvm-target", JvmTarget.JVM_9.description)) + for (name in listOf("SourceKt", "SourceKt\$main\$\$inlined\$foo$1")) { + val node = ClassNode() + ClassReader(File(tmpdir, "$name.class").readBytes()).accept(node, 0) + assertEquals(JvmTarget.JVM_9.majorVersion, node.version) + } } fun testFirAgainstFir() { @@ -714,7 +718,9 @@ class CompileKotlinAgainstCustomBinariesTest : AbstractKotlinCompilerIntegration listOf(library), K2MetadataCompiler(), ) + } + fun testAnonymousObjectTypeMetadataKlib() { val klibLibrary = compileCommonLibrary( libraryName = "library", listOf("-Xexpect-actual-linker"), diff --git a/compiler/tests/org/jetbrains/kotlin/test/SuiteRunnerForCustomJdk.kt b/compiler/tests/org/jetbrains/kotlin/test/SuiteRunnerForCustomJdk.kt deleted file mode 100644 index 717847e845c..00000000000 --- a/compiler/tests/org/jetbrains/kotlin/test/SuiteRunnerForCustomJdk.kt +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright 2010-2018 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. - */ - -package org.jetbrains.kotlin.test - -import org.junit.runner.Description -import org.junit.runner.manipulation.Filter -import org.junit.runners.Suite -import org.junit.runners.model.RunnerBuilder -import java.io.File -import java.lang.reflect.Modifier -import java.util.* - -annotation class RunOnlyJdk6Test - -class SuiteRunnerForCustomJdk constructor(klass: Class<*>, builder: RunnerBuilder?) : - Suite(builder, klass, getAnnotatedClasses(klass).flatMap { - collectDeclaredClasses( - it, - true - ) - }.distinct().toTypedArray()) { - - init { - if (klass.getAnnotation(RunOnlyJdk6Test::class.java) != null) { - filter(object : Filter() { - override fun shouldRun(description: Description): Boolean { - if (description.isTest) { - val methodAnnotation = description.getAnnotation(TestMetadata::class.java) ?: return true - val testClassAnnotation = description.testClass.getAnnotation(TestMetadata::class.java) ?: return true - - val path = testClassAnnotation.value + "/" + methodAnnotation.value - val fileText = File(path).readText() - return !InTextDirectivesUtils.isDirectiveDefined(fileText, "// JVM_TARGET:") && - !InTextDirectivesUtils.isDirectiveDefined(fileText, "// SKIP_JDK6") - } - return true - } - - override fun describe(): String { - return "skipped on JDK 6" - } - }) - } - } - - companion object { - - private fun getAnnotatedClasses(klass: Class<*>, addSuperAnnotations: Boolean = true): List> { - val annotation = klass.getAnnotation(SuiteClasses::class.java) - return (annotation?.value?.map { it.java } ?: emptyList()) + - if (addSuperAnnotations) getAnnotatedClasses( - klass.superclass, - false - ) else emptyList() - } - - private fun collectDeclaredClasses(klass: Class<*>, withItself: Boolean): List> { - val result = ArrayList>() - if (klass.enclosingClass != null && !Modifier.isStatic(klass.modifiers)) return emptyList() - - if (withItself) { - result.add(klass) - } - - for (aClass in klass.declaredClasses) { - result.addAll(collectDeclaredClasses(aClass, true)) - } - - return result - } - } -} diff --git a/compiler/util-klib/src/org/jetbrains/kotlin/library/impl/KotlinLibraryImpl.kt b/compiler/util-klib/src/org/jetbrains/kotlin/library/impl/KotlinLibraryImpl.kt index 6f1c3b0c853..bfd076d35ac 100644 --- a/compiler/util-klib/src/org/jetbrains/kotlin/library/impl/KotlinLibraryImpl.kt +++ b/compiler/util-klib/src/org/jetbrains/kotlin/library/impl/KotlinLibraryImpl.kt @@ -231,8 +231,21 @@ open class KotlinLibraryImpl( BaseKotlinLibrary by base, MetadataLibrary by metadata, IrLibrary by ir { - override fun toString(): String { - return "[Klib: ${base.libraryFile.name}, file: ${base.libraryFile.path}]" + override fun toString(): String = buildString { + append("name ") + append(base.libraryName) + append(", ") + append("file: ") + append(base.libraryFile.path) + append(", ") + append("version: ") + append(base.versions) + if (isInterop) { + append(", interop: true, ") + append("native targets: ") + nativeTargets.joinTo(this, ", ", "{", "}") + } + append(')') } } diff --git a/core/compiler.common.jvm/build.gradle.kts b/core/compiler.common.jvm/build.gradle.kts index e059558821a..9ecd82c2c7a 100644 --- a/core/compiler.common.jvm/build.gradle.kts +++ b/core/compiler.common.jvm/build.gradle.kts @@ -19,3 +19,9 @@ tasks.withType { sourceCompatibility = "1.6" targetCompatibility = "1.6" } + +tasks.withType().configureEach { + kotlinOptions { + freeCompilerArgs += "-Xsuppress-deprecated-jvm-target-warning" + } +} diff --git a/core/compiler.common/build.gradle.kts b/core/compiler.common/build.gradle.kts index 6a1dc2f0d39..da0fdabab0e 100644 --- a/core/compiler.common/build.gradle.kts +++ b/core/compiler.common/build.gradle.kts @@ -21,3 +21,9 @@ tasks.withType { sourceCompatibility = "1.6" targetCompatibility = "1.6" } + +tasks.withType().configureEach { + kotlinOptions { + freeCompilerArgs += "-Xsuppress-deprecated-jvm-target-warning" + } +} diff --git a/core/descriptors.jvm/build.gradle.kts b/core/descriptors.jvm/build.gradle.kts index 9a68af00ac7..bf39ff227ad 100644 --- a/core/descriptors.jvm/build.gradle.kts +++ b/core/descriptors.jvm/build.gradle.kts @@ -25,3 +25,9 @@ tasks.withType { sourceCompatibility = "1.6" targetCompatibility = "1.6" } + +tasks.withType().configureEach { + kotlinOptions { + freeCompilerArgs += "-Xsuppress-deprecated-jvm-target-warning" + } +} diff --git a/core/descriptors.runtime/build.gradle.kts b/core/descriptors.runtime/build.gradle.kts index 29fb641da9c..26372c1c78b 100644 --- a/core/descriptors.runtime/build.gradle.kts +++ b/core/descriptors.runtime/build.gradle.kts @@ -29,8 +29,11 @@ val compileJava by tasks.getting(JavaCompile::class) { } val compileKotlin by tasks.getting(KotlinCompile::class) { - kotlinOptions.jvmTarget = "1.6" - kotlinOptions.jdkHome = rootProject.extra["JDK_16"] as String + kotlinOptions { + jvmTarget = "1.6" + jdkHome = rootProject.extra["JDK_16"] as String + freeCompilerArgs += "-Xsuppress-deprecated-jvm-target-warning" + } } val generateTests by generator("org.jetbrains.kotlin.generators.tests.GenerateRuntimeDescriptorTestsKt") @@ -39,4 +42,4 @@ projectTest(parallel = true) { workingDir = rootDir } -testsJar() \ No newline at end of file +testsJar() diff --git a/core/descriptors.runtime/src/org/jetbrains/kotlin/descriptors/runtime/structure/reflectClassUtil.kt b/core/descriptors.runtime/src/org/jetbrains/kotlin/descriptors/runtime/structure/reflectClassUtil.kt index fba5e29b020..76eec25e191 100644 --- a/core/descriptors.runtime/src/org/jetbrains/kotlin/descriptors/runtime/structure/reflectClassUtil.kt +++ b/core/descriptors.runtime/src/org/jetbrains/kotlin/descriptors/runtime/structure/reflectClassUtil.kt @@ -67,16 +67,23 @@ val Class<*>.classId: ClassId } val Class<*>.desc: String - get() { - if (this == Void.TYPE) return "V" - // This is a clever exploitation of a format returned by Class.getName(): for arrays, it's almost an internal name, - // but with '.' instead of '/' - return createArrayType().name.substring(1).replace('.', '/') + get() = when { + isPrimitive -> when (name) { + "boolean" -> "Z" + "char" -> "C" + "byte" -> "B" + "short" -> "S" + "int" -> "I" + "float" -> "F" + "long" -> "J" + "double" -> "D" + "void" -> "V" + else -> throw IllegalArgumentException("Unsupported primitive type: $this") + } + isArray -> name.replace('.', '/') + else -> "L${name.replace('.', '/')};" } -fun Class<*>.createArrayType(): Class<*> = - Array.newInstance(this, 0)::class.java - /** * @return all arguments of a parameterized type, including those of outer classes in case this type represents an inner generic. * The returned list starts with the arguments to the innermost class, then continues with those of its outer class, and so on. diff --git a/core/descriptors/build.gradle.kts b/core/descriptors/build.gradle.kts index b39fa2cd85e..a9a953dc60d 100644 --- a/core/descriptors/build.gradle.kts +++ b/core/descriptors/build.gradle.kts @@ -22,3 +22,9 @@ tasks.withType { sourceCompatibility = "1.6" targetCompatibility = "1.6" } + +tasks.withType().configureEach { + kotlinOptions { + freeCompilerArgs += "-Xsuppress-deprecated-jvm-target-warning" + } +} diff --git a/core/deserialization.common.jvm/build.gradle.kts b/core/deserialization.common.jvm/build.gradle.kts index bbaf2914390..4c664eb2ffc 100644 --- a/core/deserialization.common.jvm/build.gradle.kts +++ b/core/deserialization.common.jvm/build.gradle.kts @@ -21,3 +21,9 @@ tasks.withType { sourceCompatibility = "1.6" targetCompatibility = "1.6" } + +tasks.withType().configureEach { + kotlinOptions { + freeCompilerArgs += "-Xsuppress-deprecated-jvm-target-warning" + } +} diff --git a/core/deserialization.common/build.gradle.kts b/core/deserialization.common/build.gradle.kts index 0aa46054954..2ca04c99d2c 100644 --- a/core/deserialization.common/build.gradle.kts +++ b/core/deserialization.common/build.gradle.kts @@ -20,3 +20,9 @@ tasks.withType { sourceCompatibility = "1.6" targetCompatibility = "1.6" } + +tasks.withType().configureEach { + kotlinOptions { + freeCompilerArgs += "-Xsuppress-deprecated-jvm-target-warning" + } +} diff --git a/core/deserialization/build.gradle.kts b/core/deserialization/build.gradle.kts index b128c2ecb81..be02b300b26 100644 --- a/core/deserialization/build.gradle.kts +++ b/core/deserialization/build.gradle.kts @@ -23,3 +23,9 @@ tasks.withType { sourceCompatibility = "1.6" targetCompatibility = "1.6" } + +tasks.withType().configureEach { + kotlinOptions { + freeCompilerArgs += "-Xsuppress-deprecated-jvm-target-warning" + } +} diff --git a/core/metadata.jvm/build.gradle.kts b/core/metadata.jvm/build.gradle.kts index 9b76b6bfa58..211acec8a6a 100644 --- a/core/metadata.jvm/build.gradle.kts +++ b/core/metadata.jvm/build.gradle.kts @@ -19,3 +19,9 @@ tasks.withType { sourceCompatibility = "1.6" targetCompatibility = "1.6" } + +tasks.withType().configureEach { + kotlinOptions { + freeCompilerArgs += "-Xsuppress-deprecated-jvm-target-warning" + } +} diff --git a/core/metadata/build.gradle.kts b/core/metadata/build.gradle.kts index b3086b20d53..b1d30dab9d2 100644 --- a/core/metadata/build.gradle.kts +++ b/core/metadata/build.gradle.kts @@ -20,3 +20,9 @@ tasks.withType { sourceCompatibility = "1.6" targetCompatibility = "1.6" } + +tasks.withType().configureEach { + kotlinOptions { + freeCompilerArgs += "-Xsuppress-deprecated-jvm-target-warning" + } +} diff --git a/core/reflection.jvm/src/kotlin/reflect/jvm/internal/KDeclarationContainerImpl.kt b/core/reflection.jvm/src/kotlin/reflect/jvm/internal/KDeclarationContainerImpl.kt index d83e7387884..35d14c74401 100644 --- a/core/reflection.jvm/src/kotlin/reflect/jvm/internal/KDeclarationContainerImpl.kt +++ b/core/reflection.jvm/src/kotlin/reflect/jvm/internal/KDeclarationContainerImpl.kt @@ -19,7 +19,6 @@ package kotlin.reflect.jvm.internal import org.jetbrains.kotlin.descriptors.* import org.jetbrains.kotlin.descriptors.runtime.components.RuntimeModuleData import org.jetbrains.kotlin.descriptors.runtime.components.tryLoadClass -import org.jetbrains.kotlin.descriptors.runtime.structure.createArrayType import org.jetbrains.kotlin.descriptors.runtime.structure.safeClassLoader import org.jetbrains.kotlin.descriptors.runtime.structure.wrapperByPrimitive import org.jetbrains.kotlin.load.java.JvmAbi diff --git a/core/reflection.jvm/src/kotlin/reflect/jvm/internal/KTypeImpl.kt b/core/reflection.jvm/src/kotlin/reflect/jvm/internal/KTypeImpl.kt index 49666340603..5dd3fe793d4 100644 --- a/core/reflection.jvm/src/kotlin/reflect/jvm/internal/KTypeImpl.kt +++ b/core/reflection.jvm/src/kotlin/reflect/jvm/internal/KTypeImpl.kt @@ -19,7 +19,6 @@ package kotlin.reflect.jvm.internal import org.jetbrains.kotlin.descriptors.ClassDescriptor import org.jetbrains.kotlin.descriptors.TypeAliasDescriptor import org.jetbrains.kotlin.descriptors.TypeParameterDescriptor -import org.jetbrains.kotlin.descriptors.runtime.structure.createArrayType import org.jetbrains.kotlin.descriptors.runtime.structure.parameterizedTypeArguments import org.jetbrains.kotlin.descriptors.runtime.structure.primitiveByWrapper import org.jetbrains.kotlin.types.KotlinType diff --git a/core/reflection.jvm/src/kotlin/reflect/jvm/internal/util.kt b/core/reflection.jvm/src/kotlin/reflect/jvm/internal/util.kt index cda72d58eb5..cf7dc541715 100644 --- a/core/reflection.jvm/src/kotlin/reflect/jvm/internal/util.kt +++ b/core/reflection.jvm/src/kotlin/reflect/jvm/internal/util.kt @@ -101,6 +101,9 @@ private fun loadClass(classLoader: ClassLoader, packageName: String, className: return classLoader.tryLoadClass(fqName) } +internal fun Class<*>.createArrayType(): Class<*> = + java.lang.reflect.Array.newInstance(this, 0)::class.java + internal fun DescriptorVisibility.toKVisibility(): KVisibility? = when (this) { DescriptorVisibilities.PUBLIC -> KVisibility.PUBLIC diff --git a/core/util.runtime/build.gradle.kts b/core/util.runtime/build.gradle.kts index 395445f6a14..8e0116b50f6 100644 --- a/core/util.runtime/build.gradle.kts +++ b/core/util.runtime/build.gradle.kts @@ -1,6 +1,4 @@ - plugins { - java kotlin("jvm") id("jps-compatible") } @@ -21,3 +19,9 @@ tasks.withType { sourceCompatibility = "1.6" targetCompatibility = "1.6" } + +tasks.withType().configureEach { + kotlinOptions { + freeCompilerArgs += "-Xsuppress-deprecated-jvm-target-warning" + } +} diff --git a/generators/builtins/unsignedTypes.kt b/generators/builtins/unsignedTypes.kt index b7eb8bdc6f1..c57d92ecbfa 100644 --- a/generators/builtins/unsignedTypes.kt +++ b/generators/builtins/unsignedTypes.kt @@ -42,7 +42,6 @@ class UnsignedTypeGenerator(val type: UnsignedType, out: PrintWriter) : BuiltIns out.println("import kotlin.experimental.*") out.println() - out.println("@Suppress(\"NON_PUBLIC_PRIMARY_CONSTRUCTOR_OF_INLINE_CLASS\")") out.println("@SinceKotlin(\"1.3\")") out.println("@ExperimentalUnsignedTypes") out.println("public inline class $className @PublishedApi internal constructor(@PublishedApi internal val data: $storageType) : Comparable<$className> {") @@ -423,7 +422,6 @@ class UnsignedArrayGenerator(val type: UnsignedType, out: PrintWriter) : BuiltIn out.println("@SinceKotlin(\"1.3\")") out.println("@ExperimentalUnsignedTypes") out.println("public inline class $arrayType") - out.println("@Suppress(\"NON_PUBLIC_PRIMARY_CONSTRUCTOR_OF_INLINE_CLASS\")") out.println("@PublishedApi") out.println("internal constructor(@PublishedApi internal val storage: $storageArrayType) : Collection<$elementType> {") out.println( diff --git a/generators/tests/org/jetbrains/kotlin/generators/tests/GenerateTests.kt b/generators/tests/org/jetbrains/kotlin/generators/tests/GenerateTests.kt index a2e92eb3b75..2cfbf41962c 100644 --- a/generators/tests/org/jetbrains/kotlin/generators/tests/GenerateTests.kt +++ b/generators/tests/org/jetbrains/kotlin/generators/tests/GenerateTests.kt @@ -312,7 +312,7 @@ fun main(args: Array) { model("resolve/resolveModeComparison") } - testClass { + testClass { model("checker", recursive = false) model("checker/regression") model("checker/recovery") @@ -1092,7 +1092,7 @@ fun main(args: Array) { model("resolve/references", pattern = KT_WITHOUT_DOTS_IN_NAME) } - testClass { + testClass { model("checker", recursive = false) model("checker/regression") model("checker/recovery") diff --git a/generators/tests/org/jetbrains/kotlin/generators/tests/GenerateTests.kt.as41 b/generators/tests/org/jetbrains/kotlin/generators/tests/GenerateTests.kt.as41 index ddae3330f6c..51ef15e2838 100644 --- a/generators/tests/org/jetbrains/kotlin/generators/tests/GenerateTests.kt.as41 +++ b/generators/tests/org/jetbrains/kotlin/generators/tests/GenerateTests.kt.as41 @@ -239,7 +239,7 @@ fun main(args: Array) { model("resolve/partialBodyResolve") } - testClass { + testClass { model("checker", recursive = false) model("checker/regression") model("checker/recovery") diff --git a/generators/tests/org/jetbrains/kotlin/generators/tests/GenerateTests.kt.as42 b/generators/tests/org/jetbrains/kotlin/generators/tests/GenerateTests.kt.as42 index c74929eb79b..7e525475af3 100644 --- a/generators/tests/org/jetbrains/kotlin/generators/tests/GenerateTests.kt.as42 +++ b/generators/tests/org/jetbrains/kotlin/generators/tests/GenerateTests.kt.as42 @@ -235,7 +235,7 @@ fun main(args: Array) { model("resolve/partialBodyResolve") } - testClass { + testClass { model("checker", recursive = false) model("checker/regression") model("checker/recovery") diff --git a/gradle/jps.gradle.kts b/gradle/jps.gradle.kts index 7b6c38acc4d..07494f9c62e 100644 --- a/gradle/jps.gradle.kts +++ b/gradle/jps.gradle.kts @@ -63,18 +63,9 @@ fun setupGenerateAllTestsRunConfiguration() { // Needed because of idea.ext plugin doesn't allow to set TEST_SEARCH_SCOPE = moduleWithDependencies fun setupFirRunConfiguration() { - val tests = listOf( - "org\\.jetbrains\\.kotlin\\.test\\.runners\\.FirDiagnosticsWithLightTreeTestGenerated", - "org\\.jetbrains\\.kotlin\\.test\\.runners\\.FirDiagnosticTestGenerated", - "org\\.jetbrains\\.kotlin\\.test\\.runners\\.FirDiagnosticTestSpecGenerated", - "org\\.jetbrains\\.kotlin\\.test\\.runners\\.FirOldFrontendDiagnosticsTestGenerated", - "org\\.jetbrains\\.kotlin\\.test\\.runners\\.ir\\.Fir2IrTextTestGenerated", - "org\\.jetbrains\\.kotlin\\.test\\.runners\\.codegen\\.FirBlackBoxCodegenTestGenerated" - ) - val junit = JUnit("_stub").apply { configureForKotlin("2048m") } - junit.moduleName = "kotlin.compiler.fir.analysis-tests.test" - junit.pattern = tests.joinToString(separator = "|", prefix = "^(", postfix = ")\$") + junit.moduleName = "kotlin.compiler.fir.fir2ir.test" + junit.pattern = """^.*\.Fir\w+TestGenerated$""" junit.vmParameters = junit.vmParameters.replace(rootDir.absolutePath, "\$PROJECT_DIR\$") junit.workingDirectory = junit.workingDirectory.replace(rootDir.absolutePath, "\$PROJECT_DIR\$") diff --git a/gradle/versions.properties b/gradle/versions.properties index 4d501d53c02..498dd725e66 100644 --- a/gradle/versions.properties +++ b/gradle/versions.properties @@ -16,3 +16,5 @@ versions.jar.lz4-java=1.7.1 ignore.jar.snappy-in-java=true versions.gradle-api=4.5.1 versions.shadow=5.2.0 +versions.junit-bom=5.7.0 +versions.org.junit.platform=1.7.0 diff --git a/gradle/versions.properties.201 b/gradle/versions.properties.201 index eaa5a3ee09e..763d345abba 100644 --- a/gradle/versions.properties.201 +++ b/gradle/versions.properties.201 @@ -14,4 +14,6 @@ versions.jar.serviceMessages=2019.1.4 versions.jar.lz4-java=1.7.1 ignore.jar.snappy-in-java=true versions.gradle-api=4.5.1 -versions.shadow=5.2.0 \ No newline at end of file +versions.shadow=5.2.0 +versions.junit-bom=5.7.0 +versions.org.junit.platform=1.7.0 diff --git a/gradle/versions.properties.as41 b/gradle/versions.properties.as41 index fbbe449bfc1..e39cd80caa3 100644 --- a/gradle/versions.properties.as41 +++ b/gradle/versions.properties.as41 @@ -18,4 +18,6 @@ ignore.jar.snappy-in-java=true versions.gradle-api=4.5.1 versions.shadow=5.2.0 ignore.jar.common=true -ignore.jar.lombok-ast=true \ No newline at end of file +ignore.jar.lombok-ast=true +versions.junit-bom=5.7.0 +versions.org.junit.platform=1.7.0 diff --git a/gradle/versions.properties.as42 b/gradle/versions.properties.as42 index 7983c2a0f03..9c8184feb94 100644 --- a/gradle/versions.properties.as42 +++ b/gradle/versions.properties.as42 @@ -18,4 +18,6 @@ ignore.jar.snappy-in-java=true versions.gradle-api=4.5.1 versions.shadow=5.2.0 ignore.jar.common=true -ignore.jar.lombok-ast=true \ No newline at end of file +ignore.jar.lombok-ast=true +versions.junit-bom=5.7.0 +versions.org.junit.platform=1.7.0 diff --git a/idea/ide-common/src/org/jetbrains/kotlin/idea/caches/resolve/resolutionApi.kt b/idea/ide-common/src/org/jetbrains/kotlin/idea/caches/resolve/resolutionApi.kt index 5c4e2c629a3..443eacba99e 100644 --- a/idea/ide-common/src/org/jetbrains/kotlin/idea/caches/resolve/resolutionApi.kt +++ b/idea/ide-common/src/org/jetbrains/kotlin/idea/caches/resolve/resolutionApi.kt @@ -13,6 +13,7 @@ import org.jetbrains.kotlin.descriptors.DeclarationDescriptor import org.jetbrains.kotlin.descriptors.ModuleDescriptor import org.jetbrains.kotlin.descriptors.annotations.AnnotationDescriptor import org.jetbrains.kotlin.idea.FrontendInternals +import org.jetbrains.kotlin.diagnostics.Diagnostic import org.jetbrains.kotlin.idea.resolve.ResolutionFacade import org.jetbrains.kotlin.name.FqName import org.jetbrains.kotlin.psi.* @@ -167,8 +168,11 @@ inline fun T.analyzeWithContent(): BindingContext where T : KtDeclar * @ref [org.jetbrains.kotlin.idea.caches.resolve.PerFileAnalysisCache] */ fun KtFile.analyzeWithAllCompilerChecks(vararg extraFiles: KtFile): AnalysisResult = + this.analyzeWithAllCompilerChecks(null, *extraFiles) + +fun KtFile.analyzeWithAllCompilerChecks(callback: ((Diagnostic) -> Unit)?, vararg extraFiles: KtFile): AnalysisResult = KotlinCacheService.getInstance(project).getResolutionFacade(listOf(this) + extraFiles.toList()) - .analyzeWithAllCompilerChecks(listOf(this)) + .analyzeWithAllCompilerChecks(listOf(this), callback) /** * This function is expected to produce the same result as compiler for the given element and its children (including diagnostics, diff --git a/idea/ide-common/src/org/jetbrains/kotlin/idea/resolve/ResolutionFacade.kt b/idea/ide-common/src/org/jetbrains/kotlin/idea/resolve/ResolutionFacade.kt index 91b8fb6c346..6124878609c 100644 --- a/idea/ide-common/src/org/jetbrains/kotlin/idea/resolve/ResolutionFacade.kt +++ b/idea/ide-common/src/org/jetbrains/kotlin/idea/resolve/ResolutionFacade.kt @@ -12,6 +12,8 @@ import org.jetbrains.kotlin.analyzer.ModuleInfo import org.jetbrains.kotlin.analyzer.ResolverForProject import org.jetbrains.kotlin.descriptors.DeclarationDescriptor import org.jetbrains.kotlin.descriptors.ModuleDescriptor +import org.jetbrains.kotlin.diagnostics.Diagnostic +import org.jetbrains.kotlin.diagnostics.DiagnosticSink import org.jetbrains.kotlin.idea.FrontendInternals import org.jetbrains.kotlin.psi.KtDeclaration import org.jetbrains.kotlin.psi.KtElement @@ -24,7 +26,7 @@ interface ResolutionFacade { fun analyze(element: KtElement, bodyResolveMode: BodyResolveMode = BodyResolveMode.FULL): BindingContext fun analyze(elements: Collection, bodyResolveMode: BodyResolveMode): BindingContext - fun analyzeWithAllCompilerChecks(elements: Collection): AnalysisResult + fun analyzeWithAllCompilerChecks(elements: Collection, callback: DiagnosticSink.DiagnosticsCallback? = null): AnalysisResult fun resolveToDescriptor(declaration: KtDeclaration, bodyResolveMode: BodyResolveMode = BodyResolveMode.FULL): DeclarationDescriptor diff --git a/idea/idea-analysis/resources/messages/KotlinIdeaAnalysisBundle.properties b/idea/idea-analysis/resources/messages/KotlinIdeaAnalysisBundle.properties index f2e8aaddbe2..455b56a9cfe 100644 --- a/idea/idea-analysis/resources/messages/KotlinIdeaAnalysisBundle.properties +++ b/idea/idea-analysis/resources/messages/KotlinIdeaAnalysisBundle.properties @@ -40,6 +40,8 @@ html.type.mismatch.table.tr.td.required.td.td.0.td.tr.tr.td.found.td.td.1.td.tr. intention.suppress.family=Suppress Warnings intention.suppress.text=Suppress ''{0}'' for {1} {2} +intention.calculating.text=Quick fix is being calculated ... + special.module.for.files.not.under.source.root= sdk.0= sources.for.library.0= diff --git a/idea/idea-analysis/src/org/jetbrains/kotlin/idea/caches/lightClasses/IDELightClassContexts.kt b/idea/idea-analysis/src/org/jetbrains/kotlin/idea/caches/lightClasses/IDELightClassContexts.kt index 0189152cb63..313e01d6130 100644 --- a/idea/idea-analysis/src/org/jetbrains/kotlin/idea/caches/lightClasses/IDELightClassContexts.kt +++ b/idea/idea-analysis/src/org/jetbrains/kotlin/idea/caches/lightClasses/IDELightClassContexts.kt @@ -34,6 +34,7 @@ import org.jetbrains.kotlin.idea.compiler.IDELanguageSettingsProvider import org.jetbrains.kotlin.idea.project.IdeaEnvironment import org.jetbrains.kotlin.idea.project.ResolveElementCache import org.jetbrains.kotlin.idea.project.languageVersionSettings +import org.jetbrains.kotlin.idea.resolve.ResolutionFacade import org.jetbrains.kotlin.idea.stubindex.KotlinOverridableInternalMembersShortNameIndex import org.jetbrains.kotlin.incremental.components.ExpectActualTracker import org.jetbrains.kotlin.incremental.components.LookupTracker @@ -69,12 +70,13 @@ import org.jetbrains.kotlin.types.TypeUtils import org.jetbrains.kotlin.types.WrappedTypeFactory import org.jetbrains.kotlin.utils.sure - class IDELightClassConstructionContext( - bindingContext: BindingContext, module: ModuleDescriptor, + bindingContext: BindingContext, + module: ModuleDescriptor, languageVersionSettings: LanguageVersionSettings, + jvmTarget: JvmTarget, val mode: Mode -) : LightClassConstructionContext(bindingContext, module, languageVersionSettings) { +) : LightClassConstructionContext(bindingContext, module, languageVersionSettings, jvmTarget) { enum class Mode { LIGHT, EXACT @@ -106,6 +108,7 @@ internal object IDELightClassContexts { bindingContext, resolutionFacade.moduleDescriptor, classOrObject.languageVersionSettings, + resolutionFacade.jvmTarget, EXACT ) } @@ -122,6 +125,7 @@ internal object IDELightClassContexts { bindingContext, resolutionFacade.moduleDescriptor, classOrObject.languageVersionSettings, + resolutionFacade.jvmTarget, EXACT ) } @@ -132,20 +136,24 @@ internal object IDELightClassContexts { bindingContext, resolutionFacade.moduleDescriptor, classOrObject.languageVersionSettings, + resolutionFacade.jvmTarget, EXACT ) } fun contextForFacade(files: List): LightClassConstructionContext { + val resolutionFacade = files.first().getResolutionFacade() + @OptIn(FrontendInternals::class) - val resolveSession = files.first().getResolutionFacade().getFrontendService(ResolveSession::class.java) + val resolveSession = resolutionFacade.getFrontendService(ResolveSession::class.java) forceResolvePackageDeclarations(files, resolveSession) return IDELightClassConstructionContext( resolveSession.bindingContext, resolveSession.moduleDescriptor, files.first().languageVersionSettings, + resolutionFacade.jvmTarget, EXACT ) } @@ -161,21 +169,26 @@ internal object IDELightClassContexts { bindingContext, resolutionFacade.moduleDescriptor, script.languageVersionSettings, + resolutionFacade.jvmTarget, EXACT ) } ForceResolveUtil.forceResolveAllContents(descriptor) - return IDELightClassConstructionContext(bindingContext, resolutionFacade.moduleDescriptor, script.languageVersionSettings, EXACT) + return IDELightClassConstructionContext( + bindingContext, resolutionFacade.moduleDescriptor, script.languageVersionSettings, resolutionFacade.jvmTarget, + EXACT + ) } fun lightContextForClassOrObject(classOrObject: KtClassOrObject): LightClassConstructionContext? { if (!isDummyResolveApplicable(classOrObject)) return null + val resolutionFacade = classOrObject.getResolutionFacade() val resolveSession = setupAdHocResolve( classOrObject.project, - classOrObject.getResolutionFacade().moduleDescriptor, + resolutionFacade.moduleDescriptor, listOf(classOrObject.containingKtFile) ) @@ -188,13 +201,15 @@ internal object IDELightClassContexts { resolveSession.bindingContext, resolveSession.moduleDescriptor, classOrObject.languageVersionSettings, + resolutionFacade.jvmTarget, LIGHT ) } fun lightContextForFacade(files: List): LightClassConstructionContext { val representativeFile = files.first() - val resolveSession = setupAdHocResolve(representativeFile.project, representativeFile.getResolutionFacade().moduleDescriptor, files) + val resolutionFacade = representativeFile.getResolutionFacade() + val resolveSession = setupAdHocResolve(representativeFile.project, resolutionFacade.moduleDescriptor, files) forceResolvePackageDeclarations(files, resolveSession) @@ -202,10 +217,15 @@ internal object IDELightClassContexts { resolveSession.bindingContext, resolveSession.moduleDescriptor, files.first().languageVersionSettings, + resolutionFacade.jvmTarget, LIGHT ) } + @OptIn(FrontendInternals::class) + private val ResolutionFacade.jvmTarget: JvmTarget + get() = getFrontendService(JvmTarget::class.java) + private fun isDummyResolveApplicable(classOrObject: KtClassOrObject): Boolean { if (classOrObject.hasModifier(KtTokens.INLINE_KEYWORD)) return false @@ -447,4 +467,3 @@ internal object IDELightClassContexts { } } } - diff --git a/idea/idea-analysis/src/org/jetbrains/kotlin/idea/caches/lightClasses/IdeLightClassInheritanceHelper.kt b/idea/idea-analysis/src/org/jetbrains/kotlin/idea/caches/lightClasses/IdeLightClassInheritanceHelper.kt index aa32f79ed16..18c251d0c51 100644 --- a/idea/idea-analysis/src/org/jetbrains/kotlin/idea/caches/lightClasses/IdeLightClassInheritanceHelper.kt +++ b/idea/idea-analysis/src/org/jetbrains/kotlin/idea/caches/lightClasses/IdeLightClassInheritanceHelper.kt @@ -39,14 +39,16 @@ class IdeLightClassInheritanceHelper : LightClassInheritanceHelper { if (lightClass.manager.areElementsEquivalent(baseClass, lightClass)) return NO_MATCH val classOrObject = lightClass.kotlinOrigin ?: return UNSURE + + if (checkDeep && baseClass.qualifiedName == CommonClassNames.JAVA_LANG_OBJECT) { + return MATCH + } + val entries = classOrObject.superTypeListEntries val hasSuperClass = entries.any { it is KtSuperTypeCallEntry } if (baseClass.qualifiedName == classOrObject.defaultJavaAncestorQualifiedName() && (!hasSuperClass || checkDeep)) { return MATCH } - if (checkDeep && baseClass.qualifiedName == CommonClassNames.JAVA_LANG_OBJECT) { - return MATCH - } val amongEntries = isAmongEntries(baseClass, entries) return when { !checkDeep -> amongEntries diff --git a/idea/idea-analysis/src/org/jetbrains/kotlin/idea/caches/lightClasses/decompiledDeclarations/KtLightClassForDecompiledDeclaration.kt b/idea/idea-analysis/src/org/jetbrains/kotlin/idea/caches/lightClasses/decompiledDeclarations/KtLightClassForDecompiledDeclaration.kt index 9a6ad868b1a..dd8beadce14 100644 --- a/idea/idea-analysis/src/org/jetbrains/kotlin/idea/caches/lightClasses/decompiledDeclarations/KtLightClassForDecompiledDeclaration.kt +++ b/idea/idea-analysis/src/org/jetbrains/kotlin/idea/caches/lightClasses/decompiledDeclarations/KtLightClassForDecompiledDeclaration.kt @@ -10,28 +10,27 @@ import com.intellij.psi.* import com.intellij.psi.impl.PsiClassImplUtil import com.intellij.psi.impl.PsiImplUtil import com.intellij.psi.impl.PsiSuperMethodImplUtil -import com.intellij.psi.impl.source.PsiExtensibleClass import com.intellij.psi.javadoc.PsiDocComment import com.intellij.psi.scope.PsiScopeProcessor import com.intellij.psi.util.PsiUtil import org.jetbrains.annotations.NonNls import org.jetbrains.kotlin.analyzer.KotlinModificationTrackerService import org.jetbrains.kotlin.asJava.classes.KotlinClassInnerStuffCache -import org.jetbrains.kotlin.asJava.classes.KtLightClass import org.jetbrains.kotlin.asJava.classes.LightClassesLazyCreator import org.jetbrains.kotlin.asJava.classes.lazyPub -import org.jetbrains.kotlin.asJava.elements.KtLightElementBase +import org.jetbrains.kotlin.idea.caches.lightClasses.decompiledDeclarations.KtLightEnumEntryForDecompiledDeclaration +import org.jetbrains.kotlin.idea.caches.lightClasses.decompiledDeclarations.KtLightFieldForDecompiledDeclaration +import org.jetbrains.kotlin.idea.caches.lightClasses.decompiledDeclarations.KtLightMethodForDecompiledDeclaration import org.jetbrains.kotlin.idea.decompiler.classFile.KtClsFile import org.jetbrains.kotlin.load.java.structure.LightClassOriginKind import org.jetbrains.kotlin.psi.KtClassOrObject -import org.jetbrains.kotlin.idea.caches.lightClasses.decompiledDeclarations.* open class KtLightClassForDecompiledDeclaration( override val clsDelegate: PsiClass, private val clsParent: PsiElement, private val file: KtClsFile, - final override val kotlinOrigin: KtClassOrObject? -) : KtLightElementBase(clsParent), PsiClass, KtLightClass, PsiExtensibleClass { + kotlinOrigin: KtClassOrObject? +) : KtLightClassForDecompiledDeclarationBase(clsDelegate, clsParent, kotlinOrigin) { private val myInnersCache = KotlinClassInnerStuffCache( myClass = this, diff --git a/idea/idea-analysis/src/org/jetbrains/kotlin/idea/caches/project/IdeaModuleInfos.kt b/idea/idea-analysis/src/org/jetbrains/kotlin/idea/caches/project/IdeaModuleInfos.kt index 0d15a2642ab..7ca053f60b5 100644 --- a/idea/idea-analysis/src/org/jetbrains/kotlin/idea/caches/project/IdeaModuleInfos.kt +++ b/idea/idea-analysis/src/org/jetbrains/kotlin/idea/caches/project/IdeaModuleInfos.kt @@ -173,7 +173,7 @@ private fun ideaModelDependencies( return correctedResult } -private fun TargetPlatform.canDependOn(other: IdeaModuleInfo, isHmppEnabled: Boolean): Boolean { +internal fun TargetPlatform.canDependOn(other: IdeaModuleInfo, isHmppEnabled: Boolean): Boolean { if (isHmppEnabled) { // HACK: allow depending on stdlib even if platforms do not match if (isNative() && other is AbstractKlibLibraryInfo && other.libraryRoot.endsWith(KONAN_STDLIB_NAME)) return true diff --git a/idea/idea-analysis/src/org/jetbrains/kotlin/idea/caches/project/LibraryDependenciesCache.kt b/idea/idea-analysis/src/org/jetbrains/kotlin/idea/caches/project/LibraryDependenciesCache.kt index c12a7514054..8ce53fdfddf 100644 --- a/idea/idea-analysis/src/org/jetbrains/kotlin/idea/caches/project/LibraryDependenciesCache.kt +++ b/idea/idea-analysis/src/org/jetbrains/kotlin/idea/caches/project/LibraryDependenciesCache.kt @@ -19,6 +19,7 @@ import com.intellij.util.containers.ContainerUtil import com.intellij.util.containers.MultiMap import org.jetbrains.kotlin.idea.core.util.CachedValue import org.jetbrains.kotlin.idea.core.util.getValue +import org.jetbrains.kotlin.idea.project.isHMPPEnabled import org.jetbrains.kotlin.platform.TargetPlatform import org.jetbrains.kotlin.platform.isCommon import java.util.* @@ -62,7 +63,7 @@ class LibraryDependenciesCacheImpl(private val project: Project) : LibraryDepend val platform = libraryInfo.platform - for (module in getLibraryUsageIndex().modulesLibraryIsUsedIn[libraryInfo.library]) { + for (module in getLibraryUsageIndex().getModulesLibraryIsUsedIn(libraryInfo)) { if (!processedModules.add(module)) continue ModuleRootManager.getInstance(module).orderEntries().recursively().satisfying(condition).process(object : RootPolicy() { @@ -109,7 +110,7 @@ class LibraryDependenciesCacheImpl(private val project: Project) : LibraryDepend } private inner class LibraryUsageIndex { - val modulesLibraryIsUsedIn: MultiMap = MultiMap.createSet() + private val modulesLibraryIsUsedIn: MultiMap = MultiMap.createSet() init { for (module in ModuleManager.getInstance(project).modules) { @@ -123,5 +124,15 @@ class LibraryDependenciesCacheImpl(private val project: Project) : LibraryDepend } } } + + fun getModulesLibraryIsUsedIn(libraryInfo: LibraryInfo) = sequence { + val ideaModelInfosCache = getIdeaModelInfosCache(project) + for (module in modulesLibraryIsUsedIn[libraryInfo.library]) { + val mappedModuleInfos = ideaModelInfosCache.getModuleInfosForModule(module) + if (mappedModuleInfos.any { it.platform.canDependOn(libraryInfo, module.isHMPPEnabled) }) { + yield(module) + } + } + } } } diff --git a/idea/idea-analysis/src/org/jetbrains/kotlin/idea/caches/resolve/IDEKotlinAsJavaSupport.kt b/idea/idea-analysis/src/org/jetbrains/kotlin/idea/caches/resolve/IDEKotlinAsJavaSupport.kt index 20e854c418d..0af2d79da46 100644 --- a/idea/idea-analysis/src/org/jetbrains/kotlin/idea/caches/resolve/IDEKotlinAsJavaSupport.kt +++ b/idea/idea-analysis/src/org/jetbrains/kotlin/idea/caches/resolve/IDEKotlinAsJavaSupport.kt @@ -250,6 +250,8 @@ open class IDEKotlinAsJavaSupport(private val project: Project) : KotlinAsJavaSu } } + override fun getFakeLightClass(classOrObject: KtClassOrObject): KtFakeLightClass = + KtDescriptorBasedFakeLightClass(classOrObject) // NOTE: this is a hacky solution to the following problem: // when building this light class resolver will be built by the first file in the list diff --git a/idea/idea-analysis/src/org/jetbrains/kotlin/idea/caches/resolve/IDELightClassGenerationSupport.kt b/idea/idea-analysis/src/org/jetbrains/kotlin/idea/caches/resolve/IDELightClassGenerationSupport.kt index 00c01264e52..81a5c035f45 100644 --- a/idea/idea-analysis/src/org/jetbrains/kotlin/idea/caches/resolve/IDELightClassGenerationSupport.kt +++ b/idea/idea-analysis/src/org/jetbrains/kotlin/idea/caches/resolve/IDELightClassGenerationSupport.kt @@ -31,9 +31,12 @@ import org.jetbrains.kotlin.idea.FrontendInternals import org.jetbrains.kotlin.idea.caches.lightClasses.IDELightClassContexts import org.jetbrains.kotlin.idea.caches.lightClasses.LazyLightClassDataHolder import org.jetbrains.kotlin.idea.project.languageVersionSettings +import org.jetbrains.kotlin.idea.project.platform import org.jetbrains.kotlin.idea.resolve.frontendService import org.jetbrains.kotlin.idea.stubindex.KotlinTypeAliasShortNameIndex import org.jetbrains.kotlin.name.Name +import org.jetbrains.kotlin.platform.jvm.JdkPlatform +import org.jetbrains.kotlin.platform.subplatformsOfType import org.jetbrains.kotlin.psi.* import org.jetbrains.kotlin.resolve.BindingContext import org.jetbrains.kotlin.resolve.deprecation.DeprecationResolver @@ -82,7 +85,7 @@ class IDELightClassGenerationSupport(project: Project) : LightClassGenerationSup BindingContext.EMPTY, ClassBuilderMode.LIGHT_CLASSES, moduleName, languageVersionSettings, useOldInlineClassesManglingScheme = false, - jvmTarget = JvmTarget.JVM_1_8, + jvmTarget = module?.platform?.subplatformsOfType()?.firstOrNull()?.targetVersion ?: JvmTarget.DEFAULT, typePreprocessor = KotlinType::cleanFromAnonymousTypes, namePreprocessor = ::tryGetPredefinedName ) diff --git a/idea/idea-analysis/src/org/jetbrains/kotlin/idea/caches/resolve/ModuleResolutionFacadeImpl.kt b/idea/idea-analysis/src/org/jetbrains/kotlin/idea/caches/resolve/ModuleResolutionFacadeImpl.kt index ec92de74a0e..39e05c2e189 100644 --- a/idea/idea-analysis/src/org/jetbrains/kotlin/idea/caches/resolve/ModuleResolutionFacadeImpl.kt +++ b/idea/idea-analysis/src/org/jetbrains/kotlin/idea/caches/resolve/ModuleResolutionFacadeImpl.kt @@ -26,6 +26,7 @@ import org.jetbrains.kotlin.container.tryGetService import org.jetbrains.kotlin.descriptors.DeclarationDescriptor import org.jetbrains.kotlin.descriptors.ModuleDescriptor import org.jetbrains.kotlin.idea.FrontendInternals +import org.jetbrains.kotlin.diagnostics.DiagnosticSink import org.jetbrains.kotlin.idea.caches.project.IdeaModuleInfo import org.jetbrains.kotlin.idea.project.ResolveElementCache import org.jetbrains.kotlin.idea.resolve.ResolutionFacade @@ -75,11 +76,14 @@ internal class ModuleResolutionFacadeImpl( } } - override fun analyzeWithAllCompilerChecks(elements: Collection): AnalysisResult { + override fun analyzeWithAllCompilerChecks( + elements: Collection, + callback: DiagnosticSink.DiagnosticsCallback? + ): AnalysisResult { ResolveInDispatchThreadManager.assertNoResolveInDispatchThread() return runWithCancellationCheck { - projectFacade.getAnalysisResultsForElements(elements) + projectFacade.getAnalysisResultsForElements(elements, callback) } } diff --git a/idea/idea-analysis/src/org/jetbrains/kotlin/idea/caches/resolve/PerFileAnalysisCache.kt b/idea/idea-analysis/src/org/jetbrains/kotlin/idea/caches/resolve/PerFileAnalysisCache.kt index 91bf8671418..84c206f2acd 100644 --- a/idea/idea-analysis/src/org/jetbrains/kotlin/idea/caches/resolve/PerFileAnalysisCache.kt +++ b/idea/idea-analysis/src/org/jetbrains/kotlin/idea/caches/resolve/PerFileAnalysisCache.kt @@ -23,6 +23,7 @@ import org.jetbrains.kotlin.context.withModule import org.jetbrains.kotlin.context.withProject import org.jetbrains.kotlin.descriptors.ModuleDescriptor import org.jetbrains.kotlin.diagnostics.Diagnostic +import org.jetbrains.kotlin.diagnostics.DiagnosticSink import org.jetbrains.kotlin.diagnostics.DiagnosticUtils import org.jetbrains.kotlin.frontend.di.createContainerForLazyBodyResolve import org.jetbrains.kotlin.idea.caches.project.getModuleInfo @@ -89,32 +90,50 @@ internal class PerFileAnalysisCache(val file: KtFile, componentProvider: Compone return null } - internal fun getAnalysisResults(element: KtElement): AnalysisResult { + internal fun getAnalysisResults(element: KtElement, callback: DiagnosticSink.DiagnosticsCallback? = null): AnalysisResult { check(element) val analyzableParent = KotlinResolveDataProvider.findAnalyzableParent(element) ?: return AnalysisResult.EMPTY + fun handleResult(result: AnalysisResult, callback: DiagnosticSink.DiagnosticsCallback?): AnalysisResult { + callback?.let { result.bindingContext.diagnostics.forEach(it::callback) } + return result + } + return guardLock.guarded { // step 1: perform incremental analysis IF it is applicable - getIncrementalAnalysisResult()?.let { return@guarded it } + getIncrementalAnalysisResult(callback)?.let { + return@guarded handleResult(it, callback) + } // cache does not contain AnalysisResult per each kt/psi element // instead it looks up analysis for its parents - see lookUp(analyzableElement) // step 2: return result if it is cached lookUp(analyzableParent)?.let { - return@guarded it + return@guarded handleResult(it, callback) } + val localDiagnostics = mutableSetOf() + val localCallback = if (callback != null) { d: Diagnostic -> + localDiagnostics.add(d) + callback.callback(d) + } else null + // step 3: perform analyze of analyzableParent as nothing has been cached yet - val result = analyze(analyzableParent) + val result = analyze(analyzableParent, null, localCallback) + + // some of diagnostics could be not handled with a callback - send out the rest + callback?.let { c -> + result.bindingContext.diagnostics.filterNot { it in localDiagnostics }.forEach(c::callback) + } cache[analyzableParent] = result return@guarded result } } - private fun getIncrementalAnalysisResult(): AnalysisResult? { + private fun getIncrementalAnalysisResult(callback: DiagnosticSink.DiagnosticsCallback?): AnalysisResult? { updateFileResultFromCache() val inBlockModifications = file.inBlockModifications @@ -151,7 +170,9 @@ internal class PerFileAnalysisCache(val file: KtFile, componentProvider: Compone ) } - val newResult = analyze(inBlockModification, trace) + callback?.let { trace.parentDiagnosticsApartElement.forEach(it::callback) } + + val newResult = analyze(inBlockModification, trace, callback) analysisResult = wrapResult(result, newResult, trace) } file.clearInBlockModifications() @@ -224,7 +245,11 @@ internal class PerFileAnalysisCache(val file: KtFile, componentProvider: Compone } } - private fun analyze(analyzableElement: KtElement, bindingTrace: BindingTrace? = null): AnalysisResult { + private fun analyze( + analyzableElement: KtElement, + bindingTrace: BindingTrace?, + callback: DiagnosticSink.DiagnosticsCallback? + ): AnalysisResult { ProgressIndicatorProvider.checkCanceled() val project = analyzableElement.project @@ -242,7 +267,8 @@ internal class PerFileAnalysisCache(val file: KtFile, componentProvider: Compone codeFragmentAnalyzer, bodyResolveCache, analyzableElement, - bindingTrace + bindingTrace, + callback ) } catch (e: ProcessCanceledException) { throw e @@ -412,12 +438,14 @@ private object KotlinResolveDataProvider { codeFragmentAnalyzer: CodeFragmentAnalyzer, bodyResolveCache: BodyResolveCache, analyzableElement: KtElement, - bindingTrace: BindingTrace? + bindingTrace: BindingTrace?, + callback: DiagnosticSink.DiagnosticsCallback? ): AnalysisResult { try { if (analyzableElement is KtCodeFragment) { val bodyResolveMode = BodyResolveMode.PARTIAL_FOR_COMPLETION - val bindingContext = codeFragmentAnalyzer.analyzeCodeFragment(analyzableElement, bodyResolveMode).bindingContext + val trace: BindingTrace = codeFragmentAnalyzer.analyzeCodeFragment(analyzableElement, bodyResolveMode) + val bindingContext = trace.bindingContext return AnalysisResult.success(bindingContext, moduleDescriptor) } @@ -427,34 +455,40 @@ private object KotlinResolveDataProvider { allowSliceRewrite = true ) - val moduleInfo = analyzableElement.containingFile.getModuleInfo() + val moduleInfo = analyzableElement.containingKtFile.getModuleInfo() val targetPlatform = moduleInfo.platform - /* - Note that currently we *have* to re-create LazyTopDownAnalyzer with custom trace in order to disallow resolution of - bodies in top-level trace (trace from DI-container). - Resolving bodies in top-level trace may lead to memory leaks and incorrect resolution, because top-level - trace isn't invalidated on in-block modifications (while body resolution surely does) + callback?.let { trace.setCallback(it) } - Also note that for function bodies, we'll create DelegatingBindingTrace in ResolveElementCache anyways - (see 'functionAdditionalResolve'). However, this trace is still needed, because we have other - codepaths for other KtDeclarationWithBodies (like property accessors/secondary constructors/class initializers) - */ - val lazyTopDownAnalyzer = createContainerForLazyBodyResolve( - //TODO: should get ModuleContext - globalContext.withProject(project).withModule(moduleDescriptor), - resolveSession, - trace, - targetPlatform, - bodyResolveCache, - targetPlatform.findAnalyzerServices(project), - analyzableElement.languageVersionSettings, - IdeaModuleStructureOracle(), - IdeMainFunctionDetectorFactory() - ).get() + try { + /* + Note that currently we *have* to re-create LazyTopDownAnalyzer with custom trace in order to disallow resolution of + bodies in top-level trace (trace from DI-container). + Resolving bodies in top-level trace may lead to memory leaks and incorrect resolution, because top-level + trace isn't invalidated on in-block modifications (while body resolution surely does) - lazyTopDownAnalyzer.analyzeDeclarations(TopDownAnalysisMode.TopLevelDeclarations, listOf(analyzableElement)) + Also note that for function bodies, we'll create DelegatingBindingTrace in ResolveElementCache anyways + (see 'functionAdditionalResolve'). However, this trace is still needed, because we have other + codepaths for other KtDeclarationWithBodies (like property accessors/secondary constructors/class initializers) + */ + val lazyTopDownAnalyzer = createContainerForLazyBodyResolve( + //TODO: should get ModuleContext + globalContext.withProject(project).withModule(moduleDescriptor), + resolveSession, + trace, + targetPlatform, + bodyResolveCache, + targetPlatform.findAnalyzerServices(project), + analyzableElement.languageVersionSettings, + IdeaModuleStructureOracle(), + IdeMainFunctionDetectorFactory() + ).get() + + lazyTopDownAnalyzer.analyzeDeclarations(TopDownAnalysisMode.TopLevelDeclarations, listOf(analyzableElement)) + } finally { + trace.resetCallback() + } return AnalysisResult.success(trace.bindingContext, moduleDescriptor) } catch (e: ProcessCanceledException) { diff --git a/idea/idea-analysis/src/org/jetbrains/kotlin/idea/caches/resolve/ProjectResolutionFacade.kt b/idea/idea-analysis/src/org/jetbrains/kotlin/idea/caches/resolve/ProjectResolutionFacade.kt index 14c2100ab61..416bd50016b 100644 --- a/idea/idea-analysis/src/org/jetbrains/kotlin/idea/caches/resolve/ProjectResolutionFacade.kt +++ b/idea/idea-analysis/src/org/jetbrains/kotlin/idea/caches/resolve/ProjectResolutionFacade.kt @@ -17,6 +17,7 @@ import org.jetbrains.kotlin.analyzer.* import org.jetbrains.kotlin.context.GlobalContextImpl import org.jetbrains.kotlin.context.withProject import org.jetbrains.kotlin.descriptors.ModuleDescriptor +import org.jetbrains.kotlin.diagnostics.DiagnosticSink import org.jetbrains.kotlin.idea.caches.project.* import org.jetbrains.kotlin.idea.caches.project.IdeaModuleInfo import org.jetbrains.kotlin.idea.caches.trackers.KotlinCodeBlockModificationListener @@ -143,10 +144,13 @@ internal class ProjectResolutionFacade( internal fun findModuleDescriptor(ideaModuleInfo: IdeaModuleInfo): ModuleDescriptor { return cachedResolverForProject.descriptorForModule(ideaModuleInfo) } - + internal fun getResolverForProject(): ResolverForProject = cachedResolverForProject - internal fun getAnalysisResultsForElements(elements: Collection): AnalysisResult { + internal fun getAnalysisResultsForElements( + elements: Collection, + callback: DiagnosticSink.DiagnosticsCallback? = null + ): AnalysisResult { assert(elements.isNotEmpty()) { "elements collection should not be empty" } val cache = analysisResultsSimpleLock.guarded { @@ -157,7 +161,7 @@ internal class ProjectResolutionFacade( val containingKtFile = it.containingKtFile val perFileCache = cache[containingKtFile] try { - perFileCache.getAnalysisResults(it) + perFileCache.getAnalysisResults(it, callback) } catch (e: Throwable) { if (e is ControlFlowException) { throw e diff --git a/idea/idea-analysis/src/org/jetbrains/kotlin/idea/caches/resolve/ResolutionFacadeWithDebugInfo.kt b/idea/idea-analysis/src/org/jetbrains/kotlin/idea/caches/resolve/ResolutionFacadeWithDebugInfo.kt index 685dd37ef16..3ba69c97048 100644 --- a/idea/idea-analysis/src/org/jetbrains/kotlin/idea/caches/resolve/ResolutionFacadeWithDebugInfo.kt +++ b/idea/idea-analysis/src/org/jetbrains/kotlin/idea/caches/resolve/ResolutionFacadeWithDebugInfo.kt @@ -18,6 +18,7 @@ import org.jetbrains.kotlin.analyzer.ResolverForProject import org.jetbrains.kotlin.descriptors.DeclarationDescriptor import org.jetbrains.kotlin.descriptors.ModuleDescriptor import org.jetbrains.kotlin.idea.FrontendInternals +import org.jetbrains.kotlin.diagnostics.DiagnosticSink import org.jetbrains.kotlin.idea.caches.project.IdeaModuleInfo import org.jetbrains.kotlin.idea.caches.project.getNullableModuleInfo import org.jetbrains.kotlin.idea.resolve.ResolutionFacade @@ -52,9 +53,12 @@ private class ResolutionFacadeWithDebugInfo( } } - override fun analyzeWithAllCompilerChecks(elements: Collection): AnalysisResult { + override fun analyzeWithAllCompilerChecks( + elements: Collection, + callback: DiagnosticSink.DiagnosticsCallback? + ): AnalysisResult { return wrapExceptions({ ResolvingWhat(elements) }) { - delegate.analyzeWithAllCompilerChecks(elements) + delegate.analyzeWithAllCompilerChecks(elements, callback) } } diff --git a/idea/idea-analysis/src/org/jetbrains/kotlin/idea/highlighter/AbstractBindingContextAwareHighlightingPassBase.kt b/idea/idea-analysis/src/org/jetbrains/kotlin/idea/highlighter/AbstractBindingContextAwareHighlightingPassBase.kt new file mode 100644 index 00000000000..919daceea10 --- /dev/null +++ b/idea/idea-analysis/src/org/jetbrains/kotlin/idea/highlighter/AbstractBindingContextAwareHighlightingPassBase.kt @@ -0,0 +1,47 @@ +/* + * Copyright 2010-2020 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. + */ + +package org.jetbrains.kotlin.idea.highlighter + +import com.intellij.lang.annotation.AnnotationHolder +import com.intellij.lang.annotation.Annotator +import com.intellij.openapi.editor.Document +import com.intellij.psi.PsiElement +import com.intellij.psi.PsiRecursiveElementVisitor +import org.jetbrains.kotlin.idea.caches.resolve.analyzeWithAllCompilerChecks +import org.jetbrains.kotlin.psi.KtFile +import org.jetbrains.kotlin.resolve.BindingContext + +@Suppress("UnstableApiUsage") +abstract class AbstractBindingContextAwareHighlightingPassBase( + file: KtFile, + document: Document +) : AbstractHighlightingPassBase(file, document) { + + private val cachedAnnotator by lazy { annotator } + + protected abstract val annotator: Annotator + + private var bindingContext: BindingContext? = null + + protected fun bindingContext(): BindingContext = bindingContext ?: error("bindingContext has to be acquired") + + protected open fun buildBindingContext(holder: AnnotationHolder): BindingContext = + file.analyzeWithAllCompilerChecks().also { it.throwIfError() }.bindingContext + + override fun runAnnotatorWithContext(element: PsiElement, holder: AnnotationHolder) { + bindingContext = buildBindingContext(holder) + try { + element.accept(object : PsiRecursiveElementVisitor() { + override fun visitElement(element: PsiElement) { + cachedAnnotator.annotate(element, holder) + super.visitElement(element) + } + }) + } finally { + bindingContext = null + } + } +} \ No newline at end of file diff --git a/idea/idea-analysis/src/org/jetbrains/kotlin/idea/highlighter/AbstractKotlinHighlightingPass.kt b/idea/idea-analysis/src/org/jetbrains/kotlin/idea/highlighter/AbstractKotlinHighlightingPass.kt new file mode 100644 index 00000000000..3e9ae6bd035 --- /dev/null +++ b/idea/idea-analysis/src/org/jetbrains/kotlin/idea/highlighter/AbstractKotlinHighlightingPass.kt @@ -0,0 +1,293 @@ +/* + * Copyright 2010-2020 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. + */ + +package org.jetbrains.kotlin.idea.highlighter + +import com.intellij.codeInsight.daemon.impl.Divider +import com.intellij.codeInsight.intention.IntentionAction +import com.intellij.lang.annotation.Annotation +import com.intellij.lang.annotation.AnnotationHolder +import com.intellij.lang.annotation.Annotator +import com.intellij.openapi.diagnostic.Logger +import com.intellij.openapi.editor.Document +import com.intellij.openapi.util.Key +import com.intellij.openapi.util.TextRange +import com.intellij.psi.PsiElement +import com.intellij.util.CommonProcessors +import com.intellij.util.containers.MultiMap +import org.jetbrains.kotlin.descriptors.DeclarationDescriptor +import org.jetbrains.kotlin.diagnostics.Diagnostic +import org.jetbrains.kotlin.diagnostics.DiagnosticFactory +import org.jetbrains.kotlin.diagnostics.Errors +import org.jetbrains.kotlin.diagnostics.rendering.RenderingContext +import org.jetbrains.kotlin.idea.caches.resolve.analyzeWithAllCompilerChecks +import org.jetbrains.kotlin.idea.quickfix.QuickFixes +import org.jetbrains.kotlin.psi.KtFile +import org.jetbrains.kotlin.psi.KtNameReferenceExpression +import org.jetbrains.kotlin.psi.KtParameter +import org.jetbrains.kotlin.resolve.BindingContext +import org.jetbrains.kotlin.types.KotlinType +import java.lang.reflect.* +import java.util.* + +abstract class AbstractKotlinHighlightingPass(file: KtFile, document: Document) : + AbstractBindingContextAwareHighlightingPassBase(file, document) { + override val annotator: Annotator + get() = KotlinAfterAnalysisAnnotator() + + private inner class KotlinAfterAnalysisAnnotator : Annotator { + override fun annotate(element: PsiElement, holder: AnnotationHolder) { + val bindingContext = bindingContext() + getAfterAnalysisVisitor(holder, bindingContext).forEach { visitor -> element.accept(visitor) } + } + } + + override fun buildBindingContext(holder: AnnotationHolder): BindingContext { + val dividedElements: List = ArrayList() + Divider.divideInsideAndOutsideAllRoots( + file, file.textRange, file.textRange, { true }, + CommonProcessors.CollectProcessor(dividedElements) + ) + // TODO: for the sake of check that element belongs to the file + // for some reason analyzeWithAllCompilerChecks could return psiElements those do not belong to the file + // see [ScriptConfigurationHighlightingTestGenerated$Highlighting.testCustomExtension] + val elements = dividedElements.flatMap(Divider.DividedElements::inside).toSet() + + // annotate diagnostics on fly: show diagnostics as soon as front-end reports them + // don't create quick fixes as it could require some resolve + val annotationByDiagnostic = mutableMapOf() + val annotationByTextRange = mutableMapOf() + + // render of on-fly diagnostics with descriptors could lead to recursion + fun checkIfDescriptor(candidate: Any?): Boolean = + candidate is DeclarationDescriptor || candidate is Collection<*> && candidate.any(::checkIfDescriptor) + + val analysisResult = + file.analyzeWithAllCompilerChecks({ + val element = it.psiElement + if (element in elements && + it !in annotationByDiagnostic && + !RenderingContext.parameters(it).any(::checkIfDescriptor) + ) { + annotateDiagnostic(element, holder, it, annotationByDiagnostic, annotationByTextRange) + } + }).also { it.throwIfError() } + // resolve is done! + + val bindingContext = analysisResult.bindingContext + + cleanUpCalculatingAnnotations(annotationByTextRange) + // TODO: for some reasons it could be duplicated diagnostics for the same factory + // see [PsiCheckerTestGenerated$Checker.testRedeclaration] + val diagnostics = bindingContext.diagnostics.asSequence().filter { it.psiElement in elements }.toSet() + + if (diagnostics.isNotEmpty()) { + // annotate diagnostics those were not possible to render on fly + diagnostics.asSequence().filterNot { it in annotationByDiagnostic }.forEach { + annotateDiagnostic(it.psiElement, holder, it, annotationByDiagnostic, calculatingInProgress = false) + } + // apply quick fixes for all diagnostics grouping by element + diagnostics.groupBy(Diagnostic::psiElement).forEach { + annotateQuickFixes(it.key, it.value, annotationByDiagnostic) + } + } + return bindingContext + } + + private fun annotateDiagnostic( + element: PsiElement, + holder: AnnotationHolder, + diagnostic: Diagnostic, + annotationByDiagnostic: MutableMap? = null, + annotationByTextRange: MutableMap? = null, + calculatingInProgress: Boolean = true + ) = annotateDiagnostics(element, holder, listOf(diagnostic), annotationByDiagnostic, annotationByTextRange, true, calculatingInProgress) + + private fun cleanUpCalculatingAnnotations(annotationByTextRange: Map) { + annotationByTextRange.values.forEach { annotation -> + annotation.quickFixes?.removeIf { + it.quickFix is CalculatingIntentionAction + } + } + } + + private fun annotateDiagnostics( + element: PsiElement, + holder: AnnotationHolder, + diagnostics: List, + annotationByDiagnostic: MutableMap? = null, + annotationByTextRange: MutableMap? = null, + noFixes: Boolean = false, + calculatingInProgress: Boolean = false + ) = annotateDiagnostics( + file, element, holder, diagnostics, annotationByDiagnostic, annotationByTextRange, + ::shouldSuppressUnusedParameter, + noFixes = noFixes, calculatingInProgress = calculatingInProgress + ) + + /** + * [diagnostics] has to belong to the same element + */ + private fun annotateQuickFixes( + element: PsiElement, + diagnostics: List, + annotationByDiagnostic: MutableMap + ) { + if (diagnostics.isEmpty()) return + + assertBelongsToTheSameElement(element, diagnostics) + + val shouldHighlightErrors = + KotlinHighlightingUtil.shouldHighlightErrors( + if (element.isPhysical) file else element + ) + + if (shouldHighlightErrors) { + ElementAnnotator(element) { param -> + shouldSuppressUnusedParameter(param) + }.registerDiagnosticsQuickFixes(diagnostics, annotationByDiagnostic) + } + } + + protected open fun shouldSuppressUnusedParameter(parameter: KtParameter): Boolean = false + + companion object { + fun createQuickFixes(diagnostic: Diagnostic): Collection = + createQuickFixes(listOfNotNull(diagnostic))[diagnostic] + + private val UNRESOLVED_KEY = Key("KotlinHighlightingPass.UNRESOLVED_KEY") + + fun wasUnresolved(element: KtNameReferenceExpression) = element.getUserData(UNRESOLVED_KEY) != null + + fun getAfterAnalysisVisitor(holder: AnnotationHolder, bindingContext: BindingContext) = arrayOf( + PropertiesHighlightingVisitor(holder, bindingContext), + FunctionsHighlightingVisitor(holder, bindingContext), + VariablesHighlightingVisitor(holder, bindingContext), + TypeKindHighlightingVisitor(holder, bindingContext) + ) + + private fun assertBelongsToTheSameElement(element: PsiElement, diagnostics: Collection) { + assert(diagnostics.all { it.psiElement == element }) + } + + fun annotateDiagnostics( + file: KtFile, + element: PsiElement, + holder: AnnotationHolder, + diagnostics: Collection, + annotationByDiagnostic: MutableMap? = null, + annotationByTextRange: MutableMap? = null, + shouldSuppressUnusedParameter: (KtParameter) -> Boolean = { false }, + noFixes: Boolean = false, + calculatingInProgress: Boolean = false + ) { + if (diagnostics.isEmpty()) return + + assertBelongsToTheSameElement(element, diagnostics) + + if (element is KtNameReferenceExpression) { + val unresolved = diagnostics.any { it.factory == Errors.UNRESOLVED_REFERENCE } + element.putUserData(UNRESOLVED_KEY, if (unresolved) Unit else null) + } + + val shouldHighlightErrors = + KotlinHighlightingUtil.shouldHighlightErrors( + if (element.isPhysical) file else element + ) + + if (shouldHighlightErrors) { + val elementAnnotator = ElementAnnotator(element) { param -> + shouldSuppressUnusedParameter(param) + } + elementAnnotator.registerDiagnosticsAnnotations( + holder, diagnostics, annotationByDiagnostic, + annotationByTextRange, + noFixes = noFixes, calculatingInProgress = calculatingInProgress + ) + } + } + } +} + + +internal fun createQuickFixes(similarDiagnostics: Collection): MultiMap { + val first = similarDiagnostics.minByOrNull { it.toString() } + val factory = similarDiagnostics.first().getRealDiagnosticFactory() + + val actions = MultiMap() + + val intentionActionsFactories = QuickFixes.getInstance().getActionFactories(factory) + for (intentionActionsFactory in intentionActionsFactories) { + val allProblemsActions = intentionActionsFactory.createActionsForAllProblems(similarDiagnostics) + if (allProblemsActions.isNotEmpty()) { + actions.putValues(first, allProblemsActions) + } else { + for (diagnostic in similarDiagnostics) { + actions.putValues(diagnostic, intentionActionsFactory.createActions(diagnostic)) + } + } + } + + for (diagnostic in similarDiagnostics) { + actions.putValues(diagnostic, QuickFixes.getInstance().getActions(diagnostic.factory)) + } + + actions.values().forEach { NoDeclarationDescriptorsChecker.check(it::class.java) } + + return actions +} + +private fun Diagnostic.getRealDiagnosticFactory(): DiagnosticFactory<*> = + when (factory) { + Errors.PLUGIN_ERROR -> Errors.PLUGIN_ERROR.cast(this).a.factory + Errors.PLUGIN_WARNING -> Errors.PLUGIN_WARNING.cast(this).a.factory + Errors.PLUGIN_INFO -> Errors.PLUGIN_INFO.cast(this).a.factory + else -> factory + } + +private object NoDeclarationDescriptorsChecker { + private val LOG = Logger.getInstance(NoDeclarationDescriptorsChecker::class.java) + + private val checkedQuickFixClasses = Collections.synchronizedSet(HashSet>()) + + fun check(quickFixClass: Class<*>) { + if (!checkedQuickFixClasses.add(quickFixClass)) return + + for (field in quickFixClass.declaredFields) { + checkType(field.genericType, field) + } + + quickFixClass.superclass?.let { check(it) } + } + + private fun checkType(type: Type, field: Field) { + when (type) { + is Class<*> -> { + if (DeclarationDescriptor::class.java.isAssignableFrom(type) || KotlinType::class.java.isAssignableFrom(type)) { + LOG.error( + "QuickFix class ${field.declaringClass.name} contains field ${field.name} that holds ${type.simpleName}. " + + "This leads to holding too much memory through this quick-fix instance. " + + "Possible solution can be wrapping it using KotlinIntentionActionFactoryWithDelegate." + ) + } + + if (IntentionAction::class.java.isAssignableFrom(type)) { + check(type) + } + + } + + is GenericArrayType -> checkType(type.genericComponentType, field) + + is ParameterizedType -> { + if (Collection::class.java.isAssignableFrom(type.rawType as Class<*>)) { + type.actualTypeArguments.forEach { checkType(it, field) } + } + } + + is WildcardType -> type.upperBounds.forEach { checkType(it, field) } + } + } +} diff --git a/idea/idea-analysis/src/org/jetbrains/kotlin/idea/highlighter/AnnotationPresentationInfo.kt b/idea/idea-analysis/src/org/jetbrains/kotlin/idea/highlighter/AnnotationPresentationInfo.kt index cd8bd2cb27a..0c15bd0e46e 100644 --- a/idea/idea-analysis/src/org/jetbrains/kotlin/idea/highlighter/AnnotationPresentationInfo.kt +++ b/idea/idea-analysis/src/org/jetbrains/kotlin/idea/highlighter/AnnotationPresentationInfo.kt @@ -8,10 +8,9 @@ package org.jetbrains.kotlin.idea.highlighter import com.intellij.codeInsight.intention.EmptyIntentionAction import com.intellij.codeInsight.intention.IntentionAction import com.intellij.codeInspection.ProblemHighlightType -import com.intellij.lang.annotation.AnnotationBuilder +import com.intellij.lang.annotation.Annotation import com.intellij.lang.annotation.AnnotationHolder import com.intellij.lang.annotation.HighlightSeverity -import com.intellij.openapi.application.ApplicationManager import com.intellij.openapi.editor.colors.TextAttributesKey import com.intellij.openapi.util.TextRange import com.intellij.util.containers.MultiMap @@ -20,6 +19,8 @@ import org.jetbrains.kotlin.diagnostics.Diagnostic import org.jetbrains.kotlin.diagnostics.Severity import org.jetbrains.kotlin.diagnostics.rendering.DefaultErrorMessages import org.jetbrains.kotlin.idea.inspections.KotlinUniversalQuickFix +import org.jetbrains.kotlin.idea.util.application.isApplicationInternalMode +import org.jetbrains.kotlin.idea.util.application.isUnitTestMode class AnnotationPresentationInfo( val ranges: List, @@ -28,32 +29,59 @@ class AnnotationPresentationInfo( val textAttributes: TextAttributesKey? = null ) { - fun processDiagnostics(holder: AnnotationHolder, diagnostics: List, fixesMap: MultiMap) { + fun processDiagnostics( + holder: AnnotationHolder, + diagnostics: Collection, + annotationBuilderByDiagnostic: MutableMap? = null, + annotationByTextRange: MutableMap?, + fixesMap: MultiMap?, + calculatingInProgress: Boolean + ) { for (range in ranges) { for (diagnostic in diagnostics) { - val fixes = fixesMap[diagnostic] create(diagnostic, range, holder) { annotation -> - fixes.forEach { - when (it) { - is KotlinUniversalQuickFix -> annotation.newFix(it).universal().registerFix() - is IntentionAction -> annotation.newFix(it).registerFix() - } + annotationBuilderByDiagnostic?.put(diagnostic, annotation) + if (fixesMap != null) { + applyFixes(fixesMap, diagnostic, annotation) } - - if (diagnostic.severity == Severity.WARNING) { - annotation.problemGroup(KotlinSuppressableWarningProblemGroup(diagnostic.factory)) - - if (fixes.isEmpty()) { - // if there are no quick fixes we need to register an EmptyIntentionAction to enable 'suppress' actions - annotation.newFix(EmptyIntentionAction(diagnostic.factory.name!!)).registerFix() - } + if (calculatingInProgress && annotationByTextRange?.containsKey(range) == false) { + annotationByTextRange[range] = annotation + annotation.registerFix(CalculatingIntentionAction(), range) } } } } } - private fun create(diagnostic: Diagnostic, range: TextRange, holder: AnnotationHolder, consumer: (AnnotationBuilder) -> Unit) { + internal fun applyFixes( + fixesMap: MultiMap, + diagnostic: Diagnostic, + annotation: Annotation + ) { + val fixes = fixesMap[diagnostic] + val textRange = TextRange(annotation.startOffset, annotation.endOffset) + fixes.forEach { + when (it) { + is KotlinUniversalQuickFix -> { + annotation.registerBatchFix(it, textRange, null) + annotation.registerFix(it, textRange) + } + is IntentionAction -> { + annotation.registerFix(it, textRange) + } + } + } + + if (diagnostic.severity == Severity.WARNING) { + if (fixes.isEmpty()) { + // if there are no quick fixes we need to register an EmptyIntentionAction to enable 'suppress' actions + //annotation.newFix(EmptyIntentionAction(diagnostic.factory.name)).registerFix() + annotation.registerFix(EmptyIntentionAction(diagnostic.factory.name), textRange) + } + } + } + + private fun create(diagnostic: Diagnostic, range: TextRange, holder: AnnotationHolder, consumer: (Annotation) -> Unit) { val severity = when (diagnostic.severity) { Severity.ERROR -> HighlightSeverity.ERROR Severity.WARNING -> if (highlightType == ProblemHighlightType.WEAK_WARNING) { @@ -62,18 +90,26 @@ class AnnotationPresentationInfo( Severity.INFO -> HighlightSeverity.WEAK_WARNING } - holder.newAnnotation(severity, nonDefaultMessage ?: getDefaultMessage(diagnostic)) + + val message = nonDefaultMessage ?: getDefaultMessage(diagnostic) + holder.newAnnotation(severity, message) .range(range) .tooltip(getMessage(diagnostic)) .also { builder -> highlightType?.let { builder.highlightType(it) } } .also { builder -> textAttributes?.let { builder.textAttributes(it) } } - .also { consumer(it) } + .also { + if (diagnostic.severity == Severity.WARNING) { + it.problemGroup(KotlinSuppressableWarningProblemGroup(diagnostic.factory)) + } + } .create() + @Suppress("UNCHECKED_CAST") + (holder as? List)?.last()?.let(consumer::invoke) } private fun getMessage(diagnostic: Diagnostic): String { var message = IdeErrorMessages.render(diagnostic) - if (ApplicationManager.getApplication().isInternal || ApplicationManager.getApplication().isUnitTestMode) { + if (isApplicationInternalMode() || isUnitTestMode()) { val factoryName = diagnostic.factory.name message = if (message.startsWith("")) { "[$factoryName] ${message.substring("".length)}" @@ -89,10 +125,11 @@ class AnnotationPresentationInfo( private fun getDefaultMessage(diagnostic: Diagnostic): String { val message = DefaultErrorMessages.render(diagnostic) - if (ApplicationManager.getApplication().isInternal || ApplicationManager.getApplication().isUnitTestMode) { - return "[${diagnostic.factory.name}] $message" + return if (isApplicationInternalMode() || isUnitTestMode()) { + "[${diagnostic.factory.name}] $message" + } else { + message } - return message } } diff --git a/idea/idea-analysis/src/org/jetbrains/kotlin/idea/highlighter/CalculatingIntentionAction.kt b/idea/idea-analysis/src/org/jetbrains/kotlin/idea/highlighter/CalculatingIntentionAction.kt new file mode 100644 index 00000000000..488af96bdf8 --- /dev/null +++ b/idea/idea-analysis/src/org/jetbrains/kotlin/idea/highlighter/CalculatingIntentionAction.kt @@ -0,0 +1,30 @@ +/* + * Copyright 2010-2021 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. + */ + +package org.jetbrains.kotlin.idea.highlighter + +import com.intellij.codeInsight.intention.AbstractEmptyIntentionAction +import com.intellij.codeInsight.intention.LowPriorityAction +import com.intellij.icons.AllIcons +import com.intellij.openapi.editor.Editor +import com.intellij.openapi.project.Project +import com.intellij.openapi.util.Iconable +import com.intellij.psi.PsiFile +import org.jetbrains.kotlin.idea.KotlinIdeaAnalysisBundle +import javax.swing.Icon + +class CalculatingIntentionAction : AbstractEmptyIntentionAction(), LowPriorityAction, Iconable { + override fun getText(): String = KotlinIdeaAnalysisBundle.message("intention.calculating.text") + + override fun getFamilyName(): String = KotlinIdeaAnalysisBundle.message("intention.calculating.text") + + override fun isAvailable(project: Project, editor: Editor, file: PsiFile): Boolean = true + + override fun equals(other: Any?): Boolean = this === other || other is CalculatingIntentionAction + + override fun hashCode(): Int = 42 + + override fun getIcon(@Iconable.IconFlags flags: Int): Icon = AllIcons.Actions.Preview +} diff --git a/idea/idea-analysis/src/org/jetbrains/kotlin/idea/highlighter/DebugInfoHighlightingPass.kt b/idea/idea-analysis/src/org/jetbrains/kotlin/idea/highlighter/DebugInfoHighlightingPass.kt new file mode 100644 index 00000000000..beec88a4edb --- /dev/null +++ b/idea/idea-analysis/src/org/jetbrains/kotlin/idea/highlighter/DebugInfoHighlightingPass.kt @@ -0,0 +1,100 @@ +/* + * Copyright 2010-2020 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. + */ + +package org.jetbrains.kotlin.idea.highlighter + +import com.intellij.codeHighlighting.* +import com.intellij.lang.annotation.AnnotationHolder +import com.intellij.lang.annotation.Annotator +import com.intellij.lang.annotation.HighlightSeverity +import com.intellij.openapi.editor.Document +import com.intellij.openapi.editor.Editor +import com.intellij.openapi.editor.colors.TextAttributesKey +import com.intellij.openapi.progress.ProcessCanceledException +import com.intellij.openapi.project.Project +import com.intellij.psi.PsiElement +import com.intellij.psi.PsiFile +import org.jetbrains.kotlin.checkers.utils.DebugInfoUtil +import org.jetbrains.kotlin.idea.KotlinPluginUtil +import org.jetbrains.kotlin.idea.util.ProjectRootsUtil +import org.jetbrains.kotlin.idea.util.application.isApplicationInternalMode +import org.jetbrains.kotlin.psi.KtCodeFragment +import org.jetbrains.kotlin.psi.KtFile +import org.jetbrains.kotlin.psi.KtReferenceExpression + +class DebugInfoHighlightingPass(file: KtFile, document: Document) : AbstractBindingContextAwareHighlightingPassBase(file, document) { + override val annotator: Annotator + get() = DebugInfoAnnotator() + + private inner class DebugInfoAnnotator : Annotator { + override fun annotate(element: PsiElement, holder: AnnotationHolder) { + if (element is KtFile && element !is KtCodeFragment) { + fun errorAnnotation( + expression: PsiElement, + message: String, + textAttributes: TextAttributesKey? = KotlinHighlightingColors.DEBUG_INFO + ) = + holder.newAnnotation(HighlightSeverity.ERROR, "[DEBUG] $message") + .range(expression.textRange) + .also { + textAttributes?.let { ta -> it.textAttributes(ta) } + } + .create() + + try { + DebugInfoUtil.markDebugAnnotations(element, bindingContext(), object : DebugInfoUtil.DebugInfoReporter() { + override fun reportElementWithErrorType(expression: KtReferenceExpression) = + errorAnnotation(expression, "Resolved to error element", KotlinHighlightingColors.RESOLVED_TO_ERROR) + + override fun reportMissingUnresolved(expression: KtReferenceExpression) = + errorAnnotation( + expression, + "Reference is not resolved to anything, but is not marked unresolved" + ) + + override fun reportUnresolvedWithTarget(expression: KtReferenceExpression, target: String) = + errorAnnotation( + expression, + "Reference marked as unresolved is actually resolved to $target" + ) + }) + } catch (e: ProcessCanceledException) { + throw e + } catch (e: Throwable) { + // TODO + errorAnnotation(element, e.javaClass.canonicalName + ": " + e.message, null) + e.printStackTrace() + } + + } + } + } + + class Factory : TextEditorHighlightingPassFactory { + override fun createHighlightingPass(file: PsiFile, editor: Editor): TextEditorHighlightingPass? { + return if (file is KtFile && + (isApplicationInternalMode() && (KotlinPluginUtil.isSnapshotVersion() || KotlinPluginUtil.isDevVersion())) && + ProjectRootsUtil.isInProjectOrLibSource(file) + ) { + DebugInfoHighlightingPass(file, editor.document) + } else { + null + } + } + } + + class Registrar : TextEditorHighlightingPassFactoryRegistrar { + override fun registerHighlightingPassFactory(registrar: TextEditorHighlightingPassRegistrar, project: Project) { + registrar.registerTextEditorHighlightingPass( + Factory(), + /* runAfterCompletionOf = */ intArrayOf(Pass.UPDATE_ALL), + /* runAfterStartingOf = */ null, + /* runIntentionsPassAfter = */ false, + /* forcedPassId = */ -1 + ) + } + } + +} \ No newline at end of file diff --git a/idea/idea-analysis/src/org/jetbrains/kotlin/idea/highlighter/DuplicateJvmSignatureAnnotator.kt b/idea/idea-analysis/src/org/jetbrains/kotlin/idea/highlighter/DuplicateJvmSignatureAnnotator.kt deleted file mode 100644 index 56818c1b443..00000000000 --- a/idea/idea-analysis/src/org/jetbrains/kotlin/idea/highlighter/DuplicateJvmSignatureAnnotator.kt +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2010-2015 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.jetbrains.kotlin.idea.highlighter - -import com.intellij.lang.annotation.AnnotationHolder -import com.intellij.lang.annotation.Annotator -import com.intellij.psi.PsiElement -import org.jetbrains.kotlin.asJava.* -import org.jetbrains.kotlin.idea.caches.project.getModuleInfo -import org.jetbrains.kotlin.idea.caches.resolve.* -import org.jetbrains.kotlin.idea.project.TargetPlatformDetector -import org.jetbrains.kotlin.idea.util.ProjectRootsUtil -import org.jetbrains.kotlin.psi.KtDeclaration -import org.jetbrains.kotlin.psi.KtFile -import org.jetbrains.kotlin.platform.jvm.isJvm - -class DuplicateJvmSignatureAnnotator : Annotator { - override fun annotate(element: PsiElement, holder: AnnotationHolder) { - if (element !is KtFile && element !is KtDeclaration) return - if (!ProjectRootsUtil.isInProjectSource(element)) return - - val file = element.containingFile - if (file !is KtFile || !TargetPlatformDetector.getPlatform(file).isJvm()) return - - val otherDiagnostics = when (element) { - is KtDeclaration -> element.analyzeWithContent() - is KtFile -> element.analyzeWithContent() - else -> throw AssertionError("DuplicateJvmSignatureAnnotator: should not get here! Element: ${element.text}") - }.diagnostics - - val moduleScope = element.getModuleInfo().contentScope() - val diagnostics = getJvmSignatureDiagnostics(element, otherDiagnostics, moduleScope) ?: return - - KotlinPsiChecker().annotateElement(element, holder, diagnostics) - } -} diff --git a/idea/idea-analysis/src/org/jetbrains/kotlin/idea/highlighter/DuplicateJvmSignatureHighlightPass.kt b/idea/idea-analysis/src/org/jetbrains/kotlin/idea/highlighter/DuplicateJvmSignatureHighlightPass.kt new file mode 100644 index 00000000000..ca1bba3a9e8 --- /dev/null +++ b/idea/idea-analysis/src/org/jetbrains/kotlin/idea/highlighter/DuplicateJvmSignatureHighlightPass.kt @@ -0,0 +1,74 @@ +/* + * Copyright 2010-2020 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. + */ + +package org.jetbrains.kotlin.idea.highlighter + +import com.intellij.codeHighlighting.* +import com.intellij.lang.annotation.AnnotationHolder +import com.intellij.lang.annotation.Annotator +import com.intellij.openapi.editor.Document +import com.intellij.openapi.editor.Editor +import com.intellij.openapi.project.Project +import com.intellij.psi.PsiElement +import com.intellij.psi.PsiFile +import org.jetbrains.kotlin.asJava.getJvmSignatureDiagnostics +import org.jetbrains.kotlin.idea.caches.project.getModuleInfo +import org.jetbrains.kotlin.idea.caches.resolve.analyzeWithContent +import org.jetbrains.kotlin.idea.highlighter.AbstractKotlinHighlightingPass.Companion.annotateDiagnostics +import org.jetbrains.kotlin.idea.project.TargetPlatformDetector +import org.jetbrains.kotlin.idea.util.ProjectRootsUtil +import org.jetbrains.kotlin.platform.jvm.isJvm +import org.jetbrains.kotlin.psi.KtDeclaration +import org.jetbrains.kotlin.psi.KtFile + +class DuplicateJvmSignatureHighlightPass(file: KtFile, document: Document) : + AbstractBindingContextAwareHighlightingPassBase(file, document) { + override val annotator: Annotator + get() = DuplicateJvmSignatureAnnotator() + + inner class DuplicateJvmSignatureAnnotator : Annotator { + override fun annotate(element: PsiElement, holder: AnnotationHolder) { + if (element !is KtFile && element !is KtDeclaration) return + + val otherDiagnostics = when (element) { + is KtDeclaration -> element.analyzeWithContent() + is KtFile -> element.analyzeWithContent() + else -> throw AssertionError("DuplicateJvmSignatureAnnotator: should not get here! Element: ${element.text}") + }.diagnostics + + val moduleScope = element.getModuleInfo().contentScope() + val diagnostics = getJvmSignatureDiagnostics(element, otherDiagnostics, moduleScope) ?: return + + val diagnosticsForElement = diagnostics.forElement(element).toSet() + + annotateDiagnostics(file, element, holder, diagnosticsForElement) + } + } + + class Factory : TextEditorHighlightingPassFactory { + override fun createHighlightingPass(file: PsiFile, editor: Editor): TextEditorHighlightingPass? { + return if (file is KtFile && + ProjectRootsUtil.isInProjectSource(file) && + TargetPlatformDetector.getPlatform(file).isJvm() + ) { + DuplicateJvmSignatureHighlightPass(file, editor.document) + } else { + null + } + } + } + + class Registrar : TextEditorHighlightingPassFactoryRegistrar { + override fun registerHighlightingPassFactory(registrar: TextEditorHighlightingPassRegistrar, project: Project) { + registrar.registerTextEditorHighlightingPass( + Factory(), + /* runAfterCompletionOf = */ intArrayOf(Pass.UPDATE_ALL), + /* runAfterStartingOf = */ null, + /* runIntentionsPassAfter = */ false, + /* forcedPassId = */ -1 + ) + } + } +} \ No newline at end of file diff --git a/idea/idea-analysis/src/org/jetbrains/kotlin/idea/highlighter/ElementAnnotator.kt b/idea/idea-analysis/src/org/jetbrains/kotlin/idea/highlighter/ElementAnnotator.kt new file mode 100644 index 00000000000..82467f68b1f --- /dev/null +++ b/idea/idea-analysis/src/org/jetbrains/kotlin/idea/highlighter/ElementAnnotator.kt @@ -0,0 +1,214 @@ +/* + * Copyright 2010-2020 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. + */ + +package org.jetbrains.kotlin.idea.highlighter + +import com.intellij.codeInsight.intention.IntentionAction +import com.intellij.codeInspection.ProblemHighlightType +import com.intellij.lang.annotation.Annotation +import com.intellij.lang.annotation.AnnotationHolder +import com.intellij.openapi.diagnostic.ControlFlowException +import com.intellij.openapi.diagnostic.Logger +import com.intellij.openapi.editor.colors.CodeInsightColors +import com.intellij.openapi.util.TextRange +import com.intellij.psi.MultiRangeReference +import com.intellij.psi.PsiElement +import com.intellij.util.containers.MultiMap +import org.jetbrains.kotlin.cli.common.arguments.K2JVMCompilerArguments +import org.jetbrains.kotlin.config.KotlinFacetSettingsProvider +import org.jetbrains.kotlin.diagnostics.Diagnostic +import org.jetbrains.kotlin.diagnostics.Errors +import org.jetbrains.kotlin.diagnostics.Severity +import org.jetbrains.kotlin.idea.references.mainReference +import org.jetbrains.kotlin.idea.util.module +import org.jetbrains.kotlin.psi.KtParameter +import org.jetbrains.kotlin.psi.KtReferenceExpression + +internal class ElementAnnotator( + private val element: PsiElement, + private val shouldSuppressUnusedParameter: (KtParameter) -> Boolean +) { + fun registerDiagnosticsAnnotations( + holder: AnnotationHolder, + diagnostics: Collection, + annotationByDiagnostic: MutableMap?, + annotationByTextRange: MutableMap?, + noFixes: Boolean, + calculatingInProgress: Boolean + ) = diagnostics.groupBy { it.factory } + .forEach { + registerSameFactoryDiagnosticsAnnotations( + holder, + it.value, + annotationByDiagnostic, + annotationByTextRange, + noFixes, + calculatingInProgress + ) + } + + private fun registerSameFactoryDiagnosticsAnnotations( + holder: AnnotationHolder, + diagnostics: Collection, + annotationByDiagnostic: MutableMap?, + annotationByTextRange: MutableMap?, + noFixes: Boolean, + calculatingInProgress: Boolean + ) { + val presentationInfo = presentationInfo(diagnostics) ?: return + setUpAnnotations( + holder, + diagnostics, + presentationInfo, + annotationByDiagnostic, + annotationByTextRange, + noFixes, + calculatingInProgress + ) + } + + fun registerDiagnosticsQuickFixes( + diagnostics: List, + annotationByDiagnostic: MutableMap + ) = diagnostics.groupBy { it.factory } + .forEach { registerDiagnosticsSameFactoryQuickFixes(it.value, annotationByDiagnostic) } + + private fun registerDiagnosticsSameFactoryQuickFixes( + diagnostics: List, + annotationByDiagnostic: MutableMap + ) { + val presentationInfo = presentationInfo(diagnostics) ?: return + val fixesMap = createFixesMap(diagnostics) ?: return + + diagnostics.forEach { + val annotation = annotationByDiagnostic[it] ?: return + + presentationInfo.applyFixes(fixesMap, it, annotation) + } + } + + private fun presentationInfo(diagnostics: Collection): AnnotationPresentationInfo? { + if (diagnostics.isEmpty() || !diagnostics.any { it.isValid }) return null + + val diagnostic = diagnostics.first() + // hack till the root cause #KT-21246 is fixed + if (isUnstableAbiClassDiagnosticForModulesWithEnabledUnstableAbi(diagnostic)) return null + + val factory = diagnostic.factory + + assert(diagnostics.all { it.psiElement == element && it.factory == factory }) + + val ranges = diagnostic.textRanges + val presentationInfo: AnnotationPresentationInfo = when (factory.severity) { + Severity.ERROR -> { + when (factory) { + in Errors.UNRESOLVED_REFERENCE_DIAGNOSTICS -> { + val referenceExpression = element as KtReferenceExpression + val reference = referenceExpression.mainReference + if (reference is MultiRangeReference) { + AnnotationPresentationInfo( + ranges = reference.ranges.map { it.shiftRight(referenceExpression.textOffset) }, + highlightType = ProblemHighlightType.LIKE_UNKNOWN_SYMBOL + ) + } else { + AnnotationPresentationInfo(ranges, highlightType = ProblemHighlightType.LIKE_UNKNOWN_SYMBOL) + } + } + + Errors.ILLEGAL_ESCAPE -> AnnotationPresentationInfo( + ranges, textAttributes = KotlinHighlightingColors.INVALID_STRING_ESCAPE + ) + + Errors.REDECLARATION -> AnnotationPresentationInfo( + ranges = listOf(diagnostic.textRanges.first()), nonDefaultMessage = "" + ) + + else -> { + AnnotationPresentationInfo( + ranges, + highlightType = if (factory == Errors.INVISIBLE_REFERENCE) + ProblemHighlightType.LIKE_UNKNOWN_SYMBOL + else + null + ) + } + } + } + Severity.WARNING -> { + if (factory == Errors.UNUSED_PARAMETER && shouldSuppressUnusedParameter(element as KtParameter)) { + return null + } + + AnnotationPresentationInfo( + ranges, + textAttributes = when (factory) { + Errors.DEPRECATION -> CodeInsightColors.DEPRECATED_ATTRIBUTES + Errors.UNUSED_ANONYMOUS_PARAMETER -> CodeInsightColors.WEAK_WARNING_ATTRIBUTES + else -> null + }, + highlightType = when (factory) { + in Errors.UNUSED_ELEMENT_DIAGNOSTICS -> ProblemHighlightType.LIKE_UNUSED_SYMBOL + Errors.UNUSED_ANONYMOUS_PARAMETER -> ProblemHighlightType.WEAK_WARNING + else -> null + } + ) + } + Severity.INFO -> AnnotationPresentationInfo(ranges, highlightType = ProblemHighlightType.INFORMATION) + } + return presentationInfo + } + + private fun setUpAnnotations( + holder: AnnotationHolder, + diagnostics: Collection, + data: AnnotationPresentationInfo, + annotationByDiagnostic: MutableMap?, + annotationByTextRange: MutableMap?, + noFixes: Boolean, + calculatingInProgress: Boolean + ) { + val fixesMap = + createFixesMap(diagnostics, noFixes) + + data.processDiagnostics(holder, diagnostics, annotationByDiagnostic, annotationByTextRange, fixesMap, calculatingInProgress) + } + + private fun createFixesMap( + diagnostics: Collection, + noFixes: Boolean = false + ): MultiMap? = if (noFixes) { + null + } else { + try { + createQuickFixes(diagnostics) + } catch (e: Exception) { + if (e is ControlFlowException) { + throw e + } + LOG.error(e) + MultiMap() + } + } + + private fun isUnstableAbiClassDiagnosticForModulesWithEnabledUnstableAbi(diagnostic: Diagnostic): Boolean { + val factory = diagnostic.factory + if (factory != Errors.IR_WITH_UNSTABLE_ABI_COMPILED_CLASS && factory != Errors.FIR_COMPILED_CLASS) return false + + val module = element.module ?: return false + val moduleFacetSettings = KotlinFacetSettingsProvider.getInstance(element.project)?.getSettings(module) ?: return false + return when (factory) { + Errors.IR_WITH_UNSTABLE_ABI_COMPILED_CLASS -> + moduleFacetSettings.isCompilerSettingPresent(K2JVMCompilerArguments::useIR) && + !moduleFacetSettings.isCompilerSettingPresent(K2JVMCompilerArguments::useOldBackend) + Errors.FIR_COMPILED_CLASS -> + moduleFacetSettings.isCompilerSettingPresent(K2JVMCompilerArguments::useFir) + else -> error(factory) + } + } + + companion object { + val LOG = Logger.getInstance(ElementAnnotator::class.java) + } +} diff --git a/idea/idea-analysis/src/org/jetbrains/kotlin/idea/highlighter/KotlinHighlightingUtil.kt b/idea/idea-analysis/src/org/jetbrains/kotlin/idea/highlighter/KotlinHighlightingUtil.kt index f2656bc597c..e53d590fe0a 100644 --- a/idea/idea-analysis/src/org/jetbrains/kotlin/idea/highlighter/KotlinHighlightingUtil.kt +++ b/idea/idea-analysis/src/org/jetbrains/kotlin/idea/highlighter/KotlinHighlightingUtil.kt @@ -34,7 +34,10 @@ import kotlin.script.experimental.api.ScriptDiagnostic object KotlinHighlightingUtil { fun shouldHighlight(psiElement: PsiElement): Boolean { val ktFile = psiElement.containingFile as? KtFile ?: return false + return shouldHighlightFile(ktFile) + } + fun shouldHighlightFile(ktFile: KtFile): Boolean { if (ktFile is KtCodeFragment && ktFile.context != null) { return true } @@ -52,8 +55,12 @@ object KotlinHighlightingUtil { return ProjectRootsUtil.isInProjectOrLibraryContent(ktFile) && ktFile.getModuleInfo() !is NotUnderContentRootModuleInfo } - fun shouldHighlightErrors(psiElement: PsiElement): Boolean { - val ktFile = psiElement.containingFile as? KtFile ?: return false + fun shouldHighlightErrors(psiElement: PsiElement): Boolean = + (psiElement.containingFile as? KtFile)?.let { + shouldHighlightErrors(it) + } ?: false + + fun shouldHighlightErrors(ktFile: KtFile): Boolean { if (ktFile.isCompiled) { return false } diff --git a/idea/idea-analysis/src/org/jetbrains/kotlin/idea/highlighter/KotlinPsiChecker.kt b/idea/idea-analysis/src/org/jetbrains/kotlin/idea/highlighter/KotlinPsiChecker.kt deleted file mode 100644 index 18b0bd371fd..00000000000 --- a/idea/idea-analysis/src/org/jetbrains/kotlin/idea/highlighter/KotlinPsiChecker.kt +++ /dev/null @@ -1,295 +0,0 @@ -/* - * Copyright 2010-2020 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. - */ - -package org.jetbrains.kotlin.idea.highlighter - -import com.intellij.codeInsight.intention.IntentionAction -import com.intellij.codeInspection.ProblemHighlightType -import com.intellij.lang.annotation.AnnotationHolder -import com.intellij.openapi.diagnostic.ControlFlowException -import com.intellij.openapi.diagnostic.Logger -import com.intellij.openapi.editor.colors.CodeInsightColors -import com.intellij.openapi.progress.ProcessCanceledException -import com.intellij.openapi.util.Key -import com.intellij.psi.MultiRangeReference -import com.intellij.psi.PsiElement -import com.intellij.util.containers.MultiMap -import org.jetbrains.kotlin.cli.common.arguments.K2JVMCompilerArguments -import org.jetbrains.kotlin.config.KotlinFacetSettings -import org.jetbrains.kotlin.config.KotlinFacetSettingsProvider -import org.jetbrains.kotlin.descriptors.DeclarationDescriptor -import org.jetbrains.kotlin.diagnostics.Diagnostic -import org.jetbrains.kotlin.diagnostics.DiagnosticFactory -import org.jetbrains.kotlin.diagnostics.Errors -import org.jetbrains.kotlin.diagnostics.Severity -import org.jetbrains.kotlin.idea.caches.resolve.analyzeWithAllCompilerChecks -import org.jetbrains.kotlin.idea.quickfix.QuickFixes -import org.jetbrains.kotlin.idea.references.mainReference -import org.jetbrains.kotlin.idea.util.module -import org.jetbrains.kotlin.psi.KtFile -import org.jetbrains.kotlin.psi.KtNameReferenceExpression -import org.jetbrains.kotlin.psi.KtParameter -import org.jetbrains.kotlin.psi.KtReferenceExpression -import org.jetbrains.kotlin.resolve.BindingContext -import org.jetbrains.kotlin.resolve.diagnostics.Diagnostics -import org.jetbrains.kotlin.types.KotlinType -import java.lang.reflect.* -import java.util.* - -open class KotlinPsiChecker : AbstractKotlinPsiChecker() { - override fun shouldHighlight(file: KtFile): Boolean = KotlinHighlightingUtil.shouldHighlight(file) - - override fun annotateElement( - element: PsiElement, - containingFile: KtFile, - holder: AnnotationHolder - ) { - val analysisResult = containingFile.analyzeWithAllCompilerChecks() - if (analysisResult.isError()) { - throw ProcessCanceledException(analysisResult.error) - } - - val bindingContext = analysisResult.bindingContext - - getAfterAnalysisVisitor(holder, bindingContext).forEach { visitor -> element.accept(visitor) } - - annotateElement(element, holder, bindingContext.diagnostics) - } - - protected open fun shouldSuppressUnusedParameter(parameter: KtParameter): Boolean = false - - fun annotateElement(element: PsiElement, holder: AnnotationHolder, diagnostics: Diagnostics) { - val diagnosticsForElement = diagnostics.forElement(element).toSet() - - if (element is KtNameReferenceExpression) { - val unresolved = diagnostics.any { it.factory == Errors.UNRESOLVED_REFERENCE } - element.putUserData(UNRESOLVED_KEY, if (unresolved) Unit else null) - } - - if (diagnosticsForElement.isEmpty()) return - - if (KotlinHighlightingUtil.shouldHighlightErrors(element)) { - ElementAnnotator(element, holder) { param -> - shouldSuppressUnusedParameter(param) - }.registerDiagnosticsAnnotations(diagnosticsForElement) - } - } - - companion object { - fun getAfterAnalysisVisitor(holder: AnnotationHolder, bindingContext: BindingContext) = arrayOf( - PropertiesHighlightingVisitor(holder, bindingContext), - FunctionsHighlightingVisitor(holder, bindingContext), - VariablesHighlightingVisitor(holder, bindingContext), - TypeKindHighlightingVisitor(holder, bindingContext) - ) - - fun createQuickFixes(diagnostic: Diagnostic): Collection = - createQuickFixes(listOfNotNull(diagnostic))[diagnostic] - - private val UNRESOLVED_KEY = Key("KotlinPsiChecker.UNRESOLVED_KEY") - - fun wasUnresolved(element: KtNameReferenceExpression) = element.getUserData(UNRESOLVED_KEY) != null - } -} - -private fun createQuickFixes(similarDiagnostics: Collection): MultiMap { - val first = similarDiagnostics.minByOrNull { it.toString() } - val factory = similarDiagnostics.first().getRealDiagnosticFactory() - - val actions = MultiMap() - - val intentionActionsFactories = QuickFixes.getInstance().getActionFactories(factory) - for (intentionActionsFactory in intentionActionsFactories) { - val allProblemsActions = intentionActionsFactory.createActionsForAllProblems(similarDiagnostics) - if (allProblemsActions.isNotEmpty()) { - actions.putValues(first, allProblemsActions) - } else { - for (diagnostic in similarDiagnostics) { - actions.putValues(diagnostic, intentionActionsFactory.createActions(diagnostic)) - } - } - } - - for (diagnostic in similarDiagnostics) { - actions.putValues(diagnostic, QuickFixes.getInstance().getActions(diagnostic.factory)) - } - - actions.values().forEach { NoDeclarationDescriptorsChecker.check(it::class.java) } - - return actions -} - -private fun Diagnostic.getRealDiagnosticFactory(): DiagnosticFactory<*> = - when (factory) { - Errors.PLUGIN_ERROR -> Errors.PLUGIN_ERROR.cast(this).a.factory - Errors.PLUGIN_WARNING -> Errors.PLUGIN_WARNING.cast(this).a.factory - Errors.PLUGIN_INFO -> Errors.PLUGIN_INFO.cast(this).a.factory - else -> factory - } - -private object NoDeclarationDescriptorsChecker { - private val LOG = Logger.getInstance(NoDeclarationDescriptorsChecker::class.java) - - private val checkedQuickFixClasses = Collections.synchronizedSet(HashSet>()) - - fun check(quickFixClass: Class<*>) { - if (!checkedQuickFixClasses.add(quickFixClass)) return - - for (field in quickFixClass.declaredFields) { - checkType(field.genericType, field) - } - - quickFixClass.superclass?.let { check(it) } - } - - private fun checkType(type: Type, field: Field) { - when (type) { - is Class<*> -> { - if (DeclarationDescriptor::class.java.isAssignableFrom(type) || KotlinType::class.java.isAssignableFrom(type)) { - LOG.error( - "QuickFix class ${field.declaringClass.name} contains field ${field.name} that holds ${type.simpleName}. " - + "This leads to holding too much memory through this quick-fix instance. " - + "Possible solution can be wrapping it using KotlinIntentionActionFactoryWithDelegate." - ) - } - - if (IntentionAction::class.java.isAssignableFrom(type)) { - check(type) - } - - } - - is GenericArrayType -> checkType(type.genericComponentType, field) - - is ParameterizedType -> { - if (Collection::class.java.isAssignableFrom(type.rawType as Class<*>)) { - type.actualTypeArguments.forEach { checkType(it, field) } - } - } - - is WildcardType -> type.upperBounds.forEach { checkType(it, field) } - } - } -} - -private class ElementAnnotator( - private val element: PsiElement, - private val holder: AnnotationHolder, - private val shouldSuppressUnusedParameter: (KtParameter) -> Boolean -) { - fun registerDiagnosticsAnnotations(diagnostics: Collection) { - diagnostics.groupBy { it.factory }.forEach { group -> registerDiagnosticAnnotations(group.value) } - } - - private fun registerDiagnosticAnnotations(diagnostics: List) { - assert(diagnostics.isNotEmpty()) - - val validDiagnostics = diagnostics.filter { it.isValid } - if (validDiagnostics.isEmpty()) return - - val diagnostic = diagnostics.first() - val factory = diagnostic.factory - - // hack till the root cause #KT-21246 is fixed - if (isUnstableAbiClassDiagnosticForModulesWithEnabledUnstableAbi(diagnostic)) return - - assert(diagnostics.all { it.psiElement == element && it.factory == factory }) - - val ranges = diagnostic.textRanges - - val presentationInfo: AnnotationPresentationInfo = when (factory.severity) { - Severity.ERROR -> { - when (factory) { - in Errors.UNRESOLVED_REFERENCE_DIAGNOSTICS -> { - val referenceExpression = element as KtReferenceExpression - val reference = referenceExpression.mainReference - if (reference is MultiRangeReference) { - AnnotationPresentationInfo( - ranges = reference.ranges.map { it.shiftRight(referenceExpression.textOffset) }, - highlightType = ProblemHighlightType.LIKE_UNKNOWN_SYMBOL - ) - } else { - AnnotationPresentationInfo(ranges, highlightType = ProblemHighlightType.LIKE_UNKNOWN_SYMBOL) - } - } - - Errors.ILLEGAL_ESCAPE -> AnnotationPresentationInfo( - ranges, textAttributes = KotlinHighlightingColors.INVALID_STRING_ESCAPE - ) - - Errors.REDECLARATION -> AnnotationPresentationInfo( - ranges = listOf(diagnostic.textRanges.first()), nonDefaultMessage = "" - ) - - else -> { - AnnotationPresentationInfo( - ranges, - highlightType = if (factory == Errors.INVISIBLE_REFERENCE) - ProblemHighlightType.LIKE_UNKNOWN_SYMBOL - else - null - ) - } - } - } - Severity.WARNING -> { - if (factory == Errors.UNUSED_PARAMETER && shouldSuppressUnusedParameter(element as KtParameter)) { - return - } - - AnnotationPresentationInfo( - ranges, - textAttributes = when (factory) { - Errors.DEPRECATION -> CodeInsightColors.DEPRECATED_ATTRIBUTES - Errors.UNUSED_ANONYMOUS_PARAMETER -> CodeInsightColors.WEAK_WARNING_ATTRIBUTES - else -> null - }, - highlightType = when (factory) { - in Errors.UNUSED_ELEMENT_DIAGNOSTICS -> ProblemHighlightType.LIKE_UNUSED_SYMBOL - Errors.UNUSED_ANONYMOUS_PARAMETER -> ProblemHighlightType.WEAK_WARNING - else -> null - } - ) - } - Severity.INFO -> AnnotationPresentationInfo(ranges, highlightType = ProblemHighlightType.INFORMATION) - } - - setUpAnnotations(diagnostics, presentationInfo) - } - - private fun setUpAnnotations(diagnostics: List, data: AnnotationPresentationInfo) { - val fixesMap = try { - createQuickFixes(diagnostics) - } catch (e: Exception) { - if (e is ControlFlowException) { - throw e - } - LOG.error(e) - MultiMap() - } - - data.processDiagnostics(holder, diagnostics, fixesMap) - } - - private fun isUnstableAbiClassDiagnosticForModulesWithEnabledUnstableAbi(diagnostic: Diagnostic): Boolean { - val factory = diagnostic.factory - if (factory != Errors.IR_WITH_UNSTABLE_ABI_COMPILED_CLASS && factory != Errors.FIR_COMPILED_CLASS) return false - - val module = element.module ?: return false - val moduleFacetSettings = KotlinFacetSettingsProvider.getInstance(element.project)?.getSettings(module) ?: return false - return when (factory) { - Errors.IR_WITH_UNSTABLE_ABI_COMPILED_CLASS -> - moduleFacetSettings.isCompilerSettingPresent(K2JVMCompilerArguments::useIR) && - !moduleFacetSettings.isCompilerSettingPresent(K2JVMCompilerArguments::useOldBackend) - Errors.FIR_COMPILED_CLASS -> - moduleFacetSettings.isCompilerSettingPresent(K2JVMCompilerArguments::useFir) - else -> error(factory) - } - } - - companion object { - val LOG = Logger.getInstance(ElementAnnotator::class.java) - } -} diff --git a/idea/idea-analysis/src/org/jetbrains/kotlin/idea/highlighter/VariablesHighlightingVisitor.kt b/idea/idea-analysis/src/org/jetbrains/kotlin/idea/highlighter/VariablesHighlightingVisitor.kt index 0bdc9234c72..5778f16260c 100644 --- a/idea/idea-analysis/src/org/jetbrains/kotlin/idea/highlighter/VariablesHighlightingVisitor.kt +++ b/idea/idea-analysis/src/org/jetbrains/kotlin/idea/highlighter/VariablesHighlightingVisitor.kt @@ -35,8 +35,8 @@ internal class VariablesHighlightingVisitor(holder: AnnotationHolder, bindingCon if (target is ValueParameterDescriptor && bindingContext.get(AUTO_CREATED_IT, target) == true) { createInfoAnnotation( expression, - FUNCTION_LITERAL_DEFAULT_PARAMETER, - KotlinIdeaAnalysisBundle.message("automatically.declared.based.on.the.expected.type") + KotlinIdeaAnalysisBundle.message("automatically.declared.based.on.the.expected.type"), + FUNCTION_LITERAL_DEFAULT_PARAMETER ) } else if (expression.parent !is KtValueArgumentName) { // highlighted separately highlightVariable(expression, target) @@ -91,14 +91,15 @@ internal class VariablesHighlightingVisitor(holder: AnnotationHolder, bindingCon "0.smart.cast.to.1", receiverName, DescriptorRenderer.FQ_NAMES_IN_TYPES.renderType(type) - ) - ).textAttributes = SMART_CAST_RECEIVER + ), + SMART_CAST_RECEIVER + ) } } val nullSmartCast = bindingContext.get(SMARTCAST_NULL, expression) == true if (nullSmartCast) { - createInfoAnnotation(expression, KotlinIdeaAnalysisBundle.message("always.null")).textAttributes = SMART_CONSTANT + createInfoAnnotation(expression, KotlinIdeaAnalysisBundle.message("always.null"), SMART_CONSTANT) } val smartCast = bindingContext.get(SMARTCAST, expression) @@ -107,8 +108,9 @@ internal class VariablesHighlightingVisitor(holder: AnnotationHolder, bindingCon if (defaultType != null) { createInfoAnnotation( getSmartCastTarget(expression), - KotlinIdeaAnalysisBundle.message("smart.cast.to.0", DescriptorRenderer.FQ_NAMES_IN_TYPES.renderType(defaultType)) - ).textAttributes = SMART_CAST_VALUE + KotlinIdeaAnalysisBundle.message("smart.cast.to.0", DescriptorRenderer.FQ_NAMES_IN_TYPES.renderType(defaultType)), + SMART_CAST_VALUE + ) } else if (smartCast is MultipleSmartCasts) { for ((call, type) in smartCast.map) { createInfoAnnotation( @@ -117,8 +119,9 @@ internal class VariablesHighlightingVisitor(holder: AnnotationHolder, bindingCon "smart.cast.to.0.for.1.call", DescriptorRenderer.FQ_NAMES_IN_TYPES.renderType(type), call.toString() - ) - ).textAttributes = SMART_CAST_VALUE + ), + SMART_CAST_VALUE + ) } } } @@ -154,7 +157,7 @@ internal class VariablesHighlightingVisitor(holder: AnnotationHolder, bindingCon val parent = elementToHighlight.parent if (!(parent is PsiNameIdentifierOwner && parent.nameIdentifier == elementToHighlight)) { - createInfoAnnotation(elementToHighlight, WRAPPED_INTO_REF, msg) + createInfoAnnotation(elementToHighlight, msg, WRAPPED_INTO_REF) return } } diff --git a/idea/idea-completion/src/org/jetbrains/kotlin/idea/completion/FromUnresolvedNamesCompletion.kt b/idea/idea-completion/src/org/jetbrains/kotlin/idea/completion/FromUnresolvedNamesCompletion.kt index 955430e86d4..e9e3c7d3dd6 100644 --- a/idea/idea-completion/src/org/jetbrains/kotlin/idea/completion/FromUnresolvedNamesCompletion.kt +++ b/idea/idea-completion/src/org/jetbrains/kotlin/idea/completion/FromUnresolvedNamesCompletion.kt @@ -9,7 +9,8 @@ import com.intellij.codeInsight.completion.PrefixMatcher import com.intellij.codeInsight.lookup.LookupElementBuilder import com.intellij.openapi.progress.ProgressManager import org.jetbrains.kotlin.descriptors.* -import org.jetbrains.kotlin.idea.highlighter.KotlinPsiChecker +import org.jetbrains.kotlin.idea.highlighter.AbstractKotlinHighlightingPass +import org.jetbrains.kotlin.idea.highlighter.KotlinHighlightingPass import org.jetbrains.kotlin.idea.references.resolveMainReferenceToDescriptors import org.jetbrains.kotlin.idea.util.CallTypeAndReceiver import org.jetbrains.kotlin.psi.KtCallExpression @@ -28,7 +29,7 @@ class FromUnresolvedNamesCompletion( scope.forEachDescendantOfType { refExpr -> ProgressManager.checkCanceled() - if (KotlinPsiChecker.wasUnresolved(refExpr)) { + if (AbstractKotlinHighlightingPass.wasUnresolved(refExpr)) { val callTypeAndReceiver = CallTypeAndReceiver.detect(refExpr) if (callTypeAndReceiver.receiver != null) return@forEachDescendantOfType if (sampleDescriptor != null) { diff --git a/idea/idea-fir/src/org/jetbrains/kotlin/idea/caches/resolve/IDEKotlinAsJavaSupport.kt b/idea/idea-fir/src/org/jetbrains/kotlin/idea/caches/resolve/IDEKotlinAsJavaSupport.kt index 320201609aa..967838f95fe 100644 --- a/idea/idea-fir/src/org/jetbrains/kotlin/idea/caches/resolve/IDEKotlinAsJavaSupport.kt +++ b/idea/idea-fir/src/org/jetbrains/kotlin/idea/caches/resolve/IDEKotlinAsJavaSupport.kt @@ -6,21 +6,15 @@ package org.jetbrains.kotlin.idea.caches.resolve import com.intellij.openapi.project.Project -import com.intellij.openapi.util.Key -import com.intellij.openapi.util.UserDataHolder import com.intellij.psi.PsiManager import com.intellij.psi.search.GlobalSearchScope -import com.intellij.psi.util.CachedValueProvider -import com.intellij.psi.util.CachedValuesManager -import org.jetbrains.kotlin.analyzer.KotlinModificationTrackerService +import org.jetbrains.kotlin.asJava.classes.KtFakeLightClass import org.jetbrains.kotlin.asJava.classes.KtLightClass -import org.jetbrains.kotlin.idea.asJava.FirLightClassForFacade -import org.jetbrains.kotlin.idea.asJava.classes.createFirLightClassNoCache +import org.jetbrains.kotlin.idea.asJava.KtFirBasedFakeLightClass import org.jetbrains.kotlin.idea.asJava.classes.getOrCreateFirLightClass import org.jetbrains.kotlin.idea.asJava.classes.getOrCreateFirLightFacade import org.jetbrains.kotlin.name.FqName import org.jetbrains.kotlin.psi.KtClassOrObject -import org.jetbrains.kotlin.psi.KtFile import org.jetbrains.kotlin.psi.KtScript class IDEKotlinAsJavaFirSupport(project: Project) : IDEKotlinAsJavaSupport(project) { @@ -38,4 +32,7 @@ class IDEKotlinAsJavaFirSupport(project: Project) : IDEKotlinAsJavaSupport(proje override fun createLightClassForSourceDeclaration(classOrObject: KtClassOrObject): KtLightClass? = getOrCreateFirLightClass(classOrObject) + + override fun getFakeLightClass(classOrObject: KtClassOrObject): KtFakeLightClass = + KtFirBasedFakeLightClass(classOrObject) } \ No newline at end of file diff --git a/idea/idea-fir/src/org/jetbrains/kotlin/idea/fir/highlighter/HighlightingUtils.kt b/idea/idea-fir/src/org/jetbrains/kotlin/idea/fir/highlighter/HighlightingUtils.kt index d13e9d28dd7..0444d6a9176 100644 --- a/idea/idea-fir/src/org/jetbrains/kotlin/idea/fir/highlighter/HighlightingUtils.kt +++ b/idea/idea-fir/src/org/jetbrains/kotlin/idea/fir/highlighter/HighlightingUtils.kt @@ -49,6 +49,7 @@ internal fun textAttributesKeyForTypeDeclaration(declaration: PsiElement): TextA declaration is KtClass -> textAttributesForClass(declaration) declaration is PsiClass && declaration.isInterface && !declaration.isAnnotationType -> Colors.TRAIT declaration.isAnnotationClass() -> Colors.ANNOTATION + declaration is KtPrimaryConstructor && declaration.parent.isAnnotationClass() -> Colors.ANNOTATION declaration is KtObjectDeclaration -> Colors.OBJECT declaration is PsiEnumConstant -> Colors.ENUM_ENTRY declaration is PsiClass && declaration.hasModifier(JvmModifier.ABSTRACT) -> Colors.ABSTRACT_CLASS diff --git a/idea/idea-fir/src/org/jetbrains/kotlin/idea/fir/highlighter/visitors/ExpressionsSmartcastHighlightingVisitor.kt b/idea/idea-fir/src/org/jetbrains/kotlin/idea/fir/highlighter/visitors/ExpressionsSmartcastHighlightingVisitor.kt index add37568aa3..eb8c0166d41 100644 --- a/idea/idea-fir/src/org/jetbrains/kotlin/idea/fir/highlighter/visitors/ExpressionsSmartcastHighlightingVisitor.kt +++ b/idea/idea-fir/src/org/jetbrains/kotlin/idea/fir/highlighter/visitors/ExpressionsSmartcastHighlightingVisitor.kt @@ -10,6 +10,7 @@ import com.intellij.psi.PsiElement import org.jetbrains.kotlin.idea.KotlinIdeaAnalysisBundle import org.jetbrains.kotlin.idea.frontend.api.KtAnalysisSession import org.jetbrains.kotlin.idea.frontend.api.ImplicitReceiverSmartcastKind +import org.jetbrains.kotlin.idea.highlighter.KotlinHighlightingColors import org.jetbrains.kotlin.psi.* internal class ExpressionsSmartcastHighlightingVisitor( @@ -30,8 +31,9 @@ internal class ExpressionsSmartcastHighlightingVisitor( "0.smart.cast.to.1", receiverName, type.asStringForDebugging() - ) - ).textAttributes = org.jetbrains.kotlin.idea.highlighter.KotlinHighlightingColors.SMART_CAST_RECEIVER + ), + KotlinHighlightingColors.SMART_CAST_RECEIVER + ) } } expression.getSmartCasts()?.forEach { type -> @@ -40,8 +42,9 @@ internal class ExpressionsSmartcastHighlightingVisitor( KotlinIdeaAnalysisBundle.message( "smart.cast.to.0", type.asStringForDebugging() - ) - ).textAttributes = org.jetbrains.kotlin.idea.highlighter.KotlinHighlightingColors.SMART_CAST_VALUE + ), + KotlinHighlightingColors.SMART_CAST_VALUE + ) } //todo smartcast to null diff --git a/idea/idea-fir/src/org/jetbrains/kotlin/idea/fir/highlighter/visitors/FirAfterResolveHighlightingVisitor.kt b/idea/idea-fir/src/org/jetbrains/kotlin/idea/fir/highlighter/visitors/FirAfterResolveHighlightingVisitor.kt index 0348a0cf832..4a378ce9e37 100644 --- a/idea/idea-fir/src/org/jetbrains/kotlin/idea/fir/highlighter/visitors/FirAfterResolveHighlightingVisitor.kt +++ b/idea/idea-fir/src/org/jetbrains/kotlin/idea/fir/highlighter/visitors/FirAfterResolveHighlightingVisitor.kt @@ -6,6 +6,8 @@ package org.jetbrains.kotlin.idea.fir.highlighter.visitors import com.intellij.lang.annotation.AnnotationHolder +import com.intellij.openapi.editor.colors.TextAttributesKey +import com.intellij.openapi.util.TextRange import org.jetbrains.kotlin.idea.frontend.api.KtAnalysisSession import org.jetbrains.kotlin.idea.highlighter.HighlightingVisitor @@ -14,6 +16,12 @@ abstract class FirAfterResolveHighlightingVisitor( protected val holder: AnnotationHolder ) : HighlightingVisitor(holder) { + override fun createInfoAnnotation(textRange: TextRange, message: String?, textAttributes: TextAttributesKey?) { + // TODO: Temporary use deprecated for FIR plugin as it is supposes to be rewritten fully + holder.createInfoAnnotation(textRange, message) + .also { annotation -> textAttributes?.let { annotation.textAttributes = textAttributes } } + } + companion object { fun createListOfVisitors( analysisSession: KtAnalysisSession, diff --git a/idea/idea-fir/src/org/jetbrains/kotlin/idea/fir/highlighter/visitors/TypeHighlightingVisitor.kt b/idea/idea-fir/src/org/jetbrains/kotlin/idea/fir/highlighter/visitors/TypeHighlightingVisitor.kt index a26c4da1fa7..864ad028088 100644 --- a/idea/idea-fir/src/org/jetbrains/kotlin/idea/fir/highlighter/visitors/TypeHighlightingVisitor.kt +++ b/idea/idea-fir/src/org/jetbrains/kotlin/idea/fir/highlighter/visitors/TypeHighlightingVisitor.kt @@ -44,7 +44,8 @@ internal class TypeHighlightingVisitor( private fun computeHighlightingRangeForUsage(expression: KtSimpleNameExpression, target: PsiElement): TextRange { val expressionRange = expression.textRange - if (!target.isAnnotationClass()) return expressionRange + val isKotlinAnnotation = target is KtPrimaryConstructor && target.parent.isAnnotationClass() + if (!isKotlinAnnotation && !target.isAnnotationClass()) return expressionRange // include '@' symbol if the reference is the first segment of KtAnnotationEntry // if "Deprecated" is highlighted then '@' should be highlighted too in "@Deprecated" diff --git a/idea/idea-fir/src/org/jetbrains/kotlin/idea/fir/highlighter/visitors/VariableReferenceHighlightingVisitor.kt b/idea/idea-fir/src/org/jetbrains/kotlin/idea/fir/highlighter/visitors/VariableReferenceHighlightingVisitor.kt index 316079c6e2f..b22dad28b3b 100644 --- a/idea/idea-fir/src/org/jetbrains/kotlin/idea/fir/highlighter/visitors/VariableReferenceHighlightingVisitor.kt +++ b/idea/idea-fir/src/org/jetbrains/kotlin/idea/fir/highlighter/visitors/VariableReferenceHighlightingVisitor.kt @@ -34,8 +34,8 @@ internal class VariableReferenceHighlightingVisitor( if (expression.isAutoCreatedItParameter()) { createInfoAnnotation( expression, - Colors.FUNCTION_LITERAL_DEFAULT_PARAMETER, - KotlinIdeaAnalysisBundle.message("automatically.declared.based.on.the.expected.type") + KotlinIdeaAnalysisBundle.message("automatically.declared.based.on.the.expected.type"), + Colors.FUNCTION_LITERAL_DEFAULT_PARAMETER ) return } diff --git a/idea/idea-fir/tests/org/jetbrains/kotlin/asJava/classes/FirClassLoadingTestGenerated.java b/idea/idea-fir/tests/org/jetbrains/kotlin/asJava/classes/FirClassLoadingTestGenerated.java index f76176205ec..205bd151375 100644 --- a/idea/idea-fir/tests/org/jetbrains/kotlin/asJava/classes/FirClassLoadingTestGenerated.java +++ b/idea/idea-fir/tests/org/jetbrains/kotlin/asJava/classes/FirClassLoadingTestGenerated.java @@ -29,6 +29,11 @@ public class FirClassLoadingTestGenerated extends AbstractFirClassLoadingTest { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/asJava/ultraLightClasses"), Pattern.compile("^(.+)\\.(kt|kts)$"), null, true); } + @TestMetadata("annotationTargets_1_6.kt") + public void testAnnotationTargets_1_6() throws Exception { + runTest("compiler/testData/asJava/ultraLightClasses/annotationTargets_1_6.kt"); + } + @TestMetadata("annotationWithSetParamPropertyModifier.kt") public void testAnnotationWithSetParamPropertyModifier() throws Exception { runTest("compiler/testData/asJava/ultraLightClasses/annotationWithSetParamPropertyModifier.kt"); diff --git a/idea/idea-fir/tests/org/jetbrains/kotlin/asJava/classes/FirLightClassTestGenerated.java b/idea/idea-fir/tests/org/jetbrains/kotlin/asJava/classes/FirLightClassTestGenerated.java index 06606e3307b..b71f544de78 100644 --- a/idea/idea-fir/tests/org/jetbrains/kotlin/asJava/classes/FirLightClassTestGenerated.java +++ b/idea/idea-fir/tests/org/jetbrains/kotlin/asJava/classes/FirLightClassTestGenerated.java @@ -149,6 +149,11 @@ public class FirLightClassTestGenerated extends AbstractFirLightClassTest { runTest("compiler/testData/asJava/lightClasses/SpecialAnnotationsOnAnnotationClass.kt"); } + @TestMetadata("SpecialAnnotationsOnAnnotationClass_1_6.kt") + public void testSpecialAnnotationsOnAnnotationClass_1_6() throws Exception { + runTest("compiler/testData/asJava/lightClasses/SpecialAnnotationsOnAnnotationClass_1_6.kt"); + } + @TestMetadata("StubOrderForOverloads.kt") public void testStubOrderForOverloads() throws Exception { runTest("compiler/testData/asJava/lightClasses/StubOrderForOverloads.kt"); diff --git a/idea/idea-fir/tests/org/jetbrains/kotlin/checkers/AbstractFirPsiCheckerTest.kt b/idea/idea-fir/tests/org/jetbrains/kotlin/checkers/AbstractFirKotlinHighlightingPassTest.kt similarity index 95% rename from idea/idea-fir/tests/org/jetbrains/kotlin/checkers/AbstractFirPsiCheckerTest.kt rename to idea/idea-fir/tests/org/jetbrains/kotlin/checkers/AbstractFirKotlinHighlightingPassTest.kt index 2630a8431f0..c58d50a881c 100644 --- a/idea/idea-fir/tests/org/jetbrains/kotlin/checkers/AbstractFirPsiCheckerTest.kt +++ b/idea/idea-fir/tests/org/jetbrains/kotlin/checkers/AbstractFirKotlinHighlightingPassTest.kt @@ -13,7 +13,7 @@ import org.jetbrains.kotlin.psi.KtFile import org.jetbrains.kotlin.test.uitls.IgnoreTests import java.io.File -abstract class AbstractFirPsiCheckerTest : AbstractPsiCheckerTest() { +abstract class AbstractFirKotlinHighlightingPassTest : AbstractKotlinHighlightingPassTest() { override val captureExceptions: Boolean = false override fun isFirPlugin(): Boolean = true diff --git a/idea/idea-fir/tests/org/jetbrains/kotlin/checkers/FirPsiCheckerTestGenerated.java b/idea/idea-fir/tests/org/jetbrains/kotlin/checkers/FirKotlinHighlightingPassTestGenerated.java similarity index 97% rename from idea/idea-fir/tests/org/jetbrains/kotlin/checkers/FirPsiCheckerTestGenerated.java rename to idea/idea-fir/tests/org/jetbrains/kotlin/checkers/FirKotlinHighlightingPassTestGenerated.java index dde41ce45cf..6b27c7511c8 100644 --- a/idea/idea-fir/tests/org/jetbrains/kotlin/checkers/FirPsiCheckerTestGenerated.java +++ b/idea/idea-fir/tests/org/jetbrains/kotlin/checkers/FirKotlinHighlightingPassTestGenerated.java @@ -18,11 +18,11 @@ import java.util.regex.Pattern; /** This class is generated by {@link org.jetbrains.kotlin.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */ @SuppressWarnings("all") @RunWith(JUnit3RunnerWithInners.class) -public class FirPsiCheckerTestGenerated extends AbstractFirPsiCheckerTest { +public class FirKotlinHighlightingPassTestGenerated extends AbstractFirKotlinHighlightingPassTest { @TestMetadata("idea/testData/checker") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) - public static class Checker extends AbstractFirPsiCheckerTest { + public static class Checker extends AbstractFirKotlinHighlightingPassTest { private void runTest(String testDataFilePath) throws Exception { KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); } @@ -41,6 +41,11 @@ public class FirPsiCheckerTestGenerated extends AbstractFirPsiCheckerTest { runTest("idea/testData/checker/AnnotationOnFile.kt"); } + @TestMetadata("AnnotationSupressing.kt") + public void testAnnotationSupressing() throws Exception { + runTest("idea/testData/checker/AnnotationSupressing.kt"); + } + @TestMetadata("AnonymousInitializers.kt") public void testAnonymousInitializers() throws Exception { runTest("idea/testData/checker/AnonymousInitializers.kt"); @@ -365,7 +370,7 @@ public class FirPsiCheckerTestGenerated extends AbstractFirPsiCheckerTest { @TestMetadata("idea/testData/checker/regression") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) - public static class Regression extends AbstractFirPsiCheckerTest { + public static class Regression extends AbstractFirKotlinHighlightingPassTest { private void runTest(String testDataFilePath) throws Exception { KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); } @@ -608,7 +613,7 @@ public class FirPsiCheckerTestGenerated extends AbstractFirPsiCheckerTest { @TestMetadata("idea/testData/checker/recovery") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) - public static class Recovery extends AbstractFirPsiCheckerTest { + public static class Recovery extends AbstractFirKotlinHighlightingPassTest { private void runTest(String testDataFilePath) throws Exception { KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); } @@ -636,7 +641,7 @@ public class FirPsiCheckerTestGenerated extends AbstractFirPsiCheckerTest { @TestMetadata("idea/testData/checker/rendering") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) - public static class Rendering extends AbstractFirPsiCheckerTest { + public static class Rendering extends AbstractFirKotlinHighlightingPassTest { private void runTest(String testDataFilePath) throws Exception { KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); } @@ -654,7 +659,7 @@ public class FirPsiCheckerTestGenerated extends AbstractFirPsiCheckerTest { @TestMetadata("idea/testData/checker/infos") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) - public static class Infos extends AbstractFirPsiCheckerTest { + public static class Infos extends AbstractFirKotlinHighlightingPassTest { private void runTest(String testDataFilePath) throws Exception { KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); } @@ -747,7 +752,7 @@ public class FirPsiCheckerTestGenerated extends AbstractFirPsiCheckerTest { @TestMetadata("idea/testData/checker/diagnosticsMessage") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) - public static class DiagnosticsMessage extends AbstractFirPsiCheckerTest { + public static class DiagnosticsMessage extends AbstractFirKotlinHighlightingPassTest { private void runTest(String testDataFilePath) throws Exception { KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); } diff --git a/idea/idea-frontend-api/src/org/jetbrains/kotlin/idea/frontend/api/KtAnalysisSession.kt b/idea/idea-frontend-api/src/org/jetbrains/kotlin/idea/frontend/api/KtAnalysisSession.kt index 35b929837bd..a768ed8d6d5 100644 --- a/idea/idea-frontend-api/src/org/jetbrains/kotlin/idea/frontend/api/KtAnalysisSession.kt +++ b/idea/idea-frontend-api/src/org/jetbrains/kotlin/idea/frontend/api/KtAnalysisSession.kt @@ -12,8 +12,8 @@ import org.jetbrains.kotlin.idea.frontend.api.components.* import org.jetbrains.kotlin.idea.frontend.api.scopes.* import org.jetbrains.kotlin.idea.frontend.api.symbols.* import org.jetbrains.kotlin.idea.frontend.api.symbols.markers.KtSymbolWithDeclarations -import org.jetbrains.kotlin.idea.frontend.api.symbols.markers.KtSymbolWithMembers import org.jetbrains.kotlin.idea.frontend.api.symbols.markers.KtSymbolWithKind +import org.jetbrains.kotlin.idea.frontend.api.symbols.markers.KtSymbolWithMembers import org.jetbrains.kotlin.idea.frontend.api.symbols.pointers.KtSymbolPointer import org.jetbrains.kotlin.idea.frontend.api.types.KtType import org.jetbrains.kotlin.idea.references.KtReference @@ -80,6 +80,8 @@ abstract class KtAnalysisSession(final override val token: ValidityToken) : Vali val builtinTypes: KtBuiltinTypes get() = typeProvider.builtinTypes + fun KtClassOrObjectSymbol.buildSelfClassType(): KtType = typeProvider.buildSelfClassType(this) + fun KtElement.getDiagnostics(): Collection = diagnosticProvider.getDiagnosticsForElement(this) fun KtFile.collectDiagnosticsForFile(): Collection = diagnosticProvider.collectDiagnosticsForFile(this) diff --git a/idea/idea-frontend-api/src/org/jetbrains/kotlin/idea/frontend/api/components/KtTypeProvider.kt b/idea/idea-frontend-api/src/org/jetbrains/kotlin/idea/frontend/api/components/KtTypeProvider.kt index 4d01d8f7bad..38bcd0906d7 100644 --- a/idea/idea-frontend-api/src/org/jetbrains/kotlin/idea/frontend/api/components/KtTypeProvider.kt +++ b/idea/idea-frontend-api/src/org/jetbrains/kotlin/idea/frontend/api/components/KtTypeProvider.kt @@ -6,6 +6,7 @@ package org.jetbrains.kotlin.idea.frontend.api.components import org.jetbrains.kotlin.idea.frontend.api.ValidityTokenOwner +import org.jetbrains.kotlin.idea.frontend.api.symbols.KtClassOrObjectSymbol import org.jetbrains.kotlin.idea.frontend.api.types.KtType abstract class KtTypeProvider : KtAnalysisSessionComponent() { @@ -13,6 +14,8 @@ abstract class KtTypeProvider : KtAnalysisSessionComponent() { abstract fun isBuiltinFunctionalType(type: KtType): Boolean abstract val builtinTypes: KtBuiltinTypes + + abstract fun buildSelfClassType(symbol: KtClassOrObjectSymbol): KtType } diff --git a/idea/idea-frontend-fir/idea-fir-low-level-api/src/org/jetbrains/kotlin/idea/fir/low/level/api/diagnostics/AbstractFirIdeDiagnosticsCollector.kt b/idea/idea-frontend-fir/idea-fir-low-level-api/src/org/jetbrains/kotlin/idea/fir/low/level/api/diagnostics/AbstractFirIdeDiagnosticsCollector.kt index f05922086ee..4a4f927c2aa 100644 --- a/idea/idea-frontend-fir/idea-fir-low-level-api/src/org/jetbrains/kotlin/idea/fir/low/level/api/diagnostics/AbstractFirIdeDiagnosticsCollector.kt +++ b/idea/idea-frontend-fir/idea-fir-low-level-api/src/org/jetbrains/kotlin/idea/fir/low/level/api/diagnostics/AbstractFirIdeDiagnosticsCollector.kt @@ -8,6 +8,7 @@ package org.jetbrains.kotlin.idea.fir.low.level.api.diagnostics import com.intellij.openapi.diagnostic.Logger import org.jetbrains.kotlin.diagnostics.Diagnostic import org.jetbrains.kotlin.fir.FirSession +import org.jetbrains.kotlin.fir.analysis.checkers.context.CheckerContext import org.jetbrains.kotlin.fir.analysis.collectors.AbstractDiagnosticCollector import org.jetbrains.kotlin.fir.analysis.collectors.registerAllComponents import org.jetbrains.kotlin.fir.analysis.diagnostics.DiagnosticReporter @@ -39,7 +40,7 @@ internal abstract class AbstractFirIdeDiagnosticsCollector( private inner class Reporter : DiagnosticReporter() { - override fun report(diagnostic: FirDiagnostic<*>?) { + override fun report(diagnostic: FirDiagnostic<*>?, context: CheckerContext) { if (diagnostic !is FirPsiDiagnostic<*>) return if (diagnostic.element.psi !is KtElement) return onDiagnostic(diagnostic) diff --git a/idea/idea-frontend-fir/idea-fir-low-level-api/src/org/jetbrains/kotlin/idea/fir/low/level/api/element/builder/FirElementBuilder.kt b/idea/idea-frontend-fir/idea-fir-low-level-api/src/org/jetbrains/kotlin/idea/fir/low/level/api/element/builder/FirElementBuilder.kt index 021415680d3..cdc1ae24ac0 100644 --- a/idea/idea-frontend-fir/idea-fir-low-level-api/src/org/jetbrains/kotlin/idea/fir/low/level/api/element/builder/FirElementBuilder.kt +++ b/idea/idea-frontend-fir/idea-fir-low-level-api/src/org/jetbrains/kotlin/idea/fir/low/level/api/element/builder/FirElementBuilder.kt @@ -6,7 +6,6 @@ package org.jetbrains.kotlin.idea.fir.low.level.api.element.builder import com.intellij.psi.PsiElement -import com.intellij.psi.util.parentsOfType import org.jetbrains.annotations.TestOnly import org.jetbrains.kotlin.fir.FirElement import org.jetbrains.kotlin.fir.declarations.FirFile @@ -16,11 +15,12 @@ import org.jetbrains.kotlin.idea.fir.low.level.api.file.builder.FirFileBuilder import org.jetbrains.kotlin.idea.fir.low.level.api.file.builder.ModuleFileCache import org.jetbrains.kotlin.idea.fir.low.level.api.file.structure.FileStructureCache import org.jetbrains.kotlin.idea.fir.low.level.api.file.structure.FileStructureElement +import org.jetbrains.kotlin.idea.fir.low.level.api.util.hasFqName +import org.jetbrains.kotlin.idea.fir.low.level.api.util.isNonAnonymousClassOrObject import org.jetbrains.kotlin.idea.util.getElementTextInContext import org.jetbrains.kotlin.psi.* import org.jetbrains.kotlin.psi.psiUtil.containingClassOrObject import org.jetbrains.kotlin.psi.psiUtil.isAncestor -import org.jetbrains.kotlin.psi.psiUtil.isObjectLiteral import org.jetbrains.kotlin.psi2ir.deparenthesize /** @@ -123,14 +123,6 @@ internal inline fun PsiElement.getNonLocalContainingOrThisDeclaration(predicate: return null } -private fun KtDeclaration.isNonAnonymousClassOrObject() = - this is KtClassOrObject - && !this.isObjectLiteral() - - -private fun KtDeclaration.hasFqName(): Boolean = - parentsOfType(withSelf = false).all { it.isNonAnonymousClassOrObject() } - internal fun PsiElement.getNonLocalContainingInBodyDeclarationWith(): KtNamedDeclaration? = getNonLocalContainingOrThisDeclaration { declaration -> when (declaration) { diff --git a/idea/idea-frontend-fir/idea-fir-low-level-api/src/org/jetbrains/kotlin/idea/fir/low/level/api/file/structure/FileStructure.kt b/idea/idea-frontend-fir/idea-fir-low-level-api/src/org/jetbrains/kotlin/idea/fir/low/level/api/file/structure/FileStructure.kt index a0595684c3f..f90e7e4746a 100644 --- a/idea/idea-frontend-fir/idea-fir-low-level-api/src/org/jetbrains/kotlin/idea/fir/low/level/api/file/structure/FileStructure.kt +++ b/idea/idea-frontend-fir/idea-fir-low-level-api/src/org/jetbrains/kotlin/idea/fir/low/level/api/file/structure/FileStructure.kt @@ -6,7 +6,8 @@ package org.jetbrains.kotlin.idea.fir.low.level.api.file.structure import org.jetbrains.kotlin.diagnostics.Diagnostic -import org.jetbrains.kotlin.fir.declarations.* +import org.jetbrains.kotlin.fir.declarations.FirFile +import org.jetbrains.kotlin.fir.declarations.FirResolvePhase import org.jetbrains.kotlin.idea.fir.low.level.api.element.builder.FirTowerDataContextCollector import org.jetbrains.kotlin.idea.fir.low.level.api.element.builder.getNonLocalContainingOrThisDeclaration import org.jetbrains.kotlin.idea.fir.low.level.api.file.builder.FirFileBuilder @@ -15,8 +16,10 @@ import org.jetbrains.kotlin.idea.fir.low.level.api.lazy.resolve.FirLazyDeclarati import org.jetbrains.kotlin.idea.fir.low.level.api.providers.firIdeProvider import org.jetbrains.kotlin.idea.fir.low.level.api.util.findSourceNonLocalFirDeclaration import org.jetbrains.kotlin.idea.util.getElementTextInContext -import org.jetbrains.kotlin.psi.* -import org.jetbrains.kotlin.psi.psiUtil.forEachDescendantOfType +import org.jetbrains.kotlin.psi.KtAnnotated +import org.jetbrains.kotlin.psi.KtDeclaration +import org.jetbrains.kotlin.psi.KtElement +import org.jetbrains.kotlin.psi.KtFile import java.util.concurrent.ConcurrentHashMap @@ -89,7 +92,8 @@ internal class FileStructure( val firFile = firFileBuilder.getFirFileResolvedToPhaseWithCaching( container, moduleFileCache, - FirResolvePhase.IMPORTS, + //TODO: Make resolve whole file into TYPES only for top level declarations or annotations with `file` site + FirResolvePhase.TYPES, checkPCE = true ) RootStructureElement( diff --git a/idea/idea-frontend-fir/idea-fir-low-level-api/src/org/jetbrains/kotlin/idea/fir/low/level/api/file/structure/FileStructureElement.kt b/idea/idea-frontend-fir/idea-fir-low-level-api/src/org/jetbrains/kotlin/idea/fir/low/level/api/file/structure/FileStructureElement.kt index eac05f693ab..d5e36707d4e 100644 --- a/idea/idea-frontend-fir/idea-fir-low-level-api/src/org/jetbrains/kotlin/idea/fir/low/level/api/file/structure/FileStructureElement.kt +++ b/idea/idea-frontend-fir/idea-fir-low-level-api/src/org/jetbrains/kotlin/idea/fir/low/level/api/file/structure/FileStructureElement.kt @@ -8,10 +8,8 @@ package org.jetbrains.kotlin.idea.fir.low.level.api.file.structure import org.jetbrains.kotlin.diagnostics.Diagnostic import org.jetbrains.kotlin.fir.FirElement import org.jetbrains.kotlin.fir.analysis.collectors.DiagnosticCollectorDeclarationAction -import org.jetbrains.kotlin.fir.containingClass import org.jetbrains.kotlin.fir.declarations.* import org.jetbrains.kotlin.fir.psi -import org.jetbrains.kotlin.fir.resolve.toSymbol import org.jetbrains.kotlin.fir.symbols.AbstractFirBasedSymbol import org.jetbrains.kotlin.fir.symbols.impl.FirFunctionSymbol import org.jetbrains.kotlin.fir.symbols.impl.FirPropertySymbol @@ -19,9 +17,9 @@ import org.jetbrains.kotlin.idea.fir.low.level.api.diagnostics.FirIdeStructureEl import org.jetbrains.kotlin.idea.fir.low.level.api.file.builder.ModuleFileCache import org.jetbrains.kotlin.idea.fir.low.level.api.lazy.resolve.FirLazyDeclarationResolver import org.jetbrains.kotlin.idea.fir.low.level.api.providers.FirIdeProvider +import org.jetbrains.kotlin.idea.fir.low.level.api.util.hasFqName import org.jetbrains.kotlin.idea.fir.low.level.api.util.isGeneratedDeclaration import org.jetbrains.kotlin.idea.fir.low.level.api.util.ktDeclaration -import org.jetbrains.kotlin.idea.fir.low.level.api.util.replaceFirst import org.jetbrains.kotlin.psi.* internal class FileStructureElementDiagnostics( @@ -181,9 +179,16 @@ internal class NonReanalyzableDeclarationStructureElement( companion object { private val recorder = object : FirElementsRecorder() { + override fun visitProperty(property: FirProperty, data: MutableMap) { + val psi = property.psi as? KtProperty ?: return super.visitProperty(property, data) + if (!FileElementFactory.isReanalyzableContainer(psi) || !psi.hasFqName()) { + super.visitProperty(property, data) + } + } + override fun visitSimpleFunction(simpleFunction: FirSimpleFunction, data: MutableMap) { val psi = simpleFunction.psi as? KtNamedFunction ?: return super.visitSimpleFunction(simpleFunction, data) - if (!FileElementFactory.isReanalyzableContainer(psi) || KtPsiUtil.isLocal(psi)) { + if (!FileElementFactory.isReanalyzableContainer(psi) || !psi.hasFqName()) { super.visitSimpleFunction(simpleFunction, data) } } diff --git a/idea/idea-frontend-fir/idea-fir-low-level-api/src/org/jetbrains/kotlin/idea/fir/low/level/api/util/utils.kt b/idea/idea-frontend-fir/idea-fir-low-level-api/src/org/jetbrains/kotlin/idea/fir/low/level/api/util/utils.kt index b364ea19056..a01ee03a91d 100644 --- a/idea/idea-frontend-fir/idea-fir-low-level-api/src/org/jetbrains/kotlin/idea/fir/low/level/api/util/utils.kt +++ b/idea/idea-frontend-fir/idea-fir-low-level-api/src/org/jetbrains/kotlin/idea/fir/low/level/api/util/utils.kt @@ -7,6 +7,7 @@ package org.jetbrains.kotlin.idea.fir.low.level.api.util import com.intellij.openapi.progress.ProcessCanceledException import com.intellij.openapi.progress.ProgressManager +import com.intellij.psi.util.parentsOfType import org.jetbrains.kotlin.fir.FirElement import org.jetbrains.kotlin.fir.declarations.FirDeclaration import org.jetbrains.kotlin.fir.diagnostics.FirDiagnosticHolder @@ -14,10 +15,8 @@ import org.jetbrains.kotlin.fir.psi import org.jetbrains.kotlin.fir.render import org.jetbrains.kotlin.idea.caches.project.IdeaModuleInfo import org.jetbrains.kotlin.idea.util.getElementTextInContext -import org.jetbrains.kotlin.psi.KtDeclaration -import org.jetbrains.kotlin.psi.KtElement -import org.jetbrains.kotlin.psi.KtFile -import org.jetbrains.kotlin.psi.KtObjectLiteralExpression +import org.jetbrains.kotlin.psi.* +import org.jetbrains.kotlin.psi.psiUtil.isObjectLiteral import java.util.concurrent.TimeUnit import java.util.concurrent.locks.Lock @@ -91,4 +90,11 @@ internal fun IdeaModuleInfo.collectTransitiveDependenciesWithSelf(): List(withSelf = false).all { it.isNonAnonymousClassOrObject() } + +internal fun KtDeclaration.isNonAnonymousClassOrObject() = + this is KtClassOrObject + && !this.isObjectLiteral() diff --git a/idea/idea-frontend-fir/src/org/jetbrains/kotlin/idea/asJava/LightClassProviderFirImpl.kt b/idea/idea-frontend-fir/src/org/jetbrains/kotlin/idea/asJava/LightClassProviderFirImpl.kt deleted file mode 100644 index 80ba2d43f01..00000000000 --- a/idea/idea-frontend-fir/src/org/jetbrains/kotlin/idea/asJava/LightClassProviderFirImpl.kt +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright 2010-2020 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. - */ - -package org.jetbrains.kotlin.idea.asJava - -import com.intellij.psi.* -import org.jetbrains.kotlin.asJava.* -import org.jetbrains.kotlin.asJava.classes.KtLightClass -import org.jetbrains.kotlin.psi.* - -class LightClassProviderFirImpl : LightClassProvider { - override fun getLightFieldForCompanionObject(companionObject: KtClassOrObject): PsiField? { - return null - } - - override fun getLightClassMethods(function: KtFunction): List = - LightClassUtil.getLightClassMethods(function) - - override fun getLightClassParameterDeclarations(parameter: KtParameter): List = - LightClassUtil.getLightClassPropertyMethods(parameter).allDeclarations - - override fun getLightClassPropertyDeclarations(property: KtProperty): List = - LightClassUtil.getLightClassPropertyMethods(property).allDeclarations - - override fun toLightClassWithBuiltinMapping(classOrObject: KtClassOrObject): PsiClass? = - null - - override fun toLightMethods(psiElement: PsiElement): List = - psiElement.toLightMethods() - - override fun toLightClass(classOrObject: KtClassOrObject): KtLightClass? = - classOrObject.toLightClass() - - override fun toLightElements(ktElement: KtElement): List = - ktElement.toLightElements() - - override fun createKtFakeLightClass(kotlinOrigin: KtClassOrObject): PsiClass? { - return null - } - - override fun getRepresentativeLightMethod(psiElement: PsiElement): PsiMethod? { - return null - } - - override fun isKtFakeLightClass(psiClass: PsiClass): Boolean { - return false - } - - override fun isKtLightClassForDecompiledDeclaration(psiClass: PsiClass): Boolean { - return false - } - - override fun createKtFakeLightMethod(ktDeclaration: KtNamedDeclaration): PsiMethod? { - return null - } -} \ No newline at end of file diff --git a/idea/idea-frontend-fir/src/org/jetbrains/kotlin/idea/asJava/classes/FirLightClassForClassOrObjectSymbol.kt b/idea/idea-frontend-fir/src/org/jetbrains/kotlin/idea/asJava/classes/FirLightClassForClassOrObjectSymbol.kt index c8e93022ce2..2182452e06d 100644 --- a/idea/idea-frontend-fir/src/org/jetbrains/kotlin/idea/asJava/classes/FirLightClassForClassOrObjectSymbol.kt +++ b/idea/idea-frontend-fir/src/org/jetbrains/kotlin/idea/asJava/classes/FirLightClassForClassOrObjectSymbol.kt @@ -13,13 +13,12 @@ import com.intellij.psi.search.SearchScope import com.intellij.psi.stubs.IStubElementType import com.intellij.psi.stubs.StubElement import org.jetbrains.annotations.NonNls -import org.jetbrains.kotlin.asJava.classes.getOutermostClassOrObject -import org.jetbrains.kotlin.asJava.classes.lazyPub +import org.jetbrains.kotlin.asJava.classes.* import org.jetbrains.kotlin.asJava.elements.FirLightIdentifier import org.jetbrains.kotlin.asJava.elements.KtLightField +import org.jetbrains.kotlin.idea.asJava.classes.checkIsInheritor import org.jetbrains.kotlin.idea.asJava.classes.getOrCreateFirLightClass import org.jetbrains.kotlin.idea.asJava.elements.FirLightTypeParameterListForSymbol -import org.jetbrains.kotlin.idea.frontend.api.fir.analyzeWithSymbolAsContext import org.jetbrains.kotlin.idea.frontend.api.symbols.* import org.jetbrains.kotlin.idea.frontend.api.symbols.markers.KtSymbolKind import org.jetbrains.kotlin.idea.util.ifFalse @@ -132,8 +131,19 @@ internal abstract class FirLightClassForClassOrObjectSymbol( override fun isValid(): Boolean = kotlinOrigin?.isValid ?: true - override fun isInheritor(baseClass: PsiClass, checkDeep: Boolean): Boolean = - InheritanceImplUtil.isInheritor(this, baseClass, checkDeep) + override fun isInheritor(baseClass: PsiClass, checkDeep: Boolean): Boolean { + if (manager.areElementsEquivalent(baseClass, this)) return false + LightClassInheritanceHelper.getService(project).isInheritor(this, baseClass, checkDeep).ifSure { return it } + + val thisClassOrigin = kotlinOrigin + val baseClassOrigin = (baseClass as? KtLightClass)?.kotlinOrigin + + return if (baseClassOrigin != null && thisClassOrigin != null) { + thisClassOrigin.checkIsInheritor(baseClassOrigin, checkDeep) + } else { + InheritanceImplUtil.isInheritor(this, baseClass, checkDeep) + } + } override fun toString() = "${this::class.java.simpleName}:${kotlinOrigin?.getDebugText()}" diff --git a/idea/idea-frontend-fir/src/org/jetbrains/kotlin/idea/asJava/classes/KtFirBasedFakeLightClass.kt b/idea/idea-frontend-fir/src/org/jetbrains/kotlin/idea/asJava/classes/KtFirBasedFakeLightClass.kt new file mode 100644 index 00000000000..9697cb0a4d9 --- /dev/null +++ b/idea/idea-frontend-fir/src/org/jetbrains/kotlin/idea/asJava/classes/KtFirBasedFakeLightClass.kt @@ -0,0 +1,37 @@ +/* + * Copyright 2010-2021 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. + */ + +package org.jetbrains.kotlin.idea.asJava + +import com.intellij.psi.PsiClass +import org.jetbrains.kotlin.asJava.classes.KtFakeLightClass +import org.jetbrains.kotlin.asJava.classes.KtLightClass +import org.jetbrains.kotlin.asJava.classes.LightClassInheritanceHelper +import org.jetbrains.kotlin.idea.asJava.classes.checkIsInheritor +import org.jetbrains.kotlin.idea.frontend.api.HackToForceAllowRunningAnalyzeOnEDT +import org.jetbrains.kotlin.psi.KtClassOrObject +import org.jetbrains.kotlin.psi.psiUtil.containingClassOrObject + +//TODO Make fake class symbol based +class KtFirBasedFakeLightClass(kotlinOrigin: KtClassOrObject) : + KtFakeLightClass(kotlinOrigin) { + + override fun copy(): KtFakeLightClass = KtFirBasedFakeLightClass(kotlinOrigin) + + private val _containingClass: KtFakeLightClass? by lazy { + kotlinOrigin.containingClassOrObject?.let { KtFirBasedFakeLightClass(it) } + } + + override fun getContainingClass(): KtFakeLightClass? = _containingClass + + @OptIn(HackToForceAllowRunningAnalyzeOnEDT::class) + override fun isInheritor(baseClass: PsiClass, checkDeep: Boolean): Boolean { + if (manager.areElementsEquivalent(baseClass, this)) return false + LightClassInheritanceHelper.getService(project).isInheritor(this, baseClass, checkDeep).ifSure { return it } + + val baseClassOrigin = (baseClass as? KtLightClass)?.kotlinOrigin ?: return false + return kotlinOrigin.checkIsInheritor(baseClassOrigin, checkDeep) + } +} \ No newline at end of file diff --git a/idea/idea-frontend-fir/src/org/jetbrains/kotlin/idea/asJava/classes/firLightClassUtils.kt b/idea/idea-frontend-fir/src/org/jetbrains/kotlin/idea/asJava/classes/firLightClassUtils.kt index 8fee9ca1004..6506d34c3c3 100644 --- a/idea/idea-frontend-fir/src/org/jetbrains/kotlin/idea/asJava/classes/firLightClassUtils.kt +++ b/idea/idea-frontend-fir/src/org/jetbrains/kotlin/idea/asJava/classes/firLightClassUtils.kt @@ -10,10 +10,7 @@ import com.intellij.psi.PsiReferenceList import com.intellij.psi.util.CachedValueProvider import com.intellij.psi.util.CachedValuesManager import org.jetbrains.kotlin.analyzer.KotlinModificationTrackerService -import org.jetbrains.kotlin.asJava.classes.KotlinSuperTypeListBuilder -import org.jetbrains.kotlin.asJava.classes.KtLightClass -import org.jetbrains.kotlin.asJava.classes.METHOD_INDEX_BASE -import org.jetbrains.kotlin.asJava.classes.shouldNotBeVisibleAsLightClass +import org.jetbrains.kotlin.asJava.classes.* import org.jetbrains.kotlin.asJava.elements.KtLightField import org.jetbrains.kotlin.asJava.elements.KtLightMethod import org.jetbrains.kotlin.descriptors.annotations.AnnotationUseSiteTarget @@ -330,4 +327,22 @@ internal fun KtSymbolWithMembers.createInnerClasses(manager: PsiManager): List - firClass.session to ConeClassLikeTypeImpl( - firClass.symbol.toLookupTag(), - firClass.typeParameters.map { ConeTypeParameterTypeImpl(it.symbol.toLookupTag(), isNullable = false) }.toTypedArray(), - isNullable = false - ) + + val types = analyzeWithSymbolAsContext(this) { + this@typeForClassSymbol.buildSelfClassType() } - return type.asPsiType(session, this.firRef.resolveState, TypeMappingMode.DEFAULT, psiElement) + require(types is KtFirType) + + val session = firRef.withFir { it.session } + return types.coneType.asPsiType(session, firRef.resolveState, TypeMappingMode.DEFAULT, psiElement) } private class AnonymousTypesSubstitutor(private val session: FirSession, private val state: FirModuleResolveState) : diff --git a/idea/idea-frontend-fir/src/org/jetbrains/kotlin/idea/frontend/api/fir/components/KtFirTypeProvider.kt b/idea/idea-frontend-fir/src/org/jetbrains/kotlin/idea/frontend/api/fir/components/KtFirTypeProvider.kt index 9752bf206ea..1bf05a63ae6 100644 --- a/idea/idea-frontend-fir/src/org/jetbrains/kotlin/idea/frontend/api/fir/components/KtFirTypeProvider.kt +++ b/idea/idea-frontend-fir/src/org/jetbrains/kotlin/idea/frontend/api/fir/components/KtFirTypeProvider.kt @@ -5,12 +5,17 @@ package org.jetbrains.kotlin.idea.frontend.api.fir.components +import org.jetbrains.kotlin.fir.declarations.FirResolvePhase import org.jetbrains.kotlin.fir.resolve.inference.isBuiltinFunctionalType +import org.jetbrains.kotlin.fir.types.impl.ConeClassLikeTypeImpl +import org.jetbrains.kotlin.fir.types.impl.ConeTypeParameterTypeImpl import org.jetbrains.kotlin.idea.frontend.api.ValidityToken import org.jetbrains.kotlin.idea.frontend.api.components.KtBuiltinTypes import org.jetbrains.kotlin.idea.frontend.api.components.KtTypeProvider import org.jetbrains.kotlin.idea.frontend.api.fir.KtFirAnalysisSession +import org.jetbrains.kotlin.idea.frontend.api.fir.symbols.KtFirClassOrObjectSymbol import org.jetbrains.kotlin.idea.frontend.api.fir.types.KtFirType +import org.jetbrains.kotlin.idea.frontend.api.symbols.KtClassOrObjectSymbol import org.jetbrains.kotlin.idea.frontend.api.types.KtType import org.jetbrains.kotlin.idea.frontend.api.withValidityAssertion @@ -25,4 +30,16 @@ internal class KtFirTypeProvider( override val builtinTypes: KtBuiltinTypes = KtFirBuiltInTypes(analysisSession.firResolveState.rootModuleSession.builtinTypes, analysisSession.firSymbolBuilder, token) + + override fun buildSelfClassType(symbol: KtClassOrObjectSymbol): KtType { + require(symbol is KtFirClassOrObjectSymbol) + val type = symbol.firRef.withFir(FirResolvePhase.TYPES) { firClass -> + ConeClassLikeTypeImpl( + firClass.symbol.toLookupTag(), + firClass.typeParameters.map { ConeTypeParameterTypeImpl(it.symbol.toLookupTag(), isNullable = false) }.toTypedArray(), + isNullable = false + ) + } + return type.asKtType() + } } diff --git a/idea/idea-frontend-fir/src/org/jetbrains/kotlin/idea/references/FirReferenceResolveHelper.kt b/idea/idea-frontend-fir/src/org/jetbrains/kotlin/idea/references/FirReferenceResolveHelper.kt index c0928b8f1d6..85621f74508 100644 --- a/idea/idea-frontend-fir/src/org/jetbrains/kotlin/idea/references/FirReferenceResolveHelper.kt +++ b/idea/idea-frontend-fir/src/org/jetbrains/kotlin/idea/references/FirReferenceResolveHelper.kt @@ -186,14 +186,14 @@ internal object FirReferenceResolveHelper { val ktValueArgumentName = expression.parent as? KtValueArgumentName ?: return emptyList() val ktValueArgument = ktValueArgumentName.parent as? KtValueArgument ?: return emptyList() val ktValueArgumentList = ktValueArgument.parent as? KtValueArgumentList ?: return emptyList() - val ktCallExpression = ktValueArgumentList.parent as? KtCallExpression ?: return emptyList() + val ktCallExpression = ktValueArgumentList.parent as? KtCallElement ?: return emptyList() - val firCall = ktCallExpression.getOrBuildFirSafe(analysisSession.firResolveState) ?: return emptyList() + val firCall = ktCallExpression.getOrBuildFirSafe(analysisSession.firResolveState) ?: return emptyList() val parameter = firCall.findCorrespondingParameter(ktValueArgument) ?: return emptyList() return listOfNotNull(parameter.buildSymbol(symbolBuilder)) } - private fun FirFunctionCall.findCorrespondingParameter(ktValueArgument: KtValueArgument): FirValueParameter? = + private fun FirCall.findCorrespondingParameter(ktValueArgument: KtValueArgument): FirValueParameter? = argumentMapping?.entries?.firstNotNullResult { (firArgument, firParameter) -> if (firArgument.psi == ktValueArgument) firParameter else null diff --git a/idea/idea-frontend-fir/src/org/jetbrains/kotlin/idea/references/FirSimpleNameReference.kt b/idea/idea-frontend-fir/src/org/jetbrains/kotlin/idea/references/FirSimpleNameReference.kt index 4d60ef2b400..479a71a5696 100644 --- a/idea/idea-frontend-fir/src/org/jetbrains/kotlin/idea/references/FirSimpleNameReference.kt +++ b/idea/idea-frontend-fir/src/org/jetbrains/kotlin/idea/references/FirSimpleNameReference.kt @@ -8,17 +8,39 @@ package org.jetbrains.kotlin.idea.references import com.intellij.psi.PsiElement import org.jetbrains.kotlin.idea.frontend.api.KtAnalysisSession import org.jetbrains.kotlin.idea.frontend.api.fir.KtFirAnalysisSession +import org.jetbrains.kotlin.idea.frontend.api.fir.symbols.KtFirClassOrObjectSymbol +import org.jetbrains.kotlin.idea.frontend.api.symbols.KtClassKind import org.jetbrains.kotlin.idea.frontend.api.symbols.KtSymbol import org.jetbrains.kotlin.name.FqName -import org.jetbrains.kotlin.psi.KtImportAlias -import org.jetbrains.kotlin.psi.KtSimpleNameExpression +import org.jetbrains.kotlin.psi.* internal class KtFirSimpleNameReference( expression: KtSimpleNameExpression ) : KtSimpleNameReference(expression), KtFirReference { + + private val isAnnotationCall: Boolean + get() { + val ktUserType = expression.parent as? KtUserType ?: return false + val ktTypeReference = ktUserType.parent as? KtTypeReference ?: return false + val ktConstructorCalleeExpression = ktTypeReference.parent as? KtConstructorCalleeExpression ?: return false + return ktConstructorCalleeExpression.parent is KtAnnotationEntry + } + + private fun KtAnalysisSession.fixUpAnnotationCallResolveToCtor(resultsToFix: Collection): Collection { + if (resultsToFix.isEmpty() || !isAnnotationCall) return resultsToFix + + return resultsToFix.map { targetSymbol -> + if (targetSymbol is KtFirClassOrObjectSymbol && targetSymbol.classKind == KtClassKind.ANNOTATION_CLASS) { + targetSymbol.getMemberScope().getConstructors().firstOrNull() ?: targetSymbol + } else targetSymbol + } + } + override fun KtAnalysisSession.resolveToSymbols(): Collection { check(this is KtFirAnalysisSession) - return FirReferenceResolveHelper.resolveSimpleNameReference(this@KtFirSimpleNameReference, this) + val results = FirReferenceResolveHelper.resolveSimpleNameReference(this@KtFirSimpleNameReference, this) + //This fix-up needed to resolve annotation call into annotation constructor (but not into the annotation type) + return fixUpAnnotationCallResolveToCtor(results) } override fun doCanBeReferenceTo(candidateTarget: PsiElement): Boolean { diff --git a/idea/idea-frontend-fir/testData/memberScopeByFqName/Int.txt b/idea/idea-frontend-fir/testData/memberScopeByFqName/Int.txt index 2dfb1a22f68..d211fd3220a 100644 --- a/idea/idea-frontend-fir/testData/memberScopeByFqName/Int.txt +++ b/idea/idea-frontend-fir/testData/memberScopeByFqName/Int.txt @@ -1223,8 +1223,8 @@ KtFirFunctionSymbol: annotatedType: [] kotlin/Boolean annotationClassIds: [] annotations: [] - callableIdIfNonLocal: kotlin.Int.equals - dispatchType: kotlin/Int + callableIdIfNonLocal: kotlin.Any.equals + dispatchType: kotlin/Any isExtension: false isExternal: false isInline: false @@ -1233,7 +1233,7 @@ KtFirFunctionSymbol: isSuspend: false modality: OPEN name: equals - origin: INTERSECTION_OVERRIDE + origin: LIBRARY receiverType: null symbolKind: MEMBER typeParameters: [] @@ -1244,8 +1244,8 @@ KtFirFunctionSymbol: annotatedType: [] kotlin/Int annotationClassIds: [] annotations: [] - callableIdIfNonLocal: kotlin.Int.hashCode - dispatchType: kotlin/Int + callableIdIfNonLocal: kotlin.Any.hashCode + dispatchType: kotlin/Any isExtension: false isExternal: false isInline: false @@ -1254,7 +1254,7 @@ KtFirFunctionSymbol: isSuspend: false modality: OPEN name: hashCode - origin: INTERSECTION_OVERRIDE + origin: LIBRARY receiverType: null symbolKind: MEMBER typeParameters: [] @@ -1265,8 +1265,8 @@ KtFirFunctionSymbol: annotatedType: [] kotlin/String annotationClassIds: [] annotations: [] - callableIdIfNonLocal: kotlin.Int.toString - dispatchType: kotlin/Int + callableIdIfNonLocal: kotlin.Any.toString + dispatchType: kotlin/Any isExtension: false isExternal: false isInline: false @@ -1275,7 +1275,7 @@ KtFirFunctionSymbol: isSuspend: false modality: OPEN name: toString - origin: INTERSECTION_OVERRIDE + origin: LIBRARY receiverType: null symbolKind: MEMBER typeParameters: [] diff --git a/idea/idea-frontend-fir/testData/memberScopeByFqName/MutableList.txt b/idea/idea-frontend-fir/testData/memberScopeByFqName/MutableList.txt index f1ee3b5e269..47ece7fb3f1 100644 --- a/idea/idea-frontend-fir/testData/memberScopeByFqName/MutableList.txt +++ b/idea/idea-frontend-fir/testData/memberScopeByFqName/MutableList.txt @@ -449,8 +449,8 @@ KtFirFunctionSymbol: annotatedType: [] kotlin/Boolean annotationClassIds: [] annotations: [] - callableIdIfNonLocal: kotlin.collections.MutableList.equals - dispatchType: kotlin/collections/MutableList + callableIdIfNonLocal: kotlin.Any.equals + dispatchType: kotlin/Any isExtension: false isExternal: false isInline: false @@ -459,7 +459,7 @@ KtFirFunctionSymbol: isSuspend: false modality: OPEN name: equals - origin: INTERSECTION_OVERRIDE + origin: LIBRARY receiverType: null symbolKind: MEMBER typeParameters: [] @@ -470,8 +470,8 @@ KtFirFunctionSymbol: annotatedType: [] kotlin/Int annotationClassIds: [] annotations: [] - callableIdIfNonLocal: kotlin.collections.MutableList.hashCode - dispatchType: kotlin/collections/MutableList + callableIdIfNonLocal: kotlin.Any.hashCode + dispatchType: kotlin/Any isExtension: false isExternal: false isInline: false @@ -480,7 +480,7 @@ KtFirFunctionSymbol: isSuspend: false modality: OPEN name: hashCode - origin: INTERSECTION_OVERRIDE + origin: LIBRARY receiverType: null symbolKind: MEMBER typeParameters: [] @@ -491,8 +491,8 @@ KtFirFunctionSymbol: annotatedType: [] kotlin/String annotationClassIds: [] annotations: [] - callableIdIfNonLocal: kotlin.collections.MutableList.toString - dispatchType: kotlin/collections/MutableList + callableIdIfNonLocal: kotlin.Any.toString + dispatchType: kotlin/Any isExtension: false isExternal: false isInline: false @@ -501,7 +501,7 @@ KtFirFunctionSymbol: isSuspend: false modality: OPEN name: toString - origin: INTERSECTION_OVERRIDE + origin: LIBRARY receiverType: null symbolKind: MEMBER typeParameters: [] diff --git a/idea/idea-frontend-independent/src/org/jetbrains/kotlin/idea/KotlinIconProviderBase.kt b/idea/idea-frontend-independent/src/org/jetbrains/kotlin/idea/KotlinIconProviderBase.kt index 148ca7913f1..8d881e15051 100644 --- a/idea/idea-frontend-independent/src/org/jetbrains/kotlin/idea/KotlinIconProviderBase.kt +++ b/idea/idea-frontend-independent/src/org/jetbrains/kotlin/idea/KotlinIconProviderBase.kt @@ -18,9 +18,9 @@ import org.jetbrains.kotlin.asJava.classes.KtLightClass import org.jetbrains.kotlin.asJava.classes.KtLightClassForFacade import org.jetbrains.kotlin.asJava.classes.KtLightClassForSourceDeclaration import org.jetbrains.kotlin.asJava.unwrapped -import org.jetbrains.kotlin.idea.asJava.LightClassProvider.Companion.providedIsKtLightClassForDecompiledDeclaration import org.jetbrains.kotlin.idea.KotlinIconsIndependent.ACTUAL import org.jetbrains.kotlin.idea.KotlinIconsIndependent.EXPECT +import org.jetbrains.kotlin.idea.caches.lightClasses.KtLightClassForDecompiledDeclarationBase import org.jetbrains.kotlin.idea.util.ifTrue import org.jetbrains.kotlin.lexer.KtTokens import org.jetbrains.kotlin.psi.* @@ -149,7 +149,7 @@ open class KotlinIconProviderBase : IconProvider(), DumbAware { is KtProperty -> if (isVar) KotlinIconsIndependent.FIELD_VAR else KotlinIconsIndependent.FIELD_VAL is KtClassInitializer -> KotlinIconsIndependent.CLASS_INITIALIZER is KtTypeAlias -> KotlinIconsIndependent.TYPE_ALIAS - is PsiClass -> providedIsKtLightClassForDecompiledDeclaration().ifTrue { + is PsiClass -> (this is KtLightClassForDecompiledDeclarationBase).ifTrue { val origin = (this as? KtLightClass)?.kotlinOrigin //TODO (light classes for decompiled files): correct presentation if (origin != null) origin.getBaseIcon() else KotlinIconsIndependent.CLASS diff --git a/idea/idea-frontend-independent/src/org/jetbrains/kotlin/idea/asJava/LightClassProvider.kt b/idea/idea-frontend-independent/src/org/jetbrains/kotlin/idea/asJava/LightClassProvider.kt deleted file mode 100644 index 9d7f6affab0..00000000000 --- a/idea/idea-frontend-independent/src/org/jetbrains/kotlin/idea/asJava/LightClassProvider.kt +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright 2010-2020 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. - */ - -package org.jetbrains.kotlin.idea.asJava - -import com.intellij.openapi.components.ServiceManager -import com.intellij.openapi.project.Project -import com.intellij.psi.* -import org.jetbrains.kotlin.asJava.classes.KtLightClass -import org.jetbrains.kotlin.psi.* - -interface LightClassProvider { - - fun getLightFieldForCompanionObject(companionObject: KtClassOrObject): PsiField? - - fun getLightClassMethods(function: KtFunction): List - - fun getLightClassParameterDeclarations(parameter: KtParameter): List - - fun getLightClassPropertyDeclarations(property: KtProperty): List - - fun toLightClassWithBuiltinMapping(classOrObject: KtClassOrObject): PsiClass? - - fun toLightMethods(psiElement: PsiElement): List - - fun toLightClass(classOrObject: KtClassOrObject): KtLightClass? - - fun toLightElements(ktElement: KtElement): List - - fun createKtFakeLightClass(kotlinOrigin: KtClassOrObject): PsiClass? - - fun getRepresentativeLightMethod(psiElement: PsiElement): PsiMethod? - - fun isKtFakeLightClass(psiClass: PsiClass): Boolean - - fun isKtLightClassForDecompiledDeclaration(psiClass: PsiClass): Boolean - - fun createKtFakeLightMethod(ktDeclaration: KtNamedDeclaration): PsiMethod? - - companion object { - - fun getInstance(project: Project): LightClassProvider { - return ServiceManager.getService(project, LightClassProvider::class.java) - } - - fun providedGetLightFieldForCompanionObject(companionObject: KtClassOrObject): PsiField? = - getInstance(companionObject.project).getLightFieldForCompanionObject(companionObject) - - fun providedGetLightClassMethods(function: KtFunction): List = - getInstance(function.project).getLightClassMethods(function) - - fun providedGetLightClassParameterDeclarations(parameter: KtParameter): List = - getInstance(parameter.project).getLightClassParameterDeclarations(parameter) - - fun providedGetLightClassPropertyDeclarations(property: KtProperty): List = - getInstance(property.project).getLightClassPropertyDeclarations(property) - - fun KtClassOrObject.providedToLightClassWithBuiltinMapping(): PsiClass? = - getInstance(project).toLightClassWithBuiltinMapping(this) - - fun PsiElement.providedToLightMethods(): List = - getInstance(project).toLightMethods(this) - - fun KtClassOrObject.providedToLightClass(): KtLightClass? = - getInstance(project).toLightClass(this) - - fun KtElement.providedToLightElements(): List = - getInstance(project).toLightElements(this) - - fun providedCreateKtFakeLightClass(kotlinOrigin: KtClassOrObject): PsiClass? = - getInstance(kotlinOrigin.project).createKtFakeLightClass(kotlinOrigin) - - fun PsiClass.providedIsKtFakeLightClass(): Boolean = - getInstance(project).isKtFakeLightClass(this) - - fun PsiClass.providedIsKtLightClassForDecompiledDeclaration(): Boolean = - getInstance(project).isKtLightClassForDecompiledDeclaration(this) - - fun providedCreateKtFakeLightMethod(ktDeclaration: KtNamedDeclaration): PsiMethod? = - getInstance(ktDeclaration.project).createKtFakeLightMethod(ktDeclaration) - - fun PsiElement.providedGetRepresentativeLightMethod(): PsiMethod? = - getInstance(project).getRepresentativeLightMethod(this) - } -} \ No newline at end of file diff --git a/idea/idea-frontend-independent/src/org/jetbrains/kotlin/idea/caches/lightClasses/KtLightClassForDecompiledDeclarationBase.kt b/idea/idea-frontend-independent/src/org/jetbrains/kotlin/idea/caches/lightClasses/KtLightClassForDecompiledDeclarationBase.kt new file mode 100644 index 00000000000..4d814955691 --- /dev/null +++ b/idea/idea-frontend-independent/src/org/jetbrains/kotlin/idea/caches/lightClasses/KtLightClassForDecompiledDeclarationBase.kt @@ -0,0 +1,19 @@ +/* + * Copyright 2010-2020 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. + */ + +package org.jetbrains.kotlin.idea.caches.lightClasses + +import com.intellij.psi.PsiClass +import com.intellij.psi.PsiElement +import com.intellij.psi.impl.source.PsiExtensibleClass +import org.jetbrains.kotlin.asJava.classes.KtLightClass +import org.jetbrains.kotlin.asJava.elements.KtLightElementBase +import org.jetbrains.kotlin.psi.KtClassOrObject + +abstract class KtLightClassForDecompiledDeclarationBase( + override val clsDelegate: PsiClass, + clsParent: PsiElement, + final override val kotlinOrigin: KtClassOrObject? +) : KtLightElementBase(clsParent), PsiClass, KtLightClass, PsiExtensibleClass \ No newline at end of file diff --git a/idea/idea-frontend-independent/src/org/jetbrains/kotlin/idea/findUsages/KotlinFindUsagesHandlerFactory.kt b/idea/idea-frontend-independent/src/org/jetbrains/kotlin/idea/findUsages/KotlinFindUsagesHandlerFactory.kt index ca74f4d6b79..602b147eef2 100644 --- a/idea/idea-frontend-independent/src/org/jetbrains/kotlin/idea/findUsages/KotlinFindUsagesHandlerFactory.kt +++ b/idea/idea-frontend-independent/src/org/jetbrains/kotlin/idea/findUsages/KotlinFindUsagesHandlerFactory.kt @@ -27,7 +27,7 @@ import com.intellij.openapi.project.Project import com.intellij.openapi.ui.Messages import com.intellij.psi.PsiElement import com.intellij.psi.search.searches.OverridingMethodsSearch -import org.jetbrains.kotlin.idea.asJava.LightClassProvider.Companion.providedToLightMethods +import org.jetbrains.kotlin.asJava.toLightMethods import org.jetbrains.kotlin.asJava.unwrapped import org.jetbrains.kotlin.idea.KotlinBundleIndependent import org.jetbrains.kotlin.idea.findUsages.KotlinFindUsagesSupport.Companion.checkSuperMethods @@ -92,7 +92,7 @@ class KotlinFindUsagesHandlerFactory(project: Project) : FindUsagesHandlerFactor } val function = element.ownerFunction if (function != null && function.isOverridable()) { - val psiMethod = function.providedToLightMethods().singleOrNull() + val psiMethod = function.toLightMethods().singleOrNull() if (psiMethod != null) { val hasOverridden = OverridingMethodsSearch.search(psiMethod).any() if (hasOverridden && askWhetherShouldSearchForParameterInOverridingMethods(element)) { diff --git a/idea/idea-frontend-independent/src/org/jetbrains/kotlin/idea/findUsages/dialogs/KotlinFindClassUsagesDialog.java b/idea/idea-frontend-independent/src/org/jetbrains/kotlin/idea/findUsages/dialogs/KotlinFindClassUsagesDialog.java index 9315cdf411f..15b0803e248 100644 --- a/idea/idea-frontend-independent/src/org/jetbrains/kotlin/idea/findUsages/dialogs/KotlinFindClassUsagesDialog.java +++ b/idea/idea-frontend-independent/src/org/jetbrains/kotlin/idea/findUsages/dialogs/KotlinFindClassUsagesDialog.java @@ -31,7 +31,6 @@ import com.intellij.ui.SimpleColoredComponent; import com.intellij.ui.StateRestoringCheckBox; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; -import org.jetbrains.kotlin.idea.asJava.LightClassProvider; import org.jetbrains.kotlin.asJava.LightClassUtilsKt; import org.jetbrains.kotlin.idea.KotlinBundleIndependent; import org.jetbrains.kotlin.idea.findUsages.KotlinClassFindUsagesOptions; @@ -42,6 +41,8 @@ import org.jetbrains.kotlin.psi.psiUtil.PsiUtilsKt; import javax.swing.*; +import static org.jetbrains.kotlin.asJava.LightClassUtilsKt.toLightClass; + public class KotlinFindClassUsagesDialog extends FindClassUsagesDialog { private StateRestoringCheckBox constructorUsages; private StateRestoringCheckBox derivedClasses; @@ -64,7 +65,7 @@ public class KotlinFindClassUsagesDialog extends FindClassUsagesDialog { @NotNull private static PsiClass getRepresentingPsiClass(@NotNull KtClassOrObject classOrObject) { - PsiClass lightClass = LightClassProvider.Companion.providedToLightClass(classOrObject); + PsiClass lightClass = toLightClass(classOrObject); if (lightClass != null) return lightClass; // TODO: Remove this code when light classes are generated for builtins diff --git a/idea/idea-frontend-independent/src/org/jetbrains/kotlin/idea/findUsages/findUsageUtils.kt b/idea/idea-frontend-independent/src/org/jetbrains/kotlin/idea/findUsages/findUsageUtils.kt index 9f5ad4349d1..f70c74faccc 100644 --- a/idea/idea-frontend-independent/src/org/jetbrains/kotlin/idea/findUsages/findUsageUtils.kt +++ b/idea/idea-frontend-independent/src/org/jetbrains/kotlin/idea/findUsages/findUsageUtils.kt @@ -27,8 +27,8 @@ import com.intellij.psi.search.searches.ReferencesSearch import com.intellij.usageView.UsageInfo import com.intellij.usages.UsageViewManager import com.intellij.util.Query -import org.jetbrains.kotlin.idea.asJava.LightClassProvider.Companion.providedToLightClass -import org.jetbrains.kotlin.idea.asJava.LightClassProvider.Companion.providedToLightElements +import org.jetbrains.kotlin.asJava.toLightClass +import org.jetbrains.kotlin.asJava.toLightElements import org.jetbrains.kotlin.idea.references.KtReference import org.jetbrains.kotlin.psi.KtConstructor import org.jetbrains.kotlin.psi.KtDeclaration @@ -44,9 +44,9 @@ fun KtDeclaration.processAllExactUsages( if (reference is KtReference) return listOf(this) return SmartList().also { list -> list += this - list += providedToLightElements() + list += toLightElements() if (this is KtConstructor<*>) { - list.addIfNotNull(getContainingClassOrObject().providedToLightClass()) + list.addIfNotNull(getContainingClassOrObject().toLightClass()) } } } diff --git a/idea/idea-frontend-independent/src/org/jetbrains/kotlin/idea/findUsages/handlers/KotlinFindClassUsagesHandler.kt b/idea/idea-frontend-independent/src/org/jetbrains/kotlin/idea/findUsages/handlers/KotlinFindClassUsagesHandler.kt index 6febfcf4000..c6268cf585e 100644 --- a/idea/idea-frontend-independent/src/org/jetbrains/kotlin/idea/findUsages/handlers/KotlinFindClassUsagesHandler.kt +++ b/idea/idea-frontend-independent/src/org/jetbrains/kotlin/idea/findUsages/handlers/KotlinFindClassUsagesHandler.kt @@ -29,8 +29,8 @@ import com.intellij.psi.search.searches.ReferencesSearch import com.intellij.usageView.UsageInfo import com.intellij.util.FilteredQuery import com.intellij.util.Processor -import org.jetbrains.kotlin.idea.asJava.LightClassProvider.Companion.providedToLightClass import org.jetbrains.kotlin.asJava.elements.KtLightMethod +import org.jetbrains.kotlin.asJava.toLightClass import org.jetbrains.kotlin.idea.findUsages.KotlinClassFindUsagesOptions import org.jetbrains.kotlin.idea.findUsages.KotlinFindUsagesHandlerFactory import org.jetbrains.kotlin.idea.findUsages.KotlinFindUsagesSupport.Companion.isCallReceiverRefersToCompanionObject @@ -98,7 +98,7 @@ class KotlinFindClassUsagesHandler( } if (kotlinOptions.searchConstructorUsages) { - classOrObject.providedToLightClass()?.constructors?.filterIsInstance()?.forEach { constructor -> + classOrObject.toLightClass()?.constructors?.filterIsInstance()?.forEach { constructor -> val scope = constructor.useScope.intersectWith(options.searchScope) var query = MethodReferencesSearch.search(constructor, scope, true) if (kotlinOptions.isSkipImportStatements) { @@ -184,7 +184,7 @@ class KotlinFindClassUsagesHandler( override fun getStringsToSearch(element: PsiElement): Collection { val psiClass = when (element) { is PsiClass -> element - is KtClassOrObject -> getElement().providedToLightClass() + is KtClassOrObject -> getElement().toLightClass() else -> null } ?: return Collections.emptyList() diff --git a/idea/idea-frontend-independent/src/org/jetbrains/kotlin/idea/findUsages/handlers/KotlinFindMemberUsagesHandler.kt b/idea/idea-frontend-independent/src/org/jetbrains/kotlin/idea/findUsages/handlers/KotlinFindMemberUsagesHandler.kt index 51d0d6e4b27..4ff96b88def 100644 --- a/idea/idea-frontend-independent/src/org/jetbrains/kotlin/idea/findUsages/handlers/KotlinFindMemberUsagesHandler.kt +++ b/idea/idea-frontend-independent/src/org/jetbrains/kotlin/idea/findUsages/handlers/KotlinFindMemberUsagesHandler.kt @@ -30,7 +30,7 @@ import com.intellij.psi.search.searches.ReferencesSearch import com.intellij.usageView.UsageInfo import com.intellij.util.* import org.jetbrains.annotations.TestOnly -import org.jetbrains.kotlin.idea.asJava.LightClassProvider.Companion.providedToLightMethods +import org.jetbrains.kotlin.asJava.toLightMethods import org.jetbrains.kotlin.idea.KotlinBundleIndependent import org.jetbrains.kotlin.idea.findUsages.* import org.jetbrains.kotlin.idea.findUsages.KotlinFindUsagesSupport.Companion.getTopMostOverriddenElementsToHighlight @@ -71,7 +71,7 @@ abstract class KotlinFindMemberUsagesHandler protected c mustOpenInNewTab: Boolean ): AbstractFindUsagesDialog { val options = factory.findFunctionOptions - val lightMethod = getElement().providedToLightMethods().firstOrNull() + val lightMethod = getElement().toLightMethods().firstOrNull() if (lightMethod != null) { return KotlinFindFunctionUsagesDialog(lightMethod, project, options, toShowInNewTab, mustOpenInNewTab, isSingleFile, this) } @@ -236,7 +236,7 @@ abstract class KotlinFindMemberUsagesHandler protected c else -> options.searchScope } - for (psiMethod in element.providedToLightMethods().filterDataClassComponentsIfDisabled(kotlinSearchOptions)) { + for (psiMethod in element.toLightMethods().filterDataClassComponentsIfDisabled(kotlinSearchOptions)) { addTask { applyQueryFilters( element, diff --git a/idea/idea-frontend-independent/src/org/jetbrains/kotlin/idea/highlighter/AbstractHighlightingPassBase.kt b/idea/idea-frontend-independent/src/org/jetbrains/kotlin/idea/highlighter/AbstractHighlightingPassBase.kt new file mode 100644 index 00000000000..07f21d2ad9b --- /dev/null +++ b/idea/idea-frontend-independent/src/org/jetbrains/kotlin/idea/highlighter/AbstractHighlightingPassBase.kt @@ -0,0 +1,84 @@ +/* + * Copyright 2010-2020 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. + */ + +package org.jetbrains.kotlin.idea.highlighter + +import com.intellij.codeHighlighting.TextEditorHighlightingPass +import com.intellij.codeInsight.daemon.impl.AnnotationHolderImpl +import com.intellij.codeInsight.daemon.impl.HighlightInfo +import com.intellij.codeInsight.daemon.impl.UpdateHighlightersUtil +import com.intellij.lang.annotation.Annotation +import com.intellij.lang.annotation.AnnotationHolder +import com.intellij.lang.annotation.AnnotationSession +import com.intellij.openapi.editor.Document +import com.intellij.openapi.progress.ProgressIndicator +import com.intellij.openapi.project.DumbAware +import com.intellij.psi.PsiElement +import com.intellij.psi.PsiRecursiveElementVisitor +import org.jetbrains.kotlin.psi.KtFile + +/** + * Single thread model only (as any other [TextEditorHighlightingPass]) + */ +@Suppress("UnstableApiUsage") +abstract class AbstractHighlightingPassBase( + protected val file: KtFile, + document: Document +) : TextEditorHighlightingPass(file.project, document), DumbAware { + + private val highlightInfos: MutableList = mutableListOf() + protected var annotationCallback: ((Annotation) -> Unit)? = null + protected var annotationHolder: AnnotationHolderImpl? = null + + fun annotationCallback(callback: (Annotation) -> Unit) { + annotationCallback = callback + } + + fun resetAnnotationCallback() { + annotationCallback = null + } + + override fun doCollectInformation(progress: ProgressIndicator) { + highlightInfos.clear() + + // TODO: YES, IT USES `@ApiStatus.Internal` AnnotationHolderImpl intentionally: + // there is no other way to highlight: + // - HighlightInfo could not be highlighted immediately as myHighlightInfoProcessor.infoIsAvailable is not accessible + // (HighlightingSessionImpl impl is closed) and/or UpdateHighlightersUtil.addHighlighterToEditorIncrementally is closed as well. + // therefore direct usage of AnnotationHolderImpl is the smallest evil + + val annotationHolder = object : AnnotationHolderImpl(AnnotationSession(file)) { + override fun add(element: Annotation?): Boolean { + element?.let { annotationCallback?.invoke(it) } + return super.add(element) + } + } + annotationHolder.runAnnotatorWithContext(file) { element, holder -> + runAnnotatorWithContext(element, holder) + } + this.annotationHolder = annotationHolder + } + + protected open fun runAnnotatorWithContext( + element: PsiElement, + holder: AnnotationHolder + ) { + element.accept(object : PsiRecursiveElementVisitor() {}) + } + + override fun getInfos(): MutableList = highlightInfos + + override fun doApplyInformationToEditor() { + try { + val infos = annotationHolder?.map { HighlightInfo.fromAnnotation(it) } ?: return + highlightInfos.addAll(infos) + // NOTE: keep !! for 201 version + UpdateHighlightersUtil.setHighlightersToEditor(myProject, myDocument!!, 0, file.textLength, infos, colorsScheme, id) + } finally { + annotationHolder = null + } + } + +} \ No newline at end of file diff --git a/idea/idea-frontend-independent/src/org/jetbrains/kotlin/idea/highlighter/BeforeResolveHighlightingVisitor.kt b/idea/idea-frontend-independent/src/org/jetbrains/kotlin/idea/highlighter/BeforeResolveHighlightingVisitor.kt index b6fd735475c..e59e13c300d 100644 --- a/idea/idea-frontend-independent/src/org/jetbrains/kotlin/idea/highlighter/BeforeResolveHighlightingVisitor.kt +++ b/idea/idea-frontend-independent/src/org/jetbrains/kotlin/idea/highlighter/BeforeResolveHighlightingVisitor.kt @@ -38,7 +38,7 @@ internal class BeforeResolveHighlightingVisitor(holder: AnnotationHolder) : High else -> return } - createInfoAnnotation(element, null).textAttributes = attributes + createInfoAnnotation(element, textAttributes = attributes) } private fun willApplyRainbowHighlight(element: KDocLink): Boolean { @@ -53,27 +53,29 @@ internal class BeforeResolveHighlightingVisitor(holder: AnnotationHolder) : High if (ApplicationManager.getApplication().isUnitTestMode) return val functionLiteral = lambdaExpression.functionLiteral - createInfoAnnotation(functionLiteral.lBrace, null).textAttributes = KotlinHighlightingColors.FUNCTION_LITERAL_BRACES_AND_ARROW + createInfoAnnotation(functionLiteral.lBrace, textAttributes = KotlinHighlightingColors.FUNCTION_LITERAL_BRACES_AND_ARROW) val closingBrace = functionLiteral.rBrace if (closingBrace != null) { - createInfoAnnotation(closingBrace, null).textAttributes = KotlinHighlightingColors.FUNCTION_LITERAL_BRACES_AND_ARROW + createInfoAnnotation(closingBrace, textAttributes = KotlinHighlightingColors.FUNCTION_LITERAL_BRACES_AND_ARROW) } val arrow = functionLiteral.arrow if (arrow != null) { - createInfoAnnotation(arrow, null).textAttributes = KotlinHighlightingColors.FUNCTION_LITERAL_BRACES_AND_ARROW + createInfoAnnotation(arrow, textAttributes = KotlinHighlightingColors.FUNCTION_LITERAL_BRACES_AND_ARROW) } } override fun visitArgument(argument: KtValueArgument) { val argumentName = argument.getArgumentName() ?: return val eq = argument.equalsToken ?: return - createInfoAnnotation(TextRange(argumentName.startOffset, eq.endOffset), null).textAttributes = - if (argument.parent.parent is KtAnnotationEntry) + createInfoAnnotation( + TextRange(argumentName.startOffset, eq.endOffset), + textAttributes = if (argument.parent.parent is KtAnnotationEntry) KotlinHighlightingColors.ANNOTATION_ATTRIBUTE_NAME_ATTRIBUTES else KotlinHighlightingColors.NAMED_ARGUMENT + ) } override fun visitExpressionWithLabel(expression: KtExpressionWithLabel) { diff --git a/idea/idea-frontend-independent/src/org/jetbrains/kotlin/idea/highlighter/HighlightingVisitor.kt b/idea/idea-frontend-independent/src/org/jetbrains/kotlin/idea/highlighter/HighlightingVisitor.kt index 500140cae50..df4edf914ab 100644 --- a/idea/idea-frontend-independent/src/org/jetbrains/kotlin/idea/highlighter/HighlightingVisitor.kt +++ b/idea/idea-frontend-independent/src/org/jetbrains/kotlin/idea/highlighter/HighlightingVisitor.kt @@ -7,6 +7,7 @@ package org.jetbrains.kotlin.idea.highlighter import com.intellij.lang.annotation.Annotation import com.intellij.lang.annotation.AnnotationHolder +import com.intellij.lang.annotation.HighlightSeverity import com.intellij.openapi.editor.colors.TextAttributesKey import com.intellij.openapi.util.TextRange import com.intellij.psi.PsiElement @@ -17,29 +18,34 @@ abstract class HighlightingVisitor protected constructor( private val holder: AnnotationHolder ) : KtVisitorVoid() { - protected fun createInfoAnnotation(element: PsiElement, textAttributes: TextAttributesKey, message: String? = null) { - createInfoAnnotation(element.textRange, textAttributes, message) + protected fun createInfoAnnotation(element: PsiElement, message: String? = null, textAttributes: TextAttributesKey) { + createInfoAnnotation(element.textRange, message, textAttributes) } - protected fun createInfoAnnotation(range: TextRange, textAttributes: TextAttributesKey, message: String? = null) { - createInfoAnnotation(range, message).textAttributes = textAttributes - } - - protected fun createInfoAnnotation(element: PsiElement, message: String? = null): Annotation = + protected fun createInfoAnnotation(element: PsiElement, message: String? = null) = createInfoAnnotation(element.textRange, message) - protected fun createInfoAnnotation(textRange: TextRange, message: String? = null): Annotation = - holder.createInfoAnnotation(textRange, message) + protected open fun createInfoAnnotation(textRange: TextRange, message: String? = null, textAttributes: TextAttributesKey? = null) { + (message?.let { holder.newAnnotation(HighlightSeverity.INFORMATION, it) } + ?: holder.newSilentAnnotation(HighlightSeverity.INFORMATION)) + .range(textRange) + .also { builder -> + textAttributes?.let { + builder.textAttributes(it) + } + } + .create() + } protected fun highlightName(element: PsiElement, attributesKey: TextAttributesKey, message: String? = null) { if (NameHighlighter.namesHighlightingEnabled && !element.textRange.isEmpty) { - createInfoAnnotation(element, attributesKey, message) + createInfoAnnotation(element, message, attributesKey) } } protected fun highlightName(textRange: TextRange, attributesKey: TextAttributesKey, message: String? = null) { if (NameHighlighter.namesHighlightingEnabled) { - createInfoAnnotation(textRange, attributesKey, message) + createInfoAnnotation(textRange, message, attributesKey) } } diff --git a/idea/idea-frontend-independent/src/org/jetbrains/kotlin/idea/highlighter/KotlinBeforeResolveHighlightingPass.kt b/idea/idea-frontend-independent/src/org/jetbrains/kotlin/idea/highlighter/KotlinBeforeResolveHighlightingPass.kt index 597c8ea58ea..4d3e3c34af5 100644 --- a/idea/idea-frontend-independent/src/org/jetbrains/kotlin/idea/highlighter/KotlinBeforeResolveHighlightingPass.kt +++ b/idea/idea-frontend-independent/src/org/jetbrains/kotlin/idea/highlighter/KotlinBeforeResolveHighlightingPass.kt @@ -6,51 +6,29 @@ package org.jetbrains.kotlin.idea.highlighter import com.intellij.codeHighlighting.* -import com.intellij.codeInsight.daemon.impl.AnnotationHolderImpl -import com.intellij.codeInsight.daemon.impl.HighlightInfo -import com.intellij.codeInsight.daemon.impl.UpdateHighlightersUtil import com.intellij.lang.annotation.AnnotationHolder -import com.intellij.lang.annotation.AnnotationSession import com.intellij.openapi.editor.Document import com.intellij.openapi.editor.Editor import com.intellij.openapi.extensions.ExtensionPointName -import com.intellij.openapi.progress.ProgressIndicator -import com.intellij.openapi.project.DumbAware import com.intellij.openapi.project.Project import com.intellij.psi.PsiElement import com.intellij.psi.PsiFile import com.intellij.psi.PsiRecursiveElementVisitor import org.jetbrains.kotlin.psi.KtFile -class KotlinBeforeResolveHighlightingPass( - private val file: KtFile, - document: Document -) : TextEditorHighlightingPass(file.project, document), DumbAware { +class KotlinBeforeResolveHighlightingPass(file: KtFile, document: Document) : AbstractHighlightingPassBase(file, document) { - @Volatile - private var annotationHolder: AnnotationHolderImpl? = null + override fun runAnnotatorWithContext(element: PsiElement, holder: AnnotationHolder) { + val visitor = BeforeResolveHighlightingVisitor(holder) + val extensions = EP_NAME.extensionList.map { it.createVisitor(holder) } - override fun doCollectInformation(progress: ProgressIndicator) { - val annotationHolder = AnnotationHolderImpl(AnnotationSession(file)) - val visitor = BeforeResolveHighlightingVisitor(annotationHolder) - val extensions = EP_NAME.extensionList.map { it.createVisitor(annotationHolder) } - file.accept(object : PsiRecursiveElementVisitor() { + element.accept(object : PsiRecursiveElementVisitor() { override fun visitElement(element: PsiElement) { - super.visitElement(element) element.accept(visitor) extensions.forEach(element::accept) + super.visitElement(element) } }) - this.annotationHolder = annotationHolder - } - - override fun doApplyInformationToEditor() { - if (annotationHolder == null) return - - val infos = annotationHolder!!.map { HighlightInfo.fromAnnotation(it) } - - UpdateHighlightersUtil.setHighlightersToEditor(myProject, myDocument!!, 0, file.textLength, infos, colorsScheme, id) - annotationHolder = null } class Factory : TextEditorHighlightingPassFactory { @@ -64,10 +42,10 @@ class KotlinBeforeResolveHighlightingPass( override fun registerHighlightingPassFactory(registrar: TextEditorHighlightingPassRegistrar, project: Project) { registrar.registerTextEditorHighlightingPass( Factory(), - TextEditorHighlightingPassRegistrar.Anchor.BEFORE, - Pass.UPDATE_FOLDING, - false, - false + /* anchor = */ TextEditorHighlightingPassRegistrar.Anchor.BEFORE, + /* anchorPassId = */ Pass.UPDATE_FOLDING, + /* needAdditionalIntentionsPass = */ false, + /* inPostHighlightingPass = */ false ) } } diff --git a/idea/idea-frontend-independent/src/org/jetbrains/kotlin/idea/search/declarationsSearch/classInheritorsSearch.kt b/idea/idea-frontend-independent/src/org/jetbrains/kotlin/idea/search/declarationsSearch/classInheritorsSearch.kt index 36fefee43ea..c9825a20132 100644 --- a/idea/idea-frontend-independent/src/org/jetbrains/kotlin/idea/search/declarationsSearch/classInheritorsSearch.kt +++ b/idea/idea-frontend-independent/src/org/jetbrains/kotlin/idea/search/declarationsSearch/classInheritorsSearch.kt @@ -22,14 +22,15 @@ import com.intellij.psi.PsiModifier import com.intellij.psi.search.searches.ClassInheritorsSearch import com.intellij.util.EmptyQuery import com.intellij.util.Query -import org.jetbrains.kotlin.idea.asJava.LightClassProvider.Companion.providedCreateKtFakeLightClass -import org.jetbrains.kotlin.idea.asJava.LightClassProvider.Companion.providedToLightClassWithBuiltinMapping +import org.jetbrains.kotlin.asJava.toLightClassWithBuiltinMapping +import org.jetbrains.kotlin.asJava.classes.KtFakeLightClass +import org.jetbrains.kotlin.asJava.toFakeLightClass import org.jetbrains.kotlin.idea.util.application.runReadAction import org.jetbrains.kotlin.psi.KtClassOrObject fun HierarchySearchRequest<*>.searchInheritors(): Query { val psiClass: PsiClass = when (originalElement) { - is KtClassOrObject -> runReadAction { originalElement.providedToLightClassWithBuiltinMapping() ?: providedCreateKtFakeLightClass(originalElement) } + is KtClassOrObject -> runReadAction { originalElement.toLightClassWithBuiltinMapping() ?: originalElement.toFakeLightClass() } is PsiClass -> originalElement else -> null } ?: return EmptyQuery.getEmptyQuery() diff --git a/idea/idea-frontend-independent/src/org/jetbrains/kotlin/idea/search/declarationsSearch/overridersSearch.kt b/idea/idea-frontend-independent/src/org/jetbrains/kotlin/idea/search/declarationsSearch/overridersSearch.kt index 37277a1c02e..4608721b2ed 100644 --- a/idea/idea-frontend-independent/src/org/jetbrains/kotlin/idea/search/declarationsSearch/overridersSearch.kt +++ b/idea/idea-frontend-independent/src/org/jetbrains/kotlin/idea/search/declarationsSearch/overridersSearch.kt @@ -19,10 +19,8 @@ import com.intellij.util.MergeQuery import com.intellij.util.Processor import com.intellij.util.Query import org.jetbrains.kotlin.asJava.* -import org.jetbrains.kotlin.idea.asJava.LightClassProvider.Companion.providedCreateKtFakeLightMethod -import org.jetbrains.kotlin.idea.asJava.LightClassProvider.Companion.providedGetRepresentativeLightMethod -import org.jetbrains.kotlin.idea.asJava.LightClassProvider.Companion.providedIsKtFakeLightClass -import org.jetbrains.kotlin.idea.asJava.LightClassProvider.Companion.providedToLightMethods +import org.jetbrains.kotlin.asJava.classes.KtFakeLightClass +import org.jetbrains.kotlin.asJava.classes.KtFakeLightMethod import org.jetbrains.kotlin.idea.search.KotlinSearchUsagesSupport.Companion.findDeepestSuperMethodsNoWrapping import org.jetbrains.kotlin.idea.search.KotlinSearchUsagesSupport.Companion.forEachKotlinOverride import org.jetbrains.kotlin.idea.search.KotlinSearchUsagesSupport.Companion.forEachOverridingMethod @@ -41,7 +39,7 @@ fun PsiElement.isOverridableElement(): Boolean = when (this) { } fun HierarchySearchRequest<*>.searchOverriders(): Query { - val psiMethods = runReadAction { originalElement.providedToLightMethods() } + val psiMethods = runReadAction { originalElement.toLightMethods() } if (psiMethods.isEmpty()) return EmptyQuery.getEmptyQuery() return psiMethods @@ -104,10 +102,10 @@ fun PsiElement.toPossiblyFakeLightMethods(): List { val element = unwrapped ?: return emptyList() - val lightMethods = element.providedToLightMethods() + val lightMethods = element.toLightMethods() if (lightMethods.isNotEmpty()) return lightMethods - return if (element is KtNamedDeclaration) listOfNotNull(providedCreateKtFakeLightMethod(element)) else emptyList() + return if (element is KtNamedDeclaration) listOfNotNull(KtFakeLightMethod.get(element)) else emptyList() } fun KtNamedDeclaration.forEachOverridingElement( @@ -116,7 +114,7 @@ fun KtNamedDeclaration.forEachOverridingElement( ): Boolean { val ktClass = runReadAction { containingClassOrObject as? KtClass } ?: return true - providedToLightMethods().forEach { baseMethod -> + toLightMethods().forEach { baseMethod -> if (!OverridingMethodsSearch.search(baseMethod, scope.excludeKotlinSources(), true).all { processor(baseMethod, it) }) return false } @@ -148,7 +146,7 @@ fun PsiMethod.forEachOverridingMethodCompat( fun PsiClass.forEachDeclaredMemberOverride(processor: (superMember: PsiElement, overridingMember: PsiElement) -> Boolean) { val scope = runReadAction { useScope } - if (!providedIsKtFakeLightClass()) { + if (this !is KtFakeLightClass) { AllOverridingMethodsSearch.search(this, scope.excludeKotlinSources()).all { processor(it.first, it.second) } } @@ -159,4 +157,4 @@ fun PsiClass.forEachDeclaredMemberOverride(processor: (superMember: PsiElement, } fun findDeepestSuperMethodsKotlinAware(method: PsiElement) = - findDeepestSuperMethodsNoWrapping(method).mapNotNull { it.providedGetRepresentativeLightMethod() } \ No newline at end of file + findDeepestSuperMethodsNoWrapping(method).mapNotNull { it.getRepresentativeLightMethod() } \ No newline at end of file diff --git a/idea/idea-frontend-independent/src/org/jetbrains/kotlin/idea/search/ideaExtensions/KotlinDefinitionsSearcher.kt b/idea/idea-frontend-independent/src/org/jetbrains/kotlin/idea/search/ideaExtensions/KotlinDefinitionsSearcher.kt index 417c17eded1..2b20eee8fd4 100644 --- a/idea/idea-frontend-independent/src/org/jetbrains/kotlin/idea/search/ideaExtensions/KotlinDefinitionsSearcher.kt +++ b/idea/idea-frontend-independent/src/org/jetbrains/kotlin/idea/search/ideaExtensions/KotlinDefinitionsSearcher.kt @@ -28,9 +28,10 @@ import com.intellij.util.QueryExecutor import com.intellij.util.containers.ContainerUtil import org.jetbrains.kotlin.asJava.classes.KtLightClass import org.jetbrains.kotlin.asJava.elements.KtLightMethod +import org.jetbrains.kotlin.asJava.toLightClass import org.jetbrains.kotlin.asJava.unwrapped -import org.jetbrains.kotlin.idea.asJava.LightClassProvider.Companion.providedCreateKtFakeLightClass -import org.jetbrains.kotlin.idea.asJava.LightClassProvider.Companion.providedToLightClass +import org.jetbrains.kotlin.asJava.classes.KtFakeLightClass +import org.jetbrains.kotlin.asJava.toFakeLightClass import org.jetbrains.kotlin.idea.search.KotlinSearchUsagesSupport.Companion.actualsForExpected import org.jetbrains.kotlin.idea.search.KotlinSearchUsagesSupport.Companion.forEachOverridingMethod import org.jetbrains.kotlin.idea.search.KotlinSearchUsagesSupport.Companion.isExpectDeclaration @@ -107,9 +108,7 @@ class KotlinDefinitionsSearcher : QueryExecutor): Boolean { - val psiClass = runReadAction { klass.providedToLightClass() ?: providedCreateKtFakeLightClass(klass) } - as? KtLightClass - ?: return false //TODO Implement FIR support for not nullable providedCreateKtFakeLightClass + val psiClass = runReadAction { klass.toLightClass() ?: klass.toFakeLightClass() } val searchScope = runReadAction { psiClass.useScope } if (searchScope is LocalSearchScope) { diff --git a/idea/idea-frontend-independent/src/org/jetbrains/kotlin/idea/search/ideaExtensions/KotlinOverridingMethodReferenceSearcher.kt b/idea/idea-frontend-independent/src/org/jetbrains/kotlin/idea/search/ideaExtensions/KotlinOverridingMethodReferenceSearcher.kt index 93b1b426657..3e6e3c4c60a 100644 --- a/idea/idea-frontend-independent/src/org/jetbrains/kotlin/idea/search/ideaExtensions/KotlinOverridingMethodReferenceSearcher.kt +++ b/idea/idea-frontend-independent/src/org/jetbrains/kotlin/idea/search/ideaExtensions/KotlinOverridingMethodReferenceSearcher.kt @@ -14,7 +14,7 @@ import com.intellij.psi.search.searches.MethodReferencesSearch import com.intellij.psi.util.MethodSignatureUtil import com.intellij.psi.util.TypeConversionUtil import com.intellij.util.Processor -import org.jetbrains.kotlin.idea.asJava.LightClassProvider.Companion.providedToLightMethods +import org.jetbrains.kotlin.asJava.toLightMethods import org.jetbrains.kotlin.idea.references.KtSimpleNameReference import org.jetbrains.kotlin.idea.references.SyntheticPropertyAccessorReference import org.jetbrains.kotlin.idea.references.readWriteAccess @@ -106,7 +106,7 @@ class KotlinOverridingMethodReferenceSearcher : MethodUsagesSearcher() { } fun countNonFinalLightMethods() = refElement - .providedToLightMethods() + .toLightMethods() .filterNot { it.hasModifierProperty(PsiModifier.FINAL) } val lightMethods = when (refElement) { diff --git a/idea/idea-frontend-independent/src/org/jetbrains/kotlin/idea/search/ideaExtensions/KotlinReferencesSearcher.kt b/idea/idea-frontend-independent/src/org/jetbrains/kotlin/idea/search/ideaExtensions/KotlinReferencesSearcher.kt index 8730bc34631..2698c6021a4 100644 --- a/idea/idea-frontend-independent/src/org/jetbrains/kotlin/idea/search/ideaExtensions/KotlinReferencesSearcher.kt +++ b/idea/idea-frontend-independent/src/org/jetbrains/kotlin/idea/search/ideaExtensions/KotlinReferencesSearcher.kt @@ -25,17 +25,16 @@ import com.intellij.psi.search.searches.MethodReferencesSearch import com.intellij.psi.search.searches.ReferencesSearch import com.intellij.util.Processor import com.intellij.util.containers.nullize -import org.jetbrains.kotlin.idea.asJava.LightClassProvider.Companion.providedGetLightClassMethods -import org.jetbrains.kotlin.idea.asJava.LightClassProvider.Companion.providedGetLightClassParameterDeclarations -import org.jetbrains.kotlin.idea.asJava.LightClassProvider.Companion.providedGetLightClassPropertyDeclarations -import org.jetbrains.kotlin.idea.asJava.LightClassProvider.Companion.providedGetLightFieldForCompanionObject -import org.jetbrains.kotlin.idea.asJava.LightClassProvider.Companion.providedToLightClass -import org.jetbrains.kotlin.idea.asJava.LightClassProvider.Companion.providedToLightElements +import org.jetbrains.kotlin.asJava.LightClassUtil.getLightClassMethods +import org.jetbrains.kotlin.asJava.LightClassUtil.getLightClassPropertyMethods +import org.jetbrains.kotlin.asJava.LightClassUtil.getLightFieldForCompanionObject import org.jetbrains.kotlin.asJava.elements.KtLightField import org.jetbrains.kotlin.asJava.elements.KtLightMember import org.jetbrains.kotlin.asJava.elements.KtLightMethod import org.jetbrains.kotlin.asJava.elements.KtLightParameter import org.jetbrains.kotlin.asJava.namedUnwrappedElement +import org.jetbrains.kotlin.asJava.toLightClass +import org.jetbrains.kotlin.asJava.toLightElements import org.jetbrains.kotlin.idea.findUsages.KotlinFindUsagesSupport.Companion.sourcesAndLibraries import org.jetbrains.kotlin.idea.search.KotlinSearchUsagesSupport.Companion.dataClassComponentMethodName import org.jetbrains.kotlin.idea.search.KotlinSearchUsagesSupport.Companion.expectedDeclarationIfAny @@ -75,7 +74,7 @@ data class KotlinReferencesSearchOptions( ): SearchScope { val kotlinOptions = (parameters as? KotlinAwareReferencesSearchParameters)?.kotlinOptions ?: Empty val elements = if (elementToSearch is KtDeclaration && !isOnlyKotlinSearch(parameters.scopeDeterminedByUser)) { - elementToSearch.providedToLightElements().filterDataClassComponentsIfDisabled(kotlinOptions).nullize() + elementToSearch.toLightElements().filterDataClassComponentsIfDisabled(kotlinOptions).nullize() } else { null } ?: listOf(elementToSearch) @@ -262,7 +261,7 @@ class KotlinReferencesSearcher : QueryExecutorBase { val name = (element as KtFunction).name if (name != null) { - val methods = providedGetLightClassMethods(element) + val methods = getLightClassMethods(element) for (method in methods) { searchNamedElement(method) } @@ -272,7 +271,7 @@ class KotlinReferencesSearcher : QueryExecutorBase { - val propertyDeclarations = providedGetLightClassPropertyDeclarations(element) + val propertyDeclarations = getLightClassPropertyMethods(element).allDeclarations propertyDeclarations.forEach { searchNamedElement(it) } processStaticsFromCompanionObject(element) } @@ -281,7 +280,7 @@ class KotlinReferencesSearcher : QueryExecutorBase() != null) { // Simple parameters without val and var shouldn't be processed here because of local search scope - val parameterDeclarations = providedGetLightClassParameterDeclarations(element) + val parameterDeclarations = getLightClassPropertyMethods(element).allDeclarations parameterDeclarations.filterDataClassComponentsIfDisabled(kotlinOptions).forEach { searchNamedElement(it) } } } @@ -310,19 +309,19 @@ class KotlinReferencesSearcher : QueryExecutorBase()?.providedToLightClass() + val originLightClass = element.getStrictParentOfType()?.toLightClass() if (originLightClass != null) { val lightDeclarations: List?> = originLightClass.methods.map { it as? KtLightMethod } + originLightClass.fields.map { it as? KtLightField } @@ -342,7 +341,7 @@ class KotlinReferencesSearcher : QueryExecutorBase { val componentMethodName = element.dataClassComponentMethodName if (componentMethodName != null) { - val containingClass = element.getStrictParentOfType()?.providedToLightClass() + val containingClass = element.getStrictParentOfType()?.toLightClass() searchDataClassComponentUsages( containingClass = containingClass, componentMethodName = componentMethodName, @@ -392,7 +391,7 @@ class KotlinReferencesSearcher : QueryExecutorBase() - val originLightClass = originClass?.providedToLightClass() ?: return emptyList() + val originLightClass = originClass?.toLightClass() ?: return emptyList() val allMethods = originLightClass.allMethods return allMethods.filter { it is KtLightMethod && it.kotlinOrigin == declaration } } diff --git a/idea/idea-frontend-independent/src/org/jetbrains/kotlin/idea/search/usagesSearch/ExpressionsOfTypeProcessor.kt b/idea/idea-frontend-independent/src/org/jetbrains/kotlin/idea/search/usagesSearch/ExpressionsOfTypeProcessor.kt index b2acb8e8c97..40c899d1f86 100644 --- a/idea/idea-frontend-independent/src/org/jetbrains/kotlin/idea/search/usagesSearch/ExpressionsOfTypeProcessor.kt +++ b/idea/idea-frontend-independent/src/org/jetbrains/kotlin/idea/search/usagesSearch/ExpressionsOfTypeProcessor.kt @@ -23,8 +23,8 @@ import com.intellij.psi.search.searches.ReferencesSearch import com.intellij.util.Processor import org.jetbrains.annotations.TestOnly import org.jetbrains.kotlin.KtNodeTypes -import org.jetbrains.kotlin.idea.asJava.LightClassProvider.Companion.providedToLightClass import org.jetbrains.kotlin.asJava.classes.KtLightClass +import org.jetbrains.kotlin.asJava.toLightClass import org.jetbrains.kotlin.diagnostics.PsiDiagnosticUtils import org.jetbrains.kotlin.idea.KotlinFileType import org.jetbrains.kotlin.idea.KotlinLanguage @@ -582,7 +582,7 @@ class ExpressionsOfTypeProcessor( val parent = typeRefParent.parent if (parent is KtSuperTypeCallEntry) { val classOrObject = (parent.parent as KtSuperTypeList).parent as KtClassOrObject - val psiClass = classOrObject.providedToLightClass() + val psiClass = classOrObject.toLightClass() psiClass?.let { addClassToProcess(it) } return true } @@ -591,7 +591,7 @@ class ExpressionsOfTypeProcessor( is KtSuperTypeListEntry -> { // super-interface name in the list of bases if (typeRef == typeRefParent.typeReference) { val classOrObject = (typeRefParent.parent as KtSuperTypeList).parent as KtClassOrObject - val psiClass = classOrObject.providedToLightClass() + val psiClass = classOrObject.toLightClass() psiClass?.let { addClassToProcess(it) } return true } diff --git a/idea/idea-frontend-independent/src/org/jetbrains/kotlin/idea/search/usagesSearch/utilsIndependent.kt b/idea/idea-frontend-independent/src/org/jetbrains/kotlin/idea/search/usagesSearch/utilsIndependent.kt index 8d182ec503c..15675fa358e 100644 --- a/idea/idea-frontend-independent/src/org/jetbrains/kotlin/idea/search/usagesSearch/utilsIndependent.kt +++ b/idea/idea-frontend-independent/src/org/jetbrains/kotlin/idea/search/usagesSearch/utilsIndependent.kt @@ -12,8 +12,8 @@ import com.intellij.psi.search.searches.MethodReferencesSearch import com.intellij.psi.search.searches.ReferencesSearch import org.jetbrains.kotlin.asJava.elements.KtLightElement import org.jetbrains.kotlin.asJava.elements.KtLightMethod +import org.jetbrains.kotlin.asJava.toLightMethods import org.jetbrains.kotlin.asJava.unwrapped -import org.jetbrains.kotlin.idea.asJava.LightClassProvider.Companion.providedToLightMethods import org.jetbrains.kotlin.idea.search.KotlinSearchUsagesSupport import org.jetbrains.kotlin.idea.search.KotlinSearchUsagesSupport.Companion.createConstructorHandle import org.jetbrains.kotlin.idea.search.declarationsSearch.HierarchySearchRequest @@ -117,7 +117,7 @@ private fun processClassDelegationCallsToSpecifiedConstructor( } fun PsiElement.searchReferencesOrMethodReferences(): Collection { - val lightMethods = providedToLightMethods() + val lightMethods = toLightMethods() return if (lightMethods.isNotEmpty()) { lightMethods.flatMapTo(LinkedHashSet()) { MethodReferencesSearch.search(it) } } else { diff --git a/idea/idea-frontend-independent/src/org/jetbrains/kotlin/idea/util/ApplicationUtils.kt b/idea/idea-frontend-independent/src/org/jetbrains/kotlin/idea/util/ApplicationUtils.kt index 4d23a1b3a87..7c859256a10 100644 --- a/idea/idea-frontend-independent/src/org/jetbrains/kotlin/idea/util/ApplicationUtils.kt +++ b/idea/idea-frontend-independent/src/org/jetbrains/kotlin/idea/util/ApplicationUtils.kt @@ -58,6 +58,8 @@ inline fun invokeLater(expired: Condition<*>, crossinline action: () -> Unit) = inline fun isUnitTestMode(): Boolean = ApplicationManager.getApplication().isUnitTestMode +inline fun isApplicationInternalMode(): Boolean = ApplicationManager.getApplication().isInternal + inline fun ComponentManager.getServiceSafe(): T = this.getService(T::class.java) ?: error("Unable to locate service ${T::class.java.name}") diff --git a/idea/idea-gradle/src/org/jetbrains/kotlin/idea/configuration/KotlinMPPDataNodes.kt b/idea/idea-gradle/src/org/jetbrains/kotlin/idea/configuration/KotlinMPPDataNodes.kt index e0ec8e3dedd..58c282ef311 100644 --- a/idea/idea-gradle/src/org/jetbrains/kotlin/idea/configuration/KotlinMPPDataNodes.kt +++ b/idea/idea-gradle/src/org/jetbrains/kotlin/idea/configuration/KotlinMPPDataNodes.kt @@ -27,8 +27,11 @@ import com.intellij.openapi.externalSystem.model.Key as ExternalKey var DataNode.kotlinSourceSet: KotlinSourceSetInfo? by CopyableDataNodeUserDataProperty(Key.create("KOTLIN_SOURCE_SET")) +var DataNode.kotlinImportingDiagnosticsContainer: KotlinImportingDiagnosticsContainer? + by CopyableDataNodeUserDataProperty(Key.create("KOTLIN_IMPORTING_DIAGNOSTICS_CONTAINER")) + val DataNode.kotlinAndroidSourceSets: List? - get() = ExternalSystemApiUtil.getChildren(this, KotlinAndroidSourceSetData.KEY).firstOrNull()?.data?.sourceSetInfos + get() = ExternalSystemApiUtil.getChildren(this, KotlinAndroidSourceSetData.KEY).firstOrNull()?.data?.sourceSetInfos class KotlinSourceSetInfo @PropertyMapping("kotlinModule") constructor(val kotlinModule: KotlinModule) : Serializable { var moduleId: String? = null diff --git a/idea/idea-gradle/src/org/jetbrains/kotlin/idea/configuration/KotlinMPPGradleProjectResolver.kt b/idea/idea-gradle/src/org/jetbrains/kotlin/idea/configuration/KotlinMPPGradleProjectResolver.kt index 8118c9e688e..dfea085c6ae 100644 --- a/idea/idea-gradle/src/org/jetbrains/kotlin/idea/configuration/KotlinMPPGradleProjectResolver.kt +++ b/idea/idea-gradle/src/org/jetbrains/kotlin/idea/configuration/KotlinMPPGradleProjectResolver.kt @@ -61,7 +61,6 @@ import java.io.File import java.lang.reflect.Proxy import java.util.* import java.util.stream.Collectors -import kotlin.collections.HashMap @Order(ExternalSystemConstants.UNORDERED + 1) open class KotlinMPPGradleProjectResolver : AbstractProjectResolverExtensionCompat() { @@ -458,9 +457,12 @@ open class KotlinMPPGradleProjectResolver : AbstractProjectResolverExtensionComp } } - mainModuleNode.kotlinNativeHome = mppModel.kotlinNativeHome - mainModuleNode.coroutines = mppModel.extraFeatures.coroutinesState - mainModuleNode.isHmpp = mppModel.extraFeatures.isHMPPEnabled + with(mainModuleNode) { + kotlinNativeHome = mppModel.kotlinNativeHome + coroutines = mppModel.extraFeatures.coroutinesState + isHmpp = mppModel.extraFeatures.isHMPPEnabled + kotlinImportingDiagnosticsContainer = mppModel.kotlinImportingDiagnostics + } //TODO improve passing version of used multiplatform } @@ -782,7 +784,8 @@ open class KotlinMPPGradleProjectResolver : AbstractProjectResolverExtensionComp if (fromModule.data == toModule.data) return val fromData = fromModule.data as? ModuleData ?: return val toData = toModule.data as? ModuleData ?: return - val existing = fromModule.children.mapNotNull { it.data as? ModuleDependencyData }.filter { it.target.id == (toModule.data as? ModuleData)?.id } + val existing = fromModule.children.mapNotNull { it.data as? ModuleDependencyData } + .filter { it.target.id == (toModule.data as? ModuleData)?.id } val nodeToModify = existing.singleOrNull() ?: existing.firstOrNull { it.scope == DependencyScope.COMPILE } ?: existing.firstOrNull() if (nodeToModify != null) { diff --git a/idea/idea-gradle/src/org/jetbrains/kotlin/idea/run/kotlinTestClassUtils.kt b/idea/idea-gradle/src/org/jetbrains/kotlin/idea/run/kotlinTestClassUtils.kt index 7c7a8fd4b97..25c14ee1420 100644 --- a/idea/idea-gradle/src/org/jetbrains/kotlin/idea/run/kotlinTestClassUtils.kt +++ b/idea/idea-gradle/src/org/jetbrains/kotlin/idea/run/kotlinTestClassUtils.kt @@ -9,8 +9,9 @@ import com.intellij.execution.Location import com.intellij.psi.PsiClass import com.intellij.psi.PsiMethod import org.jetbrains.kotlin.asJava.elements.KtLightElement -import org.jetbrains.kotlin.idea.caches.lightClasses.KtFakeLightClass -import org.jetbrains.kotlin.idea.caches.lightClasses.KtFakeLightMethod +import org.jetbrains.kotlin.asJava.classes.KtFakeLightClass +import org.jetbrains.kotlin.asJava.classes.KtFakeLightMethod +import org.jetbrains.kotlin.asJava.toFakeLightClass import org.jetbrains.kotlin.psi.KtClassOrObject import org.jetbrains.kotlin.psi.KtDeclaration import org.jetbrains.kotlin.psi.KtNamedFunction @@ -31,5 +32,5 @@ internal fun getTestClassForKotlinTest(location: Location<*>): PsiClass? { else -> psi } val owner = leaf?.getParentOfType(false) as? KtClassOrObject ?: return null - return KtFakeLightClass(owner) + return owner.toFakeLightClass() } \ No newline at end of file diff --git a/idea/idea-gradle/tests/org/jetbrains/kotlin/gradle/HierarchicalMultiplatformProjectImportingTest.kt b/idea/idea-gradle/tests/org/jetbrains/kotlin/gradle/HierarchicalMultiplatformProjectImportingTest.kt index f24962e85aa..ac51ce8f3ff 100644 --- a/idea/idea-gradle/tests/org/jetbrains/kotlin/gradle/HierarchicalMultiplatformProjectImportingTest.kt +++ b/idea/idea-gradle/tests/org/jetbrains/kotlin/gradle/HierarchicalMultiplatformProjectImportingTest.kt @@ -8,7 +8,10 @@ package org.jetbrains.kotlin.gradle import com.intellij.openapi.roots.DependencyScope import org.jetbrains.jps.model.java.JavaResourceRootType import org.jetbrains.jps.model.java.JavaSourceRootType -import org.jetbrains.kotlin.config.* +import org.jetbrains.kotlin.config.ResourceKotlinRootType +import org.jetbrains.kotlin.config.SourceKotlinRootType +import org.jetbrains.kotlin.config.TestResourceKotlinRootType +import org.jetbrains.kotlin.config.TestSourceKotlinRootType import org.jetbrains.kotlin.idea.codeInsight.gradle.MultiplePluginVersionGradleImportingTestCase import org.jetbrains.kotlin.idea.codeInsight.gradle.mppImportTestMinVersionForMaster import org.jetbrains.kotlin.konan.target.KonanTarget @@ -440,6 +443,9 @@ class HierarchicalMultiplatformProjectImportingTest : MultiplePluginVersionGradl module("my-app.orphan") { targetPlatform(jvm, js) } + module("my-app") { + assertDiagnosticsCount(1) + } } } @@ -529,6 +535,10 @@ class HierarchicalMultiplatformProjectImportingTest : MultiplePluginVersionGradl checkProjectStructure(exhaustiveModuleList = false, exhaustiveSourceSourceRootList = false, exhaustiveDependencyList = false) { + module("my-app") { + assertDiagnosticsCount(3) + } + // (jvm, js, native) is highly undesirable module("my-app.danglingOnJvm") { targetPlatform(jvm, js) diff --git a/idea/idea-gradle/tests/org/jetbrains/kotlin/gradle/projectStructureDSL.kt b/idea/idea-gradle/tests/org/jetbrains/kotlin/gradle/projectStructureDSL.kt index c813198d91e..8da1235e9d7 100644 --- a/idea/idea-gradle/tests/org/jetbrains/kotlin/gradle/projectStructureDSL.kt +++ b/idea/idea-gradle/tests/org/jetbrains/kotlin/gradle/projectStructureDSL.kt @@ -5,6 +5,7 @@ package org.jetbrains.kotlin.gradle +import com.intellij.openapi.externalSystem.util.ExternalSystemApiUtil import com.intellij.openapi.module.Module import com.intellij.openapi.module.ModuleManager import com.intellij.openapi.project.Project @@ -14,13 +15,16 @@ import com.intellij.openapi.util.io.FileUtil import org.jetbrains.jps.model.module.JpsModuleSourceRootType import org.jetbrains.jps.util.JpsPathUtil import org.jetbrains.kotlin.config.ExternalSystemTestRunTask +import org.jetbrains.kotlin.idea.configuration.kotlinImportingDiagnosticsContainer import org.jetbrains.kotlin.idea.facet.KotlinFacet import org.jetbrains.kotlin.idea.facet.externalSystemTestRunTasks +import org.jetbrains.kotlin.idea.framework.GRADLE_SYSTEM_ID import org.jetbrains.kotlin.idea.project.isHMPPEnabled import org.jetbrains.kotlin.idea.project.languageVersionSettings import org.jetbrains.kotlin.idea.project.platform import org.jetbrains.kotlin.platform.TargetPlatform import org.jetbrains.kotlin.platform.presentableDescription +import org.jetbrains.plugins.gradle.util.GradleUtil class MessageCollector { private val builder = StringBuilder() @@ -37,6 +41,7 @@ class MessageCollector { } } +@Suppress("UnstableApiUsage") class ProjectInfo( project: Project, internal val projectPath: String, @@ -47,6 +52,7 @@ class ProjectInfo( ) { internal val messageCollector = MessageCollector() private val moduleManager = ModuleManager.getInstance(project) + private val projectDataNode = ExternalSystemApiUtil.findProjectData(project, GRADLE_SYSTEM_ID, projectPath) private val expectedModuleNames = HashSet() private var allModulesAsserter: (ModuleInfo.() -> Unit)? = null @@ -201,7 +207,7 @@ class ModuleInfo( fun moduleDependency(moduleName: String, scope: DependencyScope, productionOnTest: Boolean? = null) { val moduleEntries = - rootModel.orderEntries.filterIsInstance().filter { it.moduleName == moduleName && it.scope == scope} + rootModel.orderEntries.filterIsInstance().filter { it.moduleName == moduleName && it.scope == scope } if (moduleEntries.size > 1) { projectInfo.messageCollector.report( "Found multiple order entries for module $moduleName: ${rootModel.orderEntries.filterIsInstance()}" @@ -270,6 +276,19 @@ class ModuleInfo( } } + @Suppress("UnstableApiUsage") + internal inline fun assertDiagnosticsCount(count: Int) { + val moduleNode = GradleUtil.findGradleModuleData(module) + val diagnostics = moduleNode!!.kotlinImportingDiagnosticsContainer!! + val typedDiagnostics = diagnostics.filterIsInstance() + if (typedDiagnostics.size != count) { + projectInfo.messageCollector.report( + "Expected number of ${T::class.java.simpleName} diagnostics $count doesn't match the actual one: ${typedDiagnostics.size}" + ) + } + } + + fun run(body: ModuleInfo.() -> Unit = {}) { body() @@ -287,7 +306,9 @@ class ModuleInfo( } } - if ((!module.externalSystemTestRunTasks().containsAll(expectedExternalSystemTestTasks)) || (projectInfo.exhaustiveTestsList && (module.externalSystemTestRunTasks() != expectedExternalSystemTestTasks))) { + if ((!module.externalSystemTestRunTasks() + .containsAll(expectedExternalSystemTestTasks)) || (projectInfo.exhaustiveTestsList && (module.externalSystemTestRunTasks() != expectedExternalSystemTestTasks)) + ) { projectInfo.messageCollector.report( "Module '${module.name}': Expected tests list $expectedExternalSystemTestTasks doesn't match the actual one: ${module.externalSystemTestRunTasks()}" ) diff --git a/idea/idea-gradle/tests/org/jetbrains/kotlin/idea/codeInsight/gradle/GradleFacetImportTest.kt b/idea/idea-gradle/tests/org/jetbrains/kotlin/idea/codeInsight/gradle/GradleFacetImportTest.kt index 7e318a4ba72..a043149a357 100644 --- a/idea/idea-gradle/tests/org/jetbrains/kotlin/idea/codeInsight/gradle/GradleFacetImportTest.kt +++ b/idea/idea-gradle/tests/org/jetbrains/kotlin/idea/codeInsight/gradle/GradleFacetImportTest.kt @@ -104,7 +104,7 @@ class GradleFacetImportTest : GradleImportingTestCase() { Assert.assertFalse(compilerArguments!!.autoAdvanceLanguageVersion) Assert.assertFalse(compilerArguments!!.autoAdvanceApiVersion) Assert.assertEquals(JvmPlatforms.jvm16, targetPlatform) - Assert.assertEquals("1.6", (compilerArguments as K2JVMCompilerArguments).jvmTarget) + Assert.assertEquals("1.8", (compilerArguments as K2JVMCompilerArguments).jvmTarget) Assert.assertEquals( "-Xallow-no-source-files -Xdump-declarations-to=tmpTest", compilerSettings!!.additionalArguments @@ -158,7 +158,7 @@ class GradleFacetImportTest : GradleImportingTestCase() { Assert.assertEquals("1.3", languageLevel!!.versionString) Assert.assertEquals("1.0", apiLevel!!.versionString) Assert.assertEquals(JvmPlatforms.jvm16, targetPlatform) - Assert.assertEquals("1.6", (compilerArguments as K2JVMCompilerArguments).jvmTarget) + Assert.assertEquals("1.8", (compilerArguments as K2JVMCompilerArguments).jvmTarget) Assert.assertEquals( "-Xallow-no-source-files -Xdump-declarations-to=tmpTest", compilerSettings!!.additionalArguments diff --git a/idea/idea-gradle/tests/org/jetbrains/kotlin/idea/codeInsight/gradle/GradleImportingTestCase.kt b/idea/idea-gradle/tests/org/jetbrains/kotlin/idea/codeInsight/gradle/GradleImportingTestCase.kt index cdee509f01a..31e71f73240 100644 --- a/idea/idea-gradle/tests/org/jetbrains/kotlin/idea/codeInsight/gradle/GradleImportingTestCase.kt +++ b/idea/idea-gradle/tests/org/jetbrains/kotlin/idea/codeInsight/gradle/GradleImportingTestCase.kt @@ -15,6 +15,7 @@ */ package org.jetbrains.kotlin.idea.codeInsight.gradle +import com.intellij.openapi.Disposable import com.intellij.openapi.application.PathManager import com.intellij.openapi.application.Result import com.intellij.openapi.application.WriteAction @@ -36,6 +37,7 @@ import com.intellij.openapi.projectRoots.impl.SdkConfigurationUtil import com.intellij.openapi.roots.ProjectRootManager import com.intellij.openapi.ui.Messages import com.intellij.openapi.ui.TestDialog +import com.intellij.openapi.util.Disposer import com.intellij.openapi.util.io.FileUtil import com.intellij.openapi.vfs.LocalFileSystem import com.intellij.openapi.vfs.VirtualFile @@ -178,6 +180,9 @@ abstract class GradleImportingTestCase : ExternalSystemImportingTestCase() { runWrite { Arrays.stream(ProjectJdkTable.getInstance().allJdks).forEach { jdk: Sdk -> (ProjectJdkTable.getInstance() as ProjectJdkTableImpl).removeTestJdk(jdk) + if (jdk is Disposable) { + Disposer.dispose((jdk as Disposable)) + } } for (sdk in removedSdks) { SdkConfigurationUtil.addSdk(sdk) diff --git a/idea/idea-jps-common/src/org/jetbrains/kotlin/platform/impl/JvmIdePlatformKind.kt b/idea/idea-jps-common/src/org/jetbrains/kotlin/platform/impl/JvmIdePlatformKind.kt index 125b8313cab..378d3da152d 100644 --- a/idea/idea-jps-common/src/org/jetbrains/kotlin/platform/impl/JvmIdePlatformKind.kt +++ b/idea/idea-jps-common/src/org/jetbrains/kotlin/platform/impl/JvmIdePlatformKind.kt @@ -38,7 +38,7 @@ object JvmIdePlatformKind : IdePlatformKind() { message = "IdePlatform is deprecated and will be removed soon, please, migrate to org.jetbrains.kotlin.platform.TargetPlatform", level = DeprecationLevel.ERROR ) - override fun getDefaultPlatform(): Platform = Platform(JvmTarget.JVM_1_6) + override fun getDefaultPlatform(): Platform = Platform(JvmTarget.DEFAULT) override fun createArguments(): CommonCompilerArguments { return K2JVMCompilerArguments() diff --git a/idea/kotlin-gradle-tooling/src/KotlinImportingDiagnostic.kt b/idea/kotlin-gradle-tooling/src/KotlinImportingDiagnostic.kt new file mode 100644 index 00000000000..7eff2987dc6 --- /dev/null +++ b/idea/kotlin-gradle-tooling/src/KotlinImportingDiagnostic.kt @@ -0,0 +1,25 @@ +/* + * Copyright 2010-2021 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. + */ + +package org.jetbrains.kotlin.gradle + +import java.io.Serializable + + +interface KotlinImportingDiagnostic : Serializable { + fun deepCopy(cache: MutableMap): KotlinImportingDiagnostic +} + +typealias KotlinImportingDiagnosticsContainer = MutableSet + +interface KotlinSourceSetImportingDiagnostic : KotlinImportingDiagnostic { + val kotlinSourceSet: KotlinSourceSet +} + +data class OrphanSourceSetsImportingDiagnostic(override val kotlinSourceSet: KotlinSourceSet) : KotlinSourceSetImportingDiagnostic { + override fun deepCopy(cache: MutableMap): OrphanSourceSetsImportingDiagnostic = + (cache[kotlinSourceSet] as? KotlinSourceSet)?.let { OrphanSourceSetsImportingDiagnostic(it) } + ?: OrphanSourceSetsImportingDiagnostic(KotlinSourceSetImpl(kotlinSourceSet, cache).apply { cache[kotlinSourceSet] = this }) +} \ No newline at end of file diff --git a/idea/kotlin-gradle-tooling/src/KotlinMPPGradleModel.kt b/idea/kotlin-gradle-tooling/src/KotlinMPPGradleModel.kt index a6940469f8e..8ae2ccc41d3 100644 --- a/idea/kotlin-gradle-tooling/src/KotlinMPPGradleModel.kt +++ b/idea/kotlin-gradle-tooling/src/KotlinMPPGradleModel.kt @@ -180,6 +180,7 @@ interface KotlinMPPGradleModel : Serializable { val targets: Collection val extraFeatures: ExtraFeatures val kotlinNativeHome: String + val kotlinImportingDiagnostics: KotlinImportingDiagnosticsContainer companion object { const val NO_KOTLIN_NATIVE_HOME = "" diff --git a/idea/kotlin-gradle-tooling/src/KotlinMPPGradleModelBuilder.kt b/idea/kotlin-gradle-tooling/src/KotlinMPPGradleModelBuilder.kt index bf095012b00..a90787753dc 100644 --- a/idea/kotlin-gradle-tooling/src/KotlinMPPGradleModelBuilder.kt +++ b/idea/kotlin-gradle-tooling/src/KotlinMPPGradleModelBuilder.kt @@ -76,7 +76,9 @@ class KotlinMPPGradleModelBuilder : ModelBuilderService { ), kotlinNativeHome, dependencyMapper.toDependencyMap() - ) + ).apply { + kotlinImportingDiagnostics += collectDiagnostics(importingContext) + } } private fun filterOrphanSourceSets( @@ -906,6 +908,17 @@ class KotlinMPPGradleModelBuilder : ModelBuilderService { companion object { private val logger = Logging.getLogger(KotlinMPPGradleModelBuilder::class.java) + private val DEFAULT_IMPORTING_CHECKERS = listOf( + OrphanSourceSetImportingChecker + ) + + private fun KotlinMPPGradleModel.collectDiagnostics(importingContext: MultiplatformModelImportingContext): KotlinImportingDiagnosticsContainer = + mutableSetOf().apply { + DEFAULT_IMPORTING_CHECKERS.forEach { + it.check(this@collectDiagnostics, this, importingContext) + } + } + fun Project.getTargets(): Collection? { val kotlinExt = project.extensions.findByName("kotlin") ?: return null val getTargets = kotlinExt.javaClass.getMethodOrNull("getTargets") ?: return null diff --git a/idea/kotlin-gradle-tooling/src/KotlinMPPGradleModelImpl.kt b/idea/kotlin-gradle-tooling/src/KotlinMPPGradleModelImpl.kt index 3bde747398b..1791edf052f 100644 --- a/idea/kotlin-gradle-tooling/src/KotlinMPPGradleModelImpl.kt +++ b/idea/kotlin-gradle-tooling/src/KotlinMPPGradleModelImpl.kt @@ -243,7 +243,8 @@ data class KotlinMPPGradleModelImpl( override val targets: Collection, override val extraFeatures: ExtraFeatures, override val kotlinNativeHome: String, - override val dependencyMap: Map + override val dependencyMap: Map, + override val kotlinImportingDiagnostics: KotlinImportingDiagnosticsContainer = mutableSetOf() ) : KotlinMPPGradleModel { constructor(mppModel: KotlinMPPGradleModel, cloningCache: MutableMap) : this( @@ -264,7 +265,8 @@ data class KotlinMPPGradleModelImpl( mppModel.extraFeatures.isNativeDependencyPropagationEnabled ), mppModel.kotlinNativeHome, - mppModel.dependencyMap.map { it.key to it.value.deepCopy(cloningCache) }.toMap() + mppModel.dependencyMap.map { it.key to it.value.deepCopy(cloningCache) }.toMap(), + mppModel.kotlinImportingDiagnostics.mapTo(mutableSetOf()) { it.deepCopy(cloningCache) } ) } diff --git a/idea/kotlin-gradle-tooling/src/MultiplatformModelImportingChecker.kt b/idea/kotlin-gradle-tooling/src/MultiplatformModelImportingChecker.kt new file mode 100644 index 00000000000..528ae745103 --- /dev/null +++ b/idea/kotlin-gradle-tooling/src/MultiplatformModelImportingChecker.kt @@ -0,0 +1,21 @@ +/* + * Copyright 2010-2021 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. + */ + +package org.jetbrains.kotlin.gradle + +internal interface MultiplatformModelImportingChecker { + fun check(model: KotlinMPPGradleModel, reportTo: KotlinImportingDiagnosticsContainer, context: MultiplatformModelImportingContext) +} + +internal object OrphanSourceSetImportingChecker : MultiplatformModelImportingChecker { + override fun check( + model: KotlinMPPGradleModel, + reportTo: KotlinImportingDiagnosticsContainer, + context: MultiplatformModelImportingContext + ) { + model.sourceSets.values.filter { context.isOrphanSourceSet(it) } + .mapTo(reportTo) { OrphanSourceSetsImportingDiagnostic(it) } + } +} \ No newline at end of file diff --git a/idea/kotlin-gradle-tooling/src/MultiplatformModelImportingContext.kt b/idea/kotlin-gradle-tooling/src/MultiplatformModelImportingContext.kt index 85ad316f5ca..1d760b09508 100644 --- a/idea/kotlin-gradle-tooling/src/MultiplatformModelImportingContext.kt +++ b/idea/kotlin-gradle-tooling/src/MultiplatformModelImportingContext.kt @@ -7,8 +7,6 @@ package org.jetbrains.kotlin.gradle import org.gradle.api.Project import org.gradle.api.logging.Logging -import org.jetbrains.kotlin.gradle.GradleImportProperties.* -import java.lang.Exception private val logger = Logging.getLogger(KotlinMPPGradleModelBuilder::class.java) @@ -69,7 +67,6 @@ internal class MultiplatformModelImportingContextImpl(override val project: Proj override val sourceSets: Collection get() = sourceSetsByNames.values - /** see [initializeCompilations] */ override lateinit var compilations: Collection private set diff --git a/idea/performanceTests/test/org/jetbrains/kotlin/idea/perf/PerformanceProjectsTest.kt b/idea/performanceTests/test/org/jetbrains/kotlin/idea/perf/PerformanceProjectsTest.kt index e89114cbcb2..6faae1309a9 100644 --- a/idea/performanceTests/test/org/jetbrains/kotlin/idea/perf/PerformanceProjectsTest.kt +++ b/idea/performanceTests/test/org/jetbrains/kotlin/idea/perf/PerformanceProjectsTest.kt @@ -5,15 +5,17 @@ package org.jetbrains.kotlin.idea.perf +import com.intellij.codeHighlighting.* import com.intellij.codeInsight.daemon.impl.HighlightInfo -import com.intellij.lang.annotation.AnnotationHolder +import com.intellij.openapi.editor.Document +import com.intellij.openapi.editor.Editor +import com.intellij.openapi.progress.ProgressIndicator import com.intellij.openapi.project.Project -import com.intellij.psi.PsiElement +import com.intellij.psi.PsiFile import com.intellij.testFramework.RunAll import com.intellij.util.ThrowableRunnable import org.jetbrains.kotlin.idea.core.script.ScriptConfigurationManager -import org.jetbrains.kotlin.idea.highlighter.KotlinPsiChecker -import org.jetbrains.kotlin.idea.highlighter.KotlinPsiCheckerAndHighlightingUpdater +import org.jetbrains.kotlin.idea.highlighter.KotlinHighlightingPass import org.jetbrains.kotlin.idea.perf.Stats.Companion.TEST_KEY import org.jetbrains.kotlin.idea.perf.Stats.Companion.runAndMeasure import org.jetbrains.kotlin.idea.perf.util.Metric @@ -22,6 +24,7 @@ import org.jetbrains.kotlin.idea.testFramework.Fixture import org.jetbrains.kotlin.idea.testFramework.Fixture.Companion.cleanupCaches import org.jetbrains.kotlin.idea.testFramework.Fixture.Companion.isAKotlinScriptFile import org.jetbrains.kotlin.idea.testFramework.ProjectOpenAction.GRADLE_PROJECT +import org.jetbrains.kotlin.psi.KtFile import java.util.concurrent.atomic.AtomicLong import kotlin.test.assertNotEquals @@ -38,6 +41,9 @@ class PerformanceProjectsTest : AbstractPerformanceProjectsTest() { @JvmStatic val timer: AtomicLong = AtomicLong() + @JvmStatic + val diagnosticTimer: AtomicLong = AtomicLong() + fun resetTimestamp() { timer.set(0) } @@ -326,6 +332,7 @@ class PerformanceProjectsTest : AbstractPerformanceProjectsTest() { val testName = "fileAnalysis ${notePrefix(note)}${simpleFilename(fileName)}" val extraStats = Stats("${stats.name} $testName") val extraTimingsNs = mutableListOf?>() + val diagnosticTimingsNs = mutableListOf?>() val warmUpIterations = 30 val iterations = 50 @@ -337,7 +344,7 @@ class PerformanceProjectsTest : AbstractPerformanceProjectsTest() { iterations(iterations) setUp(perfKtsFileAnalysisSetUp(project, fileName)) test(perfKtsFileAnalysisTest()) - tearDown(perfKtsFileAnalysisTearDown(extraTimingsNs, project)) + tearDown(perfKtsFileAnalysisTearDown(extraTimingsNs, diagnosticTimingsNs, project)) profilerConfig.enabled = true } @@ -349,19 +356,31 @@ class PerformanceProjectsTest : AbstractPerformanceProjectsTest() { metricChildren ) + extraStats.printWarmUpTimings( + "diagnostic", + diagnosticTimingsNs.take(warmUpIterations).toTypedArray(), + metricChildren + ) + extraStats.processTimings( "annotator", extraTimingsNs.drop(warmUpIterations).toTypedArray(), metricChildren ) + + extraStats.processTimings( + "diagnostic", + diagnosticTimingsNs.drop(warmUpIterations).toTypedArray(), + metricChildren + ) } } private fun replaceWithCustomHighlighter() { org.jetbrains.kotlin.idea.testFramework.replaceWithCustomHighlighter( testRootDisposable, - KotlinPsiCheckerAndHighlightingUpdater::class.java.name, - TestKotlinPsiChecker::class.java.name + KotlinHighlightingPass.Registrar::class.java.name, + TestKotlinHighlightingPass.Registrar::class.java.name ) } @@ -385,18 +404,22 @@ class PerformanceProjectsTest : AbstractPerformanceProjectsTest() { fun perfKtsFileAnalysisTest(): (TestData>>) -> Unit { return { it.value = it.setUpValue?.let { fixture -> - Pair(System.nanoTime(), fixture.doHighlighting()) + val nowNs = System.nanoTime() + diagnosticTimer.set(-nowNs) + Pair(nowNs, fixture.doHighlighting()) } } } fun perfKtsFileAnalysisTearDown( extraTimingsNs: MutableList?>, + diagnosticTimingsMs: MutableList?>, project: Project ): (TestData>>) -> Unit { return { it.setUpValue?.let { fixture -> it.value?.let { v -> + diagnosticTimingsMs.add(mapOf(TEST_KEY to diagnosticTimer.getAndSet(0))) assertTrue(v.second.isNotEmpty()) assertNotEquals(0, timer.get()) @@ -411,12 +434,38 @@ class PerformanceProjectsTest : AbstractPerformanceProjectsTest() { } - class TestKotlinPsiChecker : KotlinPsiChecker() { - override fun annotate( - element: PsiElement, holder: AnnotationHolder - ) { - super.annotate(element, holder) - markTimestamp() + class TestKotlinHighlightingPass(file: KtFile, document: Document) : KotlinHighlightingPass(file, document) { + override fun doCollectInformation(progress: ProgressIndicator) { + annotationCallback { + val nowNs = System.nanoTime() + diagnosticTimer.addAndGet(nowNs) + resetAnnotationCallback() + } + try { + super.doCollectInformation(progress) + } finally { + resetAnnotationCallback() + markTimestamp() + } + } + + class Factory : TextEditorHighlightingPassFactory { + override fun createHighlightingPass(file: PsiFile, editor: Editor): TextEditorHighlightingPass? { + if (file !is KtFile) return null + return TestKotlinHighlightingPass(file, editor.document) + } + } + + class Registrar : TextEditorHighlightingPassFactoryRegistrar { + override fun registerHighlightingPassFactory(registrar: TextEditorHighlightingPassRegistrar, project: Project) { + registrar.registerTextEditorHighlightingPass( + Factory(), + null, + intArrayOf(Pass.UPDATE_ALL), + false, + -1 + ) + } } } } \ No newline at end of file diff --git a/idea/resources-descriptors/META-INF/plugin.xml b/idea/resources-descriptors/META-INF/plugin.xml index 981f882d453..a1befba5ea8 100644 --- a/idea/resources-descriptors/META-INF/plugin.xml +++ b/idea/resources-descriptors/META-INF/plugin.xml @@ -16,7 +16,19 @@ The Kotlin plugin provides language support in IntelliJ IDEA and Android Studio. 1.4.30 +
    +
  • Preview of new language features: JVM records support, sealed interfaces, and stable inline classes.
  • +
  • Kotlin/JVM: IR backend is now in Beta.
  • +
  • Kotlin/Native: performance improvements, new `watchosX64` simulator target, support for Xcode 12.2 libraries.
  • +
  • Kotlin/JS: prototype lazy initialization of top-level properties.
  • +
  • Support for Gradle configuration cache.
  • +
  • Standard library API improvements: locale-agnostic API for upper/lowercasing text and clear Char-to-code and Char-to-digit conversions.
  • +
+ For more details, see
What’s New in Kotlin 1.4.30 and this blog post. +

1.4.20

+ Released: November 23, 2020
  • Kotlin/JS: New project templates, improved Gradle plugin, experimental compilation with errors mode in the IR compiler.
  • Kotlin/Native: New escape analysis mechanism, wrapping of Objective-C exceptions, various functional and performance improvements.
  • @@ -123,6 +135,9 @@ The Kotlin plugin provides language support in IntelliJ IDEA and Android Studio. + + + diff --git a/idea/resources-descriptors/META-INF/plugin.xml.201 b/idea/resources-descriptors/META-INF/plugin.xml.201 index 8f5c88df3b5..3f4d5a4777b 100644 --- a/idea/resources-descriptors/META-INF/plugin.xml.201 +++ b/idea/resources-descriptors/META-INF/plugin.xml.201 @@ -16,7 +16,19 @@ The Kotlin plugin provides language support in IntelliJ IDEA and Android Studio. 1.4.30 +
      +
    • Preview of new language features: JVM records support, sealed interfaces, and stable inline classes.
    • +
    • Kotlin/JVM: IR backend is now in Beta.
    • +
    • Kotlin/Native: performance improvements, new `watchosX64` simulator target, support for Xcode 12.2 libraries.
    • +
    • Kotlin/JS: prototype lazy initialization of top-level properties.
    • +
    • Support for Gradle configuration cache.
    • +
    • Standard library API improvements: locale-agnostic API for upper/lowercasing text and clear Char-to-code and Char-to-digit conversions.
    • +
    + For more details, see What’s New in Kotlin 1.4.30 and this blog post. +

    1.4.20

    + Released: November 23, 2020
    • Kotlin/JS: New project templates, improved Gradle plugin, experimental compilation with errors mode in the IR compiler.
    • Kotlin/Native: New escape analysis mechanism, wrapping of Objective-C exceptions, various functional and performance improvements.
    • @@ -123,6 +135,9 @@ The Kotlin plugin provides language support in IntelliJ IDEA and Android Studio. + + + diff --git a/idea/resources-descriptors/META-INF/plugin.xml.as41 b/idea/resources-descriptors/META-INF/plugin.xml.as41 index a70a1c3b054..1948bf388de 100644 --- a/idea/resources-descriptors/META-INF/plugin.xml.as41 +++ b/idea/resources-descriptors/META-INF/plugin.xml.as41 @@ -16,7 +16,19 @@ The Kotlin plugin provides language support in IntelliJ IDEA and Android Studio. 1.4.30 +
        +
      • Preview of new language features: JVM records support, sealed interfaces, and stable inline classes.
      • +
      • Kotlin/JVM: IR backend is now in Beta.
      • +
      • Kotlin/Native: performance improvements, new `watchosX64` simulator target, support for Xcode 12.2 libraries.
      • +
      • Kotlin/JS: prototype lazy initialization of top-level properties.
      • +
      • Support for Gradle configuration cache.
      • +
      • Standard library API improvements: locale-agnostic API for upper/lowercasing text and clear Char-to-code and Char-to-digit conversions.
      • +
      + For more details, see What’s New in Kotlin 1.4.30 and this blog post. +

      1.4.20

      + Released: November 23, 2020
      • Kotlin/JS: New project templates, improved Gradle plugin, experimental compilation with errors mode in the IR compiler.
      • Kotlin/Native: New escape analysis mechanism, wrapping of Objective-C exceptions, various functional and performance improvements.
      • @@ -122,6 +134,9 @@ The Kotlin plugin provides language support in IntelliJ IDEA and Android Studio. + + + diff --git a/idea/resources-descriptors/META-INF/plugin.xml.as42 b/idea/resources-descriptors/META-INF/plugin.xml.as42 index 1a2237b7f41..ffb67ecd6fd 100644 --- a/idea/resources-descriptors/META-INF/plugin.xml.as42 +++ b/idea/resources-descriptors/META-INF/plugin.xml.as42 @@ -16,7 +16,19 @@ The Kotlin plugin provides language support in IntelliJ IDEA and Android Studio. 1.4.30 +
          +
        • Preview of new language features: JVM records support, sealed interfaces, and stable inline classes.
        • +
        • Kotlin/JVM: IR backend is now in Beta.
        • +
        • Kotlin/Native: performance improvements, new `watchosX64` simulator target, support for Xcode 12.2 libraries.
        • +
        • Kotlin/JS: prototype lazy initialization of top-level properties.
        • +
        • Support for Gradle configuration cache.
        • +
        • Standard library API improvements: locale-agnostic API for upper/lowercasing text and clear Char-to-code and Char-to-digit conversions.
        • +
        + For more details, see What’s New in Kotlin 1.4.30 and this blog post. +

        1.4.20

        + Released: November 23, 2020
        • Kotlin/JS: New project templates, improved Gradle plugin, experimental compilation with errors mode in the IR compiler.
        • Kotlin/Native: New escape analysis mechanism, wrapping of Objective-C exceptions, various functional and performance improvements.
        • @@ -103,6 +115,9 @@ The Kotlin plugin provides language support in IntelliJ IDEA and Android Studio. + + + diff --git a/idea/resources-en/messages/KotlinBundle.properties b/idea/resources-en/messages/KotlinBundle.properties index 071bfa724b2..533ae28b198 100644 --- a/idea/resources-en/messages/KotlinBundle.properties +++ b/idea/resources-en/messages/KotlinBundle.properties @@ -804,7 +804,6 @@ selected.code.fragment.has.multiple.exit.points=Selected code fragment has multi selected.code.fragment.has.multiple.output.values=Selected code fragment has more than 3 output values: selected.code.fragment.has.output.values.and.exit.points=Selected code fragment has output values as well as alternative exit points setter.of.0.will.become.invisible.after.extraction=Setter of {0} will become invisible after extraction -text.0.1.must.be.moved.with.sealed.parent.class.and.all.its.subclasses={0} ''{1}'' must be moved with sealed parent class and all its subclasses text.0.already.contains.1={0} already contains {1} text.0.already.contains.nested.class.1={0} already contains nested class named {1} text.0.already.declared.in.1={0} is already declared in {1} @@ -946,7 +945,10 @@ text.rename.overloads.to=Rename overloads to: text.rename.parameters.in.hierarchy.to=Rename parameter in hierarchy to: text.rename.parameters.title=Rename Parameters text.rename.warning=Rename warning -text.sealed.class.0.must.be.moved.with.all.its.subclasses=Sealed class ''{0}'' must be moved with all its subclasses + +text.sealed.broken.hierarchy.none.in.target=Sealed hierarchy of ''{0}'' would be split. None of its members reside in the package ''{1}'' of module ''{2}'': {3}. +text.sealed.broken.hierarchy.still.in.source=Sealed hierarchy of ''{0}'' would be split. Package ''{1}'' of module ''{2}'' would still contain its members: {3}. + text.select.target.code.block.file=Select target code block / file text.select.target.code.block=Select target code block text.select.target.file=Select target file @@ -1282,6 +1284,7 @@ function.should.have.operator.modifier=Function should have 'operator' modifier type.parameter.can.have.0.variance=Type parameter can have {0} variance add.variance.fix.text=Add ''{0}'' variance add.variance.fix.family.name=Add variance +interface.member.dependency.required.by.interfaces=required by {0,choice,1#interface|2#interfaces} generate.equals.and.hashcode.fix.text=Generate equals() and hashCode() array.property.in.data.class.it.s.recommended.to.override.equals.hashcode=Array property in data class: it's recommended to override equals() / hashCode() report.also.on.call.with.single.boolean.literal.argument=Report also on call with single boolean literal argument diff --git a/idea/resources-fir/META-INF/plugin.xml b/idea/resources-fir/META-INF/plugin.xml index f4d4c1a2fd7..ad428ee635d 100644 --- a/idea/resources-fir/META-INF/plugin.xml +++ b/idea/resources-fir/META-INF/plugin.xml @@ -116,9 +116,6 @@ The Kotlin FIR plugin provides language support in IntelliJ IDEA and Android Stu - - diff --git a/idea/resources/META-INF/plugin-common.xml b/idea/resources/META-INF/plugin-common.xml index e802ce65eb8..451f2eed9ba 100644 --- a/idea/resources/META-INF/plugin-common.xml +++ b/idea/resources/META-INF/plugin-common.xml @@ -213,9 +213,6 @@ - - @@ -491,13 +488,8 @@ - - - - - diff --git a/idea/src/org/jetbrains/kotlin/idea/asJava/LightClassProviderImpl.kt b/idea/src/org/jetbrains/kotlin/idea/asJava/LightClassProviderImpl.kt deleted file mode 100644 index 531f952df3c..00000000000 --- a/idea/src/org/jetbrains/kotlin/idea/asJava/LightClassProviderImpl.kt +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright 2010-2020 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. - */ - -package org.jetbrains.kotlin.idea.asJava - -import com.intellij.psi.* -import org.jetbrains.kotlin.asJava.* -import org.jetbrains.kotlin.asJava.classes.KtLightClass -import org.jetbrains.kotlin.idea.caches.lightClasses.KtFakeLightClass -import org.jetbrains.kotlin.idea.caches.lightClasses.KtFakeLightMethod -import org.jetbrains.kotlin.idea.caches.lightClasses.KtLightClassForDecompiledDeclaration -import org.jetbrains.kotlin.psi.* - -class LightClassProviderImpl : LightClassProvider { - override fun getLightFieldForCompanionObject(companionObject: KtClassOrObject): PsiField? = - LightClassUtil.getLightFieldForCompanionObject(companionObject) - - override fun getLightClassMethods(function: KtFunction): List = - LightClassUtil.getLightClassMethods(function) - - override fun getLightClassParameterDeclarations(parameter: KtParameter): List = - LightClassUtil.getLightClassPropertyMethods(parameter).allDeclarations - - override fun getLightClassPropertyDeclarations(property: KtProperty): List = - LightClassUtil.getLightClassPropertyMethods(property).allDeclarations - - override fun toLightClassWithBuiltinMapping(classOrObject: KtClassOrObject): PsiClass? = - classOrObject.toLightClassWithBuiltinMapping() - - override fun toLightMethods(psiElement: PsiElement): List = - psiElement.toLightMethods() - - override fun toLightClass(classOrObject: KtClassOrObject): KtLightClass? = - classOrObject.toLightClass() - - override fun toLightElements(ktElement: KtElement): List = - ktElement.toLightElements() - - override fun createKtFakeLightClass(kotlinOrigin: KtClassOrObject): PsiClass? = - KtFakeLightClass(kotlinOrigin) - - override fun getRepresentativeLightMethod(psiElement: PsiElement): PsiMethod? = - psiElement.getRepresentativeLightMethod() - - override fun isKtFakeLightClass(psiClass: PsiClass): Boolean = - psiClass is KtFakeLightClass - - override fun isKtLightClassForDecompiledDeclaration(psiClass: PsiClass): Boolean = - psiClass is KtLightClassForDecompiledDeclaration - - override fun createKtFakeLightMethod(ktDeclaration: KtNamedDeclaration): PsiMethod? = - KtFakeLightMethod.get(ktDeclaration) -} \ No newline at end of file diff --git a/idea/src/org/jetbrains/kotlin/idea/compiler/configuration/KotlinCompilerConfigurableTab.form b/idea/src/org/jetbrains/kotlin/idea/compiler/configuration/KotlinCompilerConfigurableTab.form index 745e6a86801..12ac681015a 100644 --- a/idea/src/org/jetbrains/kotlin/idea/compiler/configuration/KotlinCompilerConfigurableTab.form +++ b/idea/src/org/jetbrains/kotlin/idea/compiler/configuration/KotlinCompilerConfigurableTab.form @@ -109,15 +109,6 @@ - - - - - - - - - @@ -150,7 +141,7 @@ - + @@ -165,39 +156,20 @@ - + - - - - - - - - - - + - - - - - - - - - - diff --git a/idea/src/org/jetbrains/kotlin/idea/compiler/configuration/KotlinCompilerConfigurableTab.java b/idea/src/org/jetbrains/kotlin/idea/compiler/configuration/KotlinCompilerConfigurableTab.java index 7c1ce14f70d..8ed085945a8 100644 --- a/idea/src/org/jetbrains/kotlin/idea/compiler/configuration/KotlinCompilerConfigurableTab.java +++ b/idea/src/org/jetbrains/kotlin/idea/compiler/configuration/KotlinCompilerConfigurableTab.java @@ -54,10 +54,7 @@ import java.util.List; public class KotlinCompilerConfigurableTab implements SearchableConfigurable { private static final Map moduleKindDescriptions = new LinkedHashMap<>(); - private static final Map soruceMapSourceEmbeddingDescriptions = new LinkedHashMap<>(); - private static final List languageFeatureStates = Arrays.asList( - LanguageFeature.State.ENABLED, LanguageFeature.State.ENABLED_WITH_WARNING, LanguageFeature.State.ENABLED_WITH_ERROR - ); + private static final Map sourceMapSourceEmbeddingDescriptions = new LinkedHashMap<>(); private static final int MAX_WARNING_SIZE = 75; private static final Disposable validatorsDisposable = Disposer.newDisposable(); @@ -68,9 +65,11 @@ public class KotlinCompilerConfigurableTab implements SearchableConfigurable { moduleKindDescriptions.put(K2JsArgumentConstants.MODULE_COMMONJS, KotlinBundle.message("configuration.description.commonjs")); moduleKindDescriptions.put(K2JsArgumentConstants.MODULE_UMD, KotlinBundle.message("configuration.description.umd.detect.amd.or.commonjs.if.available.fallback.to.plain")); - soruceMapSourceEmbeddingDescriptions.put(K2JsArgumentConstants.SOURCE_MAP_SOURCE_CONTENT_NEVER, KotlinBundle.message("configuration.description.never")); - soruceMapSourceEmbeddingDescriptions.put(K2JsArgumentConstants.SOURCE_MAP_SOURCE_CONTENT_ALWAYS, KotlinBundle.message("configuration.description.always")); - soruceMapSourceEmbeddingDescriptions.put(K2JsArgumentConstants.SOURCE_MAP_SOURCE_CONTENT_INLINING, KotlinBundle.message("configuration.description.when.inlining.a.function.from.other.module.with.embedded.sources")); + sourceMapSourceEmbeddingDescriptions + .put(K2JsArgumentConstants.SOURCE_MAP_SOURCE_CONTENT_NEVER, KotlinBundle.message("configuration.description.never")); + sourceMapSourceEmbeddingDescriptions + .put(K2JsArgumentConstants.SOURCE_MAP_SOURCE_CONTENT_ALWAYS, KotlinBundle.message("configuration.description.always")); + sourceMapSourceEmbeddingDescriptions.put(K2JsArgumentConstants.SOURCE_MAP_SOURCE_CONTENT_INLINING, KotlinBundle.message("configuration.description.when.inlining.a.function.from.other.module.with.embedded.sources")); } @Nullable @@ -97,8 +96,6 @@ public class KotlinCompilerConfigurableTab implements SearchableConfigurable { private JComboBox moduleKindComboBox; private JTextField scriptTemplatesField; private JTextField scriptTemplatesClasspathField; - private JLabel scriptTemplatesLabel; - private JLabel scriptTemplatesClasspathLabel; private JPanel k2jvmPanel; private JPanel k2jsPanel; private JComboBox jvmVersionComboBox; @@ -109,9 +106,7 @@ public class KotlinCompilerConfigurableTab implements SearchableConfigurable { private JLabel labelForOutputPostfixFile; private JLabel warningLabel; private JTextField sourceMapPrefix; - private JLabel labelForSourceMapPrefix; private JComboBox sourceMapEmbedSources; - private JPanel coroutinesPanel; private boolean isEnabled = true; public KotlinCompilerConfigurableTab( @@ -266,7 +261,7 @@ public class KotlinCompilerConfigurableTab implements SearchableConfigurable { @NotNull private static String getSourceMapSourceEmbeddingDescription(@Nullable String sourceMapSourceEmbeddingId) { if (sourceMapSourceEmbeddingId == null) return ""; - String result = soruceMapSourceEmbeddingDescriptions.get(sourceMapSourceEmbeddingId); + String result = sourceMapSourceEmbeddingDescriptions.get(sourceMapSourceEmbeddingId); assert result != null : "Source map source embedding mode " + sourceMapSourceEmbeddingId + " was not added to combobox, therefore it should not be here"; return result; @@ -329,7 +324,6 @@ public class KotlinCompilerConfigurableTab implements SearchableConfigurable { public void onLanguageLevelChanged(@Nullable VersionView languageLevel) { if (languageLevel == null) return; restrictAPIVersions(languageLevel); - coroutinesPanel.setVisible(languageLevel.getVersion().compareTo(LanguageVersion.KOTLIN_1_3) < 0); } @SuppressWarnings("unchecked") @@ -400,7 +394,7 @@ public class KotlinCompilerConfigurableTab implements SearchableConfigurable { @SuppressWarnings("unchecked") private void fillSourceMapSourceEmbeddingList() { - for (String moduleKind : soruceMapSourceEmbeddingDescriptions.keySet()) { + for (String moduleKind : sourceMapSourceEmbeddingDescriptions.keySet()) { sourceMapEmbedSources.addItem(moduleKind); } sourceMapEmbedSources.setRenderer(new ListCellRendererWrapper() { diff --git a/idea/src/org/jetbrains/kotlin/idea/hierarchy/KotlinTypeHierarchyProvider.kt b/idea/src/org/jetbrains/kotlin/idea/hierarchy/KotlinTypeHierarchyProvider.kt index 337d7b8dc34..9e30ed6baf9 100644 --- a/idea/src/org/jetbrains/kotlin/idea/hierarchy/KotlinTypeHierarchyProvider.kt +++ b/idea/src/org/jetbrains/kotlin/idea/hierarchy/KotlinTypeHierarchyProvider.kt @@ -17,7 +17,8 @@ import com.intellij.psi.* import com.intellij.psi.search.GlobalSearchScope import org.jetbrains.kotlin.asJava.toLightClass import org.jetbrains.kotlin.builtins.jvm.JavaToKotlinClassMap -import org.jetbrains.kotlin.idea.caches.lightClasses.KtFakeLightClass +import org.jetbrains.kotlin.asJava.classes.KtFakeLightClass +import org.jetbrains.kotlin.asJava.toFakeLightClass import org.jetbrains.kotlin.idea.caches.resolve.resolveToDescriptorIfAny import org.jetbrains.kotlin.idea.project.platform import org.jetbrains.kotlin.idea.search.allScope @@ -44,7 +45,7 @@ class KotlinTypeHierarchyProvider : JavaTypeHierarchyProvider() { ) } } - return classOrObject.toLightClass() ?: KtFakeLightClass(classOrObject) + return classOrObject.toLightClass() ?: classOrObject.toFakeLightClass() } private fun getTargetByReference( diff --git a/idea/src/org/jetbrains/kotlin/idea/highlighter/KotlinHighlightingPass.kt b/idea/src/org/jetbrains/kotlin/idea/highlighter/KotlinHighlightingPass.kt new file mode 100644 index 00000000000..30920e08a2e --- /dev/null +++ b/idea/src/org/jetbrains/kotlin/idea/highlighter/KotlinHighlightingPass.kt @@ -0,0 +1,45 @@ +/* + * Copyright 2010-2020 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. + */ + +package org.jetbrains.kotlin.idea.highlighter + +import com.intellij.codeHighlighting.* +import com.intellij.openapi.editor.Document +import com.intellij.openapi.editor.Editor +import com.intellij.openapi.project.Project +import com.intellij.psi.PsiFile +import org.jetbrains.kotlin.idea.inspections.UnusedSymbolInspection +import org.jetbrains.kotlin.idea.isMainFunction +import org.jetbrains.kotlin.psi.KtFile +import org.jetbrains.kotlin.psi.KtNamedFunction +import org.jetbrains.kotlin.psi.KtParameter + +open class KotlinHighlightingPass(file: KtFile, document: Document) : AbstractKotlinHighlightingPass(file, document) { + + override fun shouldSuppressUnusedParameter(parameter: KtParameter): Boolean { + val grandParent = parameter.parent.parent as? KtNamedFunction ?: return false + if (!UnusedSymbolInspection.isEntryPoint(grandParent)) return false + return !grandParent.isMainFunction() + } + + class Factory : TextEditorHighlightingPassFactory { + override fun createHighlightingPass(file: PsiFile, editor: Editor): TextEditorHighlightingPass? { + if (file !is KtFile) return null + return KotlinHighlightingPass(file, editor.document) + } + } + + class Registrar : TextEditorHighlightingPassFactoryRegistrar { + override fun registerHighlightingPassFactory(registrar: TextEditorHighlightingPassRegistrar, project: Project) { + registrar.registerTextEditorHighlightingPass( + Factory(), + /* runAfterCompletionOf = */ null, + /* runAfterStartingOf = */ intArrayOf(Pass.UPDATE_ALL), + /* runIntentionsPassAfter = */false, + /* forcedPassId = */-1 + ) + } + } +} \ No newline at end of file diff --git a/idea/src/org/jetbrains/kotlin/idea/highlighter/KotlinPsiCheckerAndHighlightingUpdater.kt b/idea/src/org/jetbrains/kotlin/idea/highlighter/KotlinPsiCheckerAndHighlightingUpdater.kt deleted file mode 100644 index 9a01b9dec6d..00000000000 --- a/idea/src/org/jetbrains/kotlin/idea/highlighter/KotlinPsiCheckerAndHighlightingUpdater.kt +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright 2010-2015 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.jetbrains.kotlin.idea.highlighter - -import org.jetbrains.kotlin.idea.inspections.UnusedSymbolInspection -import org.jetbrains.kotlin.idea.isMainFunction -import org.jetbrains.kotlin.psi.KtNamedFunction -import org.jetbrains.kotlin.psi.KtParameter - -class KotlinPsiCheckerAndHighlightingUpdater : KotlinPsiChecker() { - override fun shouldSuppressUnusedParameter(parameter: KtParameter): Boolean { - val grandParent = parameter.parent.parent as? KtNamedFunction ?: return false - if (!UnusedSymbolInspection.isEntryPoint(grandParent)) return false - return !grandParent.isMainFunction() - } -} diff --git a/idea/src/org/jetbrains/kotlin/idea/highlighter/markers/JavaPsiUtils.kt b/idea/src/org/jetbrains/kotlin/idea/highlighter/markers/JavaPsiUtils.kt index 9008c5c7cfc..311ec06a694 100644 --- a/idea/src/org/jetbrains/kotlin/idea/highlighter/markers/JavaPsiUtils.kt +++ b/idea/src/org/jetbrains/kotlin/idea/highlighter/markers/JavaPsiUtils.kt @@ -23,8 +23,9 @@ import com.intellij.psi.PsiElement import com.intellij.psi.PsiMethod import org.jetbrains.kotlin.asJava.LightClassUtil import org.jetbrains.kotlin.asJava.toLightClass -import org.jetbrains.kotlin.idea.caches.lightClasses.KtFakeLightClass -import org.jetbrains.kotlin.idea.caches.lightClasses.KtFakeLightMethod +import org.jetbrains.kotlin.asJava.classes.KtFakeLightClass +import org.jetbrains.kotlin.asJava.classes.KtFakeLightMethod +import org.jetbrains.kotlin.asJava.toFakeLightClass import org.jetbrains.kotlin.psi.KtClass import org.jetbrains.kotlin.psi.KtFunction import org.jetbrains.kotlin.psi.KtNamedFunction @@ -48,7 +49,7 @@ internal tailrec fun getPsiClass(element: PsiElement?): PsiClass? { return when { element == null -> null element is PsiClass -> element - element is KtClass -> element.toLightClass() ?: KtFakeLightClass(element) + element is KtClass -> element.toLightClass() ?: element.toFakeLightClass() element.parent is KtClass -> getPsiClass(element.parent) else -> null } diff --git a/idea/src/org/jetbrains/kotlin/idea/highlighter/markers/KotlinLineMarkerProvider.kt b/idea/src/org/jetbrains/kotlin/idea/highlighter/markers/KotlinLineMarkerProvider.kt index 3d170255289..1c529942901 100644 --- a/idea/src/org/jetbrains/kotlin/idea/highlighter/markers/KotlinLineMarkerProvider.kt +++ b/idea/src/org/jetbrains/kotlin/idea/highlighter/markers/KotlinLineMarkerProvider.kt @@ -28,8 +28,9 @@ import org.jetbrains.kotlin.asJava.toLightClass import org.jetbrains.kotlin.descriptors.CallableMemberDescriptor import org.jetbrains.kotlin.descriptors.Modality import org.jetbrains.kotlin.idea.KotlinBundle -import org.jetbrains.kotlin.idea.caches.lightClasses.KtFakeLightClass -import org.jetbrains.kotlin.idea.caches.lightClasses.KtFakeLightMethod +import org.jetbrains.kotlin.asJava.classes.KtFakeLightClass +import org.jetbrains.kotlin.asJava.classes.KtFakeLightMethod +import org.jetbrains.kotlin.asJava.toFakeLightClass import org.jetbrains.kotlin.idea.core.isInheritable import org.jetbrains.kotlin.idea.core.isOverridable import org.jetbrains.kotlin.idea.editor.fixers.startLine @@ -292,7 +293,7 @@ private fun collectInheritedClassMarker(element: KtClass, result: LineMarkerInfo return } - val lightClass = element.toLightClass() ?: KtFakeLightClass(element) + val lightClass = element.toLightClass() ?: element.toFakeLightClass() if (ClassInheritorsSearch.search(lightClass, false).findFirst() == null) return diff --git a/idea/src/org/jetbrains/kotlin/idea/inspections/KotlinCleanupInspection.kt b/idea/src/org/jetbrains/kotlin/idea/inspections/KotlinCleanupInspection.kt index 60cb787374c..31388e0274b 100644 --- a/idea/src/org/jetbrains/kotlin/idea/inspections/KotlinCleanupInspection.kt +++ b/idea/src/org/jetbrains/kotlin/idea/inspections/KotlinCleanupInspection.kt @@ -17,7 +17,7 @@ import org.jetbrains.kotlin.diagnostics.Errors import org.jetbrains.kotlin.diagnostics.rendering.DefaultErrorMessages import org.jetbrains.kotlin.idea.KotlinBundle import org.jetbrains.kotlin.idea.caches.resolve.analyzeWithAllCompilerChecks -import org.jetbrains.kotlin.idea.highlighter.KotlinPsiChecker +import org.jetbrains.kotlin.idea.highlighter.AbstractKotlinHighlightingPass import org.jetbrains.kotlin.idea.quickfix.CleanupFix import org.jetbrains.kotlin.idea.quickfix.KotlinQuickFixAction import org.jetbrains.kotlin.idea.quickfix.ReplaceObsoleteLabelSyntaxFix @@ -99,7 +99,7 @@ class KotlinCleanupInspection : LocalInspectionTool(), CleanupLocalInspectionToo } private fun Diagnostic.toCleanupFixes(): Collection { - return KotlinPsiChecker.createQuickFixes(this).filterIsInstance() + return AbstractKotlinHighlightingPass.createQuickFixes(this).filterIsInstance() } private class Wrapper(val intention: IntentionAction, file: KtFile) : IntentionWrapper(intention, file) { diff --git a/idea/src/org/jetbrains/kotlin/idea/refactoring/memberInfo/KotlinInterfaceDependencyMemberInfoModel.kt b/idea/src/org/jetbrains/kotlin/idea/refactoring/memberInfo/KotlinInterfaceDependencyMemberInfoModel.kt index 579c8d2400d..1e035bed8f1 100644 --- a/idea/src/org/jetbrains/kotlin/idea/refactoring/memberInfo/KotlinInterfaceDependencyMemberInfoModel.kt +++ b/idea/src/org/jetbrains/kotlin/idea/refactoring/memberInfo/KotlinInterfaceDependencyMemberInfoModel.kt @@ -5,10 +5,10 @@ package org.jetbrains.kotlin.idea.refactoring.memberInfo -import com.intellij.refactoring.RefactoringBundle import com.intellij.refactoring.classMembers.DependencyMemberInfoModel import com.intellij.refactoring.classMembers.MemberInfoBase import com.intellij.refactoring.classMembers.MemberInfoModel +import org.jetbrains.kotlin.idea.KotlinBundle import org.jetbrains.kotlin.psi.KtClassOrObject import org.jetbrains.kotlin.psi.KtNamedDeclaration import org.jetbrains.kotlin.utils.ifEmpty @@ -20,7 +20,7 @@ class KotlinInterfaceDependencyMemberInfoModel val dependencies = myMemberDependencyGraph.getDependenciesOf(memberInfo.member).ifEmpty { return@setTooltipProvider null } buildString { - append(RefactoringBundle.message("interface.member.dependency.required.by.interfaces", dependencies.size)) + append(KotlinBundle.message("interface.member.dependency.required.by.interfaces", dependencies.size)) append(" ") dependencies.joinTo(this) { it.name ?: "" } } diff --git a/idea/src/org/jetbrains/kotlin/idea/refactoring/move/moveDeclarations/moveConflictUtils.kt b/idea/src/org/jetbrains/kotlin/idea/refactoring/move/moveDeclarations/moveConflictUtils.kt index f1d2678a8fe..fdcf2b8ca05 100644 --- a/idea/src/org/jetbrains/kotlin/idea/refactoring/move/moveDeclarations/moveConflictUtils.kt +++ b/idea/src/org/jetbrains/kotlin/idea/refactoring/move/moveDeclarations/moveConflictUtils.kt @@ -15,6 +15,8 @@ import com.intellij.openapi.vfs.VirtualFile import com.intellij.psi.* import com.intellij.psi.search.GlobalSearchScope import com.intellij.psi.search.SearchScope +import com.intellij.psi.search.searches.ClassInheritorsSearch +import com.intellij.psi.search.searches.ClassInheritorsSearch.SearchParameters import com.intellij.psi.search.searches.ReferencesSearch import com.intellij.psi.util.PsiTreeUtil import com.intellij.refactoring.RefactoringBundle @@ -23,10 +25,11 @@ import com.intellij.refactoring.util.MoveRenameUsageInfo import com.intellij.refactoring.util.NonCodeUsageInfo import com.intellij.refactoring.util.RefactoringUIUtil import com.intellij.usageView.UsageInfo -import com.intellij.usageView.UsageViewTypeLocation import com.intellij.util.containers.MultiMap import org.jetbrains.kotlin.asJava.namedUnwrappedElement +import org.jetbrains.kotlin.asJava.toLightClass import org.jetbrains.kotlin.asJava.toLightMethods +import org.jetbrains.kotlin.backend.common.serialization.findPackage import org.jetbrains.kotlin.builtins.KotlinBuiltIns import org.jetbrains.kotlin.descriptors.* import org.jetbrains.kotlin.descriptors.impl.MutablePackageFragmentDescriptor @@ -37,8 +40,13 @@ import org.jetbrains.kotlin.idea.caches.project.implementedModules import org.jetbrains.kotlin.idea.caches.resolve.* import org.jetbrains.kotlin.idea.caches.resolve.util.getJavaMemberDescriptor import org.jetbrains.kotlin.idea.caches.resolve.util.hasJavaResolutionFacade +import org.jetbrains.kotlin.idea.caches.resolve.util.javaResolutionFacade +import org.jetbrains.kotlin.idea.caches.resolve.util.resolveToDescriptor import org.jetbrains.kotlin.idea.codeInsight.DescriptorToSourceUtilsIde +import org.jetbrains.kotlin.idea.core.getPackage import org.jetbrains.kotlin.idea.core.isInTestSourceContentKotlinAware +import org.jetbrains.kotlin.idea.core.util.toPsiDirectory +import org.jetbrains.kotlin.idea.core.util.toPsiFile import org.jetbrains.kotlin.idea.imports.importableFqName import org.jetbrains.kotlin.idea.project.TargetPlatformDetector import org.jetbrains.kotlin.idea.project.forcedTargetPlatform @@ -46,9 +54,12 @@ import org.jetbrains.kotlin.idea.refactoring.getUsageContext import org.jetbrains.kotlin.idea.refactoring.move.KotlinMoveUsage import org.jetbrains.kotlin.idea.refactoring.pullUp.renderForConflicts import org.jetbrains.kotlin.idea.search.and +import org.jetbrains.kotlin.idea.search.getKotlinFqName import org.jetbrains.kotlin.idea.search.not +import org.jetbrains.kotlin.idea.search.usagesSearch.descriptor import org.jetbrains.kotlin.idea.util.projectStructure.getModule import org.jetbrains.kotlin.idea.util.projectStructure.module +import org.jetbrains.kotlin.js.resolve.diagnostics.findPsi import org.jetbrains.kotlin.lexer.KtTokens import org.jetbrains.kotlin.load.java.JavaDescriptorVisibilities import org.jetbrains.kotlin.name.FqName @@ -61,10 +72,8 @@ import org.jetbrains.kotlin.renderer.DescriptorRenderer import org.jetbrains.kotlin.renderer.ParameterNameRenderingPolicy import org.jetbrains.kotlin.resolve.BindingContext import org.jetbrains.kotlin.resolve.DescriptorUtils -import org.jetbrains.kotlin.resolve.descriptorUtil.fqNameOrNull -import org.jetbrains.kotlin.resolve.descriptorUtil.getImportableDescriptor -import org.jetbrains.kotlin.resolve.descriptorUtil.getSuperClassNotAny -import org.jetbrains.kotlin.resolve.descriptorUtil.isSubclassOf +import org.jetbrains.kotlin.resolve.descriptorUtil.* +import org.jetbrains.kotlin.resolve.jvm.KotlinJavaPsiFacade import org.jetbrains.kotlin.resolve.lazy.BodyResolveMode import org.jetbrains.kotlin.resolve.lazy.descriptors.findPackageFragmentForFile import org.jetbrains.kotlin.resolve.source.KotlinSourceElement @@ -522,43 +531,11 @@ class MoveConflictChecker( } private fun checkSealedClassMove(conflicts: MultiMap) { - val visited = HashSet() + val hierarchyChecker = SealedHierarchyChecker() + for (elementToMove in elementsToMove) { - if (!visited.add(elementToMove)) continue if (elementToMove !is KtClassOrObject) continue - - val rootClass: KtClass - val rootClassDescriptor: ClassDescriptor - if (elementToMove is KtClass && elementToMove.isSealed()) { - rootClass = elementToMove - rootClassDescriptor = rootClass.resolveToDescriptorIfAny() ?: return - } else { - val classDescriptor = elementToMove.resolveToDescriptorIfAny() ?: return - val superClassDescriptor = classDescriptor.getSuperClassNotAny() ?: return - if (superClassDescriptor.modality != Modality.SEALED) return - rootClassDescriptor = superClassDescriptor - rootClass = rootClassDescriptor.source.getPsi() as? KtClass ?: return - } - - val subclasses = rootClassDescriptor.sealedSubclasses.mapNotNull { it.source.getPsi() } - if (subclasses.isEmpty()) continue - - visited.add(rootClass) - visited.addAll(subclasses) - - if (isToBeMoved(rootClass) && subclasses.all { isToBeMoved(it) }) continue - - val message = if (elementToMove == rootClass) { - KotlinBundle.message("text.sealed.class.0.must.be.moved.with.all.its.subclasses", rootClass.name.toString()) - } else { - val type = ElementDescriptionUtil.getElementDescription(elementToMove, UsageViewTypeLocation.INSTANCE).capitalize() - KotlinBundle.message( - "text.0.1.must.be.moved.with.sealed.parent.class.and.all.its.subclasses", - type, - rootClass.name.toString() - ) - } - conflicts.putValue(elementToMove, message) + hierarchyChecker.reportIfMoveIsDestructive(elementToMove)?.let { conflicts.putValue(elementToMove, it) } } } @@ -666,6 +643,149 @@ class MoveConflictChecker( checkSealedClassMove(conflicts) checkNameClashes(conflicts) } + + + private inner class SealedHierarchyChecker { + + private val visited: MutableSet = mutableSetOf() + + @OptIn(ExperimentalStdlibApi::class) + fun reportIfMoveIsDestructive(classToMove: KtClassOrObject): String? { + val classToMoveDesc = classToMove.resolveToDescriptorIfAny() ?: return null + if (classToMoveDesc in visited) return null + + val directSealedParents = classToMoveDesc.listDirectSealedParents() + + // Not a part of sealed hierarchy? + if (!classToMoveDesc.isSealed() && directSealedParents.isEmpty()) + return null + + // Standalone sealed class: no sealed parents, no subclasses? + if (classToMoveDesc.isSealed() && directSealedParents.isEmpty() && classToMoveDesc.listAllSubclasses().isEmpty()) + return null + + // Ok, we're dealing with sealed hierarchy member + val otherHierarchyMembers = classToMoveDesc.listSealedHierarchyMembers().apply { remove(classToMove) } + assert(otherHierarchyMembers.isNotEmpty()) + + // Entire hierarchy is to be moved at once? + if (otherHierarchyMembers.all { isToBeMoved(it) }) + return null + + // Hierarchy might be split (broken) (members reside in different packages) and we shouldn't prevent intention to fix it. + // That is why it's ok to move the class to a package where at least one member of hierarchy resides. In case the hierarchy is + // fully correct all its members share the same package. + + val targetModule = moveTarget.getTargetModule(project) ?: return null + val targetPackage = moveTarget.getTargetPackage() ?: return null + + val className = classToMove.nameAsSafeName.asString() + + if (otherHierarchyMembers.none { it.residesIn(targetModule, targetPackage) }) { + val hierarchyMembers = buildList { add(classToMove); addAll(otherHierarchyMembers) }.toNamesList() + return KotlinBundle.message( + "text.sealed.broken.hierarchy.none.in.target", + className, moveTarget.getPackageName(), targetModule.name, hierarchyMembers + ) + } + + // Ok, class joins at least one member of the hierarchy. But probably it leaves the package where other members still exist. + // It doesn't mean we should prevent such move but it might be good for the user to be aware of the situation. + + val moduleToMoveFrom = classToMove.module ?: return null + val packageToMoveFrom = classToMoveDesc.findPsiPackage(moduleToMoveFrom) ?: return null + + val membersRemainingInOriginalPackage = + otherHierarchyMembers.filter { it.residesIn(moduleToMoveFrom, packageToMoveFrom) && !isToBeMoved(it) }.toList() + + if ((targetPackage != packageToMoveFrom || targetModule != moduleToMoveFrom) && + membersRemainingInOriginalPackage.any { !isToBeMoved(it) } + ) { + return KotlinBundle.message( + "text.sealed.broken.hierarchy.still.in.source", + className, packageToMoveFrom.getNameOrDefault(), moduleToMoveFrom.name, membersRemainingInOriginalPackage.toNamesList() + ) + } + + return null + } + + private fun KtClassOrObject.residesIn(targetModule: Module, targetPackage: PsiPackage): Boolean { + val myModule = module ?: return false + val myPackage = descriptor?.findPsiPackage(myModule) + return myPackage == targetPackage && myModule == targetModule + } + + private fun DeclarationDescriptor.findPsiPackage(module: Module): PsiPackage? { + val fqName = findPackage().fqName + return KotlinJavaPsiFacade.getInstance(project).findPackage(fqName.asString(), GlobalSearchScope.moduleScope(module)) + } + + private fun KotlinMoveTarget.getTargetPackage(): PsiPackage? { + + fun tryGetPackageFromTargetContainer(): PsiPackage? { + val fqName = targetContainerFqName ?: return null + val module = getTargetModule(project) ?: return null + return KotlinJavaPsiFacade.getInstance(project).findPackage(fqName.asString(), GlobalSearchScope.moduleScope(module)) + } + + return (this as? KotlinDirectoryBasedMoveTarget)?.directory?.getPackage() + ?: targetFile?.toPsiDirectory(project)?.getPackage() + ?: targetFile?.toPsiFile(project)?.containingDirectory?.getPackage() + ?: tryGetPackageFromTargetContainer() + } + + private fun KotlinMoveTarget.getPackageName(): String = + targetContainerFqName?.asString()?.takeIf { it.isNotEmpty() } ?: "default" // PsiPackage might not exist by this moment + + private fun PsiPackage?.getNameOrDefault(): String = this?.qualifiedName?.takeIf { it.isNotEmpty() } ?: "default" + + @OptIn(ExperimentalStdlibApi::class) + private fun ClassDescriptor.listDirectSealedParents(): List = buildList { + getSuperClassNotAny()?.takeIf { it.isSealed() }?.let { this.add(it) } + getSuperInterfaces().filter { it.isSealed() }.let { this.addAll(it) } + } + + private fun ClassDescriptor.listAllSubclasses(): List { + val sealedKtClass = findPsi() as? KtClassOrObject ?: return emptyList() + val lightClass = sealedKtClass.toLightClass() ?: return emptyList() + val searchScope = GlobalSearchScope.projectScope(sealedKtClass.project) + val searchParameters = SearchParameters(lightClass, searchScope, false, true, false) + + return ClassInheritorsSearch.search(searchParameters) + .map mapper@{ + val resolutionFacade = it.javaResolutionFacade() ?: return@mapper null + it.resolveToDescriptor(resolutionFacade) + }.filterNotNull() + .sortedBy(ClassDescriptor::getName) + } + + private fun ClassDescriptor.listSealedHierarchyMembers(): MutableList { + + fun ClassDescriptor.listMembersInternal(members: MutableList) { + val alreadyVisited = !visited.add(this) + if (alreadyVisited) return + + if (isSealed()) { + members.add(this) + listDirectSealedParents().forEach { it.listMembersInternal(members) } + listAllSubclasses().forEach { it.listMembersInternal(members) } + } else { + val directSuperSealed = listDirectSealedParents() + if (directSuperSealed.isNotEmpty()) { + members.add(this) + directSuperSealed.forEach { it.listMembersInternal(members) } + } + } + } + + val members = mutableListOf() + listMembersInternal(members) + return members.mapNotNull { it.findPsi() as? KtClassOrObject }.toMutableList() + } + + private fun List.toNamesList(): List = mapNotNull { el -> el.getKotlinFqName()?.asString() }.toList() + } } fun analyzeConflictsInFile( diff --git a/idea/src/org/jetbrains/kotlin/idea/search/declarationsSearch/overridersSearchUtils.kt b/idea/src/org/jetbrains/kotlin/idea/search/declarationsSearch/overridersSearchUtils.kt index a079732fea7..400d7bb129b 100644 --- a/idea/src/org/jetbrains/kotlin/idea/search/declarationsSearch/overridersSearchUtils.kt +++ b/idea/src/org/jetbrains/kotlin/idea/search/declarationsSearch/overridersSearchUtils.kt @@ -13,7 +13,7 @@ import org.jetbrains.kotlin.asJava.* import org.jetbrains.kotlin.descriptors.CallableMemberDescriptor import org.jetbrains.kotlin.descriptors.ClassDescriptor import org.jetbrains.kotlin.descriptors.isOverridable -import org.jetbrains.kotlin.idea.caches.lightClasses.KtFakeLightMethod +import org.jetbrains.kotlin.asJava.classes.KtFakeLightMethod import org.jetbrains.kotlin.idea.caches.resolve.resolveToDescriptorIfAny import org.jetbrains.kotlin.idea.caches.resolve.unsafeResolveToDescriptor import org.jetbrains.kotlin.idea.codeInsight.DescriptorToSourceUtilsIde diff --git a/idea/src/org/jetbrains/kotlin/idea/search/ideaExtensions/KotlinDirectInheritorsSearcher.kt b/idea/src/org/jetbrains/kotlin/idea/search/ideaExtensions/KotlinDirectInheritorsSearcher.kt index af0afe6d7f4..9f840991110 100644 --- a/idea/src/org/jetbrains/kotlin/idea/search/ideaExtensions/KotlinDirectInheritorsSearcher.kt +++ b/idea/src/org/jetbrains/kotlin/idea/search/ideaExtensions/KotlinDirectInheritorsSearcher.kt @@ -23,7 +23,8 @@ import com.intellij.psi.search.GlobalSearchScope import com.intellij.psi.search.searches.DirectClassInheritorsSearch import com.intellij.util.Processor import org.jetbrains.kotlin.asJava.toLightClassWithBuiltinMapping -import org.jetbrains.kotlin.idea.caches.lightClasses.KtFakeLightClass +import org.jetbrains.kotlin.asJava.classes.KtFakeLightClass +import org.jetbrains.kotlin.asJava.toFakeLightClass import org.jetbrains.kotlin.idea.search.fileScope import org.jetbrains.kotlin.idea.stubindex.KotlinSourceFilterScope import org.jetbrains.kotlin.idea.stubindex.KotlinSuperClassIndex @@ -64,7 +65,7 @@ open class KotlinDirectInheritorsSearcher : QueryExecutorBase KotlinSuperClassIndex.getInstance() .get(name, baseClass.project, noLibrarySourceScope).asSequence() - .mapNotNull { candidate -> candidate.toLightClassWithBuiltinMapping() ?: KtFakeLightClass(candidate) } + .mapNotNull { candidate -> candidate.toLightClassWithBuiltinMapping() ?: candidate.toFakeLightClass() } .filter { candidate -> candidate.isInheritor(baseClass, false) } .forEach { candidate -> consumer.process(candidate) } } diff --git a/idea/testData/checker/AnnotationSupressing.kt b/idea/testData/checker/AnnotationSupressing.kt new file mode 100644 index 00000000000..7fe305fc5b1 --- /dev/null +++ b/idea/testData/checker/AnnotationSupressing.kt @@ -0,0 +1,32 @@ +annotation class A(val i: Int) +annotation class Z(val i: Int) + +@Z("BAD") @Suppress("TYPE_MISMATCH") +fun some0() {} + +@Z("BAD") @Z("BAD") @Suppress("TYPE_MISMATCH") +fun some01() {} + +@Suppress("TYPE_MISMATCH") @Z("BAD") +fun some1() { +} + +@Suppress("TYPE_MISMATCH") @Z("BAD") @Z("BAD") +fun some11() { +} + +@A("BAD") @Suppress("TYPE_MISMATCH") +fun some2() { +} + +@Suppress("TYPE_MISMATCH") @A("BAD") +fun some3() { +} + +@A("BAD") @A("BAD") +fun some4() { +} + +@Z("BAD") +fun someN() { +} diff --git a/idea/testData/checker/JvmStaticUsagesRuntime.kt b/idea/testData/checker/JvmStaticUsagesRuntime.kt index b703a912be2..0232e2efcbf 100644 --- a/idea/testData/checker/JvmStaticUsagesRuntime.kt +++ b/idea/testData/checker/JvmStaticUsagesRuntime.kt @@ -31,7 +31,7 @@ class A { @JvmStatic interface B { companion object { - @JvmStatic fun a1() { + @JvmStatic fun a1() { } } diff --git a/idea/testData/codeInsight/overrideImplement/jdk8/overrideCollectionStream.kt.after b/idea/testData/codeInsight/overrideImplement/jdk8/overrideCollectionStream.kt.after index 40ba4e99cd2..0a11604d3fa 100644 --- a/idea/testData/codeInsight/overrideImplement/jdk8/overrideCollectionStream.kt.after +++ b/idea/testData/codeInsight/overrideImplement/jdk8/overrideCollectionStream.kt.after @@ -1,4 +1,3 @@ -// ERROR: Super calls to Java default methods are prohibited in JVM target 1.6. Recompile with '-jvm-target 1.8' import java.util.stream.Stream abstract class A : List { diff --git a/idea/testData/findUsages/kotlin/findClassUsages/javaDerivedClassUsages1.0.kt b/idea/testData/findUsages/kotlin/findClassUsages/javaDerivedClassUsages1.0.kt index a1ae90b3505..15296746f2b 100644 --- a/idea/testData/findUsages/kotlin/findClassUsages/javaDerivedClassUsages1.0.kt +++ b/idea/testData/findUsages/kotlin/findClassUsages/javaDerivedClassUsages1.0.kt @@ -16,4 +16,5 @@ interface Z: A { } -// DISABLE-ERRORS \ No newline at end of file +// DISABLE-ERRORS +// FIR_COMPARISON \ No newline at end of file diff --git a/idea/testData/fir/lazyResolve/import/foo/main.txt b/idea/testData/fir/lazyResolve/import/foo/main.txt index 74b0e15ee36..386af2d81b2 100644 --- a/idea/testData/fir/lazyResolve/import/foo/main.txt +++ b/idea/testData/fir/lazyResolve/import/foo/main.txt @@ -1,4 +1,4 @@ FILE: main.kt - public? final? [RAW_FIR] fun foofoo(): Int { + public? final? [TYPES] fun foofoo(): R|kotlin/Int| { ^foofoo barbar#() } diff --git a/idea/testData/highlighter/NamedArguments.kt b/idea/testData/highlighter/NamedArguments.kt index e9f10daffb8..1cdf62e521c 100644 --- a/idea/testData/highlighter/NamedArguments.kt +++ b/idea/testData/highlighter/NamedArguments.kt @@ -1,8 +1,8 @@ -@Suppress(names = ["foo"]) -fun foo(p1: Int, p2: String): String { - return p2 + p1 +@Suppress(names = ["foo"]) +fun foo(p1: Int, p2: String): String { + return p2 + p1 } -fun bar() { - foo(1, p2 = "") -} +fun bar() { + foo(1, p2 = "") +} \ No newline at end of file diff --git a/idea/testData/multiplatform/platformDependencyInCommon/common/common.kt b/idea/testData/multiplatform/platformDependencyInCommon/common/common.kt new file mode 100644 index 00000000000..0f9a358d089 --- /dev/null +++ b/idea/testData/multiplatform/platformDependencyInCommon/common/common.kt @@ -0,0 +1,6 @@ +fun checkCloneableIsAbsent(array: Array) { + array.clone() +} + +@Metadata +class MetaUnresolved diff --git a/idea/testData/multiplatform/platformDependencyInCommon/dependencies.txt b/idea/testData/multiplatform/platformDependencyInCommon/dependencies.txt new file mode 100644 index 00000000000..1051b81e248 --- /dev/null +++ b/idea/testData/multiplatform/platformDependencyInCommon/dependencies.txt @@ -0,0 +1,10 @@ +// See KT-44638 + +MODULE jvm { platform=[JVM] } +MODULE js { platform=[JS] } +MODULE common { platform=[JVM, JS] } + +jvm -> STDLIB_JVM, MOCK_JDK { kind=DEPENDENCY } +js -> STDLIB_JS { kind=DEPENDENCY } +common -> STDLIB_COMMON, STDLIB_JVM { kind=DEPENDENCY } +jvm -> common { kind=DEPENDS_ON } diff --git a/idea/testData/multiplatform/platformDependencyInCommon/js/js.kt b/idea/testData/multiplatform/platformDependencyInCommon/js/js.kt new file mode 100644 index 00000000000..0f9a358d089 --- /dev/null +++ b/idea/testData/multiplatform/platformDependencyInCommon/js/js.kt @@ -0,0 +1,6 @@ +fun checkCloneableIsAbsent(array: Array) { + array.clone() +} + +@Metadata +class MetaUnresolved diff --git a/idea/testData/multiplatform/platformDependencyInCommon/jvm/jvm.kt b/idea/testData/multiplatform/platformDependencyInCommon/jvm/jvm.kt new file mode 100644 index 00000000000..9b401605271 --- /dev/null +++ b/idea/testData/multiplatform/platformDependencyInCommon/jvm/jvm.kt @@ -0,0 +1,6 @@ +fun checkCloneable(array: Array) { + array.clone() +} + +@Metadata +class MetaWithError diff --git a/idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/sealedClassWithSkippedSubclasses/after/source/Foo.kt b/idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/sealedClassWithSkippedSubclasses/after/source/Foo.kt deleted file mode 100644 index 2158e3ba303..00000000000 --- a/idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/sealedClassWithSkippedSubclasses/after/source/Foo.kt +++ /dev/null @@ -1,7 +0,0 @@ -package source - -import target.Expr - -data class Const(val number: Double) : Expr() -data class Sum(val e1: Expr, val e2: Expr) : Expr() -object NotANumber : Expr() \ No newline at end of file diff --git a/idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/sealedClassWithSkippedSubclasses/after/source/dummy.txt b/idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/sealedClassWithSkippedSubclasses/after/source/dummy.txt deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/sealedClassWithSkippedSubclasses/after/target/Expr.kt b/idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/sealedClassWithSkippedSubclasses/after/target/Expr.kt deleted file mode 100644 index 2e47c77daa5..00000000000 --- a/idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/sealedClassWithSkippedSubclasses/after/target/Expr.kt +++ /dev/null @@ -1,3 +0,0 @@ -package target - -sealed class Expr \ No newline at end of file diff --git a/idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/sealedClassWithSkippedSubclasses/before/source/Foo.kt b/idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/sealedClassWithSkippedSubclasses/before/source/Foo.kt deleted file mode 100644 index 5cb14c9b97f..00000000000 --- a/idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/sealedClassWithSkippedSubclasses/before/source/Foo.kt +++ /dev/null @@ -1,6 +0,0 @@ -package source - -sealed class Expr -data class Const(val number: Double) : Expr() -data class Sum(val e1: Expr, val e2: Expr) : Expr() -object NotANumber : Expr() \ No newline at end of file diff --git a/idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/sealedClassWithSkippedSubclasses/before/source/dummy.txt b/idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/sealedClassWithSkippedSubclasses/before/source/dummy.txt deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/sealedClassWithSkippedSubclasses/conflicts.txt b/idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/sealedClassWithSkippedSubclasses/conflicts.txt deleted file mode 100644 index 756eb0a8202..00000000000 --- a/idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/sealedClassWithSkippedSubclasses/conflicts.txt +++ /dev/null @@ -1 +0,0 @@ -Sealed class 'Expr' must be moved with all its subclasses diff --git a/idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/sealedClassWithSkippedSubclasses/sealedClassWithSkippedSubclasses.test b/idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/sealedClassWithSkippedSubclasses/sealedClassWithSkippedSubclasses.test deleted file mode 100644 index 1a649bb5efc..00000000000 --- a/idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/sealedClassWithSkippedSubclasses/sealedClassWithSkippedSubclasses.test +++ /dev/null @@ -1,5 +0,0 @@ -{ - "mainFile": "source/Foo.kt", - "type": "MOVE_KOTLIN_TOP_LEVEL_DECLARATIONS", - "targetPackage": "target" -} diff --git a/idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/sealedSubclassWithSkippedRoot/after/source/Foo.kt b/idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/sealedSubclassWithSkippedRoot/after/source/Foo.kt deleted file mode 100644 index bf5d08ed03c..00000000000 --- a/idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/sealedSubclassWithSkippedRoot/after/source/Foo.kt +++ /dev/null @@ -1,5 +0,0 @@ -package source - -sealed class Expr -data class Sum(val e1: Expr, val e2: Expr) : Expr() -object NotANumber : Expr() \ No newline at end of file diff --git a/idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/sealedSubclassWithSkippedRoot/after/source/dummy.txt b/idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/sealedSubclassWithSkippedRoot/after/source/dummy.txt deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/sealedSubclassWithSkippedRoot/after/target/Const.kt b/idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/sealedSubclassWithSkippedRoot/after/target/Const.kt deleted file mode 100644 index b129fc50628..00000000000 --- a/idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/sealedSubclassWithSkippedRoot/after/target/Const.kt +++ /dev/null @@ -1,5 +0,0 @@ -package target - -import source.Expr - -data class Const(val number: Double) : Expr() \ No newline at end of file diff --git a/idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/sealedSubclassWithSkippedRoot/before/source/Foo.kt b/idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/sealedSubclassWithSkippedRoot/before/source/Foo.kt deleted file mode 100644 index 737027eefe1..00000000000 --- a/idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/sealedSubclassWithSkippedRoot/before/source/Foo.kt +++ /dev/null @@ -1,6 +0,0 @@ -package source - -sealed class Expr -data class Const(val number: Double) : Expr() -data class Sum(val e1: Expr, val e2: Expr) : Expr() -object NotANumber : Expr() \ No newline at end of file diff --git a/idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/sealedSubclassWithSkippedRoot/before/source/dummy.txt b/idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/sealedSubclassWithSkippedRoot/before/source/dummy.txt deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/sealedSubclassWithSkippedRoot/conflicts.txt b/idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/sealedSubclassWithSkippedRoot/conflicts.txt deleted file mode 100644 index 08ad262dd99..00000000000 --- a/idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/sealedSubclassWithSkippedRoot/conflicts.txt +++ /dev/null @@ -1 +0,0 @@ -Class 'Expr' must be moved with sealed parent class and all its subclasses diff --git a/idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/sealedSubclassWithSkippedRoot/sealedSubclassWithSkippedRoot.test b/idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/sealedSubclassWithSkippedRoot/sealedSubclassWithSkippedRoot.test deleted file mode 100644 index 1a649bb5efc..00000000000 --- a/idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/sealedSubclassWithSkippedRoot/sealedSubclassWithSkippedRoot.test +++ /dev/null @@ -1,5 +0,0 @@ -{ - "mainFile": "source/Foo.kt", - "type": "MOVE_KOTLIN_TOP_LEVEL_DECLARATIONS", - "targetPackage": "target" -} diff --git a/idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/moveSealedClassWithImplsToAnotherPackage/after/bar/SealedClass.kt b/idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/moveSealedClassWithImplsToAnotherPackage/after/bar/SealedClass.kt deleted file mode 100644 index 2994bf4dd8f..00000000000 --- a/idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/moveSealedClassWithImplsToAnotherPackage/after/bar/SealedClass.kt +++ /dev/null @@ -1,5 +0,0 @@ -package bar - -public sealed class SealedClass { - public class Impl1 : SealedClass() {} -} \ No newline at end of file diff --git a/idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/moveSealedClassWithImplsToAnotherPackage/after/foo/KotlinReferences.kt b/idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/moveSealedClassWithImplsToAnotherPackage/after/foo/KotlinReferences.kt deleted file mode 100644 index a5105b77f32..00000000000 --- a/idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/moveSealedClassWithImplsToAnotherPackage/after/foo/KotlinReferences.kt +++ /dev/null @@ -1,5 +0,0 @@ -package foo - -import bar.SealedClass - -val v = SealedClass::Impl1 \ No newline at end of file diff --git a/idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/moveSealedClassWithImplsToAnotherPackage/after/foo/SealedClass.kt b/idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/moveSealedClassWithImplsToAnotherPackage/after/foo/SealedClass.kt deleted file mode 100644 index 18534fbbc34..00000000000 --- a/idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/moveSealedClassWithImplsToAnotherPackage/after/foo/SealedClass.kt +++ /dev/null @@ -1,5 +0,0 @@ -package foo - -import bar.SealedClass - -public class Impl2 : SealedClass() {} \ No newline at end of file diff --git a/idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/moveSealedClassWithImplsToAnotherPackage/before/foo/KotlinReferences.kt b/idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/moveSealedClassWithImplsToAnotherPackage/before/foo/KotlinReferences.kt deleted file mode 100644 index 84b14682a40..00000000000 --- a/idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/moveSealedClassWithImplsToAnotherPackage/before/foo/KotlinReferences.kt +++ /dev/null @@ -1,3 +0,0 @@ -package foo - -val v = SealedClass::Impl1 \ No newline at end of file diff --git a/idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/moveSealedClassWithImplsToAnotherPackage/before/foo/SealedClass.kt b/idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/moveSealedClassWithImplsToAnotherPackage/before/foo/SealedClass.kt deleted file mode 100644 index f7e9572c67b..00000000000 --- a/idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/moveSealedClassWithImplsToAnotherPackage/before/foo/SealedClass.kt +++ /dev/null @@ -1,7 +0,0 @@ -package foo - -public sealed class SealedClass { - public class Impl1 : SealedClass() {} -} - -public class Impl2 : SealedClass() {} \ No newline at end of file diff --git a/idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/moveSealedClassWithImplsToAnotherPackage/conflicts.txt b/idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/moveSealedClassWithImplsToAnotherPackage/conflicts.txt deleted file mode 100644 index 4e6bd3f2df2..00000000000 --- a/idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/moveSealedClassWithImplsToAnotherPackage/conflicts.txt +++ /dev/null @@ -1 +0,0 @@ -Sealed class 'SealedClass' must be moved with all its subclasses diff --git a/idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/moveSealedClassWithImplsToAnotherPackage/moveSealedClassWithNestedImplsToAnotherPackage.test b/idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/moveSealedClassWithImplsToAnotherPackage/moveSealedClassWithNestedImplsToAnotherPackage.test deleted file mode 100644 index 75e06c3b8e6..00000000000 --- a/idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/moveSealedClassWithImplsToAnotherPackage/moveSealedClassWithNestedImplsToAnotherPackage.test +++ /dev/null @@ -1,5 +0,0 @@ -{ - "mainFile": "foo/SealedClass.kt", - "type": "MOVE_KOTLIN_TOP_LEVEL_DECLARATIONS", - "targetPackage": "bar" -} \ No newline at end of file diff --git a/idea/testData/refactoring/moveMultiModule/moveSealedCheckEntireHierarchy/after/A/A.iml b/idea/testData/refactoring/moveMultiModule/moveSealedCheckEntireHierarchy/after/A/A.iml new file mode 100644 index 00000000000..c90834f2d60 --- /dev/null +++ b/idea/testData/refactoring/moveMultiModule/moveSealedCheckEntireHierarchy/after/A/A.iml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/idea/testData/refactoring/moveMultiModule/moveSealedCheckEntireHierarchy/after/A/src/other/SealedHierarchy.kt b/idea/testData/refactoring/moveMultiModule/moveSealedCheckEntireHierarchy/after/A/src/other/SealedHierarchy.kt new file mode 100644 index 00000000000..73b5111042c --- /dev/null +++ b/idea/testData/refactoring/moveMultiModule/moveSealedCheckEntireHierarchy/after/A/src/other/SealedHierarchy.kt @@ -0,0 +1,6 @@ +package other + +sealed interface SealedInterfaceA +sealed interface SealedInterfaceB +sealed class HierarchyClassA: SealedInterfaceA, SealedInterfaceB +class NonSealedButMember: HierarchyClassA() \ No newline at end of file diff --git a/idea/testData/refactoring/moveMultiModule/moveSealedCheckEntireHierarchy/after/A/src/sealed/SealedHierarchy.kt b/idea/testData/refactoring/moveMultiModule/moveSealedCheckEntireHierarchy/after/A/src/sealed/SealedHierarchy.kt new file mode 100644 index 00000000000..9ecbe99d9e5 --- /dev/null +++ b/idea/testData/refactoring/moveMultiModule/moveSealedCheckEntireHierarchy/after/A/src/sealed/SealedHierarchy.kt @@ -0,0 +1,2 @@ +package sealed + diff --git a/idea/testData/refactoring/moveMultiModule/moveSealedCheckEntireHierarchy/before/A/A.iml b/idea/testData/refactoring/moveMultiModule/moveSealedCheckEntireHierarchy/before/A/A.iml new file mode 100644 index 00000000000..c90834f2d60 --- /dev/null +++ b/idea/testData/refactoring/moveMultiModule/moveSealedCheckEntireHierarchy/before/A/A.iml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/idea/testData/refactoring/moveMultiModule/moveSealedCheckEntireHierarchy/before/A/src/sealed/SealedHierarchy.kt b/idea/testData/refactoring/moveMultiModule/moveSealedCheckEntireHierarchy/before/A/src/sealed/SealedHierarchy.kt new file mode 100644 index 00000000000..452c384ab76 --- /dev/null +++ b/idea/testData/refactoring/moveMultiModule/moveSealedCheckEntireHierarchy/before/A/src/sealed/SealedHierarchy.kt @@ -0,0 +1,7 @@ +package sealed + +sealed interface SealedInterfaceA +sealed interface SealedInterfaceB + +sealed class HierarchyClassA: SealedInterfaceA, SealedInterfaceB +class NonSealedButMember: HierarchyClassA() \ No newline at end of file diff --git a/idea/testData/refactoring/moveMultiModule/moveSealedCheckEntireHierarchy/moveSealedCheckEntireHierarchy.test b/idea/testData/refactoring/moveMultiModule/moveSealedCheckEntireHierarchy/moveSealedCheckEntireHierarchy.test new file mode 100644 index 00000000000..fe8f7b0209a --- /dev/null +++ b/idea/testData/refactoring/moveMultiModule/moveSealedCheckEntireHierarchy/moveSealedCheckEntireHierarchy.test @@ -0,0 +1,7 @@ +{ + "mainFile": "A/src/sealed/SealedHierarchy.kt", + "type": "MOVE_KOTLIN_TOP_LEVEL_DECLARATIONS", + "targetPackage": "other", + "targetSourceRoot": "A/src", + "withRuntime": "false" +} diff --git a/idea/testData/refactoring/moveMultiModule/moveSealedCheckNotMember/after/A/A.iml b/idea/testData/refactoring/moveMultiModule/moveSealedCheckNotMember/after/A/A.iml new file mode 100644 index 00000000000..c90834f2d60 --- /dev/null +++ b/idea/testData/refactoring/moveMultiModule/moveSealedCheckNotMember/after/A/A.iml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/idea/testData/refactoring/moveMultiModule/moveSealedCheckNotMember/after/A/src/other/NotSealedHierarchyMember.kt b/idea/testData/refactoring/moveMultiModule/moveSealedCheckNotMember/after/A/src/other/NotSealedHierarchyMember.kt new file mode 100644 index 00000000000..c2aef401748 --- /dev/null +++ b/idea/testData/refactoring/moveMultiModule/moveSealedCheckNotMember/after/A/src/other/NotSealedHierarchyMember.kt @@ -0,0 +1,5 @@ +package other + +import sealed.DerivedFromSealed + +class NotSealedHierarchyMember: DerivedFromSealed() \ No newline at end of file diff --git a/idea/testData/refactoring/moveMultiModule/moveSealedCheckNotMember/after/A/src/sealed/SealedHierarchy.kt b/idea/testData/refactoring/moveMultiModule/moveSealedCheckNotMember/after/A/src/sealed/SealedHierarchy.kt new file mode 100644 index 00000000000..50c4d7e8309 --- /dev/null +++ b/idea/testData/refactoring/moveMultiModule/moveSealedCheckNotMember/after/A/src/sealed/SealedHierarchy.kt @@ -0,0 +1,7 @@ +package sealed + +sealed interface SealedInterfaceA +sealed interface SealedInterfaceB + +sealed class HierarchySealedClass: SealedInterfaceA, SealedInterfaceB +class DerivedFromSealed: HierarchySealedClass() diff --git a/idea/testData/refactoring/moveMultiModule/moveSealedCheckNotMember/before/A/A.iml b/idea/testData/refactoring/moveMultiModule/moveSealedCheckNotMember/before/A/A.iml new file mode 100644 index 00000000000..c90834f2d60 --- /dev/null +++ b/idea/testData/refactoring/moveMultiModule/moveSealedCheckNotMember/before/A/A.iml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/idea/testData/refactoring/moveMultiModule/moveSealedCheckNotMember/before/A/src/sealed/SealedHierarchy.kt b/idea/testData/refactoring/moveMultiModule/moveSealedCheckNotMember/before/A/src/sealed/SealedHierarchy.kt new file mode 100644 index 00000000000..04224b0a90d --- /dev/null +++ b/idea/testData/refactoring/moveMultiModule/moveSealedCheckNotMember/before/A/src/sealed/SealedHierarchy.kt @@ -0,0 +1,8 @@ +package sealed + +sealed interface SealedInterfaceA +sealed interface SealedInterfaceB + +sealed class HierarchySealedClass: SealedInterfaceA, SealedInterfaceB +class DerivedFromSealed: HierarchySealedClass() +class NotSealedHierarchyMember: DerivedFromSealed() \ No newline at end of file diff --git a/idea/testData/refactoring/moveMultiModule/moveSealedCheckNotMember/moveSealedCheckNotMember.test b/idea/testData/refactoring/moveMultiModule/moveSealedCheckNotMember/moveSealedCheckNotMember.test new file mode 100644 index 00000000000..fe8f7b0209a --- /dev/null +++ b/idea/testData/refactoring/moveMultiModule/moveSealedCheckNotMember/moveSealedCheckNotMember.test @@ -0,0 +1,7 @@ +{ + "mainFile": "A/src/sealed/SealedHierarchy.kt", + "type": "MOVE_KOTLIN_TOP_LEVEL_DECLARATIONS", + "targetPackage": "other", + "targetSourceRoot": "A/src", + "withRuntime": "false" +} diff --git a/idea/testData/refactoring/moveMultiModule/moveSealedCheckOriginalPackageHasMember/after/A/A.iml b/idea/testData/refactoring/moveMultiModule/moveSealedCheckOriginalPackageHasMember/after/A/A.iml new file mode 100644 index 00000000000..c90834f2d60 --- /dev/null +++ b/idea/testData/refactoring/moveMultiModule/moveSealedCheckOriginalPackageHasMember/after/A/A.iml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/idea/testData/refactoring/moveMultiModule/moveSealedCheckOriginalPackageHasMember/after/A/src/sealedFirst/SealedHierarchyPartA.kt b/idea/testData/refactoring/moveMultiModule/moveSealedCheckOriginalPackageHasMember/after/A/src/sealedFirst/SealedHierarchyPartA.kt new file mode 100644 index 00000000000..a0de0d63bc7 --- /dev/null +++ b/idea/testData/refactoring/moveMultiModule/moveSealedCheckOriginalPackageHasMember/after/A/src/sealedFirst/SealedHierarchyPartA.kt @@ -0,0 +1,3 @@ +package sealedFirst + +sealed interface SealedInterfaceA diff --git a/idea/testData/refactoring/moveMultiModule/moveSealedCheckOriginalPackageHasMember/after/A/src/sealedSecond/HierarchyClassA.kt b/idea/testData/refactoring/moveMultiModule/moveSealedCheckOriginalPackageHasMember/after/A/src/sealedSecond/HierarchyClassA.kt new file mode 100644 index 00000000000..325f24cf791 --- /dev/null +++ b/idea/testData/refactoring/moveMultiModule/moveSealedCheckOriginalPackageHasMember/after/A/src/sealedSecond/HierarchyClassA.kt @@ -0,0 +1,5 @@ +package sealedSecond + +import sealedFirst.SealedInterfaceA + +sealed class HierarchyClassA: SealedInterfaceA, SealedInterfaceB \ No newline at end of file diff --git a/idea/testData/refactoring/moveMultiModule/moveSealedCheckOriginalPackageHasMember/after/A/src/sealedSecond/SealedHierarchyPartB.kt b/idea/testData/refactoring/moveMultiModule/moveSealedCheckOriginalPackageHasMember/after/A/src/sealedSecond/SealedHierarchyPartB.kt new file mode 100644 index 00000000000..f610757add9 --- /dev/null +++ b/idea/testData/refactoring/moveMultiModule/moveSealedCheckOriginalPackageHasMember/after/A/src/sealedSecond/SealedHierarchyPartB.kt @@ -0,0 +1,3 @@ +package sealedSecond + +sealed interface SealedInterfaceB diff --git a/idea/testData/refactoring/moveMultiModule/moveSealedCheckOriginalPackageHasMember/before/A/A.iml b/idea/testData/refactoring/moveMultiModule/moveSealedCheckOriginalPackageHasMember/before/A/A.iml new file mode 100644 index 00000000000..c90834f2d60 --- /dev/null +++ b/idea/testData/refactoring/moveMultiModule/moveSealedCheckOriginalPackageHasMember/before/A/A.iml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/idea/testData/refactoring/moveMultiModule/moveSealedCheckOriginalPackageHasMember/before/A/src/sealedFirst/SealedHierarchyPartA.kt b/idea/testData/refactoring/moveMultiModule/moveSealedCheckOriginalPackageHasMember/before/A/src/sealedFirst/SealedHierarchyPartA.kt new file mode 100644 index 00000000000..1d10daf57b0 --- /dev/null +++ b/idea/testData/refactoring/moveMultiModule/moveSealedCheckOriginalPackageHasMember/before/A/src/sealedFirst/SealedHierarchyPartA.kt @@ -0,0 +1,6 @@ +package sealedFirst + +import sealedSecond.SealedInterfaceB + +sealed interface SealedInterfaceA +sealed class HierarchyClassA: SealedInterfaceA, SealedInterfaceB diff --git a/idea/testData/refactoring/moveMultiModule/moveSealedCheckOriginalPackageHasMember/before/A/src/sealedSecond/SealedHierarchyPartB.kt b/idea/testData/refactoring/moveMultiModule/moveSealedCheckOriginalPackageHasMember/before/A/src/sealedSecond/SealedHierarchyPartB.kt new file mode 100644 index 00000000000..f610757add9 --- /dev/null +++ b/idea/testData/refactoring/moveMultiModule/moveSealedCheckOriginalPackageHasMember/before/A/src/sealedSecond/SealedHierarchyPartB.kt @@ -0,0 +1,3 @@ +package sealedSecond + +sealed interface SealedInterfaceB diff --git a/idea/testData/refactoring/moveMultiModule/moveSealedCheckOriginalPackageHasMember/conflicts.txt b/idea/testData/refactoring/moveMultiModule/moveSealedCheckOriginalPackageHasMember/conflicts.txt new file mode 100644 index 00000000000..ab1702877e1 --- /dev/null +++ b/idea/testData/refactoring/moveMultiModule/moveSealedCheckOriginalPackageHasMember/conflicts.txt @@ -0,0 +1 @@ +Sealed hierarchy of 'HierarchyClassA' would be split. Package 'sealedFirst' of module 'A' would still contain its members: [sealedFirst.SealedInterfaceA]. \ No newline at end of file diff --git a/idea/testData/refactoring/moveMultiModule/moveSealedCheckOriginalPackageHasMember/moveSealedCheckOriginalPackageHasMember.test b/idea/testData/refactoring/moveMultiModule/moveSealedCheckOriginalPackageHasMember/moveSealedCheckOriginalPackageHasMember.test new file mode 100644 index 00000000000..17bdcad937f --- /dev/null +++ b/idea/testData/refactoring/moveMultiModule/moveSealedCheckOriginalPackageHasMember/moveSealedCheckOriginalPackageHasMember.test @@ -0,0 +1,7 @@ +{ + "mainFile": "A/src/sealedFirst/SealedHierarchyPartA.kt", + "type": "MOVE_KOTLIN_TOP_LEVEL_DECLARATIONS", + "targetPackage": "sealedSecond", + "targetSourceRoot": "A/src", + "withRuntime": "false" +} diff --git a/idea/testData/refactoring/moveMultiModule/moveSealedCheckOriginalPackageHasMemberCrossModule/after/A/A.iml b/idea/testData/refactoring/moveMultiModule/moveSealedCheckOriginalPackageHasMemberCrossModule/after/A/A.iml new file mode 100644 index 00000000000..0f75d4273fc --- /dev/null +++ b/idea/testData/refactoring/moveMultiModule/moveSealedCheckOriginalPackageHasMemberCrossModule/after/A/A.iml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/idea/testData/refactoring/moveMultiModule/moveSealedCheckOriginalPackageHasMemberCrossModule/after/A/src/sealed/SealedHierarchy.kt b/idea/testData/refactoring/moveMultiModule/moveSealedCheckOriginalPackageHasMemberCrossModule/after/A/src/sealed/SealedHierarchy.kt new file mode 100644 index 00000000000..54e5f2cde16 --- /dev/null +++ b/idea/testData/refactoring/moveMultiModule/moveSealedCheckOriginalPackageHasMemberCrossModule/after/A/src/sealed/SealedHierarchy.kt @@ -0,0 +1,3 @@ +package sealed + +sealed class HierarchyClassA: SealedInterfaceA, SealedInterfaceB diff --git a/idea/testData/refactoring/moveMultiModule/moveSealedCheckOriginalPackageHasMemberCrossModule/after/B/B.iml b/idea/testData/refactoring/moveMultiModule/moveSealedCheckOriginalPackageHasMemberCrossModule/after/B/B.iml new file mode 100644 index 00000000000..c90834f2d60 --- /dev/null +++ b/idea/testData/refactoring/moveMultiModule/moveSealedCheckOriginalPackageHasMemberCrossModule/after/B/B.iml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/idea/testData/refactoring/moveMultiModule/moveSealedCheckOriginalPackageHasMemberCrossModule/after/B/src/sealed/SealedInterfaceA.kt b/idea/testData/refactoring/moveMultiModule/moveSealedCheckOriginalPackageHasMemberCrossModule/after/B/src/sealed/SealedInterfaceA.kt new file mode 100644 index 00000000000..25d98326be8 --- /dev/null +++ b/idea/testData/refactoring/moveMultiModule/moveSealedCheckOriginalPackageHasMemberCrossModule/after/B/src/sealed/SealedInterfaceA.kt @@ -0,0 +1,3 @@ +package sealed + +sealed interface SealedInterfaceA \ No newline at end of file diff --git a/idea/testData/refactoring/moveMultiModule/moveSealedCheckOriginalPackageHasMemberCrossModule/after/B/src/sealed/SealedInterfaceB.kt b/idea/testData/refactoring/moveMultiModule/moveSealedCheckOriginalPackageHasMemberCrossModule/after/B/src/sealed/SealedInterfaceB.kt new file mode 100644 index 00000000000..458be202c44 --- /dev/null +++ b/idea/testData/refactoring/moveMultiModule/moveSealedCheckOriginalPackageHasMemberCrossModule/after/B/src/sealed/SealedInterfaceB.kt @@ -0,0 +1,3 @@ +package sealed + +sealed interface SealedInterfaceB \ No newline at end of file diff --git a/idea/testData/refactoring/moveMultiModule/moveSealedCheckOriginalPackageHasMemberCrossModule/before/A/A.iml b/idea/testData/refactoring/moveMultiModule/moveSealedCheckOriginalPackageHasMemberCrossModule/before/A/A.iml new file mode 100644 index 00000000000..0f75d4273fc --- /dev/null +++ b/idea/testData/refactoring/moveMultiModule/moveSealedCheckOriginalPackageHasMemberCrossModule/before/A/A.iml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/idea/testData/refactoring/moveMultiModule/moveSealedCheckOriginalPackageHasMemberCrossModule/before/A/src/sealed/SealedHierarchy.kt b/idea/testData/refactoring/moveMultiModule/moveSealedCheckOriginalPackageHasMemberCrossModule/before/A/src/sealed/SealedHierarchy.kt new file mode 100644 index 00000000000..e4c13d4d341 --- /dev/null +++ b/idea/testData/refactoring/moveMultiModule/moveSealedCheckOriginalPackageHasMemberCrossModule/before/A/src/sealed/SealedHierarchy.kt @@ -0,0 +1,4 @@ +package sealed + +sealed interface SealedInterfaceA +sealed class HierarchyClassA: SealedInterfaceA, SealedInterfaceB diff --git a/idea/testData/refactoring/moveMultiModule/moveSealedCheckOriginalPackageHasMemberCrossModule/before/B/B.iml b/idea/testData/refactoring/moveMultiModule/moveSealedCheckOriginalPackageHasMemberCrossModule/before/B/B.iml new file mode 100644 index 00000000000..c90834f2d60 --- /dev/null +++ b/idea/testData/refactoring/moveMultiModule/moveSealedCheckOriginalPackageHasMemberCrossModule/before/B/B.iml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/idea/testData/refactoring/moveMultiModule/moveSealedCheckOriginalPackageHasMemberCrossModule/before/B/src/sealed/SealedInterfaceB.kt b/idea/testData/refactoring/moveMultiModule/moveSealedCheckOriginalPackageHasMemberCrossModule/before/B/src/sealed/SealedInterfaceB.kt new file mode 100644 index 00000000000..458be202c44 --- /dev/null +++ b/idea/testData/refactoring/moveMultiModule/moveSealedCheckOriginalPackageHasMemberCrossModule/before/B/src/sealed/SealedInterfaceB.kt @@ -0,0 +1,3 @@ +package sealed + +sealed interface SealedInterfaceB \ No newline at end of file diff --git a/idea/testData/refactoring/moveMultiModule/moveSealedCheckOriginalPackageHasMemberCrossModule/conflicts.txt b/idea/testData/refactoring/moveMultiModule/moveSealedCheckOriginalPackageHasMemberCrossModule/conflicts.txt new file mode 100644 index 00000000000..bce916d7fc2 --- /dev/null +++ b/idea/testData/refactoring/moveMultiModule/moveSealedCheckOriginalPackageHasMemberCrossModule/conflicts.txt @@ -0,0 +1 @@ +Sealed hierarchy of 'SealedInterfaceA' would be split. Package 'sealed' of module 'A' would still contain its members: [sealed.HierarchyClassA]. \ No newline at end of file diff --git a/idea/testData/refactoring/moveMultiModule/moveSealedCheckOriginalPackageHasMemberCrossModule/moveSealedCheckOriginalPackageHasMemberCrossModule.test b/idea/testData/refactoring/moveMultiModule/moveSealedCheckOriginalPackageHasMemberCrossModule/moveSealedCheckOriginalPackageHasMemberCrossModule.test new file mode 100644 index 00000000000..515ff868809 --- /dev/null +++ b/idea/testData/refactoring/moveMultiModule/moveSealedCheckOriginalPackageHasMemberCrossModule/moveSealedCheckOriginalPackageHasMemberCrossModule.test @@ -0,0 +1,7 @@ +{ + "mainFile": "A/src/sealed/SealedHierarchy.kt", + "type": "MOVE_KOTLIN_TOP_LEVEL_DECLARATIONS", + "targetPackage": "sealed", + "targetSourceRoot": "B/src", + "withRuntime": "false" +} diff --git a/idea/testData/refactoring/moveMultiModule/moveSealedCheckSingleSealed/after/A/A.iml b/idea/testData/refactoring/moveMultiModule/moveSealedCheckSingleSealed/after/A/A.iml new file mode 100644 index 00000000000..c90834f2d60 --- /dev/null +++ b/idea/testData/refactoring/moveMultiModule/moveSealedCheckSingleSealed/after/A/A.iml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/idea/testData/refactoring/moveMultiModule/moveSealedCheckSingleSealed/after/A/src/other/SealedInterfaceA.kt b/idea/testData/refactoring/moveMultiModule/moveSealedCheckSingleSealed/after/A/src/other/SealedInterfaceA.kt new file mode 100644 index 00000000000..afed23756e8 --- /dev/null +++ b/idea/testData/refactoring/moveMultiModule/moveSealedCheckSingleSealed/after/A/src/other/SealedInterfaceA.kt @@ -0,0 +1,3 @@ +package other + +sealed interface SealedInterfaceA \ No newline at end of file diff --git a/idea/testData/refactoring/moveMultiModule/moveSealedCheckSingleSealed/after/A/src/sealed/SealedHierarchy.kt b/idea/testData/refactoring/moveMultiModule/moveSealedCheckSingleSealed/after/A/src/sealed/SealedHierarchy.kt new file mode 100644 index 00000000000..9ecbe99d9e5 --- /dev/null +++ b/idea/testData/refactoring/moveMultiModule/moveSealedCheckSingleSealed/after/A/src/sealed/SealedHierarchy.kt @@ -0,0 +1,2 @@ +package sealed + diff --git a/idea/testData/refactoring/moveMultiModule/moveSealedCheckSingleSealed/before/A/A.iml b/idea/testData/refactoring/moveMultiModule/moveSealedCheckSingleSealed/before/A/A.iml new file mode 100644 index 00000000000..c90834f2d60 --- /dev/null +++ b/idea/testData/refactoring/moveMultiModule/moveSealedCheckSingleSealed/before/A/A.iml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/idea/testData/refactoring/moveMultiModule/moveSealedCheckSingleSealed/before/A/src/sealed/SealedHierarchy.kt b/idea/testData/refactoring/moveMultiModule/moveSealedCheckSingleSealed/before/A/src/sealed/SealedHierarchy.kt new file mode 100644 index 00000000000..89ef43d2f66 --- /dev/null +++ b/idea/testData/refactoring/moveMultiModule/moveSealedCheckSingleSealed/before/A/src/sealed/SealedHierarchy.kt @@ -0,0 +1,3 @@ +package sealed + +sealed interface SealedInterfaceA \ No newline at end of file diff --git a/idea/testData/refactoring/moveMultiModule/moveSealedCheckSingleSealed/moveSealedCheckSingleSealed.test b/idea/testData/refactoring/moveMultiModule/moveSealedCheckSingleSealed/moveSealedCheckSingleSealed.test new file mode 100644 index 00000000000..fe8f7b0209a --- /dev/null +++ b/idea/testData/refactoring/moveMultiModule/moveSealedCheckSingleSealed/moveSealedCheckSingleSealed.test @@ -0,0 +1,7 @@ +{ + "mainFile": "A/src/sealed/SealedHierarchy.kt", + "type": "MOVE_KOTLIN_TOP_LEVEL_DECLARATIONS", + "targetPackage": "other", + "targetSourceRoot": "A/src", + "withRuntime": "false" +} diff --git a/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasMember/after/A/A.iml b/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasMember/after/A/A.iml new file mode 100644 index 00000000000..c90834f2d60 --- /dev/null +++ b/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasMember/after/A/A.iml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasMember/after/A/src/sealedFirst/SealedHierarchyPartA.kt b/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasMember/after/A/src/sealedFirst/SealedHierarchyPartA.kt new file mode 100644 index 00000000000..b58d23470d7 --- /dev/null +++ b/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasMember/after/A/src/sealedFirst/SealedHierarchyPartA.kt @@ -0,0 +1,2 @@ +package sealedFirst + diff --git a/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasMember/after/A/src/sealedSecond/SealedHierarchyPartA.kt b/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasMember/after/A/src/sealedSecond/SealedHierarchyPartA.kt new file mode 100644 index 00000000000..5aeb11b5b39 --- /dev/null +++ b/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasMember/after/A/src/sealedSecond/SealedHierarchyPartA.kt @@ -0,0 +1,4 @@ +package sealedSecond + +sealed interface SealedInterfaceA +sealed class HierarchyClassA: SealedInterfaceA, SealedInterfaceB \ No newline at end of file diff --git a/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasMember/after/A/src/sealedSecond/SealedHierarchyPartB.kt b/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasMember/after/A/src/sealedSecond/SealedHierarchyPartB.kt new file mode 100644 index 00000000000..f610757add9 --- /dev/null +++ b/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasMember/after/A/src/sealedSecond/SealedHierarchyPartB.kt @@ -0,0 +1,3 @@ +package sealedSecond + +sealed interface SealedInterfaceB diff --git a/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasMember/before/A/A.iml b/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasMember/before/A/A.iml new file mode 100644 index 00000000000..c90834f2d60 --- /dev/null +++ b/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasMember/before/A/A.iml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasMember/before/A/src/sealedFirst/SealedHierarchyPartA.kt b/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasMember/before/A/src/sealedFirst/SealedHierarchyPartA.kt new file mode 100644 index 00000000000..af5250c4732 --- /dev/null +++ b/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasMember/before/A/src/sealedFirst/SealedHierarchyPartA.kt @@ -0,0 +1,6 @@ +package sealedFirst + +import sealedSecond.SealedInterfaceB + +sealed interface SealedInterfaceA +sealed class HierarchyClassA: SealedInterfaceA, SealedInterfaceB diff --git a/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasMember/before/A/src/sealedSecond/SealedHierarchyPartB.kt b/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasMember/before/A/src/sealedSecond/SealedHierarchyPartB.kt new file mode 100644 index 00000000000..f610757add9 --- /dev/null +++ b/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasMember/before/A/src/sealedSecond/SealedHierarchyPartB.kt @@ -0,0 +1,3 @@ +package sealedSecond + +sealed interface SealedInterfaceB diff --git a/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasMember/moveSealedCheckTargetPackageHasMember.test b/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasMember/moveSealedCheckTargetPackageHasMember.test new file mode 100644 index 00000000000..17bdcad937f --- /dev/null +++ b/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasMember/moveSealedCheckTargetPackageHasMember.test @@ -0,0 +1,7 @@ +{ + "mainFile": "A/src/sealedFirst/SealedHierarchyPartA.kt", + "type": "MOVE_KOTLIN_TOP_LEVEL_DECLARATIONS", + "targetPackage": "sealedSecond", + "targetSourceRoot": "A/src", + "withRuntime": "false" +} diff --git a/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasMemberCrossModule/after/A/A.iml b/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasMemberCrossModule/after/A/A.iml new file mode 100644 index 00000000000..0f75d4273fc --- /dev/null +++ b/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasMemberCrossModule/after/A/A.iml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasMemberCrossModule/after/A/src/sealed/SealedHierarchy.kt b/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasMemberCrossModule/after/A/src/sealed/SealedHierarchy.kt new file mode 100644 index 00000000000..9ecbe99d9e5 --- /dev/null +++ b/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasMemberCrossModule/after/A/src/sealed/SealedHierarchy.kt @@ -0,0 +1,2 @@ +package sealed + diff --git a/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasMemberCrossModule/after/B/B.iml b/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasMemberCrossModule/after/B/B.iml new file mode 100644 index 00000000000..c90834f2d60 --- /dev/null +++ b/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasMemberCrossModule/after/B/B.iml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasMemberCrossModule/after/B/src/sealed/SealedHierarchy.kt b/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasMemberCrossModule/after/B/src/sealed/SealedHierarchy.kt new file mode 100644 index 00000000000..37f43d3d211 --- /dev/null +++ b/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasMemberCrossModule/after/B/src/sealed/SealedHierarchy.kt @@ -0,0 +1,4 @@ +package sealed + +sealed interface SealedInterfaceA +sealed class HierarchyClassA: SealedInterfaceA, SealedInterfaceB \ No newline at end of file diff --git a/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasMemberCrossModule/after/B/src/sealed/SealedInterfaceB.kt b/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasMemberCrossModule/after/B/src/sealed/SealedInterfaceB.kt new file mode 100644 index 00000000000..458be202c44 --- /dev/null +++ b/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasMemberCrossModule/after/B/src/sealed/SealedInterfaceB.kt @@ -0,0 +1,3 @@ +package sealed + +sealed interface SealedInterfaceB \ No newline at end of file diff --git a/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasMemberCrossModule/before/A/A.iml b/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasMemberCrossModule/before/A/A.iml new file mode 100644 index 00000000000..0f75d4273fc --- /dev/null +++ b/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasMemberCrossModule/before/A/A.iml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasMemberCrossModule/before/A/src/sealed/SealedHierarchy.kt b/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasMemberCrossModule/before/A/src/sealed/SealedHierarchy.kt new file mode 100644 index 00000000000..d544504d39b --- /dev/null +++ b/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasMemberCrossModule/before/A/src/sealed/SealedHierarchy.kt @@ -0,0 +1,4 @@ +package sealed + +sealed interface SealedInterfaceA +sealed class HierarchyClassA: SealedInterfaceA, SealedInterfaceB \ No newline at end of file diff --git a/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasMemberCrossModule/before/B/B.iml b/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasMemberCrossModule/before/B/B.iml new file mode 100644 index 00000000000..c90834f2d60 --- /dev/null +++ b/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasMemberCrossModule/before/B/B.iml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasMemberCrossModule/before/B/src/sealed/SealedInterfaceB.kt b/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasMemberCrossModule/before/B/src/sealed/SealedInterfaceB.kt new file mode 100644 index 00000000000..458be202c44 --- /dev/null +++ b/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasMemberCrossModule/before/B/src/sealed/SealedInterfaceB.kt @@ -0,0 +1,3 @@ +package sealed + +sealed interface SealedInterfaceB \ No newline at end of file diff --git a/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasMemberCrossModule/moveSealedCheckTargetPackageHasMemberCrossModule.test b/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasMemberCrossModule/moveSealedCheckTargetPackageHasMemberCrossModule.test new file mode 100644 index 00000000000..515ff868809 --- /dev/null +++ b/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasMemberCrossModule/moveSealedCheckTargetPackageHasMemberCrossModule.test @@ -0,0 +1,7 @@ +{ + "mainFile": "A/src/sealed/SealedHierarchy.kt", + "type": "MOVE_KOTLIN_TOP_LEVEL_DECLARATIONS", + "targetPackage": "sealed", + "targetSourceRoot": "B/src", + "withRuntime": "false" +} diff --git a/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasNoMembers/after/A/A.iml b/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasNoMembers/after/A/A.iml new file mode 100644 index 00000000000..c90834f2d60 --- /dev/null +++ b/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasNoMembers/after/A/A.iml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasNoMembers/after/A/src/another/HierarchyClassA.kt b/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasNoMembers/after/A/src/another/HierarchyClassA.kt new file mode 100644 index 00000000000..f152b317ae7 --- /dev/null +++ b/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasNoMembers/after/A/src/another/HierarchyClassA.kt @@ -0,0 +1,6 @@ +package another + +import sealed.SealedInterfaceA +import sealed.SealedInterfaceB + +class HierarchyClassA: SealedInterfaceA, SealedInterfaceB \ No newline at end of file diff --git a/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasNoMembers/after/A/src/sealed/SealedHierarchy.kt b/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasNoMembers/after/A/src/sealed/SealedHierarchy.kt new file mode 100644 index 00000000000..fa0ed5cda51 --- /dev/null +++ b/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasNoMembers/after/A/src/sealed/SealedHierarchy.kt @@ -0,0 +1,5 @@ +package sealed + +sealed interface SealedInterfaceA +sealed interface SealedInterfaceB + diff --git a/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasNoMembers/before/A/A.iml b/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasNoMembers/before/A/A.iml new file mode 100644 index 00000000000..c90834f2d60 --- /dev/null +++ b/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasNoMembers/before/A/A.iml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasNoMembers/before/A/src/sealed/SealedHierarchy.kt b/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasNoMembers/before/A/src/sealed/SealedHierarchy.kt new file mode 100644 index 00000000000..798239246e1 --- /dev/null +++ b/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasNoMembers/before/A/src/sealed/SealedHierarchy.kt @@ -0,0 +1,6 @@ +package sealed + +sealed interface SealedInterfaceA +sealed interface SealedInterfaceB + +class HierarchyClassA: SealedInterfaceA, SealedInterfaceB \ No newline at end of file diff --git a/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasNoMembers/conflicts.txt b/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasNoMembers/conflicts.txt new file mode 100644 index 00000000000..89613a4e1ab --- /dev/null +++ b/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasNoMembers/conflicts.txt @@ -0,0 +1 @@ +Sealed hierarchy of 'HierarchyClassA' would be split. None of its members reside in the package 'another' of module 'A': [sealed.HierarchyClassA, sealed.SealedInterfaceA, sealed.SealedInterfaceB]. \ No newline at end of file diff --git a/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasNoMembers/moveSealedCheckTargetPackageHasNoMembers.test b/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasNoMembers/moveSealedCheckTargetPackageHasNoMembers.test new file mode 100644 index 00000000000..2f5a59e2ead --- /dev/null +++ b/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasNoMembers/moveSealedCheckTargetPackageHasNoMembers.test @@ -0,0 +1,7 @@ +{ + "mainFile": "A/src/sealed/SealedHierarchy.kt", + "type": "MOVE_KOTLIN_TOP_LEVEL_DECLARATIONS", + "targetPackage": "another", + "targetSourceRoot": "A/src", + "withRuntime": "false" +} diff --git a/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasNoMembersCrossModule/after/A/A.iml b/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasNoMembersCrossModule/after/A/A.iml new file mode 100644 index 00000000000..0f75d4273fc --- /dev/null +++ b/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasNoMembersCrossModule/after/A/A.iml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasNoMembersCrossModule/after/A/src/sealed/SealedHierarchy.kt b/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasNoMembersCrossModule/after/A/src/sealed/SealedHierarchy.kt new file mode 100644 index 00000000000..bca8b5431e7 --- /dev/null +++ b/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasNoMembersCrossModule/after/A/src/sealed/SealedHierarchy.kt @@ -0,0 +1,5 @@ +package sealed + +sealed interface SealedInterfaceB + +class HierarchyClassA: SealedInterfaceA, SealedInterfaceB \ No newline at end of file diff --git a/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasNoMembersCrossModule/after/B/B.iml b/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasNoMembersCrossModule/after/B/B.iml new file mode 100644 index 00000000000..c90834f2d60 --- /dev/null +++ b/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasNoMembersCrossModule/after/B/B.iml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasNoMembersCrossModule/after/B/src/sealed/HelloGitEmptyDir.kt b/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasNoMembersCrossModule/after/B/src/sealed/HelloGitEmptyDir.kt new file mode 100644 index 00000000000..6c223bfa79a --- /dev/null +++ b/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasNoMembersCrossModule/after/B/src/sealed/HelloGitEmptyDir.kt @@ -0,0 +1,3 @@ +package sealed + +interface HelloGitEmptyDir \ No newline at end of file diff --git a/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasNoMembersCrossModule/after/B/src/sealed/SealedInterfaceA.kt b/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasNoMembersCrossModule/after/B/src/sealed/SealedInterfaceA.kt new file mode 100644 index 00000000000..25d98326be8 --- /dev/null +++ b/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasNoMembersCrossModule/after/B/src/sealed/SealedInterfaceA.kt @@ -0,0 +1,3 @@ +package sealed + +sealed interface SealedInterfaceA \ No newline at end of file diff --git a/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasNoMembersCrossModule/before/A/A.iml b/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasNoMembersCrossModule/before/A/A.iml new file mode 100644 index 00000000000..0f75d4273fc --- /dev/null +++ b/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasNoMembersCrossModule/before/A/A.iml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasNoMembersCrossModule/before/A/src/sealed/SealedHierarchy.kt b/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasNoMembersCrossModule/before/A/src/sealed/SealedHierarchy.kt new file mode 100644 index 00000000000..3687f3e32c4 --- /dev/null +++ b/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasNoMembersCrossModule/before/A/src/sealed/SealedHierarchy.kt @@ -0,0 +1,6 @@ +package sealed + +sealed interface SealedInterfaceA +sealed interface SealedInterfaceB + +class HierarchyClassA: SealedInterfaceA, SealedInterfaceB \ No newline at end of file diff --git a/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasNoMembersCrossModule/before/B/B.iml b/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasNoMembersCrossModule/before/B/B.iml new file mode 100644 index 00000000000..c90834f2d60 --- /dev/null +++ b/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasNoMembersCrossModule/before/B/B.iml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasNoMembersCrossModule/before/B/src/sealed/HelloGitEmptyDir.kt b/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasNoMembersCrossModule/before/B/src/sealed/HelloGitEmptyDir.kt new file mode 100644 index 00000000000..6c223bfa79a --- /dev/null +++ b/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasNoMembersCrossModule/before/B/src/sealed/HelloGitEmptyDir.kt @@ -0,0 +1,3 @@ +package sealed + +interface HelloGitEmptyDir \ No newline at end of file diff --git a/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasNoMembersCrossModule/conflicts.txt b/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasNoMembersCrossModule/conflicts.txt new file mode 100644 index 00000000000..9660cc2b94c --- /dev/null +++ b/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasNoMembersCrossModule/conflicts.txt @@ -0,0 +1 @@ +Sealed hierarchy of 'SealedInterfaceA' would be split. None of its members reside in the package 'sealed' of module 'B': [sealed.SealedInterfaceA, sealed.HierarchyClassA, sealed.SealedInterfaceB]. \ No newline at end of file diff --git a/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasNoMembersCrossModule/moveSealedCheckTargetPackageHasNoMembersCrossModule.test b/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasNoMembersCrossModule/moveSealedCheckTargetPackageHasNoMembersCrossModule.test new file mode 100644 index 00000000000..515ff868809 --- /dev/null +++ b/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasNoMembersCrossModule/moveSealedCheckTargetPackageHasNoMembersCrossModule.test @@ -0,0 +1,7 @@ +{ + "mainFile": "A/src/sealed/SealedHierarchy.kt", + "type": "MOVE_KOTLIN_TOP_LEVEL_DECLARATIONS", + "targetPackage": "sealed", + "targetSourceRoot": "B/src", + "withRuntime": "false" +} diff --git a/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasNoMembersCrossModuleBig/after/A/A.iml b/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasNoMembersCrossModuleBig/after/A/A.iml new file mode 100644 index 00000000000..0f75d4273fc --- /dev/null +++ b/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasNoMembersCrossModuleBig/after/A/A.iml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasNoMembersCrossModuleBig/after/A/src/sealed/SealedHierarchy.kt b/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasNoMembersCrossModuleBig/after/A/src/sealed/SealedHierarchy.kt new file mode 100644 index 00000000000..16a1c95a13f --- /dev/null +++ b/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasNoMembersCrossModuleBig/after/A/src/sealed/SealedHierarchy.kt @@ -0,0 +1,17 @@ +package sealed + +sealed interface SealedInterfaceB +sealed interface SealedInterfaceC +sealed interface SealedInterfaceD: InterfaceI, SealedInterfaceA, SealedInterfaceB, SealedInterfaceC +interface InterfaceE: SealedInterfaceD +sealed interface SealedInterfaceF: InterfaceE +sealed interface SealedInterfaceG +interface InterfaceH: InterfaceE +interface InterfaceI + +class ClassA: InterfaceE +class ClassC +sealed class SealedClassB: SealedInterfaceB, SealedInterfaceC, ClassC() +class ClassD: SealedClassB() +sealed class SealedClassE: SealedClassB(), SealedInterfaceG +class ClassF: ClassD() diff --git a/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasNoMembersCrossModuleBig/after/B/B.iml b/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasNoMembersCrossModuleBig/after/B/B.iml new file mode 100644 index 00000000000..c90834f2d60 --- /dev/null +++ b/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasNoMembersCrossModuleBig/after/B/B.iml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasNoMembersCrossModuleBig/after/B/src/sealed/HelloGitEmptyDir.kt b/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasNoMembersCrossModuleBig/after/B/src/sealed/HelloGitEmptyDir.kt new file mode 100644 index 00000000000..6c223bfa79a --- /dev/null +++ b/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasNoMembersCrossModuleBig/after/B/src/sealed/HelloGitEmptyDir.kt @@ -0,0 +1,3 @@ +package sealed + +interface HelloGitEmptyDir \ No newline at end of file diff --git a/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasNoMembersCrossModuleBig/after/B/src/sealed/SealedInterfaceA.kt b/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasNoMembersCrossModuleBig/after/B/src/sealed/SealedInterfaceA.kt new file mode 100644 index 00000000000..25d98326be8 --- /dev/null +++ b/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasNoMembersCrossModuleBig/after/B/src/sealed/SealedInterfaceA.kt @@ -0,0 +1,3 @@ +package sealed + +sealed interface SealedInterfaceA \ No newline at end of file diff --git a/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasNoMembersCrossModuleBig/before/A/A.iml b/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasNoMembersCrossModuleBig/before/A/A.iml new file mode 100644 index 00000000000..0f75d4273fc --- /dev/null +++ b/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasNoMembersCrossModuleBig/before/A/A.iml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasNoMembersCrossModuleBig/before/A/src/sealed/SealedHierarchy.kt b/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasNoMembersCrossModuleBig/before/A/src/sealed/SealedHierarchy.kt new file mode 100644 index 00000000000..4f49ff52dcb --- /dev/null +++ b/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasNoMembersCrossModuleBig/before/A/src/sealed/SealedHierarchy.kt @@ -0,0 +1,18 @@ +package sealed + +sealed interface SealedInterfaceA +sealed interface SealedInterfaceB +sealed interface SealedInterfaceC +sealed interface SealedInterfaceD: InterfaceI, SealedInterfaceA, SealedInterfaceB, SealedInterfaceC +interface InterfaceE: SealedInterfaceD +sealed interface SealedInterfaceF: InterfaceE +sealed interface SealedInterfaceG +interface InterfaceH: InterfaceE +interface InterfaceI + +class ClassA: InterfaceE +class ClassC +sealed class SealedClassB: SealedInterfaceB, SealedInterfaceC, ClassC() +class ClassD: SealedClassB() +sealed class SealedClassE: SealedClassB(), SealedInterfaceG +class ClassF: ClassD() diff --git a/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasNoMembersCrossModuleBig/before/B/B.iml b/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasNoMembersCrossModuleBig/before/B/B.iml new file mode 100644 index 00000000000..c90834f2d60 --- /dev/null +++ b/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasNoMembersCrossModuleBig/before/B/B.iml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasNoMembersCrossModuleBig/before/B/src/sealed/HelloGitEmptyDir.kt b/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasNoMembersCrossModuleBig/before/B/src/sealed/HelloGitEmptyDir.kt new file mode 100644 index 00000000000..6c223bfa79a --- /dev/null +++ b/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasNoMembersCrossModuleBig/before/B/src/sealed/HelloGitEmptyDir.kt @@ -0,0 +1,3 @@ +package sealed + +interface HelloGitEmptyDir \ No newline at end of file diff --git a/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasNoMembersCrossModuleBig/conflicts.txt b/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasNoMembersCrossModuleBig/conflicts.txt new file mode 100644 index 00000000000..b99198f703b --- /dev/null +++ b/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasNoMembersCrossModuleBig/conflicts.txt @@ -0,0 +1 @@ +Sealed hierarchy of 'SealedInterfaceA' would be split. None of its members reside in the package 'sealed' of module 'B': [sealed.SealedInterfaceA, sealed.SealedInterfaceD, sealed.SealedInterfaceB, sealed.SealedClassB, sealed.SealedInterfaceC, sealed.ClassD, sealed.SealedClassE, sealed.SealedInterfaceG, sealed.InterfaceE]. \ No newline at end of file diff --git a/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasNoMembersCrossModuleBig/moveSealedCheckTargetPackageHasNoMembersCrossModuleBig.test b/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasNoMembersCrossModuleBig/moveSealedCheckTargetPackageHasNoMembersCrossModuleBig.test new file mode 100644 index 00000000000..515ff868809 --- /dev/null +++ b/idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasNoMembersCrossModuleBig/moveSealedCheckTargetPackageHasNoMembersCrossModuleBig.test @@ -0,0 +1,7 @@ +{ + "mainFile": "A/src/sealed/SealedHierarchy.kt", + "type": "MOVE_KOTLIN_TOP_LEVEL_DECLARATIONS", + "targetPackage": "sealed", + "targetSourceRoot": "B/src", + "withRuntime": "false" +} diff --git a/idea/testData/refactoring/moveMultiModule/moveSealedCheckWithinPackage/after/A/A.iml b/idea/testData/refactoring/moveMultiModule/moveSealedCheckWithinPackage/after/A/A.iml new file mode 100644 index 00000000000..c90834f2d60 --- /dev/null +++ b/idea/testData/refactoring/moveMultiModule/moveSealedCheckWithinPackage/after/A/A.iml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/idea/testData/refactoring/moveMultiModule/moveSealedCheckWithinPackage/after/A/src/sealed/HierarchyClassA.kt b/idea/testData/refactoring/moveMultiModule/moveSealedCheckWithinPackage/after/A/src/sealed/HierarchyClassA.kt new file mode 100644 index 00000000000..e5f691f0282 --- /dev/null +++ b/idea/testData/refactoring/moveMultiModule/moveSealedCheckWithinPackage/after/A/src/sealed/HierarchyClassA.kt @@ -0,0 +1,3 @@ +package sealed + +class HierarchyClassA: SealedInterfaceA, SealedInterfaceB \ No newline at end of file diff --git a/idea/testData/refactoring/moveMultiModule/moveSealedCheckWithinPackage/after/A/src/sealed/SealedHierarchy.kt b/idea/testData/refactoring/moveMultiModule/moveSealedCheckWithinPackage/after/A/src/sealed/SealedHierarchy.kt new file mode 100644 index 00000000000..fa0ed5cda51 --- /dev/null +++ b/idea/testData/refactoring/moveMultiModule/moveSealedCheckWithinPackage/after/A/src/sealed/SealedHierarchy.kt @@ -0,0 +1,5 @@ +package sealed + +sealed interface SealedInterfaceA +sealed interface SealedInterfaceB + diff --git a/idea/testData/refactoring/moveMultiModule/moveSealedCheckWithinPackage/before/A/A.iml b/idea/testData/refactoring/moveMultiModule/moveSealedCheckWithinPackage/before/A/A.iml new file mode 100644 index 00000000000..c90834f2d60 --- /dev/null +++ b/idea/testData/refactoring/moveMultiModule/moveSealedCheckWithinPackage/before/A/A.iml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/idea/testData/refactoring/moveMultiModule/moveSealedCheckWithinPackage/before/A/src/sealed/SealedHierarchy.kt b/idea/testData/refactoring/moveMultiModule/moveSealedCheckWithinPackage/before/A/src/sealed/SealedHierarchy.kt new file mode 100644 index 00000000000..798239246e1 --- /dev/null +++ b/idea/testData/refactoring/moveMultiModule/moveSealedCheckWithinPackage/before/A/src/sealed/SealedHierarchy.kt @@ -0,0 +1,6 @@ +package sealed + +sealed interface SealedInterfaceA +sealed interface SealedInterfaceB + +class HierarchyClassA: SealedInterfaceA, SealedInterfaceB \ No newline at end of file diff --git a/idea/testData/refactoring/moveMultiModule/moveSealedCheckWithinPackage/moveSealedCheckWithinPackage.test b/idea/testData/refactoring/moveMultiModule/moveSealedCheckWithinPackage/moveSealedCheckWithinPackage.test new file mode 100644 index 00000000000..7dbe39f65a2 --- /dev/null +++ b/idea/testData/refactoring/moveMultiModule/moveSealedCheckWithinPackage/moveSealedCheckWithinPackage.test @@ -0,0 +1,7 @@ +{ + "mainFile": "A/src/sealed/SealedHierarchy.kt", + "type": "MOVE_KOTLIN_TOP_LEVEL_DECLARATIONS", + "targetPackage": "sealed", + "targetSourceRoot": "A/src/sealed", + "withRuntime": "false" +} diff --git a/idea/testData/resolve/references/AnnotationOnFile.kt b/idea/testData/resolve/references/AnnotationOnFile.kt index 85f6ce26681..491f48d1035 100644 --- a/idea/testData/resolve/references/AnnotationOnFile.kt +++ b/idea/testData/resolve/references/AnnotationOnFile.kt @@ -1,5 +1,3 @@ -// IGNORE_FIR - @file:[kotlin.Deprecated("message")] package foo diff --git a/idea/testData/resolve/references/AnnotationOnFileWithImport.kt b/idea/testData/resolve/references/AnnotationOnFileWithImport.kt index 21e0ccdd293..8497c5dc2e5 100644 --- a/idea/testData/resolve/references/AnnotationOnFileWithImport.kt +++ b/idea/testData/resolve/references/AnnotationOnFileWithImport.kt @@ -1,5 +1,3 @@ -// IGNORE_FIR - @file:[D("message")] package foo diff --git a/idea/testData/resolve/references/AnnotationParameter.kt b/idea/testData/resolve/references/AnnotationParameter.kt index ce6c470b630..4b4995b1fda 100644 --- a/idea/testData/resolve/references/AnnotationParameter.kt +++ b/idea/testData/resolve/references/AnnotationParameter.kt @@ -1,4 +1,3 @@ -// IGNORE_FIR package testing annotation class Annotation(val clazz: Class) diff --git a/idea/testData/resolve/references/JavaAnnotationParameter.kt b/idea/testData/resolve/references/JavaAnnotationParameter.kt index 741ac0bb37f..48a99222f5d 100644 --- a/idea/testData/resolve/references/JavaAnnotationParameter.kt +++ b/idea/testData/resolve/references/JavaAnnotationParameter.kt @@ -1,6 +1,5 @@ -// IGNORE_FIR - -@java.lang.annotation.Retention(value = java.lang.annotation.RetentionPolicy.RUNTIME) +@java.lang.annotation.Retention(value = java.lang.annotation.RetentionPolicy.RUNTIME) annotation class Anno() -// REF: (in java.lang.annotation.Retention).value() \ No newline at end of file +// REF1: (java.lang.annotation).Retention +// REF2: (in java.lang.annotation.Retention).value() \ No newline at end of file diff --git a/idea/tests/org/jetbrains/kotlin/asJava/classes/UltraLightClassLoadingTestGenerated.java b/idea/tests/org/jetbrains/kotlin/asJava/classes/UltraLightClassLoadingTestGenerated.java index 092946c7d3d..aa5b88b4a16 100644 --- a/idea/tests/org/jetbrains/kotlin/asJava/classes/UltraLightClassLoadingTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/asJava/classes/UltraLightClassLoadingTestGenerated.java @@ -29,6 +29,11 @@ public class UltraLightClassLoadingTestGenerated extends AbstractUltraLightClass KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/asJava/ultraLightClasses"), Pattern.compile("^(.+)\\.(kt|kts)$"), null, true); } + @TestMetadata("annotationTargets_1_6.kt") + public void testAnnotationTargets_1_6() throws Exception { + runTest("compiler/testData/asJava/ultraLightClasses/annotationTargets_1_6.kt"); + } + @TestMetadata("annotationWithSetParamPropertyModifier.kt") public void testAnnotationWithSetParamPropertyModifier() throws Exception { runTest("compiler/testData/asJava/ultraLightClasses/annotationWithSetParamPropertyModifier.kt"); diff --git a/idea/tests/org/jetbrains/kotlin/asJava/classes/UltraLightClassSanityTestGenerated.java b/idea/tests/org/jetbrains/kotlin/asJava/classes/UltraLightClassSanityTestGenerated.java index c8aeb52ff76..b21d568ccae 100644 --- a/idea/tests/org/jetbrains/kotlin/asJava/classes/UltraLightClassSanityTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/asJava/classes/UltraLightClassSanityTestGenerated.java @@ -149,6 +149,11 @@ public class UltraLightClassSanityTestGenerated extends AbstractUltraLightClassS runTest("compiler/testData/asJava/lightClasses/SpecialAnnotationsOnAnnotationClass.kt"); } + @TestMetadata("SpecialAnnotationsOnAnnotationClass_1_6.kt") + public void testSpecialAnnotationsOnAnnotationClass_1_6() throws Exception { + runTest("compiler/testData/asJava/lightClasses/SpecialAnnotationsOnAnnotationClass_1_6.kt"); + } + @TestMetadata("StubOrderForOverloads.kt") public void testStubOrderForOverloads() throws Exception { runTest("compiler/testData/asJava/lightClasses/StubOrderForOverloads.kt"); diff --git a/idea/tests/org/jetbrains/kotlin/checkers/AbstractPsiCheckerTest.java b/idea/tests/org/jetbrains/kotlin/checkers/AbstractKotlinHighlightingPassTest.java similarity index 97% rename from idea/tests/org/jetbrains/kotlin/checkers/AbstractPsiCheckerTest.java rename to idea/tests/org/jetbrains/kotlin/checkers/AbstractKotlinHighlightingPassTest.java index 98a416691c4..db8320d1f16 100644 --- a/idea/tests/org/jetbrains/kotlin/checkers/AbstractPsiCheckerTest.java +++ b/idea/tests/org/jetbrains/kotlin/checkers/AbstractKotlinHighlightingPassTest.java @@ -25,7 +25,7 @@ import java.io.File; import static org.jetbrains.kotlin.resolve.lazy.ResolveSession.areDescriptorsCreatedForDeclaration; -public abstract class AbstractPsiCheckerTest extends KotlinLightCodeInsightFixtureTestCase { +public abstract class AbstractKotlinHighlightingPassTest extends KotlinLightCodeInsightFixtureTestCase { public void doTest(@NotNull VirtualFile file) throws Exception { myFixture.configureFromExistingVirtualFile(file); checkHighlighting(true, false, false); diff --git a/idea/tests/org/jetbrains/kotlin/checkers/PsiCheckerCustomTest.kt b/idea/tests/org/jetbrains/kotlin/checkers/KotlinHighlightingPassCustomTest.kt similarity index 94% rename from idea/tests/org/jetbrains/kotlin/checkers/PsiCheckerCustomTest.kt rename to idea/tests/org/jetbrains/kotlin/checkers/KotlinHighlightingPassCustomTest.kt index 457a1a7e436..406d3eef8a2 100644 --- a/idea/tests/org/jetbrains/kotlin/checkers/PsiCheckerCustomTest.kt +++ b/idea/tests/org/jetbrains/kotlin/checkers/KotlinHighlightingPassCustomTest.kt @@ -13,7 +13,7 @@ import org.junit.runner.RunWith @TestMetadata("idea/testData/checker/custom") @RunWith(JUnit3WithIdeaConfigurationRunner::class) -class PsiCheckerCustomTest : AbstractPsiCheckerTest() { +class KotlinHighlightingPassCustomTest : AbstractKotlinHighlightingPassTest() { @TestMetadata("noUnusedParameterWhenCustom.kt") fun testNoUnusedParameterWhenCustom() { diff --git a/idea/tests/org/jetbrains/kotlin/checkers/PsiCheckerSealedTest.kt b/idea/tests/org/jetbrains/kotlin/checkers/KotlinHighlightingPassSealedTest.kt similarity index 92% rename from idea/tests/org/jetbrains/kotlin/checkers/PsiCheckerSealedTest.kt rename to idea/tests/org/jetbrains/kotlin/checkers/KotlinHighlightingPassSealedTest.kt index 594fda3e8a1..e4e1c1474ba 100644 --- a/idea/tests/org/jetbrains/kotlin/checkers/PsiCheckerSealedTest.kt +++ b/idea/tests/org/jetbrains/kotlin/checkers/KotlinHighlightingPassSealedTest.kt @@ -12,7 +12,7 @@ import org.junit.runner.RunWith @TestMetadata("idea/testData/checker/sealed") @RunWith(JUnit3WithIdeaConfigurationRunner::class) -class PsiCheckerSealedTest : AbstractPsiCheckerTest() { +class KotlinHighlightingPassSealedTest : AbstractKotlinHighlightingPassTest() { fun testOutsideOfPackageInheritors() { doTest( diff --git a/idea/tests/org/jetbrains/kotlin/checkers/PsiCheckerTestGenerated.java b/idea/tests/org/jetbrains/kotlin/checkers/KotlinHighlightingPassTestGenerated.java similarity index 97% rename from idea/tests/org/jetbrains/kotlin/checkers/PsiCheckerTestGenerated.java rename to idea/tests/org/jetbrains/kotlin/checkers/KotlinHighlightingPassTestGenerated.java index e8a89d8269f..94c1d65a404 100644 --- a/idea/tests/org/jetbrains/kotlin/checkers/PsiCheckerTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/checkers/KotlinHighlightingPassTestGenerated.java @@ -18,11 +18,11 @@ import java.util.regex.Pattern; /** This class is generated by {@link org.jetbrains.kotlin.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */ @SuppressWarnings("all") @RunWith(JUnit3RunnerWithInners.class) -public class PsiCheckerTestGenerated extends AbstractPsiCheckerTest { +public class KotlinHighlightingPassTestGenerated extends AbstractKotlinHighlightingPassTest { @TestMetadata("idea/testData/checker") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) - public static class Checker extends AbstractPsiCheckerTest { + public static class Checker extends AbstractKotlinHighlightingPassTest { private void runTest(String testDataFilePath) throws Exception { KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); } @@ -41,6 +41,11 @@ public class PsiCheckerTestGenerated extends AbstractPsiCheckerTest { runTest("idea/testData/checker/AnnotationOnFile.kt"); } + @TestMetadata("AnnotationSupressing.kt") + public void testAnnotationSupressing() throws Exception { + runTest("idea/testData/checker/AnnotationSupressing.kt"); + } + @TestMetadata("AnonymousInitializers.kt") public void testAnonymousInitializers() throws Exception { runTest("idea/testData/checker/AnonymousInitializers.kt"); @@ -365,7 +370,7 @@ public class PsiCheckerTestGenerated extends AbstractPsiCheckerTest { @TestMetadata("idea/testData/checker/regression") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) - public static class Regression extends AbstractPsiCheckerTest { + public static class Regression extends AbstractKotlinHighlightingPassTest { private void runTest(String testDataFilePath) throws Exception { KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); } @@ -608,7 +613,7 @@ public class PsiCheckerTestGenerated extends AbstractPsiCheckerTest { @TestMetadata("idea/testData/checker/recovery") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) - public static class Recovery extends AbstractPsiCheckerTest { + public static class Recovery extends AbstractKotlinHighlightingPassTest { private void runTest(String testDataFilePath) throws Exception { KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); } @@ -636,7 +641,7 @@ public class PsiCheckerTestGenerated extends AbstractPsiCheckerTest { @TestMetadata("idea/testData/checker/rendering") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) - public static class Rendering extends AbstractPsiCheckerTest { + public static class Rendering extends AbstractKotlinHighlightingPassTest { private void runTest(String testDataFilePath) throws Exception { KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); } @@ -654,7 +659,7 @@ public class PsiCheckerTestGenerated extends AbstractPsiCheckerTest { @TestMetadata("idea/testData/checker/scripts") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) - public static class Scripts extends AbstractPsiCheckerTest { + public static class Scripts extends AbstractKotlinHighlightingPassTest { private void runTest(String testDataFilePath) throws Exception { KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); } @@ -687,7 +692,7 @@ public class PsiCheckerTestGenerated extends AbstractPsiCheckerTest { @TestMetadata("idea/testData/checker/duplicateJvmSignature") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) - public static class DuplicateJvmSignature extends AbstractPsiCheckerTest { + public static class DuplicateJvmSignature extends AbstractKotlinHighlightingPassTest { private void runTest(String testDataFilePath) throws Exception { KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); } @@ -699,7 +704,7 @@ public class PsiCheckerTestGenerated extends AbstractPsiCheckerTest { @TestMetadata("idea/testData/checker/duplicateJvmSignature/fields") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) - public static class Fields extends AbstractPsiCheckerTest { + public static class Fields extends AbstractKotlinHighlightingPassTest { private void runTest(String testDataFilePath) throws Exception { KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); } @@ -717,7 +722,7 @@ public class PsiCheckerTestGenerated extends AbstractPsiCheckerTest { @TestMetadata("idea/testData/checker/duplicateJvmSignature/functionAndProperty") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) - public static class FunctionAndProperty extends AbstractPsiCheckerTest { + public static class FunctionAndProperty extends AbstractKotlinHighlightingPassTest { private void runTest(String testDataFilePath) throws Exception { KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); } @@ -780,7 +785,7 @@ public class PsiCheckerTestGenerated extends AbstractPsiCheckerTest { @TestMetadata("idea/testData/checker/duplicateJvmSignature/traitImpl") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) - public static class TraitImpl extends AbstractPsiCheckerTest { + public static class TraitImpl extends AbstractKotlinHighlightingPassTest { private void runTest(String testDataFilePath) throws Exception { KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); } @@ -799,7 +804,7 @@ public class PsiCheckerTestGenerated extends AbstractPsiCheckerTest { @TestMetadata("idea/testData/checker/infos") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) - public static class Infos extends AbstractPsiCheckerTest { + public static class Infos extends AbstractKotlinHighlightingPassTest { private void runTest(String testDataFilePath) throws Exception { KotlinTestUtils.runTest(this::doTestWithInfos, this, testDataFilePath); } @@ -892,7 +897,7 @@ public class PsiCheckerTestGenerated extends AbstractPsiCheckerTest { @TestMetadata("idea/testData/checker/diagnosticsMessage") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) - public static class DiagnosticsMessage extends AbstractPsiCheckerTest { + public static class DiagnosticsMessage extends AbstractKotlinHighlightingPassTest { private void runTest(String testDataFilePath) throws Exception { KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); } diff --git a/idea/tests/org/jetbrains/kotlin/idea/caches/resolve/AbstractIdeLightClassTest.kt b/idea/tests/org/jetbrains/kotlin/idea/caches/resolve/AbstractIdeLightClassTest.kt index c57ff31b513..fb29c585dd8 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/caches/resolve/AbstractIdeLightClassTest.kt +++ b/idea/tests/org/jetbrains/kotlin/idea/caches/resolve/AbstractIdeLightClassTest.kt @@ -19,7 +19,6 @@ import org.jetbrains.kotlin.asJava.builder.LightClassConstructionContext import org.jetbrains.kotlin.asJava.builder.StubComputationTracker import org.jetbrains.kotlin.asJava.classes.KtLightClass import org.jetbrains.kotlin.asJava.classes.KtLightClassForFacade -import org.jetbrains.kotlin.asJava.classes.KtLightClassForSourceDeclaration import org.jetbrains.kotlin.asJava.elements.* import org.jetbrains.kotlin.asJava.toLightClass import org.jetbrains.kotlin.codegen.forTestCompile.ForTestCompileRuntime @@ -29,8 +28,10 @@ import org.jetbrains.kotlin.idea.caches.resolve.LightClassLazinessChecker.Tracke import org.jetbrains.kotlin.idea.completion.test.withServiceRegistered import org.jetbrains.kotlin.idea.core.script.ScriptConfigurationManager import org.jetbrains.kotlin.idea.perf.forceUsingOldLightClassesForTest +import org.jetbrains.kotlin.idea.test.CompilerTestDirectives import org.jetbrains.kotlin.idea.test.KotlinLightCodeInsightFixtureTestCase import org.jetbrains.kotlin.idea.test.KotlinWithJdkAndRuntimeLightProjectDescriptor +import org.jetbrains.kotlin.idea.test.withCustomCompilerOptions import org.jetbrains.kotlin.load.java.JvmAnnotationNames import org.jetbrains.kotlin.psi.KtClassOrObject import org.jetbrains.kotlin.psi.KtFile @@ -39,14 +40,13 @@ import org.jetbrains.kotlin.test.MockLibraryUtilExt import org.jetbrains.kotlin.test.util.KtTestUtil import org.jetbrains.kotlin.utils.keysToMap import org.jetbrains.plugins.groovy.lang.psi.impl.stringValue -import org.junit.Assert import java.io.File import kotlin.test.assertEquals import kotlin.test.assertNotNull import kotlin.test.assertTrue abstract class AbstractIdeLightClassTest : KotlinLightCodeInsightFixtureTestCase() { - fun doTest(unused: String) { + fun doTest(@Suppress("UNUSED_PARAMETER") unused: String) { forceUsingOldLightClassesForTest() val fileName = fileName() val extraFilePath = when { @@ -54,30 +54,31 @@ abstract class AbstractIdeLightClassTest : KotlinLightCodeInsightFixtureTestCase else -> error("Invalid test data extension") } - val testFiles = if (File(testDataPath, extraFilePath).isFile) listOf(fileName, extraFilePath) else listOf(fileName) + withCustomCompilerOptions(File(testDataPath, fileName).readText(), project, module) { + val testFiles = if (File(testDataPath, extraFilePath).isFile) listOf(fileName, extraFilePath) else listOf(fileName) + val lazinessMode = lazinessModeByFileText() + myFixture.configureByFiles(*testFiles.toTypedArray()) + if ((myFixture.file as? KtFile)?.isScript() == true) { + ScriptConfigurationManager.updateScriptDependenciesSynchronously(myFixture.file) + } - val lazinessMode = lazinessModeByFileText() - myFixture.configureByFiles(*testFiles.toTypedArray()) - if ((myFixture.file as? KtFile)?.isScript() == true) { - ScriptConfigurationManager.updateScriptDependenciesSynchronously(myFixture.file) - } - - val ktFile = myFixture.file as KtFile - val testData = testDataFile() - testLightClass( - KotlinTestUtils.replaceExtension(testData, "java"), - testData, - { LightClassTestCommon.removeEmptyDefaultImpls(it) }, - { fqName -> - val tracker = LightClassLazinessChecker.Tracker(fqName) - project.withServiceRegistered(tracker) { - findClass(fqName, ktFile, project)?.apply { - LightClassLazinessChecker.check(this as KtLightClass, tracker, lazinessMode) - tracker.allowLevel(EXACT) - PsiElementChecker.checkPsiElementStructure(this) + val ktFile = myFixture.file as KtFile + val testData = testDataFile() + testLightClass( + KotlinTestUtils.replaceExtension(testData, "java"), + testData, + { LightClassTestCommon.removeEmptyDefaultImpls(it) }, + { fqName -> + val tracker = LightClassLazinessChecker.Tracker(fqName) + project.withServiceRegistered(tracker) { + findClass(fqName, ktFile, project)?.apply { + LightClassLazinessChecker.check(this as KtLightClass, tracker, lazinessMode) + tracker.allowLevel(EXACT) + PsiElementChecker.checkPsiElementStructure(this) + } } - } - }) + }) + } } private fun lazinessModeByFileText(): LightClassLazinessChecker.Mode { @@ -105,11 +106,16 @@ abstract class AbstractIdeCompiledLightClassTest : KotlinDaemonAnalyzerTestCase( val filePathWithoutExtension = "${KtTestUtil.getTestsRoot(this::class.java)}/${getTestName(false)}" val testFile = File("$filePathWithoutExtension.kt").takeIf { it.exists() } ?: File("$filePathWithoutExtension.kts").takeIf { it.exists() } + ?: error("Test file not found!") - Assert.assertNotNull("Test file not found!", testFile) - + val extraOptions = KotlinTestUtils.parseDirectives(testFile.readText())[ + CompilerTestDirectives.JVM_TARGET_DIRECTIVE.substringBefore(":") + ]?.let { jvmTarget -> + listOf("-jvm-target", jvmTarget) + } ?: emptyList() val libraryJar = MockLibraryUtilExt.compileJvmLibraryToJar( - testFile!!.canonicalPath, libName(), + testFile.canonicalPath, libName(), + extraOptions = extraOptions, extraClasspath = listOf(ForTestCompileRuntime.jetbrainsAnnotationsForTests().path) ) val jarUrl = "jar://" + FileUtilRt.toSystemIndependentName(libraryJar.absolutePath) + "!/" @@ -123,11 +129,13 @@ abstract class AbstractIdeCompiledLightClassTest : KotlinDaemonAnalyzerTestCase( val expectedFile = KotlinTestUtils.replaceExtension( testDataFile, "compiled.java" ).let { if (it.exists()) it else KotlinTestUtils.replaceExtension(testDataFile, "java") } - testLightClass(expectedFile, testDataFile, { it }, { - findClass(it, null, project)?.apply { - PsiElementChecker.checkPsiElementStructure(this) - } - }) + withCustomCompilerOptions(testDataFile.readText(), project, module) { + testLightClass(expectedFile, testDataFile, { it }, { + findClass(it, null, project)?.apply { + PsiElementChecker.checkPsiElementStructure(this) + } + }) + } } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/caches/resolve/IdeCompiledLightClassTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/caches/resolve/IdeCompiledLightClassTestGenerated.java index 24bc5519203..90778617ed2 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/caches/resolve/IdeCompiledLightClassTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/caches/resolve/IdeCompiledLightClassTestGenerated.java @@ -149,6 +149,11 @@ public class IdeCompiledLightClassTestGenerated extends AbstractIdeCompiledLight runTest("compiler/testData/asJava/lightClasses/SpecialAnnotationsOnAnnotationClass.kt"); } + @TestMetadata("SpecialAnnotationsOnAnnotationClass_1_6.kt") + public void testSpecialAnnotationsOnAnnotationClass_1_6() throws Exception { + runTest("compiler/testData/asJava/lightClasses/SpecialAnnotationsOnAnnotationClass_1_6.kt"); + } + @TestMetadata("StubOrderForOverloads.kt") public void testStubOrderForOverloads() throws Exception { runTest("compiler/testData/asJava/lightClasses/StubOrderForOverloads.kt"); diff --git a/idea/tests/org/jetbrains/kotlin/idea/caches/resolve/IdeLightClassTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/caches/resolve/IdeLightClassTestGenerated.java index a9c4476370c..4f292bc941a 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/caches/resolve/IdeLightClassTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/caches/resolve/IdeLightClassTestGenerated.java @@ -149,6 +149,11 @@ public class IdeLightClassTestGenerated extends AbstractIdeLightClassTest { runTest("compiler/testData/asJava/lightClasses/SpecialAnnotationsOnAnnotationClass.kt"); } + @TestMetadata("SpecialAnnotationsOnAnnotationClass_1_6.kt") + public void testSpecialAnnotationsOnAnnotationClass_1_6() throws Exception { + runTest("compiler/testData/asJava/lightClasses/SpecialAnnotationsOnAnnotationClass_1_6.kt"); + } + @TestMetadata("StubOrderForOverloads.kt") public void testStubOrderForOverloads() throws Exception { runTest("compiler/testData/asJava/lightClasses/StubOrderForOverloads.kt"); diff --git a/idea/tests/org/jetbrains/kotlin/idea/caches/resolve/IdeaModuleInfoTest.kt b/idea/tests/org/jetbrains/kotlin/idea/caches/resolve/IdeaModuleInfoTest.kt index 0bf97db23ff..548f2d81074 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/caches/resolve/IdeaModuleInfoTest.kt +++ b/idea/tests/org/jetbrains/kotlin/idea/caches/resolve/IdeaModuleInfoTest.kt @@ -26,10 +26,12 @@ import org.jetbrains.kotlin.idea.caches.project.ModuleTestSourceInfo import org.jetbrains.kotlin.idea.framework.CommonLibraryKind import org.jetbrains.kotlin.idea.framework.JSLibraryKind import org.jetbrains.kotlin.idea.framework.platform +import org.jetbrains.kotlin.idea.stubs.createMultiplatformFacetM3 import org.jetbrains.kotlin.idea.test.PluginTestCaseBase.* import org.jetbrains.kotlin.idea.util.application.runWriteAction import org.jetbrains.kotlin.idea.util.getProjectJdkTableSafe import org.jetbrains.kotlin.platform.TargetPlatform +import org.jetbrains.kotlin.platform.js.JsPlatforms import org.jetbrains.kotlin.test.JUnit3WithIdeaConfigurationRunner import org.jetbrains.kotlin.test.util.KtTestUtil import org.jetbrains.kotlin.test.util.addDependency @@ -316,6 +318,7 @@ class IdeaModuleInfoTest : ModuleTestCase() { a.addDependency(stdlibJvm) val b = module("b") + b.setUpPlatform(JsPlatforms.defaultJsPlatform) b.addDependency(stdlibCommon) b.addDependency(stdlibJs) @@ -480,6 +483,14 @@ class IdeaModuleInfoTest : ModuleTestCase() { kind = JSLibraryKind ) + private fun Module.setUpPlatform(targetPlatform: TargetPlatform) { + createMultiplatformFacetM3( + platformKind = targetPlatform, + dependsOnModuleNames = listOf(), + pureKotlinSourceFolders = listOf(), + ) + } + override fun setUp() { super.setUp() diff --git a/idea/tests/org/jetbrains/kotlin/idea/caches/resolve/MultiplatformAnalysisTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/caches/resolve/MultiplatformAnalysisTestGenerated.java index 959cb5cc3ce..a0d86c053ff 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/caches/resolve/MultiplatformAnalysisTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/caches/resolve/MultiplatformAnalysisTestGenerated.java @@ -199,6 +199,11 @@ public class MultiplatformAnalysisTestGenerated extends AbstractMultiplatformAna runTest("idea/testData/multiplatform/overrideExpectWithCompositeType/"); } + @TestMetadata("platformDependencyInCommon") + public void testPlatformDependencyInCommon() throws Exception { + runTest("idea/testData/multiplatform/platformDependencyInCommon/"); + } + @TestMetadata("platformSpecificChecksInCommon") public void testPlatformSpecificChecksInCommon() throws Exception { runTest("idea/testData/multiplatform/platformSpecificChecksInCommon/"); diff --git a/idea/tests/org/jetbrains/kotlin/idea/debugger/evaluate/AbstractCodeFragmentAutoImportTest.kt b/idea/tests/org/jetbrains/kotlin/idea/debugger/evaluate/AbstractCodeFragmentAutoImportTest.kt index 7721f7cbd9f..a45c2615e46 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/debugger/evaluate/AbstractCodeFragmentAutoImportTest.kt +++ b/idea/tests/org/jetbrains/kotlin/idea/debugger/evaluate/AbstractCodeFragmentAutoImportTest.kt @@ -5,12 +5,12 @@ package org.jetbrains.kotlin.idea.debugger.evaluate -import org.jetbrains.kotlin.checkers.AbstractPsiCheckerTest +import org.jetbrains.kotlin.checkers.AbstractKotlinHighlightingPassTest import org.jetbrains.kotlin.idea.test.KotlinWithJdkAndRuntimeLightProjectDescriptor import org.jetbrains.kotlin.psi.KtCodeFragment import kotlin.test.assertNull -abstract class AbstractCodeFragmentAutoImportTest : AbstractPsiCheckerTest() { +abstract class AbstractCodeFragmentAutoImportTest : AbstractKotlinHighlightingPassTest() { override fun doTest(filePath: String) { myFixture.configureByCodeFragment(filePath) myFixture.doHighlighting() diff --git a/idea/tests/org/jetbrains/kotlin/idea/debugger/evaluate/AbstractCodeFragmentHighlightingTest.kt b/idea/tests/org/jetbrains/kotlin/idea/debugger/evaluate/AbstractCodeFragmentHighlightingTest.kt index ba2ab37af90..415632d0415 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/debugger/evaluate/AbstractCodeFragmentHighlightingTest.kt +++ b/idea/tests/org/jetbrains/kotlin/idea/debugger/evaluate/AbstractCodeFragmentHighlightingTest.kt @@ -7,7 +7,7 @@ package org.jetbrains.kotlin.idea.debugger.evaluate import com.intellij.codeInspection.InspectionProfileEntry import com.intellij.openapi.util.io.FileUtil -import org.jetbrains.kotlin.checkers.AbstractPsiCheckerTest +import org.jetbrains.kotlin.checkers.AbstractKotlinHighlightingPassTest import org.jetbrains.kotlin.idea.caches.resolve.resolveImportReference import org.jetbrains.kotlin.idea.util.ImportInsertHelper import org.jetbrains.kotlin.idea.util.application.executeWriteCommand @@ -16,7 +16,7 @@ import org.jetbrains.kotlin.psi.KtFile import org.jetbrains.kotlin.test.InTextDirectivesUtils import java.io.File -abstract class AbstractCodeFragmentHighlightingTest : AbstractPsiCheckerTest() { +abstract class AbstractCodeFragmentHighlightingTest : AbstractKotlinHighlightingPassTest() { override fun doTest(filePath: String) { myFixture.configureByCodeFragment(filePath) checkHighlighting(filePath) diff --git a/idea/tests/org/jetbrains/kotlin/idea/highlighter/AbstractDslHighlighterTest.kt b/idea/tests/org/jetbrains/kotlin/idea/highlighter/AbstractDslHighlighterTest.kt index 1b3af009ab6..0487de53f2d 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/highlighter/AbstractDslHighlighterTest.kt +++ b/idea/tests/org/jetbrains/kotlin/idea/highlighter/AbstractDslHighlighterTest.kt @@ -34,10 +34,12 @@ abstract class AbstractDslHighlighterTest : KotlinLightCodeInsightFixtureTestCas val styleIdByCall = extension.highlightCall(element, call)?.externalName if (styleIdByCall != null && styleIdByCall == styleIdByComment) { val annotationHolder = AnnotationHolderImpl(AnnotationSession(psiFile)) - val checkers = KotlinPsiChecker.getAfterAnalysisVisitor(annotationHolder, bindingContext) - checkers.forEach { call.call.callElement.accept(it) } + annotationHolder.runAnnotatorWithContext(file) { _, _ -> + val checkers = AbstractKotlinHighlightingPass.getAfterAnalysisVisitor(annotationHolder, bindingContext) + checkers.forEach { call.call.callElement.accept(it) } + } assertTrue( - "KotlinPsiChecker did not contribute an Annotation containing the correct text attribute key at line ${lineNumber + 1}", + "KotlinHighlightingPass did not contribute an Annotation containing the correct text attribute key at line ${lineNumber + 1}", annotationHolder.any { it.textAttributes.externalName == styleIdByComment } diff --git a/idea/tests/org/jetbrains/kotlin/idea/inspections/AbstractLocalInspectionTest.kt b/idea/tests/org/jetbrains/kotlin/idea/inspections/AbstractLocalInspectionTest.kt index ab1d14fd2c7..72eab58ba76 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/inspections/AbstractLocalInspectionTest.kt +++ b/idea/tests/org/jetbrains/kotlin/idea/inspections/AbstractLocalInspectionTest.kt @@ -8,7 +8,9 @@ package org.jetbrains.kotlin.idea.inspections import com.google.common.collect.Lists import com.intellij.codeHighlighting.HighlightDisplayLevel import com.intellij.codeHighlighting.Pass +import com.intellij.codeHighlighting.TextEditorHighlightingPass import com.intellij.codeInsight.daemon.impl.HighlightInfoType +import com.intellij.codeInsight.daemon.impl.TextEditorHighlightingPassRegistrarEx import com.intellij.codeInsight.intention.EmptyIntentionAction import com.intellij.codeInspection.ProblemHighlightType import com.intellij.openapi.util.SystemInfo @@ -19,6 +21,7 @@ import junit.framework.ComparisonFailure import junit.framework.TestCase import org.jdom.Element import org.jetbrains.kotlin.idea.core.script.ScriptConfigurationManager +import org.jetbrains.kotlin.idea.highlighter.AbstractHighlightingPassBase import org.jetbrains.kotlin.idea.test.DirectiveBasedActionUtils import org.jetbrains.kotlin.idea.test.KotlinLightCodeInsightFixtureTestCase import org.jetbrains.kotlin.idea.test.withCustomCompilerOptions @@ -29,6 +32,7 @@ import org.jetbrains.kotlin.test.KotlinTestUtils import org.junit.Assert import java.io.File + abstract class AbstractLocalInspectionTest : KotlinLightCodeInsightFixtureTestCase() { private val inspectionFileName: String get() = ".inspection" @@ -145,16 +149,23 @@ abstract class AbstractLocalInspectionTest : KotlinLightCodeInsightFixtureTestCa state.tool.tool.readSettings(inspectionSettings) } + val passIdsToIgnore = mutableListOf( + Pass.LINE_MARKERS, + Pass.EXTERNAL_TOOLS, + Pass.POPUP_HINTS, + Pass.UPDATE_ALL, + Pass.UPDATE_FOLDING, + Pass.WOLF + ) + val passRegistrar = TextEditorHighlightingPassRegistrarEx.getInstanceEx(myFixture.project) + // to exclude AbstractHighlightingPassBase instances based on their ids + passRegistrar.instantiatePasses( + file, editor, passIdsToIgnore.toIntArray() + ).filterIsInstance().map(TextEditorHighlightingPass::getId).forEach(passIdsToIgnore::add) + val caretOffset = myFixture.caretOffset val highlightInfos = CodeInsightTestFixtureImpl.instantiateAndRun( - file, editor, intArrayOf( - Pass.LINE_MARKERS, - Pass.EXTERNAL_TOOLS, - Pass.POPUP_HINTS, - Pass.UPDATE_ALL, - Pass.UPDATE_FOLDING, - Pass.WOLF - ), (file as? KtFile)?.isScript() == true + file, editor, passIdsToIgnore.toIntArray(), (file as? KtFile)?.isScript() == true ).filter { it.description != null && caretOffset in it.startOffset..it.endOffset } Assert.assertTrue( diff --git a/idea/tests/org/jetbrains/kotlin/idea/refactoring/move/MoveTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/refactoring/move/MoveTestGenerated.java index 65839a8e016..c340d3b81af 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/refactoring/move/MoveTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/refactoring/move/MoveTestGenerated.java @@ -644,16 +644,6 @@ public class MoveTestGenerated extends AbstractMoveTest { runTest("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/sealedClassWithAllSubclasses/sealedClassWithAllSubclasses.test"); } - @TestMetadata("kotlin/moveTopLevelDeclarations/misc/sealedClassWithSkippedSubclasses/sealedClassWithSkippedSubclasses.test") - public void testKotlin_moveTopLevelDeclarations_misc_sealedClassWithSkippedSubclasses_SealedClassWithSkippedSubclasses() throws Exception { - runTest("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/sealedClassWithSkippedSubclasses/sealedClassWithSkippedSubclasses.test"); - } - - @TestMetadata("kotlin/moveTopLevelDeclarations/misc/sealedSubclassWithSkippedRoot/sealedSubclassWithSkippedRoot.test") - public void testKotlin_moveTopLevelDeclarations_misc_sealedSubclassWithSkippedRoot_SealedSubclassWithSkippedRoot() throws Exception { - runTest("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/sealedSubclassWithSkippedRoot/sealedSubclassWithSkippedRoot.test"); - } - @TestMetadata("kotlin/moveTopLevelDeclarations/misc/selfReferences/selfReferences.test") public void testKotlin_moveTopLevelDeclarations_misc_selfReferences_SelfReferences() throws Exception { runTest("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/selfReferences/selfReferences.test"); @@ -779,11 +769,6 @@ public class MoveTestGenerated extends AbstractMoveTest { runTest("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/movePropertyToPackage/movePropertyToPackage.test"); } - @TestMetadata("kotlin/moveTopLevelDeclarations/moveSealedClassWithImplsToAnotherPackage/moveSealedClassWithNestedImplsToAnotherPackage.test") - public void testKotlin_moveTopLevelDeclarations_moveSealedClassWithImplsToAnotherPackage_MoveSealedClassWithNestedImplsToAnotherPackage() throws Exception { - runTest("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/moveSealedClassWithImplsToAnotherPackage/moveSealedClassWithNestedImplsToAnotherPackage.test"); - } - @TestMetadata("kotlin/moveTopLevelDeclarations/moveSealedClassWithNestedImplsToAnotherPackage/moveSealedClassWithNestedImplsToAnotherPackage.test") public void testKotlin_moveTopLevelDeclarations_moveSealedClassWithNestedImplsToAnotherPackage_MoveSealedClassWithNestedImplsToAnotherPackage() throws Exception { runTest("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/moveSealedClassWithNestedImplsToAnotherPackage/moveSealedClassWithNestedImplsToAnotherPackage.test"); diff --git a/idea/tests/org/jetbrains/kotlin/idea/refactoring/move/MultiModuleMoveTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/refactoring/move/MultiModuleMoveTestGenerated.java index d640378a8a8..416498e3778 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/refactoring/move/MultiModuleMoveTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/refactoring/move/MultiModuleMoveTestGenerated.java @@ -89,6 +89,61 @@ public class MultiModuleMoveTestGenerated extends AbstractMultiModuleMoveTest { runTest("idea/testData/refactoring/moveMultiModule/moveRefToLibTypeAliasImplementingLibExpectClass/moveRefToLibTypeAliasImplementingLibExpectClass.test"); } + @TestMetadata("moveSealedCheckEntireHierarchy/moveSealedCheckEntireHierarchy.test") + public void testMoveSealedCheckEntireHierarchy_MoveSealedCheckEntireHierarchy() throws Exception { + runTest("idea/testData/refactoring/moveMultiModule/moveSealedCheckEntireHierarchy/moveSealedCheckEntireHierarchy.test"); + } + + @TestMetadata("moveSealedCheckNotMember/moveSealedCheckNotMember.test") + public void testMoveSealedCheckNotMember_MoveSealedCheckNotMember() throws Exception { + runTest("idea/testData/refactoring/moveMultiModule/moveSealedCheckNotMember/moveSealedCheckNotMember.test"); + } + + @TestMetadata("moveSealedCheckOriginalPackageHasMember/moveSealedCheckOriginalPackageHasMember.test") + public void testMoveSealedCheckOriginalPackageHasMember_MoveSealedCheckOriginalPackageHasMember() throws Exception { + runTest("idea/testData/refactoring/moveMultiModule/moveSealedCheckOriginalPackageHasMember/moveSealedCheckOriginalPackageHasMember.test"); + } + + @TestMetadata("moveSealedCheckOriginalPackageHasMemberCrossModule/moveSealedCheckOriginalPackageHasMemberCrossModule.test") + public void testMoveSealedCheckOriginalPackageHasMemberCrossModule_MoveSealedCheckOriginalPackageHasMemberCrossModule() throws Exception { + runTest("idea/testData/refactoring/moveMultiModule/moveSealedCheckOriginalPackageHasMemberCrossModule/moveSealedCheckOriginalPackageHasMemberCrossModule.test"); + } + + @TestMetadata("moveSealedCheckSingleSealed/moveSealedCheckSingleSealed.test") + public void testMoveSealedCheckSingleSealed_MoveSealedCheckSingleSealed() throws Exception { + runTest("idea/testData/refactoring/moveMultiModule/moveSealedCheckSingleSealed/moveSealedCheckSingleSealed.test"); + } + + @TestMetadata("moveSealedCheckTargetPackageHasMember/moveSealedCheckTargetPackageHasMember.test") + public void testMoveSealedCheckTargetPackageHasMember_MoveSealedCheckTargetPackageHasMember() throws Exception { + runTest("idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasMember/moveSealedCheckTargetPackageHasMember.test"); + } + + @TestMetadata("moveSealedCheckTargetPackageHasMemberCrossModule/moveSealedCheckTargetPackageHasMemberCrossModule.test") + public void testMoveSealedCheckTargetPackageHasMemberCrossModule_MoveSealedCheckTargetPackageHasMemberCrossModule() throws Exception { + runTest("idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasMemberCrossModule/moveSealedCheckTargetPackageHasMemberCrossModule.test"); + } + + @TestMetadata("moveSealedCheckTargetPackageHasNoMembers/moveSealedCheckTargetPackageHasNoMembers.test") + public void testMoveSealedCheckTargetPackageHasNoMembers_MoveSealedCheckTargetPackageHasNoMembers() throws Exception { + runTest("idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasNoMembers/moveSealedCheckTargetPackageHasNoMembers.test"); + } + + @TestMetadata("moveSealedCheckTargetPackageHasNoMembersCrossModule/moveSealedCheckTargetPackageHasNoMembersCrossModule.test") + public void testMoveSealedCheckTargetPackageHasNoMembersCrossModule_MoveSealedCheckTargetPackageHasNoMembersCrossModule() throws Exception { + runTest("idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasNoMembersCrossModule/moveSealedCheckTargetPackageHasNoMembersCrossModule.test"); + } + + @TestMetadata("moveSealedCheckTargetPackageHasNoMembersCrossModuleBig/moveSealedCheckTargetPackageHasNoMembersCrossModuleBig.test") + public void testMoveSealedCheckTargetPackageHasNoMembersCrossModuleBig_MoveSealedCheckTargetPackageHasNoMembersCrossModuleBig() throws Exception { + runTest("idea/testData/refactoring/moveMultiModule/moveSealedCheckTargetPackageHasNoMembersCrossModuleBig/moveSealedCheckTargetPackageHasNoMembersCrossModuleBig.test"); + } + + @TestMetadata("moveSealedCheckWithinPackage/moveSealedCheckWithinPackage.test") + public void testMoveSealedCheckWithinPackage_MoveSealedCheckWithinPackage() throws Exception { + runTest("idea/testData/refactoring/moveMultiModule/moveSealedCheckWithinPackage/moveSealedCheckWithinPackage.test"); + } + @TestMetadata("moveToModuleWithoutLibConflict/moveToModuleWithoutLibConflict.test") public void testMoveToModuleWithoutLibConflict_MoveToModuleWithoutLibConflict() throws Exception { runTest("idea/testData/refactoring/moveMultiModule/moveToModuleWithoutLibConflict/moveToModuleWithoutLibConflict.test"); diff --git a/js/js.config/src/org/jetbrains/kotlin/utils/JsLibraryUtils.kt b/js/js.config/src/org/jetbrains/kotlin/utils/JsLibraryUtils.kt index 43fec00276d..806fcdd2d3a 100644 --- a/js/js.config/src/org/jetbrains/kotlin/utils/JsLibraryUtils.kt +++ b/js/js.config/src/org/jetbrains/kotlin/utils/JsLibraryUtils.kt @@ -1,5 +1,5 @@ /* - * Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Copyright 2010-2021 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. */ @@ -150,7 +150,7 @@ object JsLibraryUtils { val relativePath = getSuggestedPath(entryName) ?: continue val stream = zipFile.getInputStream(entry) - val content = FileUtil.loadTextAndClose(stream) + val content = stream.reader().readText() librariesWithoutSourceMaps += JsLibrary(content, relativePath, null, null) } else if (entryName.endsWith(KotlinJavascriptMetadataUtils.JS_MAP_EXT)) { @@ -166,7 +166,7 @@ object JsLibraryUtils { val zipEntry = possibleMapFiles[it.path] if (zipEntry != null) { val stream = zipFile.getInputStream(zipEntry) - val content = FileUtil.loadTextAndClose(stream) + val content = stream.reader().readText() it.copy(sourceMapContent = content) } else { diff --git a/js/js.dce/build.gradle.kts b/js/js.dce/build.gradle.kts index bd20caedd3e..d49789c44d2 100644 --- a/js/js.dce/build.gradle.kts +++ b/js/js.dce/build.gradle.kts @@ -9,6 +9,7 @@ dependencies { compile(project(":js:js.ast")) compile(project(":js:js.translator")) compileOnly(intellijCoreDep()) { includeJars("intellij-core") } + compileOnly(intellijDep()) { includeJars("guava", rootProject = rootProject) } } sourceSets { diff --git a/js/js.dce/src/org/jetbrains/kotlin/js/dce/Analyzer.kt b/js/js.dce/src/org/jetbrains/kotlin/js/dce/Analyzer.kt index aaf531ab685..6ffef6e3ee1 100644 --- a/js/js.dce/src/org/jetbrains/kotlin/js/dce/Analyzer.kt +++ b/js/js.dce/src/org/jetbrains/kotlin/js/dce/Analyzer.kt @@ -70,7 +70,7 @@ class Analyzer(private val context: Context) : JsVisitor() { } is JsFunction -> expression.name?.let { context.nodes[it]?.original }?.let { nodeMap[x] = it - it.functions += expression + it.addFunction(expression) } is JsInvocation -> { val function = expression.qualifier @@ -161,8 +161,8 @@ class Analyzer(private val context: Context) : JsVisitor() { } val dependencyNodes = dependencies.expressions - .map { it as? JsStringLiteral ?: return } - .map { if (it.value == "exports") context.currentModule else context.globalScope.member(it.value) } + .map { it as? JsStringLiteral ?: return } + .map { if (it.value == "exports") context.currentModule else context.globalScope.member(it.value) } enterFunctionWithGivenNodes(function, dependencyNodes) astNodesToSkip += invocation.qualifier @@ -237,19 +237,23 @@ class Analyzer(private val context: Context) : JsVisitor() { // - wrapFunction(function() { ... }) if (context.isDefineInlineFunction(function) && rhs.arguments.size == 2) { tryExtractFunction(rhs.arguments[1])?.let { (inlineableFunction, additionalDeps) -> - leftNode.functions += inlineableFunction + leftNode.addFunction(inlineableFunction) val defineInlineFunctionNode = context.extractNode(function) if (defineInlineFunctionNode != null) { - leftNode.dependencies += defineInlineFunctionNode + leftNode.addDependency(defineInlineFunctionNode) + } + additionalDeps.forEach { + leftNode.addDependency(it) } - leftNode.dependencies += additionalDeps return leftNode } } tryExtractFunction(rhs)?.let { (functionBody, additionalDeps) -> - leftNode.functions += functionBody - leftNode.dependencies += additionalDeps + leftNode.addFunction(functionBody) + additionalDeps.forEach { + leftNode.addDependency(it) + } return leftNode } } @@ -271,14 +275,14 @@ class Analyzer(private val context: Context) : JsVisitor() { rhs is JsFunction -> { // lhs = function() { ... } // During reachability tracking phase: eliminate it if lhs is unreachable, traverse function otherwise - leftNode.functions += rhs + leftNode.addFunction(rhs) return leftNode } - leftNode.qualifier?.memberName == Namer.METADATA -> { + leftNode.memberName == Namer.METADATA -> { // lhs.$metadata$ = expression // During reachability tracking phase: eliminate it if lhs is unreachable, traverse expression // It's commonly used to supply class's metadata - leftNode.expressions += rhs + leftNode.addExpression(rhs) return leftNode } rhs is JsObjectLiteral && rhs.propertyInitializers.isEmpty() -> return leftNode @@ -323,8 +327,8 @@ class Analyzer(private val context: Context) : JsVisitor() { if (arg == null) return val prototypeNode = context.extractNode(arg) ?: return - target.dependencies += prototypeNode.original - target.expressions += arg + target.addDependency(prototypeNode.original) + target.addExpression(arg) } // Handle typeof foo === 'undefined' ? {} : foo, where foo is FQN diff --git a/js/js.dce/src/org/jetbrains/kotlin/js/dce/Context.kt b/js/js.dce/src/org/jetbrains/kotlin/js/dce/Context.kt index d21b038b623..4a5fb3b23f1 100644 --- a/js/js.dce/src/org/jetbrains/kotlin/js/dce/Context.kt +++ b/js/js.dce/src/org/jetbrains/kotlin/js/dce/Context.kt @@ -16,6 +16,7 @@ package org.jetbrains.kotlin.js.dce +import com.google.common.collect.LinkedHashMultimap import org.jetbrains.kotlin.js.backend.ast.* import org.jetbrains.kotlin.js.backend.ast.metadata.SpecialFunction import org.jetbrains.kotlin.js.backend.ast.metadata.specialFunction @@ -24,6 +25,12 @@ import org.jetbrains.kotlin.js.translate.utils.jsAstUtils.array import org.jetbrains.kotlin.js.translate.utils.jsAstUtils.index class Context { + // Collections per Node consumes too much RAM + private val nodeDependencies = LinkedHashMultimap.create() + private val nodeExpressions = LinkedHashMultimap.create() + private val nodeFunctions = LinkedHashMultimap.create() + private val nodeUsedByAstNodes = LinkedHashMultimap.create() + val globalScope = Node() val moduleExportsNode = globalScope.member("module").member("exports") var currentModule = globalScope @@ -76,7 +83,7 @@ class Context { fun extractNode(expression: JsExpression): Node? { val node = extractNodeImpl(expression)?.original - return if (node != null && moduleExportsNode in generateSequence(node) { it.qualifier?.parent }) { + return if (node != null && moduleExportsNode in generateSequence(node) { it.parent }) { val path = node.pathFromRoot().drop(2) path.fold(currentModule.original) { n, memberName -> n.member(memberName) } } @@ -126,22 +133,32 @@ class Context { } } - class Node private constructor(val localName: JsName?, qualifier: Qualifier?) { - private val dependenciesImpl = mutableSetOf() - private val expressionsImpl = mutableSetOf() - private val functionsImpl = mutableSetOf() + private var currentColor = 1.toByte() + + fun clearVisited() { + currentColor++ + } + + fun visit(n: Node) = n.visit(currentColor) + + inner class Node private constructor(val localName: JsName?, parent: Node?, val memberName: String?) { + private var _membersImpl: MutableMap? = null + + private val membersImpl: MutableMap + get() = _membersImpl ?: mutableMapOf().also { _membersImpl = it } + + private var rank = 0 private var hasSideEffectsImpl = false private var reachableImpl = false private var declarationReachableImpl = false - private val membersImpl = mutableMapOf() - private val usedByAstNodesImpl = mutableSetOf() - private var rank = 0 - val dependencies: MutableSet get() = original.dependenciesImpl + val dependencies: Set get() = nodeDependencies[original] - val expressions: MutableSet get() = original.expressionsImpl + val expressions: Set get() = nodeExpressions[original] - val functions: MutableSet get() = original.functionsImpl + val functions: Set get() = nodeFunctions[original] + + val usedByAstNodes: Set get() = nodeUsedByAstNodes[original] var hasSideEffects: Boolean get() = original.hasSideEffectsImpl @@ -161,15 +178,20 @@ class Context { original.declarationReachableImpl = value } - var qualifier: Qualifier? = qualifier - get + var parent: Node? = parent private set - val usedByAstNodes: MutableSet get() = original.usedByAstNodesImpl + private var color: Byte = 0 - val memberNames: MutableSet get() = original.membersImpl.keys + fun visit(c: Byte): Boolean { + val result = color != c + color = c + return result + } - constructor(localName: JsName? = null) : this(localName, null) + val memberNames: Set get() = original._membersImpl?.keys ?: emptySet() + + constructor(localName: JsName? = null) : this(localName, null, null) var original: Node = this get() { @@ -180,22 +202,38 @@ class Context { } private set - val members: Map get() = original.membersImpl + val members: Map get() = original._membersImpl ?: emptyMap() - fun member(name: String): Node = original.membersImpl.getOrPut(name) { Node(null, Qualifier(this, name)) }.original + fun addDependency(node: Node) { + nodeDependencies.put(original, node) + } + + fun addFunction(function: JsFunction) { + nodeFunctions.put(original, function) + } + + fun addExpression(expression: JsExpression) { + nodeExpressions.put(original, expression) + } + + fun addUsedByAstNode(node: JsNode) { + nodeUsedByAstNodes.put(original, node) + } + + fun member(name: String): Node = original.membersImpl.getOrPut(name) { Node(null, this, name) }.original fun alias(other: Node) { val a = original val b = other.original if (a == b) return - if (a.qualifier == null && b.qualifier == null) { + if (a.parent == null && b.parent == null) { a.merge(b) } - else if (a.qualifier == null) { + else if (a.parent == null) { if (b.root() == a) a.makeDependencies(b) else b.evacuateFrom(a) } - else if (b.qualifier == null) { + else if (b.parent == null) { if (a.root() == b) a.makeDependencies(b) else a.evacuateFrom(b) } else { @@ -204,8 +242,8 @@ class Context { } private fun makeDependencies(other: Node) { - dependenciesImpl += other - other.dependenciesImpl += this + nodeDependencies.put(this, other) + nodeDependencies.put(other, this) } private fun evacuateFrom(other: Node) { @@ -214,25 +252,25 @@ class Context { for ((name, member) in newMembers) { membersImpl[name] = member - member.original.qualifier = Qualifier(this, member.original.qualifier!!.memberName) + member.original.parent = this } for ((name, member) in existingMembers) { membersImpl[name]!!.original.merge(member.original) membersImpl[name] = member.original - member.original.qualifier = Qualifier(this, member.original.qualifier!!.memberName) + member.original.parent = this } other.membersImpl.clear() hasSideEffectsImpl = hasSideEffectsImpl || other.hasSideEffectsImpl - expressionsImpl += other.expressionsImpl - functionsImpl += other.functionsImpl - dependenciesImpl += other.dependenciesImpl - usedByAstNodesImpl += other.usedByAstNodesImpl + nodeExpressions.putAll(this, nodeExpressions[other]) + nodeFunctions.putAll(this, nodeFunctions[other]) + nodeDependencies.putAll(this, nodeDependencies[other]) + nodeUsedByAstNodes.putAll(this, nodeUsedByAstNodes[other]) - other.expressionsImpl.clear() - other.functionsImpl.clear() - other.dependenciesImpl.clear() - other.usedByAstNodesImpl.clear() + nodeExpressions.removeAll(other) + nodeFunctions.removeAll(other) + nodeDependencies.removeAll(other) + nodeUsedByAstNodes.removeAll(other) } private fun merge(other: Node) { @@ -250,14 +288,12 @@ class Context { } } - fun root(): Node = generateSequence(original) { it.qualifier?.parent?.original }.last() + fun root(): Node = generateSequence(original) { it.parent?.original }.last() fun pathFromRoot(): List = - generateSequence(original) { it.qualifier?.parent?.original }.mapNotNull { it.qualifier?.memberName } + generateSequence(original) { it.parent?.original }.mapNotNull { it.memberName } .toList().asReversed() override fun toString(): String = (root().localName?.ident ?: "") + pathFromRoot().joinToString("") { ".$it" } } - - class Qualifier(val parent: Node, val memberName: String) -} \ No newline at end of file +} diff --git a/js/js.dce/src/org/jetbrains/kotlin/js/dce/DeadCodeElimination.kt b/js/js.dce/src/org/jetbrains/kotlin/js/dce/DeadCodeElimination.kt index 3e1c56a526d..789c5f2e815 100644 --- a/js/js.dce/src/org/jetbrains/kotlin/js/dce/DeadCodeElimination.kt +++ b/js/js.dce/src/org/jetbrains/kotlin/js/dce/DeadCodeElimination.kt @@ -38,15 +38,21 @@ import org.jetbrains.kotlin.js.util.TextOutputImpl import java.io.File import java.io.InputStreamReader -class DeadCodeElimination(private val logConsumer: (DCELogLevel, String) -> Unit) { +class DeadCodeElimination( + private val printReachabilityInfo: Boolean, + private val logConsumer: (DCELogLevel, String) -> Unit +) { val moduleMapping = mutableMapOf() private val reachableNames = mutableSetOf() - var reachableNodes = setOf() + var reachableNodes: Iterable = setOf() private set + var context: Context? = null + fun apply(root: JsNode) { val context = Context() + this.context = context val topLevelVars = collectDefinedNames(root) context.addNodesForLocalVars(topLevelVars) @@ -58,7 +64,7 @@ class DeadCodeElimination(private val logConsumer: (DCELogLevel, String) -> Unit analyzer.moduleMapping += moduleMapping root.accept(analyzer) - val usageFinder = ReachabilityTracker(context, analyzer.analysisResult, logConsumer) + val usageFinder = ReachabilityTracker(context, analyzer.analysisResult, logConsumer.takeIf { printReachabilityInfo }) root.accept(usageFinder) for (reachableName in reachableNames) { @@ -75,10 +81,11 @@ class DeadCodeElimination(private val logConsumer: (DCELogLevel, String) -> Unit fun run( inputFiles: Collection, rootReachableNames: Set, + printReachabilityInfo: Boolean, logConsumer: (DCELogLevel, String) -> Unit ): DeadCodeEliminationResult { val program = JsProgram() - val dce = DeadCodeElimination(logConsumer) + val dce = DeadCodeElimination(printReachabilityInfo, logConsumer) var hasErrors = false val blocks = inputFiles.map { file -> @@ -107,7 +114,7 @@ class DeadCodeElimination(private val logConsumer: (DCELogLevel, String) -> Unit block } - if (hasErrors) return DeadCodeEliminationResult(emptySet(), DeadCodeEliminationStatus.FAILED) + if (hasErrors) return DeadCodeEliminationResult(dce.context, emptySet(), DeadCodeEliminationStatus.FAILED) program.globalBlock.statements += blocks program.globalBlock.fixForwardNameReferences() @@ -139,7 +146,7 @@ class DeadCodeElimination(private val logConsumer: (DCELogLevel, String) -> Unit } } - return DeadCodeEliminationResult(dce.reachableNodes, DeadCodeEliminationStatus.OK) + return DeadCodeEliminationResult(dce.context, dce.reachableNodes, DeadCodeEliminationStatus.OK) } private class Reporter(private val fileName: String, private val logConsumer: (DCELogLevel, String) -> Unit) : ErrorReporter { diff --git a/js/js.dce/src/org/jetbrains/kotlin/js/dce/DeadCodeEliminationResult.kt b/js/js.dce/src/org/jetbrains/kotlin/js/dce/DeadCodeEliminationResult.kt index 8c64569acf1..335538e3371 100644 --- a/js/js.dce/src/org/jetbrains/kotlin/js/dce/DeadCodeEliminationResult.kt +++ b/js/js.dce/src/org/jetbrains/kotlin/js/dce/DeadCodeEliminationResult.kt @@ -16,4 +16,4 @@ package org.jetbrains.kotlin.js.dce -class DeadCodeEliminationResult(val reachableNodes: Set, val status: DeadCodeEliminationStatus) \ No newline at end of file +class DeadCodeEliminationResult(val context: Context?, val reachableNodes: Iterable, val status: DeadCodeEliminationStatus) \ No newline at end of file diff --git a/js/js.dce/src/org/jetbrains/kotlin/js/dce/ReachabilityTracker.kt b/js/js.dce/src/org/jetbrains/kotlin/js/dce/ReachabilityTracker.kt index ea44bb14514..ddee4a7bc7f 100644 --- a/js/js.dce/src/org/jetbrains/kotlin/js/dce/ReachabilityTracker.kt +++ b/js/js.dce/src/org/jetbrains/kotlin/js/dce/ReachabilityTracker.kt @@ -23,17 +23,21 @@ import org.jetbrains.kotlin.js.inline.util.collectLocalVariables class ReachabilityTracker( private val context: Context, private val analysisResult: AnalysisResult, - private val logConsumer: (DCELogLevel, String) -> Unit + private val logConsumer: ((DCELogLevel, String) -> Unit)? ) : RecursiveJsVisitor() { companion object { private val CALL_FUNCTIONS = setOf("call", "apply") } + init { + context.clearVisited() + } + private var currentNodeWithLocation: JsNode? = null private var depth = 0 - private val reachableNodesImpl = mutableSetOf() + private val reachableNodesImpl = mutableListOf() - val reachableNodes: Set get() = reachableNodesImpl + val reachableNodes: Iterable get() = reachableNodesImpl override fun visit(x: JsVars.JsVar) { if (shouldTraverse(x)) { @@ -76,7 +80,7 @@ class ReachabilityTracker( if (!node.reachable) { reportAndNest("reach: referenced name $node", currentNodeWithLocation) { reach(node) - currentNodeWithLocation?.let { node.usedByAstNodes += it } + currentNodeWithLocation?.let { node.addUsedByAstNode(it) } } } return false @@ -98,10 +102,10 @@ class ReachabilityTracker( invocation in analysisResult.invocationsToSkip -> {} else -> { val node = context.extractNode(invocation.qualifier) - if (node != null && node.qualifier?.memberName in CALL_FUNCTIONS) { - val parent = node.qualifier!!.parent + if (node != null && node.memberName in CALL_FUNCTIONS) { + val parent = node.parent!! reach(parent) - currentNodeWithLocation?.let { parent.usedByAstNodes += it } + currentNodeWithLocation?.let { parent.addUsedByAstNode(it) } } super.visitInvocation(invocation) } @@ -137,7 +141,9 @@ class ReachabilityTracker( fun reach(node: Node) { if (node.reachable) return node.reachable = true - reachableNodesImpl += node + if (context.visit(node)) { + reachableNodesImpl += node + } reachDeclaration(node) @@ -172,15 +178,14 @@ class ReachabilityTracker( var current = node while (true) { for (ancestorDependency in current.dependencies) { - if (current in generateSequence(ancestorDependency) { it.qualifier?.parent }) continue + if (current in generateSequence(ancestorDependency) { it.parent }) continue val dependency = path.asReversed().fold(ancestorDependency) { n, memberName -> n.member(memberName) } if (!dependency.reachable) { reportAndNest("reach: dependency $dependency", null) { reach(dependency) } } } - val qualifier = current.qualifier ?: break - path += qualifier.memberName - current = qualifier.parent + path += current.memberName ?: break + current = current.parent!! // memberName != null => parent != null } } @@ -192,9 +197,11 @@ class ReachabilityTracker( } else if (!node.declarationReachable) { node.declarationReachable = true - reachableNodesImpl += node + if (context.visit(node)) { + reachableNodesImpl += node + } - node.original.qualifier?.parent?.let { + node.original.parent?.let { reportAndNest("reach-decl: parent $it", null) { reachDeclaration(it) } @@ -230,14 +237,15 @@ class ReachabilityTracker( currentNodeWithLocation = old } - private fun report(message: String) { - logConsumer(DCELogLevel.INFO, " ".repeat(depth) + message) - } - private fun reportAndNest(message: String, dueTo: JsNode?, action: () -> Unit) { - val location = dueTo?.extractLocation() - val fullMessage = if (location != null) "$message (due to ${location.asString()})" else message - report(fullMessage) + if (logConsumer != null) { + val indent = " ".repeat(depth) + val fullMessage = when (val location = dueTo?.extractLocation()) { + null -> "$indent$message" + else -> "$indent$message (due to ${location.asString()})" + } + logConsumer.invoke(DCELogLevel.INFO, fullMessage) + } nested(action) } diff --git a/js/js.dce/src/org/jetbrains/kotlin/js/dce/printTree.kt b/js/js.dce/src/org/jetbrains/kotlin/js/dce/printTree.kt index 7da25da5839..08509f8a728 100644 --- a/js/js.dce/src/org/jetbrains/kotlin/js/dce/printTree.kt +++ b/js/js.dce/src/org/jetbrains/kotlin/js/dce/printTree.kt @@ -24,7 +24,7 @@ fun printTree(root: Node, consumer: (String) -> Unit, printNestedMembers: Boolea private fun printTree(node: Node, consumer: (String) -> Unit, depth: Int, settings: Settings) { val sb = StringBuilder() - sb.append(" ".repeat(depth)).append(node.qualifier?.memberName ?: node.toString()) + sb.append(" ".repeat(depth)).append(node.memberName ?: node.toString()) if (node.reachable) { sb.append(" (reachable") diff --git a/js/js.dce/src/org/jetbrains/kotlin/js/dce/util.kt b/js/js.dce/src/org/jetbrains/kotlin/js/dce/util.kt index f984ad4f411..020c5281c2a 100644 --- a/js/js.dce/src/org/jetbrains/kotlin/js/dce/util.kt +++ b/js/js.dce/src/org/jetbrains/kotlin/js/dce/util.kt @@ -73,20 +73,21 @@ fun JsLocation.asString(): String { return "$simpleFileName:${startLine + 1}" } -fun Set.extractRoots(): Set { - val result = mutableSetOf() - val visited = mutableSetOf() - forEach { it.original.extractRootsImpl(result, visited) } +fun Iterable.extractReachableRoots(context: Context): Iterable { + context.clearVisited() + + val result = mutableListOf() + forEach { if (it.reachable) it.original.extractRootsImpl(result, context) } return result } -private fun Node.extractRootsImpl(target: MutableSet, visited: MutableSet) { - if (!visited.add(original)) return - val qualifier = original.qualifier - if (qualifier == null) { +private fun Node.extractRootsImpl(target: MutableList, context: Context) { + if (!context.visit(original)) return + val parent = original.parent + if (parent == null) { target += original } else { - qualifier.parent.extractRootsImpl(target, visited) + parent.extractRootsImpl(target, context) } } diff --git a/js/js.frontend/src/org/jetbrains/kotlin/js/naming/NameSuggestion.kt b/js/js.frontend/src/org/jetbrains/kotlin/js/naming/NameSuggestion.kt index 2fdcd368660..cb9abc35d09 100644 --- a/js/js.frontend/src/org/jetbrains/kotlin/js/naming/NameSuggestion.kt +++ b/js/js.frontend/src/org/jetbrains/kotlin/js/naming/NameSuggestion.kt @@ -360,27 +360,53 @@ class NameSuggestion { } } +private fun Char.isAllowedLatinLetterOrSpecial(): Boolean { + return this in 'a'..'z' || this in 'A'..'Z' || this == '_' || this == '$' +} + +private fun Char.isAllowedSimpleDigit() = + this in '0'..'9' + +private fun Char.isNotAllowedSimpleCharacter() = when (this) { + ' ', '<', '>', '-', '?' -> true + else -> false +} + +fun Char.isES5IdentifierStart(): Boolean { + if (isAllowedLatinLetterOrSpecial()) return true + if (isNotAllowedSimpleCharacter()) return false + + return isES5IdentifierStartFull() +} + // See ES 5.1 spec: https://www.ecma-international.org/ecma-262/5.1/#sec-7.6 -fun Char.isES5IdentifierStart() = - Character.isLetter(this) || // Lu | Ll | Lt | Lm | Lo - Character.getType(this).toByte() == Character.LETTER_NUMBER || - // Nl which is missing in Character.isLetter, but present in UnicodeLetter in spec - this == '_' || - this == '$' +private fun Char.isES5IdentifierStartFull() = + Character.isLetter(this) || // Lu | Ll | Lt | Lm | Lo + // Nl which is missing in Character.isLetter, but present in UnicodeLetter in spec + Character.getType(this).toByte() == Character.LETTER_NUMBER -fun Char.isES5IdentifierPart() = - isES5IdentifierStart() || - when (Character.getType(this).toByte()) { - Character.NON_SPACING_MARK, - Character.COMBINING_SPACING_MARK, - Character.DECIMAL_DIGIT_NUMBER, - Character.CONNECTOR_PUNCTUATION -> true - else -> false - } || - this == '\u200C' || // Zero-width non-joiner - this == '\u200D' // Zero-width joiner -fun String.isValidES5Identifier() = - isNotEmpty() && - first().isES5IdentifierStart() && - drop(1).all { it.isES5IdentifierPart() } +fun Char.isES5IdentifierPart(): Boolean { + if (isAllowedLatinLetterOrSpecial()) return true + if (isAllowedSimpleDigit()) return true + if (isNotAllowedSimpleCharacter()) return false + + return isES5IdentifierStartFull() || + when (Character.getType(this).toByte()) { + Character.NON_SPACING_MARK, + Character.COMBINING_SPACING_MARK, + Character.DECIMAL_DIGIT_NUMBER, + Character.CONNECTOR_PUNCTUATION -> true + else -> false + } || + this == '\u200C' || // Zero-width non-joiner + this == '\u200D' // Zero-width joiner +} + +fun String.isValidES5Identifier(): Boolean { + if (isEmpty() || !this[0].isES5IdentifierStart()) return false + for (idx in 1 ..length-1) { + if (!get(idx).isES5IdentifierPart()) return false + } + return true +} \ No newline at end of file diff --git a/js/js.tests/test/org/jetbrains/kotlin/benchmarks/GenerateIrRuntime.kt b/js/js.tests/test/org/jetbrains/kotlin/benchmarks/GenerateIrRuntime.kt index 9756a8f1c4a..d6d220ad8b9 100644 --- a/js/js.tests/test/org/jetbrains/kotlin/benchmarks/GenerateIrRuntime.kt +++ b/js/js.tests/test/org/jetbrains/kotlin/benchmarks/GenerateIrRuntime.kt @@ -12,7 +12,6 @@ import com.intellij.openapi.vfs.VfsUtilCore import com.intellij.openapi.vfs.VirtualFileManager import com.intellij.psi.PsiManager import org.jetbrains.kotlin.analyzer.AnalysisResult -import org.jetbrains.kotlin.backend.common.LoggingContext import org.jetbrains.kotlin.backend.common.phaser.PhaseConfig import org.jetbrains.kotlin.backend.common.phaser.invokeToplevel import org.jetbrains.kotlin.backend.common.serialization.KlibIrVersion @@ -30,7 +29,6 @@ import org.jetbrains.kotlin.descriptors.konan.kotlinLibrary import org.jetbrains.kotlin.incremental.ChangedFiles import org.jetbrains.kotlin.incremental.EmptyICReporter import org.jetbrains.kotlin.incremental.IncrementalJsCompilerRunner -import org.jetbrains.kotlin.incremental.components.LookupTracker import org.jetbrains.kotlin.incremental.multiproject.EmptyModulesApiHistory import org.jetbrains.kotlin.incremental.withJsIC import org.jetbrains.kotlin.ir.backend.js.* @@ -65,18 +63,14 @@ import org.junit.Before import org.junit.Ignore import org.junit.Test import java.io.File -import kotlin.io.path.* +import kotlin.io.path.ExperimentalPathApi +import kotlin.io.path.createTempDirectory +import kotlin.io.path.createTempFile import org.jetbrains.kotlin.konan.file.File as KonanFile @OptIn(ExperimentalPathApi::class) @Ignore class GenerateIrRuntime { - private val lookupTracker: LookupTracker = LookupTracker.DO_NOTHING - private val logger = object : LoggingContext { - override var inVerbosePhase = false - override fun log(message: () -> String) {} - } - fun loadKlib(klibPath: String, isPacked: Boolean) = createKotlinLibrary(KonanFile("$klibPath${if (isPacked) ".klib" else ""}")) private fun buildConfiguration(environment: KotlinCoreEnvironment): CompilerConfiguration { @@ -462,7 +456,7 @@ class GenerateIrRuntime { val irLinker = JsIrLinker( psi2IrContext.moduleDescriptor, - emptyLoggingContext, + IrMessageLogger.None, psi2IrContext.irBuiltIns, psi2IrContext.symbolTable, functionFactory, @@ -482,6 +476,7 @@ class GenerateIrRuntime { moduleName, project, configuration, + IrMessageLogger.None, bindingContext, files, tmpKlibDir, @@ -504,7 +499,7 @@ class GenerateIrRuntime { private fun doSerializeIrModule(module: IrModuleFragment): SerializedIrModule { - val serializedIr = JsIrModuleSerializer(logger, module.irBuiltins, mutableMapOf(), true).serializedIrModule(module) + val serializedIr = JsIrModuleSerializer(IrMessageLogger.None, module.irBuiltins, mutableMapOf(), true).serializedIrModule(module) return serializedIr } @@ -524,12 +519,12 @@ class GenerateIrRuntime { val functionFactory = IrFunctionFactory(irBuiltIns, symbolTable) irBuiltIns.functionFactory = functionFactory - val jsLinker = JsIrLinker(moduleDescriptor, logger, irBuiltIns, symbolTable, functionFactory, null) + val jsLinker = JsIrLinker(moduleDescriptor, IrMessageLogger.None, irBuiltIns, symbolTable, functionFactory, null) val moduleFragment = jsLinker.deserializeFullModule(moduleDescriptor, moduleDescriptor.kotlinLibrary) jsLinker.init(null, emptyList()) // Create stubs - ExternalDependenciesGenerator(symbolTable, listOf(jsLinker), languageVersionSettings) + ExternalDependenciesGenerator(symbolTable, listOf(jsLinker)) .generateUnboundSymbolsAsDependencies() jsLinker.postProcess() @@ -554,13 +549,13 @@ class GenerateIrRuntime { val functionFactory = IrFunctionFactory(irBuiltIns, symbolTable) irBuiltIns.functionFactory = functionFactory - val jsLinker = JsIrLinker(moduleDescriptor, logger, irBuiltIns, symbolTable, functionFactory, null) + val jsLinker = JsIrLinker(moduleDescriptor, IrMessageLogger.None, irBuiltIns, symbolTable, functionFactory, null) val moduleFragment = jsLinker.deserializeFullModule(moduleDescriptor, moduleDescriptor.kotlinLibrary) // Create stubs jsLinker.init(null, emptyList()) // Create stubs - ExternalDependenciesGenerator(symbolTable, listOf(jsLinker), languageVersionSettings) + ExternalDependenciesGenerator(symbolTable, listOf(jsLinker)) .generateUnboundSymbolsAsDependencies() jsLinker.postProcess() @@ -574,7 +569,7 @@ class GenerateIrRuntime { private fun doBackEnd(module: IrModuleFragment, symbolTable: SymbolTable, irBuiltIns: IrBuiltIns, jsLinker: JsIrLinker): CompilerResult { val context = JsIrBackendContext(module.descriptor, irBuiltIns, symbolTable, module, emptySet(), configuration) - ExternalDependenciesGenerator(symbolTable, listOf(jsLinker), languageVersionSettings).generateUnboundSymbolsAsDependencies() + ExternalDependenciesGenerator(symbolTable, listOf(jsLinker)).generateUnboundSymbolsAsDependencies() jsPhases.invokeToplevel(phaseConfig, context, listOf(module)) diff --git a/js/js.tests/test/org/jetbrains/kotlin/generators/tests/GenerateJsTests.kt b/js/js.tests/test/org/jetbrains/kotlin/generators/tests/GenerateJsTests.kt index de2b7e14f67..30f955daf95 100644 --- a/js/js.tests/test/org/jetbrains/kotlin/generators/tests/GenerateJsTests.kt +++ b/js/js.tests/test/org/jetbrains/kotlin/generators/tests/GenerateJsTests.kt @@ -70,15 +70,15 @@ fun main(args: Array) { testGroup("js/js.tests/tests-gen", "compiler/testData", testRunnerMethodName = "runTest0") { testClass { - model("codegen/box", targetBackend = TargetBackend.JS) + model("codegen/box", targetBackend = TargetBackend.JS, excludeDirs = listOf("compileKotlinAgainstKotlin")) } testClass { - model("codegen/box", targetBackend = TargetBackend.JS_IR) + model("codegen/box", targetBackend = TargetBackend.JS_IR, excludeDirs = listOf("compileKotlinAgainstKotlin")) } testClass { - model("codegen/boxError", targetBackend = TargetBackend.JS_IR) + model("codegen/boxError", targetBackend = TargetBackend.JS_IR, excludeDirs = listOf("compileKotlinAgainstKotlin")) } testClass { @@ -103,7 +103,9 @@ fun main(args: Array) { // TODO: Support delegated properties "delegatedProperty", - "oldLanguageVersions" + "oldLanguageVersions", + + "compileKotlinAgainstKotlin" ) ) } diff --git a/js/js.tests/test/org/jetbrains/kotlin/js/test/AbstractDceTest.kt b/js/js.tests/test/org/jetbrains/kotlin/js/test/AbstractDceTest.kt index a0f9321e00e..1152f055fd3 100644 --- a/js/js.tests/test/org/jetbrains/kotlin/js/test/AbstractDceTest.kt +++ b/js/js.tests/test/org/jetbrains/kotlin/js/test/AbstractDceTest.kt @@ -28,7 +28,7 @@ abstract class AbstractDceTest : TestCase() { val fileContents = file.readText() val inputFile = InputFile(InputResource.file(filePath), null, File(pathToOutputDir, file.relativeTo(File(pathToTestDir)).path).path, "main") - val dceResult = DeadCodeElimination.run(setOf(inputFile), extractDeclarations(REQUEST_REACHABLE_PATTERN, fileContents)) { _, _ -> } + val dceResult = DeadCodeElimination.run(setOf(inputFile), extractDeclarations(REQUEST_REACHABLE_PATTERN, fileContents), true) { _, _ -> } val reachableNodeStrings = dceResult.reachableNodes.map { it.toString().removePrefix(".") }.toSet() for (assertedDeclaration in extractDeclarations(ASSERT_REACHABLE_PATTERN, fileContents)) { diff --git a/js/js.tests/test/org/jetbrains/kotlin/js/test/BasicBoxTest.kt b/js/js.tests/test/org/jetbrains/kotlin/js/test/BasicBoxTest.kt index 85e82f97a6c..66329a57297 100644 --- a/js/js.tests/test/org/jetbrains/kotlin/js/test/BasicBoxTest.kt +++ b/js/js.tests/test/org/jetbrains/kotlin/js/test/BasicBoxTest.kt @@ -96,6 +96,9 @@ abstract class BasicBoxTest( protected open val testChecker get() = if (runTestInNashorn) NashornJsTestChecker else V8JsTestChecker + protected val logger = KotlinJsTestLogger() + + fun doTest(filePath: String) { doTestWithIgnoringByFailFile(filePath, coroutinesPackage = "") } @@ -119,6 +122,9 @@ abstract class BasicBoxTest( open fun doTest(filePath: String, expectedResult: String, mainCallParameters: MainCallParameters, coroutinesPackage: String = "") { val file = File(filePath) + + logger.logFile("Test file", file) + val outputDir = getOutputDir(file) val dceOutputDir = getOutputDir(file, testGroupOutputDirForMinification) val pirOutputDir = getOutputDir(file, testGroupOutputDirForPir) @@ -188,6 +194,8 @@ abstract class BasicBoxTest( val dceOutputFileName = module.outputFileName(dceOutputDir) + ".js" val pirOutputFileName = module.outputFileName(pirOutputDir) + ".js" val isMainModule = mainModuleName == module.name + + logger.logFile("Output JS", File(outputFileName)) generateJavaScriptFile( testFactory.tmpDir, file.parent, @@ -928,7 +936,7 @@ abstract class BasicBoxTest( "kotlin-test.kotlin.test.DefaultAsserter" ) val allFilesToMinify = filesToMinify.values + kotlinJsInputFile + kotlinTestJsInputFile - val dceResult = DeadCodeElimination.run(allFilesToMinify, additionalReachableNodes) { _, _ -> } + val dceResult = DeadCodeElimination.run(allFilesToMinify, additionalReachableNodes, true) { _, _ -> } val reachableNodes = dceResult.reachableNodes minificationThresholdChecker(reachableNodes.count { it.reachable }) @@ -1115,3 +1123,13 @@ fun KotlinTestWithEnvironment.createPsiFile(fileName: String): KtFile { } fun KotlinTestWithEnvironment.createPsiFiles(fileNames: List): List = fileNames.map(this::createPsiFile) + +class KotlinJsTestLogger { + val verbose = getBoolean("kotlin.js.test.verbose") + + fun logFile(description: String, file: File) { + if (verbose) { + println("TEST_LOG: $description file://${file.absolutePath}") + } + } +} diff --git a/js/js.tests/test/org/jetbrains/kotlin/js/test/BasicIrBoxTest.kt b/js/js.tests/test/org/jetbrains/kotlin/js/test/BasicIrBoxTest.kt index 78e2f0ee109..8456dbd2f6e 100644 --- a/js/js.tests/test/org/jetbrains/kotlin/js/test/BasicIrBoxTest.kt +++ b/js/js.tests/test/org/jetbrains/kotlin/js/test/BasicIrBoxTest.kt @@ -110,12 +110,14 @@ abstract class BasicIrBoxTest( } if (isMainModule) { + logger.logFile("Output JS", outputFile) + val debugMode = getBoolean("kotlin.js.debugMode") val phaseConfig = if (debugMode) { val allPhasesSet = jsPhases.toPhaseMap().values.toSet() val dumpOutputDir = File(outputFile.parent, outputFile.nameWithoutExtension + "-irdump") - println("\n ------ Dumping phases to file://$dumpOutputDir") + logger.logFile("Dumping phasesTo", dumpOutputDir) PhaseConfig( jsPhases, dumpToDirectory = dumpOutputDir.path, @@ -150,8 +152,9 @@ abstract class BasicIrBoxTest( compiledModule.dceJsCode?.writeTo(dceOutputFile, config) if (generateDts) { - val dtsFile = outputFile.withReplacedExtensionOrNull("_v5.js", ".d.ts") - dtsFile?.write(compiledModule.tsDefinitions ?: error("No ts definitions")) + val dtsFile = outputFile.withReplacedExtensionOrNull("_v5.js", ".d.ts")!! + logger.logFile("Output d.ts", dtsFile) + dtsFile.write(compiledModule.tsDefinitions ?: error("No ts definitions")) } } @@ -185,6 +188,8 @@ abstract class BasicIrBoxTest( nopack = true ) + logger.logFile("Output klib", File(actualOutputFile)) + compilationCache[outputFile.name.replace(".js", ".meta.js")] = actualOutputFile } } diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/es6/semantics/IrJsCodegenBoxES6TestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/es6/semantics/IrJsCodegenBoxES6TestGenerated.java index 21993b93b26..616a670a869 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/es6/semantics/IrJsCodegenBoxES6TestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/es6/semantics/IrJsCodegenBoxES6TestGenerated.java @@ -75,6 +75,19 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes } } + @TestMetadata("compiler/testData/codegen/box/annotations/kClassMapping") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class KClassMapping extends AbstractIrJsCodegenBoxES6Test { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR_ES6, testDataFilePath); + } + + public void testAllFilesPresentInKClassMapping() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/annotations/kClassMapping"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true); + } + } + @TestMetadata("compiler/testData/codegen/box/annotations/typeAnnotations") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) @@ -4145,6 +4158,521 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes } } + @TestMetadata("compiler/testData/codegen/box/compileKotlinAgainstKotlin") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class CompileKotlinAgainstKotlin extends AbstractIrJsCodegenBoxES6Test { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR_ES6, testDataFilePath); + } + + public void testAllFilesPresentInCompileKotlinAgainstKotlin() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/compileKotlinAgainstKotlin"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true); + } + + @TestMetadata("callDeserializedPropertyOnInlineClassType.kt") + public void testCallDeserializedPropertyOnInlineClassType() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/callDeserializedPropertyOnInlineClassType.kt"); + } + + @TestMetadata("clashingFakeOverrideSignatures.kt") + public void testClashingFakeOverrideSignatures() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/clashingFakeOverrideSignatures.kt"); + } + + @TestMetadata("classInObject.kt") + public void testClassInObject() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/classInObject.kt"); + } + + @TestMetadata("companionObjectInEnum.kt") + public void testCompanionObjectInEnum() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/companionObjectInEnum.kt"); + } + + @TestMetadata("companionObjectMember.kt") + public void testCompanionObjectMember() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/companionObjectMember.kt"); + } + + @TestMetadata("constructorVararg.kt") + public void testConstructorVararg() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/constructorVararg.kt"); + } + + @TestMetadata("constructorWithInlineClassParametersInBinaryDependencies.kt") + public void testConstructorWithInlineClassParametersInBinaryDependencies() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/constructorWithInlineClassParametersInBinaryDependencies.kt"); + } + + @TestMetadata("copySamOnInline.kt") + public void testCopySamOnInline() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/copySamOnInline.kt"); + } + + @TestMetadata("copySamOnInline2.kt") + public void testCopySamOnInline2() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/copySamOnInline2.kt"); + } + + @TestMetadata("coroutinesBinary.kt") + public void testCoroutinesBinary() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/coroutinesBinary.kt"); + } + + @TestMetadata("defaultConstructor.kt") + public void testDefaultConstructor() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/defaultConstructor.kt"); + } + + @TestMetadata("defaultWithInlineClassAndReceivers.kt") + public void testDefaultWithInlineClassAndReceivers() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/defaultWithInlineClassAndReceivers.kt"); + } + + @TestMetadata("delegatedDefault.kt") + public void testDelegatedDefault() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/delegatedDefault.kt"); + } + + @TestMetadata("doublyNestedClass.kt") + public void testDoublyNestedClass() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/doublyNestedClass.kt"); + } + + @TestMetadata("enum.kt") + public void testEnum() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/enum.kt"); + } + + @TestMetadata("expectClassActualTypeAlias.kt") + public void testExpectClassActualTypeAlias() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/expectClassActualTypeAlias.kt"); + } + + @TestMetadata("inlineClassFakeOverrideMangling.kt") + public void testInlineClassFakeOverrideMangling() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/inlineClassFakeOverrideMangling.kt"); + } + + @TestMetadata("inlineClassFromBinaryDependencies.kt") + public void testInlineClassFromBinaryDependencies() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/inlineClassFromBinaryDependencies.kt"); + } + + @TestMetadata("inlineClassInlineFunctionCall.kt") + public void testInlineClassInlineFunctionCall() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/inlineClassInlineFunctionCall.kt"); + } + + @TestMetadata("inlineClassInlineProperty.kt") + public void testInlineClassInlineProperty() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/inlineClassInlineProperty.kt"); + } + + @TestMetadata("inlineClassesOldMangling.kt") + public void testInlineClassesOldMangling() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/inlineClassesOldMangling.kt"); + } + + @TestMetadata("innerClassConstructor.kt") + public void testInnerClassConstructor() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/innerClassConstructor.kt"); + } + + @TestMetadata("interfaceDelegationAndBridgesProcessing.kt") + public void testInterfaceDelegationAndBridgesProcessing() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/interfaceDelegationAndBridgesProcessing.kt"); + } + + @TestMetadata("internalSetterOverridden.kt") + public void testInternalSetterOverridden() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/internalSetterOverridden.kt"); + } + + @TestMetadata("internalWithDefaultArgs.kt") + public void testInternalWithDefaultArgs() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/internalWithDefaultArgs.kt"); + } + + @TestMetadata("internalWithInlineClass.kt") + public void testInternalWithInlineClass() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/internalWithInlineClass.kt"); + } + + @TestMetadata("internalWithOtherModuleName.kt") + public void testInternalWithOtherModuleName() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/internalWithOtherModuleName.kt"); + } + + @TestMetadata("kt14012.kt") + public void testKt14012() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/kt14012.kt"); + } + + @TestMetadata("kt21775.kt") + public void testKt21775() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/kt21775.kt"); + } + + @TestMetadata("nestedClass.kt") + public void testNestedClass() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/nestedClass.kt"); + } + + @TestMetadata("nestedClassInAnnotationArgument.kt") + public void testNestedClassInAnnotationArgument() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/nestedClassInAnnotationArgument.kt"); + } + + @TestMetadata("nestedEnum.kt") + public void testNestedEnum() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/nestedEnum.kt"); + } + + @TestMetadata("nestedFunctionTypeAliasExpansion.kt") + public void testNestedFunctionTypeAliasExpansion() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/nestedFunctionTypeAliasExpansion.kt"); + } + + @TestMetadata("nestedObject.kt") + public void testNestedObject() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/nestedObject.kt"); + } + + @TestMetadata("nestedTypeAliasExpansion.kt") + public void testNestedTypeAliasExpansion() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/nestedTypeAliasExpansion.kt"); + } + + @TestMetadata("privateCompanionObjectValInDifferentModule.kt") + public void testPrivateCompanionObjectValInDifferentModule() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/privateCompanionObjectValInDifferentModule.kt"); + } + + @TestMetadata("privateTopLevelValInDifferentModule.kt") + public void testPrivateTopLevelValInDifferentModule() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/privateTopLevelValInDifferentModule.kt"); + } + + @TestMetadata("propertyReference.kt") + public void testPropertyReference() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/propertyReference.kt"); + } + + @TestMetadata("sealedClass.kt") + public void testSealedClass() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/sealedClass.kt"); + } + + @TestMetadata("secondaryConstructors.kt") + public void testSecondaryConstructors() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/secondaryConstructors.kt"); + } + + @TestMetadata("simple.kt") + public void testSimple() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/simple.kt"); + } + + @TestMetadata("simpleValAnonymousObject.kt") + public void testSimpleValAnonymousObject() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/simpleValAnonymousObject.kt"); + } + + @TestMetadata("specialBridgesInDependencies.kt") + public void testSpecialBridgesInDependencies() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/specialBridgesInDependencies.kt"); + } + + @TestMetadata("starImportEnum.kt") + public void testStarImportEnum() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/starImportEnum.kt"); + } + + @TestMetadata("suspendFunWithDefaultMangling.kt") + public void testSuspendFunWithDefaultMangling() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/suspendFunWithDefaultMangling.kt"); + } + + @TestMetadata("typeAliasesKt13181.kt") + public void testTypeAliasesKt13181() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/typeAliasesKt13181.kt"); + } + + @TestMetadata("unsignedTypesInAnnotations.kt") + public void testUnsignedTypesInAnnotations() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/unsignedTypesInAnnotations.kt"); + } + + @TestMetadata("useDeserializedFunInterface.kt") + public void testUseDeserializedFunInterface() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/useDeserializedFunInterface.kt"); + } + + @TestMetadata("compiler/testData/codegen/box/compileKotlinAgainstKotlin/fir") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Fir extends AbstractIrJsCodegenBoxES6Test { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR_ES6, testDataFilePath); + } + + public void testAllFilesPresentInFir() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/compileKotlinAgainstKotlin/fir"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true); + } + } + + @TestMetadata("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Jvm8 extends AbstractIrJsCodegenBoxES6Test { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR_ES6, testDataFilePath); + } + + public void testAllFilesPresentInJvm8() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true); + } + + @TestMetadata("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Defaults extends AbstractIrJsCodegenBoxES6Test { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR_ES6, testDataFilePath); + } + + public void testAllFilesPresentInDefaults() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true); + } + + @TestMetadata("superCall.kt") + public void testSuperCall() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/superCall.kt"); + } + + @TestMetadata("superCallFromInterface.kt") + public void testSuperCallFromInterface() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/superCallFromInterface.kt"); + } + + @TestMetadata("superCallFromInterface2.kt") + public void testSuperCallFromInterface2() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/superCallFromInterface2.kt"); + } + + @TestMetadata("superPropAccess.kt") + public void testSuperPropAccess() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/superPropAccess.kt"); + } + + @TestMetadata("superPropAccessFromInterface.kt") + public void testSuperPropAccessFromInterface() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/superPropAccessFromInterface.kt"); + } + + @TestMetadata("superPropAccessFromInterface2.kt") + public void testSuperPropAccessFromInterface2() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/superPropAccessFromInterface2.kt"); + } + + @TestMetadata("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class AllCompatibility extends AbstractIrJsCodegenBoxES6Test { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR_ES6, testDataFilePath); + } + + public void testAllFilesPresentInAllCompatibility() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true); + } + + @TestMetadata("callStackTrace.kt") + public void testCallStackTrace() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/callStackTrace.kt"); + } + + @TestMetadata("superCall.kt") + public void testSuperCall() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superCall.kt"); + } + + @TestMetadata("superCallFromInterface.kt") + public void testSuperCallFromInterface() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superCallFromInterface.kt"); + } + + @TestMetadata("superCallFromInterface2.kt") + public void testSuperCallFromInterface2() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superCallFromInterface2.kt"); + } + + @TestMetadata("superPropAccess.kt") + public void testSuperPropAccess() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superPropAccess.kt"); + } + + @TestMetadata("superPropAccessFromInterface.kt") + public void testSuperPropAccessFromInterface() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superPropAccessFromInterface.kt"); + } + + @TestMetadata("superPropAccessFromInterface2.kt") + public void testSuperPropAccessFromInterface2() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superPropAccessFromInterface2.kt"); + } + + @TestMetadata("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/delegationBy") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class DelegationBy extends AbstractIrJsCodegenBoxES6Test { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR_ES6, testDataFilePath); + } + + public void testAllFilesPresentInDelegationBy() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/delegationBy"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true); + } + } + } + + @TestMetadata("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/interop") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Interop extends AbstractIrJsCodegenBoxES6Test { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR_ES6, testDataFilePath); + } + + public void testAllFilesPresentInInterop() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/interop"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true); + } + + @TestMetadata("likeMemberClash.kt") + public void testLikeMemberClash() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/interop/likeMemberClash.kt"); + } + + @TestMetadata("likeSpecialization.kt") + public void testLikeSpecialization() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/interop/likeSpecialization.kt"); + } + + @TestMetadata("newAndOldSchemes.kt") + public void testNewAndOldSchemes() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/interop/newAndOldSchemes.kt"); + } + + @TestMetadata("newAndOldSchemes2.kt") + public void testNewAndOldSchemes2() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/interop/newAndOldSchemes2.kt"); + } + + @TestMetadata("newAndOldSchemes2Compatibility.kt") + public void testNewAndOldSchemes2Compatibility() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/interop/newAndOldSchemes2Compatibility.kt"); + } + + @TestMetadata("newAndOldSchemes3.kt") + public void testNewAndOldSchemes3() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/interop/newAndOldSchemes3.kt"); + } + + @TestMetadata("newSchemeWithJvmDefault.kt") + public void testNewSchemeWithJvmDefault() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/defaults/interop/newSchemeWithJvmDefault.kt"); + } + } + } + + @TestMetadata("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/jvm8against6") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Jvm8against6 extends AbstractIrJsCodegenBoxES6Test { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR_ES6, testDataFilePath); + } + + public void testAllFilesPresentInJvm8against6() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/jvm8against6"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true); + } + + @TestMetadata("jdk8Against6.kt") + public void testJdk8Against6() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/jvm8against6/jdk8Against6.kt"); + } + + @TestMetadata("simpleCall.kt") + public void testSimpleCall() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/jvm8against6/simpleCall.kt"); + } + + @TestMetadata("simpleCallWithBigHierarchy.kt") + public void testSimpleCallWithBigHierarchy() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/jvm8against6/simpleCallWithBigHierarchy.kt"); + } + + @TestMetadata("simpleCallWithHierarchy.kt") + public void testSimpleCallWithHierarchy() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/jvm8against6/simpleCallWithHierarchy.kt"); + } + + @TestMetadata("simpleProp.kt") + public void testSimpleProp() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/jvm8against6/simpleProp.kt"); + } + + @TestMetadata("simplePropWithHierarchy.kt") + public void testSimplePropWithHierarchy() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/jvm8against6/simplePropWithHierarchy.kt"); + } + + @TestMetadata("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/jvm8against6/delegation") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Delegation extends AbstractIrJsCodegenBoxES6Test { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR_ES6, testDataFilePath); + } + + public void testAllFilesPresentInDelegation() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/jvm8against6/delegation"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true); + } + + @TestMetadata("diamond.kt") + public void testDiamond() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/jvm8against6/delegation/diamond.kt"); + } + + @TestMetadata("diamond2.kt") + public void testDiamond2() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/jvm8against6/delegation/diamond2.kt"); + } + + @TestMetadata("diamond3.kt") + public void testDiamond3() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/jvm8/jvm8against6/delegation/diamond3.kt"); + } + } + } + } + + @TestMetadata("compiler/testData/codegen/box/compileKotlinAgainstKotlin/typeAnnotations") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class TypeAnnotations extends AbstractIrJsCodegenBoxES6Test { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR_ES6, testDataFilePath); + } + + public void testAllFilesPresentInTypeAnnotations() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/compileKotlinAgainstKotlin/typeAnnotations"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true); + } + } + } + @TestMetadata("compiler/testData/codegen/box/constants") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) @@ -4208,6 +4736,19 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes } } + @TestMetadata("compiler/testData/codegen/box/constructor") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Constructor extends AbstractIrJsCodegenBoxES6Test { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR_ES6, testDataFilePath); + } + + public void testAllFilesPresentInConstructor() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/constructor"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true); + } + } + @TestMetadata("compiler/testData/codegen/box/constructorCall") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) @@ -5623,6 +6164,11 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes runTest("compiler/testData/codegen/box/coroutines/kt21605.kt"); } + @TestMetadata("kt24135.kt") + public void testKt24135() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/kt24135.kt"); + } + @TestMetadata("kt25912.kt") public void testKt25912() throws Exception { runTest("compiler/testData/codegen/box/coroutines/kt25912.kt"); @@ -5973,6 +6519,11 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes runTest("compiler/testData/codegen/box/coroutines/controlFlow/doWhileStatement.kt"); } + @TestMetadata("doWhileWithInline.kt") + public void testDoWhileWithInline() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/controlFlow/doWhileWithInline.kt"); + } + @TestMetadata("doubleBreak.kt") public void testDoubleBreak() throws Exception { runTest("compiler/testData/codegen/box/coroutines/controlFlow/doubleBreak.kt"); @@ -6347,6 +6898,11 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/inlineClasses"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true); } + @TestMetadata("genericParameterResult.kt") + public void testGenericParameterResult() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/genericParameterResult.kt"); + } + @TestMetadata("nonLocalReturn.kt") public void testNonLocalReturn() throws Exception { runTest("compiler/testData/codegen/box/coroutines/inlineClasses/nonLocalReturn.kt"); @@ -7112,6 +7668,11 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes runTest("compiler/testData/codegen/box/coroutines/intrinsicSemantics/intercepted.kt"); } + @TestMetadata("resultExceptionOrNullInLambda.kt") + public void testResultExceptionOrNullInLambda() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/intrinsicSemantics/resultExceptionOrNullInLambda.kt"); + } + @TestMetadata("startCoroutine.kt") public void testStartCoroutine() throws Exception { runTest("compiler/testData/codegen/box/coroutines/intrinsicSemantics/startCoroutine.kt"); @@ -7198,6 +7759,11 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes runTest("compiler/testData/codegen/box/coroutines/localFunctions/named/capturedVariables.kt"); } + @TestMetadata("defaultArgument.kt") + public void testDefaultArgument() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/localFunctions/named/defaultArgument.kt"); + } + @TestMetadata("extension.kt") public void testExtension() throws Exception { runTest("compiler/testData/codegen/box/coroutines/localFunctions/named/extension.kt"); @@ -10379,6 +10945,11 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes runTest("compiler/testData/codegen/box/funInterface/funConversionInVararg.kt"); } + @TestMetadata("funInterfaceCallInLambda.kt") + public void testFunInterfaceCallInLambda() throws Exception { + runTest("compiler/testData/codegen/box/funInterface/funInterfaceCallInLambda.kt"); + } + @TestMetadata("funInterfaceInheritance.kt") public void testFunInterfaceInheritance() throws Exception { runTest("compiler/testData/codegen/box/funInterface/funInterfaceInheritance.kt"); @@ -11633,6 +12204,19 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes } } + @TestMetadata("compiler/testData/codegen/box/inline") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Inline extends AbstractIrJsCodegenBoxES6Test { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR_ES6, testDataFilePath); + } + + public void testAllFilesPresentInInline() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inline"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true); + } + } + @TestMetadata("compiler/testData/codegen/box/inlineClasses") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) @@ -12155,6 +12739,11 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes runTest("compiler/testData/codegen/box/inlineClasses/kt28585.kt"); } + @TestMetadata("kt32793.kt") + public void testKt32793() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/kt32793.kt"); + } + @TestMetadata("kt33119.kt") public void testKt33119() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/kt33119.kt"); @@ -13086,6 +13675,34 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes } } + @TestMetadata("compiler/testData/codegen/box/inlineClasses/inlineClassCollection") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class InlineClassCollection extends AbstractIrJsCodegenBoxES6Test { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR_ES6, testDataFilePath); + } + + public void testAllFilesPresentInInlineClassCollection() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/inlineClassCollection"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true); + } + + @TestMetadata("inlineCollectionOfInlineClass.kt") + public void testInlineCollectionOfInlineClass() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/inlineClassCollection/inlineCollectionOfInlineClass.kt"); + } + + @TestMetadata("inlineListOfInlineClass.kt") + public void testInlineListOfInlineClass() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/inlineClassCollection/inlineListOfInlineClass.kt"); + } + + @TestMetadata("inlineMapOfInlineClass.kt") + public void testInlineMapOfInlineClass() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/inlineClassCollection/inlineMapOfInlineClass.kt"); + } + } + @TestMetadata("compiler/testData/codegen/box/inlineClasses/interfaceDelegation") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) @@ -13474,6 +14091,19 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes } } + @TestMetadata("compiler/testData/codegen/box/innerClass") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class InnerClass extends AbstractIrJsCodegenBoxES6Test { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR_ES6, testDataFilePath); + } + + public void testAllFilesPresentInInnerClass() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/innerClass"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true); + } + } + @TestMetadata("compiler/testData/codegen/box/innerNested") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) @@ -13761,6 +14391,19 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes } } + @TestMetadata("compiler/testData/codegen/box/interfaces") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Interfaces extends AbstractIrJsCodegenBoxES6Test { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR_ES6, testDataFilePath); + } + + public void testAllFilesPresentInInterfaces() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/interfaces"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true); + } + } + @TestMetadata("compiler/testData/codegen/box/intrinsics") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) @@ -13891,6 +14534,32 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/invokedynamic"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true); } + @TestMetadata("compiler/testData/codegen/box/invokedynamic/lambdas") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Lambdas extends AbstractIrJsCodegenBoxES6Test { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR_ES6, testDataFilePath); + } + + public void testAllFilesPresentInLambdas() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/invokedynamic/lambdas"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true); + } + + @TestMetadata("compiler/testData/codegen/box/invokedynamic/lambdas/inlineClassInSignature") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class InlineClassInSignature extends AbstractIrJsCodegenBoxES6Test { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR_ES6, testDataFilePath); + } + + public void testAllFilesPresentInInlineClassInSignature() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/invokedynamic/lambdas/inlineClassInSignature"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true); + } + } + } + @TestMetadata("compiler/testData/codegen/box/invokedynamic/sam") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) @@ -13903,19 +14572,6 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/invokedynamic/sam"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true); } - @TestMetadata("compiler/testData/codegen/box/invokedynamic/sam/inline") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Inline extends AbstractIrJsCodegenBoxES6Test { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR_ES6, testDataFilePath); - } - - public void testAllFilesPresentInInline() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/invokedynamic/sam/inline"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true); - } - } - @TestMetadata("compiler/testData/codegen/box/invokedynamic/sam/inlineClassInSignature") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) @@ -15698,6 +16354,19 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes } } + @TestMetadata("compiler/testData/codegen/box/notNullAssertions") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class NotNullAssertions extends AbstractIrJsCodegenBoxES6Test { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR_ES6, testDataFilePath); + } + + public void testAllFilesPresentInNotNullAssertions() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/notNullAssertions"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true); + } + } + @TestMetadata("compiler/testData/codegen/box/nothingValue") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) @@ -18149,6 +18818,19 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes } } + @TestMetadata("compiler/testData/codegen/box/property") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Property extends AbstractIrJsCodegenBoxES6Test { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR_ES6, testDataFilePath); + } + + public void testAllFilesPresentInProperty() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/property"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true); + } + } + @TestMetadata("compiler/testData/codegen/box/publishedApi") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) @@ -22442,6 +23124,19 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes } } + @TestMetadata("compiler/testData/codegen/box/recursiveRawTypes") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class RecursiveRawTypes extends AbstractIrJsCodegenBoxES6Test { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR_ES6, testDataFilePath); + } + + public void testAllFilesPresentInRecursiveRawTypes() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/recursiveRawTypes"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true); + } + } + @TestMetadata("compiler/testData/codegen/box/reflection") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) @@ -24374,6 +25069,11 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes runTest("compiler/testData/codegen/box/reified/instanceof.kt"); } + @TestMetadata("kt16445.kt") + public void testKt16445() throws Exception { + runTest("compiler/testData/codegen/box/reified/kt16445.kt"); + } + @TestMetadata("newArrayInt.kt") public void testNewArrayInt() throws Exception { runTest("compiler/testData/codegen/box/reified/newArrayInt.kt"); @@ -24558,6 +25258,32 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/sam"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true); } + @TestMetadata("compiler/testData/codegen/box/sam/adapters") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Adapters extends AbstractIrJsCodegenBoxES6Test { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR_ES6, testDataFilePath); + } + + public void testAllFilesPresentInAdapters() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/sam/adapters"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true); + } + + @TestMetadata("compiler/testData/codegen/box/sam/adapters/operators") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Operators extends AbstractIrJsCodegenBoxES6Test { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR_ES6, testDataFilePath); + } + + public void testAllFilesPresentInOperators() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/sam/adapters/operators"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true); + } + } + } + @TestMetadata("compiler/testData/codegen/box/sam/constructors") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) @@ -25068,6 +25794,19 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes } } + @TestMetadata("compiler/testData/codegen/box/staticFun") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class StaticFun extends AbstractIrJsCodegenBoxES6Test { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR_ES6, testDataFilePath); + } + + public void testAllFilesPresentInStaticFun() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/staticFun"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true); + } + } + @TestMetadata("compiler/testData/codegen/box/statics") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) @@ -25609,6 +26348,19 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes } } + @TestMetadata("compiler/testData/codegen/box/syntheticExtensions") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class SyntheticExtensions extends AbstractIrJsCodegenBoxES6Test { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR_ES6, testDataFilePath); + } + + public void testAllFilesPresentInSyntheticExtensions() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/syntheticExtensions"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true); + } + } + @TestMetadata("compiler/testData/codegen/box/throws") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) @@ -26047,6 +26799,11 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes runTest("compiler/testData/codegen/box/typealias/typeAliasConstructorInSuperCall.kt"); } + @TestMetadata("typeAliasFunction.kt") + public void testTypeAliasFunction() throws Exception { + runTest("compiler/testData/codegen/box/typealias/typeAliasFunction.kt"); + } + @TestMetadata("typeAliasInAnonymousObjectType.kt") public void testTypeAliasInAnonymousObjectType() throws Exception { runTest("compiler/testData/codegen/box/typealias/typeAliasInAnonymousObjectType.kt"); @@ -26506,6 +27263,71 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes } } + @TestMetadata("compiler/testData/codegen/box/varargs") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Varargs extends AbstractIrJsCodegenBoxES6Test { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR_ES6, testDataFilePath); + } + + public void testAllFilesPresentInVarargs() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/varargs"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true); + } + } + + @TestMetadata("compiler/testData/codegen/box/visibility") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Visibility extends AbstractIrJsCodegenBoxES6Test { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR_ES6, testDataFilePath); + } + + public void testAllFilesPresentInVisibility() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/visibility"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true); + } + + @TestMetadata("compiler/testData/codegen/box/visibility/package") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Package extends AbstractIrJsCodegenBoxES6Test { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR_ES6, testDataFilePath); + } + + public void testAllFilesPresentInPackage() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/visibility/package"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true); + } + } + + @TestMetadata("compiler/testData/codegen/box/visibility/protectedAndPackage") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ProtectedAndPackage extends AbstractIrJsCodegenBoxES6Test { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR_ES6, testDataFilePath); + } + + public void testAllFilesPresentInProtectedAndPackage() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/visibility/protectedAndPackage"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true); + } + } + + @TestMetadata("compiler/testData/codegen/box/visibility/protectedStatic") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ProtectedStatic extends AbstractIrJsCodegenBoxES6Test { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR_ES6, testDataFilePath); + } + + public void testAllFilesPresentInProtectedStatic() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/visibility/protectedStatic"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true); + } + } + } + @TestMetadata("compiler/testData/codegen/box/when") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/es6/semantics/IrJsCodegenInlineES6TestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/es6/semantics/IrJsCodegenInlineES6TestGenerated.java index 11e204014bb..656a28746bd 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/es6/semantics/IrJsCodegenInlineES6TestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/es6/semantics/IrJsCodegenInlineES6TestGenerated.java @@ -242,6 +242,11 @@ public class IrJsCodegenInlineES6TestGenerated extends AbstractIrJsCodegenInline runTest("compiler/testData/codegen/boxInline/anonymousObject/kt42815_delegated.kt"); } + @TestMetadata("kt6007.kt") + public void testKt6007() throws Exception { + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt6007.kt"); + } + @TestMetadata("kt6552.kt") public void testKt6552() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt6552.kt"); @@ -847,6 +852,11 @@ public class IrJsCodegenInlineES6TestGenerated extends AbstractIrJsCodegenInline runTest("compiler/testData/codegen/boxInline/callableReference/bound/kt18728_4.kt"); } + @TestMetadata("lambdaOnLhs.kt") + public void testLambdaOnLhs() throws Exception { + runTest("compiler/testData/codegen/boxInline/callableReference/bound/lambdaOnLhs.kt"); + } + @TestMetadata("map.kt") public void testMap() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/map.kt"); @@ -1923,6 +1933,45 @@ public class IrJsCodegenInlineES6TestGenerated extends AbstractIrJsCodegenInline } } + @TestMetadata("compiler/testData/codegen/boxInline/invokedynamic") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Invokedynamic extends AbstractIrJsCodegenInlineES6Test { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR_ES6, testDataFilePath); + } + + public void testAllFilesPresentInInvokedynamic() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/invokedynamic"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true); + } + + @TestMetadata("compiler/testData/codegen/boxInline/invokedynamic/lambdas") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Lambdas extends AbstractIrJsCodegenInlineES6Test { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR_ES6, testDataFilePath); + } + + public void testAllFilesPresentInLambdas() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/invokedynamic/lambdas"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true); + } + } + + @TestMetadata("compiler/testData/codegen/boxInline/invokedynamic/sam") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Sam extends AbstractIrJsCodegenInlineES6Test { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR_ES6, testDataFilePath); + } + + public void testAllFilesPresentInSam() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/invokedynamic/sam"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true); + } + } + } + @TestMetadata("compiler/testData/codegen/boxInline/jvmName") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) @@ -2170,6 +2219,46 @@ public class IrJsCodegenInlineES6TestGenerated extends AbstractIrJsCodegenInline runTest("compiler/testData/codegen/boxInline/nonLocalReturns/explicitLocalReturn.kt"); } + @TestMetadata("fromArrayGenerator.kt") + public void testFromArrayGenerator() throws Exception { + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/fromArrayGenerator.kt"); + } + + @TestMetadata("fromArrayGeneratorCatch.kt") + public void testFromArrayGeneratorCatch() throws Exception { + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/fromArrayGeneratorCatch.kt"); + } + + @TestMetadata("fromArrayGeneratorNested.kt") + public void testFromArrayGeneratorNested() throws Exception { + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/fromArrayGeneratorNested.kt"); + } + + @TestMetadata("fromArrayGeneratorWithCapture.kt") + public void testFromArrayGeneratorWithCapture() throws Exception { + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/fromArrayGeneratorWithCapture.kt"); + } + + @TestMetadata("fromArrayGeneratorWithCatch.kt") + public void testFromArrayGeneratorWithCatch() throws Exception { + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/fromArrayGeneratorWithCatch.kt"); + } + + @TestMetadata("fromArrayGeneratorWithFinally.kt") + public void testFromArrayGeneratorWithFinally() throws Exception { + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/fromArrayGeneratorWithFinally.kt"); + } + + @TestMetadata("fromArrayGeneratorWithFinallyX2.kt") + public void testFromArrayGeneratorWithFinallyX2() throws Exception { + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/fromArrayGeneratorWithFinallyX2.kt"); + } + + @TestMetadata("fromArrayGeneratorWithFinallyX2_2.kt") + public void testFromArrayGeneratorWithFinallyX2_2() throws Exception { + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/fromArrayGeneratorWithFinallyX2_2.kt"); + } + @TestMetadata("fromInterfaceDefaultGetter.kt") public void testFromInterfaceDefaultGetter() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/fromInterfaceDefaultGetter.kt"); @@ -2848,6 +2937,26 @@ public class IrJsCodegenInlineES6TestGenerated extends AbstractIrJsCodegenInline runTest("compiler/testData/codegen/boxInline/reified/kt18977.kt"); } + @TestMetadata("kt35511.kt") + public void testKt35511() throws Exception { + runTest("compiler/testData/codegen/boxInline/reified/kt35511.kt"); + } + + @TestMetadata("kt35511_try.kt") + public void testKt35511_try() throws Exception { + runTest("compiler/testData/codegen/boxInline/reified/kt35511_try.kt"); + } + + @TestMetadata("kt35511_try_valueOf.kt") + public void testKt35511_try_valueOf() throws Exception { + runTest("compiler/testData/codegen/boxInline/reified/kt35511_try_valueOf.kt"); + } + + @TestMetadata("kt35511_try_values.kt") + public void testKt35511_try_values() throws Exception { + runTest("compiler/testData/codegen/boxInline/reified/kt35511_try_values.kt"); + } + @TestMetadata("kt7017.kt") public void testKt7017() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/kt7017.kt"); @@ -3952,6 +4061,11 @@ public class IrJsCodegenInlineES6TestGenerated extends AbstractIrJsCodegenInline runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/insideObject.kt"); } + @TestMetadata("kt30708.kt") + public void testKt30708() throws Exception { + runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/kt30708.kt"); + } + @TestMetadata("lambdaTransformation.kt") public void testLambdaTransformation() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/lambdaTransformation.kt"); diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenBoxErrorTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenBoxErrorTestGenerated.java index 7c960da1864..cb4abb0c6a9 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenBoxErrorTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenBoxErrorTestGenerated.java @@ -27,7 +27,7 @@ public class IrJsCodegenBoxErrorTestGenerated extends AbstractIrJsCodegenBoxErro } public void testAllFilesPresentInBoxError() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxError"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxError"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true, "compileKotlinAgainstKotlin"); } @TestMetadata("compiler/testData/codegen/boxError/semantic") diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenBoxTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenBoxTestGenerated.java index b947ffc7c3d..037a75ef67b 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenBoxTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenBoxTestGenerated.java @@ -27,7 +27,7 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { } public void testAllFilesPresentInBox() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true, "compileKotlinAgainstKotlin"); } @TestMetadata("compiler/testData/codegen/box/annotations") @@ -75,6 +75,19 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { } } + @TestMetadata("compiler/testData/codegen/box/annotations/kClassMapping") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class KClassMapping extends AbstractIrJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + + public void testAllFilesPresentInKClassMapping() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/annotations/kClassMapping"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + } + } + @TestMetadata("compiler/testData/codegen/box/annotations/typeAnnotations") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) @@ -4208,6 +4221,19 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { } } + @TestMetadata("compiler/testData/codegen/box/constructor") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Constructor extends AbstractIrJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + + public void testAllFilesPresentInConstructor() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/constructor"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + } + } + @TestMetadata("compiler/testData/codegen/box/constructorCall") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) @@ -5623,6 +5649,11 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { runTest("compiler/testData/codegen/box/coroutines/kt21605.kt"); } + @TestMetadata("kt24135.kt") + public void testKt24135() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/kt24135.kt"); + } + @TestMetadata("kt25912.kt") public void testKt25912() throws Exception { runTest("compiler/testData/codegen/box/coroutines/kt25912.kt"); @@ -5973,6 +6004,11 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { runTest("compiler/testData/codegen/box/coroutines/controlFlow/doWhileStatement.kt"); } + @TestMetadata("doWhileWithInline.kt") + public void testDoWhileWithInline() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/controlFlow/doWhileWithInline.kt"); + } + @TestMetadata("doubleBreak.kt") public void testDoubleBreak() throws Exception { runTest("compiler/testData/codegen/box/coroutines/controlFlow/doubleBreak.kt"); @@ -6347,6 +6383,11 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/inlineClasses"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); } + @TestMetadata("genericParameterResult.kt") + public void testGenericParameterResult() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/genericParameterResult.kt"); + } + @TestMetadata("nonLocalReturn.kt") public void testNonLocalReturn() throws Exception { runTest("compiler/testData/codegen/box/coroutines/inlineClasses/nonLocalReturn.kt"); @@ -7112,6 +7153,11 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { runTest("compiler/testData/codegen/box/coroutines/intrinsicSemantics/intercepted.kt"); } + @TestMetadata("resultExceptionOrNullInLambda.kt") + public void testResultExceptionOrNullInLambda() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/intrinsicSemantics/resultExceptionOrNullInLambda.kt"); + } + @TestMetadata("startCoroutine.kt") public void testStartCoroutine() throws Exception { runTest("compiler/testData/codegen/box/coroutines/intrinsicSemantics/startCoroutine.kt"); @@ -7198,6 +7244,11 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { runTest("compiler/testData/codegen/box/coroutines/localFunctions/named/capturedVariables.kt"); } + @TestMetadata("defaultArgument.kt") + public void testDefaultArgument() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/localFunctions/named/defaultArgument.kt"); + } + @TestMetadata("extension.kt") public void testExtension() throws Exception { runTest("compiler/testData/codegen/box/coroutines/localFunctions/named/extension.kt"); @@ -10379,6 +10430,11 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { runTest("compiler/testData/codegen/box/funInterface/funConversionInVararg.kt"); } + @TestMetadata("funInterfaceCallInLambda.kt") + public void testFunInterfaceCallInLambda() throws Exception { + runTest("compiler/testData/codegen/box/funInterface/funInterfaceCallInLambda.kt"); + } + @TestMetadata("funInterfaceInheritance.kt") public void testFunInterfaceInheritance() throws Exception { runTest("compiler/testData/codegen/box/funInterface/funInterfaceInheritance.kt"); @@ -11633,6 +11689,19 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { } } + @TestMetadata("compiler/testData/codegen/box/inline") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Inline extends AbstractIrJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + + public void testAllFilesPresentInInline() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inline"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + } + } + @TestMetadata("compiler/testData/codegen/box/inlineClasses") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) @@ -12155,6 +12224,11 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { runTest("compiler/testData/codegen/box/inlineClasses/kt28585.kt"); } + @TestMetadata("kt32793.kt") + public void testKt32793() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/kt32793.kt"); + } + @TestMetadata("kt33119.kt") public void testKt33119() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/kt33119.kt"); @@ -13086,6 +13160,34 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { } } + @TestMetadata("compiler/testData/codegen/box/inlineClasses/inlineClassCollection") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class InlineClassCollection extends AbstractIrJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + + public void testAllFilesPresentInInlineClassCollection() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/inlineClassCollection"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + } + + @TestMetadata("inlineCollectionOfInlineClass.kt") + public void testInlineCollectionOfInlineClass() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/inlineClassCollection/inlineCollectionOfInlineClass.kt"); + } + + @TestMetadata("inlineListOfInlineClass.kt") + public void testInlineListOfInlineClass() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/inlineClassCollection/inlineListOfInlineClass.kt"); + } + + @TestMetadata("inlineMapOfInlineClass.kt") + public void testInlineMapOfInlineClass() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/inlineClassCollection/inlineMapOfInlineClass.kt"); + } + } + @TestMetadata("compiler/testData/codegen/box/inlineClasses/interfaceDelegation") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) @@ -13474,6 +13576,19 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { } } + @TestMetadata("compiler/testData/codegen/box/innerClass") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class InnerClass extends AbstractIrJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + + public void testAllFilesPresentInInnerClass() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/innerClass"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + } + } + @TestMetadata("compiler/testData/codegen/box/innerNested") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) @@ -13761,6 +13876,19 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { } } + @TestMetadata("compiler/testData/codegen/box/interfaces") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Interfaces extends AbstractIrJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + + public void testAllFilesPresentInInterfaces() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/interfaces"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + } + } + @TestMetadata("compiler/testData/codegen/box/intrinsics") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) @@ -13891,6 +14019,32 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/invokedynamic"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); } + @TestMetadata("compiler/testData/codegen/box/invokedynamic/lambdas") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Lambdas extends AbstractIrJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + + public void testAllFilesPresentInLambdas() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/invokedynamic/lambdas"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + } + + @TestMetadata("compiler/testData/codegen/box/invokedynamic/lambdas/inlineClassInSignature") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class InlineClassInSignature extends AbstractIrJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + + public void testAllFilesPresentInInlineClassInSignature() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/invokedynamic/lambdas/inlineClassInSignature"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + } + } + } + @TestMetadata("compiler/testData/codegen/box/invokedynamic/sam") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) @@ -13903,19 +14057,6 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/invokedynamic/sam"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); } - @TestMetadata("compiler/testData/codegen/box/invokedynamic/sam/inline") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Inline extends AbstractIrJsCodegenBoxTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); - } - - public void testAllFilesPresentInInline() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/invokedynamic/sam/inline"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); - } - } - @TestMetadata("compiler/testData/codegen/box/invokedynamic/sam/inlineClassInSignature") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) @@ -15698,6 +15839,19 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { } } + @TestMetadata("compiler/testData/codegen/box/notNullAssertions") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class NotNullAssertions extends AbstractIrJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + + public void testAllFilesPresentInNotNullAssertions() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/notNullAssertions"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + } + } + @TestMetadata("compiler/testData/codegen/box/nothingValue") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) @@ -18149,6 +18303,19 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { } } + @TestMetadata("compiler/testData/codegen/box/property") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Property extends AbstractIrJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + + public void testAllFilesPresentInProperty() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/property"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + } + } + @TestMetadata("compiler/testData/codegen/box/publishedApi") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) @@ -22442,6 +22609,19 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { } } + @TestMetadata("compiler/testData/codegen/box/recursiveRawTypes") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class RecursiveRawTypes extends AbstractIrJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + + public void testAllFilesPresentInRecursiveRawTypes() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/recursiveRawTypes"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + } + } + @TestMetadata("compiler/testData/codegen/box/reflection") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) @@ -24374,6 +24554,11 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { runTest("compiler/testData/codegen/box/reified/instanceof.kt"); } + @TestMetadata("kt16445.kt") + public void testKt16445() throws Exception { + runTest("compiler/testData/codegen/box/reified/kt16445.kt"); + } + @TestMetadata("newArrayInt.kt") public void testNewArrayInt() throws Exception { runTest("compiler/testData/codegen/box/reified/newArrayInt.kt"); @@ -24558,6 +24743,32 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/sam"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); } + @TestMetadata("compiler/testData/codegen/box/sam/adapters") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Adapters extends AbstractIrJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + + public void testAllFilesPresentInAdapters() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/sam/adapters"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + } + + @TestMetadata("compiler/testData/codegen/box/sam/adapters/operators") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Operators extends AbstractIrJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + + public void testAllFilesPresentInOperators() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/sam/adapters/operators"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + } + } + } + @TestMetadata("compiler/testData/codegen/box/sam/constructors") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) @@ -25068,6 +25279,19 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { } } + @TestMetadata("compiler/testData/codegen/box/staticFun") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class StaticFun extends AbstractIrJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + + public void testAllFilesPresentInStaticFun() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/staticFun"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + } + } + @TestMetadata("compiler/testData/codegen/box/statics") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) @@ -25609,6 +25833,19 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { } } + @TestMetadata("compiler/testData/codegen/box/syntheticExtensions") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class SyntheticExtensions extends AbstractIrJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + + public void testAllFilesPresentInSyntheticExtensions() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/syntheticExtensions"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + } + } + @TestMetadata("compiler/testData/codegen/box/throws") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) @@ -26047,6 +26284,11 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { runTest("compiler/testData/codegen/box/typealias/typeAliasConstructorInSuperCall.kt"); } + @TestMetadata("typeAliasFunction.kt") + public void testTypeAliasFunction() throws Exception { + runTest("compiler/testData/codegen/box/typealias/typeAliasFunction.kt"); + } + @TestMetadata("typeAliasInAnonymousObjectType.kt") public void testTypeAliasInAnonymousObjectType() throws Exception { runTest("compiler/testData/codegen/box/typealias/typeAliasInAnonymousObjectType.kt"); @@ -26506,6 +26748,71 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { } } + @TestMetadata("compiler/testData/codegen/box/varargs") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Varargs extends AbstractIrJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + + public void testAllFilesPresentInVarargs() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/varargs"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + } + } + + @TestMetadata("compiler/testData/codegen/box/visibility") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Visibility extends AbstractIrJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + + public void testAllFilesPresentInVisibility() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/visibility"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + } + + @TestMetadata("compiler/testData/codegen/box/visibility/package") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Package extends AbstractIrJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + + public void testAllFilesPresentInPackage() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/visibility/package"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + } + } + + @TestMetadata("compiler/testData/codegen/box/visibility/protectedAndPackage") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ProtectedAndPackage extends AbstractIrJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + + public void testAllFilesPresentInProtectedAndPackage() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/visibility/protectedAndPackage"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + } + } + + @TestMetadata("compiler/testData/codegen/box/visibility/protectedStatic") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ProtectedStatic extends AbstractIrJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + + public void testAllFilesPresentInProtectedStatic() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/visibility/protectedStatic"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + } + } + } + @TestMetadata("compiler/testData/codegen/box/when") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenInlineTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenInlineTestGenerated.java index 0d6fbc8db9c..ad8ae8af225 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenInlineTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenInlineTestGenerated.java @@ -242,6 +242,11 @@ public class IrJsCodegenInlineTestGenerated extends AbstractIrJsCodegenInlineTes runTest("compiler/testData/codegen/boxInline/anonymousObject/kt42815_delegated.kt"); } + @TestMetadata("kt6007.kt") + public void testKt6007() throws Exception { + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt6007.kt"); + } + @TestMetadata("kt6552.kt") public void testKt6552() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt6552.kt"); @@ -847,6 +852,11 @@ public class IrJsCodegenInlineTestGenerated extends AbstractIrJsCodegenInlineTes runTest("compiler/testData/codegen/boxInline/callableReference/bound/kt18728_4.kt"); } + @TestMetadata("lambdaOnLhs.kt") + public void testLambdaOnLhs() throws Exception { + runTest("compiler/testData/codegen/boxInline/callableReference/bound/lambdaOnLhs.kt"); + } + @TestMetadata("map.kt") public void testMap() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/map.kt"); @@ -1923,6 +1933,45 @@ public class IrJsCodegenInlineTestGenerated extends AbstractIrJsCodegenInlineTes } } + @TestMetadata("compiler/testData/codegen/boxInline/invokedynamic") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Invokedynamic extends AbstractIrJsCodegenInlineTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + + public void testAllFilesPresentInInvokedynamic() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/invokedynamic"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + } + + @TestMetadata("compiler/testData/codegen/boxInline/invokedynamic/lambdas") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Lambdas extends AbstractIrJsCodegenInlineTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + + public void testAllFilesPresentInLambdas() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/invokedynamic/lambdas"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + } + } + + @TestMetadata("compiler/testData/codegen/boxInline/invokedynamic/sam") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Sam extends AbstractIrJsCodegenInlineTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + + public void testAllFilesPresentInSam() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/invokedynamic/sam"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + } + } + } + @TestMetadata("compiler/testData/codegen/boxInline/jvmName") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) @@ -2170,6 +2219,46 @@ public class IrJsCodegenInlineTestGenerated extends AbstractIrJsCodegenInlineTes runTest("compiler/testData/codegen/boxInline/nonLocalReturns/explicitLocalReturn.kt"); } + @TestMetadata("fromArrayGenerator.kt") + public void testFromArrayGenerator() throws Exception { + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/fromArrayGenerator.kt"); + } + + @TestMetadata("fromArrayGeneratorCatch.kt") + public void testFromArrayGeneratorCatch() throws Exception { + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/fromArrayGeneratorCatch.kt"); + } + + @TestMetadata("fromArrayGeneratorNested.kt") + public void testFromArrayGeneratorNested() throws Exception { + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/fromArrayGeneratorNested.kt"); + } + + @TestMetadata("fromArrayGeneratorWithCapture.kt") + public void testFromArrayGeneratorWithCapture() throws Exception { + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/fromArrayGeneratorWithCapture.kt"); + } + + @TestMetadata("fromArrayGeneratorWithCatch.kt") + public void testFromArrayGeneratorWithCatch() throws Exception { + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/fromArrayGeneratorWithCatch.kt"); + } + + @TestMetadata("fromArrayGeneratorWithFinally.kt") + public void testFromArrayGeneratorWithFinally() throws Exception { + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/fromArrayGeneratorWithFinally.kt"); + } + + @TestMetadata("fromArrayGeneratorWithFinallyX2.kt") + public void testFromArrayGeneratorWithFinallyX2() throws Exception { + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/fromArrayGeneratorWithFinallyX2.kt"); + } + + @TestMetadata("fromArrayGeneratorWithFinallyX2_2.kt") + public void testFromArrayGeneratorWithFinallyX2_2() throws Exception { + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/fromArrayGeneratorWithFinallyX2_2.kt"); + } + @TestMetadata("fromInterfaceDefaultGetter.kt") public void testFromInterfaceDefaultGetter() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/fromInterfaceDefaultGetter.kt"); @@ -2848,6 +2937,26 @@ public class IrJsCodegenInlineTestGenerated extends AbstractIrJsCodegenInlineTes runTest("compiler/testData/codegen/boxInline/reified/kt18977.kt"); } + @TestMetadata("kt35511.kt") + public void testKt35511() throws Exception { + runTest("compiler/testData/codegen/boxInline/reified/kt35511.kt"); + } + + @TestMetadata("kt35511_try.kt") + public void testKt35511_try() throws Exception { + runTest("compiler/testData/codegen/boxInline/reified/kt35511_try.kt"); + } + + @TestMetadata("kt35511_try_valueOf.kt") + public void testKt35511_try_valueOf() throws Exception { + runTest("compiler/testData/codegen/boxInline/reified/kt35511_try_valueOf.kt"); + } + + @TestMetadata("kt35511_try_values.kt") + public void testKt35511_try_values() throws Exception { + runTest("compiler/testData/codegen/boxInline/reified/kt35511_try_values.kt"); + } + @TestMetadata("kt7017.kt") public void testKt7017() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/kt7017.kt"); @@ -3952,6 +4061,11 @@ public class IrJsCodegenInlineTestGenerated extends AbstractIrJsCodegenInlineTes runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/insideObject.kt"); } + @TestMetadata("kt30708.kt") + public void testKt30708() throws Exception { + runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/kt30708.kt"); + } + @TestMetadata("lambdaTransformation.kt") public void testLambdaTransformation() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/lambdaTransformation.kt"); diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java index 85bb3588fd6..1051675f628 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java @@ -27,7 +27,7 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { } public void testAllFilesPresentInBox() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true, "compileKotlinAgainstKotlin"); } @TestMetadata("compiler/testData/codegen/box/annotations") @@ -75,6 +75,19 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { } } + @TestMetadata("compiler/testData/codegen/box/annotations/kClassMapping") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class KClassMapping extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + + public void testAllFilesPresentInKClassMapping() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/annotations/kClassMapping"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true); + } + } + @TestMetadata("compiler/testData/codegen/box/annotations/typeAnnotations") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) @@ -4208,6 +4221,19 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { } } + @TestMetadata("compiler/testData/codegen/box/constructor") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Constructor extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + + public void testAllFilesPresentInConstructor() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/constructor"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true); + } + } + @TestMetadata("compiler/testData/codegen/box/constructorCall") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) @@ -5623,6 +5649,11 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { runTest("compiler/testData/codegen/box/coroutines/kt21605.kt"); } + @TestMetadata("kt24135.kt") + public void testKt24135() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/kt24135.kt"); + } + @TestMetadata("kt25912.kt") public void testKt25912() throws Exception { runTest("compiler/testData/codegen/box/coroutines/kt25912.kt"); @@ -5973,6 +6004,11 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { runTest("compiler/testData/codegen/box/coroutines/controlFlow/doWhileStatement.kt"); } + @TestMetadata("doWhileWithInline.kt") + public void testDoWhileWithInline() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/controlFlow/doWhileWithInline.kt"); + } + @TestMetadata("doubleBreak.kt") public void testDoubleBreak() throws Exception { runTest("compiler/testData/codegen/box/coroutines/controlFlow/doubleBreak.kt"); @@ -6347,6 +6383,11 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/inlineClasses"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true); } + @TestMetadata("genericParameterResult.kt") + public void testGenericParameterResult() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/inlineClasses/genericParameterResult.kt"); + } + @TestMetadata("nonLocalReturn.kt") public void testNonLocalReturn() throws Exception { runTest("compiler/testData/codegen/box/coroutines/inlineClasses/nonLocalReturn.kt"); @@ -7112,6 +7153,11 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { runTest("compiler/testData/codegen/box/coroutines/intrinsicSemantics/intercepted.kt"); } + @TestMetadata("resultExceptionOrNullInLambda.kt") + public void testResultExceptionOrNullInLambda() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/intrinsicSemantics/resultExceptionOrNullInLambda.kt"); + } + @TestMetadata("startCoroutine.kt") public void testStartCoroutine() throws Exception { runTest("compiler/testData/codegen/box/coroutines/intrinsicSemantics/startCoroutine.kt"); @@ -7198,6 +7244,11 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { runTest("compiler/testData/codegen/box/coroutines/localFunctions/named/capturedVariables.kt"); } + @TestMetadata("defaultArgument.kt") + public void testDefaultArgument() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/localFunctions/named/defaultArgument.kt"); + } + @TestMetadata("extension.kt") public void testExtension() throws Exception { runTest("compiler/testData/codegen/box/coroutines/localFunctions/named/extension.kt"); @@ -10379,6 +10430,11 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { runTest("compiler/testData/codegen/box/funInterface/funConversionInVararg.kt"); } + @TestMetadata("funInterfaceCallInLambda.kt") + public void testFunInterfaceCallInLambda() throws Exception { + runTest("compiler/testData/codegen/box/funInterface/funInterfaceCallInLambda.kt"); + } + @TestMetadata("funInterfaceInheritance.kt") public void testFunInterfaceInheritance() throws Exception { runTest("compiler/testData/codegen/box/funInterface/funInterfaceInheritance.kt"); @@ -11698,6 +11754,19 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { } } + @TestMetadata("compiler/testData/codegen/box/inline") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Inline extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + + public void testAllFilesPresentInInline() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inline"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true); + } + } + @TestMetadata("compiler/testData/codegen/box/inlineClasses") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) @@ -12220,6 +12289,11 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { runTest("compiler/testData/codegen/box/inlineClasses/kt28585.kt"); } + @TestMetadata("kt32793.kt") + public void testKt32793() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/kt32793.kt"); + } + @TestMetadata("kt33119.kt") public void testKt33119() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/kt33119.kt"); @@ -13151,6 +13225,34 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { } } + @TestMetadata("compiler/testData/codegen/box/inlineClasses/inlineClassCollection") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class InlineClassCollection extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + + public void testAllFilesPresentInInlineClassCollection() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/inlineClassCollection"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true); + } + + @TestMetadata("inlineCollectionOfInlineClass.kt") + public void testInlineCollectionOfInlineClass() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/inlineClassCollection/inlineCollectionOfInlineClass.kt"); + } + + @TestMetadata("inlineListOfInlineClass.kt") + public void testInlineListOfInlineClass() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/inlineClassCollection/inlineListOfInlineClass.kt"); + } + + @TestMetadata("inlineMapOfInlineClass.kt") + public void testInlineMapOfInlineClass() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/inlineClassCollection/inlineMapOfInlineClass.kt"); + } + } + @TestMetadata("compiler/testData/codegen/box/inlineClasses/interfaceDelegation") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) @@ -13539,6 +13641,19 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { } } + @TestMetadata("compiler/testData/codegen/box/innerClass") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class InnerClass extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + + public void testAllFilesPresentInInnerClass() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/innerClass"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true); + } + } + @TestMetadata("compiler/testData/codegen/box/innerNested") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) @@ -13826,6 +13941,19 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { } } + @TestMetadata("compiler/testData/codegen/box/interfaces") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Interfaces extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + + public void testAllFilesPresentInInterfaces() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/interfaces"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true); + } + } + @TestMetadata("compiler/testData/codegen/box/intrinsics") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) @@ -13956,6 +14084,32 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/invokedynamic"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true); } + @TestMetadata("compiler/testData/codegen/box/invokedynamic/lambdas") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Lambdas extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + + public void testAllFilesPresentInLambdas() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/invokedynamic/lambdas"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true); + } + + @TestMetadata("compiler/testData/codegen/box/invokedynamic/lambdas/inlineClassInSignature") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class InlineClassInSignature extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + + public void testAllFilesPresentInInlineClassInSignature() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/invokedynamic/lambdas/inlineClassInSignature"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true); + } + } + } + @TestMetadata("compiler/testData/codegen/box/invokedynamic/sam") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) @@ -13968,19 +14122,6 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/invokedynamic/sam"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true); } - @TestMetadata("compiler/testData/codegen/box/invokedynamic/sam/inline") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Inline extends AbstractJsCodegenBoxTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); - } - - public void testAllFilesPresentInInline() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/invokedynamic/sam/inline"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true); - } - } - @TestMetadata("compiler/testData/codegen/box/invokedynamic/sam/inlineClassInSignature") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) @@ -15763,6 +15904,19 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { } } + @TestMetadata("compiler/testData/codegen/box/notNullAssertions") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class NotNullAssertions extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + + public void testAllFilesPresentInNotNullAssertions() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/notNullAssertions"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true); + } + } + @TestMetadata("compiler/testData/codegen/box/nothingValue") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) @@ -18204,6 +18358,19 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { } } + @TestMetadata("compiler/testData/codegen/box/property") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Property extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + + public void testAllFilesPresentInProperty() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/property"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true); + } + } + @TestMetadata("compiler/testData/codegen/box/publishedApi") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) @@ -22407,6 +22574,19 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { } } + @TestMetadata("compiler/testData/codegen/box/recursiveRawTypes") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class RecursiveRawTypes extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + + public void testAllFilesPresentInRecursiveRawTypes() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/recursiveRawTypes"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true); + } + } + @TestMetadata("compiler/testData/codegen/box/reflection") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) @@ -24339,6 +24519,11 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { runTest("compiler/testData/codegen/box/reified/instanceof.kt"); } + @TestMetadata("kt16445.kt") + public void testKt16445() throws Exception { + runTest("compiler/testData/codegen/box/reified/kt16445.kt"); + } + @TestMetadata("newArrayInt.kt") public void testNewArrayInt() throws Exception { runTest("compiler/testData/codegen/box/reified/newArrayInt.kt"); @@ -24523,6 +24708,32 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/sam"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true); } + @TestMetadata("compiler/testData/codegen/box/sam/adapters") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Adapters extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + + public void testAllFilesPresentInAdapters() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/sam/adapters"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true); + } + + @TestMetadata("compiler/testData/codegen/box/sam/adapters/operators") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Operators extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + + public void testAllFilesPresentInOperators() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/sam/adapters/operators"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true); + } + } + } + @TestMetadata("compiler/testData/codegen/box/sam/constructors") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) @@ -25033,6 +25244,19 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { } } + @TestMetadata("compiler/testData/codegen/box/staticFun") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class StaticFun extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + + public void testAllFilesPresentInStaticFun() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/staticFun"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true); + } + } + @TestMetadata("compiler/testData/codegen/box/statics") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) @@ -25574,6 +25798,19 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { } } + @TestMetadata("compiler/testData/codegen/box/syntheticExtensions") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class SyntheticExtensions extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + + public void testAllFilesPresentInSyntheticExtensions() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/syntheticExtensions"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true); + } + } + @TestMetadata("compiler/testData/codegen/box/throws") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) @@ -26012,6 +26249,11 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { runTest("compiler/testData/codegen/box/typealias/typeAliasConstructorInSuperCall.kt"); } + @TestMetadata("typeAliasFunction.kt") + public void testTypeAliasFunction() throws Exception { + runTest("compiler/testData/codegen/box/typealias/typeAliasFunction.kt"); + } + @TestMetadata("typeAliasInAnonymousObjectType.kt") public void testTypeAliasInAnonymousObjectType() throws Exception { runTest("compiler/testData/codegen/box/typealias/typeAliasInAnonymousObjectType.kt"); @@ -26471,6 +26713,71 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { } } + @TestMetadata("compiler/testData/codegen/box/varargs") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Varargs extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + + public void testAllFilesPresentInVarargs() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/varargs"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true); + } + } + + @TestMetadata("compiler/testData/codegen/box/visibility") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Visibility extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + + public void testAllFilesPresentInVisibility() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/visibility"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true); + } + + @TestMetadata("compiler/testData/codegen/box/visibility/package") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Package extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + + public void testAllFilesPresentInPackage() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/visibility/package"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true); + } + } + + @TestMetadata("compiler/testData/codegen/box/visibility/protectedAndPackage") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ProtectedAndPackage extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + + public void testAllFilesPresentInProtectedAndPackage() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/visibility/protectedAndPackage"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true); + } + } + + @TestMetadata("compiler/testData/codegen/box/visibility/protectedStatic") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ProtectedStatic extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + + public void testAllFilesPresentInProtectedStatic() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/visibility/protectedStatic"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true); + } + } + } + @TestMetadata("compiler/testData/codegen/box/when") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/semantics/JsCodegenInlineTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/semantics/JsCodegenInlineTestGenerated.java index ac312ac3401..52adc97aede 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/semantics/JsCodegenInlineTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/semantics/JsCodegenInlineTestGenerated.java @@ -242,6 +242,11 @@ public class JsCodegenInlineTestGenerated extends AbstractJsCodegenInlineTest { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt42815_delegated.kt"); } + @TestMetadata("kt6007.kt") + public void testKt6007() throws Exception { + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt6007.kt"); + } + @TestMetadata("kt6552.kt") public void testKt6552() throws Exception { runTest("compiler/testData/codegen/boxInline/anonymousObject/kt6552.kt"); @@ -847,6 +852,11 @@ public class JsCodegenInlineTestGenerated extends AbstractJsCodegenInlineTest { runTest("compiler/testData/codegen/boxInline/callableReference/bound/kt18728_4.kt"); } + @TestMetadata("lambdaOnLhs.kt") + public void testLambdaOnLhs() throws Exception { + runTest("compiler/testData/codegen/boxInline/callableReference/bound/lambdaOnLhs.kt"); + } + @TestMetadata("map.kt") public void testMap() throws Exception { runTest("compiler/testData/codegen/boxInline/callableReference/bound/map.kt"); @@ -1923,6 +1933,45 @@ public class JsCodegenInlineTestGenerated extends AbstractJsCodegenInlineTest { } } + @TestMetadata("compiler/testData/codegen/boxInline/invokedynamic") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Invokedynamic extends AbstractJsCodegenInlineTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + + public void testAllFilesPresentInInvokedynamic() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/invokedynamic"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true); + } + + @TestMetadata("compiler/testData/codegen/boxInline/invokedynamic/lambdas") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Lambdas extends AbstractJsCodegenInlineTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + + public void testAllFilesPresentInLambdas() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/invokedynamic/lambdas"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true); + } + } + + @TestMetadata("compiler/testData/codegen/boxInline/invokedynamic/sam") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Sam extends AbstractJsCodegenInlineTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + + public void testAllFilesPresentInSam() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/invokedynamic/sam"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true); + } + } + } + @TestMetadata("compiler/testData/codegen/boxInline/jvmName") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) @@ -2170,6 +2219,46 @@ public class JsCodegenInlineTestGenerated extends AbstractJsCodegenInlineTest { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/explicitLocalReturn.kt"); } + @TestMetadata("fromArrayGenerator.kt") + public void testFromArrayGenerator() throws Exception { + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/fromArrayGenerator.kt"); + } + + @TestMetadata("fromArrayGeneratorCatch.kt") + public void testFromArrayGeneratorCatch() throws Exception { + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/fromArrayGeneratorCatch.kt"); + } + + @TestMetadata("fromArrayGeneratorNested.kt") + public void testFromArrayGeneratorNested() throws Exception { + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/fromArrayGeneratorNested.kt"); + } + + @TestMetadata("fromArrayGeneratorWithCapture.kt") + public void testFromArrayGeneratorWithCapture() throws Exception { + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/fromArrayGeneratorWithCapture.kt"); + } + + @TestMetadata("fromArrayGeneratorWithCatch.kt") + public void testFromArrayGeneratorWithCatch() throws Exception { + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/fromArrayGeneratorWithCatch.kt"); + } + + @TestMetadata("fromArrayGeneratorWithFinally.kt") + public void testFromArrayGeneratorWithFinally() throws Exception { + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/fromArrayGeneratorWithFinally.kt"); + } + + @TestMetadata("fromArrayGeneratorWithFinallyX2.kt") + public void testFromArrayGeneratorWithFinallyX2() throws Exception { + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/fromArrayGeneratorWithFinallyX2.kt"); + } + + @TestMetadata("fromArrayGeneratorWithFinallyX2_2.kt") + public void testFromArrayGeneratorWithFinallyX2_2() throws Exception { + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/fromArrayGeneratorWithFinallyX2_2.kt"); + } + @TestMetadata("fromInterfaceDefaultGetter.kt") public void testFromInterfaceDefaultGetter() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/fromInterfaceDefaultGetter.kt"); @@ -2848,6 +2937,26 @@ public class JsCodegenInlineTestGenerated extends AbstractJsCodegenInlineTest { runTest("compiler/testData/codegen/boxInline/reified/kt18977.kt"); } + @TestMetadata("kt35511.kt") + public void testKt35511() throws Exception { + runTest("compiler/testData/codegen/boxInline/reified/kt35511.kt"); + } + + @TestMetadata("kt35511_try.kt") + public void testKt35511_try() throws Exception { + runTest("compiler/testData/codegen/boxInline/reified/kt35511_try.kt"); + } + + @TestMetadata("kt35511_try_valueOf.kt") + public void testKt35511_try_valueOf() throws Exception { + runTest("compiler/testData/codegen/boxInline/reified/kt35511_try_valueOf.kt"); + } + + @TestMetadata("kt35511_try_values.kt") + public void testKt35511_try_values() throws Exception { + runTest("compiler/testData/codegen/boxInline/reified/kt35511_try_values.kt"); + } + @TestMetadata("kt7017.kt") public void testKt7017() throws Exception { runTest("compiler/testData/codegen/boxInline/reified/kt7017.kt"); @@ -3952,6 +4061,11 @@ public class JsCodegenInlineTestGenerated extends AbstractJsCodegenInlineTest { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/insideObject.kt"); } + @TestMetadata("kt30708.kt") + public void testKt30708() throws Exception { + runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/kt30708.kt"); + } + @TestMetadata("lambdaTransformation.kt") public void testLambdaTransformation() throws Exception { runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/lambdaTransformation.kt"); diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/wasm/semantics/IrCodegenBoxWasmTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/wasm/semantics/IrCodegenBoxWasmTestGenerated.java index 94605af3d16..d39ca056001 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/wasm/semantics/IrCodegenBoxWasmTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/wasm/semantics/IrCodegenBoxWasmTestGenerated.java @@ -27,7 +27,7 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest } public void testAllFilesPresentInBox() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true, "toArray", "classLiteral", "reflection", "contracts", "platformTypes", "ranges/stepped/unsigned", "coroutines", "parametersMetadata", "finally", "deadCodeElimination", "controlStructures/tryCatchInExpressions", "delegatedProperty", "oldLanguageVersions"); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true, "toArray", "classLiteral", "reflection", "contracts", "platformTypes", "ranges/stepped/unsigned", "coroutines", "parametersMetadata", "finally", "deadCodeElimination", "controlStructures/tryCatchInExpressions", "delegatedProperty", "oldLanguageVersions", "compileKotlinAgainstKotlin"); } @TestMetadata("compiler/testData/codegen/box/annotations") @@ -70,6 +70,19 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest } } + @TestMetadata("compiler/testData/codegen/box/annotations/kClassMapping") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class KClassMapping extends AbstractIrCodegenBoxWasmTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.WASM, testDataFilePath); + } + + public void testAllFilesPresentInKClassMapping() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/annotations/kClassMapping"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true); + } + } + @TestMetadata("compiler/testData/codegen/box/annotations/typeAnnotations") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) @@ -3019,6 +3032,19 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest } } + @TestMetadata("compiler/testData/codegen/box/constructor") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Constructor extends AbstractIrCodegenBoxWasmTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.WASM, testDataFilePath); + } + + public void testAllFilesPresentInConstructor() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/constructor"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true); + } + } + @TestMetadata("compiler/testData/codegen/box/constructorCall") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) @@ -6179,6 +6205,19 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest } } + @TestMetadata("compiler/testData/codegen/box/inline") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Inline extends AbstractIrCodegenBoxWasmTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.WASM, testDataFilePath); + } + + public void testAllFilesPresentInInline() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inline"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true); + } + } + @TestMetadata("compiler/testData/codegen/box/inlineClasses") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) @@ -7377,6 +7416,34 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest } } + @TestMetadata("compiler/testData/codegen/box/inlineClasses/inlineClassCollection") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class InlineClassCollection extends AbstractIrCodegenBoxWasmTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.WASM, testDataFilePath); + } + + public void testAllFilesPresentInInlineClassCollection() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/inlineClassCollection"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true); + } + + @TestMetadata("inlineCollectionOfInlineClass.kt") + public void testInlineCollectionOfInlineClass() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/inlineClassCollection/inlineCollectionOfInlineClass.kt"); + } + + @TestMetadata("inlineListOfInlineClass.kt") + public void testInlineListOfInlineClass() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/inlineClassCollection/inlineListOfInlineClass.kt"); + } + + @TestMetadata("inlineMapOfInlineClass.kt") + public void testInlineMapOfInlineClass() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/inlineClassCollection/inlineMapOfInlineClass.kt"); + } + } + @TestMetadata("compiler/testData/codegen/box/inlineClasses/interfaceDelegation") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) @@ -7665,6 +7732,19 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest } } + @TestMetadata("compiler/testData/codegen/box/innerClass") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class InnerClass extends AbstractIrCodegenBoxWasmTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.WASM, testDataFilePath); + } + + public void testAllFilesPresentInInnerClass() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/innerClass"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true); + } + } + @TestMetadata("compiler/testData/codegen/box/innerNested") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) @@ -7952,6 +8032,19 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest } } + @TestMetadata("compiler/testData/codegen/box/interfaces") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Interfaces extends AbstractIrCodegenBoxWasmTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.WASM, testDataFilePath); + } + + public void testAllFilesPresentInInterfaces() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/interfaces"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true); + } + } + @TestMetadata("compiler/testData/codegen/box/intrinsics") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) @@ -8052,6 +8145,32 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/invokedynamic"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true); } + @TestMetadata("compiler/testData/codegen/box/invokedynamic/lambdas") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Lambdas extends AbstractIrCodegenBoxWasmTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.WASM, testDataFilePath); + } + + public void testAllFilesPresentInLambdas() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/invokedynamic/lambdas"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true); + } + + @TestMetadata("compiler/testData/codegen/box/invokedynamic/lambdas/inlineClassInSignature") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class InlineClassInSignature extends AbstractIrCodegenBoxWasmTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.WASM, testDataFilePath); + } + + public void testAllFilesPresentInInlineClassInSignature() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/invokedynamic/lambdas/inlineClassInSignature"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true); + } + } + } + @TestMetadata("compiler/testData/codegen/box/invokedynamic/sam") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) @@ -8064,19 +8183,6 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/invokedynamic/sam"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true); } - @TestMetadata("compiler/testData/codegen/box/invokedynamic/sam/inline") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Inline extends AbstractIrCodegenBoxWasmTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest0(this::doTest, TargetBackend.WASM, testDataFilePath); - } - - public void testAllFilesPresentInInline() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/invokedynamic/sam/inline"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true); - } - } - @TestMetadata("compiler/testData/codegen/box/invokedynamic/sam/inlineClassInSignature") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) @@ -9649,6 +9755,19 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest } } + @TestMetadata("compiler/testData/codegen/box/notNullAssertions") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class NotNullAssertions extends AbstractIrCodegenBoxWasmTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.WASM, testDataFilePath); + } + + public void testAllFilesPresentInNotNullAssertions() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/notNullAssertions"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true); + } + } + @TestMetadata("compiler/testData/codegen/box/nothingValue") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) @@ -11493,6 +11612,19 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest } } + @TestMetadata("compiler/testData/codegen/box/property") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Property extends AbstractIrCodegenBoxWasmTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.WASM, testDataFilePath); + } + + public void testAllFilesPresentInProperty() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/property"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true); + } + } + @TestMetadata("compiler/testData/codegen/box/publishedApi") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) @@ -12668,6 +12800,19 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest } } + @TestMetadata("compiler/testData/codegen/box/recursiveRawTypes") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class RecursiveRawTypes extends AbstractIrCodegenBoxWasmTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.WASM, testDataFilePath); + } + + public void testAllFilesPresentInRecursiveRawTypes() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/recursiveRawTypes"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true); + } + } + @TestMetadata("compiler/testData/codegen/box/regressions") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) @@ -12933,6 +13078,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest runTest("compiler/testData/codegen/box/reified/instanceof.kt"); } + @TestMetadata("kt16445.kt") + public void testKt16445() throws Exception { + runTest("compiler/testData/codegen/box/reified/kt16445.kt"); + } + @TestMetadata("newArrayInt.kt") public void testNewArrayInt() throws Exception { runTest("compiler/testData/codegen/box/reified/newArrayInt.kt"); @@ -13072,6 +13222,32 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/sam"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true); } + @TestMetadata("compiler/testData/codegen/box/sam/adapters") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Adapters extends AbstractIrCodegenBoxWasmTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.WASM, testDataFilePath); + } + + public void testAllFilesPresentInAdapters() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/sam/adapters"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true); + } + + @TestMetadata("compiler/testData/codegen/box/sam/adapters/operators") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Operators extends AbstractIrCodegenBoxWasmTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.WASM, testDataFilePath); + } + + public void testAllFilesPresentInOperators() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/sam/adapters/operators"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true); + } + } + } + @TestMetadata("compiler/testData/codegen/box/sam/constructors") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) @@ -13472,6 +13648,19 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest } } + @TestMetadata("compiler/testData/codegen/box/staticFun") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class StaticFun extends AbstractIrCodegenBoxWasmTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.WASM, testDataFilePath); + } + + public void testAllFilesPresentInStaticFun() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/staticFun"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true); + } + } + @TestMetadata("compiler/testData/codegen/box/statics") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) @@ -13963,6 +14152,19 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest } } + @TestMetadata("compiler/testData/codegen/box/syntheticExtensions") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class SyntheticExtensions extends AbstractIrCodegenBoxWasmTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.WASM, testDataFilePath); + } + + public void testAllFilesPresentInSyntheticExtensions() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/syntheticExtensions"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true); + } + } + @TestMetadata("compiler/testData/codegen/box/throws") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) @@ -14348,6 +14550,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest runTest("compiler/testData/codegen/box/typealias/typeAliasConstructorInSuperCall.kt"); } + @TestMetadata("typeAliasFunction.kt") + public void testTypeAliasFunction() throws Exception { + runTest("compiler/testData/codegen/box/typealias/typeAliasFunction.kt"); + } + @TestMetadata("typeAliasInAnonymousObjectType.kt") public void testTypeAliasInAnonymousObjectType() throws Exception { runTest("compiler/testData/codegen/box/typealias/typeAliasInAnonymousObjectType.kt"); @@ -14657,6 +14864,71 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest } } + @TestMetadata("compiler/testData/codegen/box/varargs") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Varargs extends AbstractIrCodegenBoxWasmTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.WASM, testDataFilePath); + } + + public void testAllFilesPresentInVarargs() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/varargs"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true); + } + } + + @TestMetadata("compiler/testData/codegen/box/visibility") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Visibility extends AbstractIrCodegenBoxWasmTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.WASM, testDataFilePath); + } + + public void testAllFilesPresentInVisibility() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/visibility"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true); + } + + @TestMetadata("compiler/testData/codegen/box/visibility/package") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Package extends AbstractIrCodegenBoxWasmTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.WASM, testDataFilePath); + } + + public void testAllFilesPresentInPackage() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/visibility/package"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true); + } + } + + @TestMetadata("compiler/testData/codegen/box/visibility/protectedAndPackage") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ProtectedAndPackage extends AbstractIrCodegenBoxWasmTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.WASM, testDataFilePath); + } + + public void testAllFilesPresentInProtectedAndPackage() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/visibility/protectedAndPackage"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true); + } + } + + @TestMetadata("compiler/testData/codegen/box/visibility/protectedStatic") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ProtectedStatic extends AbstractIrCodegenBoxWasmTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.WASM, testDataFilePath); + } + + public void testAllFilesPresentInProtectedStatic() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/visibility/protectedStatic"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true); + } + } + } + @TestMetadata("compiler/testData/codegen/box/when") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) diff --git a/js/js.translator/testData/box/regression/companionObjectInExternalInterface.kt b/js/js.translator/testData/box/regression/companionObjectInExternalInterface.kt index 3ee97113c7c..123f77c9af7 100644 --- a/js/js.translator/testData/box/regression/companionObjectInExternalInterface.kt +++ b/js/js.translator/testData/box/regression/companionObjectInExternalInterface.kt @@ -3,6 +3,7 @@ // This hack is used in org.w3c.* part of standard library to represent unions of Strings // Test that we are not actually trying to access nonexistent companion object +@JsName("null") @Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE") public external interface I { companion object @@ -14,4 +15,4 @@ fun box(): String { if (I.O != I.O) return "Fail 1" if (I.O == I.K) return "Fail 2" return I.O.unsafeCast() + I.K.unsafeCast() -} \ No newline at end of file +} diff --git a/js/js.translator/testData/lineNumbers/coroutine.kt b/js/js.translator/testData/lineNumbers/coroutine.kt index c4562c1c16d..f95ad0eb35c 100644 --- a/js/js.translator/testData/lineNumbers/coroutine.kt +++ b/js/js.translator/testData/lineNumbers/coroutine.kt @@ -14,4 +14,4 @@ suspend fun bar(): Unit { println(a + b) } -// LINES: 39 4 4 4 7 5 5 45 45 5 92 45 5 5 6 4 4 4 9 15 9 9 9 * 9 15 10 10 11 11 11 11 11 * 11 12 12 13 13 13 13 13 13 13 14 14 * 9 15 9 9 9 9 \ No newline at end of file +// LINES: 39 4 4 4 7 5 5 45 45 5 91 45 5 5 6 4 4 4 9 15 9 9 9 * 9 15 10 10 11 11 11 11 11 * 11 12 12 13 13 13 13 13 13 13 14 14 * 9 15 9 9 9 9 \ No newline at end of file diff --git a/js/js.translator/testData/typescript-export/declarations/declarations.kt b/js/js.translator/testData/typescript-export/declarations/declarations.kt index 6a46ee46f5e..88b4a6d915b 100644 --- a/js/js.translator/testData/typescript-export/declarations/declarations.kt +++ b/js/js.translator/testData/typescript-export/declarations/declarations.kt @@ -89,6 +89,7 @@ object O0 object O { val x = 10 + @JsName("foo") // TODO: Should work without JsName fun foo() = 20 } diff --git a/js/js.translator/testData/typescript-export/inheritance/inheritance.kt b/js/js.translator/testData/typescript-export/inheritance/inheritance.kt index 896df838e19..bb3a40a6885 100644 --- a/js/js.translator/testData/typescript-export/inheritance/inheritance.kt +++ b/js/js.translator/testData/typescript-export/inheritance/inheritance.kt @@ -45,5 +45,6 @@ final class FC : OC(true, "FC") object O1 : OC(true, "O1") object O2 : OC(true, "O2") { + @JsName("foo") // TODO: Should work without JsName fun foo(): Int = 10 } \ No newline at end of file diff --git a/js/js.translator/testData/typescript-export/visibility/visibility.kt b/js/js.translator/testData/typescript-export/visibility/visibility.kt index 4078c404758..8d1302babb5 100644 --- a/js/js.translator/testData/typescript-export/visibility/visibility.kt +++ b/js/js.translator/testData/typescript-export/visibility/visibility.kt @@ -37,6 +37,7 @@ open class Class { protected class protectedClass public val publicVal = 10 + @JsName("publicFun") // TODO: Should work without JsName public fun publicFun() = 10 public class publicClass } \ No newline at end of file diff --git a/kotlin-native/CHANGELOG.md b/kotlin-native/CHANGELOG.md index 77a281379e3..b4171b7a733 100644 --- a/kotlin-native/CHANGELOG.md +++ b/kotlin-native/CHANGELOG.md @@ -1,3 +1,6 @@ +# 1.4.30 (Feb 2021) + * [KT-44083](https://youtrack.jetbrains.com/issue/KT-44083) Fix NSUInteger size for Watchos x64 + # 1.4.30-RC (Jan 2021) * [KT-44271](https://youtrack.jetbrains.com/issue/KT-44271) Incorrect linking when targeting linux_x64 from mingw_x64 host * [KT-44219](https://youtrack.jetbrains.com/issue/KT-44219) Non-reified type parameters with recursive bounds are not supported yet @@ -11,6 +14,7 @@ * [KT-43198](https://youtrack.jetbrains.com/issue/KT-43198) Init blocks inside of inline classes * [KT-42649](https://youtrack.jetbrains.com/issue/KT-42649) Fix secondary constructors of generic inline classes * [KT-38772](https://youtrack.jetbrains.com/issue/KT-38772) Support non-reified type parameters in typeOf + * [KT-42428](https://youtrack.jetbrains.com/issue/KT-42428) Inconsistent behavior of map.entries on Kotlin.Native * Compiler customization * [KT-40584](https://youtrack.jetbrains.com/issue/KT-40584) Untie Kotlin/Native from the fixed LLVM distribution * [KT-42234](https://youtrack.jetbrains.com/issue/KT-42234) Move LLVM optimization parameters into konan.properties diff --git a/kotlin-native/Interop/StubGenerator/src/main/kotlin/org/jetbrains/kotlin/native/interop/gen/AbiSpecific.kt b/kotlin-native/Interop/StubGenerator/src/main/kotlin/org/jetbrains/kotlin/native/interop/gen/AbiSpecific.kt index d1661642c45..50d5d96cb61 100644 --- a/kotlin-native/Interop/StubGenerator/src/main/kotlin/org/jetbrains/kotlin/native/interop/gen/AbiSpecific.kt +++ b/kotlin-native/Interop/StubGenerator/src/main/kotlin/org/jetbrains/kotlin/native/interop/gen/AbiSpecific.kt @@ -18,7 +18,8 @@ internal fun Type.isStret(target: KonanTarget): Boolean { val unwrappedType = this.unwrapTypedefs() val abiInfo: ObjCAbiInfo = when (target) { KonanTarget.IOS_ARM64, - KonanTarget.TVOS_ARM64 -> DarwinArm64AbiInfo() + KonanTarget.TVOS_ARM64, + KonanTarget.MACOS_ARM64 -> DarwinArm64AbiInfo() KonanTarget.IOS_X64, KonanTarget.MACOS_X64, diff --git a/kotlin-native/Interop/StubGenerator/src/main/kotlin/org/jetbrains/kotlin/native/interop/gen/jvm/InteropLibraryCreation.kt b/kotlin-native/Interop/StubGenerator/src/main/kotlin/org/jetbrains/kotlin/native/interop/gen/jvm/InteropLibraryCreation.kt index 4a0f66c84aa..51b94c5cc6f 100644 --- a/kotlin-native/Interop/StubGenerator/src/main/kotlin/org/jetbrains/kotlin/native/interop/gen/jvm/InteropLibraryCreation.kt +++ b/kotlin-native/Interop/StubGenerator/src/main/kotlin/org/jetbrains/kotlin/native/interop/gen/jvm/InteropLibraryCreation.kt @@ -45,7 +45,7 @@ fun createInteropLibrary( irVersion = KlibIrVersion.INSTANCE.toString() ) val libFile = File(outputPath) - val unzippedDir = if (nopack) libFile else org.jetbrains.kotlin.konan.file.createTempDir(moduleName) + val unzippedDir = if (nopack) libFile else org.jetbrains.kotlin.konan.file.createTempDir("klib") val layout = KonanLibraryLayoutForWriter(libFile, unzippedDir, target) KonanLibraryWriterImpl( moduleName, diff --git a/kotlin-native/RELEASE_NOTES.md b/kotlin-native/RELEASE_NOTES.md index 197e982036a..c9fedbf1be3 100644 --- a/kotlin-native/RELEASE_NOTES.md +++ b/kotlin-native/RELEASE_NOTES.md @@ -25,15 +25,14 @@ the following platforms: * Ubuntu Linux x86-64 (14.04, 16.04 and later), other Linux flavours may work as well, host and target (`-target linux_x64`, default on Linux hosts, hosted on Linux, Windows and macOS). * Microsoft Windows x86-64 (tested on Windows 7 and Windows 10), host and target (`-target mingw_x64`, - default on Windows hosts). Experimental support is available on Linux and macOS hosts (requires Wine). + default on Windows hosts). * Microsoft Windows x86-32 cross-compiled target (`-target mingw_x86`), hosted on Windows. - Experimental support is available on Linux and macOS hosts (requires Wine). * Apple iOS (armv7 and arm64 devices, x86 simulator), cross-compiled target (`-target ios_arm32|ios_arm64|ios_x64`), hosted on macOS. * Apple tvOS (arm64 devices, x86 simulator), cross-compiled target (`-target tvos_arm64|tvos_x64`), hosted on macOS. * Apple watchOS (arm32/arm64 devices, x86 simulator), cross-compiled target - (`-target watchos_arm32|watchos_arm64|watchos_x86`), hosted on macOS. + (`-target watchos_arm32|watchos_arm64|watchos_x86|watchos_x64`), hosted on macOS. * Linux arm32 hardfp, Raspberry Pi, cross-compiled target (`-target raspberrypi`), hosted on Linux, Windows and macOS * Linux MIPS big endian, cross-compiled target (`-target mips`), hosted on Linux. * Linux MIPS little endian, cross-compiled target (`-target mipsel`), hosted on Linux. @@ -42,11 +41,8 @@ the following platforms: * WebAssembly (`-target wasm32`) target, hosted on Linux, Windows or macOS. Webassembly support is experimental and could be discontinued in further releases. * Experimental support for Zephyr RTOS (`-target zephyr_stm32f4_disco`) is available on macOS, Linux - and Windows hosts. - - To enable experimental targets Kotlin/Native must be recompiled with `org.jetbrains.kotlin.native.experimentalTargets` Gradle property set. - - Adding support for other target platforms shouldn't be too hard, if LLVM support is available. + and Windows hosts. "Experimental" here also means that support for this target might be broken at the moment, + and UX might be disappointing. ## Compatibility and features ## @@ -55,28 +51,37 @@ Produced programs are fully self-sufficient and do not need JVM or other runtime On macOS it also requires Xcode 11.0 or newer to be installed. -The language and library version supported by this release match Kotlin 1.4. +The language and library version supported by this release match Kotlin 1.5. However, there are certain limitations, see section [Known Limitations](#limitations). Currently _Kotlin/Native_ uses reference counting based memory management scheme with a cycle collection algorithm. Multiple threads could be used, but objects must be explicitly transferred -between threads, and same object couldn't be accessed by two threads concurrently. +between threads, and same object couldn't be accessed by two threads concurrently unless it is frozen. +See the relevant [documentation](https://kotlinlang.org/docs/reference/native/concurrency.html). +We are going to lift these multithreading restrictions, which involves implementing a new memory manager. +More details are available in +["Kotlin/Native Memory Management Roadmap"](https://blog.jetbrains.com/kotlin/2020/07/kotlin-native-memory-management-roadmap/). -_Kotlin/Native_ provides efficient interoperability with libraries written in C or Objective-C, and supports -automatic generation of Kotlin bindings from a C/Objective-C header file. -See the samples coming with the distribution. +_Kotlin/Native_ provides efficient bidirectional interoperability with C and Objective-C. +See the [samples](https://github.com/JetBrains/kotlin-native/tree/master/samples) +and the [tutorials](https://kotlinlang.org/docs/tutorials/). ## Getting Started ## + +The most complete experience with Kotlin/Native can be achieved by using +[Gradle](https://kotlinlang.org/docs/tutorials/native/using-gradle.html), +[IntelliJ IDEA](https://kotlinlang.org/docs/tutorials/native/using-intellij-idea.html) or +[Android Studio with KMM plugin](https://kotlinlang.org/docs/mobile/create-first-app.html) if you target iOS. - Download _Kotlin/Native_ distribution and unpack it. You can run command line compiler with +If you are interested in using Kotlin/Native for iOS, then +[Kotlin Multiplatform Mobile portal](https://kotlinlang.org/lp/mobile/) might also be useful for you. + +Command line compiler is also +[available](https://kotlinlang.org/docs/tutorials/native/using-command-line-compiler.html). - bin/kotlinc .kt -o - - During the first run it will download all the external dependencies, such as LLVM. - -To see the list of available flags, run `kotlinc -h`. - -For documentation on C interoperability stubs see [INTEROP.md](https://github.com/JetBrains/kotlin-native/blob/master/INTEROP.md). +More information can be found in the overviews of +[Kotlin/Native](https://kotlinlang.org/docs/reference/native-overview.html) +and [Kotlin Multiplatform](https://kotlinlang.org/docs/reference/multiplatform.html). ## Known limitations ## diff --git a/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/BitcodeCompiler.kt b/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/BitcodeCompiler.kt index d8701e68719..e7dd68c7658 100644 --- a/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/BitcodeCompiler.kt +++ b/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/BitcodeCompiler.kt @@ -52,13 +52,19 @@ internal class BitcodeCompiler(val context: Context) { val profilingFlags = llvmProfilingFlags().map { listOf("-mllvm", it) }.flatten() - // LLVM we use does not have support for arm64_32. // TODO: fix with LLVM update. val targetTriple = when (context.config.target) { + // LLVM we use does not have support for arm64_32. KonanTarget.WATCHOS_ARM64 -> { require(configurables is AppleConfigurables) "arm64_32-apple-watchos${configurables.osVersionMin}" } + // Runtime generates bitcode for mythical macos 10.16 because of old Clang. + // Let's fix it. + KonanTarget.MACOS_ARM64 -> { + require(configurables is AppleConfigurables) + "arm64-apple-macos${configurables.osVersionMin}" + } else -> context.llvm.targetTriple } val flags = overrideClangOptions.takeIf(List::isNotEmpty) diff --git a/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/BuiltInFictitiousFunctionIrClassFactory.kt b/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/BuiltInFictitiousFunctionIrClassFactory.kt index ef10bbadf85..15df97563cf 100644 --- a/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/BuiltInFictitiousFunctionIrClassFactory.kt +++ b/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/BuiltInFictitiousFunctionIrClassFactory.kt @@ -62,7 +62,7 @@ internal class BuiltInFictitiousFunctionIrClassFactory( // builtClasses.forEach { it.addFakeOverrides() } } - class FunctionalInterface(val irClass: IrClass, val arity: Int) + class FunctionalInterface(val irClass: IrClass, val descriptor: FunctionClassDescriptor, val arity: Int) fun buildAllClasses() { val maxArity = 255 // See [BuiltInFictitiousFunctionClassFactory]. @@ -112,10 +112,10 @@ internal class BuiltInFictitiousFunctionIrClassFactory( val builtClasses get() = builtClassesMap.values - val builtFunctionNClasses get() = builtClassesMap.values.mapNotNull { - with(it.descriptor as FunctionClassDescriptor) { + val builtFunctionNClasses get() = builtClassesMap.entries.mapNotNull { (descriptor, irClass) -> + with(descriptor) { if (functionKind == FunctionClassKind.Function) - FunctionalInterface(it, arity) + FunctionalInterface(irClass, descriptor, arity) else null } } diff --git a/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/CAdapterGenerator.kt b/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/CAdapterGenerator.kt index 5e74fb8b6c3..98a55efed06 100644 --- a/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/CAdapterGenerator.kt +++ b/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/CAdapterGenerator.kt @@ -21,8 +21,6 @@ import org.jetbrains.kotlin.ir.declarations.IrClass import org.jetbrains.kotlin.ir.declarations.IrEnumEntry import org.jetbrains.kotlin.ir.declarations.IrFunction import org.jetbrains.kotlin.ir.util.SymbolTable -import org.jetbrains.kotlin.ir.util.isEnumClass -import org.jetbrains.kotlin.ir.util.isEnumEntry import org.jetbrains.kotlin.ir.util.referenceFunction import org.jetbrains.kotlin.konan.target.* import org.jetbrains.kotlin.name.isChildOf @@ -35,6 +33,7 @@ import org.jetbrains.kotlin.types.TypeUtils import org.jetbrains.kotlin.types.typeUtil.isNothing import org.jetbrains.kotlin.types.typeUtil.isUnit import org.jetbrains.kotlin.types.typeUtil.makeNullable +import org.jetbrains.kotlin.utils.addIfNotNull private enum class ScopeKind { TOP, @@ -361,8 +360,8 @@ private class ExportedElement(val kind: ElementKind, | |extern "C" KObjHeader* ${cname}_instance(KObjHeader**); |static $objectClassC ${cname}_instance_impl(void) { - | KObjHolder result_holder; | Kotlin_initRuntimeIfNeeded(); + | KObjHolder result_holder; | KObjHeader* result = ${cname}_instance(result_holder.slot()); | return $objectClassC { .pinned = CreateStablePointer(result)}; |} @@ -379,8 +378,8 @@ private class ExportedElement(val kind: ElementKind, return """ |extern "C" KObjHeader* $cname(KObjHeader**); |static $enumClassC ${cname}_impl(void) { - | KObjHolder result_holder; | Kotlin_initRuntimeIfNeeded(); + | KObjHolder result_holder; | KObjHeader* result = $cname(result_holder.slot()); | return $enumClassC { .pinned = CreateStablePointer(result)}; |} @@ -466,12 +465,7 @@ private class ExportedElement(val kind: ElementKind, private fun addUsedType(type: KotlinType, set: MutableSet) { if (type.constructor.declarationDescriptor is TypeParameterDescriptor) return - val clazz = TypeUtils.getClassDescriptor(type) - if (clazz == null) { - context.reportCompilationWarning("cannot get class for $type") - } else { - set += clazz - } + set.addIfNotNull(TypeUtils.getClassDescriptor(type)) } fun addUsedTypes(set: MutableSet) { @@ -602,10 +596,7 @@ internal class CAdapterGenerator(val context: Context) : DeclarationDescriptorVi return true } - override fun visitScriptDescriptor(descriptor: ScriptDescriptor, ignored: Void?): Boolean { - context.reportCompilationWarning("visitScriptDescriptor() is ignored") - return true - } + override fun visitScriptDescriptor(descriptor: ScriptDescriptor, ignored: Void?) = true override fun visitPackageViewDescriptor(descriptor: PackageViewDescriptor, ignored: Void?): Boolean { if (descriptor.module !in moduleDescriptors) return true @@ -623,15 +614,9 @@ internal class CAdapterGenerator(val context: Context) : DeclarationDescriptorVi TODO("visitReceiverParameterDescriptor() shall not be seen") } - override fun visitVariableDescriptor(descriptor: VariableDescriptor, ignored: Void?): Boolean { - context.reportCompilationWarning("visitVariableDescriptor() is ignored for now") - return true - } + override fun visitVariableDescriptor(descriptor: VariableDescriptor, ignored: Void?) = true - override fun visitTypeParameterDescriptor(descriptor: TypeParameterDescriptor, ignored: Void?): Boolean { - context.reportCompilationWarning("visitTypeParameterDescriptor() is ignored for now") - return true - } + override fun visitTypeParameterDescriptor(descriptor: TypeParameterDescriptor, ignored: Void?) = true private val seenPackageFragments = mutableSetOf() private var currentPackageFragments: List = emptyList() @@ -641,10 +626,7 @@ internal class CAdapterGenerator(val context: Context) : DeclarationDescriptorVi TODO("Shall not be called directly") } - override fun visitTypeAliasDescriptor(descriptor: TypeAliasDescriptor, ignored: Void?): Boolean { - context.reportCompilationWarning("visitTypeAliasDescriptor() is ignored for now") - return true - } + override fun visitTypeAliasDescriptor(descriptor: TypeAliasDescriptor, ignored: Void?) = true override fun visitPackageFragmentDescriptor(descriptor: PackageFragmentDescriptor, ignored: Void?): Boolean { val fqName = descriptor.fqName @@ -996,8 +978,8 @@ internal class CAdapterGenerator(val context: Context) : DeclarationDescriptorVi val argument = if (needArgument) "value, " else "" output("extern \"C\" KObjHeader* Kotlin_box${it.shortNameForPredefinedType}($parameter$maybeComma KObjHeader**);") output("static ${translateType(nullableIt)} ${it.createNullableNameForPredefinedType}Impl($parameter) {") - output("KObjHolder result_holder;", 1) output("Kotlin_initRuntimeIfNeeded();", 1) + output("KObjHolder result_holder;", 1) output("KObjHeader* result = Kotlin_box${it.shortNameForPredefinedType}($argument result_holder.slot());", 1) output("return ${translateType(nullableIt)} { .pinned = CreateStablePointer(result) };", 1) output("}") diff --git a/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/KonanCompilerFrontendServices.kt b/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/KonanCompilerFrontendServices.kt index 5ef2399e257..0d0e2540546 100644 --- a/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/KonanCompilerFrontendServices.kt +++ b/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/KonanCompilerFrontendServices.kt @@ -8,18 +8,23 @@ package org.jetbrains.kotlin.backend.konan import org.jetbrains.kotlin.analyzer.ModuleInfo import org.jetbrains.kotlin.backend.konan.objcexport.ObjCExportLazy import org.jetbrains.kotlin.backend.konan.objcexport.ObjCExportLazyImpl -import org.jetbrains.kotlin.backend.konan.objcexport.ObjCExportWarningCollector +import org.jetbrains.kotlin.backend.konan.objcexport.ObjCExportProblemCollector import org.jetbrains.kotlin.backend.konan.objcexport.dumpObjCHeader import org.jetbrains.kotlin.container.* +import org.jetbrains.kotlin.descriptors.FunctionDescriptor import org.jetbrains.kotlin.psi.KtFile import org.jetbrains.kotlin.resolve.deprecation.DeprecationResolver internal fun StorageComponentContainer.initContainer(config: KonanConfig) { - this.useImpl() + useImpl() if (config.configuration.get(KonanConfigKeys.EMIT_LAZY_OBJC_HEADER_FILE) != null) { - this.useImpl() - this.useInstance(ObjCExportWarningCollector.SILENT) + useImpl() + useInstance(object : ObjCExportProblemCollector { + override fun reportWarning(text: String) {} + override fun reportWarning(method: FunctionDescriptor, text: String) {} + override fun reportException(throwable: Throwable) = throw throwable + }) useInstance(object : ObjCExportLazy.Configuration { override val frameworkName: String diff --git a/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/PsiToIr.kt b/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/PsiToIr.kt index 3b82f92092f..894b25a18b0 100644 --- a/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/PsiToIr.kt +++ b/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/PsiToIr.kt @@ -1,6 +1,5 @@ package org.jetbrains.kotlin.backend.konan -import org.jetbrains.kotlin.backend.common.LoggingContext import org.jetbrains.kotlin.backend.common.extensions.IrGenerationExtension import org.jetbrains.kotlin.backend.common.extensions.IrPluginContextImpl import org.jetbrains.kotlin.backend.common.overrides.FakeOverrideChecker @@ -38,6 +37,7 @@ internal fun Context.psiToIr( ) { // Translate AST to high level IR. val expectActualLinker = config.configuration.get(CommonConfigurationKeys.EXPECT_ACTUAL_LINKER)?:false + val messageLogger = config.configuration.get(IrMessageLogger.IR_MESSAGE_LOGGER) ?: IrMessageLogger.None val translator = Psi2IrTranslator(config.configuration.languageVersionSettings, Psi2IrConfiguration(false)) val generatorContext = translator.createGeneratorContext(moduleDescriptor, bindingContext, symbolTable) @@ -89,7 +89,7 @@ internal fun Context.psiToIr( moduleDescriptor, functionIrClassFactory, translationContext, - this as LoggingContext, + messageLogger, generatorContext.irBuiltIns, symbolTable, forwardDeclarationsModuleDescriptor, @@ -149,7 +149,8 @@ internal fun Context.psiToIr( generatorContext.symbolTable, generatorContext.typeTranslator, generatorContext.irBuiltIns, - linker = irDeserializer + linker = irDeserializer, + diagnosticReporter = messageLogger ) pluginExtensions.forEach { extension -> extension.generate(module, pluginContext) diff --git a/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/ToplevelPhases.kt b/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/ToplevelPhases.kt index 4b71fd2dc53..34d828197a4 100644 --- a/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/ToplevelPhases.kt +++ b/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/ToplevelPhases.kt @@ -169,10 +169,11 @@ internal val copyDefaultValuesToActualPhase = konanUnitPhase( internal val serializerPhase = konanUnitPhase( op = { val expectActualLinker = config.configuration.get(CommonConfigurationKeys.EXPECT_ACTUAL_LINKER) ?: false + val messageLogger = config.configuration.get(IrMessageLogger.IR_MESSAGE_LOGGER) ?: IrMessageLogger.None serializedIr = irModule?.let { ir -> KonanIrModuleSerializer( - this, ir.irBuiltins, expectDescriptorToSymbol, skipExpects = !expectActualLinker + messageLogger, ir.irBuiltins, expectDescriptorToSymbol, skipExpects = !expectActualLinker ).serializedIrModule(ir) } diff --git a/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/CodeGenerator.kt b/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/CodeGenerator.kt index 40ff28394a7..3f610a1ea0f 100644 --- a/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/CodeGenerator.kt +++ b/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/CodeGenerator.kt @@ -341,6 +341,10 @@ internal class FunctionGenerationContext(val function: LLVMValueRef, */ var forwardingForeignExceptionsTerminatedWith: LLVMValueRef? = null + // Whether the generating function needs to initialize Kotlin runtime before execution. Useful for interop bridges, + // for example. + var needsRuntimeInit = false + init { irFunction?.let { if (!irFunction.isExported()) { @@ -1207,6 +1211,9 @@ internal class FunctionGenerationContext(val function: LLVMValueRef, internal fun epilogue() { appendingTo(prologueBb) { + if (needsRuntimeInit) { + call(context.llvm.initRuntimeIfNeeded, emptyList()) + } val slots = if (needSlotsPhi) LLVMBuildArrayAlloca(builder, kObjHeaderPtr, Int32(slotCount).llvm, "")!! else diff --git a/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/objcexport/ObjCExportCodeGenerator.kt b/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/objcexport/ObjCExportCodeGenerator.kt index 77a6b2c0cec..092f87dbbc1 100644 --- a/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/objcexport/ObjCExportCodeGenerator.kt +++ b/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/objcexport/ObjCExportCodeGenerator.kt @@ -20,16 +20,20 @@ import org.jetbrains.kotlin.backend.konan.serialization.resolveFakeOverrideMaybe import org.jetbrains.kotlin.descriptors.* import org.jetbrains.kotlin.descriptors.konan.CompiledKlibModuleOrigin import org.jetbrains.kotlin.descriptors.konan.CurrentKlibModuleOrigin +import org.jetbrains.kotlin.incremental.components.NoLookupLocation import org.jetbrains.kotlin.ir.declarations.* import org.jetbrains.kotlin.ir.expressions.IrClassReference import org.jetbrains.kotlin.ir.expressions.IrVararg import org.jetbrains.kotlin.ir.symbols.IrClassSymbol +import org.jetbrains.kotlin.ir.symbols.IrConstructorSymbol +import org.jetbrains.kotlin.ir.symbols.IrSimpleFunctionSymbol import org.jetbrains.kotlin.ir.types.* import org.jetbrains.kotlin.ir.util.* import org.jetbrains.kotlin.konan.target.Family import org.jetbrains.kotlin.konan.target.KonanTarget import org.jetbrains.kotlin.konan.target.LinkerOutputKind import org.jetbrains.kotlin.name.Name +import org.jetbrains.kotlin.utils.DFS internal fun TypeBridge.makeNothing() = when (this) { is ReferenceBridge, is BlockPointerBridge -> kNullInt8Ptr @@ -208,7 +212,7 @@ internal class ObjCExportCodeGenerator( } fun FunctionGenerationContext.initRuntimeIfNeeded() { - callFromBridge(context.llvm.initRuntimeIfNeeded, emptyList()) + this.needsRuntimeInit = true } inline fun FunctionGenerationContext.convertKotlin( @@ -226,11 +230,18 @@ internal class ObjCExportCodeGenerator( return callFromBridge(conversion.owner.llvmFunction, listOf(value), resultLifetime) } - private val objCTypeAdapters = mutableListOf() + private fun generateTypeAdaptersForKotlinTypes(spec: ObjCExportCodeSpec?): List { + val types = spec?.types.orEmpty() + objCClassForAny + + val allReverseAdapters = createReverseAdapters(types) + + return types.map { + val reverseAdapters = allReverseAdapters.getValue(it).adapters + when (it) { + objCClassForAny -> { + createTypeAdapter(it, superClass = null, reverseAdapters) + } - internal fun generate(spec: ObjCExportCodeSpec) { - spec.types.forEach { - objCTypeAdapters += when (it) { is ObjCClassForKotlinClass -> { val superClass = it.superClassNotAny ?: objCClassForAny @@ -238,20 +249,30 @@ internal class ObjCExportCodeGenerator( // Note: it is generated only to be visible for linker. // Methods will be added at runtime. - createTypeAdapter(it, superClass) + createTypeAdapter(it, superClass, reverseAdapters) } - is ObjCProtocolForKotlinInterface -> createTypeAdapter(it, superClass = null) + is ObjCProtocolForKotlinInterface -> createTypeAdapter(it, superClass = null, reverseAdapters) } } - - spec.files.forEach { - objCTypeAdapters += createTypeAdapterForFileClass(it) - dataGenerator.emitEmptyClass(it.binaryName, namer.kotlinAnyName.binaryName) - } } - internal fun emitRtti() { + private fun generateTypeAdapters(spec: ObjCExportCodeSpec?) { + val objCTypeAdapters = mutableListOf() + + objCTypeAdapters += generateTypeAdaptersForKotlinTypes(spec) + + spec?.files?.forEach { + objCTypeAdapters += createTypeAdapterForFileClass(it) + dataGenerator.emitEmptyClass(it.binaryName, namer.kotlinAnyName.binaryName) + } + + emitTypeAdapters(objCTypeAdapters) + } + + internal fun generate(spec: ObjCExportCodeSpec?) { + generateTypeAdapters(spec) + NSNumberKind.values().mapNotNull { it.mappedKotlinClassId }.forEach { dataGenerator.exportClass(namer.numberBoxName(it).binaryName) } @@ -261,10 +282,6 @@ internal class ObjCExportCodeGenerator( emitSpecialClassesConvertions() - objCTypeAdapters += createTypeAdapter(objCClassForAny, superClass = null) - - emitTypeAdapters() - // Replace runtime global with weak linkage: replaceExternalWeakOrCommonGlobal( "Kotlin_ObjCInterop_uniquePrefix", @@ -279,7 +296,7 @@ internal class ObjCExportCodeGenerator( emitKt42254Hint() } - private fun emitTypeAdapters() { + private fun emitTypeAdapters(objCTypeAdapters: List) { val placedClassAdapters = mutableMapOf() val placedInterfaceAdapters = mutableMapOf() @@ -370,11 +387,16 @@ internal class ObjCExportCodeGenerator( private val objCClassForAny = ObjCClassForKotlinClass( namer.kotlinAnyName.binaryName, symbols.any, - methods = listOf("equals", "hashCode", "toString").map { name -> - symbols.any.owner.simpleFunctions().single { it.name == Name.identifier(name) } - }.map { - require(mapper.shouldBeExposed(it.descriptor)) - ObjCMethodForKotlinMethod(it.symbol) + methods = listOf("equals", "hashCode", "toString").map { nameString -> + val name = Name.identifier(nameString) + + val irFunction = symbols.any.owner.simpleFunctions().single { it.name == name } + + val descriptor = context.builtIns.any.unsubstitutedMemberScope + .getContributedFunctions(name, NoLookupLocation.FROM_BACKEND).single() + + val baseMethod = createObjCMethodSpecBaseMethod(mapper, namer, irFunction.symbol, descriptor) + ObjCMethodForKotlinMethod(baseMethod) }, categoryMethods = emptyList(), superClassNotAny = null @@ -629,7 +651,7 @@ private fun ObjCExportCodeGenerator.generateContinuationToCompletionConverter( private val ObjCExportBlockCodeGenerator.mappedFunctionNClasses get() = context.ir.symbols.functionIrClassFactory.builtFunctionNClasses - .filter { it.irClass.descriptor.isMappedFunctionClass() } + .filter { it.descriptor.isMappedFunctionClass() } private fun ObjCExportBlockCodeGenerator.emitFunctionConverters() { require(context.producedLlvmModuleContainsStdlib) @@ -957,11 +979,11 @@ private fun ObjCExportCodeGenerator.generateObjCImpForArrayConstructor( // TODO: cache bridges. private fun ObjCExportCodeGenerator.generateKotlinToObjCBridge( irFunction: IrFunction, - baseIrFunction: IrFunction + baseMethod: ObjCMethodSpec.BaseMethod ): ConstPointer { - val baseMethod = baseIrFunction.descriptor + val baseIrFunction = baseMethod.symbol.owner - val methodBridge = mapper.bridgeMethod(baseMethod) + val methodBridge = baseMethod.bridge val parameterToBase = irFunction.allParameters.zip(baseIrFunction.allParameters).toMap() @@ -991,7 +1013,7 @@ private fun ObjCExportCodeGenerator.generateKotlinToObjCBridge( MethodBridgeReceiver.Instance -> kotlinReferenceToObjC(parameters[parameter]!!) MethodBridgeSelector -> { - val selector = namer.getSelector(baseMethod) + val selector = baseMethod.selector // Selector is referenced thus should be defined to avoid false positive non-public API rejection: selectorsToDefine[selector] = methodBridge genSelector(selector) @@ -1022,7 +1044,7 @@ private fun ObjCExportCodeGenerator.generateKotlinToObjCBridge( val targetResult = callFromBridge(objcMsgSend, objCArgs) - assert(baseMethod !is ConstructorDescriptor) + assert(baseMethod.symbol !is IrConstructorSymbol) fun rethrow() { val error = load(errorOutPtr!!) @@ -1120,14 +1142,14 @@ private fun ObjCExportCodeGenerator.generateKotlinToObjCBridge( private fun ObjCExportCodeGenerator.createReverseAdapter( irFunction: IrFunction, - baseMethod: IrFunction, + baseMethod: ObjCMethodSpec.BaseMethod, functionName: String, vtableIndex: Int?, itablePlace: ClassLayoutBuilder.InterfaceTablePlace? ): ObjCExportCodeGenerator.KotlinToObjCMethodAdapter { val nameSignature = functionName.localHash.value - val selector = namer.getSelector(baseMethod.descriptor) + val selector = baseMethod.selector val kotlinToObjC = generateKotlinToObjCBridge( irFunction, @@ -1141,51 +1163,51 @@ private fun ObjCExportCodeGenerator.createReverseAdapter( } private fun ObjCExportCodeGenerator.createMethodVirtualAdapter( - baseMethod: IrFunction + baseMethod: ObjCMethodSpec.BaseMethod ): ObjCExportCodeGenerator.ObjCToKotlinMethodAdapter { - assert(mapper.isBaseMethod(baseMethod.descriptor)) - - val selector = namer.getSelector(baseMethod.descriptor) - - val methodBridge = mapper.bridgeMethod(baseMethod.descriptor) - val imp = generateObjCImp(baseMethod, baseMethod, methodBridge, isVirtual = true) + val selector = baseMethod.selector + val methodBridge = baseMethod.bridge + val irFunction = baseMethod.symbol.owner + val imp = generateObjCImp(irFunction, irFunction, methodBridge, isVirtual = true) return objCToKotlinMethodAdapter(selector, methodBridge, imp) } private fun ObjCExportCodeGenerator.createMethodAdapter( implementation: IrFunction?, - baseMethod: IrFunction + baseMethod: ObjCMethodSpec.BaseMethod<*> ) = createMethodAdapter(DirectAdapterRequest(implementation, baseMethod)) private fun ObjCExportCodeGenerator.createFinalMethodAdapter( - irFunction: IrSimpleFunction + baseMethod: ObjCMethodSpec.BaseMethod ): ObjCExportCodeGenerator.ObjCToKotlinMethodAdapter { + val irFunction = baseMethod.symbol.owner require(irFunction.modality == Modality.FINAL) - return createMethodAdapter(irFunction, irFunction) + return createMethodAdapter(irFunction, baseMethod) } private fun ObjCExportCodeGenerator.createMethodAdapter( request: DirectAdapterRequest ): ObjCExportCodeGenerator.ObjCToKotlinMethodAdapter = this.directMethodAdapters.getOrPut(request) { - val selectorName = namer.getSelector(request.base.descriptor) - val methodBridge = mapper.bridgeMethod(request.base.descriptor) + val selectorName = request.base.selector + val methodBridge = request.base.bridge - val imp = generateObjCImp(request.implementation, request.base, methodBridge) + val imp = generateObjCImp(request.implementation, request.base.symbol.owner, methodBridge) objCToKotlinMethodAdapter(selectorName, methodBridge, imp) } private fun ObjCExportCodeGenerator.createConstructorAdapter( - irConstructor: IrConstructor -): ObjCExportCodeGenerator.ObjCToKotlinMethodAdapter = createMethodAdapter(irConstructor, irConstructor) + baseMethod: ObjCMethodSpec.BaseMethod +): ObjCExportCodeGenerator.ObjCToKotlinMethodAdapter = createMethodAdapter(baseMethod.symbol.owner, baseMethod) private fun ObjCExportCodeGenerator.createArrayConstructorAdapter( - irConstructor: IrConstructor + baseMethod: ObjCMethodSpec.BaseMethod ): ObjCExportCodeGenerator.ObjCToKotlinMethodAdapter { - val selectorName = namer.getSelector(irConstructor.descriptor) - val methodBridge = mapper.bridgeMethod(irConstructor.descriptor) + val selectorName = baseMethod.selector + val methodBridge = baseMethod.bridge + val irConstructor = baseMethod.symbol.owner val imp = generateObjCImpForArrayConstructor(irConstructor, methodBridge) return objCToKotlinMethodAdapter(selectorName, methodBridge, imp) @@ -1217,7 +1239,7 @@ private fun ObjCExportCodeGenerator.createTypeAdapterForFileClass( ): ObjCExportCodeGenerator.ObjCTypeAdapter { val name = fileClass.binaryName - val adapters = fileClass.methods.map { createFinalMethodAdapter(it.baseMethod.owner) } + val adapters = fileClass.methods.map { createFinalMethodAdapter(it.baseMethod) } return ObjCTypeAdapter( irClass = null, @@ -1237,7 +1259,8 @@ private fun ObjCExportCodeGenerator.createTypeAdapterForFileClass( private fun ObjCExportCodeGenerator.createTypeAdapter( type: ObjCTypeForKotlinType, - superClass: ObjCClassForKotlinClass? + superClass: ObjCClassForKotlinClass?, + reverseAdapters: List ): ObjCExportCodeGenerator.ObjCTypeAdapter { val irClass = type.irClassSymbol.owner val adapters = mutableListOf() @@ -1246,39 +1269,45 @@ private fun ObjCExportCodeGenerator.createTypeAdapter( type.methods.forEach { when (it) { is ObjCInitMethodForKotlinConstructor -> { - adapters += createConstructorAdapter(it.irConstructorSymbol.owner) + adapters += createConstructorAdapter(it.baseMethod) } is ObjCFactoryMethodForKotlinArrayConstructor -> { - classAdapters += createArrayConstructorAdapter(it.irConstructorSymbol.owner) + classAdapters += createArrayConstructorAdapter(it.baseMethod) } is ObjCGetterForKotlinEnumEntry -> { - classAdapters += createEnumEntryAdapter(it.irEnumEntrySymbol.owner) + classAdapters += createEnumEntryAdapter(it.irEnumEntrySymbol.owner, it.selector) } is ObjCClassMethodForKotlinEnumValues -> { classAdapters += createEnumValuesAdapter(it.valuesFunctionSymbol.owner, it.selector) } + is ObjCGetterForObjectInstance -> { + classAdapters += if (irClass.isUnit()) { + createUnitInstanceAdapter(it.selector) + } else { + createObjectInstanceAdapter(irClass, it.selector) + } + } is ObjCMethodForKotlinMethod -> {} // Handled below. }.let {} // Force exhaustive. } - val reverseAdapters = mutableListOf() + val additionalReverseAdapters = mutableListOf() if (type is ObjCClassForKotlinClass) { type.categoryMethods.forEach { - val irFunction = it.baseMethod.owner - adapters += createFinalMethodAdapter(irFunction) - reverseAdapters += nonOverridableAdapter(irFunction.descriptor, hasSelectorAmbiguity = false) + adapters += createFinalMethodAdapter(it.baseMethod) + additionalReverseAdapters += nonOverridableAdapter(it.baseMethod.selector, hasSelectorAmbiguity = false) } adapters += createDirectAdapters(type, superClass) } - reverseAdapters += createReverseAdapters(type) - - val virtualAdapters = type.kotlinMethods.map { it.baseMethod.owner } - .filter { it.parentAsClass == irClass && it.isOverridable } - .map { createMethodVirtualAdapter(it) } + val virtualAdapters = type.kotlinMethods + .filter { + val irFunction = it.baseMethod.symbol.owner + irFunction.parentAsClass == irClass && irFunction.isOverridable + }.map { createMethodVirtualAdapter(it.baseMethod) } val typeInfo = constPointer(codegen.typeInfoValue(irClass)) val objCName = type.binaryName @@ -1309,19 +1338,6 @@ private fun ObjCExportCodeGenerator.createTypeAdapter( else -> Pair(emptyList(), -1) } - when (irClass.kind) { - ClassKind.OBJECT -> { - classAdapters += if (irClass.isUnit()) { - createUnitInstanceAdapter() - } else { - createObjectInstanceAdapter(irClass) - } - } - else -> { - // Nothing special. - } - } - return ObjCTypeAdapter( irClass, typeInfo, @@ -1334,21 +1350,64 @@ private fun ObjCExportCodeGenerator.createTypeAdapter( adapters, classAdapters, virtualAdapters, - reverseAdapters + reverseAdapters + additionalReverseAdapters ) } private fun ObjCExportCodeGenerator.createReverseAdapters( - type: ObjCTypeForKotlinType -): List { + types: List +): Map { + val irClassSymbolToType = types.associateBy { it.irClassSymbol } + + val result = mutableMapOf() + + fun getOrCreateFor(type: ObjCTypeForKotlinType): ReverseAdapters = result.getOrPut(type) { + // Each type also inherits reverse adapters from super types. + // This is handled in runtime when building TypeInfo for Swift or Obj-C type + // subclassing Kotlin classes or interfaces. See [createTypeInfo] in ObjCExport.mm. + val allSuperClasses = DFS.dfs( + type.irClassSymbol.owner.superClasses, + { it.owner.superClasses }, + object : DFS.NodeHandlerWithListResult() { + override fun afterChildren(current: IrClassSymbol) { + this.result += current + } + } + ) + + val inheritsAdaptersFrom = allSuperClasses.mapNotNull { irClassSymbolToType[it] } + + val inheritedAdapters = inheritsAdaptersFrom.map { getOrCreateFor(it) } + + createReverseAdapters(type, inheritedAdapters) + } + + types.forEach { getOrCreateFor(it) } + + return result +} + +private class ReverseAdapters( + val adapters: List, + val coveredMethods: Set +) + +private fun ObjCExportCodeGenerator.createReverseAdapters( + type: ObjCTypeForKotlinType, + inheritedAdapters: List +): ReverseAdapters { val result = mutableListOf() - val allBaseMethods = type.kotlinMethods.map { it.baseMethod.owner }.toSet() + val coveredMethods = mutableSetOf() + + val methodsCoveredByInheritedAdapters = inheritedAdapters.flatMapTo(mutableSetOf()) { it.coveredMethods } + + val allBaseMethodsByIr = type.kotlinMethods.map { it.baseMethod }.associateBy { it.symbol.owner } for (method in type.irClassSymbol.owner.simpleFunctions()) { - val baseMethods = method.allOverriddenFunctions.filter { it in allBaseMethods } + val baseMethods = method.allOverriddenFunctions.mapNotNull { allBaseMethodsByIr[it] } if (baseMethods.isEmpty()) continue - val hasSelectorAmbiguity = baseMethods.map { namer.getSelector(it.descriptor) }.distinct().size > 1 + val hasSelectorAmbiguity = baseMethods.map { it.selector }.distinct().size > 1 if (method.isOverridable && !hasSelectorAmbiguity) { val baseMethod = baseMethods.first() @@ -1360,7 +1419,7 @@ private fun ObjCExportCodeGenerator.createReverseAdapters( val allOverriddenMethods = method.allOverriddenFunctions val (inherited, uninherited) = allOverriddenMethods.partition { - it != method && mapper.shouldBeExposed(it.descriptor) + it in methodsCoveredByInheritedAdapters } inherited.forEach { @@ -1380,25 +1439,26 @@ private fun ObjCExportCodeGenerator.createReverseAdapters( presentMethodTableBridges += functionName presentItableBridges += itablePlace result += createReverseAdapter(it, baseMethod, functionName, vtableIndex, itablePlace) + coveredMethods += it } } } else { // Mark it as non-overridable: - baseMethods.distinctBy { namer.getSelector(it.descriptor) }.forEach { baseMethod -> - result += nonOverridableAdapter(baseMethod.descriptor, hasSelectorAmbiguity) + baseMethods.map { it.selector }.distinct().forEach { + result += nonOverridableAdapter(it, hasSelectorAmbiguity) } } } - return result + return ReverseAdapters(result, coveredMethods) } private fun ObjCExportCodeGenerator.nonOverridableAdapter( - baseMethod: FunctionDescriptor, + selector: String, hasSelectorAmbiguity: Boolean ): ObjCExportCodeGenerator.KotlinToObjCMethodAdapter = KotlinToObjCMethodAdapter( - namer.getSelector(baseMethod), + selector, -1, vtableIndex = if (hasSelectorAmbiguity) -2 else -1, // Describes the reason. kotlinImpl = NullPointer(int8Type), @@ -1408,7 +1468,7 @@ private fun ObjCExportCodeGenerator.nonOverridableAdapter( private val ObjCTypeForKotlinType.kotlinMethods: List get() = this.methods.filterIsInstance() -internal data class DirectAdapterRequest(val implementation: IrFunction?, val base: IrFunction) +internal data class DirectAdapterRequest(val implementation: IrFunction?, val base: ObjCMethodSpec.BaseMethod<*>) private fun ObjCExportCodeGenerator.createDirectAdapters( typeDeclaration: ObjCClassForKotlinClass, @@ -1417,21 +1477,21 @@ private fun ObjCExportCodeGenerator.createDirectAdapters( fun ObjCClassForKotlinClass.getAllRequiredDirectAdapters() = this.kotlinMethods.map { method -> DirectAdapterRequest( - findImplementation(irClassSymbol.owner, method.baseMethod.owner, context), - method.baseMethod.owner + findImplementation(irClassSymbol.owner, method.baseMethod.symbol.owner, context), + method.baseMethod ) } val inheritedAdapters = superClass?.getAllRequiredDirectAdapters().orEmpty() val requiredAdapters = typeDeclaration.getAllRequiredDirectAdapters() - inheritedAdapters - return requiredAdapters.distinctBy { namer.getSelector(it.base.descriptor) }.map { createMethodAdapter(it) } + return requiredAdapters.distinctBy { it.base.selector }.map { createMethodAdapter(it) } } private fun findImplementation(irClass: IrClass, method: IrSimpleFunction, context: Context): IrSimpleFunction? { val override = irClass.simpleFunctions().singleOrNull { method in it.allOverriddenFunctions - } ?: error("no implementation for ${method.descriptor}\nin ${irClass.descriptor}") + } ?: error("no implementation for ${method.render()}\nin ${irClass.fqNameWhenAvailable}") return OverriddenFunctionInfo(override, method).getImplementation(context) } @@ -1464,23 +1524,20 @@ private fun ObjCExportCodeGenerator.objCToKotlinMethodAdapter( return ObjCToKotlinMethodAdapter(selector, getEncoding(methodBridge), constPointer(imp)) } -private fun ObjCExportCodeGenerator.createUnitInstanceAdapter() = - generateObjCToKotlinSyntheticGetter( - namer.getObjectInstanceSelector(context.builtIns.unit) - ) { +private fun ObjCExportCodeGenerator.createUnitInstanceAdapter(selector: String) = + generateObjCToKotlinSyntheticGetter(selector) { initRuntimeIfNeeded() // For instance methods it gets called when allocating. ret(callFromBridge(context.llvm.Kotlin_ObjCExport_convertUnit, listOf(codegen.theUnitInstanceRef.llvm))) } private fun ObjCExportCodeGenerator.createObjectInstanceAdapter( - irClass: IrClass + irClass: IrClass, + selector: String ): ObjCExportCodeGenerator.ObjCToKotlinMethodAdapter { assert(irClass.kind == ClassKind.OBJECT) assert(!irClass.isUnit()) - val selector = namer.getObjectInstanceSelector(irClass.descriptor) - return generateObjCToKotlinSyntheticGetter(selector) { initRuntimeIfNeeded() // For instance methods it gets called when allocating. val value = getObjectValue(irClass, startLocationInfo = null, exceptionHandler = ExceptionHandler.Caller) @@ -1489,10 +1546,9 @@ private fun ObjCExportCodeGenerator.createObjectInstanceAdapter( } private fun ObjCExportCodeGenerator.createEnumEntryAdapter( - irEnumEntry: IrEnumEntry + irEnumEntry: IrEnumEntry, + selector: String ): ObjCExportCodeGenerator.ObjCToKotlinMethodAdapter { - val selector = namer.getEnumEntrySelector(irEnumEntry.descriptor) - return generateObjCToKotlinSyntheticGetter(selector) { initRuntimeIfNeeded() // For instance methods it gets called when allocating. @@ -1516,14 +1572,6 @@ private fun ObjCExportCodeGenerator.createEnumValuesAdapter( return objCToKotlinMethodAdapter(selector, methodBridge, imp) } -private fun List.toMethods(): List = this.flatMap { - when (it) { - is PropertyDescriptor -> listOfNotNull(it.getter, it.setter) - is FunctionDescriptor -> listOf(it) - else -> error(it) - } -} - private fun objCFunctionType(context: Context, methodBridge: MethodBridge): LLVMTypeRef { val paramTypes = methodBridge.paramBridges.map { it.objCType } @@ -1623,6 +1671,7 @@ private fun Context.is64BitNSInteger(): Boolean = when (val target = this.config KonanTarget.TVOS_ARM64, KonanTarget.TVOS_X64, KonanTarget.MACOS_X64, + KonanTarget.MACOS_ARM64, KonanTarget.WATCHOS_X64 -> true KonanTarget.WATCHOS_ARM64, KonanTarget.WATCHOS_ARM32, @@ -1654,6 +1703,7 @@ internal fun Context.is64BitLong(): Boolean = when (this.config.target) { KonanTarget.MINGW_X64, KonanTarget.LINUX_X64, KonanTarget.MACOS_X64, + KonanTarget.MACOS_ARM64, KonanTarget.WATCHOS_X64 -> true KonanTarget.WATCHOS_ARM64, KonanTarget.WATCHOS_ARM32, diff --git a/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/objcexport/ObjCExport.kt b/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/objcexport/ObjCExport.kt index 0a852dd8a67..41825ebe35a 100644 --- a/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/objcexport/ObjCExport.kt +++ b/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/objcexport/ObjCExport.kt @@ -96,12 +96,10 @@ internal class ObjCExport(val context: Context, symbolTable: SymbolTable) { if (exportedInterface != null) { produceFrameworkSpecific(exportedInterface.headerLines) - objCCodeGenerator.generate(codeSpec!!) - exportedInterface.generateWorkaroundForSwiftSR10177() } - objCCodeGenerator.emitRtti() + objCCodeGenerator.generate(codeSpec) objCCodeGenerator.dispose() } @@ -138,8 +136,7 @@ internal class ObjCExport(val context: Context, symbolTable: SymbolTable) { modules.child("module.modulemap").writeBytes(moduleMap.toByteArray()) emitInfoPlist(frameworkContents, frameworkName) - - if (target == KonanTarget.MACOS_X64) { + if (target.family == Family.OSX) { framework.child("Versions/Current").createAsSymlink("A") for (child in listOf(frameworkName, "Headers", "Modules", "Resources")) { framework.child(child).createAsSymlink("Versions/Current/$child") @@ -165,7 +162,7 @@ internal class ObjCExport(val context: Context, symbolTable: SymbolTable) { KonanTarget.IOS_X64 -> "iPhoneSimulator" KonanTarget.TVOS_ARM64 -> "AppleTVOS" KonanTarget.TVOS_X64 -> "AppleTVSimulator" - KonanTarget.MACOS_X64 -> "MacOSX" + KonanTarget.MACOS_X64, KonanTarget.MACOS_ARM64 -> "MacOSX" KonanTarget.WATCHOS_ARM32, KonanTarget.WATCHOS_ARM64 -> "WatchOS" KonanTarget.WATCHOS_X86, KonanTarget.WATCHOS_X64 -> "WatchSimulator" else -> error(target) diff --git a/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/objcexport/ObjCExportCodeSpec.kt b/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/objcexport/ObjCExportCodeSpec.kt index 88dae17e0b9..cd7da97f839 100644 --- a/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/objcexport/ObjCExportCodeSpec.kt +++ b/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/objcexport/ObjCExportCodeSpec.kt @@ -17,7 +17,14 @@ import org.jetbrains.kotlin.resolve.descriptorUtil.getSuperClassNotAny internal fun ObjCExportedInterface.createCodeSpec(symbolTable: SymbolTable): ObjCExportCodeSpec { fun createObjCMethods(methods: List) = methods.map { - ObjCMethodForKotlinMethod(symbolTable.referenceSimpleFunction(it)) + ObjCMethodForKotlinMethod( + createObjCMethodSpecBaseMethod( + mapper, + namer, + symbolTable.referenceSimpleFunction(it), + it + ) + ) } fun List.toObjCMethods() = createObjCMethods(this.flatMap { @@ -55,17 +62,22 @@ internal fun ObjCExportedInterface.createCodeSpec(symbolTable: SymbolTable): Obj } else { descriptor.constructors.filter { mapper.shouldBeExposed(it) }.mapTo(methods) { val irConstructorSymbol = symbolTable.referenceConstructor(it) + val baseMethod = createObjCMethodSpecBaseMethod(mapper, namer, irConstructorSymbol, it) if (descriptor.isArray) { - ObjCFactoryMethodForKotlinArrayConstructor(irConstructorSymbol) + ObjCFactoryMethodForKotlinArrayConstructor(baseMethod) } else { - ObjCInitMethodForKotlinConstructor(irConstructorSymbol) + ObjCInitMethodForKotlinConstructor(baseMethod) } } + if (descriptor.kind == ClassKind.OBJECT) { + methods += ObjCGetterForObjectInstance(namer.getObjectInstanceSelector(descriptor)) + } + if (descriptor.kind == ClassKind.ENUM_CLASS) { descriptor.enumEntries.mapTo(methods) { - ObjCGetterForKotlinEnumEntry(symbolTable.referenceEnumEntry(it)) + ObjCGetterForKotlinEnumEntry(symbolTable.referenceEnumEntry(it), namer.getEnumEntrySelector(it)) } descriptor.getEnumValuesFunctionDescriptor()?.let { @@ -90,28 +102,53 @@ internal fun ObjCExportedInterface.createCodeSpec(symbolTable: SymbolTable): Obj return ObjCExportCodeSpec(files, types) } +internal fun createObjCMethodSpecBaseMethod( + mapper: ObjCExportMapper, + namer: ObjCExportNamer, + symbol: S, + descriptor: FunctionDescriptor +): ObjCMethodSpec.BaseMethod { + require(mapper.isBaseMethod(descriptor)) + + val selector = namer.getSelector(descriptor) + val bridge = mapper.bridgeMethod(descriptor) + + return ObjCMethodSpec.BaseMethod(symbol, bridge, selector) +} + internal class ObjCExportCodeSpec( val files: List, val types: List ) -internal sealed class ObjCMethodSpec +internal sealed class ObjCMethodSpec { + /** + * Aggregates base method (as defined by [ObjCExportMapper.isBaseMethod]) + * and details required to generate code for bridges between Kotlin and Obj-C methods. + */ + data class BaseMethod(val symbol: S, val bridge: MethodBridge, val selector: String) +} -internal class ObjCMethodForKotlinMethod(val baseMethod: IrSimpleFunctionSymbol) : ObjCMethodSpec() +internal class ObjCMethodForKotlinMethod(val baseMethod: BaseMethod) : ObjCMethodSpec() -internal class ObjCInitMethodForKotlinConstructor(val irConstructorSymbol: IrConstructorSymbol) : ObjCMethodSpec() +internal class ObjCInitMethodForKotlinConstructor(val baseMethod: BaseMethod) : ObjCMethodSpec() internal class ObjCFactoryMethodForKotlinArrayConstructor( - val irConstructorSymbol: IrConstructorSymbol + val baseMethod: BaseMethod ) : ObjCMethodSpec() -internal class ObjCGetterForKotlinEnumEntry(val irEnumEntrySymbol: IrEnumEntrySymbol) : ObjCMethodSpec() +internal class ObjCGetterForKotlinEnumEntry( + val irEnumEntrySymbol: IrEnumEntrySymbol, + val selector: String +) : ObjCMethodSpec() internal class ObjCClassMethodForKotlinEnumValues( val valuesFunctionSymbol: IrFunctionSymbol, val selector: String ) : ObjCMethodSpec() +internal class ObjCGetterForObjectInstance(val selector: String) : ObjCMethodSpec() + internal sealed class ObjCTypeSpec(val binaryName: String) internal sealed class ObjCTypeForKotlinType( diff --git a/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/objcexport/ObjCExportHeaderGenerator.kt b/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/objcexport/ObjCExportHeaderGenerator.kt index c23d37ebec0..ed4768bba78 100644 --- a/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/objcexport/ObjCExportHeaderGenerator.kt +++ b/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/objcexport/ObjCExportHeaderGenerator.kt @@ -37,13 +37,15 @@ interface ObjCExportTranslator { fun translateExtensions(classDescriptor: ClassDescriptor, declarations: List): ObjCInterface } -interface ObjCExportWarningCollector { +interface ObjCExportProblemCollector { fun reportWarning(text: String) fun reportWarning(method: FunctionDescriptor, text: String) + fun reportException(throwable: Throwable) - object SILENT : ObjCExportWarningCollector { + object SILENT : ObjCExportProblemCollector { override fun reportWarning(text: String) {} override fun reportWarning(method: FunctionDescriptor, text: String) {} + override fun reportException(throwable: Throwable) {} } } @@ -51,70 +53,78 @@ internal class ObjCExportTranslatorImpl( private val generator: ObjCExportHeaderGenerator?, val mapper: ObjCExportMapper, val namer: ObjCExportNamer, - val warningCollector: ObjCExportWarningCollector, + val problemCollector: ObjCExportProblemCollector, val objcGenerics: Boolean ) : ObjCExportTranslator { private val kotlinAnyName = namer.kotlinAnyName - override fun generateBaseDeclarations(): List> { - val stubs = mutableListOf>() - - stubs.add(objCInterface(namer.kotlinAnyName, superClass = "NSObject", members = buildMembers { - +ObjCMethod(null, true, ObjCInstanceType, listOf("init"), emptyList(), listOf("unavailable")) - +ObjCMethod(null, false, ObjCInstanceType, listOf("new"), emptyList(), listOf("unavailable")) - +ObjCMethod(null, false, ObjCVoidType, listOf("initialize"), emptyList(), listOf("objc_requires_super")) - })) + override fun generateBaseDeclarations(): List> = buildTopLevel { + add { + objCInterface(namer.kotlinAnyName, superClass = "NSObject", members = buildMembers { + add { ObjCMethod(null, true, ObjCInstanceType, listOf("init"), emptyList(), listOf("unavailable")) } + add { ObjCMethod(null, false, ObjCInstanceType, listOf("new"), emptyList(), listOf("unavailable")) } + add { ObjCMethod(null, false, ObjCVoidType, listOf("initialize"), emptyList(), listOf("objc_requires_super")) } + }) + } // TODO: add comment to the header. - stubs.add(ObjCInterfaceImpl( - namer.kotlinAnyName.objCName, - superProtocols = listOf("NSCopying"), - categoryName = "${namer.kotlinAnyName.objCName}Copying" - )) + add { + ObjCInterfaceImpl( + namer.kotlinAnyName.objCName, + superProtocols = listOf("NSCopying"), + categoryName = "${namer.kotlinAnyName.objCName}Copying" + ) + } // TODO: only if appears - stubs.add(objCInterface( - namer.mutableSetName, - generics = listOf("ObjectType"), - superClass = "NSMutableSet" - )) + add { + objCInterface( + namer.mutableSetName, + generics = listOf("ObjectType"), + superClass = "NSMutableSet" + ) + } // TODO: only if appears - stubs.add(objCInterface( - namer.mutableMapName, - generics = listOf("KeyType", "ObjectType"), - superClass = "NSMutableDictionary" - )) + add { + objCInterface( + namer.mutableMapName, + generics = listOf("KeyType", "ObjectType"), + superClass = "NSMutableDictionary" + ) + } val nsErrorCategoryName = "NSError${namer.topLevelNamePrefix}KotlinException" - stubs.add(ObjCInterfaceImpl("NSError", categoryName = nsErrorCategoryName, members = buildMembers { - +ObjCProperty("kotlinException", null, ObjCNullableReferenceType(ObjCIdType), listOf("readonly")) - })) + add { + ObjCInterfaceImpl("NSError", categoryName = nsErrorCategoryName, members = buildMembers { + add { ObjCProperty("kotlinException", null, ObjCNullableReferenceType(ObjCIdType), listOf("readonly")) } + }) + } - genKotlinNumbers(stubs) - - return stubs + genKotlinNumbers() } - private fun genKotlinNumbers(stubs: MutableList>) { + private fun StubBuilder>.genKotlinNumbers() { val members = buildMembers { NSNumberKind.values().forEach { - +nsNumberFactory(it, listOf("unavailable")) + add { nsNumberFactory(it, listOf("unavailable")) } } NSNumberKind.values().forEach { - +nsNumberInit(it, listOf("unavailable")) + add { nsNumberInit(it, listOf("unavailable")) } } } - stubs.add(objCInterface( - namer.kotlinNumberName, - superClass = "NSNumber", - members = members - )) + add { + objCInterface( + namer.kotlinNumberName, + superClass = "NSNumber", + members = members + ) + } NSNumberKind.values().forEach { - if (it.mappedKotlinClassId != null) { - stubs += genKotlinNumber(it.mappedKotlinClassId, it) + if (it.mappedKotlinClassId != null) add { + genKotlinNumber(it.mappedKotlinClassId, it) } } } @@ -123,8 +133,8 @@ internal class ObjCExportTranslatorImpl( val name = namer.numberBoxName(kotlinClassId) val members = buildMembers { - +nsNumberFactory(kind) - +nsNumberInit(kind) + add { nsNumberFactory(kind) } + add { nsNumberInit(kind) } } return objCInterface( name, @@ -316,19 +326,19 @@ internal class ObjCExportTranslatorImpl( val selector = getSelector(it) if (!descriptor.isArray) presentConstructors += selector - +buildMethod(it, it, genericExportScope) + add { buildMethod(it, it, genericExportScope) } exportThrown(it) - if (selector == "init") { - +ObjCMethod(it, false, ObjCInstanceType, listOf("new"), emptyList(), + if (selector == "init") add { + ObjCMethod(it, false, ObjCInstanceType, listOf("new"), emptyList(), listOf("availability(swift, unavailable, message=\"use object initializers instead\")")) } } if (descriptor.isArray || descriptor.kind == ClassKind.OBJECT || descriptor.kind == ClassKind.ENUM_CLASS) { - +ObjCMethod(null, false, ObjCInstanceType, listOf("alloc"), emptyList(), listOf("unavailable")) + add { ObjCMethod(null, false, ObjCInstanceType, listOf("alloc"), emptyList(), listOf("unavailable")) } val parameter = ObjCParameter("zone", null, ObjCRawType("struct _NSZone *")) - +ObjCMethod(descriptor, false, ObjCInstanceType, listOf("allocWithZone:"), listOf(parameter), listOf("unavailable")) + add { ObjCMethod(descriptor, false, ObjCInstanceType, listOf("allocWithZone:"), listOf(parameter), listOf("unavailable")) } } // Hide "unimplemented" super constructors: @@ -338,10 +348,10 @@ internal class ObjCExportTranslatorImpl( ?.forEach { val selector = getSelector(it) if (selector !in presentConstructors) { - +buildMethod(it, it, ObjCNoneExportScope, unavailable = true) + add { buildMethod(it, it, ObjCNoneExportScope, unavailable = true) } if (selector == "init") { - +ObjCMethod(null, false, ObjCInstanceType, listOf("new"), emptyList(), listOf("unavailable")) + add { ObjCMethod(null, false, ObjCInstanceType, listOf("new"), emptyList(), listOf("unavailable")) } } // TODO: consider adding exception-throwing impls for these. @@ -350,8 +360,8 @@ internal class ObjCExportTranslatorImpl( // TODO: consider adding exception-throwing impls for these. when (descriptor.kind) { - ClassKind.OBJECT -> { - +ObjCMethod( + ClassKind.OBJECT -> add { + ObjCMethod( null, false, ObjCInstanceType, listOf(namer.getObjectInstanceSelector(descriptor)), emptyList(), listOf(swiftNameAttribute("init()")) @@ -362,8 +372,10 @@ internal class ObjCExportTranslatorImpl( descriptor.enumEntries.forEach { val entryName = namer.getEnumEntrySelector(it) - +ObjCProperty(entryName, it, type, listOf("class", "readonly"), - declarationAttributes = listOf(swiftNameAttribute(entryName))) + add { + ObjCProperty(entryName, it, type, listOf("class", "readonly"), + declarationAttributes = listOf(swiftNameAttribute(entryName))) + } } // Note: it is possible to support this function through a common machinery, @@ -371,7 +383,7 @@ internal class ObjCExportTranslatorImpl( // to keep this ad hoc here than to add special cases to the most complicated parts // of the machinery. descriptor.getEnumValuesFunctionDescriptor()?.let { enumValues -> - +buildEnumValuesMethod(enumValues, genericExportScope) + add { buildEnumValuesMethod(enumValues, genericExportScope) } } } else -> { @@ -434,12 +446,12 @@ internal class ObjCExportTranslatorImpl( .filter { mapper.shouldBeExposed(it) } .toList() - private fun StubBuilder.translateClassMembers(descriptor: ClassDescriptor, objCExportScope: ObjCExportScope) { + private fun StubBuilder>.translateClassMembers(descriptor: ClassDescriptor, objCExportScope: ObjCExportScope) { require(!descriptor.isInterface) translateClassMembers(descriptor.getExposedMembers(), objCExportScope) } - private fun StubBuilder.translateInterfaceMembers(descriptor: ClassDescriptor) { + private fun StubBuilder>.translateInterfaceMembers(descriptor: ClassDescriptor) { require(descriptor.isInterface) translateBaseMembers(descriptor.getExposedMembers()) } @@ -460,7 +472,7 @@ internal class ObjCExportTranslatorImpl( } } - private fun StubBuilder.translateClassMembers( + private fun StubBuilder>.translateClassMembers( members: List, objCExportScope: ObjCExportScope ) { @@ -480,18 +492,18 @@ internal class ObjCExportTranslatorImpl( mapper.getBaseMethods(method) .asSequence() .distinctBy { namer.getSelector(it) } - .forEach { base -> +buildMethod(method, base, objCExportScope) } + .forEach { base -> add { buildMethod(method, base, objCExportScope) } } } properties.forEach { property -> mapper.getBaseProperties(property) .asSequence() .distinctBy { namer.getPropertyName(it) } - .forEach { base -> +buildProperty(property, base, objCExportScope) } + .forEach { base -> add { buildProperty(property, base, objCExportScope) } } } } - private fun StubBuilder.translateBaseMembers(members: List) { + private fun StubBuilder>.translateBaseMembers(members: List) { // TODO: add some marks about modality. val methods = mutableListOf() @@ -515,7 +527,7 @@ internal class ObjCExportTranslatorImpl( translatePlainMembers(methods, properties, ObjCNoneExportScope) } - private fun StubBuilder.translatePlainMembers(members: List, objCExportScope: ObjCExportScope) { + private fun StubBuilder>.translatePlainMembers(members: List, objCExportScope: ObjCExportScope) { val methods = mutableListOf() val properties = mutableListOf() @@ -526,9 +538,9 @@ internal class ObjCExportTranslatorImpl( translatePlainMembers(methods, properties, objCExportScope) } - private fun StubBuilder.translatePlainMembers(methods: List, properties: List, objCExportScope: ObjCExportScope) { - methods.forEach { +buildMethod(it, it, objCExportScope) } - properties.forEach { +buildProperty(it, it, objCExportScope) } + private fun StubBuilder>.translatePlainMembers(methods: List, properties: List, objCExportScope: ObjCExportScope) { + methods.forEach { add { buildMethod(it, it, objCExportScope) } } + properties.forEach { add { buildProperty(it, it, objCExportScope) } } } // TODO: consider checking that signatures for bases with same selector/name are equal. @@ -798,7 +810,7 @@ internal class ObjCExportTranslatorImpl( val firstType = types[0] val secondType = types[1] - warningCollector.reportWarning( + problemCollector.reportWarning( "Exposed type '$kotlinType' is '$firstType' and '$secondType' at the same time. " + "This most likely wouldn't work as expected.") @@ -943,60 +955,27 @@ internal class ObjCExportTranslatorImpl( // TODO: consider other namings. } } + + private inline fun buildTopLevel(block: StubBuilder>.() -> Unit) = buildStubs(block) + private inline fun buildMembers(block: StubBuilder>.() -> Unit) = buildStubs(block) + private inline fun > buildStubs(block: StubBuilder.() -> Unit): List = + StubBuilder(problemCollector).apply(block).build() } abstract class ObjCExportHeaderGenerator internal constructor( val moduleDescriptors: List, internal val mapper: ObjCExportMapper, val namer: ObjCExportNamer, - val objcGenerics:Boolean = false + val objcGenerics: Boolean, + problemCollector: ObjCExportProblemCollector ) { - - constructor( - moduleDescriptors: List, - builtIns: KotlinBuiltIns, - topLevelNamePrefix: String - ) : this(moduleDescriptors, builtIns, topLevelNamePrefix, ObjCExportMapper()) - - private constructor( - moduleDescriptors: List, - builtIns: KotlinBuiltIns, - topLevelNamePrefix: String, - mapper: ObjCExportMapper - ) : this( - moduleDescriptors, - mapper, - ObjCExportNamerImpl(moduleDescriptors.toSet(), builtIns, mapper, topLevelNamePrefix, local = false) - ) - - constructor( - moduleDescriptor: ModuleDescriptor, - builtIns: KotlinBuiltIns, - topLevelNamePrefix: String = moduleDescriptor.namePrefix - ) : this(moduleDescriptor, emptyList(), builtIns, topLevelNamePrefix) - - constructor( - moduleDescriptor: ModuleDescriptor, - exportedDependencies: List, - builtIns: KotlinBuiltIns, - topLevelNamePrefix: String = moduleDescriptor.namePrefix - ) : this(listOf(moduleDescriptor) + exportedDependencies, builtIns, topLevelNamePrefix) - private val stubs = mutableListOf>() private val classForwardDeclarations = linkedSetOf() private val protocolForwardDeclarations = linkedSetOf() private val extraClassesToTranslate = mutableSetOf() - private val translator = ObjCExportTranslatorImpl(this, mapper, namer, - object : ObjCExportWarningCollector { - override fun reportWarning(text: String) = - this@ObjCExportHeaderGenerator.reportWarning(text) - - override fun reportWarning(method: FunctionDescriptor, text: String) = - this@ObjCExportHeaderGenerator.reportWarning(method, text) - }, - objcGenerics) + private val translator = ObjCExportTranslatorImpl(this, mapper, namer, problemCollector, objcGenerics) private val generatedClasses = mutableSetOf() private val extensions = mutableMapOf>() @@ -1050,10 +1029,6 @@ abstract class ObjCExportHeaderGenerator internal constructor( fun getExportStubs(): ObjCExportedStubs = ObjCExportedStubs(classForwardDeclarations, protocolForwardDeclarations, stubs) - protected abstract fun reportWarning(text: String) - - protected abstract fun reportWarning(method: FunctionDescriptor, text: String) - protected open fun getAdditionalImports(): List = emptyList() fun translateModule() { diff --git a/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/objcexport/ObjCExportHeaderGeneratorImpl.kt b/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/objcexport/ObjCExportHeaderGeneratorImpl.kt index 11b05b3f0ca..bfe6882f5ce 100644 --- a/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/objcexport/ObjCExportHeaderGeneratorImpl.kt +++ b/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/objcexport/ObjCExportHeaderGeneratorImpl.kt @@ -22,21 +22,26 @@ internal class ObjCExportHeaderGeneratorImpl( mapper: ObjCExportMapper, namer: ObjCExportNamer, objcGenerics: Boolean -) : ObjCExportHeaderGenerator(moduleDescriptors, mapper, namer, objcGenerics) { +) : ObjCExportHeaderGenerator(moduleDescriptors, mapper, namer, objcGenerics, ProblemCollector(context)) { + private class ProblemCollector(val context: Context) : ObjCExportProblemCollector { + override fun reportWarning(text: String) { + context.reportCompilationWarning(text) + } - override fun reportWarning(text: String) { - context.reportCompilationWarning(text) - } + override fun reportWarning(method: FunctionDescriptor, text: String) { + val psi = (method as? DeclarationDescriptorWithSource)?.source?.getPsi() + ?: return reportWarning( + "$text\n (at ${DescriptorRenderer.COMPACT_WITH_SHORT_TYPES.render(method)})" + ) - override fun reportWarning(method: FunctionDescriptor, text: String) { - val psi = (method as? DeclarationDescriptorWithSource)?.source?.getPsi() - ?: return reportWarning( - "$text\n (at ${DescriptorRenderer.COMPACT_WITH_SHORT_TYPES.render(method)})" - ) + val location = MessageUtil.psiElementToMessageLocation(psi) - val location = MessageUtil.psiElementToMessageLocation(psi) + context.messageCollector.report(CompilerMessageSeverity.WARNING, text, location) + } - context.messageCollector.report(CompilerMessageSeverity.WARNING, text, location) + override fun reportException(throwable: Throwable) { + throw throwable + } } override fun getAdditionalImports(): List = diff --git a/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/objcexport/ObjCExportLazy.kt b/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/objcexport/ObjCExportLazy.kt index 60efb291d24..68d88aca4d3 100644 --- a/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/objcexport/ObjCExportLazy.kt +++ b/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/objcexport/ObjCExportLazy.kt @@ -53,7 +53,7 @@ interface ObjCExportLazy { @JvmOverloads fun createObjCExportLazy( configuration: ObjCExportLazy.Configuration, - warningCollector: ObjCExportWarningCollector, + problemCollector: ObjCExportProblemCollector, codeAnalyzer: KotlinCodeAnalyzer, typeResolver: TypeResolver, descriptorResolver: DescriptorResolver, @@ -62,7 +62,7 @@ fun createObjCExportLazy( deprecationResolver: DeprecationResolver? = null ): ObjCExportLazy = ObjCExportLazyImpl( configuration, - warningCollector, + problemCollector, codeAnalyzer, typeResolver, descriptorResolver, @@ -73,7 +73,7 @@ fun createObjCExportLazy( internal class ObjCExportLazyImpl( private val configuration: ObjCExportLazy.Configuration, - warningCollector: ObjCExportWarningCollector, + problemCollector: ObjCExportProblemCollector, private val codeAnalyzer: KotlinCodeAnalyzer, private val typeResolver: TypeResolver, private val descriptorResolver: DescriptorResolver, @@ -94,8 +94,8 @@ internal class ObjCExportLazyImpl( null, mapper, namer, - warningCollector, - objcGenerics = configuration.objcGenerics + problemCollector, + configuration.objcGenerics ) private val isValid: Boolean diff --git a/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/objcexport/ObjcExportHeaderGeneratorMobile.kt b/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/objcexport/ObjcExportHeaderGeneratorMobile.kt index e6334bc2298..ef64c3b4756 100644 --- a/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/objcexport/ObjcExportHeaderGeneratorMobile.kt +++ b/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/objcexport/ObjcExportHeaderGeneratorMobile.kt @@ -2,7 +2,6 @@ package org.jetbrains.kotlin.backend.konan.objcexport import org.jetbrains.kotlin.builtins.KotlinBuiltIns import org.jetbrains.kotlin.descriptors.ClassDescriptor -import org.jetbrains.kotlin.descriptors.FunctionDescriptor import org.jetbrains.kotlin.descriptors.ModuleDescriptor import org.jetbrains.kotlin.resolve.deprecation.DeprecationResolver import org.jetbrains.kotlin.resolve.descriptorUtil.module @@ -11,15 +10,15 @@ class ObjcExportHeaderGeneratorMobile internal constructor( moduleDescriptors: List, mapper: ObjCExportMapper, namer: ObjCExportNamer, - private val warningCollector: ObjCExportWarningCollector, + problemCollector: ObjCExportProblemCollector, objcGenerics: Boolean, private val restrictToLocalModules: Boolean -) : ObjCExportHeaderGenerator(moduleDescriptors, mapper, namer, objcGenerics) { +) : ObjCExportHeaderGenerator(moduleDescriptors, mapper, namer, objcGenerics, problemCollector) { companion object { fun createInstance( configuration: ObjCExportLazy.Configuration, - warningCollector: ObjCExportWarningCollector, + problemCollector: ObjCExportProblemCollector, builtIns: KotlinBuiltIns, moduleDescriptors: List, deprecationResolver: DeprecationResolver? = null, @@ -33,7 +32,7 @@ class ObjcExportHeaderGeneratorMobile internal constructor( moduleDescriptors, mapper, namer, - warningCollector, + problemCollector, configuration.objcGenerics, restrictToLocalModules ) @@ -42,12 +41,4 @@ class ObjcExportHeaderGeneratorMobile internal constructor( override fun shouldTranslateExtraClass(descriptor: ClassDescriptor): Boolean = !restrictToLocalModules || descriptor.module in moduleDescriptors - - override fun reportWarning(text: String) { - warningCollector.reportWarning(text) - } - - override fun reportWarning(method: FunctionDescriptor, text: String) { - warningCollector.reportWarning(method, text) - } } diff --git a/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/objcexport/StubBuilder.kt b/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/objcexport/StubBuilder.kt index b2c89c2821e..1ca5f2f800c 100644 --- a/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/objcexport/StubBuilder.kt +++ b/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/objcexport/StubBuilder.kt @@ -5,21 +5,20 @@ package org.jetbrains.kotlin.backend.konan.objcexport -internal class StubBuilder { - private val children = mutableListOf>() +internal class StubBuilder>(private val problemCollector: ObjCExportProblemCollector) { + private val children = mutableListOf() - operator fun Stub<*>.unaryPlus() { - children.add(this) + inline fun add(provider: () -> S) { + try { + children.add(provider()) + } catch (t: Throwable) { + problemCollector.reportException(t) + } } - operator fun plusAssign(set: Collection>) { + operator fun plusAssign(set: Collection) { children += set } - fun build() = children -} - -internal inline fun buildMembers(block: StubBuilder.() -> Unit): List> = StubBuilder().let { - it.block() - it.build() + fun build(): List = children } diff --git a/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/serialization/KonanIrFileSerializer.kt b/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/serialization/KonanIrFileSerializer.kt index 8e58c5b9e1f..52d1371d352 100644 --- a/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/serialization/KonanIrFileSerializer.kt +++ b/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/serialization/KonanIrFileSerializer.kt @@ -1,6 +1,5 @@ package org.jetbrains.kotlin.backend.konan.serialization -import org.jetbrains.kotlin.backend.common.LoggingContext import org.jetbrains.kotlin.backend.common.serialization.DeclarationTable import org.jetbrains.kotlin.backend.common.serialization.IrFileSerializer import org.jetbrains.kotlin.backend.konan.RuntimeNames @@ -9,15 +8,16 @@ import org.jetbrains.kotlin.ir.declarations.IrAnnotationContainer import org.jetbrains.kotlin.ir.declarations.IrClass import org.jetbrains.kotlin.ir.declarations.IrFunction import org.jetbrains.kotlin.ir.symbols.IrSymbol +import org.jetbrains.kotlin.ir.util.IrMessageLogger import org.jetbrains.kotlin.ir.util.hasAnnotation class KonanIrFileSerializer( - logger: LoggingContext, + messageLogger: IrMessageLogger, declarationTable: DeclarationTable, expectDescriptorToSymbol: MutableMap, skipExpects: Boolean, bodiesOnlyForInlines: Boolean = false -): IrFileSerializer(logger, declarationTable, expectDescriptorToSymbol, skipExpects = skipExpects, bodiesOnlyForInlines = bodiesOnlyForInlines) { +): IrFileSerializer(messageLogger, declarationTable, expectDescriptorToSymbol, skipExpects = skipExpects, bodiesOnlyForInlines = bodiesOnlyForInlines) { override fun backendSpecificExplicitRoot(node: IrAnnotationContainer): Boolean { val fqn = when (node) { diff --git a/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/serialization/KonanIrModuleSerializer.kt b/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/serialization/KonanIrModuleSerializer.kt index de9c7b4522c..317a28b5b81 100644 --- a/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/serialization/KonanIrModuleSerializer.kt +++ b/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/serialization/KonanIrModuleSerializer.kt @@ -1,6 +1,5 @@ package org.jetbrains.kotlin.backend.konan.serialization -import org.jetbrains.kotlin.backend.common.LoggingContext import org.jetbrains.kotlin.backend.common.serialization.* import org.jetbrains.kotlin.backend.common.serialization.signature.IdSignatureSerializer import org.jetbrains.kotlin.backend.konan.ir.interop.IrProviderForCEnumAndCStructStubs @@ -8,13 +7,14 @@ import org.jetbrains.kotlin.descriptors.DeclarationDescriptor import org.jetbrains.kotlin.ir.declarations.IrFile import org.jetbrains.kotlin.ir.descriptors.IrBuiltIns import org.jetbrains.kotlin.ir.symbols.IrSymbol +import org.jetbrains.kotlin.ir.util.IrMessageLogger class KonanIrModuleSerializer( - logger: LoggingContext, + messageLogger: IrMessageLogger, irBuiltIns: IrBuiltIns, private val expectDescriptorToSymbol: MutableMap, val skipExpects: Boolean -) : IrModuleSerializer(logger) { +) : IrModuleSerializer(messageLogger) { private val signaturer = IdSignatureSerializer(KonanManglerIr) private val globalDeclarationTable = KonanGlobalDeclarationTable(signaturer, irBuiltIns) @@ -29,5 +29,5 @@ class KonanIrModuleSerializer( file.fileEntry.name != IrProviderForCEnumAndCStructStubs.cTypeDefinitionsFileName override fun createSerializerForFile(file: IrFile): KonanIrFileSerializer = - KonanIrFileSerializer(logger, KonanDeclarationTable(globalDeclarationTable), expectDescriptorToSymbol, skipExpects = skipExpects) + KonanIrFileSerializer(messageLogger, KonanDeclarationTable(globalDeclarationTable), expectDescriptorToSymbol, skipExpects = skipExpects) } diff --git a/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/serialization/KonanIrlinker.kt b/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/serialization/KonanIrlinker.kt index 4066a46706b..0f9cd5330bb 100644 --- a/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/serialization/KonanIrlinker.kt +++ b/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/serialization/KonanIrlinker.kt @@ -16,7 +16,6 @@ package org.jetbrains.kotlin.backend.konan.serialization -import org.jetbrains.kotlin.backend.common.LoggingContext import org.jetbrains.kotlin.backend.common.overrides.FakeOverrideBuilder import org.jetbrains.kotlin.backend.common.overrides.FakeOverrideClassFilter import org.jetbrains.kotlin.backend.common.serialization.* @@ -71,7 +70,7 @@ internal class KonanIrLinker( private val currentModule: ModuleDescriptor, override val functionalInterfaceFactory: IrAbstractFunctionFactory, override val translationPluginContext: TranslationPluginContext?, - logger: LoggingContext, + messageLogger: IrMessageLogger, builtIns: IrBuiltIns, symbolTable: SymbolTable, private val forwardModuleDescriptor: ModuleDescriptor?, @@ -79,7 +78,7 @@ internal class KonanIrLinker( private val cenumsProvider: IrProviderForCEnumAndCStructStubs, exportedDependencies: List, private val cachedLibraries: CachedLibraries -) : KotlinIrLinker(currentModule, logger, builtIns, symbolTable, exportedDependencies) { +) : KotlinIrLinker(currentModule, messageLogger, builtIns, symbolTable, exportedDependencies) { companion object { private val C_NAMES_NAME = Name.identifier("cnames") diff --git a/kotlin-native/backend.native/tests/build.gradle b/kotlin-native/backend.native/tests/build.gradle index 60ea4d33b1a..d58c8fcc5e4 100644 --- a/kotlin-native/backend.native/tests/build.gradle +++ b/kotlin-native/backend.native/tests/build.gradle @@ -153,6 +153,8 @@ tasks.withType(RunExternalTestGroup.class).configureEach { enableTwoStageCompilation = twoStageEnabled } +ext.isExperimentalMM = project.globalTestArgs.contains("-memory-model") && project.globalTestArgs.contains("experimental") + allprojects { // Root directories for test output (logs, compiled files, statistics etc). Only single path must be in each set. // backend.native/tests @@ -424,7 +426,16 @@ Task dynamicTest(String name, Closure configureClosure) { if (task.enabled) { konanArtifacts { def targetName = target.name + def lib = task.interop + if (lib != null) { + UtilsKt.dependsOnKonanBuildingTask(task, lib, target) + } dynamic(name, targets: [targetName]) { + if (lib != null) { + libraries { + artifact lib + } + } srcFiles task.getSources() baseDir "$testOutputLocal/$name" extraOpts task.flags @@ -803,7 +814,8 @@ task runtime_basic_simd(type: KonanLocalTest) { } task runtime_worker_random(type: KonanLocalTest) { - enabled = (project.testTarget != 'wasm32') // Uses workers. + enabled = (project.testTarget != 'wasm32') && // Uses workers. + !isExperimentalMM // Experimental MM doesn't support multiple mutators yet. source = "runtime/basic/worker_random.kt" } @@ -917,146 +929,170 @@ task empty_substring(type: KonanLocalTest) { } standaloneTest("cleaner_basic") { - enabled = (project.testTarget != 'wasm32') // Cleaners need workers + enabled = (project.testTarget != 'wasm32') && // Cleaners need workers + !isExperimentalMM // Experimental MM doesn't support multiple mutators yet. source = "runtime/basic/cleaner_basic.kt" flags = ['-tr', '-Xopt-in=kotlin.native.internal.InternalForKotlinNative'] } standaloneTest("cleaner_workers") { - enabled = (project.testTarget != 'wasm32') // Cleaners need workers + enabled = (project.testTarget != 'wasm32') && // Cleaners need workers + !isExperimentalMM // Experimental MM doesn't support multiple mutators yet. source = "runtime/basic/cleaner_workers.kt" flags = ['-tr', '-Xopt-in=kotlin.native.internal.InternalForKotlinNative'] } standaloneTest("cleaner_in_main_with_checker") { - enabled = (project.testTarget != 'wasm32') // Cleaners need workers + enabled = (project.testTarget != 'wasm32') && // Cleaners need workers + !isExperimentalMM // Experimental MM doesn't support multiple mutators yet. source = "runtime/basic/cleaner_in_main_with_checker.kt" goldValue = "42\n" } standaloneTest("cleaner_in_main_without_checker") { - enabled = (project.testTarget != 'wasm32') // Cleaners need workers + enabled = (project.testTarget != 'wasm32') && // Cleaners need workers + !isExperimentalMM // Experimental MM doesn't support multiple mutators yet. source = "runtime/basic/cleaner_in_main_without_checker.kt" goldValue = "" } standaloneTest("cleaner_leak_without_checker") { - enabled = (project.testTarget != 'wasm32') // Cleaners need workers + enabled = (project.testTarget != 'wasm32') && // Cleaners need workers + !isExperimentalMM // Experimental MM doesn't support multiple mutators yet. source = "runtime/basic/cleaner_leak_without_checker.kt" goldValue = "" } standaloneTest("cleaner_leak_with_checker") { - enabled = (project.testTarget != 'wasm32') // Cleaners need workers + enabled = (project.testTarget != 'wasm32') && // Cleaners need workers + !isExperimentalMM // Experimental MM doesn't support multiple mutators yet. source = "runtime/basic/cleaner_leak_with_checker.kt" expectedExitStatusChecker = { it != 0 } outputChecker = { s -> (s =~ /Cleaner (0x)?[0-9a-fA-F]+ was disposed during program exit/).find() } } standaloneTest("cleaner_in_tls_main_without_checker") { - enabled = (project.testTarget != 'wasm32') // Cleaners need workers + enabled = (project.testTarget != 'wasm32') && // Cleaners need workers + !isExperimentalMM // Experimental MM doesn't support multiple mutators yet. source = "runtime/basic/cleaner_in_tls_main_without_checker.kt" } standaloneTest("cleaner_in_tls_main_with_checker") { - enabled = (project.testTarget != 'wasm32') // Cleaners need workers + enabled = (project.testTarget != 'wasm32') && // Cleaners need workers + !isExperimentalMM // Experimental MM doesn't support multiple mutators yet. source = "runtime/basic/cleaner_in_tls_main_with_checker.kt" expectedExitStatusChecker = { it != 0 } outputChecker = { s -> (s =~ /Cleaner (0x)?[0-9a-fA-F]+ was disposed during program exit/).find() } } standaloneTest("cleaner_in_tls_worker") { - enabled = (project.testTarget != 'wasm32') // Cleaners need workers + enabled = (project.testTarget != 'wasm32') && // Cleaners need workers + !isExperimentalMM // Experimental MM doesn't support multiple mutators yet. source = "runtime/basic/cleaner_in_tls_worker.kt" flags = ['-Xopt-in=kotlin.native.internal.InternalForKotlinNative'] } standaloneTest("worker_bound_reference0") { - enabled = (project.testTarget != 'wasm32') // Workers need pthreads. + enabled = (project.testTarget != 'wasm32') && // Workers need pthreads. + !isExperimentalMM // Experimental MM doesn't support multiple mutators yet. source = "runtime/concurrent/worker_bound_reference0.kt" flags = ['-tr'] } task worker0(type: KonanLocalTest) { - enabled = (project.testTarget != 'wasm32') // Workers need pthreads. + enabled = (project.testTarget != 'wasm32') && // Workers need pthreads. + !isExperimentalMM // Experimental MM doesn't support multiple mutators yet. goldValue = "Got Input processed\nOK\n" source = "runtime/workers/worker0.kt" } task worker1(type: KonanLocalTest) { - enabled = (project.testTarget != 'wasm32') // Workers need pthreads. + enabled = (project.testTarget != 'wasm32') && // Workers need pthreads. + !isExperimentalMM // Experimental MM doesn't support multiple mutators yet. goldValue = "OK\n" source = "runtime/workers/worker1.kt" } task worker2(type: KonanLocalTest) { - enabled = (project.testTarget != 'wasm32') // Workers need pthreads. + enabled = (project.testTarget != 'wasm32') && // Workers need pthreads. + !isExperimentalMM // Experimental MM doesn't support multiple mutators yet. goldValue = "OK\n" source = "runtime/workers/worker2.kt" } task worker3(type: KonanLocalTest) { - enabled = (project.testTarget != 'wasm32') // Workers need pthreads. + enabled = (project.testTarget != 'wasm32') && // Workers need pthreads. + !isExperimentalMM // Experimental MM doesn't support multiple mutators yet. goldValue = "OK\n" source = "runtime/workers/worker3.kt" } task worker4(type: KonanLocalTest) { - enabled = (project.testTarget != 'wasm32') // Workers need pthreads. + enabled = (project.testTarget != 'wasm32') && // Workers need pthreads. + !isExperimentalMM // Experimental MM doesn't support multiple mutators yet. goldValue = "Got 42\nOK\n" source = "runtime/workers/worker4.kt" } // This tests changes main thread worker queue state, so better be executed alone. standaloneTest("worker5") { - enabled = (project.testTarget != 'wasm32') // Workers need pthreads. + enabled = (project.testTarget != 'wasm32') && // Workers need pthreads. + !isExperimentalMM // Experimental MM doesn't support multiple mutators yet. goldValue = "Got 3\nOK\n" source = "runtime/workers/worker5.kt" } task worker6(type: KonanLocalTest) { - enabled = (project.testTarget != 'wasm32') // Workers need pthreads. + enabled = (project.testTarget != 'wasm32') && // Workers need pthreads. + !isExperimentalMM // Experimental MM doesn't support multiple mutators yet. goldValue = "Got 42\nOK\n" source = "runtime/workers/worker6.kt" } task worker7(type: KonanLocalTest) { - enabled = (project.testTarget != 'wasm32') // Workers need pthreads. + enabled = (project.testTarget != 'wasm32') && // Workers need pthreads. + !isExperimentalMM // Experimental MM doesn't support multiple mutators yet. goldValue = "Input\nGot kotlin.Unit\nOK\n" source = "runtime/workers/worker7.kt" } task worker8(type: KonanLocalTest) { - enabled = (project.testTarget != 'wasm32') // Workers need pthreads. + enabled = (project.testTarget != 'wasm32') && // Workers need pthreads. + !isExperimentalMM // Experimental MM doesn't support multiple mutators yet. goldValue = "SharedData(string=Hello, int=10, member=SharedDataMember(double=0.1))\nGot kotlin.Unit\nOK\n" source = "runtime/workers/worker8.kt" } task worker9(type: KonanLocalTest) { - enabled = (project.testTarget != 'wasm32') // Workers need pthreads. + enabled = (project.testTarget != 'wasm32') && // Workers need pthreads. + !isExperimentalMM // Experimental MM doesn't support multiple mutators yet. goldValue = "zzz\n42\nOK\nfirst 2\nsecond 3\nfrozen OK\n" source = "runtime/workers/worker9.kt" } task worker10(type: KonanLocalTest) { - enabled = (project.testTarget != 'wasm32') // Workers need pthreads. + enabled = (project.testTarget != 'wasm32') && // Workers need pthreads. + !isExperimentalMM // Experimental MM doesn't support multiple mutators yet. goldValue = "OK\ntrue\ntrue\n" source = "runtime/workers/worker10.kt" } task worker11(type: KonanLocalTest) { - enabled = (project.testTarget != 'wasm32') // Workers need pthreads. + enabled = (project.testTarget != 'wasm32') && // Workers need pthreads. + !isExperimentalMM // Experimental MM doesn't support multiple mutators yet. goldValue = "OK\n" source = "runtime/workers/worker11.kt" } standaloneTest("worker_threadlocal_no_leak") { - disabled = (project.testTarget == 'wasm32') // Needs pthreads. + disabled = (project.testTarget == 'wasm32') || // Needs pthreads. + isExperimentalMM // Experimental MM doesn't support multiple mutators yet. source = "runtime/workers/worker_threadlocal_no_leak.kt" } task freeze0(type: KonanLocalTest) { - enabled = (project.testTarget != 'wasm32') // No workers on WASM. + enabled = (project.testTarget != 'wasm32') && // No workers on WASM. + !isExperimentalMM // Experimental MM doesn't support multiple mutators yet. goldValue = "frozen bit is true\n" + "Worker: SharedData(string=Hello, int=10, member=SharedDataMember(double=0.1))\n" + "Main: SharedData(string=Hello, int=10, member=SharedDataMember(double=0.1))\n" + @@ -1065,19 +1101,22 @@ task freeze0(type: KonanLocalTest) { } task freeze1(type: KonanLocalTest) { - enabled = (project.testTarget != 'wasm32') // No exceptions on WASM. + enabled = (project.testTarget != 'wasm32') && // No exceptions on WASM. + !isExperimentalMM // Experimental MM does not support freezing yet. goldValue = "OK, cannot mutate frozen\n" source = "runtime/workers/freeze1.kt" } task freeze_stress(type: KonanLocalTest) { - enabled = (project.testTarget != 'wasm32') // No exceptions on WASM. + enabled = (project.testTarget != 'wasm32') && // No exceptions on WASM. + !isExperimentalMM // Experimental MM does not support freezing yet. goldValue = "OK\n" source = "runtime/workers/freeze_stress.kt" } task freeze2(type: KonanLocalTest) { - enabled = (project.testTarget != 'wasm32') // No exceptions on WASM. + enabled = (project.testTarget != 'wasm32') && // No exceptions on WASM. + !isExperimentalMM // Experimental MM does not support freezing yet. goldValue = "Worker 1: Hello world\n" + "Worker2: 42\n" + "Worker3: 239.0\n" + "Worker4: a\n" + "OK\n" @@ -1085,30 +1124,35 @@ task freeze2(type: KonanLocalTest) { } task freeze3(type: KonanLocalTest) { - enabled = (project.testTarget != 'wasm32') // No exceptions on WASM. + enabled = (project.testTarget != 'wasm32') && // No exceptions on WASM. + !isExperimentalMM // Experimental MM does not support freezing yet. goldValue = "OK\n" source = "runtime/workers/freeze3.kt" } task freeze4(type: KonanLocalTest) { - enabled = (project.testTarget != 'wasm32') // No exceptions on WASM. + enabled = (project.testTarget != 'wasm32') && // No exceptions on WASM. + !isExperimentalMM // Experimental MM does not support freezing yet. goldValue = "OK\n" source = "runtime/workers/freeze4.kt" } task freeze5(type: KonanLocalTest) { + enabled = !isExperimentalMM // Experimental MM does not support freezing yet. goldValue = "OK\n" source = "runtime/workers/freeze5.kt" } task freeze6(type: KonanLocalTest) { - enabled = (project.testTarget != 'wasm32') // No exceptions on WASM. + enabled = (project.testTarget != 'wasm32') && // No exceptions on WASM. + !isExperimentalMM // Experimental MM does not support freezing yet. goldValue = "OK\nOK\n" source = "runtime/workers/freeze6.kt" } task atomic0(type: KonanLocalTest) { - enabled = (project.testTarget != 'wasm32') // Workers need pthreads. + enabled = (project.testTarget != 'wasm32') && // Workers need pthreads. + !isExperimentalMM // Experimental MM doesn't support multiple mutators yet. goldValue = "35\n" + "20\n" + "OK\n" source = "runtime/workers/atomic0.kt" } @@ -1120,46 +1164,54 @@ standaloneTest("atomic1") { } task lazy0(type: KonanLocalTest) { - enabled = (project.testTarget != 'wasm32') // Workers need pthreads. + enabled = (project.testTarget != 'wasm32') && // Workers need pthreads. + !isExperimentalMM // Experimental MM doesn't support multiple mutators yet. goldValue = "OK\n" source = "runtime/workers/lazy0.kt" } task lazy1(type: KonanLocalTest) { - enabled = (project.testTarget != 'wasm32') // Need exceptions. + enabled = (project.testTarget != 'wasm32') && // Need exceptions. + !isExperimentalMM // Experimental MM does not support freezing yet. goldValue = "OK\n" source = "runtime/workers/lazy1.kt" } standaloneTest("lazy2") { + enabled = !isExperimentalMM // Experimental MM does not have a GC yet. goldValue = "123\nOK\n" source = "runtime/workers/lazy2.kt" } standaloneTest("lazy3") { + enabled = !isExperimentalMM // Experimental MM does not have a GC yet. source = "runtime/workers/lazy3.kt" } task mutableData1(type: KonanLocalTest) { - enabled = (project.testTarget != 'wasm32') // Workers need pthreads. Need exceptions + enabled = (project.testTarget != 'wasm32') && // Workers need pthreads. Need exceptions + !isExperimentalMM // Experimental MM doesn't support multiple mutators yet. source = "runtime/workers/mutableData1.kt" } task enumIdentity(type: KonanLocalTest) { - enabled = (project.testTarget != 'wasm32') // Workers need pthreads. + enabled = (project.testTarget != 'wasm32') && // Workers need pthreads. + !isExperimentalMM // Experimental MM doesn't support multiple mutators yet. goldValue = "true\n" source = "runtime/workers/enum_identity.kt" } standaloneTest("leakWorker") { - disabled = (project.testTarget == 'wasm32') // Needs pthreads. + disabled = (project.testTarget == 'wasm32') || // Needs pthreads. + isExperimentalMM // Experimental MM doesn't support multiple mutators yet. source = "runtime/workers/leak_worker.kt" expectedExitStatusChecker = { it != 0 } outputChecker = { s -> s.contains("Unfinished workers detected, 1 workers leaked!") } } standaloneTest("leakMemoryWithWorkerTermination") { - disabled = (project.testTarget == 'wasm32') // Needs pthreads. + disabled = (project.testTarget == 'wasm32') || // Needs pthreads. + isExperimentalMM // Experimental MM doesn't support multiple mutators yet. source = "runtime/workers/leak_memory_with_worker_termination.kt" expectedExitStatusChecker = { it != 0 } outputChecker = { s -> s.contains("Memory leaks detected, 1 objects leaked!") } @@ -1242,6 +1294,7 @@ task enum_nested(type: KonanLocalTest) { } task enum_isFrozen(type: KonanLocalTest) { + enabled = !isExperimentalMM // Experimental MM does not support freezing yet. goldValue = "true\n" source = "codegen/enum/isFrozen.kt" } @@ -1992,7 +2045,8 @@ task typed_array0(type: KonanLocalTest) { } task typed_array1(type: KonanLocalTest) { - enabled = (project.testTarget != 'wasm32') // No exceptions on WASM. + enabled = (project.testTarget != 'wasm32') && // No exceptions on WASM. + !isExperimentalMM // Experimental MM does not support freezing yet. goldValue = "OK\n" source = "runtime/collections/typed_array1.kt" } @@ -2638,21 +2692,24 @@ standaloneTest("args0") { } standaloneTest("devirtualization_lateinitInterface") { - disabled = (cacheTesting != null) // Cache is not compatible with -opt. + disabled = (cacheTesting != null) || // Cache is not compatible with -opt. + isExperimentalMM // Experimental MM does not support -opt yet. goldValue = "42\n" flags = ["-opt"] source = "codegen/devirtualization/lateinitInterface.kt" } standaloneTest("devirtualization_getter_looking_as_box_function") { - disabled = (cacheTesting != null) // Cache is not compatible with -opt. + disabled = (cacheTesting != null) || // Cache is not compatible with -opt. + isExperimentalMM // Experimental MM does not support -opt yet. goldValue = "box\n" flags = ["-opt"] source = "codegen/devirtualization/getter_looking_as_box_function.kt" } standaloneTest("devirtualization_anonymousObject") { - disabled = (cacheTesting != null) // Cache is not compatible with -opt. + disabled = (cacheTesting != null) || // Cache is not compatible with -opt. + isExperimentalMM // Experimental MM does not support -opt yet. goldValue = "zzz\n" flags = ["-opt"] source = "codegen/devirtualization/anonymousObject.kt" @@ -2848,7 +2905,8 @@ task initializers5(type: KonanLocalTest) { } task initializers6(type: KonanLocalTest) { - disabled = project.testTarget == 'wasm32' // Needs workers. + disabled = (project.testTarget == 'wasm32') || // Needs workers. + isExperimentalMM // Experimental MM doesn't support multiple mutators yet. source = "runtime/basic/initializers6.kt" } @@ -2856,6 +2914,10 @@ task initializers7(type: KonanLocalTest) { source = "runtime/basic/initializers7.kt" } +task initializers8(type: KonanLocalTest) { + source = "runtime/basic/initializers8.kt" +} + task expression_as_statement(type: KonanLocalTest) { expectedFail = (project.testTarget == 'wasm32') // uses exceptions. goldValue = "Ok\n" @@ -2902,11 +2964,13 @@ task memory_escape1(type: KonanLocalTest) { } task memory_cycles0(type: KonanLocalTest) { + enabled = !isExperimentalMM // Experimental MM does not have a GC yet. goldValue = "42\n" source = "runtime/memory/cycles0.kt" } task memory_cycles1(type: KonanLocalTest) { + enabled = !isExperimentalMM // Experimental MM does not have a GC yet. source = "runtime/memory/cycles1.kt" } @@ -2920,6 +2984,7 @@ task memory_escape2(type: KonanLocalTest) { } task memory_weak0(type: KonanLocalTest) { + enabled = !isExperimentalMM // Experimental MM does not have a GC yet. goldValue = "Data(s=Hello)\nnull\nOK\n" source = "runtime/memory/weak0.kt" } @@ -2930,17 +2995,20 @@ task memory_weak1(type: KonanLocalTest) { } standaloneTest("memory_only_gc") { + enabled = !isExperimentalMM // Experimental MM does not have a GC yet. source = "runtime/memory/only_gc.kt" } task memory_stable_ref_cross_thread_check(type: KonanLocalTest) { - disabled = project.testTarget == 'wasm32' // Needs workers. + disabled = (project.testTarget == 'wasm32') || // Needs workers. + isExperimentalMM // Experimental MM doesn't support multiple mutators yet. source = "runtime/memory/stable_ref_cross_thread_check.kt" } standaloneTest("cycle_detector") { disabled = project.globalTestArgs.contains('-opt') || // Needs debug build. - (project.testTarget == 'wasm32') // CycleDetector is disabled on WASM. + (project.testTarget == 'wasm32') || // CycleDetector is disabled on WASM. + isExperimentalMM // Experimental MM will not support CycleDetector. flags = ['-tr', '-g'] source = "runtime/memory/cycle_detector.kt" } @@ -2957,15 +3025,19 @@ standaloneTest("cycle_collector_deadlock1") { standaloneTest("leakMemory") { source = "runtime/memory/leak_memory.kt" - expectedExitStatusChecker = { it != 0 } - outputChecker = { s -> s.contains("Memory leaks detected, 1 objects leaked!") } + if (!isExperimentalMM) { // Experimental MM will not report memory leaks. + expectedExitStatusChecker = { it != 0 } + outputChecker = { s -> s.contains("Memory leaks detected, 1 objects leaked!") } + } } standaloneTest("leakMemoryWithTestRunner") { source = "runtime/memory/leak_memory_test_runner.kt" flags = ['-tr'] - expectedExitStatusChecker = { it != 0 } - outputChecker = { s -> s.contains("Memory leaks detected, 1 objects leaked!") } + if (!isExperimentalMM) { // Experimental MM will not report memory leaks. + expectedExitStatusChecker = { it != 0 } + outputChecker = { s -> s.contains("Memory leaks detected, 1 objects leaked!") } + } } standaloneTest("mpp1") { @@ -3508,6 +3580,65 @@ standaloneTest("testing_filters") { } } +standaloneTest("testing_filtered_suites") { + source = "testing/filtered_suites.kt" + flags = ["-tr", "-ea"] + + def filters = [ + ["Filtered_suitesKt.*"], // filter out a class. + ["A.*"], // filter out a top-level suite. + ["*.common"], // run a test from all suites -> all hooks executed. + ["Ignored.*"], // an ignored suite -> no hooks executed. + ["A.ignored"] // a suite with only ignored tests -> no hooks executed. + ] + def expectedHooks = [ + ["Filtered_suitesKt.before", "Filtered_suitesKt.after"], + ["A.before", "A.after"], + ["A.before", "A.after", "Filtered_suitesKt.before", "Filtered_suitesKt.after"], + [], + [] + ] + + multiRuns = true + multiArguments = filters.collect { + def filter = it.collect { "kotlin.test.tests.$it" }.join(",") + ["--ktest_gradle_filter=$filter", "--ktest_logger=SIMPLE"] + } + outputChecker = { String output -> + // The first chunk is empty - drop it. + def outputs = output.split("Starting testing\n").drop(1) + if (outputs.size() != expectedHooks.size()) { + println("Incorrect number of test runs. Expected: ${expectedHooks.size()}, actual: ${outputs.size()}") + return false + } + + // Check the correct set of hooks was executed on each run. + for (int i = 0; i < outputs.size(); i++) { + def actual = outputs[i].split('\n') + .findAll { it.startsWith("Hook:") } + .collect { it.replace("Hook: ", "") } + def expected = expectedHooks[i] + + if (actual.size() != expected.size()) { + println("Incorrect number of executed hooks for run #$i. Expected: ${expected.size()}. Actual: ${actual.size()}") + println("Expected hooks: $expected") + println("Actual hooks: $actual") + return false + } + + for (expectedHook in expected) { + if (!actual.contains(expectedHook)) { + println("Expected hook wasn't executed for run #$i: $expectedHook") + println("Expected hooks: $expected") + println("Actual hooks: $actual") + return false + } + } + } + return true + } +} + // Check that stacktraces and ignored suite are correctly reported in the TC logger. standaloneTest("testing_stacktrace") { source = "testing/stacktrace.kt" @@ -3542,7 +3673,8 @@ tasks.register("driver0", KonanDriverTest) { } tasks.register("driver_opt", KonanDriverTest) { - disabled = (cacheTesting != null) // Cache is not compatible with -opt. + disabled = (cacheTesting != null) || // Cache is not compatible with -opt. + isExperimentalMM // Experimental MM does not support -opt yet. goldValue = "Hello, world!\n" source = "runtime/basic/driver0.kt" flags = ["-opt"] @@ -3750,6 +3882,24 @@ createInterop("kt43265") { it.defFile 'interop/kt43265/kt43265.def' } +createInterop("kt43502") { + it.defFile 'interop/kt43502/kt43502.def' + it.headers "$projectDir/interop/kt43502/kt43502.h" + // Note: also hardcoded in def file. + final String libDir = "$buildDir/kt43502/" + // Construct library that contains actual symbol definition. + it.getByTarget(target.name).configure { + doFirst { + UtilsKt.buildStaticLibrary( + project, + [file("$projectDir/interop/kt43502/kt43502.c")], + file("$libDir/kt43502.a"), + file("$libDir/kt43502.objs"), + ) + } + } +} + createInterop("leakMemoryWithRunningThread") { it.defFile 'interop/leakMemoryWithRunningThread/leakMemory.def' it.headers "$projectDir/interop/leakMemoryWithRunningThread/leakMemory.h" @@ -4071,14 +4221,24 @@ interopTest("interop_kt43265") { source = "interop/kt43265/usage.kt" } -interopTest("interop_leakMemoryWithRunningThreadUnchecked") { +dynamicTest("interop_kt43502") { disabled = (project.testTarget == 'wasm32') // No interop for wasm yet. + interop = "kt43502" + source = "interop/kt43502/main.kt" + cSource = "$projectDir/interop/kt43502/main.c" + goldValue = "null\n" +} + +interopTest("interop_leakMemoryWithRunningThreadUnchecked") { + disabled = (project.testTarget == 'wasm32') || // No interop for wasm yet. + isExperimentalMM // Experimental MM doesn't support multiple mutators yet. interop = 'leakMemoryWithRunningThread' source = "interop/leakMemoryWithRunningThread/unchecked.kt" } interopTest("interop_leakMemoryWithRunningThreadChecked") { - disabled = (project.testTarget == 'wasm32') // No interop for wasm yet. + disabled = (project.testTarget == 'wasm32') || // No interop for wasm yet. + isExperimentalMM // Experimental MM doesn't support multiple mutators yet. interop = 'leakMemoryWithRunningThread' source = "interop/leakMemoryWithRunningThread/checked.kt" expectedExitStatusChecker = { it != 0 } @@ -4121,6 +4281,7 @@ standaloneTest("interop_opengl_teapot") { if (PlatformInfo.isAppleTarget(project)) { interopTest("interop_objc_smoke") { + enabled = !isExperimentalMM // Experimental MM does not have a GC yet. goldValue = "84\nFoo\nDeallocated\n" + "Hello, World!\nKotlin says: Hello, everybody!\nHello from Kotlin\n2, 1\n" + "true\ntrue\n" + @@ -4155,6 +4316,7 @@ if (PlatformInfo.isAppleTarget(project)) { } interopTestMultifile("interop_objc_tests") { + enabled = !isExperimentalMM // Experimental MM does not have a GC yet. source = "interop/objc/tests/" interop = 'objcTests' flags = ['-tr', '-e', 'main'] @@ -4272,6 +4434,7 @@ if (PlatformInfo.isAppleTarget(project)) { } interopTest("interop_objc_illegal_sharing_with_weak") { + enabled = !isExperimentalMM // Experimental MM doesn't support multiple mutators yet. source = "interop/objc/illegal_sharing_with_weak/main.kt" interop = 'objc_illegal_sharing_with_weak' @@ -4284,6 +4447,7 @@ if (PlatformInfo.isAppleTarget(project)) { } interopTest("interop_objc_kt42172") { + enabled = !isExperimentalMM // Experimental MM doesn't support multiple mutators yet. source = "interop/objc/kt42172/main.kt" interop = "objc_kt42172" flags = ['-Xopt-in=kotlin.native.internal.InternalForKotlinNative'] @@ -4334,7 +4498,8 @@ standaloneTest("interop_zlib") { standaloneTest("interop_objc_illegal_sharing") { dependsOnPlatformLibs(it) - disabled = !isAppleTarget(project) + disabled = !isAppleTarget(project) || + isExperimentalMM // Experimental MM doesn't support multiple mutators yet. source = "interop/objc/illegal_sharing.kt" expectedExitStatusChecker = { it != 0 } outputChecker = { @@ -4400,7 +4565,8 @@ dynamicTest("interop_kt42397") { } dynamicTest("interop_cleaners_main_thread") { - disabled = (project.target.name != project.hostName) + disabled = (project.target.name != project.hostName) || + isExperimentalMM // Experimental MM does not have a GC yet. source = "interop/cleaners/cleaners.kt" cSource = "$projectDir/interop/cleaners/main_thread.cpp" clangTool = "clang++" @@ -4409,7 +4575,8 @@ dynamicTest("interop_cleaners_main_thread") { } dynamicTest("interop_cleaners_second_thread") { - disabled = (project.target.name != project.hostName) + disabled = (project.target.name != project.hostName) || + isExperimentalMM // Experimental MM doesn't support multiple mutators yet. source = "interop/cleaners/cleaners.kt" cSource = "$projectDir/interop/cleaners/second_thread.cpp" clangTool = "clang++" @@ -4427,7 +4594,8 @@ dynamicTest("interop_cleaners_leak") { } dynamicTest("interop_migrating_main_thread_legacy") { - disabled = (project.target.name != project.hostName) + disabled = (project.target.name != project.hostName) || + isExperimentalMM // Experimental MM will not support legacy destroy runtime mode. source = "interop/migrating_main_thread/lib.kt" flags = ['-Xdestroy-runtime-mode=legacy'] clangFlags = ['-DIS_LEGACY'] @@ -4436,7 +4604,8 @@ dynamicTest("interop_migrating_main_thread_legacy") { } dynamicTest("interop_migrating_main_thread") { - disabled = (project.target.name != project.hostName) + disabled = (project.target.name != project.hostName) || + isExperimentalMM // Experimental MM doesn't support multiple mutators yet. source = "interop/migrating_main_thread/lib.kt" flags = ['-Xdestroy-runtime-mode=on-shutdown'] cSource = "$projectDir/interop/migrating_main_thread/main.cpp" @@ -4444,7 +4613,8 @@ dynamicTest("interop_migrating_main_thread") { } dynamicTest("interop_memory_leaks") { - disabled = (project.target.name != project.hostName) + disabled = (project.target.name != project.hostName) || + isExperimentalMM // Experimental MM will not support legacy destroy runtime mode. source = "interop/memory_leaks/lib.kt" cSource = "$projectDir/interop/memory_leaks/main.cpp" clangTool = "clang++" @@ -4584,6 +4754,7 @@ Task frameworkTest(String name, Closure configurator) { if (isAppleTarget(project)) { frameworkTest('testObjCExport') { + enabled = !isExperimentalMM // Experimental MM doesn't support ObjC blocks yet. final String frameworkName = 'Kt' final String dir = "$testOutputFramework/testObjCExport" final File lazyHeader = file("$dir/$target-lazy.h") @@ -4633,6 +4804,7 @@ if (isAppleTarget(project)) { } frameworkTest('testObjCExportStatic') { + enabled = !isExperimentalMM // Experimental MM doesn't support ObjC blocks yet. final String frameworkName = 'KtStatic' final String frameworkArtifactName = 'Kt' final String libraryName = frameworkName + "Library" @@ -4670,6 +4842,7 @@ if (isAppleTarget(project)) { } frameworkTest("testStdlibFramework") { + enabled = !isExperimentalMM // Experimental MM does not have GC yet. framework('Stdlib') { sources = ['framework/stdlib'] bitcode = true @@ -4890,7 +5063,8 @@ tasks.register("metadata_compare_unable_to_import", MetadataComparisonTest) { } standaloneTest("local_ea_arraysfieldwrite") { - disabled = (cacheTesting != null) // Cache is not compatible with -opt. + disabled = (cacheTesting != null) || // Cache is not compatible with -opt. + isExperimentalMM // Experimental MM does not support -opt yet. goldValue = "Array (constructor init):\nSize: 2\nContents: [1, 2]\n" + "Array (constructor init):\nSize: 2\nContents: [3, 4]\n" + "Array (default value init):\nSize: 2\nContents: [1, 2]\n" + @@ -4963,7 +5137,8 @@ private void configureStdlibTest(KonanGTest task, boolean inWorker) { task.useFilter = false task.testLogger = KonanTest.Logger.GTEST task.finalizedBy("resultsTask") - task.enabled = (project.testTarget != 'wasm32') // Uses exceptions + task.enabled = (project.testTarget != 'wasm32') && // Uses exceptions + (!inWorker || !ext.isExperimentalMM) // Experimental MM doesn't support multiple mutators yet. } /** diff --git a/kotlin-native/backend.native/tests/interop/kt43502/kt43502.c b/kotlin-native/backend.native/tests/interop/kt43502/kt43502.c new file mode 100644 index 00000000000..526961997ac --- /dev/null +++ b/kotlin-native/backend.native/tests/interop/kt43502/kt43502.c @@ -0,0 +1 @@ +char **externPtr = 0; \ No newline at end of file diff --git a/kotlin-native/backend.native/tests/interop/kt43502/kt43502.def b/kotlin-native/backend.native/tests/interop/kt43502/kt43502.def new file mode 100644 index 00000000000..21bf04117c8 --- /dev/null +++ b/kotlin-native/backend.native/tests/interop/kt43502/kt43502.def @@ -0,0 +1,2 @@ +libraryPaths = backend.native/tests/build/kt43502 +staticLibraries = kt43502.a \ No newline at end of file diff --git a/kotlin-native/backend.native/tests/interop/kt43502/kt43502.h b/kotlin-native/backend.native/tests/interop/kt43502/kt43502.h new file mode 100644 index 00000000000..703b5570bc2 --- /dev/null +++ b/kotlin-native/backend.native/tests/interop/kt43502/kt43502.h @@ -0,0 +1 @@ +extern char **externPtr; \ No newline at end of file diff --git a/kotlin-native/backend.native/tests/interop/kt43502/main.c b/kotlin-native/backend.native/tests/interop/kt43502/main.c new file mode 100644 index 00000000000..9c406914a7b --- /dev/null +++ b/kotlin-native/backend.native/tests/interop/kt43502/main.c @@ -0,0 +1,5 @@ +#include "testlib_api.h" + +int main() { + testlib_symbols()->kotlin.root.printExternPtr(); +} \ No newline at end of file diff --git a/kotlin-native/backend.native/tests/interop/kt43502/main.kt b/kotlin-native/backend.native/tests/interop/kt43502/main.kt new file mode 100644 index 00000000000..45dbd9b03a9 --- /dev/null +++ b/kotlin-native/backend.native/tests/interop/kt43502/main.kt @@ -0,0 +1,5 @@ +import kt43502.* + +fun printExternPtr() { + println(externPtr) +} \ No newline at end of file diff --git a/kotlin-native/backend.native/tests/objcexport/expectedLazy.h b/kotlin-native/backend.native/tests/objcexport/expectedLazy.h index 39dcf92fc9a..e146fda0a52 100644 --- a/kotlin-native/backend.native/tests/objcexport/expectedLazy.h +++ b/kotlin-native/backend.native/tests/objcexport/expectedLazy.h @@ -663,6 +663,86 @@ __attribute__((swift_name("ArraysInitBlock"))) - (NSString *)log __attribute__((swift_name("log()"))); @end; +__attribute__((swift_name("OverrideKotlinMethods2"))) +@protocol KtOverrideKotlinMethods2 +@required +- (int32_t)one __attribute__((swift_name("one()"))); +@end; + +__attribute__((swift_name("OverrideKotlinMethods3"))) +@interface KtOverrideKotlinMethods3 : KtBase +- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); ++ (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); +@end; + +__attribute__((swift_name("OverrideKotlinMethods4"))) +@interface KtOverrideKotlinMethods4 : KtOverrideKotlinMethods3 +- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); ++ (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); +- (int32_t)one __attribute__((swift_name("one()"))); +@end; + +__attribute__((swift_name("OverrideKotlinMethods5"))) +@protocol KtOverrideKotlinMethods5 +@required +- (int32_t)one __attribute__((swift_name("one()"))); +@end; + +__attribute__((swift_name("OverrideKotlinMethods6"))) +@protocol KtOverrideKotlinMethods6 +@required +@end; + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("OverrideKotlinMethodsKt"))) +@interface KtOverrideKotlinMethodsKt : KtBase + +/** + @note This method converts all Kotlin exceptions to errors. +*/ ++ (BOOL)test0Obj:(id)obj error:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("test0(obj:)"))); + +/** + @note This method converts all Kotlin exceptions to errors. +*/ ++ (BOOL)test1Obj:(id)obj error:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("test1(obj:)"))); + +/** + @note This method converts all Kotlin exceptions to errors. +*/ ++ (BOOL)test2Obj:(id)obj error:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("test2(obj:)"))); + +/** + @note This method converts all Kotlin exceptions to errors. +*/ ++ (BOOL)test3Obj:(KtOverrideKotlinMethods3 *)obj error:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("test3(obj:)"))); + +/** + @note This method converts all Kotlin exceptions to errors. +*/ ++ (BOOL)test4Obj:(KtOverrideKotlinMethods4 *)obj error:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("test4(obj:)"))); + +/** + @note This method converts all Kotlin exceptions to errors. +*/ ++ (BOOL)test5Obj:(id)obj error:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("test5(obj:)"))); + +/** + @note This method converts all Kotlin exceptions to errors. +*/ ++ (BOOL)test6Obj:(id)obj error:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("test6(obj:)"))); +@end; + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("OverrideMethodsOfAnyKt"))) +@interface KtOverrideMethodsOfAnyKt : KtBase + +/** + @note This method converts all Kotlin exceptions to errors. +*/ ++ (BOOL)testObj:(id)obj other:(id)other swift:(BOOL)swift error:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("test(obj:other:swift:)"))); +@end; + __attribute__((objc_subclassing_restricted)) __attribute__((swift_name("ThrowsEmptyKt"))) @interface KtThrowsEmptyKt : KtBase diff --git a/kotlin-native/backend.native/tests/objcexport/overrideKotlinMethods.kt b/kotlin-native/backend.native/tests/objcexport/overrideKotlinMethods.kt new file mode 100644 index 00000000000..97d07423301 --- /dev/null +++ b/kotlin-native/backend.native/tests/objcexport/overrideKotlinMethods.kt @@ -0,0 +1,66 @@ +package overrideKotlinMethods + +import kotlin.test.* + +internal interface OverrideKotlinMethods0 { + fun one(): T +} + +internal interface OverrideKotlinMethods1 : OverrideKotlinMethods0 + +interface OverrideKotlinMethods2 { + fun one(): Int +} + +open class OverrideKotlinMethods3 { + internal open fun one(): Number = 3 +} + +open class OverrideKotlinMethods4 : OverrideKotlinMethods3(), OverrideKotlinMethods1, OverrideKotlinMethods2 { + override fun one(): Int = 2 +} + +interface OverrideKotlinMethods5 { + fun one(): Int +} + +interface OverrideKotlinMethods6 : OverrideKotlinMethods5 + +// Using `Any` because Kotlin forbids internal type in public function signature. +@Throws(Throwable::class) +fun test0(obj: Any) { + val obj0 = obj as OverrideKotlinMethods0<*> + assertEquals(1, obj0.one()) +} + +// Using `Any` because Kotlin forbids internal type in public function signature. +@Throws(Throwable::class) +fun test1(obj: Any) { + val obj1 = obj as OverrideKotlinMethods1<*> + assertEquals(1, obj1.one()) +} + +@Throws(Throwable::class) +fun test2(obj: OverrideKotlinMethods2) { + assertEquals(1, obj.one()) +} + +@Throws(Throwable::class) +fun test3(obj: OverrideKotlinMethods3) { + assertEquals(1, obj.one()) +} + +@Throws(Throwable::class) +fun test4(obj: OverrideKotlinMethods4) { + assertEquals(1, obj.one()) +} + +@Throws(Throwable::class) +fun test5(obj: OverrideKotlinMethods5) { + assertEquals(1, obj.one()) +} + +@Throws(Throwable::class) +fun test6(obj: OverrideKotlinMethods6) { + assertEquals(1, obj.one()) +} diff --git a/kotlin-native/backend.native/tests/objcexport/overrideKotlinMethods.swift b/kotlin-native/backend.native/tests/objcexport/overrideKotlinMethods.swift new file mode 100644 index 00000000000..3cf030162e1 --- /dev/null +++ b/kotlin-native/backend.native/tests/objcexport/overrideKotlinMethods.swift @@ -0,0 +1,32 @@ +/* + * Copyright 2010-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license + * that can be found in the LICENSE file. + */ + +import Kt + +class OverrideKotlinMethodsImpl : OverrideKotlinMethods4, OverrideKotlinMethods6 { + override func one() -> Int32 { + return 1 + } +} + +private func test1() throws { + let obj = OverrideKotlinMethodsImpl() + + try OverrideKotlinMethodsKt.test0(obj: obj) + try OverrideKotlinMethodsKt.test1(obj: obj) + try OverrideKotlinMethodsKt.test2(obj: obj) + try OverrideKotlinMethodsKt.test3(obj: obj) + try OverrideKotlinMethodsKt.test4(obj: obj) + try OverrideKotlinMethodsKt.test5(obj: obj) + try OverrideKotlinMethodsKt.test6(obj: obj) +} + +class OverrideKotlinMethodsTests : SimpleTestProvider { + override init() { + super.init() + + test("Test1", test1) + } +} diff --git a/kotlin-native/backend.native/tests/objcexport/overrideMethodsOfAny.kt b/kotlin-native/backend.native/tests/objcexport/overrideMethodsOfAny.kt new file mode 100644 index 00000000000..aea0e02b2a4 --- /dev/null +++ b/kotlin-native/backend.native/tests/objcexport/overrideMethodsOfAny.kt @@ -0,0 +1,18 @@ +package overrideMethodsOfAny + +import kotlin.test.* + +@Throws(Throwable::class) +fun test(obj: Any, other: Any, swift: Boolean) { + if (!swift) { + // Doesn't work for Swift, see https://youtrack.jetbrains.com/issue/KT-44613. + assertEquals(42, obj.hashCode()) + assertTrue(obj.equals(other)) + } + + assertTrue(obj.equals(obj)) + assertFalse(obj.equals(null)) + assertFalse(obj.equals(Any())) + + assertEquals("toString", obj.toString()) +} diff --git a/kotlin-native/backend.native/tests/objcexport/overrideMethodsOfAny.swift b/kotlin-native/backend.native/tests/objcexport/overrideMethodsOfAny.swift new file mode 100644 index 00000000000..db82afe687f --- /dev/null +++ b/kotlin-native/backend.native/tests/objcexport/overrideMethodsOfAny.swift @@ -0,0 +1,43 @@ +/* + * Copyright 2010-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license + * that can be found in the LICENSE file. + */ + +import Kt + +private class SwiftOverridingMethodsOfAny : Hashable, Equatable, CustomStringConvertible { + var hashValue: Int { return 42 } + + static func == (lhs: SwiftOverridingMethodsOfAny, rhs: SwiftOverridingMethodsOfAny) -> Bool { + return true + } + + var description: String { return "toString" } +} + +private func testSwift() throws { + try OverrideMethodsOfAnyKt.test(obj: SwiftOverridingMethodsOfAny(), other: SwiftOverridingMethodsOfAny(), swift: true) +} + +private class ObjCOverridingMethodsOfAny : NSObject { + override var hash: Int { return 42 } + + override func isEqual(_ other: Any?) -> Bool { + return other is ObjCOverridingMethodsOfAny + } + + override var description: String { return "toString" } +} + +private func testObjC() throws { + try OverrideMethodsOfAnyKt.test(obj: ObjCOverridingMethodsOfAny(), other: ObjCOverridingMethodsOfAny(), swift: false) +} + +class OverrideMethodsOfAnyTests : SimpleTestProvider { + override init() { + super.init() + + test("TestSwift", testSwift) + test("TestObjC", testObjC) + } +} diff --git a/kotlin-native/backend.native/tests/runtime/basic/initializers8.kt b/kotlin-native/backend.native/tests/runtime/basic/initializers8.kt new file mode 100644 index 00000000000..d6d77a681b0 --- /dev/null +++ b/kotlin-native/backend.native/tests/runtime/basic/initializers8.kt @@ -0,0 +1,14 @@ +/* + * Copyright 2010-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license + * that can be found in the LICENSE file. + */ + +package runtime.basic.initializers8 + +import kotlin.test.* + +var globalString = "abc" + +@Test fun runTest() { + assertEquals("abc", globalString) +} diff --git a/kotlin-native/backend.native/tests/runtime/exceptions/custom_hook.kt b/kotlin-native/backend.native/tests/runtime/exceptions/custom_hook.kt index edb2c682a6e..8ce6fe326aa 100644 --- a/kotlin-native/backend.native/tests/runtime/exceptions/custom_hook.kt +++ b/kotlin-native/backend.native/tests/runtime/exceptions/custom_hook.kt @@ -6,17 +6,31 @@ import kotlin.test.* import kotlin.native.concurrent.* -fun main(args : Array) { +fun setHookLegacyMM(hook: ReportUnhandledExceptionHook) : ReportUnhandledExceptionHook? { assertFailsWith { setUnhandledExceptionHook { _ -> println("wrong") } } + return setUnhandledExceptionHook(hook.freeze()) +} + +fun setHookNewMM(hook: ReportUnhandledExceptionHook) : ReportUnhandledExceptionHook? { + return setUnhandledExceptionHook(hook) +} + +fun setHook(hook: ReportUnhandledExceptionHook) : ReportUnhandledExceptionHook? { + return when (kotlin.native.Platform.memoryModel) { + kotlin.native.MemoryModel.EXPERIMENTAL -> setHookNewMM(hook) + else -> setHookLegacyMM(hook) + } +} + +fun main() { val x = 42 - val old = setUnhandledExceptionHook({ + val old = setHook { throwable: Throwable -> println("value $x: ${throwable::class.simpleName}") - }.freeze()) + } assertNull(old) - throw Error("an error") -} \ No newline at end of file +} diff --git a/kotlin-native/backend.native/tests/testing/filtered_suites.kt b/kotlin-native/backend.native/tests/testing/filtered_suites.kt new file mode 100644 index 00000000000..3b8a0fd66f5 --- /dev/null +++ b/kotlin-native/backend.native/tests/testing/filtered_suites.kt @@ -0,0 +1,57 @@ +package kotlin.test.tests + +import kotlin.test.* + +private fun hook(message: String) { + print("Hook: ") + println(message) +} + +class A { + @Test + fun foo() {} + + @Test + fun common() {} + + @Ignore + @Test + fun ignored() {} + + companion object { + @BeforeClass + fun before() = hook("A.before") + + @AfterClass + fun after() = hook("A.after") + } +} + +@Ignore +class Ignored { + @Test + fun bar() {} + + @Test + fun common() {} + + companion object { + @BeforeClass + fun before() = hook("Ignored.before") + + @AfterClass + fun after() = hook("Ignored.after") + } +} + +@BeforeClass +fun before() = hook("Filtered_suitesKt.before") + +@AfterClass +fun after() = hook("Filtered_suitesKt.after") + +@Test +fun baz() {} + +@Test +fun common() {} diff --git a/kotlin-native/build-tools/src/main/kotlin/org/jetbrains/kotlin/FrameworkTest.kt b/kotlin-native/build-tools/src/main/kotlin/org/jetbrains/kotlin/FrameworkTest.kt index 088f071b4ae..7db25ecf841 100644 --- a/kotlin-native/build-tools/src/main/kotlin/org/jetbrains/kotlin/FrameworkTest.kt +++ b/kotlin-native/build-tools/src/main/kotlin/org/jetbrains/kotlin/FrameworkTest.kt @@ -183,7 +183,7 @@ open class FrameworkTest : DefaultTask(), KonanTestExecutable { KonanTarget.IOS_ARM32, KonanTarget.IOS_ARM64 -> "iphoneos" KonanTarget.TVOS_X64 -> "appletvsimulator" KonanTarget.TVOS_ARM64 -> "appletvos" - KonanTarget.MACOS_X64 -> "macosx" + KonanTarget.MACOS_X64, KonanTarget.MACOS_ARM64 -> "macosx" KonanTarget.WATCHOS_ARM64 -> "watchos" KonanTarget.WATCHOS_X64, KonanTarget.WATCHOS_X86 -> "watchsimulator" else -> throw IllegalStateException("Test target $target is not supported") @@ -213,6 +213,7 @@ open class FrameworkTest : DefaultTask(), KonanTestExecutable { KonanTarget.TVOS_X64 -> "SIMCTL_CHILD_DYLD_LIBRARY_PATH" else -> "DYLD_LIBRARY_PATH" } + // TODO: macos_arm64? return if (newMacos && target == KonanTarget.MACOS_X64) emptyMap() else mapOf( dyldLibraryPathKey to getSwiftLibsPathForTestTarget() ) @@ -253,7 +254,8 @@ open class FrameworkTest : DefaultTask(), KonanTestExecutable { KonanTarget.WATCHOS_X64 -> return // bitcode-build-tool doesn't support simulators. KonanTarget.IOS_ARM64, KonanTarget.IOS_ARM32 -> Xcode.current.iphoneosSdk - KonanTarget.MACOS_X64 -> Xcode.current.macosxSdk + KonanTarget.MACOS_X64, + KonanTarget.MACOS_ARM64 -> Xcode.current.macosxSdk KonanTarget.TVOS_ARM64 -> Xcode.current.appletvosSdk KonanTarget.WATCHOS_ARM32, KonanTarget.WATCHOS_ARM64 -> Xcode.current.watchosSdk diff --git a/kotlin-native/build-tools/src/main/kotlin/org/jetbrains/kotlin/KotlinNativeTest.kt b/kotlin-native/build-tools/src/main/kotlin/org/jetbrains/kotlin/KotlinNativeTest.kt index 85fb358c380..5fa30e13660 100644 --- a/kotlin-native/build-tools/src/main/kotlin/org/jetbrains/kotlin/KotlinNativeTest.kt +++ b/kotlin-native/build-tools/src/main/kotlin/org/jetbrains/kotlin/KotlinNativeTest.kt @@ -436,6 +436,9 @@ open class KonanDynamicTest : KonanStandaloneTest() { @Input var clangFlags: List = listOf() + @Input @Optional + var interop: String? = null + // Replace testlib_api.h and all occurrences of the testlib with the actual name of the test private fun processCSource(): String { val sourceFile = File(cSource) diff --git a/kotlin-native/build-tools/src/main/kotlin/org/jetbrains/kotlin/Utils.kt b/kotlin-native/build-tools/src/main/kotlin/org/jetbrains/kotlin/Utils.kt index ee556923507..1b735b4114d 100644 --- a/kotlin-native/build-tools/src/main/kotlin/org/jetbrains/kotlin/Utils.kt +++ b/kotlin-native/build-tools/src/main/kotlin/org/jetbrains/kotlin/Utils.kt @@ -244,6 +244,7 @@ fun compileSwift(project: Project, target: KonanTarget, sources: List, o KonanTarget.TVOS_X64 -> "x86_64-apple-tvos" + configs.osVersionMin KonanTarget.TVOS_ARM64 -> "arm64-apple-tvos" + configs.osVersionMin KonanTarget.MACOS_X64 -> "x86_64-apple-macosx" + configs.osVersionMin + KonanTarget.MACOS_ARM64 -> "arm64-apple-macos" + configs.osVersionMin KonanTarget.WATCHOS_X86 -> "i386-apple-watchos" + configs.osVersionMin KonanTarget.WATCHOS_X64 -> "x86_64-apple-watchos" + configs.osVersionMin else -> throw IllegalStateException("Test target $target is not supported") diff --git a/kotlin-native/gradle.properties b/kotlin-native/gradle.properties index 2a24dff6d16..73c19670fa6 100644 --- a/kotlin-native/gradle.properties +++ b/kotlin-native/gradle.properties @@ -15,16 +15,16 @@ # # A version of the Kotlin compiler that is used to build Kotlin/Native. -buildKotlinVersion=1.5.0-dev-2205 -buildKotlinCompilerRepo=https://teamcity.jetbrains.com/guestAuth/app/rest/builds/buildType:(id:Kotlin_KotlinPublic_Compiler),number:1.5.0-dev-2205,branch:default:any,pinned:true/artifacts/content/maven +buildKotlinVersion=1.5.20-dev-372 +buildKotlinCompilerRepo=https://teamcity.jetbrains.com/guestAuth/app/rest/builds/buildType:(id:Kotlin_KotlinPublic_Compiler),number:1.5.20-dev-372,branch:default:any,pinned:true/artifacts/content/maven remoteRoot=konan_tests -kotlinCompilerRepo=https://teamcity.jetbrains.com/guestAuth/app/rest/builds/buildType:(id:Kotlin_KotlinPublic_Compiler),number:1.5.20-dev-60,branch:default:any,pinned:true/artifacts/content/maven -kotlinVersion=1.5.20-dev-60 -kotlinStdlibRepo=https://teamcity.jetbrains.com/guestAuth/app/rest/builds/buildType:(id:Kotlin_KotlinPublic_Compiler),number:1.5.20-dev-60,branch:default:any,pinned:true/artifacts/content/maven -kotlinStdlibVersion=1.5.20-dev-60 -kotlinStdlibTestsVersion=1.5.20-dev-60 -testKotlinCompilerVersion=1.5.20-dev-60 -konanVersion=1.5.0 +kotlinCompilerRepo=https://teamcity.jetbrains.com/guestAuth/app/rest/builds/buildType:(id:Kotlin_KotlinPublic_Compiler),number:1.5.20-dev-372,branch:default:any,pinned:true/artifacts/content/maven +kotlinVersion=1.5.20-dev-372 +kotlinStdlibRepo=https://teamcity.jetbrains.com/guestAuth/app/rest/builds/buildType:(id:Kotlin_KotlinPublic_Compiler),number:1.5.20-dev-372,branch:default:any,pinned:true/artifacts/content/maven +kotlinStdlibVersion=1.5.20-dev-372 +kotlinStdlibTestsVersion=1.5.20-dev-372 +testKotlinCompilerVersion=1.5.20-dev-372 +konanVersion=1.5.20 # A version of Xcode required to build the Kotlin/Native compiler. xcodeMajorVersion=12 diff --git a/kotlin-native/konan/konan.properties b/kotlin-native/konan/konan.properties index 2b19c73ef88..152be800d67 100644 --- a/kotlin-native/konan/konan.properties +++ b/kotlin-native/konan/konan.properties @@ -111,6 +111,34 @@ target-toolchain-xcode_12_2-macos_x64.default = \ xcode-addon-xcode_12_2-macos_x64.default = \ remote:internal +# macOS Apple Silicon +targetToolchain.macos_x64-macos_arm64 = target-toolchain-xcode_12_2-macos_x64 +arch.macos_arm64 = arm64 +targetSysRoot.macos_arm64 = target-sysroot-xcode_12_2-macos_x64 +# TODO: Check Clang behaviour. +targetCpu.macos_arm64 = cyclone +clangFlags.macos_arm64 = -cc1 -emit-obj -disable-llvm-passes -x ir +clangNooptFlags.macos_arm64 = -O1 +clangOptFlags.macos_arm64 = -O3 +# See clangDebugFlags.ios_arm64 +# TODO: Is it still necessary? +clangDebugFlags.macos_arm64 = -O0 -mllvm -fast-isel=false -mllvm -global-isel=false + +linkerKonanFlags.macos_arm64 = -lSystem -lc++ -lobjc -framework Foundation -sdk_version 11.0.1 +linkerOptimizationFlags.macos_arm64 = -dead_strip +linkerNoDebugFlags.macos_arm64 = -S +linkerDynamicFlags.macos_arm64 = -dylib + +osVersionMinFlagLd.macos_arm64 = -macosx_version_min +osVersionMinFlagClang.macos_arm64 = -mmacosx-version-min +osVersionMin.macos_arm64 = 11.0 +runtimeDefinitions.macos_arm64 = KONAN_OSX=1 KONAN_MACOSX=1 KONAN_ARM64=1 KONAN_OBJC_INTEROP=1 \ + KONAN_CORE_SYMBOLICATION=1 KONAN_HAS_CXX11_EXCEPTION_FUNCTIONS=1 +dependencies.macos_x64-macos_arm64 = \ + libffi-3.2.1-3-darwin-macos + +target-sysroot-xcode_12_2-macos_arm64.default = \ + remote:internal # Apple's 32-bit iOS. targetToolchain.macos_x64-ios_arm32 = target-toolchain-xcode_12_2-macos_x64 diff --git a/kotlin-native/platformLibs/src/platform/osx/Hypervisor.def b/kotlin-native/platformLibs/src/platform/osx/Hypervisor.def index e1678dd7b18..052ef35ff92 100644 --- a/kotlin-native/platformLibs/src/platform/osx/Hypervisor.def +++ b/kotlin-native/platformLibs/src/platform/osx/Hypervisor.def @@ -1,4 +1,4 @@ -depends = darwin posix +depends = darwin osx posix language = Objective-C package = platform.Hypervisor diff --git a/kotlin-native/platformLibs/src/platform/osx/darwin.def b/kotlin-native/platformLibs/src/platform/osx/darwin.def index 0c1da24ad94..767e0251a8b 100644 --- a/kotlin-native/platformLibs/src/platform/osx/darwin.def +++ b/kotlin-native/platformLibs/src/platform/osx/darwin.def @@ -26,6 +26,7 @@ headers = AppleTextureEncoder.h AssertMacros.h Availability.h AvailabilityIntern os/activity.h os/availability.h os/base.h os/lock.h \ os/log.h os/object.h os/overflow.h os/signpost.h os/trace.h \ simd/simd.h sys/sysctl.h sys/user.h \ + sys/_types/_os_inline.h \ net/if_media.h sys/disk.h sys/kernel_types.h headerFilter = ** @@ -39,5 +40,6 @@ excludedFunctions = __tg_promote KERNEL_AUDIT_TOKEN KERNEL_SECURITY_TOKEN \ xpc_debugger_api_misuse_info \ vm_stats -compilerOpts = -D_XOPEN_SOURCE -DSHARED_LIBBIND -D_DARWIN_NO_64_BIT_INODE -DSYSCTL_DEF_ENABLED +compilerOpts.macos_x64 = -D_XOPEN_SOURCE -DSHARED_LIBBIND -D_DARWIN_NO_64_BIT_INODE -DSYSCTL_DEF_ENABLED +compilerOpts.macos_arm64 = -D_XOPEN_SOURCE -DSHARED_LIBBIND -DSYSCTL_DEF_ENABLED linkerOpts = -ldl -lz -lcurses -lbz2 -lcompression -late -lbsm diff --git a/kotlin-native/platformLibs/src/platform/osx/osx.def b/kotlin-native/platformLibs/src/platform/osx/osx.def index 27ea2f18600..43758369056 100644 --- a/kotlin-native/platformLibs/src/platform/osx/osx.def +++ b/kotlin-native/platformLibs/src/platform/osx/osx.def @@ -1,17 +1,18 @@ depends = darwin posix language = Objective-C package = platform.osx + headers = NSSystemDirectories.h \ aliasdb.h bootparams.h bootstrap.h \ com_err.h \ crt_externs.h \ disktab.h dtrace.h \ - emmintrin.h eti.h expat.h \ + eti.h expat.h \ expat_external.h form.h fsproperties.h get_compat.h \ gssapi.h histedit.h \ krb5.h launch.h lber.h lber_types.h ldif.h libc.h libcharset.h \ libproc.h localcharset.h \ - mmintrin.h monitor.h \ + monitor.h \ nc_tparm.h ncurses.h ncurses_dll.h \ nlist.h \ panel.h pcap-bpf.h pcap-namedb.h pcap.h printerdb.h \ @@ -20,10 +21,15 @@ headers = NSSystemDirectories.h \ struct.h term.h \ term_entry.h termcap.h tic.h timeconv.h tzfile.h \ unctrl.h vproc.h \ - xmmintrin.h \ atm/atm_types.h corpses/task_corpse.h \ hfs/hfs_format.h hfs/hfs_mount.h hfs/hfs_unistr.h \ sys/kauth.h +headers.macos_x64 = \ + emmintrin.h \ + mmintrin.h \ + xmmintrin.h +headers.macos_arm64 = \ + arm64/hv/hv_kern_types.h headerFilter = ** diff --git a/kotlin-native/platformLibs/src/platform/osx/posix.def b/kotlin-native/platformLibs/src/platform/osx/posix.def index 7644686fdc7..0ef6b0ba2b9 100644 --- a/kotlin-native/platformLibs/src/platform/osx/posix.def +++ b/kotlin-native/platformLibs/src/platform/osx/posix.def @@ -13,7 +13,8 @@ headers = alloca.h ar.h assert.h complex.h ctype.h dirent.h dlfcn.h err.h errno. sys/queue.h sys/select.h sys/shm.h sys/socket.h sys/stat.h \ sys/syslimits.h sys/time.h sys/times.h sys/utsname.h sys/wait.h -compilerOpts = -D_XOPEN_SOURCE -DSHARED_LIBBIND -D_DARWIN_NO_64_BIT_INODE -D_DARWIN_C_SOURCE +compilerOpts.macos_x64 = -D_XOPEN_SOURCE -DSHARED_LIBBIND -D_DARWIN_NO_64_BIT_INODE -D_DARWIN_C_SOURCE +compilerOpts.macos_arm64 = -D_XOPEN_SOURCE -DSHARED_LIBBIND -D_DARWIN_C_SOURCE # -D_ANSI_SOURCE, sigh, breaks user_addr_t excludedFunctions = KERNEL_AUDIT_TOKEN KERNEL_SECURITY_TOKEN add_profil \ addrsel_policy_init \ diff --git a/kotlin-native/platformLibs/src/platform/osx/set_depends.sh b/kotlin-native/platformLibs/src/platform/osx/set_depends.sh index 4e6c366dfd1..6cf39c1c265 100755 --- a/kotlin-native/platformLibs/src/platform/osx/set_depends.sh +++ b/kotlin-native/platformLibs/src/platform/osx/set_depends.sh @@ -1,2 +1,2 @@ #!/bin/bash -../../../../dist/bin/run_konan defFileDependencies -target macos_x64 *.def +../../../../dist/bin/run_konan defFileDependencies -target macos_x64 -target macos_arm64 *.def diff --git a/kotlin-native/runtime/src/main/cpp/Atomic.cpp b/kotlin-native/runtime/src/main/cpp/Atomic.cpp index 5f059b8a956..40058aeaed6 100644 --- a/kotlin-native/runtime/src/main/cpp/Atomic.cpp +++ b/kotlin-native/runtime/src/main/cpp/Atomic.cpp @@ -176,6 +176,10 @@ KNativePtr Kotlin_AtomicNativePtr_get(KRef thiz) { } void Kotlin_AtomicReference_checkIfFrozen(KRef value) { + if (CurrentMemoryModel == MemoryModel::kExperimental) { + // TODO: Remove when freezing is implemented. + return; + } if (value != nullptr && !isPermanentOrFrozen(value)) { ThrowInvalidMutabilityException(value); } diff --git a/kotlin-native/runtime/src/main/cpp/KAssert.h b/kotlin-native/runtime/src/main/cpp/KAssert.h index 80e1edf0df0..9faef6db717 100644 --- a/kotlin-native/runtime/src/main/cpp/KAssert.h +++ b/kotlin-native/runtime/src/main/cpp/KAssert.h @@ -80,4 +80,11 @@ extern "C" const int KonanNeedDebugInfo; ::internal::TODOImpl(CURRENT_SOURCE_LOCATION, ##__VA_ARGS__); \ } while (false) +// Use RuntimeFail() to unconditionally fail, signifying compiler/runtime bug. +// TODO: Consider using `CURRENT_SOURCE_LOCATION` when `KonanNeedDebugInfo` is `true`. +#define RuntimeFail(format, ...) \ + do { \ + RuntimeAssertFailed(nullptr, format, ##__VA_ARGS__); \ + } while (false) + #endif // RUNTIME_ASSERT_H diff --git a/kotlin-native/runtime/src/main/cpp/Memory.h b/kotlin-native/runtime/src/main/cpp/Memory.h index dd5e7067212..fe767630995 100644 --- a/kotlin-native/runtime/src/main/cpp/Memory.h +++ b/kotlin-native/runtime/src/main/cpp/Memory.h @@ -85,6 +85,8 @@ struct ObjHeader { return hasPointerBits(typeInfoOrMeta_, OBJECT_TAG_PERMANENT_CONTAINER); } + inline bool heap() const { return getPointerBits(typeInfoOrMeta_, OBJECT_TAG_MASK) == 0; } + static MetaObjHeader* createMetaObject(ObjHeader* object); static void destroyMetaObject(ObjHeader* object); }; diff --git a/kotlin-native/runtime/src/main/cpp/ObjCExport.mm b/kotlin-native/runtime/src/main/cpp/ObjCExport.mm index 9988eaf427a..795d1a91b94 100644 --- a/kotlin-native/runtime/src/main/cpp/ObjCExport.mm +++ b/kotlin-native/runtime/src/main/cpp/ObjCExport.mm @@ -902,6 +902,8 @@ static const TypeInfo* createTypeInfo(Class clazz, const TypeInfo* superType, co } }; + // Compiler relies on using reverse adapters here from all supertypes + // in [ObjCExportCodeGenerator.createReverseAdapters]. for (const TypeInfo* t : supers) { const ObjCTypeAdapter* typeAdapter = getTypeAdapter(t); if (typeAdapter == nullptr) continue; @@ -921,6 +923,8 @@ static const TypeInfo* createTypeInfo(Class clazz, const TypeInfo* superType, co } } + // Compiler relies on using reverse adapters here from all supertypes + // in [ObjCExportCodeGenerator.createReverseAdapters]. for (const TypeInfo* typeInfo : addedInterfaces) { const ObjCTypeAdapter* typeAdapter = getTypeAdapter(typeInfo); diff --git a/kotlin-native/runtime/src/main/cpp/Runtime.cpp b/kotlin-native/runtime/src/main/cpp/Runtime.cpp index 84b0cafa181..2e44c794952 100644 --- a/kotlin-native/runtime/src/main/cpp/Runtime.cpp +++ b/kotlin-native/runtime/src/main/cpp/Runtime.cpp @@ -120,6 +120,9 @@ RuntimeState* initRuntime() { RuntimeAssert(lastStatus != kGlobalRuntimeShutdown, "Kotlin runtime was shut down. Cannot create new runtimes."); } firstRuntime = lastStatus == kGlobalRuntimeUninitialized; + if (CurrentMemoryModel == MemoryModel::kExperimental) { + RuntimeCheck(firstRuntime, "Experimental MM does not support multiple mutator threads yet"); + } result->memoryState = InitMemory(firstRuntime); result->worker = WorkerInit(true); } @@ -186,7 +189,7 @@ void AppendToInitializersTail(InitNode *next) { initTailNode = next; } -void Kotlin_initRuntimeIfNeeded() { +RUNTIME_NOTHROW void Kotlin_initRuntimeIfNeeded() { if (!isValidRuntime()) { initRuntime(); // Register runtime deinit function at thread cleanup. diff --git a/kotlin-native/runtime/src/main/cpp/Runtime.h b/kotlin-native/runtime/src/main/cpp/Runtime.h index d5779db9b10..1f420e714d2 100644 --- a/kotlin-native/runtime/src/main/cpp/Runtime.h +++ b/kotlin-native/runtime/src/main/cpp/Runtime.h @@ -33,7 +33,7 @@ enum DestroyRuntimeMode { DestroyRuntimeMode Kotlin_getDestroyRuntimeMode(); -void Kotlin_initRuntimeIfNeeded(); +RUNTIME_NOTHROW void Kotlin_initRuntimeIfNeeded(); void Kotlin_deinitRuntimeIfNeeded(); // Can only be called once. diff --git a/kotlin-native/runtime/src/main/cpp/polyhash/common.h b/kotlin-native/runtime/src/main/cpp/polyhash/common.h index 5ed9302dbdc..8bb7b93f54b 100644 --- a/kotlin-native/runtime/src/main/cpp/polyhash/common.h +++ b/kotlin-native/runtime/src/main/cpp/polyhash/common.h @@ -39,10 +39,6 @@ constexpr std::array RepeatingPowers(uint32_t base, uint8_t exp return result; } -#if defined(__x86_64__) or defined(__i386__) -#pragma clang attribute push (__attribute__((target("avx2"))), apply_to=function) -#endif - template ALWAYS_INLINE void polyHashTail(int& n, uint16_t const*& str, typename Traits::Vec128Type& res, uint32_t const* b, uint32_t const* p) { using VecType = typename Traits::VecType; @@ -194,8 +190,4 @@ ALWAYS_INLINE void polyHashUnroll8(int& n, uint16_t const*& str, typename Traits res = Traits::vec128Add(res, Traits::vec128Add(sum1, sum2)); } -#if defined(__x86_64__) or defined(__i386__) -#pragma clang attribute pop -#endif - #endif // RUNTIME_POLYHASH_COMMON_H diff --git a/kotlin-native/runtime/src/main/cpp/polyhash/x86.cpp b/kotlin-native/runtime/src/main/cpp/polyhash/x86.cpp index 406a33fccb9..189fa649c1a 100644 --- a/kotlin-native/runtime/src/main/cpp/polyhash/x86.cpp +++ b/kotlin-native/runtime/src/main/cpp/polyhash/x86.cpp @@ -8,9 +8,10 @@ #if defined(__x86_64__) or defined(__i386__) -#include +#define __SSE41__ __attribute__((target("sse4.1"))) +#define __AVX2__ __attribute__((target("avx2"))) -#pragma clang attribute push (__attribute__((target("avx2"))), apply_to=function) +#include namespace { @@ -26,24 +27,24 @@ struct SSETraits { using Vec128Type = __m128i; using U16VecType = __m128i; - ALWAYS_INLINE static VecType initVec() { return _mm_setzero_si128(); } - ALWAYS_INLINE static Vec128Type initVec128() { return _mm_setzero_si128(); } - ALWAYS_INLINE static int vec128toInt(Vec128Type x) { return _mm_cvtsi128_si32(x); } - ALWAYS_INLINE static VecType u16Load(U16VecType x) { return _mm_cvtepu16_epi32(x); } - ALWAYS_INLINE static Vec128Type vec128Mul(Vec128Type x, Vec128Type y) { return _mm_mullo_epi32(x, y); } - ALWAYS_INLINE static Vec128Type vec128Add(Vec128Type x, Vec128Type y) { return _mm_add_epi32(x, y); } - ALWAYS_INLINE static VecType vecMul(VecType x, VecType y) { return _mm_mullo_epi32(x, y); } - ALWAYS_INLINE static VecType vecAdd(VecType x, VecType y) { return _mm_add_epi32(x, y); } - ALWAYS_INLINE static Vec128Type squash2(VecType x, VecType y) { + __SSE41__ static VecType initVec() { return _mm_setzero_si128(); } + __SSE41__ static Vec128Type initVec128() { return _mm_setzero_si128(); } + __SSE41__ static int vec128toInt(Vec128Type x) { return _mm_cvtsi128_si32(x); } + __SSE41__ static VecType u16Load(U16VecType x) { return _mm_cvtepu16_epi32(x); } + __SSE41__ static Vec128Type vec128Mul(Vec128Type x, Vec128Type y) { return _mm_mullo_epi32(x, y); } + __SSE41__ static Vec128Type vec128Add(Vec128Type x, Vec128Type y) { return _mm_add_epi32(x, y); } + __SSE41__ static VecType vecMul(VecType x, VecType y) { return _mm_mullo_epi32(x, y); } + __SSE41__ static VecType vecAdd(VecType x, VecType y) { return _mm_add_epi32(x, y); } + __SSE41__ static Vec128Type squash2(VecType x, VecType y) { return squash1(_mm_hadd_epi32(x, y)); // [x0 + x1, x2 + x3, y0 + y1, y2 + y3] } - ALWAYS_INLINE static Vec128Type squash1(VecType z) { + __SSE41__ static Vec128Type squash1(VecType z) { VecType sum = _mm_hadd_epi32(z, z); // [z0 + z1, z2 + z3, z0 + z1, z2 + z3] return _mm_hadd_epi32(sum, sum); // [z0..3, same, same, same] } - static int polyHashUnalignedUnrollUpTo8(int n, uint16_t const* str) { + __SSE41__ static int polyHashUnalignedUnrollUpTo8(int n, uint16_t const* str) { Vec128Type res = initVec128(); polyHashUnroll2(n, str, res, &b8[0], &p64[56]); @@ -52,7 +53,7 @@ struct SSETraits { return vec128toInt(res); } - static int polyHashUnalignedUnrollUpTo16(int n, uint16_t const* str) { + __SSE41__ static int polyHashUnalignedUnrollUpTo16(int n, uint16_t const* str) { Vec128Type res = initVec128(); polyHashUnroll4(n, str, res, &b16[0], &p64[48]); @@ -68,19 +69,19 @@ struct AVX2Traits { using Vec128Type = __m128i; using U16VecType = __m128i; - ALWAYS_INLINE static VecType initVec() { return _mm256_setzero_si256(); } - ALWAYS_INLINE static Vec128Type initVec128() { return _mm_setzero_si128(); } - ALWAYS_INLINE static int vec128toInt(Vec128Type x) { return _mm_cvtsi128_si32(x); } - ALWAYS_INLINE static VecType u16Load(U16VecType x) { return _mm256_cvtepu16_epi32(x); } - ALWAYS_INLINE static Vec128Type vec128Mul(Vec128Type x, Vec128Type y) { return _mm_mullo_epi32(x, y); } - ALWAYS_INLINE static Vec128Type vec128Add(Vec128Type x, Vec128Type y) { return _mm_add_epi32(x, y); } - ALWAYS_INLINE static VecType vecMul(VecType x, VecType y) { return _mm256_mullo_epi32(x, y); } - ALWAYS_INLINE static VecType vecAdd(VecType x, VecType y) { return _mm256_add_epi32(x, y); } - ALWAYS_INLINE static Vec128Type squash2(VecType x, VecType y) { + __AVX2__ static VecType initVec() { return _mm256_setzero_si256(); } + __AVX2__ static Vec128Type initVec128() { return _mm_setzero_si128(); } + __AVX2__ static int vec128toInt(Vec128Type x) { return _mm_cvtsi128_si32(x); } + __AVX2__ static VecType u16Load(U16VecType x) { return _mm256_cvtepu16_epi32(x); } + __AVX2__ static Vec128Type vec128Mul(Vec128Type x, Vec128Type y) { return _mm_mullo_epi32(x, y); } + __AVX2__ static Vec128Type vec128Add(Vec128Type x, Vec128Type y) { return _mm_add_epi32(x, y); } + __AVX2__ static VecType vecMul(VecType x, VecType y) { return _mm256_mullo_epi32(x, y); } + __AVX2__ static VecType vecAdd(VecType x, VecType y) { return _mm256_add_epi32(x, y); } + __AVX2__ static Vec128Type squash2(VecType x, VecType y) { return squash1(_mm256_hadd_epi32(x, y)); // [x0 + x1, x2 + x3, y0 + y1, y2 + y3, x4 + x5, x6 + x7, y4 + y5, y6 + y7] } - ALWAYS_INLINE static Vec128Type squash1(VecType z) { + __AVX2__ static Vec128Type squash1(VecType z) { VecType sum = _mm256_hadd_epi32(z, z); // [z0 + z1, z2 + z3, z0 + z1, z2 + z3, z4 + z5, z6 + z7, z4 + z5, z6 + z7] sum = _mm256_hadd_epi32(sum, sum); // [z0..3, z0..3, z0..3, z0..3, z4..7, z4..7, z4..7, z4..7] Vec128Type lo = _mm256_extracti128_si256(sum, 0); // [z0..3, same, same, same] @@ -88,7 +89,7 @@ struct AVX2Traits { return _mm_add_epi32(lo, hi); // [z0..7, same, same, same] } - static int polyHashUnalignedUnrollUpTo16(int n, uint16_t const* str) { + __AVX2__ static int polyHashUnalignedUnrollUpTo16(int n, uint16_t const* str) { Vec128Type res = initVec128(); polyHashUnroll2(n, str, res, &b16[0], &p64[48]); @@ -98,7 +99,7 @@ struct AVX2Traits { return vec128toInt(res); } - static int polyHashUnalignedUnrollUpTo32(int n, uint16_t const* str) { + __AVX2__ static int polyHashUnalignedUnrollUpTo32(int n, uint16_t const* str) { Vec128Type res = initVec128(); polyHashUnroll4(n, str, res, &b32[0], &p64[32]); @@ -109,7 +110,7 @@ struct AVX2Traits { return vec128toInt(res); } - static int polyHashUnalignedUnrollUpTo64(int n, uint16_t const* str) { + __AVX2__ static int polyHashUnalignedUnrollUpTo64(int n, uint16_t const* str) { Vec128Type res = initVec128(); polyHashUnroll8(n, str, res, &b64[0], &p64[0]); @@ -128,8 +129,8 @@ struct AVX2Traits { const bool x64 = false; #endif bool initialized = false; - bool sseSupported; - bool avx2Supported; + bool sseSupported = false; + bool avx2Supported = false; } @@ -161,6 +162,4 @@ int polyHash_x86(int length, uint16_t const* str) { return res; } -#pragma clang attribute pop - #endif diff --git a/kotlin-native/runtime/src/main/kotlin/kotlin/native/Runtime.kt b/kotlin-native/runtime/src/main/kotlin/kotlin/native/Runtime.kt index 4722db26c4f..28e4c74872d 100644 --- a/kotlin-native/runtime/src/main/kotlin/kotlin/native/Runtime.kt +++ b/kotlin-native/runtime/src/main/kotlin/kotlin/native/Runtime.kt @@ -45,7 +45,7 @@ public typealias ReportUnhandledExceptionHook = Function1 * with custom exception hooks. */ public fun setUnhandledExceptionHook(hook: ReportUnhandledExceptionHook): ReportUnhandledExceptionHook? { - if (!hook.isFrozen) { + if (Platform.memoryModel != MemoryModel.EXPERIMENTAL && !hook.isFrozen) { throw InvalidMutabilityException("Unhandled exception hook must be frozen") } return setUnhandledExceptionHook0(hook) diff --git a/kotlin-native/runtime/src/main/kotlin/kotlin/native/internal/test/TestRunner.kt b/kotlin-native/runtime/src/main/kotlin/kotlin/native/internal/test/TestRunner.kt index 91a81e18a04..97ecbcd482e 100644 --- a/kotlin-native/runtime/src/main/kotlin/kotlin/native/internal/test/TestRunner.kt +++ b/kotlin-native/runtime/src/main/kotlin/kotlin/native/internal/test/TestRunner.kt @@ -16,7 +16,6 @@ internal class TestRunner(val suites: List, args: Array) { private var logger: TestLogger = GTestLogger() private var runTests = true private var useExitCode = true - private var reportExcludedTestSuites = true var iterations = 1 private set var exitCode = 0 @@ -38,7 +37,6 @@ internal class TestRunner(val suites: List, args: Array) { logger.log(help); runTests = false } "--ktest_no_exit_code" -> useExitCode = false - "--ktest_no_excluded_test_suites" -> reportExcludedTestSuites = false else -> throw IllegalArgumentException("Unknown option: $it\n$help") } 2 -> { @@ -219,9 +217,6 @@ internal class TestRunner(val suites: List, args: Array) { |--ktest_logger=GTEST|TEAMCITY|SIMPLE|SILENT - Use the specified output format. The default one is GTEST. | |--ktest_no_exit_code - Don't return a non-zero exit code if there are failing tests. - | - |--ktest_no_excluded_test_suites - Don't report test suites that don't match the filter. - | Has no effect when filter is not specified. """.trimMargin() private inline fun sendToListeners(event: TestListener.() -> Unit) { @@ -230,6 +225,15 @@ internal class TestRunner(val suites: List, args: Array) { } private fun TestSuite.run() { + // Do not run @BeforeClass/@AfterClass hooks if all test cases are ignored. + if (testCases.values.all { it.ignored }) { + testCases.values.forEach { testCase -> + sendToListeners { ignore(testCase) } + } + return + } + + // Normal path: run all hooks and execute test cases. doBeforeClass() testCases.values.forEach { testCase -> if (testCase.ignored) { @@ -257,10 +261,12 @@ internal class TestRunner(val suites: List, args: Array) { val iterationTime = measureTimeMillis { suitesFiltered.forEach { if (it.ignored) { - if (reportExcludedTestSuites) { - sendToListeners { ignoreSuite(it) } - } + sendToListeners { ignoreSuite(it) } } else { + // Do not run filtered out suites. + if (it.size == 0) { + return@forEach + } sendToListeners { startSuite(it) } val time = measureTimeMillis { it.run() } sendToListeners { finishSuite(it, time) } diff --git a/kotlin-native/runtime/src/mm/cpp/GC.hpp b/kotlin-native/runtime/src/mm/cpp/GC.hpp new file mode 100644 index 00000000000..83e1c3b2649 --- /dev/null +++ b/kotlin-native/runtime/src/mm/cpp/GC.hpp @@ -0,0 +1,22 @@ +/* + * Copyright 2010-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license + * that can be found in the LICENSE file. + */ + +#ifndef RUNTIME_MM_GC_H +#define RUNTIME_MM_GC_H + +#include "gc/NoOpGC.hpp" + +namespace kotlin { +namespace mm { + +// TODO: GC should be extracted into a separate module, so that we can do different GCs without +// the need to redo the entire MM. For now changing GCs can be done by modifying `using` below. + +using GC = NoOpGC; + +} // namespace mm +} // namespace kotlin + +#endif // RUNTIME_MM_GC_H diff --git a/kotlin-native/runtime/src/mm/cpp/GlobalData.hpp b/kotlin-native/runtime/src/mm/cpp/GlobalData.hpp index cc06903da16..6cc47c09c69 100644 --- a/kotlin-native/runtime/src/mm/cpp/GlobalData.hpp +++ b/kotlin-native/runtime/src/mm/cpp/GlobalData.hpp @@ -8,6 +8,7 @@ #include "ObjectFactory.hpp" #include "GlobalsRegistry.hpp" +#include "GC.hpp" #include "StableRefRegistry.hpp" #include "ThreadRegistry.hpp" #include "Utils.hpp" @@ -23,7 +24,8 @@ public: ThreadRegistry& threadRegistry() noexcept { return threadRegistry_; } GlobalsRegistry& globalsRegistry() noexcept { return globalsRegistry_; } StableRefRegistry& stableRefRegistry() noexcept { return stableRefRegistry_; } - ObjectFactory& objectFactory() noexcept { return objectFactory_; } + ObjectFactory& objectFactory() noexcept { return objectFactory_; } + GC& gc() noexcept { return gc_; } private: GlobalData(); @@ -34,7 +36,8 @@ private: ThreadRegistry threadRegistry_; GlobalsRegistry globalsRegistry_; StableRefRegistry stableRefRegistry_; - ObjectFactory objectFactory_; + ObjectFactory objectFactory_; + GC gc_; }; } // namespace mm diff --git a/kotlin-native/runtime/src/mm/cpp/GlobalsRegistry.hpp b/kotlin-native/runtime/src/mm/cpp/GlobalsRegistry.hpp index b4f4c254929..8e6c9754e52 100644 --- a/kotlin-native/runtime/src/mm/cpp/GlobalsRegistry.hpp +++ b/kotlin-native/runtime/src/mm/cpp/GlobalsRegistry.hpp @@ -26,6 +26,9 @@ public: using Iterator = MultiSourceQueue::Iterator; + GlobalsRegistry(); + ~GlobalsRegistry(); + static GlobalsRegistry& Instance() noexcept; void RegisterStorageForGlobal(mm::ThreadData* threadData, ObjHeader** location) noexcept; @@ -41,11 +44,6 @@ public: Iterable Iter() noexcept { return globals_.Iter(); } private: - friend class GlobalData; - - GlobalsRegistry(); - ~GlobalsRegistry(); - // TODO: Add-only MultiSourceQueue can be made more efficient. Measure, if it's a problem. MultiSourceQueue globals_; }; diff --git a/kotlin-native/runtime/src/mm/cpp/Memory.cpp b/kotlin-native/runtime/src/mm/cpp/Memory.cpp index f07c9bead4c..ddab007b465 100644 --- a/kotlin-native/runtime/src/mm/cpp/Memory.cpp +++ b/kotlin-native/runtime/src/mm/cpp/Memory.cpp @@ -95,6 +95,10 @@ void ObjHeader::destroyMetaObject(ObjHeader* object) { mm::ExtraObjectData::Uninstall(object); } +ALWAYS_INLINE bool isPermanentOrFrozen(const ObjHeader* obj) { + return obj->permanent() || isFrozen(obj); +} + ALWAYS_INLINE bool isShareable(const ObjHeader* obj) { // TODO: Remove when legacy MM is gone. return true; @@ -140,7 +144,10 @@ extern "C" ALWAYS_INLINE OBJ_GETTER(InitSingleton, ObjHeader** location, const T extern "C" RUNTIME_NOTHROW void InitAndRegisterGlobal(ObjHeader** location, const ObjHeader* initialValue) { auto* threadData = mm::ThreadRegistry::Instance().CurrentThreadData(); mm::GlobalsRegistry::Instance().RegisterStorageForGlobal(threadData, location); - mm::SetHeapRef(location, const_cast(initialValue)); + // Null `initialValue` means that the appropriate value was already set by static initialization. + if (initialValue != nullptr) { + mm::SetHeapRef(location, const_cast(initialValue)); + } } extern "C" const MemoryModel CurrentMemoryModel = MemoryModel::kExperimental; @@ -246,6 +253,11 @@ extern "C" RUNTIME_NOTHROW void GC_CollectorCallback(void* worker) { // Nothing to do } +extern "C" void Kotlin_native_internal_GC_collect(ObjHeader*) { + auto* threadData = mm::ThreadRegistry::Instance().CurrentThreadData(); + threadData->gc().PerformFullGC(); +} + extern "C" void Kotlin_native_internal_GC_collectCyclic(ObjHeader*) { // TODO: Remove when legacy MM is gone. ThrowIllegalArgumentException(); @@ -282,29 +294,45 @@ extern "C" void Kotlin_Any_share(ObjHeader* thiz) { // Nothing to do } +extern "C" RUNTIME_NOTHROW void PerformFullGC(MemoryState* memory) { + GetThreadData(memory)->gc().PerformFullGC(); +} + extern "C" RUNTIME_NOTHROW bool ClearSubgraphReferences(ObjHeader* root, bool checked) { // TODO: Remove when legacy MM is gone. return true; } extern "C" RUNTIME_NOTHROW void* CreateStablePointer(ObjHeader* object) { + if (!object) + return nullptr; + auto* threadData = mm::ThreadRegistry::Instance().CurrentThreadData(); return mm::StableRefRegistry::Instance().RegisterStableRef(threadData, object); } extern "C" RUNTIME_NOTHROW void DisposeStablePointer(void* pointer) { + if (!pointer) + return; + auto* threadData = mm::ThreadRegistry::Instance().CurrentThreadData(); auto* node = static_cast(pointer); mm::StableRefRegistry::Instance().UnregisterStableRef(threadData, node); } extern "C" RUNTIME_NOTHROW OBJ_GETTER(DerefStablePointer, void* pointer) { + if (!pointer) + RETURN_OBJ(nullptr); + auto* node = static_cast(pointer); ObjHeader* object = **node; RETURN_OBJ(object); } extern "C" RUNTIME_NOTHROW OBJ_GETTER(AdoptStablePointer, void* pointer) { + if (!pointer) + RETURN_OBJ(nullptr); + auto* threadData = mm::ThreadRegistry::Instance().CurrentThreadData(); auto* node = static_cast(pointer); ObjHeader* object = **node; @@ -347,7 +375,22 @@ extern "C" void AdoptReferenceFromSharedVariable(ObjHeader* object) { // Nothing to do. } -void CheckGlobalsAccessible() { +extern "C" void CheckGlobalsAccessible() { // TODO: Remove when legacy MM is gone. // Always accessible } + +extern "C" RUNTIME_NOTHROW void Kotlin_mm_safePointFunctionEpilogue() { + auto* threadData = mm::ThreadRegistry::Instance().CurrentThreadData(); + threadData->gc().SafePointFunctionEpilogue(); +} + +extern "C" RUNTIME_NOTHROW void Kotlin_mm_safePointWhileLoopBody() { + auto* threadData = mm::ThreadRegistry::Instance().CurrentThreadData(); + threadData->gc().SafePointLoopBody(); +} + +extern "C" RUNTIME_NOTHROW void Kotlin_mm_safePointExceptionUnwind() { + auto* threadData = mm::ThreadRegistry::Instance().CurrentThreadData(); + threadData->gc().SafePointExceptionUnwind(); +} diff --git a/kotlin-native/runtime/src/mm/cpp/ObjectFactory.cpp b/kotlin-native/runtime/src/mm/cpp/ObjectFactory.cpp deleted file mode 100644 index 33b6bb9b497..00000000000 --- a/kotlin-native/runtime/src/mm/cpp/ObjectFactory.cpp +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright 2010-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license - * that can be found in the LICENSE file. - */ - -#include "ObjectFactory.hpp" - -#include "Alignment.hpp" -#include "Alloc.h" -#include "GlobalData.hpp" -#include "Types.h" - -using namespace kotlin; - -ObjHeader* mm::ObjectFactory::ThreadQueue::CreateObject(const TypeInfo* typeInfo) noexcept { - RuntimeAssert(!typeInfo->IsArray(), "Must not be an array"); - size_t allocSize = typeInfo->instanceSize_; - auto& node = producer_.Insert(allocSize); - auto* object = static_cast(node.Data()); - object->typeInfoOrMeta_ = const_cast(typeInfo); - return object; -} - -ArrayHeader* mm::ObjectFactory::ThreadQueue::CreateArray(const TypeInfo* typeInfo, uint32_t count) noexcept { - RuntimeAssert(typeInfo->IsArray(), "Must be an array"); - uint32_t arraySize = static_cast(-typeInfo->instanceSize_) * count; - // Note: array body is aligned, but for size computation it is enough to align the sum. - size_t allocSize = AlignUp(sizeof(ArrayHeader) + arraySize, kObjectAlignment); - auto& node = producer_.Insert(allocSize); - auto* array = static_cast(node.Data()); - array->typeInfoOrMeta_ = const_cast(typeInfo); - array->count_ = count; - return array; -} - -bool mm::ObjectFactory::Iterator::IsArray() noexcept { - // `ArrayHeader` and `ObjHeader` are kept compatible, so the former can - // be always casted to the other. - auto* object = static_cast((*iterator_).Data()); - return object->type_info()->IsArray(); -} - -ObjHeader* mm::ObjectFactory::Iterator::GetObjHeader() noexcept { - auto* object = static_cast((*iterator_).Data()); - RuntimeAssert(!object->type_info()->IsArray(), "Must not be an array"); - return object; -} - -ArrayHeader* mm::ObjectFactory::Iterator::GetArrayHeader() noexcept { - auto* array = static_cast((*iterator_).Data()); - RuntimeAssert(array->type_info()->IsArray(), "Must be an array"); - return array; -} - -mm::ObjectFactory::ObjectFactory() noexcept = default; -mm::ObjectFactory::~ObjectFactory() = default; - -// static -mm::ObjectFactory& mm::ObjectFactory::Instance() noexcept { - return GlobalData::Instance().objectFactory(); -} diff --git a/kotlin-native/runtime/src/mm/cpp/ObjectFactory.hpp b/kotlin-native/runtime/src/mm/cpp/ObjectFactory.hpp index 9cc78bdc59b..c9fe6e75879 100644 --- a/kotlin-native/runtime/src/mm/cpp/ObjectFactory.hpp +++ b/kotlin-native/runtime/src/mm/cpp/ObjectFactory.hpp @@ -25,12 +25,24 @@ namespace internal { // A queue that is constructed by collecting subqueues from several `Producer`s. // This is essentially a heterogeneous `MultiSourceQueue` on top of a singly linked list that -// uses `konanAllocMemory` and `konanFreeMemory` +// uses `Allocator` to allocate and free memory. // TODO: Consider merging with `MultiSourceQueue` somehow. -template +template class ObjectFactoryStorage : private Pinned { static_assert(IsValidAlignment(DataAlignment), "DataAlignment is not a valid alignment"); + template + class Deleter { + public: + void operator()(T* instance) noexcept { + instance->~T(); + Allocator::Free(instance); + } + }; + + template + using unique_ptr = std::unique_ptr>; + public: // This class does not know its size at compile-time. Does not inherit from `KonanAllocatorAware` because // in `KonanAllocatorAware::operator new(size_t size, KonanAllocTag)` `size` would be incorrect. @@ -40,6 +52,13 @@ public: public: ~Node() = default; + static Node& FromData(void* data) noexcept { + constexpr size_t kDataOffset = DataOffset(); + Node* node = reinterpret_cast(reinterpret_cast(data) - kDataOffset); + RuntimeAssert(node->Data() == data, "Node layout has broken"); + return *node; + } + // Note: This can only be trivially destructible data, as nobody can invoke its destructor. void* Data() noexcept { constexpr size_t kDataOffset = DataOffset(); @@ -59,37 +78,36 @@ public: Node() noexcept = default; - static KStdUniquePtr Create(size_t dataSize) noexcept { + static unique_ptr Create(Allocator& allocator, size_t dataSize) noexcept { size_t dataSizeAligned = AlignUp(dataSize, DataAlignment); size_t totalAlignment = std::max(alignof(Node), DataAlignment); size_t totalSize = AlignUp(sizeof(Node) + dataSizeAligned, totalAlignment); RuntimeAssert( DataOffset() + dataSize <= totalSize, "totalSize %zu is not enough to fit data %zu at offset %zu", totalSize, dataSize, DataOffset()); - void* ptr = konanAllocAlignedMemory(totalSize, totalAlignment); + void* ptr = allocator.Alloc(totalSize, totalAlignment); if (!ptr) { - // TODO: Try doing GC first. - konan::consoleErrorf("Out of memory trying to allocate %zu. Aborting.\n", totalSize); + konan::consoleErrorf("Out of memory trying to allocate %zu bytes. Aborting.\n", totalSize); konan::abort(); } RuntimeAssert(IsAligned(ptr, totalAlignment), "Allocator returned unaligned to %zu pointer %p", totalAlignment, ptr); - return KStdUniquePtr(new (ptr) Node()); + return unique_ptr(new (ptr) Node()); } - KStdUniquePtr next_; + unique_ptr next_; // There's some more data of an unknown (at compile-time) size here, but it cannot be represented // with C++ members. }; class Producer : private MoveOnly { public: - explicit Producer(ObjectFactoryStorage& owner) noexcept : owner_(owner) {} + Producer(ObjectFactoryStorage& owner, Allocator allocator) noexcept : owner_(owner), allocator_(std::move(allocator)) {} ~Producer() { Publish(); } Node& Insert(size_t dataSize) noexcept { AssertCorrect(); - auto node = Node::Create(dataSize); + auto node = Node::Create(allocator_, dataSize); auto* nodePtr = node.get(); if (!root_) { root_ = std::move(node); @@ -159,7 +177,8 @@ public: } ObjectFactoryStorage& owner_; // weak - KStdUniquePtr root_; + Allocator allocator_; + unique_ptr root_; Node* last_ = nullptr; }; @@ -245,35 +264,160 @@ private: } } - KStdUniquePtr root_; + unique_ptr root_; Node* last_ = nullptr; SpinLock mutex_; }; +class SimpleAllocator { +public: + void* Alloc(size_t size, size_t alignment) noexcept { return konanAllocAlignedMemory(size, alignment); } + + static void Free(void* instance) noexcept { konanFreeMemory(instance); } +}; + +template +class AllocatorWithGC { +public: + AllocatorWithGC(BaseAllocator base, GC& gc) noexcept : base_(std::move(base)), gc_(gc) {} + + void* Alloc(size_t size, size_t alignment) noexcept { + gc_.SafePointAllocation(size); + if (void* ptr = base_.Alloc(size, alignment)) { + return ptr; + } + // Tell GC that we failed to allocate, and try one more time. + gc_.OnOOM(size); + return base_.Alloc(size, alignment); + } + + static void Free(void* instance) noexcept { BaseAllocator::Free(instance); } + +private: + BaseAllocator base_; + GC& gc_; +}; + } // namespace internal +template class ObjectFactory : private Pinned { + using GCObjectData = typename GC::ObjectData; + using GCThreadData = typename GC::ThreadData; + + using Allocator = internal::AllocatorWithGC; + + struct HeapObjHeader { + GCObjectData gcData; + alignas(kObjectAlignment) ObjHeader object; + }; + + // Needs to be kept compatible with `HeapObjHeader` just like `ArrayHeader` is compatible + // with `ObjHeader`: the former can always be casted to the other. + struct HeapArrayHeader { + GCObjectData gcData; + alignas(kObjectAlignment) ArrayHeader array; + }; + public: - using Storage = internal::ObjectFactoryStorage; + using Storage = internal::ObjectFactoryStorage; + + class NodeRef { + public: + explicit NodeRef(typename Storage::Node& node) noexcept : node_(node) {} + + static NodeRef From(ObjHeader* object) noexcept { + RuntimeAssert(object->heap(), "Must be a heap object"); + auto* heapObject = reinterpret_cast(reinterpret_cast(object) - offsetof(HeapObjHeader, object)); + RuntimeAssert(&heapObject->object == object, "HeapObjHeader layout has broken"); + return NodeRef(Storage::Node::FromData(heapObject)); + } + + static NodeRef From(ArrayHeader* array) noexcept { + // `ArrayHeader` and `ObjHeader` are kept compatible, so the former can + // be always casted to the other. + RuntimeAssert(reinterpret_cast(array)->heap(), "Must be a heap object"); + auto* heapArray = reinterpret_cast(reinterpret_cast(array) - offsetof(HeapArrayHeader, array)); + RuntimeAssert(&heapArray->array == array, "HeapArrayHeader layout has broken"); + return NodeRef(Storage::Node::FromData(heapArray)); + } + + NodeRef* operator->() noexcept { return this; } + + GCObjectData& GCObjectData() noexcept { + // `HeapArrayHeader` and `HeapObjHeader` are kept compatible, so the former can + // be always casted to the other. + return static_cast(node_.Data())->gcData; + } + + bool IsArray() const noexcept { + // `HeapArrayHeader` and `HeapObjHeader` are kept compatible, so the former can + // be always casted to the other. + auto* object = &static_cast(node_.Data())->object; + return object->type_info()->IsArray(); + } + + ObjHeader* GetObjHeader() noexcept { + auto* object = &static_cast(node_.Data())->object; + RuntimeAssert(!object->type_info()->IsArray(), "Must not be an array"); + return object; + } + + ArrayHeader* GetArrayHeader() noexcept { + auto* array = &static_cast(node_.Data())->array; + RuntimeAssert(array->type_info()->IsArray(), "Must be an array"); + return array; + } + + bool operator==(const NodeRef& rhs) const noexcept { return &node_ == &rhs.node_; } + + bool operator!=(const NodeRef& rhs) const noexcept { return !(*this == rhs); } + + private: + typename Storage::Node& node_; + }; class ThreadQueue : private MoveOnly { public: - explicit ThreadQueue(ObjectFactory& owner) noexcept : producer_(owner.storage_) {} + ThreadQueue(ObjectFactory& owner, GCThreadData& gc) noexcept : + producer_(owner.storage_, internal::AllocatorWithGC(internal::SimpleAllocator(), gc)) {} - ObjHeader* CreateObject(const TypeInfo* typeInfo) noexcept; - ArrayHeader* CreateArray(const TypeInfo* typeInfo, uint32_t count) noexcept; + ObjHeader* CreateObject(const TypeInfo* typeInfo) noexcept { + RuntimeAssert(!typeInfo->IsArray(), "Must not be an array"); + size_t membersSize = typeInfo->instanceSize_ - sizeof(ObjHeader); + size_t allocSize = AlignUp(sizeof(HeapObjHeader) + membersSize, kObjectAlignment); + auto& node = producer_.Insert(allocSize); + auto* heapObject = new (node.Data()) HeapObjHeader(); + auto* object = &heapObject->object; + object->typeInfoOrMeta_ = const_cast(typeInfo); + return object; + } + + ArrayHeader* CreateArray(const TypeInfo* typeInfo, uint32_t count) noexcept { + RuntimeAssert(typeInfo->IsArray(), "Must be an array"); + uint32_t membersSize = static_cast(-typeInfo->instanceSize_) * count; + // Note: array body is aligned, but for size computation it is enough to align the sum. + size_t allocSize = AlignUp(sizeof(HeapArrayHeader) + membersSize, kObjectAlignment); + auto& node = producer_.Insert(allocSize); + auto* heapArray = new (node.Data()) HeapArrayHeader(); + auto* array = &heapArray->array; + array->typeInfoOrMeta_ = const_cast(typeInfo); + array->count_ = count; + return array; + } void Publish() noexcept { producer_.Publish(); } void ClearForTests() noexcept { producer_.ClearForTests(); } private: - Storage::Producer producer_; + typename Storage::Producer producer_; }; class Iterator { public: - Storage::Node& operator*() noexcept { return *iterator_; } + NodeRef operator*() noexcept { return NodeRef(*iterator_); } + NodeRef operator->() noexcept { return NodeRef(*iterator_); } Iterator& operator++() noexcept { ++iterator_; @@ -284,17 +428,12 @@ public: bool operator!=(const Iterator& rhs) const noexcept { return iterator_ != rhs.iterator_; } - bool IsArray() noexcept; - - ObjHeader* GetObjHeader() noexcept; - ArrayHeader* GetArrayHeader() noexcept; - private: friend class ObjectFactory; - explicit Iterator(Storage::Iterator iterator) noexcept : iterator_(std::move(iterator)) {} + explicit Iterator(typename Storage::Iterator iterator) noexcept : iterator_(std::move(iterator)) {} - Storage::Iterator iterator_; + typename Storage::Iterator iterator_; }; class Iterable { @@ -307,13 +446,11 @@ public: void EraseAndAdvance(Iterator& iterator) noexcept { iter_.EraseAndAdvance(iterator.iterator_); } private: - Storage::Iterable iter_; + typename Storage::Iterable iter_; }; - ObjectFactory() noexcept; - ~ObjectFactory(); - - static ObjectFactory& Instance() noexcept; + ObjectFactory() noexcept = default; + ~ObjectFactory() = default; Iterable Iter() noexcept { return Iterable(*this); } diff --git a/kotlin-native/runtime/src/mm/cpp/ObjectFactoryTest.cpp b/kotlin-native/runtime/src/mm/cpp/ObjectFactoryTest.cpp index d235e54bb66..ec97e801475 100644 --- a/kotlin-native/runtime/src/mm/cpp/ObjectFactoryTest.cpp +++ b/kotlin-native/runtime/src/mm/cpp/ObjectFactoryTest.cpp @@ -12,17 +12,25 @@ #include "gmock/gmock.h" #include "gtest/gtest.h" +#include "GC.hpp" #include "TestSupport.hpp" #include "Types.h" using namespace kotlin; +using testing::_; + +namespace { + +using SimpleAllocator = mm::internal::SimpleAllocator; + template -using ObjectFactoryStorage = mm::internal::ObjectFactoryStorage; +using ObjectFactoryStorage = mm::internal::ObjectFactoryStorage; using ObjectFactoryStorageRegular = ObjectFactoryStorage; -namespace { +template +using Producer = typename Storage::Producer; template KStdVector Collect(ObjectFactoryStorage& storage) { @@ -76,7 +84,7 @@ TEST(ObjectFactoryStorageTest, Empty) { TEST(ObjectFactoryStorageTest, DoNotPublish) { ObjectFactoryStorageRegular storage; - ObjectFactoryStorageRegular::Producer producer(storage); + Producer producer(storage, SimpleAllocator()); producer.Insert(1); producer.Insert(2); @@ -88,8 +96,8 @@ TEST(ObjectFactoryStorageTest, DoNotPublish) { TEST(ObjectFactoryStorageTest, Publish) { ObjectFactoryStorageRegular storage; - ObjectFactoryStorageRegular::Producer producer1(storage); - ObjectFactoryStorageRegular::Producer producer2(storage); + Producer producer1(storage, SimpleAllocator()); + Producer producer2(storage, SimpleAllocator()); producer1.Insert(1); producer1.Insert(2); @@ -106,7 +114,7 @@ TEST(ObjectFactoryStorageTest, Publish) { TEST(ObjectFactoryStorageTest, PublishDifferentTypes) { ObjectFactoryStorage storage; - ObjectFactoryStorage::Producer producer(storage); + Producer> producer(storage, SimpleAllocator()); producer.Insert(1); producer.Insert(2); @@ -139,7 +147,7 @@ TEST(ObjectFactoryStorageTest, PublishDifferentTypes) { TEST(ObjectFactoryStorageTest, PublishSeveralTimes) { ObjectFactoryStorageRegular storage; - ObjectFactoryStorageRegular::Producer producer(storage); + Producer producer(storage, SimpleAllocator()); // Add 2 elements and publish. producer.Insert(1); @@ -167,7 +175,7 @@ TEST(ObjectFactoryStorageTest, PublishInDestructor) { ObjectFactoryStorageRegular storage; { - ObjectFactoryStorageRegular::Producer producer(storage); + Producer producer(storage, SimpleAllocator()); producer.Insert(1); producer.Insert(2); } @@ -177,9 +185,22 @@ TEST(ObjectFactoryStorageTest, PublishInDestructor) { EXPECT_THAT(actual, testing::ElementsAre(1, 2)); } +TEST(ObjectFactoryStorageTest, FindNode) { + ObjectFactoryStorageRegular storage; + Producer producer(storage, SimpleAllocator()); + + auto& node1 = producer.Insert(1); + auto& node2 = producer.Insert(2); + + producer.Publish(); + + EXPECT_THAT(&ObjectFactoryStorageRegular::Node::FromData(node1.Data()), &node1); + EXPECT_THAT(&ObjectFactoryStorageRegular::Node::FromData(node2.Data()), &node2); +} + TEST(ObjectFactoryStorageTest, EraseFirst) { ObjectFactoryStorageRegular storage; - ObjectFactoryStorageRegular::Producer producer(storage); + Producer producer(storage, SimpleAllocator()); producer.Insert(1); producer.Insert(2); @@ -205,7 +226,7 @@ TEST(ObjectFactoryStorageTest, EraseFirst) { TEST(ObjectFactoryStorageTest, EraseMiddle) { ObjectFactoryStorageRegular storage; - ObjectFactoryStorageRegular::Producer producer(storage); + Producer producer(storage, SimpleAllocator()); producer.Insert(1); producer.Insert(2); @@ -231,7 +252,7 @@ TEST(ObjectFactoryStorageTest, EraseMiddle) { TEST(ObjectFactoryStorageTest, EraseLast) { ObjectFactoryStorageRegular storage; - ObjectFactoryStorageRegular::Producer producer(storage); + Producer producer(storage, SimpleAllocator()); producer.Insert(1); producer.Insert(2); @@ -257,7 +278,7 @@ TEST(ObjectFactoryStorageTest, EraseLast) { TEST(ObjectFactoryStorageTest, EraseAll) { ObjectFactoryStorageRegular storage; - ObjectFactoryStorageRegular::Producer producer(storage); + Producer producer(storage, SimpleAllocator()); producer.Insert(1); producer.Insert(2); @@ -279,7 +300,7 @@ TEST(ObjectFactoryStorageTest, EraseAll) { TEST(ObjectFactoryStorageTest, EraseTheOnlyElement) { ObjectFactoryStorageRegular storage; - ObjectFactoryStorageRegular::Producer producer(storage); + Producer producer(storage, SimpleAllocator()); producer.Insert(1); @@ -307,7 +328,7 @@ TEST(ObjectFactoryStorageTest, ConcurrentPublish) { for (int i = 0; i < kThreadCount; ++i) { expected.push_back(i); threads.emplace_back([i, &storage, &canStart, &readyCount]() { - ObjectFactoryStorageRegular::Producer producer(storage); + Producer producer(storage, SimpleAllocator()); producer.Insert(i); ++readyCount; while (!canStart) { @@ -335,7 +356,7 @@ TEST(ObjectFactoryStorageTest, IterWhileConcurrentPublish) { KStdVector expectedBefore; KStdVector expectedAfter; - ObjectFactoryStorageRegular::Producer producer(storage); + Producer producer(storage, SimpleAllocator()); for (int i = 0; i < kStartCount; ++i) { expectedBefore.push_back(i); expectedAfter.push_back(i); @@ -351,7 +372,7 @@ TEST(ObjectFactoryStorageTest, IterWhileConcurrentPublish) { int j = i + kStartCount; expectedAfter.push_back(j); threads.emplace_back([j, &storage, &canStart, &startedCount, &readyCount]() { - ObjectFactoryStorageRegular::Producer producer(storage); + Producer producer(storage, SimpleAllocator()); producer.Insert(j); ++readyCount; while (!canStart) { @@ -393,7 +414,7 @@ TEST(ObjectFactoryStorageTest, EraseWhileConcurrentPublish) { constexpr int kThreadCount = kDefaultThreadCount; KStdVector expectedAfter; - ObjectFactoryStorageRegular::Producer producer(storage); + Producer producer(storage, SimpleAllocator()); for (int i = 0; i < kStartCount; ++i) { if (i % 2 == 0) { expectedAfter.push_back(i); @@ -410,7 +431,7 @@ TEST(ObjectFactoryStorageTest, EraseWhileConcurrentPublish) { int j = i + kStartCount; expectedAfter.push_back(j); threads.emplace_back([j, &storage, &canStart, &startedCount, &readyCount]() { - ObjectFactoryStorageRegular::Producer producer(storage); + Producer producer(storage, SimpleAllocator()); producer.Insert(j); ++readyCount; while (!canStart) { @@ -446,10 +467,103 @@ TEST(ObjectFactoryStorageTest, EraseWhileConcurrentPublish) { EXPECT_THAT(actual, testing::UnorderedElementsAreArray(expectedAfter)); } -using mm::ObjectFactory; +using mm::internal::AllocatorWithGC; namespace { +class MockAllocator { +public: + MOCK_METHOD(void*, Alloc, (size_t, size_t)); +}; + +class MockAllocatorWrapper { +public: + MockAllocator& operator*() { return *mock_; } + + void* Alloc(size_t size, size_t alignment) { return mock_->Alloc(size, alignment); } + +private: + KStdUniquePtr> mock_ = make_unique>(); +}; + +class MockGC { +public: + MOCK_METHOD(void, SafePointAllocation, (size_t)); + MOCK_METHOD(void, OnOOM, (size_t)); +}; + +} // namespace + +TEST(AllocatorWithGCTest, AllocateWithoutOOM) { + constexpr size_t size = 256; + constexpr size_t alignment = 8; + void* nonNull = reinterpret_cast(1); + MockAllocatorWrapper baseAllocator; + testing::StrictMock gc; + { + testing::InSequence seq; + EXPECT_CALL(gc, SafePointAllocation(size)); + EXPECT_CALL(*baseAllocator, Alloc(size, alignment)).WillOnce(testing::Return(nonNull)); + EXPECT_CALL(gc, OnOOM(_)).Times(0); + } + AllocatorWithGC allocator(std::move(baseAllocator), gc); + void* ptr = allocator.Alloc(size, alignment); + EXPECT_THAT(ptr, nonNull); +} + +TEST(AllocatorWithGCTest, AllocateWithFixableOOM) { + constexpr size_t size = 256; + constexpr size_t alignment = 8; + void* nonNull = reinterpret_cast(1); + MockAllocatorWrapper baseAllocator; + testing::StrictMock gc; + { + testing::InSequence seq; + EXPECT_CALL(gc, SafePointAllocation(size)); + EXPECT_CALL(*baseAllocator, Alloc(size, alignment)).WillOnce(testing::Return(nullptr)); + EXPECT_CALL(gc, OnOOM(size)); + EXPECT_CALL(*baseAllocator, Alloc(size, alignment)).WillOnce(testing::Return(nonNull)); + } + AllocatorWithGC allocator(std::move(baseAllocator), gc); + void* ptr = allocator.Alloc(size, alignment); + EXPECT_THAT(ptr, nonNull); +} + +TEST(AllocatorWithGCTest, AllocateWithUnfixableOOM) { + constexpr size_t size = 256; + constexpr size_t alignment = 8; + MockAllocatorWrapper baseAllocator; + testing::StrictMock gc; + { + testing::InSequence seq; + EXPECT_CALL(gc, SafePointAllocation(size)); + EXPECT_CALL(*baseAllocator, Alloc(size, alignment)).WillOnce(testing::Return(nullptr)); + EXPECT_CALL(gc, OnOOM(size)); + EXPECT_CALL(*baseAllocator, Alloc(size, alignment)).WillOnce(testing::Return(nullptr)); + } + AllocatorWithGC allocator(std::move(baseAllocator), gc); + void* ptr = allocator.Alloc(size, alignment); + EXPECT_THAT(ptr, nullptr); +} + +namespace { + +class GC { +public: + struct ObjectData { + uint32_t flags = 42; + }; + + class ThreadData { + public: + void SafePointAllocation(size_t size) noexcept {} + + void OnOOM(size_t size) noexcept {} + }; +}; + +using ObjectFactory = mm::ObjectFactory; + KStdUniquePtr MakeObjectTypeInfo(int32_t size) { auto typeInfo = make_unique(); typeInfo->typeInfo_ = typeInfo.get(); @@ -468,32 +582,42 @@ KStdUniquePtr MakeArrayTypeInfo(int32_t elementSize) { TEST(ObjectFactoryTest, CreateObject) { auto typeInfo = MakeObjectTypeInfo(24); + GC::ThreadData gc; ObjectFactory objectFactory; - ObjectFactory::ThreadQueue threadQueue(objectFactory); + ObjectFactory::ThreadQueue threadQueue(objectFactory, gc); auto* object = threadQueue.CreateObject(typeInfo.get()); threadQueue.Publish(); + auto node = ObjectFactory::NodeRef::From(object); + EXPECT_FALSE(node.IsArray()); + EXPECT_THAT(node.GetObjHeader(), object); + EXPECT_THAT(node.GCObjectData().flags, 42); + auto iter = objectFactory.Iter(); auto it = iter.begin(); - EXPECT_FALSE(it.IsArray()); - EXPECT_THAT(it.GetObjHeader(), object); + EXPECT_THAT(*it, node); ++it; EXPECT_THAT(it, iter.end()); } TEST(ObjectFactoryTest, CreateArray) { auto typeInfo = MakeArrayTypeInfo(24); + GC::ThreadData gc; ObjectFactory objectFactory; - ObjectFactory::ThreadQueue threadQueue(objectFactory); + ObjectFactory::ThreadQueue threadQueue(objectFactory, gc); auto* array = threadQueue.CreateArray(typeInfo.get(), 3); threadQueue.Publish(); + auto node = ObjectFactory::NodeRef::From(array); + EXPECT_TRUE(node.IsArray()); + EXPECT_THAT(node.GetArrayHeader(), array); + EXPECT_THAT(node.GCObjectData().flags, 42); + auto iter = objectFactory.Iter(); auto it = iter.begin(); - EXPECT_TRUE(it.IsArray()); - EXPECT_THAT(it.GetArrayHeader(), array); + EXPECT_THAT(*it, node); ++it; EXPECT_THAT(it, iter.end()); } @@ -501,8 +625,9 @@ TEST(ObjectFactoryTest, CreateArray) { TEST(ObjectFactoryTest, Erase) { auto objectTypeInfo = MakeObjectTypeInfo(24); auto arrayTypeInfo = MakeArrayTypeInfo(24); + GC::ThreadData gc; ObjectFactory objectFactory; - ObjectFactory::ThreadQueue threadQueue(objectFactory); + ObjectFactory::ThreadQueue threadQueue(objectFactory, gc); for (int i = 0; i < 10; ++i) { threadQueue.CreateObject(objectTypeInfo.get()); @@ -514,7 +639,7 @@ TEST(ObjectFactoryTest, Erase) { { auto iter = objectFactory.Iter(); for (auto it = iter.begin(); it != iter.end();) { - if (it.IsArray()) { + if (it->IsArray()) { iter.EraseAndAdvance(it); } else { ++it; @@ -526,7 +651,7 @@ TEST(ObjectFactoryTest, Erase) { auto iter = objectFactory.Iter(); int count = 0; for (auto it = iter.begin(); it != iter.end(); ++it, ++count) { - EXPECT_FALSE(it.IsArray()); + EXPECT_FALSE(it->IsArray()); } EXPECT_THAT(count, 10); } @@ -544,7 +669,8 @@ TEST(ObjectFactoryTest, ConcurrentPublish) { for (int i = 0; i < kThreadCount; ++i) { threads.emplace_back([&typeInfo, &objectFactory, &canStart, &readyCount, &expected, &expectedMutex]() { - ObjectFactory::ThreadQueue threadQueue(objectFactory); + GC::ThreadData gc; + ObjectFactory::ThreadQueue threadQueue(objectFactory, gc); auto* object = threadQueue.CreateObject(typeInfo.get()); { std::lock_guard guard(expectedMutex); @@ -567,7 +693,7 @@ TEST(ObjectFactoryTest, ConcurrentPublish) { auto iter = objectFactory.Iter(); KStdVector actual; for (auto it = iter.begin(); it != iter.end(); ++it) { - actual.push_back(it.GetObjHeader()); + actual.push_back(it->GetObjHeader()); } EXPECT_THAT(actual, testing::UnorderedElementsAreArray(expected)); diff --git a/kotlin-native/runtime/src/mm/cpp/RootSet.cpp b/kotlin-native/runtime/src/mm/cpp/RootSet.cpp new file mode 100644 index 00000000000..ff9e65a9100 --- /dev/null +++ b/kotlin-native/runtime/src/mm/cpp/RootSet.cpp @@ -0,0 +1,149 @@ +/* + * Copyright 2010-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license + * that can be found in the LICENSE file. + */ + +#include "RootSet.hpp" + +#include "KAssert.h" +#include "GlobalData.hpp" +#include "ThreadData.hpp" + +using namespace kotlin; + +mm::ThreadRootSet::Iterator::Iterator(begin_t, ThreadRootSet& owner) noexcept : + owner_(owner), phase_(Phase::kStack), stackIterator_(owner_.stack_.begin()) { + Init(); +} + +mm::ThreadRootSet::Iterator::Iterator(end_t, ThreadRootSet& owner) noexcept : owner_(owner), phase_(Phase::kDone) {} + +ObjHeader*& mm::ThreadRootSet::Iterator::operator*() noexcept { + switch (phase_) { + case Phase::kStack: + return *stackIterator_; + case Phase::kTLS: + return **tlsIterator_; + case Phase::kDone: + RuntimeFail("Cannot dereference"); + } +} + +mm::ThreadRootSet::Iterator& mm::ThreadRootSet::Iterator::operator++() noexcept { + switch (phase_) { + case Phase::kStack: + ++stackIterator_; + Init(); + return *this; + case Phase::kTLS: + ++tlsIterator_; + Init(); + return *this; + case Phase::kDone: + return *this; + } +} + +bool mm::ThreadRootSet::Iterator::operator==(const Iterator& rhs) const noexcept { + if (phase_ != rhs.phase_) { + return false; + } + + switch (phase_) { + case Phase::kDone: + return true; + case Phase::kStack: + return stackIterator_ == rhs.stackIterator_; + case Phase::kTLS: + return tlsIterator_ == rhs.tlsIterator_; + } +} + +void mm::ThreadRootSet::Iterator::Init() noexcept { + while (phase_ != Phase::kDone) { + switch (phase_) { + case Phase::kStack: + if (stackIterator_ != owner_.stack_.end()) return; + phase_ = Phase::kTLS; + tlsIterator_ = owner_.tls_.begin(); + break; + case Phase::kTLS: + if (tlsIterator_ != owner_.tls_.end()) return; + phase_ = Phase::kDone; + break; + case Phase::kDone: + RuntimeFail("Impossible"); + } + } +} + +mm::GlobalRootSet::Iterator::Iterator(begin_t, GlobalRootSet& owner) noexcept : + owner_(owner), phase_(Phase::kGlobals), globalsIterator_(owner_.globalsIterable_.begin()) { + Init(); +} + +mm::GlobalRootSet::Iterator::Iterator(end_t, GlobalRootSet& owner) noexcept : owner_(owner), phase_(Phase::kDone) {} + +ObjHeader*& mm::GlobalRootSet::Iterator::operator*() noexcept { + switch (phase_) { + case Phase::kGlobals: + return **globalsIterator_; + case Phase::kStableRefs: + return *stableRefsIterator_; + case Phase::kDone: + RuntimeFail("Cannot dereference"); + } +} + +mm::GlobalRootSet::Iterator& mm::GlobalRootSet::Iterator::operator++() noexcept { + switch (phase_) { + case Phase::kGlobals: + ++globalsIterator_; + Init(); + return *this; + case Phase::kStableRefs: + ++stableRefsIterator_; + Init(); + return *this; + case Phase::kDone: + return *this; + } +} + +bool mm::GlobalRootSet::Iterator::operator==(const Iterator& rhs) const noexcept { + if (phase_ != rhs.phase_) { + return false; + } + + switch (phase_) { + case Phase::kDone: + return true; + case Phase::kGlobals: + return globalsIterator_ == rhs.globalsIterator_; + case Phase::kStableRefs: + return stableRefsIterator_ == rhs.stableRefsIterator_; + } +} + +void mm::GlobalRootSet::Iterator::Init() noexcept { + while (phase_ != Phase::kDone) { + switch (phase_) { + case Phase::kGlobals: + if (globalsIterator_ != owner_.globalsIterable_.end()) return; + phase_ = Phase::kStableRefs; + stableRefsIterator_ = owner_.stableRefsIterable_.begin(); + break; + case Phase::kStableRefs: + if (stableRefsIterator_ != owner_.stableRefsIterable_.end()) return; + phase_ = Phase::kDone; + break; + case Phase::kDone: + RuntimeFail("Impossible"); + } + } +} + +mm::ThreadRootSet::ThreadRootSet(ThreadData& threadData) noexcept : ThreadRootSet(threadData.shadowStack(), threadData.tls()) {} + +mm::GlobalRootSet::GlobalRootSet() noexcept : + GlobalRootSet(mm::GlobalData::Instance().globalsRegistry(), mm::GlobalData::Instance().stableRefRegistry()) {} diff --git a/kotlin-native/runtime/src/mm/cpp/RootSet.hpp b/kotlin-native/runtime/src/mm/cpp/RootSet.hpp new file mode 100644 index 00000000000..219d9a39f8c --- /dev/null +++ b/kotlin-native/runtime/src/mm/cpp/RootSet.hpp @@ -0,0 +1,123 @@ +/* + * Copyright 2010-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license + * that can be found in the LICENSE file. + */ + +#ifndef RUNTIME_MM_ROOT_SET_H +#define RUNTIME_MM_ROOT_SET_H + +#include "GlobalsRegistry.hpp" +#include "ShadowStack.hpp" +#include "StableRefRegistry.hpp" +#include "ThreadLocalStorage.hpp" + +struct ObjHeader; + +namespace kotlin { +namespace mm { + +class ThreadData; + +class ThreadRootSet { +public: + class Iterator { + public: + struct begin_t {}; + static constexpr inline begin_t begin = begin_t{}; + + struct end_t {}; + static constexpr inline end_t end = end_t{}; + + Iterator(begin_t, ThreadRootSet& owner) noexcept; + Iterator(end_t, ThreadRootSet& owner) noexcept; + + ObjHeader*& operator*() noexcept; + + Iterator& operator++() noexcept; + + bool operator==(const Iterator& rhs) const noexcept; + bool operator!=(const Iterator& rhs) const noexcept { return !(*this == rhs); } + + private: + enum class Phase { + kStack, + kTLS, + kDone, + }; + + void Init() noexcept; + + ThreadRootSet& owner_; + Phase phase_; + union { + ShadowStack::Iterator stackIterator_; + ThreadLocalStorage::Iterator tlsIterator_; + }; + }; + + ThreadRootSet(ShadowStack& stack, ThreadLocalStorage& tls) noexcept : stack_(stack), tls_(tls) {} + explicit ThreadRootSet(ThreadData& threadData) noexcept; + + Iterator begin() noexcept { return Iterator(Iterator::begin, *this); } + Iterator end() noexcept { return Iterator(Iterator::end, *this); } + +private: + ShadowStack& stack_; + ThreadLocalStorage& tls_; +}; + +class GlobalRootSet { +public: + class Iterator { + public: + struct begin_t {}; + static constexpr inline begin_t begin = begin_t{}; + + struct end_t {}; + static constexpr inline end_t end = end_t{}; + + Iterator(begin_t, GlobalRootSet& owner) noexcept; + Iterator(end_t, GlobalRootSet& owner) noexcept; + + ObjHeader*& operator*() noexcept; + + Iterator& operator++() noexcept; + + bool operator==(const Iterator& rhs) const noexcept; + bool operator!=(const Iterator& rhs) const noexcept { return !(*this == rhs); } + + private: + enum class Phase { + kGlobals, + kStableRefs, + kDone, + }; + + void Init() noexcept; + + GlobalRootSet& owner_; + Phase phase_; + union { + GlobalsRegistry::Iterator globalsIterator_; + StableRefRegistry::Iterator stableRefsIterator_; + }; + }; + + GlobalRootSet(GlobalsRegistry& globalsRegistry, StableRefRegistry& stableRefRegistry) noexcept : + globalsIterable_(globalsRegistry.Iter()), stableRefsIterable_(stableRefRegistry.Iter()) {} + GlobalRootSet() noexcept; + + Iterator begin() noexcept { return Iterator(Iterator::begin, *this); } + Iterator end() noexcept { return Iterator(Iterator::end, *this); } + +private: + // TODO: These use separate locks, which is inefficient, and slightly dangerous. In practice it's + // fine, because this is the only place where these two locks are taken simultaneously. + GlobalsRegistry::Iterable globalsIterable_; + StableRefRegistry::Iterable stableRefsIterable_; +}; + +} // namespace mm +} // namespace kotlin + +#endif // RUNTIME_MM_ROOT_SET_H diff --git a/kotlin-native/runtime/src/mm/cpp/RootSetTest.cpp b/kotlin-native/runtime/src/mm/cpp/RootSetTest.cpp new file mode 100644 index 00000000000..9bb3d682e41 --- /dev/null +++ b/kotlin-native/runtime/src/mm/cpp/RootSetTest.cpp @@ -0,0 +1,126 @@ +/* + * Copyright 2010-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license + * that can be found in the LICENSE file. + */ + +#include "RootSet.hpp" + +#include "gmock/gmock.h" +#include "gtest/gtest.h" + +#include "ShadowStack.hpp" + +using namespace kotlin; + +namespace { + +// TODO: All the test helpers to create the rootset should be abstracted out. + +template +class StackEntry : private Pinned { +public: + static_assert(LocalsCount > 0, "Must have at least 1 object on stack"); + + explicit StackEntry(mm::ShadowStack& shadowStack) : shadowStack_(shadowStack), value_(make_unique()) { + // Fill `locals_` with some values. + for (size_t i = 0; i < LocalsCount; ++i) { + (*this)[i] = value_.get() + i; + } + + shadowStack_.EnterFrame(data_.data(), 0, kTotalCount); + } + + ~StackEntry() { shadowStack_.LeaveFrame(data_.data(), 0, kTotalCount); } + + ObjHeader*& operator[](size_t index) { return data_[kFrameOverlayCount + index]; } + +private: + mm::ShadowStack& shadowStack_; + KStdUniquePtr value_; + + // The following is what the compiler creates on the stack. + static inline constexpr int kFrameOverlayCount = sizeof(FrameOverlay) / sizeof(ObjHeader**); + static inline constexpr int kTotalCount = kFrameOverlayCount + LocalsCount; + std::array data_; +}; + +struct TLSKey {}; + +} // namespace + +TEST(ThreadRootSetTest, Basic) { + mm::ShadowStack stack; + StackEntry<2> entry(stack); + + TLSKey key; + mm::ThreadLocalStorage tls; + tls.AddRecord(&key, 3); + tls.Commit(); + + mm::ThreadRootSet iter(stack, tls); + + KStdVector actual; + for (auto& object : iter) { + actual.push_back(object); + } + + EXPECT_THAT(actual, testing::ElementsAre(entry[0], entry[1], *tls.Lookup(&key, 0), *tls.Lookup(&key, 1), *tls.Lookup(&key, 2))); +} + +TEST(ThreadRootSetTest, Empty) { + mm::ShadowStack stack; + mm::ThreadLocalStorage tls; + + mm::ThreadRootSet iter(stack, tls); + + KStdVector actual; + for (auto& object : iter) { + actual.push_back(object); + } + + EXPECT_THAT(actual, testing::IsEmpty()); +} + +TEST(GlobalRootSetTest, Basic) { + mm::GlobalsRegistry globals; + mm::GlobalsRegistry::ThreadQueue globalsProducer(globals); + ObjHeader* global1 = reinterpret_cast(1); + ObjHeader* global2 = reinterpret_cast(2); + globalsProducer.Insert(&global1); + globalsProducer.Insert(&global2); + + mm::StableRefRegistry stableRefs; + mm::StableRefRegistry::ThreadQueue stableRefsProducer(stableRefs); + ObjHeader* stableRef1 = reinterpret_cast(3); + ObjHeader* stableRef2 = reinterpret_cast(4); + ObjHeader* stableRef3 = reinterpret_cast(5); + stableRefsProducer.Insert(stableRef1); + stableRefsProducer.Insert(stableRef2); + stableRefsProducer.Insert(stableRef3); + + globalsProducer.Publish(); + stableRefsProducer.Publish(); + + mm::GlobalRootSet iter(globals, stableRefs); + + KStdVector actual; + for (auto& object : iter) { + actual.push_back(object); + } + + EXPECT_THAT(actual, testing::ElementsAre(global1, global2, stableRef1, stableRef2, stableRef3)); +} + +TEST(GlobalRootSetTest, Empty) { + mm::GlobalsRegistry globals; + mm::StableRefRegistry stableRefs; + + mm::GlobalRootSet iter(globals, stableRefs); + + KStdVector actual; + for (auto& object : iter) { + actual.push_back(object); + } + + EXPECT_THAT(actual, testing::IsEmpty()); +} diff --git a/kotlin-native/runtime/src/mm/cpp/StableRefRegistry.hpp b/kotlin-native/runtime/src/mm/cpp/StableRefRegistry.hpp index 149ea10cd29..6ed972c15e6 100644 --- a/kotlin-native/runtime/src/mm/cpp/StableRefRegistry.hpp +++ b/kotlin-native/runtime/src/mm/cpp/StableRefRegistry.hpp @@ -26,6 +26,9 @@ public: using Iterator = MultiSourceQueue::Iterator; using Node = MultiSourceQueue::Node; + StableRefRegistry(); + ~StableRefRegistry(); + static StableRefRegistry& Instance() noexcept; Node* RegisterStableRef(mm::ThreadData* threadData, ObjHeader* object) noexcept; @@ -46,11 +49,6 @@ public: Iterable Iter() noexcept { return stableRefs_.Iter(); } private: - friend class GlobalData; - - StableRefRegistry(); - ~StableRefRegistry(); - // Current approach optimizes for creating and disposing of stable refs: // * creation just enqueues ref, disposing either queues or deletes the ref immediately (if it still resides in the current queue). // * when thread is stopped, it'll scan through the local queue (to mark that refs no longer reside in it) and push creation and diff --git a/kotlin-native/runtime/src/mm/cpp/Stubs.cpp b/kotlin-native/runtime/src/mm/cpp/Stubs.cpp index 31214be2e4f..9bd72a6b2a3 100644 --- a/kotlin-native/runtime/src/mm/cpp/Stubs.cpp +++ b/kotlin-native/runtime/src/mm/cpp/Stubs.cpp @@ -8,31 +8,24 @@ #include "KAssert.h" ALWAYS_INLINE bool isFrozen(const ObjHeader* obj) { - TODO(); -} - -ALWAYS_INLINE bool isPermanentOrFrozen(const ObjHeader* obj) { - TODO(); + // TODO: Unimplemented + return false; } extern "C" { void MutationCheck(ObjHeader* obj) { - TODO(); + // TODO: Unimplemented } void FreezeSubgraph(ObjHeader* obj) { - TODO(); + // TODO: Unimplemented } void EnsureNeverFrozen(ObjHeader* obj) { TODO(); } -void Kotlin_native_internal_GC_collect(ObjHeader*) { - TODO(); -} - void Kotlin_native_internal_GC_suspend(ObjHeader*) { TODO(); } @@ -81,10 +74,6 @@ bool Kotlin_native_internal_GC_getTuneThreshold(ObjHeader*) { TODO(); } -RUNTIME_NOTHROW void PerformFullGC(MemoryState* memory) { - TODO(); -} - bool TryAddHeapRef(const ObjHeader* object) { TODO(); } @@ -101,16 +90,4 @@ ForeignRefContext InitLocalForeignRef(ObjHeader* object) { TODO(); } -RUNTIME_NOTHROW void Kotlin_mm_safePointFunctionEpilogue() { - // TODO: Unimplemented -} - -RUNTIME_NOTHROW void Kotlin_mm_safePointWhileLoopBody() { - // TODO: Unimplemented -} - -RUNTIME_NOTHROW void Kotlin_mm_safePointExceptionUnwind() { - // TODO: Unimplemented -} - } // extern "C" diff --git a/kotlin-native/runtime/src/mm/cpp/ThreadData.hpp b/kotlin-native/runtime/src/mm/cpp/ThreadData.hpp index 1108c6adcf4..6685edc9be0 100644 --- a/kotlin-native/runtime/src/mm/cpp/ThreadData.hpp +++ b/kotlin-native/runtime/src/mm/cpp/ThreadData.hpp @@ -9,7 +9,9 @@ #include #include +#include "GlobalData.hpp" #include "GlobalsRegistry.hpp" +#include "GC.hpp" #include "ObjectFactory.hpp" #include "ShadowStack.hpp" #include "StableRefRegistry.hpp" @@ -32,7 +34,8 @@ public: globalsThreadQueue_(GlobalsRegistry::Instance()), stableRefThreadQueue_(StableRefRegistry::Instance()), state_(ThreadState::kRunnable), - objectFactoryThreadQueue_(ObjectFactory::Instance()) {} + gc_(GlobalData::Instance().gc()), + objectFactoryThreadQueue_(GlobalData::Instance().objectFactory(), gc_) {} ~ThreadData() = default; @@ -48,20 +51,30 @@ public: ThreadState setState(ThreadState state) noexcept { return state_.exchange(state); } - ObjectFactory::ThreadQueue& objectFactoryThreadQueue() noexcept { return objectFactoryThreadQueue_; } + ObjectFactory::ThreadQueue& objectFactoryThreadQueue() noexcept { return objectFactoryThreadQueue_; } ShadowStack& shadowStack() noexcept { return shadowStack_; } KStdVector>& initializingSingletons() noexcept { return initializingSingletons_; } + GC::ThreadData& gc() noexcept { return gc_; } + + void Publish() noexcept { + // TODO: These use separate locks, which is inefficient. + globalsThreadQueue_.Publish(); + stableRefThreadQueue_.Publish(); + objectFactoryThreadQueue_.Publish(); + } + private: const pthread_t threadId_; GlobalsRegistry::ThreadQueue globalsThreadQueue_; ThreadLocalStorage tls_; StableRefRegistry::ThreadQueue stableRefThreadQueue_; std::atomic state_; - ObjectFactory::ThreadQueue objectFactoryThreadQueue_; ShadowStack shadowStack_; + GC::ThreadData gc_; + ObjectFactory::ThreadQueue objectFactoryThreadQueue_; KStdVector> initializingSingletons_; }; diff --git a/kotlin-native/runtime/src/mm/cpp/gc/NoOpGC.hpp b/kotlin-native/runtime/src/mm/cpp/gc/NoOpGC.hpp new file mode 100644 index 00000000000..aa7cce129a5 --- /dev/null +++ b/kotlin-native/runtime/src/mm/cpp/gc/NoOpGC.hpp @@ -0,0 +1,50 @@ +/* + * Copyright 2010-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license + * that can be found in the LICENSE file. + */ + +#ifndef RUNTIME_MM_NOOP_GC_H +#define RUNTIME_MM_NOOP_GC_H + +#include + +#include "Utils.hpp" + +namespace kotlin { +namespace mm { + +// No-op GC is a GC that does not free memory. +// TODO: It can be made more efficient. +class NoOpGC : private Pinned { +public: + class ObjectData {}; + + class ThreadData : private Pinned { + public: + using ObjectData = NoOpGC::ObjectData; + + explicit ThreadData(NoOpGC& gc) noexcept {} + ~ThreadData() = default; + + void SafePointFunctionEpilogue() noexcept {} + void SafePointLoopBody() noexcept {} + void SafePointExceptionUnwind() noexcept {} + void SafePointAllocation(size_t size) noexcept {} + + void PerformFullGC() noexcept {} + + void OnOOM(size_t size) noexcept {} + + private: + }; + + NoOpGC() noexcept = default; + ~NoOpGC() = default; + +private: +}; + +} // namespace mm +} // namespace kotlin + +#endif // RUNTIME_MM_NOOP_GC_H diff --git a/kotlin-native/samples/androidNativeActivity/gradle.properties b/kotlin-native/samples/androidNativeActivity/gradle.properties index 876108389f6..6aec5a1bc10 100644 --- a/kotlin-native/samples/androidNativeActivity/gradle.properties +++ b/kotlin-native/samples/androidNativeActivity/gradle.properties @@ -6,7 +6,7 @@ org.gradle.workers.max=4 # Pin Kotlin version: # CHANGE_VERSION_WITH_RELEASE -kotlin_version=1.4.10 +kotlin_version=1.4.30 # Use custom Kotlin/Native home: kotlin.native.home=../../dist diff --git a/kotlin-native/samples/calculator/gradle.properties b/kotlin-native/samples/calculator/gradle.properties index 341c76ecd5c..1d0ddea90b5 100644 --- a/kotlin-native/samples/calculator/gradle.properties +++ b/kotlin-native/samples/calculator/gradle.properties @@ -6,7 +6,7 @@ org.gradle.workers.max=4 # Pin Kotlin version: # CHANGE_VERSION_WITH_RELEASE -kotlin_version=1.4.10 +kotlin_version=1.4.30 # Sets maven path for the kotlin version other than release #kotlinCompilerRepo= diff --git a/kotlin-native/samples/cocoapods/kotlin-library/gradle.properties b/kotlin-native/samples/cocoapods/kotlin-library/gradle.properties index 146d025d3e9..62d1c647c26 100644 --- a/kotlin-native/samples/cocoapods/kotlin-library/gradle.properties +++ b/kotlin-native/samples/cocoapods/kotlin-library/gradle.properties @@ -6,7 +6,7 @@ org.gradle.workers.max=4 # Pin Kotlin version: # CHANGE_VERSION_WITH_RELEASE -kotlin_version=1.4.10 +kotlin_version=1.4.30 # Use custom Kotlin/Native home: kotlin.native.home=../../../dist diff --git a/kotlin-native/samples/gradle.properties b/kotlin-native/samples/gradle.properties index 1c05119814e..ffbe4704e45 100644 --- a/kotlin-native/samples/gradle.properties +++ b/kotlin-native/samples/gradle.properties @@ -6,7 +6,7 @@ org.gradle.workers.max=4 # Pin Kotlin version: # CHANGE_VERSION_WITH_RELEASE -kotlin_version=1.4.10 +kotlin_version=1.4.30 # Sets maven path for the kotlin version other than release #kotlinCompilerRepo= diff --git a/kotlin-native/shared/src/library/kotlin/org/jetbrains/kotlin/konan/library/impl/KonanLibraryWriterImpl.kt b/kotlin-native/shared/src/library/kotlin/org/jetbrains/kotlin/konan/library/impl/KonanLibraryWriterImpl.kt index 009c25ff286..719273be57c 100644 --- a/kotlin-native/shared/src/library/kotlin/org/jetbrains/kotlin/konan/library/impl/KonanLibraryWriterImpl.kt +++ b/kotlin-native/shared/src/library/kotlin/org/jetbrains/kotlin/konan/library/impl/KonanLibraryWriterImpl.kt @@ -58,7 +58,7 @@ fun buildLibrary( ): KonanLibraryLayout { val libFile = File(output) - val unzippedDir = if (nopack) libFile else org.jetbrains.kotlin.konan.file.createTempDir(moduleName) + val unzippedDir = if (nopack) libFile else org.jetbrains.kotlin.konan.file.createTempDir("klib") val layout = KonanLibraryLayoutForWriter(libFile, unzippedDir, target) val library = KonanLibraryWriterImpl( moduleName, diff --git a/kotlin-native/shared/src/main/kotlin/org/jetbrains/kotlin/konan/target/Apple.kt b/kotlin-native/shared/src/main/kotlin/org/jetbrains/kotlin/konan/target/Apple.kt index 1886df29a0c..6137c5ae17d 100644 --- a/kotlin-native/shared/src/main/kotlin/org/jetbrains/kotlin/konan/target/Apple.kt +++ b/kotlin-native/shared/src/main/kotlin/org/jetbrains/kotlin/konan/target/Apple.kt @@ -33,7 +33,7 @@ class AppleConfigurablesImpl( override val absoluteTargetSysRoot: String get() = when (val provider = xcodePartsProvider) { is XcodePartsProvider.Local -> when (target) { - KonanTarget.MACOS_X64 -> provider.xcode.macosxSdk + KonanTarget.MACOS_X64, KonanTarget.MACOS_ARM64 -> provider.xcode.macosxSdk KonanTarget.IOS_ARM32, KonanTarget.IOS_ARM64 -> provider.xcode.iphoneosSdk KonanTarget.IOS_X64 -> provider.xcode.iphonesimulatorSdk KonanTarget.TVOS_ARM64 -> provider.xcode.appletvosSdk diff --git a/kotlin-native/shared/src/main/kotlin/org/jetbrains/kotlin/konan/target/ClangArgs.kt b/kotlin-native/shared/src/main/kotlin/org/jetbrains/kotlin/konan/target/ClangArgs.kt index 23fba070463..6c161e8c0c6 100644 --- a/kotlin-native/shared/src/main/kotlin/org/jetbrains/kotlin/konan/target/ClangArgs.kt +++ b/kotlin-native/shared/src/main/kotlin/org/jetbrains/kotlin/konan/target/ClangArgs.kt @@ -67,6 +67,12 @@ class ClangArgs(private val configurables: Configurables) : Configurables by con } } + // PIC is not required on Windows (and Clang will fail with `error: unsupported option '-fPIC'`) + if (configurables !is MingwConfigurables) { + // `-fPIC` allows us to avoid some problems when producing dynamic library. + // See KT-43502. + add(listOf("-fPIC")) + } }.flatten() private val osVersionMin: String @@ -89,6 +95,14 @@ class ClangArgs(private val configurables: Configurables) : Configurables by con "-mmacosx-version-min=$osVersionMin" ) + // Here we workaround Clang 8 limitation: macOS major version should be 10. + // So we compile runtime with version 10.16 and then override version in BitcodeCompiler. + // TODO: Fix with LLVM Update. + KonanTarget.MACOS_ARM64 -> listOf( + "-arch", "arm64", + "-mmacosx-version-min=10.16" + ) + KonanTarget.IOS_ARM32 -> listOf( "-stdlib=libc++", "-arch", "armv7", diff --git a/kotlin-native/shared/src/main/kotlin/org/jetbrains/kotlin/konan/target/ConfigurablesImpl.kt b/kotlin-native/shared/src/main/kotlin/org/jetbrains/kotlin/konan/target/ConfigurablesImpl.kt index a0406e12c81..efc8b8e0aba 100644 --- a/kotlin-native/shared/src/main/kotlin/org/jetbrains/kotlin/konan/target/ConfigurablesImpl.kt +++ b/kotlin-native/shared/src/main/kotlin/org/jetbrains/kotlin/konan/target/ConfigurablesImpl.kt @@ -42,7 +42,7 @@ fun loadConfigurables(target: KonanTarget, properties: Properties, baseDir: Stri KonanTarget.LINUX_MIPS32, KonanTarget.LINUX_MIPSEL32 -> GccConfigurablesImpl(target, properties, baseDir) - KonanTarget.MACOS_X64, + KonanTarget.MACOS_X64, KonanTarget.MACOS_ARM64, KonanTarget.IOS_ARM32, KonanTarget.IOS_ARM64, KonanTarget.IOS_X64, KonanTarget.TVOS_ARM64, KonanTarget.TVOS_X64, KonanTarget.WATCHOS_ARM64, KonanTarget.WATCHOS_ARM32, diff --git a/libraries/commonConfiguration.gradle b/libraries/commonConfiguration.gradle index fa1dcc5495b..a5af870d911 100644 --- a/libraries/commonConfiguration.gradle +++ b/libraries/commonConfiguration.gradle @@ -37,10 +37,13 @@ ext.configureJvm6Project = { Project project -> } } - project.tasks.withType(org.jetbrains.kotlin.gradle.dsl.KotlinCompile.class) { task -> - if (!tasksWithWarnings.contains(task.path)) { - task.kotlinOptions { - allWarningsAsErrors = true + if (!BuildPropertiesExtKt.getDisableWerror(project.kotlinBuildProperties)) { + project.tasks.withType(org.jetbrains.kotlin.gradle.dsl.KotlinCompile.class) { task -> + if (!tasksWithWarnings.contains(task.path)) { + task.kotlinOptions { + allWarningsAsErrors = true + freeCompilerArgs += "-Xsuppress-deprecated-jvm-target-warning" + } } } } @@ -208,8 +211,10 @@ ext.configureLegacyPublishing = { Project project -> ext.configureJvmIrBackend = { Project project -> project.tasks.withType(KotlinCompile.class) { task -> task.kotlinOptions { - useIR = project.kotlinBuildProperties.useIRForLibraries - freeCompilerArgs += "-Xuse-old-backend" + if (!project.kotlinBuildProperties.useIRForLibraries) { + useIR = false + freeCompilerArgs += "-Xuse-old-backend" + } } } } diff --git a/libraries/kotlin.test/annotations-common/build.gradle b/libraries/kotlin.test/annotations-common/build.gradle index 45231065ace..56e1dd87ed6 100644 --- a/libraries/kotlin.test/annotations-common/build.gradle +++ b/libraries/kotlin.test/annotations-common/build.gradle @@ -2,8 +2,6 @@ description = 'Kotlin Test Annotations Common' apply plugin: 'kotlin-platform-common' -configurePublishing(project) - jvmTarget = "1.6" dependencies { diff --git a/libraries/kotlin.test/build.gradle.kts b/libraries/kotlin.test/build.gradle.kts new file mode 100644 index 00000000000..a78fdf6588b --- /dev/null +++ b/libraries/kotlin.test/build.gradle.kts @@ -0,0 +1,312 @@ +import org.jetbrains.kotlin.gradle.plugin.KotlinPlatformType +import plugins.configureDefaultPublishing +import plugins.configureKotlinPomAttributes +import groovy.util.Node +import groovy.util.NodeList + +plugins { + `kotlin-multiplatform` apply false + base + `maven-publish` + signing +} + +open class ComponentsFactoryAccess +@javax.inject.Inject +constructor(val factory: SoftwareComponentFactory) + +val componentFactory = objects.newInstance().factory + + +val jvmApi by configurations.creating { + isCanBeConsumed = true + isCanBeResolved = false + attributes { + attribute(Usage.USAGE_ATTRIBUTE, objects.named("java-api")) + attribute(KotlinPlatformType.attribute, KotlinPlatformType.jvm) + } +} + +val jvmRuntime by configurations.creating { + isCanBeConsumed = true + isCanBeResolved = false + attributes { + attribute(Usage.USAGE_ATTRIBUTE, objects.named("java-runtime")) + attribute(KotlinPlatformType.attribute, KotlinPlatformType.jvm) + } + extendsFrom(jvmApi) +} + +val jsApiVariant by configurations.creating { + isCanBeConsumed = true + isCanBeResolved = false + attributes { + attribute(Usage.USAGE_ATTRIBUTE, objects.named("kotlin-api")) + attribute(KotlinPlatformType.attribute, KotlinPlatformType.js) + } +} +val jsRuntimeVariant by configurations.creating { + isCanBeConsumed = true + isCanBeResolved = false + attributes { + attribute(Usage.USAGE_ATTRIBUTE, objects.named("kotlin-runtime")) + attribute(KotlinPlatformType.attribute, KotlinPlatformType.js) + } + extendsFrom(jsApiVariant) +} + +val nativeApiVariant by configurations.creating { + isCanBeConsumed = true + isCanBeResolved = false + attributes { + attribute(Usage.USAGE_ATTRIBUTE, objects.named("kotlin-api")) + attribute(KotlinPlatformType.attribute, KotlinPlatformType.native) + } +} + +val commonVariant by configurations.creating { + isCanBeConsumed = true + isCanBeResolved = false + attributes { + attribute(Usage.USAGE_ATTRIBUTE, objects.named("kotlin-api")) + attribute(KotlinPlatformType.attribute, KotlinPlatformType.common) + } +} + +dependencies { + jvmApi(project(":kotlin-stdlib")) + jsApiVariant("$group:kotlin-test-js:$version") + commonVariant("$group:kotlin-test-common:$version") + commonVariant("$group:kotlin-test-annotations-common:$version") +} + +artifacts { + val jvmJar = tasks.getByPath(":kotlin-test:kotlin-test-jvm:jar") + add(jvmApi.name, jvmJar) + add(jvmRuntime.name, jvmJar) +} + +val kotlinTestCommonSourcesJar = tasks.getByPath(":kotlin-test:kotlin-test-common:sourcesJar") as Jar +val kotlinTestJvmSourcesJar = tasks.getByPath(":kotlin-test:kotlin-test-jvm:sourcesJar") as Jar + +val combinedSourcesJar by tasks.registering(Jar::class) { + dependsOn(kotlinTestCommonSourcesJar, kotlinTestJvmSourcesJar) + archiveClassifier.set("sources") + into("common") { + from(zipTree(kotlinTestCommonSourcesJar.archiveFile)) { + exclude("META-INF/**") + } + } + into("jvm") { + from(zipTree(kotlinTestJvmSourcesJar.archiveFile)) { + exclude("META-INF/**") + } + } +} + + +val rootComponent = componentFactory.adhoc("root").apply { + addVariantsFromConfiguration(jvmApi) { + mapToMavenScope("compile") + } + addVariantsFromConfiguration(jvmRuntime) { + mapToMavenScope("runtime") + } + addVariantsFromConfiguration(jsApiVariant) { mapToOptional() } + addVariantsFromConfiguration(jsRuntimeVariant) { mapToOptional() } + addVariantsFromConfiguration(nativeApiVariant) { mapToOptional() } + addVariantsFromConfiguration(commonVariant) { mapToOptional() } +} + + +val baseCapability = "$group:kotlin-test-framework:$version" +val implCapability = "$group:kotlin-test-framework-impl:$version" + +val jvmTestFrameworks = listOf("junit", "junit5", "testng") + +jvmTestFrameworks.forEach { framework -> + val (apiVariant, runtimeVariant) = listOf("api", "runtime").map { usage -> + configurations.create("${framework}${usage.capitalize()}Variant") { + isCanBeConsumed = true + isCanBeResolved = false + attributes { + attribute(Usage.USAGE_ATTRIBUTE, objects.named("java-$usage")) + attribute(KotlinPlatformType.attribute, KotlinPlatformType.jvm) + } + outgoing.capability(baseCapability) // C0 + outgoing.capability("$group:kotlin-test-framework-$framework:$version") // C0 + } + } + runtimeVariant.extendsFrom(apiVariant) + dependencies { + apiVariant("$group:kotlin-test-$framework:$version") + } + rootComponent.addVariantsFromConfiguration(apiVariant) { mapToOptional() } + rootComponent.addVariantsFromConfiguration(runtimeVariant) { mapToOptional() } + + val (apiElements, runtimeElements) = listOf("api", "runtime").map { usage -> + configurations.create("${framework}${usage.capitalize()}") { + isCanBeConsumed = true + isCanBeResolved = false + attributes { + attribute(Usage.USAGE_ATTRIBUTE, objects.named("java-$usage")) + } + outgoing.capability(implCapability) // CC + outgoing.capability("$group:kotlin-test-$framework:$version") // CC + } + } + runtimeElements.extendsFrom(apiElements) + dependencies { + apiElements("$group:kotlin-test:$version") + when(framework) { + "junit" -> { + apiElements("junit:junit:4.12") + } + "junit5" -> { + apiElements("org.junit.jupiter:junit-jupiter-api:5.0.0") + } + "testng" -> { + apiElements("org.testng:testng:6.13.1") + } + } + } + + artifacts { + val jar = tasks.getByPath(":kotlin-test:kotlin-test-$framework:jar") + add(apiElements.name, jar) + add(runtimeElements.name, jar) + } + + componentFactory.adhoc(framework).apply { + addVariantsFromConfiguration(apiElements) { + mapToMavenScope("compile") + } + addVariantsFromConfiguration(runtimeElements) { + mapToMavenScope("runtime") + } + }.let { components.add(it) } +} + +val (jsApi, jsRuntime) = listOf("api", "runtime").map { usage -> + configurations.create("js${usage.capitalize()}") { + isCanBeConsumed = true + isCanBeResolved = false + attributes { + attribute(Usage.USAGE_ATTRIBUTE, objects.named("kotlin-$usage")) + attribute(KotlinPlatformType.attribute, KotlinPlatformType.js) + } + } +} +jsRuntime.extendsFrom(jsApi) + +dependencies { + jsApi(project(":kotlin-stdlib-js")) +} + +artifacts { + val jsJar = tasks.getByPath(":kotlin-test:kotlin-test-js:libraryJarWithIr") + add(jsApi.name, jsJar) + add(jsRuntime.name, jsJar) +} + +val jsComponent = componentFactory.adhoc("js").apply { + addVariantsFromConfiguration(jsApi) { + mapToMavenScope("compile") + } + addVariantsFromConfiguration(jsRuntime) { + mapToMavenScope("runtime") + } +} + +val commonMetadata by configurations.creating { + isCanBeConsumed = true + isCanBeResolved = false + attributes { + attribute(Usage.USAGE_ATTRIBUTE, objects.named("kotlin-api")) + attribute(KotlinPlatformType.attribute, KotlinPlatformType.common) + } +} +val annotationsMetadata by configurations.creating { + isCanBeConsumed = true + isCanBeResolved = false + attributes { + attribute(Usage.USAGE_ATTRIBUTE, objects.named("kotlin-api")) + attribute(KotlinPlatformType.attribute, KotlinPlatformType.common) + } +} +dependencies { + commonMetadata(project(":kotlin-stdlib-common")) + annotationsMetadata(project(":kotlin-stdlib-common")) +} +artifacts { + add(commonMetadata.name, tasks.getByPath(":kotlin-test:kotlin-test-common:jar")) + add(annotationsMetadata.name, tasks.getByPath(":kotlin-test:kotlin-test-annotations-common:jar")) +} +val commonMetadataComponent = componentFactory.adhoc("common").apply { + addVariantsFromConfiguration(commonMetadata) { + mapToMavenScope("compile") + } +} +val annotationsMetadataComponent = componentFactory.adhoc("annotations-common").apply { + addVariantsFromConfiguration(annotationsMetadata) { + mapToMavenScope("compile") + } +} + +val emptyJavadocJar by tasks.creating(Jar::class) { + archiveClassifier.set("javadoc") +} + +configureDefaultPublishing() + +publishing { + publications { + create("main", MavenPublication::class) { + from(rootComponent) + artifact(combinedSourcesJar) + // Remove all optional dependencies from the root pom + pom.withXml { + val dependenciesNode = (asNode().get("dependencies") as NodeList).filterIsInstance().single() + val optionalDependencies = (dependenciesNode.get("dependency") as NodeList).filterIsInstance().filter { + ((it.get("optional") as NodeList).singleOrNull() as Node?)?.text() == "true" + } + optionalDependencies.forEach { dependenciesNode.remove(it) } + } + configureKotlinPomAttributes(project, "Kotlin Test Multiplatform library") + } + jvmTestFrameworks.forEach { framework -> + create(framework, MavenPublication::class) { + artifactId = "kotlin-test-$framework" + from(components[framework]) + artifact(tasks.getByPath(":kotlin-test:kotlin-test-$framework:sourcesJar") as Jar) + configureKotlinPomAttributes(project, "Kotlin Test Support for $framework") + } + } + create("js", MavenPublication::class) { + artifactId = "kotlin-test-js" + from(jsComponent) + artifact(tasks.getByPath(":kotlin-test:kotlin-test-js:sourcesJar") as Jar) + configureKotlinPomAttributes(project, "Kotlin Test for JS") + } + create("common", MavenPublication::class) { + artifactId = "kotlin-test-common" + from(commonMetadataComponent) + artifact(tasks.getByPath(":kotlin-test:kotlin-test-common:sourcesJar") as Jar) + configureKotlinPomAttributes(project, "Kotlin Test Common") + } + create("annotationsCommon", MavenPublication::class) { + artifactId = "kotlin-test-annotations-common" + from(annotationsMetadataComponent) + artifact(tasks.getByPath(":kotlin-test:kotlin-test-annotations-common:sourcesJar") as Jar) + configureKotlinPomAttributes(project, "Kotlin Test Common") + } + withType { + suppressAllPomMetadataWarnings() + artifact(emptyJavadocJar) + } + } +} + +tasks.withType { + enabled = "common" !in (publication.get() as MavenPublication).artifactId +} \ No newline at end of file diff --git a/libraries/kotlin.test/common/build.gradle b/libraries/kotlin.test/common/build.gradle index 730d97d99a9..cf0b36a35f0 100644 --- a/libraries/kotlin.test/common/build.gradle +++ b/libraries/kotlin.test/common/build.gradle @@ -2,8 +2,6 @@ description = 'Kotlin Test Common' apply plugin: 'kotlin-platform-common' -configurePublishing(project) - jvmTarget = "1.6" dependencies { diff --git a/libraries/kotlin.test/js/build.gradle b/libraries/kotlin.test/js/build.gradle index 50627f8fff5..9c194bc89c1 100644 --- a/libraries/kotlin.test/js/build.gradle +++ b/libraries/kotlin.test/js/build.gradle @@ -2,8 +2,6 @@ description = 'Kotlin Test for JS' apply plugin: 'kotlin-platform-js' -configurePublishing(project) - configurations { distJs distLibrary @@ -76,7 +74,6 @@ task sourcesJar(type: Jar, dependsOn: classes) { artifacts { runtime libraryJarWithIr archives libraryJarWithIr - publishedRuntime libraryJarWithIr distLibrary libraryJarWithIr archives sourcesJar distJs(file(compileKotlin2Js.kotlinOptions.outputFile)) { diff --git a/libraries/kotlin.test/junit/build.gradle b/libraries/kotlin.test/junit/build.gradle index 30c5736ef14..1fb0dc85c6e 100644 --- a/libraries/kotlin.test/junit/build.gradle +++ b/libraries/kotlin.test/junit/build.gradle @@ -3,7 +3,6 @@ description = 'Kotlin Test JUnit' apply plugin: 'kotlin-platform-jvm' configureJvm6Project(project) -configurePublishing(project) def includeJava9 = BuildPropertiesExtKt.getIncludeJava9(project.kotlinBuildProperties) @@ -31,12 +30,18 @@ configureSourcesJar() configureJavadocJar() compileKotlin { - kotlinOptions.freeCompilerArgs = ["-Xallow-kotlin-package"] + kotlinOptions.freeCompilerArgs = [ + "-Xallow-kotlin-package", + "-Xsuppress-deprecated-jvm-target-warning", + ] kotlinOptions.moduleName = project.name } compileTestKotlin { - kotlinOptions.freeCompilerArgs = ["-Xallow-kotlin-package"] + kotlinOptions.freeCompilerArgs = [ + "-Xallow-kotlin-package", + "-Xsuppress-deprecated-jvm-target-warning", + ] } configureJvmIrBackend(project) diff --git a/libraries/kotlin.test/junit5/build.gradle b/libraries/kotlin.test/junit5/build.gradle index 51526ca91e4..48d180522c4 100644 --- a/libraries/kotlin.test/junit5/build.gradle +++ b/libraries/kotlin.test/junit5/build.gradle @@ -3,7 +3,6 @@ description = 'Kotlin Test JUnit 5' apply plugin: 'kotlin-platform-jvm' configureJvm6Project(project) -configurePublishing(project) ext.javaHome = JDK_18 ext.jvmTarget = "1.8" @@ -41,12 +40,18 @@ tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile) { } compileKotlin { - kotlinOptions.freeCompilerArgs = ["-Xallow-kotlin-package"] + kotlinOptions.freeCompilerArgs = [ + "-Xallow-kotlin-package", + "-Xsuppress-deprecated-jvm-target-warning", + ] kotlinOptions.moduleName = project.name } compileTestKotlin { - kotlinOptions.freeCompilerArgs = ["-Xallow-kotlin-package"] + kotlinOptions.freeCompilerArgs = [ + "-Xallow-kotlin-package", + "-Xsuppress-deprecated-jvm-target-warning", + ] } configureJvmIrBackend(project) diff --git a/libraries/kotlin.test/jvm/build.gradle b/libraries/kotlin.test/jvm/build.gradle index 651c29bb822..64dc8941f1f 100644 --- a/libraries/kotlin.test/jvm/build.gradle +++ b/libraries/kotlin.test/jvm/build.gradle @@ -6,9 +6,6 @@ archivesBaseName = 'kotlin-test' configureJvm6Project(project) -configurePublishing(project) { - artifactId = archivesBaseName -} def includeJava9 = BuildPropertiesExtKt.getIncludeJava9(project.kotlinBuildProperties) @@ -44,13 +41,20 @@ configureSourcesJar() configureJavadocJar() compileKotlin { - kotlinOptions.freeCompilerArgs = ["-Xallow-kotlin-package", "-Xnormalize-constructor-calls=enable", - "-Xopt-in=kotlin.contracts.ExperimentalContracts"] + kotlinOptions.freeCompilerArgs = [ + "-Xallow-kotlin-package", + "-Xnormalize-constructor-calls=enable", + "-Xopt-in=kotlin.contracts.ExperimentalContracts", + "-Xsuppress-deprecated-jvm-target-warning", + ] kotlinOptions.moduleName = project.archivesBaseName } compileTestKotlin { - kotlinOptions.freeCompilerArgs = ["-Xallow-kotlin-package"] + kotlinOptions.freeCompilerArgs = [ + "-Xallow-kotlin-package", + "-Xsuppress-deprecated-jvm-target-warning", + ] } configureJvmIrBackend(project) diff --git a/libraries/kotlin.test/testng/build.gradle b/libraries/kotlin.test/testng/build.gradle index 968b937bef9..dd96564e7d0 100644 --- a/libraries/kotlin.test/testng/build.gradle +++ b/libraries/kotlin.test/testng/build.gradle @@ -3,7 +3,6 @@ description = 'Kotlin Test TestNG' apply plugin: 'kotlin-platform-jvm' configureJvm6Project(project) -configurePublishing(project) ext.javaHome = JDK_17 def includeJava9 = BuildPropertiesExtKt.getIncludeJava9(project.kotlinBuildProperties) @@ -34,12 +33,18 @@ configureSourcesJar() configureJavadocJar() compileKotlin { - kotlinOptions.freeCompilerArgs = ["-Xallow-kotlin-package"] + kotlinOptions.freeCompilerArgs = [ + "-Xallow-kotlin-package", + "-Xsuppress-deprecated-jvm-target-warning", + ] kotlinOptions.moduleName = project.name } compileTestKotlin { - kotlinOptions.freeCompilerArgs = ["-Xallow-kotlin-package"] + kotlinOptions.freeCompilerArgs = [ + "-Xallow-kotlin-package", + "-Xsuppress-deprecated-jvm-target-warning", + ] } configureJvmIrBackend(project) diff --git a/libraries/kotlinx-metadata/klib/src/kotlinx/metadata/klib/ChunkedKlibModuleFragmentWriteStrategy.kt b/libraries/kotlinx-metadata/klib/src/kotlinx/metadata/klib/ChunkedKlibModuleFragmentWriteStrategy.kt new file mode 100644 index 00000000000..0e3196c2f50 --- /dev/null +++ b/libraries/kotlinx-metadata/klib/src/kotlinx/metadata/klib/ChunkedKlibModuleFragmentWriteStrategy.kt @@ -0,0 +1,73 @@ +/* + * Copyright 2010-2020 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. + */ + +package kotlinx.metadata.klib + +import kotlinx.metadata.* + +class ChunkedKlibModuleFragmentWriteStrategy( + private val topLevelClassifierDeclarationsPerFile: Int = 64, + private val topLevelCallableDeclarationsPerFile: Int = 128 +) : KlibModuleFragmentWriteStrategy { + override fun processPackageParts(parts: List): List { + if (parts.isEmpty()) + return emptyList() + + val fqName = checkNotNull(parts.first().fqName) { + "KmModuleFragment should have a not-null fqName!" + } + + val classifierFragments = parts.asSequence() + .flatMap { it.classes.asSequence() + it.pkg?.typeAliases.orEmpty() } + .chunked(topLevelClassifierDeclarationsPerFile) { chunkedClassifiers -> + KmModuleFragment().also { fragment -> + fragment.fqName = fqName + chunkedClassifiers.forEach { classifier -> + when (classifier) { + is KmClass -> { + fragment.classes += classifier + fragment.className += classifier.name + } + is KmTypeAlias -> { + val pkg = fragment.pkg ?: KmPackage().also { pkg -> + pkg.fqName = fqName + fragment.pkg = pkg + } + pkg.typeAliases += classifier + } + else -> error("Unexpected classifier type: $classifier") + } + } + } + } + + val callableFragments = parts.asSequence() + .flatMap { it.pkg?.let { pkg -> pkg.functions.asSequence() + pkg.properties } ?: emptySequence() } + .chunked(topLevelCallableDeclarationsPerFile) { chunkedCallables -> + KmModuleFragment().also { fragment -> + fragment.fqName = fqName + chunkedCallables.forEach { callable -> + val pkg = fragment.pkg ?: KmPackage().also { pkg -> + pkg.fqName = fqName + fragment.pkg = pkg + } + when (callable) { + is KmFunction -> pkg.functions += callable + is KmProperty -> pkg.properties += callable + else -> error("Unexpected callable type: $callable") + } + } + } + } + + val allFragments = (classifierFragments + callableFragments).toList() + return if (allFragments.isEmpty()) { + // We still need to emit empty packages because they may + // represent parts of package declaration (e.g. platform.[]). + // Tooling (e.g. `klib contents`) expects this kind of behavior. + parts + } else allFragments + } +} diff --git a/libraries/reflect/api/build.gradle b/libraries/reflect/api/build.gradle index c9526386db7..37b3d1dfd86 100644 --- a/libraries/reflect/api/build.gradle +++ b/libraries/reflect/api/build.gradle @@ -47,6 +47,7 @@ compileKotlin { "-Xnormalize-constructor-calls=enable", "-Xno-optimized-callable-references", "-Xno-kotlin-nothing-value-exception", + "-Xsuppress-deprecated-jvm-target-warning", "-Xopt-in=kotlin.RequiresOptIn"] moduleName = "kotlin-reflection" } diff --git a/libraries/scripting/jvm/build.gradle.kts b/libraries/scripting/jvm/build.gradle.kts index 1c4d0375587..2da19f7fcd0 100644 --- a/libraries/scripting/jvm/build.gradle.kts +++ b/libraries/scripting/jvm/build.gradle.kts @@ -1,4 +1,3 @@ - plugins { kotlin("jvm") id("jps-compatible") @@ -21,7 +20,10 @@ sourceSets { } tasks.withType> { - kotlinOptions.freeCompilerArgs += "-Xallow-kotlin-package" + kotlinOptions.freeCompilerArgs += listOf( + "-Xallow-kotlin-package", + "-Xsuppress-deprecated-jvm-target-warning" + ) } tasks.withType { diff --git a/libraries/stdlib/api/js-v1/org.w3c.dom.encryptedmedia.kt b/libraries/stdlib/api/js-v1/org.w3c.dom.encryptedmedia.kt index 3dde259928b..650f5cc554c 100644 --- a/libraries/stdlib/api/js-v1/org.w3c.dom.encryptedmedia.kt +++ b/libraries/stdlib/api/js-v1/org.w3c.dom.encryptedmedia.kt @@ -85,11 +85,12 @@ public open external class MediaKeyMessageEvent : org.w3c.dom.events.Event { } public external interface MediaKeyMessageEventInit : org.w3c.dom.EventInit { - public open var message: org.khronos.webgl.ArrayBuffer? { get; set; } + public abstract var message: org.khronos.webgl.ArrayBuffer? { get; set; } - public open var messageType: org.w3c.dom.encryptedmedia.MediaKeyMessageType? { get; set; } + public abstract var messageType: org.w3c.dom.encryptedmedia.MediaKeyMessageType? { get; set; } } +@kotlin.js.JsName(name = "null") public external interface MediaKeyMessageType { public companion object of MediaKeyMessageType { } @@ -121,11 +122,13 @@ public abstract external class MediaKeySession : org.w3c.dom.events.EventTarget public final fun update(response: dynamic): kotlin.js.Promise } +@kotlin.js.JsName(name = "null") public external interface MediaKeySessionType { public companion object of MediaKeySessionType { } } +@kotlin.js.JsName(name = "null") public external interface MediaKeyStatus { public companion object of MediaKeyStatus { } @@ -181,6 +184,7 @@ public abstract external class MediaKeys { public final fun setServerCertificate(serverCertificate: dynamic): kotlin.js.Promise } +@kotlin.js.JsName(name = "null") public external interface MediaKeysRequirement { public companion object of MediaKeysRequirement { } diff --git a/libraries/stdlib/api/js-v1/org.w3c.dom.kt b/libraries/stdlib/api/js-v1/org.w3c.dom.kt index c9da485fdde..e79477eaec3 100644 --- a/libraries/stdlib/api/js-v1/org.w3c.dom.kt +++ b/libraries/stdlib/api/js-v1/org.w3c.dom.kt @@ -769,6 +769,7 @@ public open external class BeforeUnloadEvent : org.w3c.dom.events.Event { } } +@kotlin.js.JsName(name = "null") public external interface BinaryType { public companion object of BinaryType { } @@ -834,11 +835,13 @@ public open external class CDATASection : org.w3c.dom.Text { } } +@kotlin.js.JsName(name = "null") public external interface CSSBoxType { public companion object of CSSBoxType { } } +@kotlin.js.JsName(name = "null") public external interface CanPlayTypeResult { public companion object of CanPlayTypeResult { } @@ -850,6 +853,7 @@ public external interface CanvasCompositing { public abstract var globalCompositeOperation: kotlin.String { get; set; } } +@kotlin.js.JsName(name = "null") public external interface CanvasDirection { public companion object of CanvasDirection { } @@ -889,6 +893,7 @@ public external interface CanvasDrawPath { public abstract fun stroke(path: org.w3c.dom.Path2D): kotlin.Unit } +@kotlin.js.JsName(name = "null") public external interface CanvasFillRule { public companion object of CanvasFillRule { } @@ -945,11 +950,13 @@ public external interface CanvasImageSmoothing { public external interface CanvasImageSource : org.w3c.dom.ImageBitmapSource { } +@kotlin.js.JsName(name = "null") public external interface CanvasLineCap { public companion object of CanvasLineCap { } } +@kotlin.js.JsName(name = "null") public external interface CanvasLineJoin { public companion object of CanvasLineJoin { } @@ -1041,11 +1048,13 @@ public external interface CanvasText { public abstract fun strokeText(text: kotlin.String, x: kotlin.Double, y: kotlin.Double, maxWidth: kotlin.Double = ...): kotlin.Unit } +@kotlin.js.JsName(name = "null") public external interface CanvasTextAlign { public companion object of CanvasTextAlign { } } +@kotlin.js.JsName(name = "null") public external interface CanvasTextBaseline { public companion object of CanvasTextBaseline { } @@ -1193,6 +1202,7 @@ public external interface CloseEventInit : org.w3c.dom.EventInit { public open var wasClean: kotlin.Boolean? { get; set; } } +@kotlin.js.JsName(name = "null") public external interface ColorSpaceConversion { public companion object of ColorSpaceConversion { } @@ -2120,6 +2130,7 @@ public external interface DocumentOrShadowRoot { public open val fullscreenElement: org.w3c.dom.Element? { get; } } +@kotlin.js.JsName(name = "null") public external interface DocumentReadyState { public companion object of DocumentReadyState { } @@ -7376,11 +7387,13 @@ public open external class ImageData : org.w3c.dom.ImageBitmapSource, org.khrono public open val width: kotlin.Int { get; } } +@kotlin.js.JsName(name = "null") public external interface ImageOrientation { public companion object of ImageOrientation { } } +@kotlin.js.JsName(name = "null") public external interface ImageSmoothingQuality { public companion object of ImageSmoothingQuality { } @@ -8231,6 +8244,7 @@ public external interface PopStateEventInit : org.w3c.dom.EventInit { public open var state: kotlin.Any? { get; set; } } +@kotlin.js.JsName(name = "null") public external interface PremultiplyAlpha { public companion object of PremultiplyAlpha { } @@ -8299,7 +8313,7 @@ public open external class PromiseRejectionEvent : org.w3c.dom.events.Event { } public external interface PromiseRejectionEventInit : org.w3c.dom.EventInit { - public open var promise: kotlin.js.Promise? { get; set; } + public abstract var promise: kotlin.js.Promise? { get; set; } public open var reason: kotlin.Any? { get; set; } } @@ -8405,6 +8419,7 @@ public external interface RelatedEventInit : org.w3c.dom.EventInit { public external interface RenderingContext { } +@kotlin.js.JsName(name = "null") public external interface ResizeQuality { public companion object of ResizeQuality { } @@ -8426,6 +8441,7 @@ public abstract external class Screen { public open val width: kotlin.Int { get; } } +@kotlin.js.JsName(name = "null") public external interface ScrollBehavior { public companion object of ScrollBehavior { } @@ -8437,6 +8453,7 @@ public external interface ScrollIntoViewOptions : org.w3c.dom.ScrollOptions { public open var inline: org.w3c.dom.ScrollLogicalPosition? { get; set; } } +@kotlin.js.JsName(name = "null") public external interface ScrollLogicalPosition { public companion object of ScrollLogicalPosition { } @@ -8446,6 +8463,7 @@ public external interface ScrollOptions { public open var behavior: org.w3c.dom.ScrollBehavior? { get; set; } } +@kotlin.js.JsName(name = "null") public external interface ScrollRestoration { public companion object of ScrollRestoration { } @@ -8457,6 +8475,7 @@ public external interface ScrollToOptions : org.w3c.dom.ScrollOptions { public open var top: kotlin.Double? { get; set; } } +@kotlin.js.JsName(name = "null") public external interface SelectionMode { public companion object of SelectionMode { } @@ -8511,9 +8530,10 @@ public open external class ShadowRoot : org.w3c.dom.DocumentFragment, org.w3c.do } public external interface ShadowRootInit { - public open var mode: org.w3c.dom.ShadowRootMode? { get; set; } + public abstract var mode: org.w3c.dom.ShadowRootMode? { get; set; } } +@kotlin.js.JsName(name = "null") public external interface ShadowRootMode { public companion object of ShadowRootMode { } @@ -8745,6 +8765,7 @@ public abstract external class TextTrackCueList { public final fun getCueById(id: kotlin.String): org.w3c.dom.TextTrackCue? } +@kotlin.js.JsName(name = "null") public external interface TextTrackKind { public companion object of TextTrackKind { } @@ -8764,6 +8785,7 @@ public abstract external class TextTrackList : org.w3c.dom.events.EventTarget { public final fun getTrackById(id: kotlin.String): org.w3c.dom.TextTrack? } +@kotlin.js.JsName(name = "null") public external interface TextTrackMode { public companion object of TextTrackMode { } @@ -9265,6 +9287,7 @@ public external interface WorkerOptions { public open var type: org.w3c.dom.WorkerType? { get; set; } } +@kotlin.js.JsName(name = "null") public external interface WorkerType { public companion object of WorkerType { } diff --git a/libraries/stdlib/api/js-v1/org.w3c.dom.mediacapture.kt b/libraries/stdlib/api/js-v1/org.w3c.dom.mediacapture.kt index c34bd48596d..13ee88817ad 100644 --- a/libraries/stdlib/api/js-v1/org.w3c.dom.mediacapture.kt +++ b/libraries/stdlib/api/js-v1/org.w3c.dom.mediacapture.kt @@ -146,6 +146,7 @@ public abstract external class MediaDeviceInfo { public final fun toJSON(): dynamic } +@kotlin.js.JsName(name = "null") public external interface MediaDeviceKind { public companion object of MediaDeviceKind { } @@ -252,9 +253,10 @@ public open external class MediaStreamTrackEvent : org.w3c.dom.events.Event { } public external interface MediaStreamTrackEventInit : org.w3c.dom.EventInit { - public open var track: org.w3c.dom.mediacapture.MediaStreamTrack? { get; set; } + public abstract var track: org.w3c.dom.mediacapture.MediaStreamTrack? { get; set; } } +@kotlin.js.JsName(name = "null") public external interface MediaStreamTrackState { public companion object of MediaStreamTrackState { } @@ -429,11 +431,13 @@ public external interface ULongRange { public open var min: kotlin.Int? { get; set; } } +@kotlin.js.JsName(name = "null") public external interface VideoFacingModeEnum { public companion object of VideoFacingModeEnum { } } +@kotlin.js.JsName(name = "null") public external interface VideoResizeModeEnum { public companion object of VideoResizeModeEnum { } diff --git a/libraries/stdlib/api/js-v1/org.w3c.dom.mediasource.kt b/libraries/stdlib/api/js-v1/org.w3c.dom.mediasource.kt index a35f555e9a1..c3ad0a52bff 100644 --- a/libraries/stdlib/api/js-v1/org.w3c.dom.mediasource.kt +++ b/libraries/stdlib/api/js-v1/org.w3c.dom.mediasource.kt @@ -15,11 +15,13 @@ public val org.w3c.dom.mediasource.AppendMode.Companion.SEQUENCE: org.w3c.dom.me @kotlin.internal.InlineOnly public inline operator fun org.w3c.dom.mediasource.SourceBufferList.get(index: kotlin.Int): org.w3c.dom.mediasource.SourceBuffer? +@kotlin.js.JsName(name = "null") public external interface AppendMode { public companion object of AppendMode { } } +@kotlin.js.JsName(name = "null") public external interface EndOfStreamError { public companion object of EndOfStreamError { } @@ -57,6 +59,7 @@ public open external class MediaSource : org.w3c.dom.events.EventTarget, org.w3c } } +@kotlin.js.JsName(name = "null") public external interface ReadyState { public companion object of ReadyState { } diff --git a/libraries/stdlib/api/js-v1/org.w3c.fetch.kt b/libraries/stdlib/api/js-v1/org.w3c.fetch.kt index 393e775ec68..66106bf2476 100644 --- a/libraries/stdlib/api/js-v1/org.w3c.fetch.kt +++ b/libraries/stdlib/api/js-v1/org.w3c.fetch.kt @@ -166,16 +166,19 @@ public open external class Request : org.w3c.fetch.Body { public open override fun text(): kotlin.js.Promise } +@kotlin.js.JsName(name = "null") public external interface RequestCache { public companion object of RequestCache { } } +@kotlin.js.JsName(name = "null") public external interface RequestCredentials { public companion object of RequestCredentials { } } +@kotlin.js.JsName(name = "null") public external interface RequestDestination { public companion object of RequestDestination { } @@ -207,16 +210,19 @@ public external interface RequestInit { public open var window: kotlin.Any? { get; set; } } +@kotlin.js.JsName(name = "null") public external interface RequestMode { public companion object of RequestMode { } } +@kotlin.js.JsName(name = "null") public external interface RequestRedirect { public companion object of RequestRedirect { } } +@kotlin.js.JsName(name = "null") public external interface RequestType { public companion object of RequestType { } @@ -272,6 +278,7 @@ public external interface ResponseInit { public open var statusText: kotlin.String? { get; set; } } +@kotlin.js.JsName(name = "null") public external interface ResponseType { public companion object of ResponseType { } diff --git a/libraries/stdlib/api/js-v1/org.w3c.notifications.kt b/libraries/stdlib/api/js-v1/org.w3c.notifications.kt index a74dccf465f..1c7c5d23485 100644 --- a/libraries/stdlib/api/js-v1/org.w3c.notifications.kt +++ b/libraries/stdlib/api/js-v1/org.w3c.notifications.kt @@ -81,13 +81,14 @@ public open external class Notification : org.w3c.dom.events.EventTarget { } public external interface NotificationAction { - public open var action: kotlin.String? { get; set; } + public abstract var action: kotlin.String? { get; set; } public open var icon: kotlin.String? { get; set; } - public open var title: kotlin.String? { get; set; } + public abstract var title: kotlin.String? { get; set; } } +@kotlin.js.JsName(name = "null") public external interface NotificationDirection { public companion object of NotificationDirection { } @@ -114,7 +115,7 @@ public open external class NotificationEvent : org.w3c.workers.ExtendableEvent { public external interface NotificationEventInit : org.w3c.workers.ExtendableEventInit { public open var action: kotlin.String? { get; set; } - public open var notification: org.w3c.notifications.Notification? { get; set; } + public abstract var notification: org.w3c.notifications.Notification? { get; set; } } public external interface NotificationOptions { @@ -153,6 +154,7 @@ public external interface NotificationOptions { public open var vibrate: dynamic { get; set; } } +@kotlin.js.JsName(name = "null") public external interface NotificationPermission { public companion object of NotificationPermission { } diff --git a/libraries/stdlib/api/js-v1/org.w3c.workers.kt b/libraries/stdlib/api/js-v1/org.w3c.workers.kt index e3e2bd3e994..b1369291951 100644 --- a/libraries/stdlib/api/js-v1/org.w3c.workers.kt +++ b/libraries/stdlib/api/js-v1/org.w3c.workers.kt @@ -127,6 +127,7 @@ public external interface ClientQueryOptions { public open var type: org.w3c.workers.ClientType? { get; set; } } +@kotlin.js.JsName(name = "null") public external interface ClientType { public companion object of ClientType { } @@ -226,7 +227,7 @@ public external interface FetchEventInit : org.w3c.workers.ExtendableEventInit { public open var isReload: kotlin.Boolean? { get; set; } - public open var request: org.w3c.fetch.Request? { get; set; } + public abstract var request: org.w3c.fetch.Request? { get; set; } } public open external class ForeignFetchEvent : org.w3c.workers.ExtendableEvent { @@ -252,13 +253,13 @@ public open external class ForeignFetchEvent : org.w3c.workers.ExtendableEvent { public external interface ForeignFetchEventInit : org.w3c.workers.ExtendableEventInit { public open var origin: kotlin.String? { get; set; } - public open var request: org.w3c.fetch.Request? { get; set; } + public abstract var request: org.w3c.fetch.Request? { get; set; } } public external interface ForeignFetchOptions { - public open var origins: kotlin.Array? { get; set; } + public abstract var origins: kotlin.Array? { get; set; } - public open var scopes: kotlin.Array? { get; set; } + public abstract var scopes: kotlin.Array? { get; set; } } public external interface ForeignFetchResponse { @@ -266,9 +267,10 @@ public external interface ForeignFetchResponse { public open var origin: kotlin.String? { get; set; } - public open var response: org.w3c.fetch.Response? { get; set; } + public abstract var response: org.w3c.fetch.Response? { get; set; } } +@kotlin.js.JsName(name = "null") public external interface FrameType { public companion object of FrameType { } @@ -430,6 +432,7 @@ public abstract external class ServiceWorkerRegistration : org.w3c.dom.events.Ev public final fun update(): kotlin.js.Promise } +@kotlin.js.JsName(name = "null") public external interface ServiceWorkerState { public companion object of ServiceWorkerState { } diff --git a/libraries/stdlib/api/js-v1/org.w3c.xhr.kt b/libraries/stdlib/api/js-v1/org.w3c.xhr.kt index b6b5adc50d4..0e5ec8df3f3 100644 --- a/libraries/stdlib/api/js-v1/org.w3c.xhr.kt +++ b/libraries/stdlib/api/js-v1/org.w3c.xhr.kt @@ -135,6 +135,7 @@ public abstract external class XMLHttpRequestEventTarget : org.w3c.dom.events.Ev public open var ontimeout: ((org.w3c.dom.events.Event) -> dynamic)? { get; set; } } +@kotlin.js.JsName(name = "null") public external interface XMLHttpRequestResponseType { public companion object of XMLHttpRequestResponseType { } diff --git a/libraries/stdlib/api/js/org.w3c.dom.encryptedmedia.kt b/libraries/stdlib/api/js/org.w3c.dom.encryptedmedia.kt index 3dde259928b..650f5cc554c 100644 --- a/libraries/stdlib/api/js/org.w3c.dom.encryptedmedia.kt +++ b/libraries/stdlib/api/js/org.w3c.dom.encryptedmedia.kt @@ -85,11 +85,12 @@ public open external class MediaKeyMessageEvent : org.w3c.dom.events.Event { } public external interface MediaKeyMessageEventInit : org.w3c.dom.EventInit { - public open var message: org.khronos.webgl.ArrayBuffer? { get; set; } + public abstract var message: org.khronos.webgl.ArrayBuffer? { get; set; } - public open var messageType: org.w3c.dom.encryptedmedia.MediaKeyMessageType? { get; set; } + public abstract var messageType: org.w3c.dom.encryptedmedia.MediaKeyMessageType? { get; set; } } +@kotlin.js.JsName(name = "null") public external interface MediaKeyMessageType { public companion object of MediaKeyMessageType { } @@ -121,11 +122,13 @@ public abstract external class MediaKeySession : org.w3c.dom.events.EventTarget public final fun update(response: dynamic): kotlin.js.Promise } +@kotlin.js.JsName(name = "null") public external interface MediaKeySessionType { public companion object of MediaKeySessionType { } } +@kotlin.js.JsName(name = "null") public external interface MediaKeyStatus { public companion object of MediaKeyStatus { } @@ -181,6 +184,7 @@ public abstract external class MediaKeys { public final fun setServerCertificate(serverCertificate: dynamic): kotlin.js.Promise } +@kotlin.js.JsName(name = "null") public external interface MediaKeysRequirement { public companion object of MediaKeysRequirement { } diff --git a/libraries/stdlib/api/js/org.w3c.dom.kt b/libraries/stdlib/api/js/org.w3c.dom.kt index c9da485fdde..e79477eaec3 100644 --- a/libraries/stdlib/api/js/org.w3c.dom.kt +++ b/libraries/stdlib/api/js/org.w3c.dom.kt @@ -769,6 +769,7 @@ public open external class BeforeUnloadEvent : org.w3c.dom.events.Event { } } +@kotlin.js.JsName(name = "null") public external interface BinaryType { public companion object of BinaryType { } @@ -834,11 +835,13 @@ public open external class CDATASection : org.w3c.dom.Text { } } +@kotlin.js.JsName(name = "null") public external interface CSSBoxType { public companion object of CSSBoxType { } } +@kotlin.js.JsName(name = "null") public external interface CanPlayTypeResult { public companion object of CanPlayTypeResult { } @@ -850,6 +853,7 @@ public external interface CanvasCompositing { public abstract var globalCompositeOperation: kotlin.String { get; set; } } +@kotlin.js.JsName(name = "null") public external interface CanvasDirection { public companion object of CanvasDirection { } @@ -889,6 +893,7 @@ public external interface CanvasDrawPath { public abstract fun stroke(path: org.w3c.dom.Path2D): kotlin.Unit } +@kotlin.js.JsName(name = "null") public external interface CanvasFillRule { public companion object of CanvasFillRule { } @@ -945,11 +950,13 @@ public external interface CanvasImageSmoothing { public external interface CanvasImageSource : org.w3c.dom.ImageBitmapSource { } +@kotlin.js.JsName(name = "null") public external interface CanvasLineCap { public companion object of CanvasLineCap { } } +@kotlin.js.JsName(name = "null") public external interface CanvasLineJoin { public companion object of CanvasLineJoin { } @@ -1041,11 +1048,13 @@ public external interface CanvasText { public abstract fun strokeText(text: kotlin.String, x: kotlin.Double, y: kotlin.Double, maxWidth: kotlin.Double = ...): kotlin.Unit } +@kotlin.js.JsName(name = "null") public external interface CanvasTextAlign { public companion object of CanvasTextAlign { } } +@kotlin.js.JsName(name = "null") public external interface CanvasTextBaseline { public companion object of CanvasTextBaseline { } @@ -1193,6 +1202,7 @@ public external interface CloseEventInit : org.w3c.dom.EventInit { public open var wasClean: kotlin.Boolean? { get; set; } } +@kotlin.js.JsName(name = "null") public external interface ColorSpaceConversion { public companion object of ColorSpaceConversion { } @@ -2120,6 +2130,7 @@ public external interface DocumentOrShadowRoot { public open val fullscreenElement: org.w3c.dom.Element? { get; } } +@kotlin.js.JsName(name = "null") public external interface DocumentReadyState { public companion object of DocumentReadyState { } @@ -7376,11 +7387,13 @@ public open external class ImageData : org.w3c.dom.ImageBitmapSource, org.khrono public open val width: kotlin.Int { get; } } +@kotlin.js.JsName(name = "null") public external interface ImageOrientation { public companion object of ImageOrientation { } } +@kotlin.js.JsName(name = "null") public external interface ImageSmoothingQuality { public companion object of ImageSmoothingQuality { } @@ -8231,6 +8244,7 @@ public external interface PopStateEventInit : org.w3c.dom.EventInit { public open var state: kotlin.Any? { get; set; } } +@kotlin.js.JsName(name = "null") public external interface PremultiplyAlpha { public companion object of PremultiplyAlpha { } @@ -8299,7 +8313,7 @@ public open external class PromiseRejectionEvent : org.w3c.dom.events.Event { } public external interface PromiseRejectionEventInit : org.w3c.dom.EventInit { - public open var promise: kotlin.js.Promise? { get; set; } + public abstract var promise: kotlin.js.Promise? { get; set; } public open var reason: kotlin.Any? { get; set; } } @@ -8405,6 +8419,7 @@ public external interface RelatedEventInit : org.w3c.dom.EventInit { public external interface RenderingContext { } +@kotlin.js.JsName(name = "null") public external interface ResizeQuality { public companion object of ResizeQuality { } @@ -8426,6 +8441,7 @@ public abstract external class Screen { public open val width: kotlin.Int { get; } } +@kotlin.js.JsName(name = "null") public external interface ScrollBehavior { public companion object of ScrollBehavior { } @@ -8437,6 +8453,7 @@ public external interface ScrollIntoViewOptions : org.w3c.dom.ScrollOptions { public open var inline: org.w3c.dom.ScrollLogicalPosition? { get; set; } } +@kotlin.js.JsName(name = "null") public external interface ScrollLogicalPosition { public companion object of ScrollLogicalPosition { } @@ -8446,6 +8463,7 @@ public external interface ScrollOptions { public open var behavior: org.w3c.dom.ScrollBehavior? { get; set; } } +@kotlin.js.JsName(name = "null") public external interface ScrollRestoration { public companion object of ScrollRestoration { } @@ -8457,6 +8475,7 @@ public external interface ScrollToOptions : org.w3c.dom.ScrollOptions { public open var top: kotlin.Double? { get; set; } } +@kotlin.js.JsName(name = "null") public external interface SelectionMode { public companion object of SelectionMode { } @@ -8511,9 +8530,10 @@ public open external class ShadowRoot : org.w3c.dom.DocumentFragment, org.w3c.do } public external interface ShadowRootInit { - public open var mode: org.w3c.dom.ShadowRootMode? { get; set; } + public abstract var mode: org.w3c.dom.ShadowRootMode? { get; set; } } +@kotlin.js.JsName(name = "null") public external interface ShadowRootMode { public companion object of ShadowRootMode { } @@ -8745,6 +8765,7 @@ public abstract external class TextTrackCueList { public final fun getCueById(id: kotlin.String): org.w3c.dom.TextTrackCue? } +@kotlin.js.JsName(name = "null") public external interface TextTrackKind { public companion object of TextTrackKind { } @@ -8764,6 +8785,7 @@ public abstract external class TextTrackList : org.w3c.dom.events.EventTarget { public final fun getTrackById(id: kotlin.String): org.w3c.dom.TextTrack? } +@kotlin.js.JsName(name = "null") public external interface TextTrackMode { public companion object of TextTrackMode { } @@ -9265,6 +9287,7 @@ public external interface WorkerOptions { public open var type: org.w3c.dom.WorkerType? { get; set; } } +@kotlin.js.JsName(name = "null") public external interface WorkerType { public companion object of WorkerType { } diff --git a/libraries/stdlib/api/js/org.w3c.dom.mediacapture.kt b/libraries/stdlib/api/js/org.w3c.dom.mediacapture.kt index c34bd48596d..13ee88817ad 100644 --- a/libraries/stdlib/api/js/org.w3c.dom.mediacapture.kt +++ b/libraries/stdlib/api/js/org.w3c.dom.mediacapture.kt @@ -146,6 +146,7 @@ public abstract external class MediaDeviceInfo { public final fun toJSON(): dynamic } +@kotlin.js.JsName(name = "null") public external interface MediaDeviceKind { public companion object of MediaDeviceKind { } @@ -252,9 +253,10 @@ public open external class MediaStreamTrackEvent : org.w3c.dom.events.Event { } public external interface MediaStreamTrackEventInit : org.w3c.dom.EventInit { - public open var track: org.w3c.dom.mediacapture.MediaStreamTrack? { get; set; } + public abstract var track: org.w3c.dom.mediacapture.MediaStreamTrack? { get; set; } } +@kotlin.js.JsName(name = "null") public external interface MediaStreamTrackState { public companion object of MediaStreamTrackState { } @@ -429,11 +431,13 @@ public external interface ULongRange { public open var min: kotlin.Int? { get; set; } } +@kotlin.js.JsName(name = "null") public external interface VideoFacingModeEnum { public companion object of VideoFacingModeEnum { } } +@kotlin.js.JsName(name = "null") public external interface VideoResizeModeEnum { public companion object of VideoResizeModeEnum { } diff --git a/libraries/stdlib/api/js/org.w3c.dom.mediasource.kt b/libraries/stdlib/api/js/org.w3c.dom.mediasource.kt index a35f555e9a1..c3ad0a52bff 100644 --- a/libraries/stdlib/api/js/org.w3c.dom.mediasource.kt +++ b/libraries/stdlib/api/js/org.w3c.dom.mediasource.kt @@ -15,11 +15,13 @@ public val org.w3c.dom.mediasource.AppendMode.Companion.SEQUENCE: org.w3c.dom.me @kotlin.internal.InlineOnly public inline operator fun org.w3c.dom.mediasource.SourceBufferList.get(index: kotlin.Int): org.w3c.dom.mediasource.SourceBuffer? +@kotlin.js.JsName(name = "null") public external interface AppendMode { public companion object of AppendMode { } } +@kotlin.js.JsName(name = "null") public external interface EndOfStreamError { public companion object of EndOfStreamError { } @@ -57,6 +59,7 @@ public open external class MediaSource : org.w3c.dom.events.EventTarget, org.w3c } } +@kotlin.js.JsName(name = "null") public external interface ReadyState { public companion object of ReadyState { } diff --git a/libraries/stdlib/api/js/org.w3c.fetch.kt b/libraries/stdlib/api/js/org.w3c.fetch.kt index 393e775ec68..66106bf2476 100644 --- a/libraries/stdlib/api/js/org.w3c.fetch.kt +++ b/libraries/stdlib/api/js/org.w3c.fetch.kt @@ -166,16 +166,19 @@ public open external class Request : org.w3c.fetch.Body { public open override fun text(): kotlin.js.Promise } +@kotlin.js.JsName(name = "null") public external interface RequestCache { public companion object of RequestCache { } } +@kotlin.js.JsName(name = "null") public external interface RequestCredentials { public companion object of RequestCredentials { } } +@kotlin.js.JsName(name = "null") public external interface RequestDestination { public companion object of RequestDestination { } @@ -207,16 +210,19 @@ public external interface RequestInit { public open var window: kotlin.Any? { get; set; } } +@kotlin.js.JsName(name = "null") public external interface RequestMode { public companion object of RequestMode { } } +@kotlin.js.JsName(name = "null") public external interface RequestRedirect { public companion object of RequestRedirect { } } +@kotlin.js.JsName(name = "null") public external interface RequestType { public companion object of RequestType { } @@ -272,6 +278,7 @@ public external interface ResponseInit { public open var statusText: kotlin.String? { get; set; } } +@kotlin.js.JsName(name = "null") public external interface ResponseType { public companion object of ResponseType { } diff --git a/libraries/stdlib/api/js/org.w3c.notifications.kt b/libraries/stdlib/api/js/org.w3c.notifications.kt index a74dccf465f..1c7c5d23485 100644 --- a/libraries/stdlib/api/js/org.w3c.notifications.kt +++ b/libraries/stdlib/api/js/org.w3c.notifications.kt @@ -81,13 +81,14 @@ public open external class Notification : org.w3c.dom.events.EventTarget { } public external interface NotificationAction { - public open var action: kotlin.String? { get; set; } + public abstract var action: kotlin.String? { get; set; } public open var icon: kotlin.String? { get; set; } - public open var title: kotlin.String? { get; set; } + public abstract var title: kotlin.String? { get; set; } } +@kotlin.js.JsName(name = "null") public external interface NotificationDirection { public companion object of NotificationDirection { } @@ -114,7 +115,7 @@ public open external class NotificationEvent : org.w3c.workers.ExtendableEvent { public external interface NotificationEventInit : org.w3c.workers.ExtendableEventInit { public open var action: kotlin.String? { get; set; } - public open var notification: org.w3c.notifications.Notification? { get; set; } + public abstract var notification: org.w3c.notifications.Notification? { get; set; } } public external interface NotificationOptions { @@ -153,6 +154,7 @@ public external interface NotificationOptions { public open var vibrate: dynamic { get; set; } } +@kotlin.js.JsName(name = "null") public external interface NotificationPermission { public companion object of NotificationPermission { } diff --git a/libraries/stdlib/api/js/org.w3c.workers.kt b/libraries/stdlib/api/js/org.w3c.workers.kt index e3e2bd3e994..b1369291951 100644 --- a/libraries/stdlib/api/js/org.w3c.workers.kt +++ b/libraries/stdlib/api/js/org.w3c.workers.kt @@ -127,6 +127,7 @@ public external interface ClientQueryOptions { public open var type: org.w3c.workers.ClientType? { get; set; } } +@kotlin.js.JsName(name = "null") public external interface ClientType { public companion object of ClientType { } @@ -226,7 +227,7 @@ public external interface FetchEventInit : org.w3c.workers.ExtendableEventInit { public open var isReload: kotlin.Boolean? { get; set; } - public open var request: org.w3c.fetch.Request? { get; set; } + public abstract var request: org.w3c.fetch.Request? { get; set; } } public open external class ForeignFetchEvent : org.w3c.workers.ExtendableEvent { @@ -252,13 +253,13 @@ public open external class ForeignFetchEvent : org.w3c.workers.ExtendableEvent { public external interface ForeignFetchEventInit : org.w3c.workers.ExtendableEventInit { public open var origin: kotlin.String? { get; set; } - public open var request: org.w3c.fetch.Request? { get; set; } + public abstract var request: org.w3c.fetch.Request? { get; set; } } public external interface ForeignFetchOptions { - public open var origins: kotlin.Array? { get; set; } + public abstract var origins: kotlin.Array? { get; set; } - public open var scopes: kotlin.Array? { get; set; } + public abstract var scopes: kotlin.Array? { get; set; } } public external interface ForeignFetchResponse { @@ -266,9 +267,10 @@ public external interface ForeignFetchResponse { public open var origin: kotlin.String? { get; set; } - public open var response: org.w3c.fetch.Response? { get; set; } + public abstract var response: org.w3c.fetch.Response? { get; set; } } +@kotlin.js.JsName(name = "null") public external interface FrameType { public companion object of FrameType { } @@ -430,6 +432,7 @@ public abstract external class ServiceWorkerRegistration : org.w3c.dom.events.Ev public final fun update(): kotlin.js.Promise } +@kotlin.js.JsName(name = "null") public external interface ServiceWorkerState { public companion object of ServiceWorkerState { } diff --git a/libraries/stdlib/api/js/org.w3c.xhr.kt b/libraries/stdlib/api/js/org.w3c.xhr.kt index b6b5adc50d4..0e5ec8df3f3 100644 --- a/libraries/stdlib/api/js/org.w3c.xhr.kt +++ b/libraries/stdlib/api/js/org.w3c.xhr.kt @@ -135,6 +135,7 @@ public abstract external class XMLHttpRequestEventTarget : org.w3c.dom.events.Ev public open var ontimeout: ((org.w3c.dom.events.Event) -> dynamic)? { get; set; } } +@kotlin.js.JsName(name = "null") public external interface XMLHttpRequestResponseType { public companion object of XMLHttpRequestResponseType { } diff --git a/libraries/stdlib/jdk7/build.gradle b/libraries/stdlib/jdk7/build.gradle index 9828cfd9148..a7774d0ed55 100644 --- a/libraries/stdlib/jdk7/build.gradle +++ b/libraries/stdlib/jdk7/build.gradle @@ -77,6 +77,7 @@ compileKotlin { "-Xnormalize-constructor-calls=enable", "-Xopt-in=kotlin.RequiresOptIn", "-Xopt-in=kotlin.contracts.ExperimentalContracts", + "-Xsuppress-deprecated-jvm-target-warning", ] kotlinOptions.moduleName = project.name } @@ -90,6 +91,7 @@ compileTestKotlin { "-Xopt-in=kotlin.ExperimentalStdlibApi", "-Xopt-in=kotlin.io.path.ExperimentalPathApi", "-Xcommon-sources=${fileTree('../test').join(',')}", + "-Xsuppress-deprecated-jvm-target-warning", ] } diff --git a/libraries/stdlib/js-ir/builtins/Char.kt b/libraries/stdlib/js-ir/builtins/Char.kt index 73681f6eadc..30658aba960 100644 --- a/libraries/stdlib/js-ir/builtins/Char.kt +++ b/libraries/stdlib/js-ir/builtins/Char.kt @@ -10,7 +10,6 @@ package kotlin * On the JVM, non-nullable values of this type are represented as values of the primitive type `char`. */ // TODO: KT-35100 -//@Suppress("NON_PUBLIC_PRIMARY_CONSTRUCTOR_OF_INLINE_CLASS") //public inline class Char internal constructor (val value: Int) : Comparable { public class Char @OptIn(ExperimentalUnsignedTypes::class) diff --git a/libraries/stdlib/js-ir/runtime/coreRuntime.kt b/libraries/stdlib/js-ir/runtime/coreRuntime.kt index d64a8cc7e5a..e9bd9d36d0c 100644 --- a/libraries/stdlib/js-ir/runtime/coreRuntime.kt +++ b/libraries/stdlib/js-ir/runtime/coreRuntime.kt @@ -49,7 +49,7 @@ internal fun hashCode(obj: dynamic): Int { "function" -> getObjectHashCode(obj) "number" -> getNumberHashCode(obj) "boolean" -> if(obj.unsafeCast()) 1 else 0 - else -> getStringHashCode(js("String(obj)")) + else -> getStringHashCode(js("String")(obj)) } } diff --git a/libraries/stdlib/js/src/org.w3c/org.khronos.webgl.kt b/libraries/stdlib/js/src/org.w3c/org.khronos.webgl.kt index 3f496191b7f..975c0c270b5 100644 --- a/libraries/stdlib/js/src/org.w3c/org.khronos.webgl.kt +++ b/libraries/stdlib/js/src/org.w3c/org.khronos.webgl.kt @@ -1,5 +1,5 @@ /* - * Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Copyright 2010-2021 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. */ @@ -9,24 +9,8 @@ package org.khronos.webgl import kotlin.js.* -import org.w3c.css.masking.* import org.w3c.dom.* -import org.w3c.dom.clipboard.* -import org.w3c.dom.css.* -import org.w3c.dom.encryptedmedia.* import org.w3c.dom.events.* -import org.w3c.dom.mediacapture.* -import org.w3c.dom.mediasource.* -import org.w3c.dom.parsing.* -import org.w3c.dom.pointerevents.* -import org.w3c.dom.svg.* -import org.w3c.dom.url.* -import org.w3c.fetch.* -import org.w3c.files.* -import org.w3c.notifications.* -import org.w3c.performance.* -import org.w3c.workers.* -import org.w3c.xhr.* public external interface WebGLContextAttributes { var alpha: Boolean? /* = true */ @@ -55,6 +39,7 @@ public external interface WebGLContextAttributes { set(value) = definedExternally } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline fun WebGLContextAttributes(alpha: Boolean? = true, depth: Boolean? = true, stencil: Boolean? = false, antialias: Boolean? = true, premultipliedAlpha: Boolean? = true, preserveDrawingBuffer: Boolean? = false, preferLowPowerToHighPerformance: Boolean? = false, failIfMajorPerformanceCaveat: Boolean? = false): WebGLContextAttributes { val o = js("({})") @@ -906,6 +891,7 @@ public external interface WebGLContextEventInit : EventInit { set(value) = definedExternally } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline fun WebGLContextEventInit(statusMessage: String? = "", bubbles: Boolean? = false, cancelable: Boolean? = false, composed: Boolean? = false): WebGLContextEventInit { val o = js("({})") @@ -958,9 +944,11 @@ public external open class Int8Array : ArrayBufferView { } } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline operator fun Int8Array.get(index: Int): Byte = asDynamic()[index] +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline operator fun Int8Array.set(index: Int, value: Byte) { asDynamic()[index] = value } @@ -985,9 +973,11 @@ public external open class Uint8Array : ArrayBufferView { } } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline operator fun Uint8Array.get(index: Int): Byte = asDynamic()[index] +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline operator fun Uint8Array.set(index: Int, value: Byte) { asDynamic()[index] = value } @@ -1012,9 +1002,11 @@ public external open class Uint8ClampedArray : ArrayBufferView { } } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline operator fun Uint8ClampedArray.get(index: Int): Byte = asDynamic()[index] +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline operator fun Uint8ClampedArray.set(index: Int, value: Byte) { asDynamic()[index] = value } @@ -1039,9 +1031,11 @@ public external open class Int16Array : ArrayBufferView { } } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline operator fun Int16Array.get(index: Int): Short = asDynamic()[index] +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline operator fun Int16Array.set(index: Int, value: Short) { asDynamic()[index] = value } @@ -1066,9 +1060,11 @@ public external open class Uint16Array : ArrayBufferView { } } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline operator fun Uint16Array.get(index: Int): Short = asDynamic()[index] +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline operator fun Uint16Array.set(index: Int, value: Short) { asDynamic()[index] = value } @@ -1093,9 +1089,11 @@ public external open class Int32Array : ArrayBufferView { } } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline operator fun Int32Array.get(index: Int): Int = asDynamic()[index] +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline operator fun Int32Array.set(index: Int, value: Int) { asDynamic()[index] = value } @@ -1120,9 +1118,11 @@ public external open class Uint32Array : ArrayBufferView { } } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline operator fun Uint32Array.get(index: Int): Int = asDynamic()[index] +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline operator fun Uint32Array.set(index: Int, value: Int) { asDynamic()[index] = value } @@ -1147,9 +1147,11 @@ public external open class Float32Array : ArrayBufferView { } } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline operator fun Float32Array.get(index: Int): Float = asDynamic()[index] +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline operator fun Float32Array.set(index: Int, value: Float) { asDynamic()[index] = value } @@ -1174,9 +1176,11 @@ public external open class Float64Array : ArrayBufferView { } } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline operator fun Float64Array.get(index: Int): Double = asDynamic()[index] +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline operator fun Float64Array.set(index: Int, value: Double) { asDynamic()[index] = value } diff --git a/libraries/stdlib/js/src/org.w3c/org.w3c.css.masking.kt b/libraries/stdlib/js/src/org.w3c/org.w3c.css.masking.kt index 50628209f67..238a7f10d8c 100644 --- a/libraries/stdlib/js/src/org.w3c/org.w3c.css.masking.kt +++ b/libraries/stdlib/js/src/org.w3c/org.w3c.css.masking.kt @@ -1,5 +1,5 @@ /* - * Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Copyright 2010-2021 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. */ @@ -10,23 +10,7 @@ package org.w3c.css.masking import kotlin.js.* import org.khronos.webgl.* -import org.w3c.dom.* -import org.w3c.dom.clipboard.* -import org.w3c.dom.css.* -import org.w3c.dom.encryptedmedia.* -import org.w3c.dom.events.* -import org.w3c.dom.mediacapture.* -import org.w3c.dom.mediasource.* -import org.w3c.dom.parsing.* -import org.w3c.dom.pointerevents.* import org.w3c.dom.svg.* -import org.w3c.dom.url.* -import org.w3c.fetch.* -import org.w3c.files.* -import org.w3c.notifications.* -import org.w3c.performance.* -import org.w3c.workers.* -import org.w3c.xhr.* /** * Exposes the JavaScript [SVGClipPathElement](https://developer.mozilla.org/en/docs/Web/API/SVGClipPathElement) to Kotlin diff --git a/libraries/stdlib/js/src/org.w3c/org.w3c.dom.clipboard.kt b/libraries/stdlib/js/src/org.w3c/org.w3c.dom.clipboard.kt index 38f2da5d563..23d09904917 100644 --- a/libraries/stdlib/js/src/org.w3c/org.w3c.dom.clipboard.kt +++ b/libraries/stdlib/js/src/org.w3c/org.w3c.dom.clipboard.kt @@ -1,5 +1,5 @@ /* - * Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Copyright 2010-2021 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. */ @@ -10,23 +10,8 @@ package org.w3c.dom.clipboard import kotlin.js.* import org.khronos.webgl.* -import org.w3c.css.masking.* import org.w3c.dom.* -import org.w3c.dom.css.* -import org.w3c.dom.encryptedmedia.* import org.w3c.dom.events.* -import org.w3c.dom.mediacapture.* -import org.w3c.dom.mediasource.* -import org.w3c.dom.parsing.* -import org.w3c.dom.pointerevents.* -import org.w3c.dom.svg.* -import org.w3c.dom.url.* -import org.w3c.fetch.* -import org.w3c.files.* -import org.w3c.notifications.* -import org.w3c.performance.* -import org.w3c.workers.* -import org.w3c.xhr.* public external interface ClipboardEventInit : EventInit { var clipboardData: DataTransfer? /* = null */ @@ -34,6 +19,7 @@ public external interface ClipboardEventInit : EventInit { set(value) = definedExternally } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline fun ClipboardEventInit(clipboardData: DataTransfer? = null, bubbles: Boolean? = false, cancelable: Boolean? = false, composed: Boolean? = false): ClipboardEventInit { val o = js("({})") @@ -74,6 +60,7 @@ public external interface ClipboardPermissionDescriptor { set(value) = definedExternally } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline fun ClipboardPermissionDescriptor(allowWithoutGesture: Boolean? = false): ClipboardPermissionDescriptor { val o = js("({})") diff --git a/libraries/stdlib/js/src/org.w3c/org.w3c.dom.css.kt b/libraries/stdlib/js/src/org.w3c/org.w3c.dom.css.kt index d538ba2f16a..21c1d8f0e73 100644 --- a/libraries/stdlib/js/src/org.w3c/org.w3c.dom.css.kt +++ b/libraries/stdlib/js/src/org.w3c/org.w3c.dom.css.kt @@ -1,5 +1,5 @@ /* - * Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Copyright 2010-2021 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. */ @@ -10,23 +10,7 @@ package org.w3c.dom.css import kotlin.js.* import org.khronos.webgl.* -import org.w3c.css.masking.* import org.w3c.dom.* -import org.w3c.dom.clipboard.* -import org.w3c.dom.encryptedmedia.* -import org.w3c.dom.events.* -import org.w3c.dom.mediacapture.* -import org.w3c.dom.mediasource.* -import org.w3c.dom.parsing.* -import org.w3c.dom.pointerevents.* -import org.w3c.dom.svg.* -import org.w3c.dom.url.* -import org.w3c.fetch.* -import org.w3c.files.* -import org.w3c.notifications.* -import org.w3c.performance.* -import org.w3c.workers.* -import org.w3c.xhr.* public external abstract class MediaList : ItemArrayLike { open var mediaText: String @@ -35,6 +19,7 @@ public external abstract class MediaList : ItemArrayLike { override fun item(index: Int): String? } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline operator fun MediaList.get(index: Int): String? = asDynamic()[index] @@ -68,6 +53,7 @@ public external abstract class StyleSheetList : ItemArrayLike { override fun item(index: Int): StyleSheet? } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline operator fun StyleSheetList.get(index: Int): StyleSheet? = asDynamic()[index] @@ -86,6 +72,7 @@ public external abstract class CSSRuleList : ItemArrayLike { override fun item(index: Int): CSSRule? } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline operator fun CSSRuleList.get(index: Int): CSSRule? = asDynamic()[index] @@ -480,6 +467,7 @@ public external abstract class CSSStyleDeclaration : ItemArrayLike { override fun item(index: Int): String } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline operator fun CSSStyleDeclaration.get(index: Int): String? = asDynamic()[index] diff --git a/libraries/stdlib/js/src/org.w3c/org.w3c.dom.encryptedmedia.kt b/libraries/stdlib/js/src/org.w3c/org.w3c.dom.encryptedmedia.kt index 993211e89cb..5d994712402 100644 --- a/libraries/stdlib/js/src/org.w3c/org.w3c.dom.encryptedmedia.kt +++ b/libraries/stdlib/js/src/org.w3c/org.w3c.dom.encryptedmedia.kt @@ -1,5 +1,5 @@ /* - * Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Copyright 2010-2021 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. */ @@ -10,24 +10,12 @@ package org.w3c.dom.encryptedmedia import kotlin.js.* import org.khronos.webgl.* -import org.w3c.css.masking.* import org.w3c.dom.* -import org.w3c.dom.clipboard.* -import org.w3c.dom.css.* import org.w3c.dom.events.* -import org.w3c.dom.mediacapture.* -import org.w3c.dom.mediasource.* -import org.w3c.dom.parsing.* -import org.w3c.dom.pointerevents.* -import org.w3c.dom.svg.* -import org.w3c.dom.url.* -import org.w3c.fetch.* -import org.w3c.files.* -import org.w3c.notifications.* -import org.w3c.performance.* -import org.w3c.workers.* -import org.w3c.xhr.* +/** + * Exposes the JavaScript [MediaKeySystemConfiguration](https://developer.mozilla.org/en/docs/Web/API/MediaKeySystemConfiguration) to Kotlin + */ public external interface MediaKeySystemConfiguration { var label: String? /* = "" */ get() = definedExternally @@ -52,6 +40,7 @@ public external interface MediaKeySystemConfiguration { set(value) = definedExternally } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline fun MediaKeySystemConfiguration(label: String? = "", initDataTypes: Array? = arrayOf(), audioCapabilities: Array? = arrayOf(), videoCapabilities: Array? = arrayOf(), distinctiveIdentifier: MediaKeysRequirement? = MediaKeysRequirement.OPTIONAL, persistentState: MediaKeysRequirement? = MediaKeysRequirement.OPTIONAL, sessionTypes: Array? = undefined): MediaKeySystemConfiguration { val o = js("({})") @@ -74,6 +63,7 @@ public external interface MediaKeySystemMediaCapability { set(value) = definedExternally } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline fun MediaKeySystemMediaCapability(contentType: String? = "", robustness: String? = ""): MediaKeySystemMediaCapability { val o = js("({})") @@ -82,17 +72,26 @@ public inline fun MediaKeySystemMediaCapability(contentType: String? = "", robus return o } +/** + * Exposes the JavaScript [MediaKeySystemAccess](https://developer.mozilla.org/en/docs/Web/API/MediaKeySystemAccess) to Kotlin + */ public external abstract class MediaKeySystemAccess { open val keySystem: String fun getConfiguration(): MediaKeySystemConfiguration fun createMediaKeys(): Promise } +/** + * Exposes the JavaScript [MediaKeys](https://developer.mozilla.org/en/docs/Web/API/MediaKeys) to Kotlin + */ public external abstract class MediaKeys { fun createSession(sessionType: MediaKeySessionType = definedExternally): MediaKeySession fun setServerCertificate(serverCertificate: dynamic): Promise } +/** + * Exposes the JavaScript [MediaKeySession](https://developer.mozilla.org/en/docs/Web/API/MediaKeySession) to Kotlin + */ public external abstract class MediaKeySession : EventTarget { open val sessionId: String open val expiration: Double @@ -107,12 +106,18 @@ public external abstract class MediaKeySession : EventTarget { fun remove(): Promise } +/** + * Exposes the JavaScript [MediaKeyStatusMap](https://developer.mozilla.org/en/docs/Web/API/MediaKeyStatusMap) to Kotlin + */ public external abstract class MediaKeyStatusMap { open val size: Int fun has(keyId: dynamic): Boolean fun get(keyId: dynamic): Any? } +/** + * Exposes the JavaScript [MediaKeyMessageEvent](https://developer.mozilla.org/en/docs/Web/API/MediaKeyMessageEvent) to Kotlin + */ public external open class MediaKeyMessageEvent(type: String, eventInitDict: MediaKeyMessageEventInit) : Event { open val messageType: MediaKeyMessageType open val message: ArrayBuffer @@ -127,13 +132,10 @@ public external open class MediaKeyMessageEvent(type: String, eventInitDict: Med public external interface MediaKeyMessageEventInit : EventInit { var messageType: MediaKeyMessageType? - get() = definedExternally - set(value) = definedExternally var message: ArrayBuffer? - get() = definedExternally - set(value) = definedExternally } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline fun MediaKeyMessageEventInit(messageType: MediaKeyMessageType?, message: ArrayBuffer?, bubbles: Boolean? = false, cancelable: Boolean? = false, composed: Boolean? = false): MediaKeyMessageEventInit { val o = js("({})") @@ -166,6 +168,7 @@ public external interface MediaEncryptedEventInit : EventInit { set(value) = definedExternally } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline fun MediaEncryptedEventInit(initDataType: String? = "", initData: ArrayBuffer? = null, bubbles: Boolean? = false, cancelable: Boolean? = false, composed: Boolean? = false): MediaEncryptedEventInit { val o = js("({})") @@ -178,6 +181,7 @@ public inline fun MediaEncryptedEventInit(initDataType: String? = "", initData: } /* please, don't implement this interface! */ +@JsName("null") @Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE") public external interface MediaKeysRequirement { companion object @@ -190,6 +194,7 @@ public inline val MediaKeysRequirement.Companion.OPTIONAL: MediaKeysRequirement public inline val MediaKeysRequirement.Companion.NOT_ALLOWED: MediaKeysRequirement get() = "not-allowed".asDynamic().unsafeCast() /* please, don't implement this interface! */ +@JsName("null") @Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE") public external interface MediaKeySessionType { companion object @@ -200,6 +205,7 @@ public inline val MediaKeySessionType.Companion.TEMPORARY: MediaKeySessionType g public inline val MediaKeySessionType.Companion.PERSISTENT_LICENSE: MediaKeySessionType get() = "persistent-license".asDynamic().unsafeCast() /* please, don't implement this interface! */ +@JsName("null") @Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE") public external interface MediaKeyStatus { companion object @@ -220,6 +226,7 @@ public inline val MediaKeyStatus.Companion.STATUS_PENDING: MediaKeyStatus get() public inline val MediaKeyStatus.Companion.INTERNAL_ERROR: MediaKeyStatus get() = "internal-error".asDynamic().unsafeCast() /* please, don't implement this interface! */ +@JsName("null") @Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE") public external interface MediaKeyMessageType { companion object diff --git a/libraries/stdlib/js/src/org.w3c/org.w3c.dom.events.kt b/libraries/stdlib/js/src/org.w3c/org.w3c.dom.events.kt index a86ea8aad02..e0f6dbb157e 100644 --- a/libraries/stdlib/js/src/org.w3c/org.w3c.dom.events.kt +++ b/libraries/stdlib/js/src/org.w3c/org.w3c.dom.events.kt @@ -1,5 +1,5 @@ /* - * Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Copyright 2010-2021 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. */ @@ -10,23 +10,7 @@ package org.w3c.dom.events import kotlin.js.* import org.khronos.webgl.* -import org.w3c.css.masking.* import org.w3c.dom.* -import org.w3c.dom.clipboard.* -import org.w3c.dom.css.* -import org.w3c.dom.encryptedmedia.* -import org.w3c.dom.mediacapture.* -import org.w3c.dom.mediasource.* -import org.w3c.dom.parsing.* -import org.w3c.dom.pointerevents.* -import org.w3c.dom.svg.* -import org.w3c.dom.url.* -import org.w3c.fetch.* -import org.w3c.files.* -import org.w3c.notifications.* -import org.w3c.performance.* -import org.w3c.workers.* -import org.w3c.xhr.* /** * Exposes the JavaScript [UIEvent](https://developer.mozilla.org/en/docs/Web/API/UIEvent) to Kotlin @@ -52,6 +36,7 @@ public external interface UIEventInit : EventInit { set(value) = definedExternally } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline fun UIEventInit(view: Window? = null, detail: Int? = 0, bubbles: Boolean? = false, cancelable: Boolean? = false, composed: Boolean? = false): UIEventInit { val o = js("({})") @@ -83,6 +68,7 @@ public external interface FocusEventInit : UIEventInit { set(value) = definedExternally } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline fun FocusEventInit(relatedTarget: EventTarget? = null, view: Window? = null, detail: Int? = 0, bubbles: Boolean? = false, cancelable: Boolean? = false, composed: Boolean? = false): FocusEventInit { val o = js("({})") @@ -154,6 +140,7 @@ public external interface MouseEventInit : EventModifierInit { set(value) = definedExternally } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline fun MouseEventInit(screenX: Int? = 0, screenY: Int? = 0, clientX: Int? = 0, clientY: Int? = 0, button: Short? = 0, buttons: Short? = 0, relatedTarget: EventTarget? = null, region: String? = null, ctrlKey: Boolean? = false, shiftKey: Boolean? = false, altKey: Boolean? = false, metaKey: Boolean? = false, modifierAltGraph: Boolean? = false, modifierCapsLock: Boolean? = false, modifierFn: Boolean? = false, modifierFnLock: Boolean? = false, modifierHyper: Boolean? = false, modifierNumLock: Boolean? = false, modifierScrollLock: Boolean? = false, modifierSuper: Boolean? = false, modifierSymbol: Boolean? = false, modifierSymbolLock: Boolean? = false, view: Window? = null, detail: Int? = 0, bubbles: Boolean? = false, cancelable: Boolean? = false, composed: Boolean? = false): MouseEventInit { val o = js("({})") @@ -232,6 +219,7 @@ public external interface EventModifierInit : UIEventInit { set(value) = definedExternally } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline fun EventModifierInit(ctrlKey: Boolean? = false, shiftKey: Boolean? = false, altKey: Boolean? = false, metaKey: Boolean? = false, modifierAltGraph: Boolean? = false, modifierCapsLock: Boolean? = false, modifierFn: Boolean? = false, modifierFnLock: Boolean? = false, modifierHyper: Boolean? = false, modifierNumLock: Boolean? = false, modifierScrollLock: Boolean? = false, modifierSuper: Boolean? = false, modifierSymbol: Boolean? = false, modifierSymbolLock: Boolean? = false, view: Window? = null, detail: Int? = 0, bubbles: Boolean? = false, cancelable: Boolean? = false, composed: Boolean? = false): EventModifierInit { val o = js("({})") @@ -292,6 +280,7 @@ public external interface WheelEventInit : MouseEventInit { set(value) = definedExternally } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline fun WheelEventInit(deltaX: Double? = 0.0, deltaY: Double? = 0.0, deltaZ: Double? = 0.0, deltaMode: Int? = 0, screenX: Int? = 0, screenY: Int? = 0, clientX: Int? = 0, clientY: Int? = 0, button: Short? = 0, buttons: Short? = 0, relatedTarget: EventTarget? = null, region: String? = null, ctrlKey: Boolean? = false, shiftKey: Boolean? = false, altKey: Boolean? = false, metaKey: Boolean? = false, modifierAltGraph: Boolean? = false, modifierCapsLock: Boolean? = false, modifierFn: Boolean? = false, modifierFnLock: Boolean? = false, modifierHyper: Boolean? = false, modifierNumLock: Boolean? = false, modifierScrollLock: Boolean? = false, modifierSuper: Boolean? = false, modifierSymbol: Boolean? = false, modifierSymbolLock: Boolean? = false, view: Window? = null, detail: Int? = 0, bubbles: Boolean? = false, cancelable: Boolean? = false, composed: Boolean? = false): WheelEventInit { val o = js("({})") @@ -353,6 +342,7 @@ public external interface InputEventInit : UIEventInit { set(value) = definedExternally } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline fun InputEventInit(data: String? = "", isComposing: Boolean? = false, view: Window? = null, detail: Int? = 0, bubbles: Boolean? = false, cancelable: Boolean? = false, composed: Boolean? = false): InputEventInit { val o = js("({})") @@ -414,6 +404,7 @@ public external interface KeyboardEventInit : EventModifierInit { set(value) = definedExternally } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline fun KeyboardEventInit(key: String? = "", code: String? = "", location: Int? = 0, repeat: Boolean? = false, isComposing: Boolean? = false, ctrlKey: Boolean? = false, shiftKey: Boolean? = false, altKey: Boolean? = false, metaKey: Boolean? = false, modifierAltGraph: Boolean? = false, modifierCapsLock: Boolean? = false, modifierFn: Boolean? = false, modifierFnLock: Boolean? = false, modifierHyper: Boolean? = false, modifierNumLock: Boolean? = false, modifierScrollLock: Boolean? = false, modifierSuper: Boolean? = false, modifierSymbol: Boolean? = false, modifierSymbolLock: Boolean? = false, view: Window? = null, detail: Int? = 0, bubbles: Boolean? = false, cancelable: Boolean? = false, composed: Boolean? = false): KeyboardEventInit { val o = js("({})") @@ -464,6 +455,7 @@ public external interface CompositionEventInit : UIEventInit { set(value) = definedExternally } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline fun CompositionEventInit(data: String? = "", view: Window? = null, detail: Int? = 0, bubbles: Boolean? = false, cancelable: Boolean? = false, composed: Boolean? = false): CompositionEventInit { val o = js("({})") diff --git a/libraries/stdlib/js/src/org.w3c/org.w3c.dom.kt b/libraries/stdlib/js/src/org.w3c/org.w3c.dom.kt index 91bac5b7e03..1b571141a97 100644 --- a/libraries/stdlib/js/src/org.w3c/org.w3c.dom.kt +++ b/libraries/stdlib/js/src/org.w3c/org.w3c.dom.kt @@ -1,5 +1,5 @@ /* - * Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Copyright 2010-2021 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. */ @@ -10,20 +10,16 @@ package org.w3c.dom import kotlin.js.* import org.khronos.webgl.* -import org.w3c.css.masking.* import org.w3c.dom.clipboard.* import org.w3c.dom.css.* import org.w3c.dom.encryptedmedia.* import org.w3c.dom.events.* import org.w3c.dom.mediacapture.* import org.w3c.dom.mediasource.* -import org.w3c.dom.parsing.* import org.w3c.dom.pointerevents.* import org.w3c.dom.svg.* -import org.w3c.dom.url.* import org.w3c.fetch.* import org.w3c.files.* -import org.w3c.notifications.* import org.w3c.performance.* import org.w3c.workers.* import org.w3c.xhr.* @@ -34,9 +30,11 @@ public external abstract class HTMLAllCollection { fun namedItem(name: String): UnionElementOrHTMLCollection? } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline operator fun HTMLAllCollection.get(index: Int): Element? = asDynamic()[index] +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline operator fun HTMLAllCollection.get(name: String): UnionElementOrHTMLCollection? = asDynamic()[name] @@ -62,6 +60,7 @@ public external abstract class HTMLOptionsCollection : HTMLCollection { fun remove(index: Int) } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline operator fun HTMLOptionsCollection.set(index: Int, option: HTMLOptionElement?) { asDynamic()[index] = option } @@ -146,9 +145,11 @@ public external abstract class HTMLUnknownElement : HTMLElement { */ public external abstract class DOMStringMap +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline operator fun DOMStringMap.get(name: String): String? = asDynamic()[name] +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline operator fun DOMStringMap.set(name: String, value: String) { asDynamic()[name] = value } @@ -1372,6 +1373,7 @@ public external abstract class AudioTrackList : EventTarget { fun getTrackById(id: String): AudioTrack? } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline operator fun AudioTrackList.get(index: Int): AudioTrack? = asDynamic()[index] @@ -1399,6 +1401,7 @@ public external abstract class VideoTrackList : EventTarget { fun getTrackById(id: String): VideoTrack? } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline operator fun VideoTrackList.get(index: Int): VideoTrack? = asDynamic()[index] @@ -1422,6 +1425,7 @@ public external abstract class TextTrackList : EventTarget { fun getTrackById(id: String): TextTrack? } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline operator fun TextTrackList.get(index: Int): TextTrack? = asDynamic()[index] @@ -1448,6 +1452,7 @@ public external abstract class TextTrackCueList { fun getCueById(id: String): TextTrackCue? } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline operator fun TextTrackCueList.get(index: Int): TextTrackCue? = asDynamic()[index] @@ -1493,6 +1498,7 @@ public external interface TrackEventInit : EventInit { set(value) = definedExternally } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline fun TrackEventInit(track: UnionAudioTrackOrTextTrackOrVideoTrack? = null, bubbles: Boolean? = false, cancelable: Boolean? = false, composed: Boolean? = false): TrackEventInit { val o = js("({})") @@ -1835,9 +1841,11 @@ public external abstract class HTMLFormElement : HTMLElement { } } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline operator fun HTMLFormElement.get(index: Int): Element? = asDynamic()[index] +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline operator fun HTMLFormElement.get(name: String): UnionElementOrRadioNodeList? = asDynamic()[name] @@ -2052,9 +2060,11 @@ public external abstract class HTMLSelectElement : HTMLElement, ItemArrayLike? - get() = definedExternally - set(value) = definedExternally var reason: Any? get() = definedExternally set(value) = definedExternally } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline fun PromiseRejectionEventInit(promise: Promise?, reason: Any? = undefined, bubbles: Boolean? = false, cancelable: Boolean? = false, composed: Boolean? = false): PromiseRejectionEventInit { val o = js("({})") @@ -3824,9 +3846,11 @@ public external abstract class PluginArray : ItemArrayLike { fun namedItem(name: String): Plugin? } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline operator fun PluginArray.get(index: Int): Plugin? = asDynamic()[index] +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline operator fun PluginArray.get(name: String): Plugin? = asDynamic()[name] @@ -3838,9 +3862,11 @@ public external abstract class MimeTypeArray : ItemArrayLike { fun namedItem(name: String): MimeType? } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline operator fun MimeTypeArray.get(index: Int): MimeType? = asDynamic()[index] +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline operator fun MimeTypeArray.get(name: String): MimeType? = asDynamic()[name] @@ -3855,9 +3881,11 @@ public external abstract class Plugin : ItemArrayLike { fun namedItem(name: String): MimeType? } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline operator fun Plugin.get(index: Int): MimeType? = asDynamic()[index] +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline operator fun Plugin.get(name: String): MimeType? = asDynamic()[name] @@ -3901,6 +3929,7 @@ public external interface ImageBitmapOptions { set(value) = definedExternally } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline fun ImageBitmapOptions(imageOrientation: ImageOrientation? = ImageOrientation.NONE, premultiplyAlpha: PremultiplyAlpha? = PremultiplyAlpha.DEFAULT, colorSpaceConversion: ColorSpaceConversion? = ColorSpaceConversion.DEFAULT, resizeWidth: Int? = undefined, resizeHeight: Int? = undefined, resizeQuality: ResizeQuality? = ResizeQuality.LOW): ImageBitmapOptions { val o = js("({})") @@ -3950,6 +3979,7 @@ public external interface MessageEventInit : EventInit { set(value) = definedExternally } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline fun MessageEventInit(data: Any? = null, origin: String? = "", lastEventId: String? = "", source: UnionMessagePortOrWindowProxy? = null, ports: Array? = arrayOf(), bubbles: Boolean? = false, cancelable: Boolean? = false, composed: Boolean? = false): MessageEventInit { val o = js("({})") @@ -3989,6 +4019,7 @@ public external interface EventSourceInit { set(value) = definedExternally } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline fun EventSourceInit(withCredentials: Boolean? = false): EventSourceInit { val o = js("({})") @@ -4052,6 +4083,7 @@ public external interface CloseEventInit : EventInit { set(value) = definedExternally } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline fun CloseEventInit(wasClean: Boolean? = false, code: Short? = 0, reason: String? = "", bubbles: Boolean? = false, cancelable: Boolean? = false, composed: Boolean? = false): CloseEventInit { val o = js("({})") @@ -4155,6 +4187,7 @@ public external interface WorkerOptions { set(value) = definedExternally } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline fun WorkerOptions(type: WorkerType? = WorkerType.CLASSIC, credentials: RequestCredentials? = RequestCredentials.OMIT): WorkerOptions { val o = js("({})") @@ -4212,9 +4245,11 @@ public external abstract class Storage { fun setItem(key: String, value: String) } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline operator fun Storage.get(key: String): String? = asDynamic()[key] +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline operator fun Storage.set(key: String, value: String) { asDynamic()[key] = value } @@ -4268,6 +4303,7 @@ public external interface StorageEventInit : EventInit { set(value) = definedExternally } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline fun StorageEventInit(key: String? = null, oldValue: String? = null, newValue: String? = null, url: String? = "", storageArea: Storage? = null, bubbles: Boolean? = false, cancelable: Boolean? = false, composed: Boolean? = false): StorageEventInit { val o = js("({})") @@ -4495,6 +4531,7 @@ public external interface EventInit { set(value) = definedExternally } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline fun EventInit(bubbles: Boolean? = false, cancelable: Boolean? = false, composed: Boolean? = false): EventInit { val o = js("({})") @@ -4525,6 +4562,7 @@ public external interface CustomEventInit : EventInit { set(value) = definedExternally } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline fun CustomEventInit(detail: Any? = null, bubbles: Boolean? = false, cancelable: Boolean? = false, composed: Boolean? = false): CustomEventInit { val o = js("({})") @@ -4541,6 +4579,7 @@ public external interface EventListenerOptions { set(value) = definedExternally } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline fun EventListenerOptions(capture: Boolean? = false): EventListenerOptions { val o = js("({})") @@ -4557,6 +4596,7 @@ public external interface AddEventListenerOptions : EventListenerOptions { set(value) = definedExternally } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline fun AddEventListenerOptions(passive: Boolean? = false, once: Boolean? = false, capture: Boolean? = false): AddEventListenerOptions { val o = js("({})") @@ -4629,6 +4669,7 @@ public external abstract class NodeList : ItemArrayLike { override fun item(index: Int): Node? } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline operator fun NodeList.get(index: Int): Node? = asDynamic()[index] @@ -4640,9 +4681,11 @@ public external abstract class HTMLCollection : ItemArrayLike, UnionEle fun namedItem(name: String): Element? } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline operator fun HTMLCollection.get(index: Int): Element? = asDynamic()[index] +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline operator fun HTMLCollection.get(name: String): Element? = asDynamic()[name] @@ -4682,6 +4725,7 @@ public external interface MutationObserverInit { set(value) = definedExternally } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline fun MutationObserverInit(childList: Boolean? = false, attributes: Boolean? = undefined, characterData: Boolean? = undefined, subtree: Boolean? = false, attributeOldValue: Boolean? = undefined, characterDataOldValue: Boolean? = undefined, attributeFilter: Array? = undefined): MutationObserverInit { val o = js("({})") @@ -4772,6 +4816,7 @@ public external interface GetRootNodeOptions { set(value) = definedExternally } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline fun GetRootNodeOptions(composed: Boolean? = false): GetRootNodeOptions { val o = js("({})") @@ -4983,6 +5028,7 @@ public external open class Document : Node, GlobalEventHandlers, DocumentAndElem } } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline operator fun Document.get(name: String): dynamic = asDynamic()[name] @@ -5018,6 +5064,7 @@ public external interface ElementCreationOptions { set(value) = definedExternally } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline fun ElementCreationOptions(`is`: String? = undefined): ElementCreationOptions { val o = js("({})") @@ -5219,10 +5266,9 @@ public external abstract class Element : Node, ParentNode, NonDocumentTypeChildN public external interface ShadowRootInit { var mode: ShadowRootMode? - get() = definedExternally - set(value) = definedExternally } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline fun ShadowRootInit(mode: ShadowRootMode?): ShadowRootInit { val o = js("({})") @@ -5243,9 +5289,11 @@ public external abstract class NamedNodeMap : ItemArrayLike { fun getNamedItem(qualifiedName: String): Attr? } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline operator fun NamedNodeMap.get(index: Int): Attr? = asDynamic()[index] +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline operator fun NamedNodeMap.get(qualifiedName: String): Attr? = asDynamic()[qualifiedName] @@ -5558,6 +5606,7 @@ public external abstract class DOMTokenList : ItemArrayLike { override fun item(index: Int): String? } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline operator fun DOMTokenList.get(index: Int): String? = asDynamic()[index] @@ -5602,6 +5651,7 @@ public external interface DOMPointInit { set(value) = definedExternally } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline fun DOMPointInit(x: Double? = 0.0, y: Double? = 0.0, z: Double? = 0.0, w: Double? = 1.0): DOMPointInit { val o = js("({})") @@ -5651,6 +5701,7 @@ public external interface DOMRectInit { set(value) = definedExternally } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline fun DOMRectInit(x: Double? = 0.0, y: Double? = 0.0, width: Double? = 0.0, height: Double? = 0.0): DOMRectInit { val o = js("({})") @@ -5665,6 +5716,7 @@ public external interface DOMRectList : ItemArrayLike { override fun item(index: Int): DOMRect? } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline operator fun DOMRectList.get(index: Int): DOMRect? = asDynamic()[index] @@ -5779,6 +5831,7 @@ public external interface ScrollOptions { set(value) = definedExternally } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline fun ScrollOptions(behavior: ScrollBehavior? = ScrollBehavior.AUTO): ScrollOptions { val o = js("({})") @@ -5798,6 +5851,7 @@ public external interface ScrollToOptions : ScrollOptions { set(value) = definedExternally } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline fun ScrollToOptions(left: Double? = undefined, top: Double? = undefined, behavior: ScrollBehavior? = ScrollBehavior.AUTO): ScrollToOptions { val o = js("({})") @@ -5844,6 +5898,7 @@ public external interface MediaQueryListEventInit : EventInit { set(value) = definedExternally } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline fun MediaQueryListEventInit(media: String? = "", matches: Boolean? = false, bubbles: Boolean? = false, cancelable: Boolean? = false, composed: Boolean? = false): MediaQueryListEventInit { val o = js("({})") @@ -5885,6 +5940,7 @@ public external interface ScrollIntoViewOptions : ScrollOptions { set(value) = definedExternally } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline fun ScrollIntoViewOptions(block: ScrollLogicalPosition? = ScrollLogicalPosition.CENTER, inline: ScrollLogicalPosition? = ScrollLogicalPosition.CENTER, behavior: ScrollBehavior? = ScrollBehavior.AUTO): ScrollIntoViewOptions { val o = js("({})") @@ -5903,6 +5959,7 @@ public external interface BoxQuadOptions { set(value) = definedExternally } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline fun BoxQuadOptions(box: CSSBoxType? = CSSBoxType.BORDER, relativeTo: dynamic = undefined): BoxQuadOptions { val o = js("({})") @@ -5920,6 +5977,7 @@ public external interface ConvertCoordinateOptions { set(value) = definedExternally } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline fun ConvertCoordinateOptions(fromBox: CSSBoxType? = CSSBoxType.BORDER, toBox: CSSBoxType? = CSSBoxType.BORDER): ConvertCoordinateOptions { val o = js("({})") @@ -5957,6 +6015,7 @@ public external abstract class TouchList : ItemArrayLike { override fun item(index: Int): Touch? } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline operator fun TouchList.get(index: Int): Touch? = asDynamic()[index] @@ -6358,12 +6417,14 @@ public external interface UnionElementOrRadioNodeList public external interface UnionHTMLOptGroupElementOrHTMLOptionElement -public external interface MediaProvider - public external interface UnionAudioTrackOrTextTrackOrVideoTrack public external interface UnionElementOrMouseEvent +public external interface UnionMessagePortOrWindowProxy + +public external interface MediaProvider + public external interface RenderingContext public external interface HTMLOrSVGImageElement : CanvasImageSource @@ -6372,11 +6433,10 @@ public external interface CanvasImageSource : ImageBitmapSource public external interface ImageBitmapSource -public external interface UnionMessagePortOrWindowProxy - public external interface HTMLOrSVGScriptElement /* please, don't implement this interface! */ +@JsName("null") @Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE") public external interface DocumentReadyState { companion object @@ -6389,6 +6449,7 @@ public inline val DocumentReadyState.Companion.INTERACTIVE: DocumentReadyState g public inline val DocumentReadyState.Companion.COMPLETE: DocumentReadyState get() = "complete".asDynamic().unsafeCast() /* please, don't implement this interface! */ +@JsName("null") @Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE") public external interface CanPlayTypeResult { companion object @@ -6401,6 +6462,7 @@ public inline val CanPlayTypeResult.Companion.MAYBE: CanPlayTypeResult get() = " public inline val CanPlayTypeResult.Companion.PROBABLY: CanPlayTypeResult get() = "probably".asDynamic().unsafeCast() /* please, don't implement this interface! */ +@JsName("null") @Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE") public external interface TextTrackMode { companion object @@ -6413,6 +6475,7 @@ public inline val TextTrackMode.Companion.HIDDEN: TextTrackMode get() = "hidden" public inline val TextTrackMode.Companion.SHOWING: TextTrackMode get() = "showing".asDynamic().unsafeCast() /* please, don't implement this interface! */ +@JsName("null") @Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE") public external interface TextTrackKind { companion object @@ -6429,6 +6492,7 @@ public inline val TextTrackKind.Companion.CHAPTERS: TextTrackKind get() = "chapt public inline val TextTrackKind.Companion.METADATA: TextTrackKind get() = "metadata".asDynamic().unsafeCast() /* please, don't implement this interface! */ +@JsName("null") @Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE") public external interface SelectionMode { companion object @@ -6443,6 +6507,7 @@ public inline val SelectionMode.Companion.END: SelectionMode get() = "end".asDyn public inline val SelectionMode.Companion.PRESERVE: SelectionMode get() = "preserve".asDynamic().unsafeCast() /* please, don't implement this interface! */ +@JsName("null") @Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE") public external interface CanvasFillRule { companion object @@ -6453,6 +6518,7 @@ public inline val CanvasFillRule.Companion.NONZERO: CanvasFillRule get() = "nonz public inline val CanvasFillRule.Companion.EVENODD: CanvasFillRule get() = "evenodd".asDynamic().unsafeCast() /* please, don't implement this interface! */ +@JsName("null") @Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE") public external interface ImageSmoothingQuality { companion object @@ -6465,6 +6531,7 @@ public inline val ImageSmoothingQuality.Companion.MEDIUM: ImageSmoothingQuality public inline val ImageSmoothingQuality.Companion.HIGH: ImageSmoothingQuality get() = "high".asDynamic().unsafeCast() /* please, don't implement this interface! */ +@JsName("null") @Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE") public external interface CanvasLineCap { companion object @@ -6477,6 +6544,7 @@ public inline val CanvasLineCap.Companion.ROUND: CanvasLineCap get() = "round".a public inline val CanvasLineCap.Companion.SQUARE: CanvasLineCap get() = "square".asDynamic().unsafeCast() /* please, don't implement this interface! */ +@JsName("null") @Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE") public external interface CanvasLineJoin { companion object @@ -6489,6 +6557,7 @@ public inline val CanvasLineJoin.Companion.BEVEL: CanvasLineJoin get() = "bevel" public inline val CanvasLineJoin.Companion.MITER: CanvasLineJoin get() = "miter".asDynamic().unsafeCast() /* please, don't implement this interface! */ +@JsName("null") @Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE") public external interface CanvasTextAlign { companion object @@ -6505,6 +6574,7 @@ public inline val CanvasTextAlign.Companion.RIGHT: CanvasTextAlign get() = "righ public inline val CanvasTextAlign.Companion.CENTER: CanvasTextAlign get() = "center".asDynamic().unsafeCast() /* please, don't implement this interface! */ +@JsName("null") @Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE") public external interface CanvasTextBaseline { companion object @@ -6523,6 +6593,7 @@ public inline val CanvasTextBaseline.Companion.IDEOGRAPHIC: CanvasTextBaseline g public inline val CanvasTextBaseline.Companion.BOTTOM: CanvasTextBaseline get() = "bottom".asDynamic().unsafeCast() /* please, don't implement this interface! */ +@JsName("null") @Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE") public external interface CanvasDirection { companion object @@ -6535,6 +6606,7 @@ public inline val CanvasDirection.Companion.RTL: CanvasDirection get() = "rtl".a public inline val CanvasDirection.Companion.INHERIT: CanvasDirection get() = "inherit".asDynamic().unsafeCast() /* please, don't implement this interface! */ +@JsName("null") @Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE") public external interface ScrollRestoration { companion object @@ -6545,6 +6617,7 @@ public inline val ScrollRestoration.Companion.AUTO: ScrollRestoration get() = "a public inline val ScrollRestoration.Companion.MANUAL: ScrollRestoration get() = "manual".asDynamic().unsafeCast() /* please, don't implement this interface! */ +@JsName("null") @Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE") public external interface ImageOrientation { companion object @@ -6555,6 +6628,7 @@ public inline val ImageOrientation.Companion.NONE: ImageOrientation get() = "non public inline val ImageOrientation.Companion.FLIPY: ImageOrientation get() = "flipY".asDynamic().unsafeCast() /* please, don't implement this interface! */ +@JsName("null") @Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE") public external interface PremultiplyAlpha { companion object @@ -6567,6 +6641,7 @@ public inline val PremultiplyAlpha.Companion.PREMULTIPLY: PremultiplyAlpha get() public inline val PremultiplyAlpha.Companion.DEFAULT: PremultiplyAlpha get() = "default".asDynamic().unsafeCast() /* please, don't implement this interface! */ +@JsName("null") @Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE") public external interface ColorSpaceConversion { companion object @@ -6577,6 +6652,7 @@ public inline val ColorSpaceConversion.Companion.NONE: ColorSpaceConversion get( public inline val ColorSpaceConversion.Companion.DEFAULT: ColorSpaceConversion get() = "default".asDynamic().unsafeCast() /* please, don't implement this interface! */ +@JsName("null") @Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE") public external interface ResizeQuality { companion object @@ -6591,6 +6667,7 @@ public inline val ResizeQuality.Companion.MEDIUM: ResizeQuality get() = "medium" public inline val ResizeQuality.Companion.HIGH: ResizeQuality get() = "high".asDynamic().unsafeCast() /* please, don't implement this interface! */ +@JsName("null") @Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE") public external interface BinaryType { companion object @@ -6601,6 +6678,7 @@ public inline val BinaryType.Companion.BLOB: BinaryType get() = "blob".asDynamic public inline val BinaryType.Companion.ARRAYBUFFER: BinaryType get() = "arraybuffer".asDynamic().unsafeCast() /* please, don't implement this interface! */ +@JsName("null") @Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE") public external interface WorkerType { companion object @@ -6611,6 +6689,7 @@ public inline val WorkerType.Companion.CLASSIC: WorkerType get() = "classic".asD public inline val WorkerType.Companion.MODULE: WorkerType get() = "module".asDynamic().unsafeCast() /* please, don't implement this interface! */ +@JsName("null") @Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE") public external interface ShadowRootMode { companion object @@ -6621,6 +6700,7 @@ public inline val ShadowRootMode.Companion.OPEN: ShadowRootMode get() = "open".a public inline val ShadowRootMode.Companion.CLOSED: ShadowRootMode get() = "closed".asDynamic().unsafeCast() /* please, don't implement this interface! */ +@JsName("null") @Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE") public external interface ScrollBehavior { companion object @@ -6633,6 +6713,7 @@ public inline val ScrollBehavior.Companion.INSTANT: ScrollBehavior get() = "inst public inline val ScrollBehavior.Companion.SMOOTH: ScrollBehavior get() = "smooth".asDynamic().unsafeCast() /* please, don't implement this interface! */ +@JsName("null") @Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE") public external interface ScrollLogicalPosition { companion object @@ -6647,6 +6728,7 @@ public inline val ScrollLogicalPosition.Companion.END: ScrollLogicalPosition get public inline val ScrollLogicalPosition.Companion.NEAREST: ScrollLogicalPosition get() = "nearest".asDynamic().unsafeCast() /* please, don't implement this interface! */ +@JsName("null") @Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE") public external interface CSSBoxType { companion object diff --git a/libraries/stdlib/js/src/org.w3c/org.w3c.dom.mediacapture.kt b/libraries/stdlib/js/src/org.w3c/org.w3c.dom.mediacapture.kt index 84ebee5a423..1036c77b7f5 100644 --- a/libraries/stdlib/js/src/org.w3c/org.w3c.dom.mediacapture.kt +++ b/libraries/stdlib/js/src/org.w3c/org.w3c.dom.mediacapture.kt @@ -1,5 +1,5 @@ /* - * Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Copyright 2010-2021 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. */ @@ -10,23 +10,8 @@ package org.w3c.dom.mediacapture import kotlin.js.* import org.khronos.webgl.* -import org.w3c.css.masking.* import org.w3c.dom.* -import org.w3c.dom.clipboard.* -import org.w3c.dom.css.* -import org.w3c.dom.encryptedmedia.* import org.w3c.dom.events.* -import org.w3c.dom.mediasource.* -import org.w3c.dom.parsing.* -import org.w3c.dom.pointerevents.* -import org.w3c.dom.svg.* -import org.w3c.dom.url.* -import org.w3c.fetch.* -import org.w3c.files.* -import org.w3c.notifications.* -import org.w3c.performance.* -import org.w3c.workers.* -import org.w3c.xhr.* /** * Exposes the JavaScript [MediaStream](https://developer.mozilla.org/en/docs/Web/API/MediaStream) to Kotlin @@ -123,6 +108,7 @@ public external interface MediaTrackSupportedConstraints { set(value) = definedExternally } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline fun MediaTrackSupportedConstraints(width: Boolean? = true, height: Boolean? = true, aspectRatio: Boolean? = true, frameRate: Boolean? = true, facingMode: Boolean? = true, resizeMode: Boolean? = true, volume: Boolean? = true, sampleRate: Boolean? = true, sampleSize: Boolean? = true, echoCancellation: Boolean? = true, autoGainControl: Boolean? = true, noiseSuppression: Boolean? = true, latency: Boolean? = true, channelCount: Boolean? = true, deviceId: Boolean? = true, groupId: Boolean? = true): MediaTrackSupportedConstraints { val o = js("({})") @@ -196,6 +182,7 @@ public external interface MediaTrackCapabilities { set(value) = definedExternally } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline fun MediaTrackCapabilities(width: ULongRange? = undefined, height: ULongRange? = undefined, aspectRatio: DoubleRange? = undefined, frameRate: DoubleRange? = undefined, facingMode: Array? = undefined, resizeMode: Array? = undefined, volume: DoubleRange? = undefined, sampleRate: ULongRange? = undefined, sampleSize: ULongRange? = undefined, echoCancellation: Array? = undefined, autoGainControl: Array? = undefined, noiseSuppression: Array? = undefined, latency: DoubleRange? = undefined, channelCount: ULongRange? = undefined, deviceId: String? = undefined, groupId: String? = undefined): MediaTrackCapabilities { val o = js("({})") @@ -227,6 +214,7 @@ public external interface MediaTrackConstraints : MediaTrackConstraintSet { set(value) = definedExternally } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline fun MediaTrackConstraints(advanced: Array? = undefined, width: dynamic = undefined, height: dynamic = undefined, aspectRatio: dynamic = undefined, frameRate: dynamic = undefined, facingMode: dynamic = undefined, resizeMode: dynamic = undefined, volume: dynamic = undefined, sampleRate: dynamic = undefined, sampleSize: dynamic = undefined, echoCancellation: dynamic = undefined, autoGainControl: dynamic = undefined, noiseSuppression: dynamic = undefined, latency: dynamic = undefined, channelCount: dynamic = undefined, deviceId: dynamic = undefined, groupId: dynamic = undefined): MediaTrackConstraints { val o = js("({})") @@ -301,6 +289,7 @@ public external interface MediaTrackConstraintSet { set(value) = definedExternally } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline fun MediaTrackConstraintSet(width: dynamic = undefined, height: dynamic = undefined, aspectRatio: dynamic = undefined, frameRate: dynamic = undefined, facingMode: dynamic = undefined, resizeMode: dynamic = undefined, volume: dynamic = undefined, sampleRate: dynamic = undefined, sampleSize: dynamic = undefined, echoCancellation: dynamic = undefined, autoGainControl: dynamic = undefined, noiseSuppression: dynamic = undefined, latency: dynamic = undefined, channelCount: dynamic = undefined, deviceId: dynamic = undefined, groupId: dynamic = undefined): MediaTrackConstraintSet { val o = js("({})") @@ -377,6 +366,7 @@ public external interface MediaTrackSettings { set(value) = definedExternally } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline fun MediaTrackSettings(width: Int? = undefined, height: Int? = undefined, aspectRatio: Double? = undefined, frameRate: Double? = undefined, facingMode: String? = undefined, resizeMode: String? = undefined, volume: Double? = undefined, sampleRate: Int? = undefined, sampleSize: Int? = undefined, echoCancellation: Boolean? = undefined, autoGainControl: Boolean? = undefined, noiseSuppression: Boolean? = undefined, latency: Double? = undefined, channelCount: Int? = undefined, deviceId: String? = undefined, groupId: String? = undefined): MediaTrackSettings { val o = js("({})") @@ -415,10 +405,9 @@ public external open class MediaStreamTrackEvent(type: String, eventInitDict: Me public external interface MediaStreamTrackEventInit : EventInit { var track: MediaStreamTrack? - get() = definedExternally - set(value) = definedExternally } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline fun MediaStreamTrackEventInit(track: MediaStreamTrack?, bubbles: Boolean? = false, cancelable: Boolean? = false, composed: Boolean? = false): MediaStreamTrackEventInit { val o = js("({})") @@ -446,6 +435,7 @@ public external interface OverconstrainedErrorEventInit : EventInit { set(value) = definedExternally } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline fun OverconstrainedErrorEventInit(error: dynamic = null, bubbles: Boolean? = false, cancelable: Boolean? = false, composed: Boolean? = false): OverconstrainedErrorEventInit { val o = js("({})") @@ -493,6 +483,7 @@ public external interface MediaStreamConstraints { set(value) = definedExternally } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline fun MediaStreamConstraints(video: dynamic = false, audio: dynamic = false): MediaStreamConstraints { val o = js("({})") @@ -523,6 +514,7 @@ public external interface DoubleRange { set(value) = definedExternally } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline fun DoubleRange(max: Double? = undefined, min: Double? = undefined): DoubleRange { val o = js("({})") @@ -540,6 +532,7 @@ public external interface ConstrainDoubleRange : DoubleRange { set(value) = definedExternally } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline fun ConstrainDoubleRange(exact: Double? = undefined, ideal: Double? = undefined, max: Double? = undefined, min: Double? = undefined): ConstrainDoubleRange { val o = js("({})") @@ -559,6 +552,7 @@ public external interface ULongRange { set(value) = definedExternally } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline fun ULongRange(max: Int? = undefined, min: Int? = undefined): ULongRange { val o = js("({})") @@ -576,6 +570,7 @@ public external interface ConstrainULongRange : ULongRange { set(value) = definedExternally } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline fun ConstrainULongRange(exact: Int? = undefined, ideal: Int? = undefined, max: Int? = undefined, min: Int? = undefined): ConstrainULongRange { val o = js("({})") @@ -598,6 +593,7 @@ public external interface ConstrainBooleanParameters { set(value) = definedExternally } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline fun ConstrainBooleanParameters(exact: Boolean? = undefined, ideal: Boolean? = undefined): ConstrainBooleanParameters { val o = js("({})") @@ -618,6 +614,7 @@ public external interface ConstrainDOMStringParameters { set(value) = definedExternally } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline fun ConstrainDOMStringParameters(exact: dynamic = undefined, ideal: dynamic = undefined): ConstrainDOMStringParameters { val o = js("({})") @@ -628,6 +625,7 @@ public inline fun ConstrainDOMStringParameters(exact: dynamic = undefined, ideal public external interface Capabilities +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline fun Capabilities(): Capabilities { val o = js("({})") @@ -636,6 +634,7 @@ public inline fun Capabilities(): Capabilities { public external interface Settings +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline fun Settings(): Settings { val o = js("({})") @@ -644,6 +643,7 @@ public inline fun Settings(): Settings { public external interface ConstraintSet +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline fun ConstraintSet(): ConstraintSet { val o = js("({})") @@ -656,6 +656,7 @@ public external interface Constraints : ConstraintSet { set(value) = definedExternally } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline fun Constraints(advanced: Array? = undefined): Constraints { val o = js("({})") @@ -664,6 +665,7 @@ public inline fun Constraints(advanced: Array? = undefined): Cons } /* please, don't implement this interface! */ +@JsName("null") @Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE") public external interface MediaStreamTrackState { companion object @@ -674,6 +676,7 @@ public inline val MediaStreamTrackState.Companion.LIVE: MediaStreamTrackState ge public inline val MediaStreamTrackState.Companion.ENDED: MediaStreamTrackState get() = "ended".asDynamic().unsafeCast() /* please, don't implement this interface! */ +@JsName("null") @Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE") public external interface VideoFacingModeEnum { companion object @@ -688,6 +691,7 @@ public inline val VideoFacingModeEnum.Companion.LEFT: VideoFacingModeEnum get() public inline val VideoFacingModeEnum.Companion.RIGHT: VideoFacingModeEnum get() = "right".asDynamic().unsafeCast() /* please, don't implement this interface! */ +@JsName("null") @Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE") public external interface VideoResizeModeEnum { companion object @@ -698,6 +702,7 @@ public inline val VideoResizeModeEnum.Companion.NONE: VideoResizeModeEnum get() public inline val VideoResizeModeEnum.Companion.CROP_AND_SCALE: VideoResizeModeEnum get() = "crop-and-scale".asDynamic().unsafeCast() /* please, don't implement this interface! */ +@JsName("null") @Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE") public external interface MediaDeviceKind { companion object diff --git a/libraries/stdlib/js/src/org.w3c/org.w3c.dom.mediasource.kt b/libraries/stdlib/js/src/org.w3c/org.w3c.dom.mediasource.kt index 7ba5aca271c..d2e1c5163ff 100644 --- a/libraries/stdlib/js/src/org.w3c/org.w3c.dom.mediasource.kt +++ b/libraries/stdlib/js/src/org.w3c/org.w3c.dom.mediasource.kt @@ -1,5 +1,5 @@ /* - * Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Copyright 2010-2021 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. */ @@ -10,24 +10,12 @@ package org.w3c.dom.mediasource import kotlin.js.* import org.khronos.webgl.* -import org.w3c.css.masking.* import org.w3c.dom.* -import org.w3c.dom.clipboard.* -import org.w3c.dom.css.* -import org.w3c.dom.encryptedmedia.* import org.w3c.dom.events.* -import org.w3c.dom.mediacapture.* -import org.w3c.dom.parsing.* -import org.w3c.dom.pointerevents.* -import org.w3c.dom.svg.* -import org.w3c.dom.url.* -import org.w3c.fetch.* -import org.w3c.files.* -import org.w3c.notifications.* -import org.w3c.performance.* -import org.w3c.workers.* -import org.w3c.xhr.* +/** + * Exposes the JavaScript [MediaSource](https://developer.mozilla.org/en/docs/Web/API/MediaSource) to Kotlin + */ public external open class MediaSource : EventTarget, MediaProvider { open val sourceBuffers: SourceBufferList open val activeSourceBuffers: SourceBufferList @@ -47,6 +35,9 @@ public external open class MediaSource : EventTarget, MediaProvider { } } +/** + * Exposes the JavaScript [SourceBuffer](https://developer.mozilla.org/en/docs/Web/API/SourceBuffer) to Kotlin + */ public external abstract class SourceBuffer : EventTarget { open var mode: AppendMode open val updating: Boolean @@ -67,16 +58,21 @@ public external abstract class SourceBuffer : EventTarget { fun remove(start: Double, end: Double) } +/** + * Exposes the JavaScript [SourceBufferList](https://developer.mozilla.org/en/docs/Web/API/SourceBufferList) to Kotlin + */ public external abstract class SourceBufferList : EventTarget { open val length: Int open var onaddsourcebuffer: ((Event) -> dynamic)? open var onremovesourcebuffer: ((Event) -> dynamic)? } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline operator fun SourceBufferList.get(index: Int): SourceBuffer? = asDynamic()[index] /* please, don't implement this interface! */ +@JsName("null") @Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE") public external interface ReadyState { companion object @@ -89,6 +85,7 @@ public inline val ReadyState.Companion.OPEN: ReadyState get() = "open".asDynamic public inline val ReadyState.Companion.ENDED: ReadyState get() = "ended".asDynamic().unsafeCast() /* please, don't implement this interface! */ +@JsName("null") @Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE") public external interface EndOfStreamError { companion object @@ -99,6 +96,7 @@ public inline val EndOfStreamError.Companion.NETWORK: EndOfStreamError get() = " public inline val EndOfStreamError.Companion.DECODE: EndOfStreamError get() = "decode".asDynamic().unsafeCast() /* please, don't implement this interface! */ +@JsName("null") @Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE") public external interface AppendMode { companion object diff --git a/libraries/stdlib/js/src/org.w3c/org.w3c.dom.parsing.kt b/libraries/stdlib/js/src/org.w3c/org.w3c.dom.parsing.kt index 7a73bed87d9..a08bf0dfd88 100644 --- a/libraries/stdlib/js/src/org.w3c/org.w3c.dom.parsing.kt +++ b/libraries/stdlib/js/src/org.w3c/org.w3c.dom.parsing.kt @@ -1,5 +1,5 @@ /* - * Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Copyright 2010-2021 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. */ @@ -10,23 +10,7 @@ package org.w3c.dom.parsing import kotlin.js.* import org.khronos.webgl.* -import org.w3c.css.masking.* import org.w3c.dom.* -import org.w3c.dom.clipboard.* -import org.w3c.dom.css.* -import org.w3c.dom.encryptedmedia.* -import org.w3c.dom.events.* -import org.w3c.dom.mediacapture.* -import org.w3c.dom.mediasource.* -import org.w3c.dom.pointerevents.* -import org.w3c.dom.svg.* -import org.w3c.dom.url.* -import org.w3c.fetch.* -import org.w3c.files.* -import org.w3c.notifications.* -import org.w3c.performance.* -import org.w3c.workers.* -import org.w3c.xhr.* /** * Exposes the JavaScript [DOMParser](https://developer.mozilla.org/en/docs/Web/API/DOMParser) to Kotlin diff --git a/libraries/stdlib/js/src/org.w3c/org.w3c.dom.pointerevents.kt b/libraries/stdlib/js/src/org.w3c/org.w3c.dom.pointerevents.kt index 53e311f59a3..fb94ac41d9a 100644 --- a/libraries/stdlib/js/src/org.w3c/org.w3c.dom.pointerevents.kt +++ b/libraries/stdlib/js/src/org.w3c/org.w3c.dom.pointerevents.kt @@ -1,5 +1,5 @@ /* - * Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Copyright 2010-2021 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. */ @@ -10,23 +10,8 @@ package org.w3c.dom.pointerevents import kotlin.js.* import org.khronos.webgl.* -import org.w3c.css.masking.* import org.w3c.dom.* -import org.w3c.dom.clipboard.* -import org.w3c.dom.css.* -import org.w3c.dom.encryptedmedia.* import org.w3c.dom.events.* -import org.w3c.dom.mediacapture.* -import org.w3c.dom.mediasource.* -import org.w3c.dom.parsing.* -import org.w3c.dom.svg.* -import org.w3c.dom.url.* -import org.w3c.fetch.* -import org.w3c.files.* -import org.w3c.notifications.* -import org.w3c.performance.* -import org.w3c.workers.* -import org.w3c.xhr.* public external interface PointerEventInit : MouseEventInit { var pointerId: Int? /* = 0 */ @@ -61,6 +46,7 @@ public external interface PointerEventInit : MouseEventInit { set(value) = definedExternally } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline fun PointerEventInit(pointerId: Int? = 0, width: Double? = 1.0, height: Double? = 1.0, pressure: Float? = 0f, tangentialPressure: Float? = 0f, tiltX: Int? = 0, tiltY: Int? = 0, twist: Int? = 0, pointerType: String? = "", isPrimary: Boolean? = false, screenX: Int? = 0, screenY: Int? = 0, clientX: Int? = 0, clientY: Int? = 0, button: Short? = 0, buttons: Short? = 0, relatedTarget: EventTarget? = null, region: String? = null, ctrlKey: Boolean? = false, shiftKey: Boolean? = false, altKey: Boolean? = false, metaKey: Boolean? = false, modifierAltGraph: Boolean? = false, modifierCapsLock: Boolean? = false, modifierFn: Boolean? = false, modifierFnLock: Boolean? = false, modifierHyper: Boolean? = false, modifierNumLock: Boolean? = false, modifierScrollLock: Boolean? = false, modifierSuper: Boolean? = false, modifierSymbol: Boolean? = false, modifierSymbolLock: Boolean? = false, view: Window? = null, detail: Int? = 0, bubbles: Boolean? = false, cancelable: Boolean? = false, composed: Boolean? = false): PointerEventInit { val o = js("({})") diff --git a/libraries/stdlib/js/src/org.w3c/org.w3c.dom.svg.kt b/libraries/stdlib/js/src/org.w3c/org.w3c.dom.svg.kt index fbcbd3cc787..32cb89e079e 100644 --- a/libraries/stdlib/js/src/org.w3c/org.w3c.dom.svg.kt +++ b/libraries/stdlib/js/src/org.w3c/org.w3c.dom.svg.kt @@ -1,5 +1,5 @@ /* - * Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Copyright 2010-2021 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. */ @@ -10,23 +10,8 @@ package org.w3c.dom.svg import kotlin.js.* import org.khronos.webgl.* -import org.w3c.css.masking.* import org.w3c.dom.* -import org.w3c.dom.clipboard.* import org.w3c.dom.css.* -import org.w3c.dom.encryptedmedia.* -import org.w3c.dom.events.* -import org.w3c.dom.mediacapture.* -import org.w3c.dom.mediasource.* -import org.w3c.dom.parsing.* -import org.w3c.dom.pointerevents.* -import org.w3c.dom.url.* -import org.w3c.fetch.* -import org.w3c.files.* -import org.w3c.notifications.* -import org.w3c.performance.* -import org.w3c.workers.* -import org.w3c.xhr.* /** * Exposes the JavaScript [SVGElement](https://developer.mozilla.org/en/docs/Web/API/SVGElement) to Kotlin @@ -76,6 +61,7 @@ public external interface SVGBoundingBoxOptions { set(value) = definedExternally } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline fun SVGBoundingBoxOptions(fill: Boolean? = true, stroke: Boolean? = false, markers: Boolean? = false, clipped: Boolean? = false): SVGBoundingBoxOptions { val o = js("({})") @@ -214,9 +200,11 @@ public external abstract class SVGNameList { fun getItem(index: Int): dynamic } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline operator fun SVGNameList.get(index: Int): dynamic = asDynamic()[index] +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline operator fun SVGNameList.set(index: Int, newItem: dynamic) { asDynamic()[index] = newItem } @@ -235,9 +223,11 @@ public external abstract class SVGNumberList { fun getItem(index: Int): SVGNumber } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline operator fun SVGNumberList.get(index: Int): SVGNumber? = asDynamic()[index] +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline operator fun SVGNumberList.set(index: Int, newItem: SVGNumber) { asDynamic()[index] = newItem } @@ -256,9 +246,11 @@ public external abstract class SVGLengthList { fun getItem(index: Int): SVGLength } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline operator fun SVGLengthList.get(index: Int): SVGLength? = asDynamic()[index] +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline operator fun SVGLengthList.set(index: Int, newItem: SVGLength) { asDynamic()[index] = newItem } @@ -357,9 +349,11 @@ public external abstract class SVGStringList { fun getItem(index: Int): String } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline operator fun SVGStringList.get(index: Int): String? = asDynamic()[index] +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline operator fun SVGStringList.set(index: Int, newItem: String) { asDynamic()[index] = newItem } @@ -811,9 +805,11 @@ public external abstract class SVGTransformList { fun getItem(index: Int): SVGTransform } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline operator fun SVGTransformList.get(index: Int): SVGTransform? = asDynamic()[index] +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline operator fun SVGTransformList.set(index: Int, newItem: SVGTransform) { asDynamic()[index] = newItem } @@ -1055,9 +1051,11 @@ public external abstract class SVGPointList { fun getItem(index: Int): DOMPoint } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline operator fun SVGPointList.get(index: Int): DOMPoint? = asDynamic()[index] +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline operator fun SVGPointList.set(index: Int, newItem: DOMPoint) { asDynamic()[index] = newItem } diff --git a/libraries/stdlib/js/src/org.w3c/org.w3c.dom.url.kt b/libraries/stdlib/js/src/org.w3c/org.w3c.dom.url.kt index 78c08cb1ac8..af6747dbdde 100644 --- a/libraries/stdlib/js/src/org.w3c/org.w3c.dom.url.kt +++ b/libraries/stdlib/js/src/org.w3c/org.w3c.dom.url.kt @@ -1,5 +1,5 @@ /* - * Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Copyright 2010-2021 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. */ @@ -10,23 +10,8 @@ package org.w3c.dom.url import kotlin.js.* import org.khronos.webgl.* -import org.w3c.css.masking.* -import org.w3c.dom.* -import org.w3c.dom.clipboard.* -import org.w3c.dom.css.* -import org.w3c.dom.encryptedmedia.* -import org.w3c.dom.events.* -import org.w3c.dom.mediacapture.* import org.w3c.dom.mediasource.* -import org.w3c.dom.parsing.* -import org.w3c.dom.pointerevents.* -import org.w3c.dom.svg.* -import org.w3c.fetch.* import org.w3c.files.* -import org.w3c.notifications.* -import org.w3c.performance.* -import org.w3c.workers.* -import org.w3c.xhr.* /** * Exposes the JavaScript [URL](https://developer.mozilla.org/en/docs/Web/API/URL) to Kotlin diff --git a/libraries/stdlib/js/src/org.w3c/org.w3c.fetch.kt b/libraries/stdlib/js/src/org.w3c/org.w3c.fetch.kt index 0b40aefca3f..b347f71a69b 100644 --- a/libraries/stdlib/js/src/org.w3c/org.w3c.fetch.kt +++ b/libraries/stdlib/js/src/org.w3c/org.w3c.fetch.kt @@ -1,5 +1,5 @@ /* - * Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Copyright 2010-2021 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. */ @@ -10,22 +10,7 @@ package org.w3c.fetch import kotlin.js.* import org.khronos.webgl.* -import org.w3c.css.masking.* -import org.w3c.dom.* -import org.w3c.dom.clipboard.* -import org.w3c.dom.css.* -import org.w3c.dom.encryptedmedia.* -import org.w3c.dom.events.* -import org.w3c.dom.mediacapture.* -import org.w3c.dom.mediasource.* -import org.w3c.dom.parsing.* -import org.w3c.dom.pointerevents.* -import org.w3c.dom.svg.* -import org.w3c.dom.url.* import org.w3c.files.* -import org.w3c.notifications.* -import org.w3c.performance.* -import org.w3c.workers.* import org.w3c.xhr.* /** @@ -116,6 +101,7 @@ public external interface RequestInit { set(value) = definedExternally } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline fun RequestInit(method: String? = undefined, headers: dynamic = undefined, body: dynamic = undefined, referrer: String? = undefined, referrerPolicy: dynamic = undefined, mode: RequestMode? = undefined, credentials: RequestCredentials? = undefined, cache: RequestCache? = undefined, redirect: RequestRedirect? = undefined, integrity: String? = undefined, keepalive: Boolean? = undefined, window: Any? = undefined): RequestInit { val o = js("({})") @@ -173,6 +159,7 @@ public external interface ResponseInit { set(value) = definedExternally } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline fun ResponseInit(status: Short? = 200, statusText: String? = "OK", headers: dynamic = undefined): ResponseInit { val o = js("({})") @@ -183,6 +170,7 @@ public inline fun ResponseInit(status: Short? = 200, statusText: String? = "OK", } /* please, don't implement this interface! */ +@JsName("null") @Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE") public external interface RequestType { companion object @@ -205,6 +193,7 @@ public inline val RequestType.Companion.TRACK: RequestType get() = "track".asDyn public inline val RequestType.Companion.VIDEO: RequestType get() = "video".asDynamic().unsafeCast() /* please, don't implement this interface! */ +@JsName("null") @Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE") public external interface RequestDestination { companion object @@ -241,6 +230,7 @@ public inline val RequestDestination.Companion.WORKER: RequestDestination get() public inline val RequestDestination.Companion.XSLT: RequestDestination get() = "xslt".asDynamic().unsafeCast() /* please, don't implement this interface! */ +@JsName("null") @Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE") public external interface RequestMode { companion object @@ -255,6 +245,7 @@ public inline val RequestMode.Companion.NO_CORS: RequestMode get() = "no-cors".a public inline val RequestMode.Companion.CORS: RequestMode get() = "cors".asDynamic().unsafeCast() /* please, don't implement this interface! */ +@JsName("null") @Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE") public external interface RequestCredentials { companion object @@ -267,6 +258,7 @@ public inline val RequestCredentials.Companion.SAME_ORIGIN: RequestCredentials g public inline val RequestCredentials.Companion.INCLUDE: RequestCredentials get() = "include".asDynamic().unsafeCast() /* please, don't implement this interface! */ +@JsName("null") @Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE") public external interface RequestCache { companion object @@ -285,6 +277,7 @@ public inline val RequestCache.Companion.FORCE_CACHE: RequestCache get() = "forc public inline val RequestCache.Companion.ONLY_IF_CACHED: RequestCache get() = "only-if-cached".asDynamic().unsafeCast() /* please, don't implement this interface! */ +@JsName("null") @Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE") public external interface RequestRedirect { companion object @@ -297,6 +290,7 @@ public inline val RequestRedirect.Companion.ERROR: RequestRedirect get() = "erro public inline val RequestRedirect.Companion.MANUAL: RequestRedirect get() = "manual".asDynamic().unsafeCast() /* please, don't implement this interface! */ +@JsName("null") @Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE") public external interface ResponseType { companion object diff --git a/libraries/stdlib/js/src/org.w3c/org.w3c.files.kt b/libraries/stdlib/js/src/org.w3c/org.w3c.files.kt index b16f21e9dff..532a415473a 100644 --- a/libraries/stdlib/js/src/org.w3c/org.w3c.files.kt +++ b/libraries/stdlib/js/src/org.w3c/org.w3c.files.kt @@ -1,5 +1,5 @@ /* - * Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Copyright 2010-2021 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. */ @@ -10,22 +10,8 @@ package org.w3c.files import kotlin.js.* import org.khronos.webgl.* -import org.w3c.css.masking.* import org.w3c.dom.* -import org.w3c.dom.clipboard.* -import org.w3c.dom.css.* -import org.w3c.dom.encryptedmedia.* import org.w3c.dom.events.* -import org.w3c.dom.mediacapture.* -import org.w3c.dom.mediasource.* -import org.w3c.dom.parsing.* -import org.w3c.dom.pointerevents.* -import org.w3c.dom.svg.* -import org.w3c.dom.url.* -import org.w3c.fetch.* -import org.w3c.notifications.* -import org.w3c.performance.* -import org.w3c.workers.* import org.w3c.xhr.* /** @@ -45,6 +31,7 @@ public external interface BlobPropertyBag { set(value) = definedExternally } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline fun BlobPropertyBag(type: String? = ""): BlobPropertyBag { val o = js("({})") @@ -66,6 +53,7 @@ public external interface FilePropertyBag : BlobPropertyBag { set(value) = definedExternally } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline fun FilePropertyBag(lastModified: Int? = undefined, type: String? = ""): FilePropertyBag { val o = js("({})") @@ -81,6 +69,7 @@ public external abstract class FileList : ItemArrayLike { override fun item(index: Int): File? } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline operator fun FileList.get(index: Int): File? = asDynamic()[index] diff --git a/libraries/stdlib/js/src/org.w3c/org.w3c.notifications.kt b/libraries/stdlib/js/src/org.w3c/org.w3c.notifications.kt index ccb49723692..71e2a578073 100644 --- a/libraries/stdlib/js/src/org.w3c/org.w3c.notifications.kt +++ b/libraries/stdlib/js/src/org.w3c/org.w3c.notifications.kt @@ -1,5 +1,5 @@ /* - * Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Copyright 2010-2021 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. */ @@ -10,23 +10,8 @@ package org.w3c.notifications import kotlin.js.* import org.khronos.webgl.* -import org.w3c.css.masking.* -import org.w3c.dom.* -import org.w3c.dom.clipboard.* -import org.w3c.dom.css.* -import org.w3c.dom.encryptedmedia.* import org.w3c.dom.events.* -import org.w3c.dom.mediacapture.* -import org.w3c.dom.mediasource.* -import org.w3c.dom.parsing.* -import org.w3c.dom.pointerevents.* -import org.w3c.dom.svg.* -import org.w3c.dom.url.* -import org.w3c.fetch.* -import org.w3c.files.* -import org.w3c.performance.* import org.w3c.workers.* -import org.w3c.xhr.* /** * Exposes the JavaScript [Notification](https://developer.mozilla.org/en/docs/Web/API/Notification) to Kotlin @@ -115,6 +100,7 @@ public external interface NotificationOptions { set(value) = definedExternally } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline fun NotificationOptions(dir: NotificationDirection? = NotificationDirection.AUTO, lang: String? = "", body: String? = "", tag: String? = "", image: String? = undefined, icon: String? = undefined, badge: String? = undefined, sound: String? = undefined, vibrate: dynamic = undefined, timestamp: Number? = undefined, renotify: Boolean? = false, silent: Boolean? = false, noscreen: Boolean? = false, requireInteraction: Boolean? = false, sticky: Boolean? = false, data: Any? = null, actions: Array? = arrayOf()): NotificationOptions { val o = js("({})") @@ -140,16 +126,13 @@ public inline fun NotificationOptions(dir: NotificationDirection? = Notification public external interface NotificationAction { var action: String? - get() = definedExternally - set(value) = definedExternally var title: String? - get() = definedExternally - set(value) = definedExternally var icon: String? get() = definedExternally set(value) = definedExternally } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline fun NotificationAction(action: String?, title: String?, icon: String? = undefined): NotificationAction { val o = js("({})") @@ -165,6 +148,7 @@ public external interface GetNotificationOptions { set(value) = definedExternally } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline fun GetNotificationOptions(tag: String? = ""): GetNotificationOptions { val o = js("({})") @@ -189,13 +173,12 @@ public external open class NotificationEvent(type: String, eventInitDict: Notifi public external interface NotificationEventInit : ExtendableEventInit { var notification: Notification? - get() = definedExternally - set(value) = definedExternally var action: String? /* = "" */ get() = definedExternally set(value) = definedExternally } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline fun NotificationEventInit(notification: Notification?, action: String? = "", bubbles: Boolean? = false, cancelable: Boolean? = false, composed: Boolean? = false): NotificationEventInit { val o = js("({})") @@ -208,6 +191,7 @@ public inline fun NotificationEventInit(notification: Notification?, action: Str } /* please, don't implement this interface! */ +@JsName("null") @Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE") public external interface NotificationPermission { companion object @@ -220,6 +204,7 @@ public inline val NotificationPermission.Companion.DENIED: NotificationPermissio public inline val NotificationPermission.Companion.GRANTED: NotificationPermission get() = "granted".asDynamic().unsafeCast() /* please, don't implement this interface! */ +@JsName("null") @Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE") public external interface NotificationDirection { companion object diff --git a/libraries/stdlib/js/src/org.w3c/org.w3c.performance.kt b/libraries/stdlib/js/src/org.w3c/org.w3c.performance.kt index 4351049b6d7..16a70b87b4d 100644 --- a/libraries/stdlib/js/src/org.w3c/org.w3c.performance.kt +++ b/libraries/stdlib/js/src/org.w3c/org.w3c.performance.kt @@ -1,5 +1,5 @@ /* - * Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Copyright 2010-2021 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. */ @@ -10,23 +10,7 @@ package org.w3c.performance import kotlin.js.* import org.khronos.webgl.* -import org.w3c.css.masking.* -import org.w3c.dom.* -import org.w3c.dom.clipboard.* -import org.w3c.dom.css.* -import org.w3c.dom.encryptedmedia.* import org.w3c.dom.events.* -import org.w3c.dom.mediacapture.* -import org.w3c.dom.mediasource.* -import org.w3c.dom.parsing.* -import org.w3c.dom.pointerevents.* -import org.w3c.dom.svg.* -import org.w3c.dom.url.* -import org.w3c.fetch.* -import org.w3c.files.* -import org.w3c.notifications.* -import org.w3c.workers.* -import org.w3c.xhr.* /** * Exposes the JavaScript [Performance](https://developer.mozilla.org/en/docs/Web/API/Performance) to Kotlin diff --git a/libraries/stdlib/js/src/org.w3c/org.w3c.workers.kt b/libraries/stdlib/js/src/org.w3c/org.w3c.workers.kt index 1dd2362197a..75f7cd24fa5 100644 --- a/libraries/stdlib/js/src/org.w3c/org.w3c.workers.kt +++ b/libraries/stdlib/js/src/org.w3c/org.w3c.workers.kt @@ -1,5 +1,5 @@ /* - * Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Copyright 2010-2021 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. */ @@ -10,23 +10,10 @@ package org.w3c.workers import kotlin.js.* import org.khronos.webgl.* -import org.w3c.css.masking.* import org.w3c.dom.* -import org.w3c.dom.clipboard.* -import org.w3c.dom.css.* -import org.w3c.dom.encryptedmedia.* import org.w3c.dom.events.* -import org.w3c.dom.mediacapture.* -import org.w3c.dom.mediasource.* -import org.w3c.dom.parsing.* -import org.w3c.dom.pointerevents.* -import org.w3c.dom.svg.* -import org.w3c.dom.url.* import org.w3c.fetch.* -import org.w3c.files.* import org.w3c.notifications.* -import org.w3c.performance.* -import org.w3c.xhr.* /** * Exposes the JavaScript [ServiceWorker](https://developer.mozilla.org/en/docs/Web/API/ServiceWorker) to Kotlin @@ -78,6 +65,7 @@ public external interface RegistrationOptions { set(value) = definedExternally } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline fun RegistrationOptions(scope: String? = undefined, type: WorkerType? = WorkerType.CLASSIC): RegistrationOptions { val o = js("({})") @@ -122,6 +110,7 @@ public external interface ServiceWorkerMessageEventInit : EventInit { set(value) = definedExternally } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline fun ServiceWorkerMessageEventInit(data: Any? = undefined, origin: String? = undefined, lastEventId: String? = undefined, source: UnionMessagePortOrServiceWorker? = undefined, ports: Array? = undefined, bubbles: Boolean? = false, cancelable: Boolean? = false, composed: Boolean? = false): ServiceWorkerMessageEventInit { val o = js("({})") @@ -192,6 +181,7 @@ public external interface ClientQueryOptions { set(value) = definedExternally } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline fun ClientQueryOptions(includeUncontrolled: Boolean? = false, type: ClientType? = ClientType.WINDOW): ClientQueryOptions { val o = js("({})") @@ -216,6 +206,7 @@ public external open class ExtendableEvent(type: String, eventInitDict: Extendab public external interface ExtendableEventInit : EventInit +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline fun ExtendableEventInit(bubbles: Boolean? = false, cancelable: Boolean? = false, composed: Boolean? = false): ExtendableEventInit { val o = js("({})") @@ -241,13 +232,10 @@ public external open class InstallEvent(type: String, eventInitDict: ExtendableE public external interface ForeignFetchOptions { var scopes: Array? - get() = definedExternally - set(value) = definedExternally var origins: Array? - get() = definedExternally - set(value) = definedExternally } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline fun ForeignFetchOptions(scopes: Array?, origins: Array?): ForeignFetchOptions { val o = js("({})") @@ -275,8 +263,6 @@ public external open class FetchEvent(type: String, eventInitDict: FetchEventIni public external interface FetchEventInit : ExtendableEventInit { var request: Request? - get() = definedExternally - set(value) = definedExternally var clientId: String? /* = null */ get() = definedExternally set(value) = definedExternally @@ -285,6 +271,7 @@ public external interface FetchEventInit : ExtendableEventInit { set(value) = definedExternally } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline fun FetchEventInit(request: Request?, clientId: String? = null, isReload: Boolean? = false, bubbles: Boolean? = false, cancelable: Boolean? = false, composed: Boolean? = false): FetchEventInit { val o = js("({})") @@ -312,13 +299,12 @@ public external open class ForeignFetchEvent(type: String, eventInitDict: Foreig public external interface ForeignFetchEventInit : ExtendableEventInit { var request: Request? - get() = definedExternally - set(value) = definedExternally var origin: String? /* = "null" */ get() = definedExternally set(value) = definedExternally } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline fun ForeignFetchEventInit(request: Request?, origin: String? = "null", bubbles: Boolean? = false, cancelable: Boolean? = false, composed: Boolean? = false): ForeignFetchEventInit { val o = js("({})") @@ -332,8 +318,6 @@ public inline fun ForeignFetchEventInit(request: Request?, origin: String? = "nu public external interface ForeignFetchResponse { var response: Response? - get() = definedExternally - set(value) = definedExternally var origin: String? get() = definedExternally set(value) = definedExternally @@ -342,6 +326,7 @@ public external interface ForeignFetchResponse { set(value) = definedExternally } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline fun ForeignFetchResponse(response: Response?, origin: String? = undefined, headers: Array? = undefined): ForeignFetchResponse { val o = js("({})") @@ -387,6 +372,7 @@ public external interface ExtendableMessageEventInit : ExtendableEventInit { set(value) = definedExternally } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline fun ExtendableMessageEventInit(data: Any? = undefined, origin: String? = undefined, lastEventId: String? = undefined, source: UnionClientOrMessagePortOrServiceWorker? = undefined, ports: Array? = undefined, bubbles: Boolean? = false, cancelable: Boolean? = false, composed: Boolean? = false): ExtendableMessageEventInit { val o = js("({})") @@ -429,6 +415,7 @@ public external interface CacheQueryOptions { set(value) = definedExternally } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline fun CacheQueryOptions(ignoreSearch: Boolean? = false, ignoreMethod: Boolean? = false, ignoreVary: Boolean? = false, cacheName: String? = undefined): CacheQueryOptions { val o = js("({})") @@ -454,6 +441,7 @@ public external interface CacheBatchOperation { set(value) = definedExternally } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline fun CacheBatchOperation(type: String? = undefined, request: Request? = undefined, response: Response? = undefined, options: CacheQueryOptions? = undefined): CacheBatchOperation { val o = js("({})") @@ -489,6 +477,7 @@ public external interface UnionMessagePortOrServiceWorker public external interface UnionClientOrMessagePortOrServiceWorker /* please, don't implement this interface! */ +@JsName("null") @Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE") public external interface ServiceWorkerState { companion object @@ -505,6 +494,7 @@ public inline val ServiceWorkerState.Companion.ACTIVATED: ServiceWorkerState get public inline val ServiceWorkerState.Companion.REDUNDANT: ServiceWorkerState get() = "redundant".asDynamic().unsafeCast() /* please, don't implement this interface! */ +@JsName("null") @Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE") public external interface FrameType { companion object @@ -519,6 +509,7 @@ public inline val FrameType.Companion.NESTED: FrameType get() = "nested".asDynam public inline val FrameType.Companion.NONE: FrameType get() = "none".asDynamic().unsafeCast() /* please, don't implement this interface! */ +@JsName("null") @Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE") public external interface ClientType { companion object diff --git a/libraries/stdlib/js/src/org.w3c/org.w3c.xhr.kt b/libraries/stdlib/js/src/org.w3c/org.w3c.xhr.kt index d1959610866..75029da8d9d 100644 --- a/libraries/stdlib/js/src/org.w3c/org.w3c.xhr.kt +++ b/libraries/stdlib/js/src/org.w3c/org.w3c.xhr.kt @@ -1,5 +1,5 @@ /* - * Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Copyright 2010-2021 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. */ @@ -10,23 +10,9 @@ package org.w3c.xhr import kotlin.js.* import org.khronos.webgl.* -import org.w3c.css.masking.* import org.w3c.dom.* -import org.w3c.dom.clipboard.* -import org.w3c.dom.css.* -import org.w3c.dom.encryptedmedia.* import org.w3c.dom.events.* -import org.w3c.dom.mediacapture.* -import org.w3c.dom.mediasource.* -import org.w3c.dom.parsing.* -import org.w3c.dom.pointerevents.* -import org.w3c.dom.svg.* -import org.w3c.dom.url.* -import org.w3c.fetch.* import org.w3c.files.* -import org.w3c.notifications.* -import org.w3c.performance.* -import org.w3c.workers.* /** * Exposes the JavaScript [XMLHttpRequestEventTarget](https://developer.mozilla.org/en/docs/Web/API/XMLHttpRequestEventTarget) to Kotlin @@ -119,6 +105,7 @@ public external interface ProgressEventInit : EventInit { set(value) = definedExternally } +@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") @kotlin.internal.InlineOnly public inline fun ProgressEventInit(lengthComputable: Boolean? = false, loaded: Number? = 0, total: Number? = 0, bubbles: Boolean? = false, cancelable: Boolean? = false, composed: Boolean? = false): ProgressEventInit { val o = js("({})") @@ -132,6 +119,7 @@ public inline fun ProgressEventInit(lengthComputable: Boolean? = false, loaded: } /* please, don't implement this interface! */ +@JsName("null") @Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE") public external interface XMLHttpRequestResponseType { companion object diff --git a/libraries/stdlib/jvm/build.gradle b/libraries/stdlib/jvm/build.gradle index ac563951128..9a48d3bf301 100644 --- a/libraries/stdlib/jvm/build.gradle +++ b/libraries/stdlib/jvm/build.gradle @@ -120,7 +120,8 @@ compileKotlin { "-Xopt-in=kotlin.ExperimentalMultiplatform", "-Xopt-in=kotlin.contracts.ExperimentalContracts", "-Xinline-classes", - "-Xuse-14-inline-classes-mangling-scheme" + "-Xuse-14-inline-classes-mangling-scheme", + "-Xsuppress-deprecated-jvm-target-warning", ] moduleName = "kotlin-stdlib" } diff --git a/libraries/stdlib/src/kotlin/util/Result.kt b/libraries/stdlib/src/kotlin/util/Result.kt index ff701e6fd6a..5f3055b0e4b 100644 --- a/libraries/stdlib/src/kotlin/util/Result.kt +++ b/libraries/stdlib/src/kotlin/util/Result.kt @@ -16,7 +16,6 @@ import kotlin.jvm.JvmName * A discriminated union that encapsulates a successful outcome with a value of type [T] * or a failure with an arbitrary [Throwable] exception. */ -@Suppress("NON_PUBLIC_PRIMARY_CONSTRUCTOR_OF_INLINE_CLASS") @SinceKotlin("1.3") public inline class Result @PublishedApi internal constructor( @PublishedApi diff --git a/libraries/stdlib/unsigned/src/kotlin/UByte.kt b/libraries/stdlib/unsigned/src/kotlin/UByte.kt index 108e04f0f03..e923dd5448c 100644 --- a/libraries/stdlib/unsigned/src/kotlin/UByte.kt +++ b/libraries/stdlib/unsigned/src/kotlin/UByte.kt @@ -9,7 +9,6 @@ package kotlin import kotlin.experimental.* -@Suppress("NON_PUBLIC_PRIMARY_CONSTRUCTOR_OF_INLINE_CLASS") @SinceKotlin("1.3") @ExperimentalUnsignedTypes public inline class UByte @PublishedApi internal constructor(@PublishedApi internal val data: Byte) : Comparable { diff --git a/libraries/stdlib/unsigned/src/kotlin/UByteArray.kt b/libraries/stdlib/unsigned/src/kotlin/UByteArray.kt index 63d885be908..7dd7d6074c6 100644 --- a/libraries/stdlib/unsigned/src/kotlin/UByteArray.kt +++ b/libraries/stdlib/unsigned/src/kotlin/UByteArray.kt @@ -10,7 +10,6 @@ package kotlin @SinceKotlin("1.3") @ExperimentalUnsignedTypes public inline class UByteArray -@Suppress("NON_PUBLIC_PRIMARY_CONSTRUCTOR_OF_INLINE_CLASS") @PublishedApi internal constructor(@PublishedApi internal val storage: ByteArray) : Collection { diff --git a/libraries/stdlib/unsigned/src/kotlin/UInt.kt b/libraries/stdlib/unsigned/src/kotlin/UInt.kt index cd5527c5410..d0efa652343 100644 --- a/libraries/stdlib/unsigned/src/kotlin/UInt.kt +++ b/libraries/stdlib/unsigned/src/kotlin/UInt.kt @@ -9,7 +9,6 @@ package kotlin import kotlin.experimental.* -@Suppress("NON_PUBLIC_PRIMARY_CONSTRUCTOR_OF_INLINE_CLASS") @SinceKotlin("1.3") @ExperimentalUnsignedTypes public inline class UInt @PublishedApi internal constructor(@PublishedApi internal val data: Int) : Comparable { diff --git a/libraries/stdlib/unsigned/src/kotlin/UIntArray.kt b/libraries/stdlib/unsigned/src/kotlin/UIntArray.kt index e414edd52ce..b3a283bea30 100644 --- a/libraries/stdlib/unsigned/src/kotlin/UIntArray.kt +++ b/libraries/stdlib/unsigned/src/kotlin/UIntArray.kt @@ -10,7 +10,6 @@ package kotlin @SinceKotlin("1.3") @ExperimentalUnsignedTypes public inline class UIntArray -@Suppress("NON_PUBLIC_PRIMARY_CONSTRUCTOR_OF_INLINE_CLASS") @PublishedApi internal constructor(@PublishedApi internal val storage: IntArray) : Collection { diff --git a/libraries/stdlib/unsigned/src/kotlin/ULong.kt b/libraries/stdlib/unsigned/src/kotlin/ULong.kt index 6984c1da4ff..851e4625d50 100644 --- a/libraries/stdlib/unsigned/src/kotlin/ULong.kt +++ b/libraries/stdlib/unsigned/src/kotlin/ULong.kt @@ -9,7 +9,6 @@ package kotlin import kotlin.experimental.* -@Suppress("NON_PUBLIC_PRIMARY_CONSTRUCTOR_OF_INLINE_CLASS") @SinceKotlin("1.3") @ExperimentalUnsignedTypes public inline class ULong @PublishedApi internal constructor(@PublishedApi internal val data: Long) : Comparable { diff --git a/libraries/stdlib/unsigned/src/kotlin/ULongArray.kt b/libraries/stdlib/unsigned/src/kotlin/ULongArray.kt index c26ef7505b1..7baf5724c61 100644 --- a/libraries/stdlib/unsigned/src/kotlin/ULongArray.kt +++ b/libraries/stdlib/unsigned/src/kotlin/ULongArray.kt @@ -10,7 +10,6 @@ package kotlin @SinceKotlin("1.3") @ExperimentalUnsignedTypes public inline class ULongArray -@Suppress("NON_PUBLIC_PRIMARY_CONSTRUCTOR_OF_INLINE_CLASS") @PublishedApi internal constructor(@PublishedApi internal val storage: LongArray) : Collection { diff --git a/libraries/stdlib/unsigned/src/kotlin/UShort.kt b/libraries/stdlib/unsigned/src/kotlin/UShort.kt index cae4537e5bf..5933f15e74c 100644 --- a/libraries/stdlib/unsigned/src/kotlin/UShort.kt +++ b/libraries/stdlib/unsigned/src/kotlin/UShort.kt @@ -9,7 +9,6 @@ package kotlin import kotlin.experimental.* -@Suppress("NON_PUBLIC_PRIMARY_CONSTRUCTOR_OF_INLINE_CLASS") @SinceKotlin("1.3") @ExperimentalUnsignedTypes public inline class UShort @PublishedApi internal constructor(@PublishedApi internal val data: Short) : Comparable { diff --git a/libraries/stdlib/unsigned/src/kotlin/UShortArray.kt b/libraries/stdlib/unsigned/src/kotlin/UShortArray.kt index fa980913d11..b2f5c5a6c24 100644 --- a/libraries/stdlib/unsigned/src/kotlin/UShortArray.kt +++ b/libraries/stdlib/unsigned/src/kotlin/UShortArray.kt @@ -10,7 +10,6 @@ package kotlin @SinceKotlin("1.3") @ExperimentalUnsignedTypes public inline class UShortArray -@Suppress("NON_PUBLIC_PRIMARY_CONSTRUCTOR_OF_INLINE_CLASS") @PublishedApi internal constructor(@PublishedApi internal val storage: ShortArray) : Collection { diff --git a/libraries/tools/dukat/build.gradle.kts b/libraries/tools/dukat/build.gradle.kts index f32a242bea6..54020636d70 100644 --- a/libraries/tools/dukat/build.gradle.kts +++ b/libraries/tools/dukat/build.gradle.kts @@ -8,7 +8,7 @@ repositories { dependencies { implementation(kotlinStdlib()) - implementation("org.jetbrains.dukat:dukat:0.0.20.1") + implementation("org.jetbrains.dukat:dukat:0.5.8-rc.4") implementation("org.jsoup:jsoup:1.8.2") } diff --git a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/AbstractKotlinAndroidGradleTests.kt b/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/AbstractKotlinAndroidGradleTests.kt index a7bf583801c..9074011f5ed 100644 --- a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/AbstractKotlinAndroidGradleTests.kt +++ b/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/AbstractKotlinAndroidGradleTests.kt @@ -867,21 +867,7 @@ fun getSomething() = 10 fun testDetectAndroidJava8() = with(Project("AndroidProject")) { setupWorkingDir() - val kotlinJvmTarget18Regex = Regex("Kotlin compiler args: .* -jvm-target 1.8") - - gradleBuildScript("Lib").appendText( - "\n" + """ - android.compileOptions { - sourceCompatibility JavaVersion.VERSION_1_6 - targetCompatibility JavaVersion.VERSION_1_6 - } - """.trimIndent() - ) - - build(":Lib:assembleDebug", "-Pkotlin.setJvmTargetFromAndroidCompileOptions=true") { - assertSuccessful() - assertNotContains(kotlinJvmTarget18Regex) - } + val kotlinJvmTarget16Regex = Regex("Kotlin compiler args: .* -jvm-target 1.6") gradleBuildScript("Lib").appendText( "\n" + """ @@ -892,14 +878,28 @@ fun getSomething() = 10 """.trimIndent() ) + build(":Lib:assembleDebug", "-Pkotlin.setJvmTargetFromAndroidCompileOptions=true") { + assertSuccessful() + assertNotContains(kotlinJvmTarget16Regex) + } + + gradleBuildScript("Lib").appendText( + "\n" + """ + android.compileOptions { + sourceCompatibility JavaVersion.VERSION_1_6 + targetCompatibility JavaVersion.VERSION_1_6 + } + """.trimIndent() + ) + build("clean", ":Lib:assembleDebug") { assertSuccessful() - assertNotContains(kotlinJvmTarget18Regex) + assertNotContains(kotlinJvmTarget16Regex) } build(":Lib:assembleDebug", "-Pkotlin.setJvmTargetFromAndroidCompileOptions=true") { assertSuccessful() - assertContainsRegex(kotlinJvmTarget18Regex) + assertContainsRegex(kotlinJvmTarget16Regex) } } } diff --git a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/IncrementalCompilationMultiProjectIT.kt b/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/IncrementalCompilationMultiProjectIT.kt index e14da624cf5..65be9b10dac 100644 --- a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/IncrementalCompilationMultiProjectIT.kt +++ b/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/IncrementalCompilationMultiProjectIT.kt @@ -347,5 +347,33 @@ open class A { assertCompiledKotlinSources(project.relativize(aaKt)) } } + + /** Regression test for KT-40875. */ + @Test + fun testMoveFunctionFromLibWithRemappedBuildDirs() { + val project = defaultProject() + project.setupWorkingDir() + project.projectDir.resolve("build.gradle").appendText(""" + + allprojects { + it.buildDir = new File(rootDir, "../out" + it.path.replace(":", "/") + "/build") + } + """.trimIndent()) + project.build("build") { + assertSuccessful() + } + + val barUseABKt = project.projectDir.getFileByName("barUseAB.kt") + val barInApp = File(project.projectDir, "app/src/main/kotlin/bar").apply { mkdirs() } + barUseABKt.copyTo(File(barInApp, barUseABKt.name)) + barUseABKt.delete() + + project.build("build") { + assertSuccessful() + val affectedSources = project.projectDir.getFilesByNames("fooCallUseAB.kt", "barUseAB.kt") + val relativePaths = project.relativize(affectedSources) + assertCompiledKotlinSources(relativePaths) + } + } } diff --git a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/KotlinSpecificDependenciesIT.kt b/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/KotlinSpecificDependenciesIT.kt index b2cfa6a6936..bf543a1c4a8 100644 --- a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/KotlinSpecificDependenciesIT.kt +++ b/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/KotlinSpecificDependenciesIT.kt @@ -1,11 +1,10 @@ /* - * Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Copyright 2010-2021 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. */ package org.jetbrains.kotlin.gradle -import org.jetbrains.kotlin.gradle.internals.KOTLIN_TEST_MULTIPLATFORM_MODULE_NAME import org.jetbrains.kotlin.gradle.util.AGPVersion import org.jetbrains.kotlin.gradle.util.modify import org.jetbrains.kotlin.test.util.KtTestUtil @@ -111,7 +110,7 @@ class KotlinSpecificDependenciesIT : BaseGradleIT() { ) } - private val kotlinTestMultiplatformDependency = "org.jetbrains.kotlin:$KOTLIN_TEST_MULTIPLATFORM_MODULE_NAME" + private val kotlinTestMultiplatformDependency = "org.jetbrains.kotlin:kotlin-test" @Test fun testKotlinTestSingleDependency() { @@ -222,7 +221,7 @@ class KotlinSpecificDependenciesIT : BaseGradleIT() { gradleBuildScript().appendText( "\n" + """ dependencies { testImplementation("$kotlinTestMultiplatformDependency") } - configurations.getByName("testImplementation").dependencies.removeAll { it.name == "$KOTLIN_TEST_MULTIPLATFORM_MODULE_NAME" } + configurations.getByName("testImplementation").dependencies.removeAll { it.name == "kotlin-test" } """.trimIndent() ) checkTaskCompileClasspath("compileTestKotlin", checkModulesNotInClasspath = listOf("kotlin-test")) @@ -244,14 +243,14 @@ class KotlinSpecificDependenciesIT : BaseGradleIT() { kotlin.coreLibrariesVersion = "$customVersion" dependencies { testImplementation("org.jetbrains.kotlin:kotlin-reflect") - testImplementation("org.jetbrains.kotlin:kotlin-test-multiplatform") + testImplementation("org.jetbrains.kotlin:kotlin-test") } test.useJUnit() """.trimIndent() ) checkTaskCompileClasspath( "compileTestKotlin", - listOf("kotlin-stdlib-", "kotlin-reflect-", "kotlin-test-junit-").map { it + customVersion } + listOf("kotlin-stdlib-", "kotlin-reflect-", "kotlin-test-").map { it + customVersion } ) } diff --git a/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/compilerRunner/GradleKotlinCompilerRunner.kt b/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/compilerRunner/GradleKotlinCompilerRunner.kt index 5bbb9eacf11..fb4fc14b5a2 100644 --- a/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/compilerRunner/GradleKotlinCompilerRunner.kt +++ b/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/compilerRunner/GradleKotlinCompilerRunner.kt @@ -257,6 +257,7 @@ internal open class GradleCompilerRunner(protected val taskProvider: GradleCompi return IncrementalModuleInfo( projectRoot = gradle.rootProject.projectDir, + rootProjectBuildDir = gradle.rootProject.buildDir, dirToModule = dirToModule, nameToModules = nameToModules, jarToClassListFile = jarToClassListFile, diff --git a/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/dsl/KotlinJvmOptions.kt b/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/dsl/KotlinJvmOptions.kt index 2cb72665d13..d1b1e9eb076 100644 --- a/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/dsl/KotlinJvmOptions.kt +++ b/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/dsl/KotlinJvmOptions.kt @@ -23,9 +23,9 @@ interface KotlinJvmOptions : org.jetbrains.kotlin.gradle.dsl.KotlinCommonOption var jdkHome: kotlin.String? /** - * Target version of the generated JVM bytecode (1.6, 1.8, 9, 10, 11, 12, 13, 14 or 15), default is 1.6 + * Target version of the generated JVM bytecode (1.6 (DEPRECATED), 1.8, 9, 10, 11, 12, 13, 14 or 15), default is 1.8 * Possible values: "1.6", "1.8", "9", "10", "11", "12", "13", "14", "15" - * Default value: "1.6" + * Default value: "1.8" */ var jvmTarget: kotlin.String diff --git a/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/dsl/KotlinJvmOptionsBase.kt b/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/dsl/KotlinJvmOptionsBase.kt index db21b3735dc..b0d0f1263d2 100644 --- a/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/dsl/KotlinJvmOptionsBase.kt +++ b/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/dsl/KotlinJvmOptionsBase.kt @@ -62,7 +62,7 @@ internal abstract class KotlinJvmOptionsBase : org.jetbrains.kotlin.gradle.dsl.K private var jvmTargetField: kotlin.String? = null override var jvmTarget: kotlin.String - get() = jvmTargetField ?: "1.6" + get() = jvmTargetField ?: "1.8" set(value) { jvmTargetField = value } @@ -137,7 +137,7 @@ internal fun org.jetbrains.kotlin.cli.common.arguments.K2JVMCompilerArguments.fi includeRuntime = false javaParameters = false jdkHome = null - jvmTarget = "1.6" + jvmTarget = "1.8" moduleName = null noJdk = false noReflect = true diff --git a/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/internal/KotlinDependenciesManagement.kt b/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/internal/KotlinDependenciesManagement.kt index ee514ddd019..a7c111b0b05 100644 --- a/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/internal/KotlinDependenciesManagement.kt +++ b/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/internal/KotlinDependenciesManagement.kt @@ -1,5 +1,5 @@ /* - * Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Copyright 2010-2021 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. */ @@ -36,11 +36,13 @@ import org.jetbrains.kotlin.gradle.targets.jvm.JvmCompilationsTestRunSource import org.jetbrains.kotlin.gradle.tasks.KOTLIN_MODULE_GROUP import org.jetbrains.kotlin.gradle.tasks.locateTask import org.jetbrains.kotlin.gradle.testing.KotlinTaskTestRun +import org.jetbrains.kotlin.gradle.utils.isGradleVersionAtLeast import org.jetbrains.kotlin.gradle.utils.lowerCamelCaseName internal fun customizeKotlinDependencies(project: Project) { configureStdlibDefaultDependency(project) configureKotlinTestDependencies(project) + configureKotlinTestDependency(project) configureDefaultVersionsResolutionStrategy(project) } @@ -179,6 +181,113 @@ private fun stdlibModuleForJvmCompilations(compilations: Iterable 1 || c1 == 1 && c2 >= 5 + } ?: false + + KotlinDependencyScope.values().forEach { scope -> + val versionOrNullBySourceSet = mutableMapOf() + + project.kotlinExtension.sourceSets.all { kotlinSourceSet -> + val configuration = project.sourceSetDependencyConfigurationByScope(kotlinSourceSet, scope) + var finalizingDependencies = false + + configuration.dependencies.matching(::isKotlinTestRootDependency).apply { + firstOrNull()?.let { versionOrNullBySourceSet[kotlinSourceSet] = it.version } + whenObjectRemoved { + if (!finalizingDependencies && !any()) + versionOrNullBySourceSet.remove(kotlinSourceSet) + } + whenObjectAdded { item -> + versionOrNullBySourceSet[kotlinSourceSet] = item.version + } + } + + project.tryWithDependenciesIfUnresolved(configuration) { dependencies -> + val parentOrOwnVersions: List = + kotlinSourceSet.getSourceSetHierarchy().filter(versionOrNullBySourceSet::contains).map(versionOrNullBySourceSet::get) + + finalizingDependencies = true + + for (version in parentOrOwnVersions.distinct()) { // add dependencies with each version and let Gradle disambiguate them + val effectiveVersion = version ?: project.kotlinExtension.coreLibrariesVersion + if (!isAtLeast1_5(effectiveVersion)) continue + val clarifyCapability = kotlinTestCapabilityForJvmSourceSet(project, kotlinSourceSet) ?: continue + val clarifiedDependency = + (project.kotlinDependency(KOTLIN_TEST_ROOT_MODULE_NAME, version) as ExternalDependency).apply { + if (version == null) { + version { constraint -> constraint.require(project.kotlinExtension.coreLibrariesVersion) } + } + capabilities { + it.requireCapability(clarifyCapability) + } + } + dependencies.add(clarifiedDependency) + } + } + } + } +} + +private fun kotlinTestCapabilityForJvmSourceSet(project: Project, kotlinSourceSet: KotlinSourceSet): String? { + val compilations = CompilationSourceSetUtil.compilationsBySourceSets(project).getValue(kotlinSourceSet) + .filter { it.target !is KotlinMetadataTarget } + + val platformTypes = compilations.map { it.platformType } + // TODO: Extract jvmPlatformTypes to public constant? + val jvmPlatforms = setOf(KotlinPlatformType.jvm, KotlinPlatformType.androidJvm) + if (!jvmPlatforms.containsAll(platformTypes)) return null + + val testTaskLists: List?> = compilations.map { compilation -> + val target = compilation.target + when { + target is KotlinTargetWithTests<*, *> -> + target.findTestRunsByCompilation(compilation)?.filterIsInstance>()?.map { it.executionTask.get() } + target is KotlinWithJavaTarget<*> -> + if (compilation.name == KotlinCompilation.TEST_COMPILATION_NAME) + project.locateTask(target.testTaskName)?.get()?.let(::listOf) + else null + compilation is KotlinJvmAndroidCompilation -> when (compilation.androidVariant) { + is UnitTestVariant -> + project.locateTask(lowerCamelCaseName("test", compilation.androidVariant.name))?.get()?.let(::listOf) + is TestVariant -> (compilation.androidVariant as TestVariant).connectedInstrumentTest?.let(::listOf) + else -> null + } + else -> null + } + } + if (null in testTaskLists) { + return null + } + val testTasks = testTaskLists.flatMap { checkNotNull(it) } + val frameworks = testTasks.mapTo(mutableSetOf()) { testTask -> + when (testTask) { + is Test -> testFrameworkOf(testTask) + else -> // Android connected test tasks don't inherit from Test, but we use JUnit for them + KotlinTestJvmFramework.junit + } + } + return when { + frameworks.size > 1 -> null + else -> "$KOTLIN_MODULE_GROUP:$KOTLIN_TEST_ROOT_MODULE_NAME-framework-${frameworks.single()}" + } +} + +internal const val KOTLIN_TEST_ROOT_MODULE_NAME = "kotlin-test" + + internal fun configureKotlinTestDependencies(project: Project) { fun isKotlinTestMultiplatformDependency(dependency: Dependency) = dependency.group == KOTLIN_MODULE_GROUP && dependency.name == KOTLIN_TEST_MULTIPLATFORM_MODULE_NAME diff --git a/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/plugin/KotlinPlugin.kt b/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/plugin/KotlinPlugin.kt index 2195f8c040f..1d56732bf87 100755 --- a/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/plugin/KotlinPlugin.kt +++ b/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/plugin/KotlinPlugin.kt @@ -950,9 +950,9 @@ abstract class AbstractAndroidProjectHandler(private val kotlinConfigurationTool private fun applyAndroidJavaVersion(baseExtension: BaseExtension, kotlinOptions: KotlinJvmOptions) { val javaVersion = - listOf(baseExtension.compileOptions.sourceCompatibility, baseExtension.compileOptions.targetCompatibility).min()!! - if (javaVersion >= JavaVersion.VERSION_1_8) - kotlinOptions.jvmTarget = "1.8" + minOf(baseExtension.compileOptions.sourceCompatibility, baseExtension.compileOptions.targetCompatibility) + if (javaVersion == JavaVersion.VERSION_1_6) + kotlinOptions.jvmTarget = "1.6" } private fun preprocessVariant( diff --git a/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/plugin/KotlinProperties.kt b/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/plugin/KotlinProperties.kt index d0fabeb4812..4b0c5b44264 100644 --- a/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/plugin/KotlinProperties.kt +++ b/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/plugin/KotlinProperties.kt @@ -1,5 +1,5 @@ /* - * Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Copyright 2010-2021 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. */ @@ -253,6 +253,9 @@ internal class PropertiesProvider private constructor(private val project: Proje val stdlibDefaultDependency: Boolean get() = booleanProperty("kotlin.stdlib.default.dependency") ?: true + val kotlinTestInferJvmVariant: Boolean + get() = booleanProperty("kotlin.test.infer.jvm.variant") ?: true + private fun propertyWithDeprecatedVariant(propName: String, deprecatedPropName: String): String? { val deprecatedProperty = property(deprecatedPropName) if (deprecatedProperty != null) { diff --git a/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/targets/js/NpmVersions.kt b/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/targets/js/NpmVersions.kt index 26c3784b0a1..86d16043ab1 100644 --- a/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/targets/js/NpmVersions.kt +++ b/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/targets/js/NpmVersions.kt @@ -10,7 +10,7 @@ package org.jetbrains.kotlin.gradle.targets.js */ // DO NOT MODIFY DIRECTLY! Use org.jetbrains.kotlin.generators.gradle.targets.js.MainKt class NpmVersions { - val dukat = NpmPackageVersion("dukat", "0.5.8-rc.3") + val dukat = NpmPackageVersion("dukat", "0.5.8-rc.4") val webpack = NpmPackageVersion("webpack", "4.44.1") val webpackCli = NpmPackageVersion("webpack-cli", "3.3.12") val webpackBundleAnalyzer = NpmPackageVersion("webpack-bundle-analyzer", "3.8.0") @@ -35,4 +35,4 @@ class NpmVersions { val karmaSourcemapLoader = NpmPackageVersion("karma-sourcemap-loader", "0.3.8") val kotlinJsTestRunner = KotlinGradleNpmPackage("test-js-runner") -} \ No newline at end of file +} diff --git a/libraries/tools/kotlin-gradle-plugin/src/test/kotlin/org/jetbrains/kotlin/gradle/internals/ExposedForIntegrationTests.kt b/libraries/tools/kotlin-gradle-plugin/src/test/kotlin/org/jetbrains/kotlin/gradle/internals/ExposedForIntegrationTests.kt index 0c02d9fc57a..ac223b63d86 100644 --- a/libraries/tools/kotlin-gradle-plugin/src/test/kotlin/org/jetbrains/kotlin/gradle/internals/ExposedForIntegrationTests.kt +++ b/libraries/tools/kotlin-gradle-plugin/src/test/kotlin/org/jetbrains/kotlin/gradle/internals/ExposedForIntegrationTests.kt @@ -1,5 +1,5 @@ /* - * Copyright 2010-2019 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Copyright 2010-2021 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. */ @@ -26,4 +26,3 @@ const val NO_NATIVE_STDLIB_PROPERTY_WARNING = NO_NATIVE_STDLIB_PROPERTY_WARNING val KOTLIN_12X_MPP_DEPRECATION_WARNING = KOTLIN_12X_MPP_DEPRECATION_WARNING -const val KOTLIN_TEST_MULTIPLATFORM_MODULE_NAME = org.jetbrains.kotlin.gradle.internal.KOTLIN_TEST_MULTIPLATFORM_MODULE_NAME \ No newline at end of file diff --git a/libraries/tools/script-runtime/build.gradle b/libraries/tools/script-runtime/build.gradle index 6f9c169593d..d2989069696 100644 --- a/libraries/tools/script-runtime/build.gradle +++ b/libraries/tools/script-runtime/build.gradle @@ -34,8 +34,9 @@ configureJavadocJar() compileKotlin { kotlinOptions.freeCompilerArgs = [ - "-Xallow-kotlin-package", - "-Xnormalize-constructor-calls=enable", + "-Xallow-kotlin-package", + "-Xnormalize-constructor-calls=enable", + "-Xsuppress-deprecated-jvm-target-warning", ] kotlinOptions.moduleName = project.name } diff --git a/native/commonizer/README.md b/native/commonizer/README.md index 5fe8d3751d7..ba5c59ce09d 100644 --- a/native/commonizer/README.md +++ b/native/commonizer/README.md @@ -44,7 +44,7 @@ There are few limitations in the current version of KLIB Commonizer: ``` Kotlin KLIB commonizer: Please wait while preparing libraries. [Step 1 of 1] Preparing commonized Kotlin/Native libraries for targets [macos_x64, linux_x64, mingw_x64] (137 items) - Warning: No platform libraries found for target mingw_x64. This target will be excluded from commonization. + Warning: No platform libraries found for target [mingw_x64]. This target will be excluded from commonization. ... ``` In the degenerate case when all but one targets are not available at the host machine, the KLIB Commonizer is not launched. diff --git a/native/commonizer/build.gradle.kts b/native/commonizer/build.gradle.kts index 008bba5da8d..c9e124ef4b5 100644 --- a/native/commonizer/build.gradle.kts +++ b/native/commonizer/build.gradle.kts @@ -14,6 +14,13 @@ configurations { } dependencies { + embedded(project(":kotlinx-metadata-klib")) { isTransitive = false } + embedded(project(":kotlinx-metadata")) { isTransitive = false } + + // N.B. The order of "kotlinx-metadata*" dependencies makes sense for runtime classpath + // of the "runCommonizer" task. Please, don't mix them up. + compileOnly(project(":kotlinx-metadata-klib")) { isTransitive = false } + compileOnly(project(":kotlinx-metadata")) { isTransitive = false } compileOnly(project(":compiler:cli-common")) compileOnly(project(":compiler:ir.serialization.common")) compileOnly(project(":compiler:frontend")) @@ -29,6 +36,8 @@ dependencies { testImplementation(commonDep("junit:junit")) testImplementation(projectTests(":compiler:tests-common")) + testImplementation(project(":kotlinx-metadata-klib")) { isTransitive = false } + testImplementation(project(":kotlinx-metadata")) { isTransitive = false } } val runCommonizer by tasks.registering(JavaExec::class) { diff --git a/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/CommonizerParameters.kt b/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/CommonizerParameters.kt index ca1b747521f..95b4fc4d980 100644 --- a/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/CommonizerParameters.kt +++ b/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/CommonizerParameters.kt @@ -13,7 +13,6 @@ class CommonizerParameters( ) { // use linked hash map to preserve order private val _targetProviders = LinkedHashMap() - val targetProviders: List get() = _targetProviders.values.toList() val sharedTarget: SharedTarget get() = SharedTarget(_targetProviders.keys) @@ -31,5 +30,22 @@ class CommonizerParameters( return this } - fun hasAnythingToCommonize(): Boolean = _targetProviders.size >= 2 + private var _resultsConsumer: ResultsConsumer? = null + var resultsConsumer: ResultsConsumer + get() = _resultsConsumer ?: error("Results consumer has not been set") + set(value) { + check(_resultsConsumer == null) + _resultsConsumer = value + } + + fun hasAnythingToCommonize(): Boolean { + if (_targetProviders.size < 2) return false // too few targets + + val allModuleNames: List> = _targetProviders.values.map { targetProvider -> + targetProvider.modulesProvider.loadModuleInfos().mapTo(HashSet()) { it.name } + } + val commonModuleNames: Set = allModuleNames.reduce { a, b -> a intersect b } + + return commonModuleNames.isNotEmpty() // there are modules that are present in every target + } } diff --git a/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/CommonizerResult.kt b/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/CommonizerResult.kt deleted file mode 100644 index d63906befbc..00000000000 --- a/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/CommonizerResult.kt +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright 2010-2019 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. - */ - -package org.jetbrains.kotlin.descriptors.commonizer - -import org.jetbrains.kotlin.descriptors.ModuleDescriptor -import java.io.File - -sealed class CommonizerResult { - object NothingToDo : CommonizerResult() - - class Done( - val modulesByTargets: Map> - ) : CommonizerResult() { - val sharedTarget: SharedTarget by lazy { modulesByTargets.keys.filterIsInstance().single() } - val leafTargets: Set by lazy { modulesByTargets.keys.filterIsInstance().toSet() } - } -} - -sealed class ModuleResult { - class Missing(val originalLocation: File) : ModuleResult() - class Commonized(val module: ModuleDescriptor) : ModuleResult() -} diff --git a/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/CommonizerTarget.kt b/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/CommonizerTarget.kt index 7d04e7d1564..b91271767a6 100644 --- a/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/CommonizerTarget.kt +++ b/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/CommonizerTarget.kt @@ -9,12 +9,28 @@ import org.jetbrains.kotlin.konan.target.KonanTarget // N.B. TargetPlatform/SimplePlatform are non exhaustive enough to address both target platforms such as // JVM, JS and concrete Kotlin/Native targets, e.g. macos_x64, ios_x64, linux_x64. -sealed class CommonizerTarget +sealed class CommonizerTarget { + abstract val name: String + abstract val prettyName: String -data class LeafTarget(val name: String, val konanTarget: KonanTarget? = null) : CommonizerTarget() + fun prettyCommonizedName(sharedTarget: SharedTarget): String = when { + this == sharedTarget -> prettyName + this in sharedTarget.targets -> sharedTarget.targets.joinToString(prefix = "[", postfix = "]") { + if (it == this) "${it.name}(*)" else it.name + } + else -> error("Target $prettyName is not in ${sharedTarget.prettyName}") + } +} + +data class LeafTarget(override val name: String, val konanTarget: KonanTarget? = null) : CommonizerTarget() { + override val prettyName get() = "[$name]" +} data class SharedTarget(val targets: Set) : CommonizerTarget() { init { require(targets.isNotEmpty()) } -} \ No newline at end of file + + override val name get() = targets.joinToString(prefix = "[", postfix = "]") { it.name } + override val prettyName get() = name +} diff --git a/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/ResultsConsumer.kt b/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/ResultsConsumer.kt new file mode 100644 index 00000000000..cf9dfd5db2b --- /dev/null +++ b/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/ResultsConsumer.kt @@ -0,0 +1,40 @@ +/* + * Copyright 2010-2021 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. + */ + +package org.jetbrains.kotlin.descriptors.commonizer + +import org.jetbrains.kotlin.library.SerializedMetadata +import java.io.File + +interface ResultsConsumer { + enum class Status { NOTHING_TO_DO, DONE } + + sealed class ModuleResult { + abstract val libraryName: String + + class Missing(val originalLocation: File) : ModuleResult() { + override val libraryName: String get() = originalLocation.name + } + + class Commonized(override val libraryName: String, val metadata: SerializedMetadata) : ModuleResult() + } + + /** + * Consume a single [ModuleResult] for the specified [CommonizerTarget]. + */ + fun consume(target: CommonizerTarget, moduleResult: ModuleResult) + + /** + * Mark the specified [CommonizerTarget] as fully consumed. + * It's forbidden to make subsequent [consume] calls for fully consumed targets. + */ + fun targetConsumed(target: CommonizerTarget) + + /** + * Notify that all results have been consumed. + * It's forbidden to make any subsequent [consume] and [targetConsumed] calls after this call. + */ + fun allConsumed(status: Status) +} diff --git a/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/TargetProvider.kt b/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/TargetProvider.kt index fc16cc90f75..fdd2be0ba74 100644 --- a/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/TargetProvider.kt +++ b/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/TargetProvider.kt @@ -5,31 +5,18 @@ package org.jetbrains.kotlin.descriptors.commonizer -import org.jetbrains.kotlin.builtins.DefaultBuiltIns -import org.jetbrains.kotlin.builtins.KotlinBuiltIns import org.jetbrains.kotlin.descriptors.ModuleDescriptor +import org.jetbrains.kotlin.library.SerializedMetadata import java.io.File class TargetProvider( val target: LeafTarget, - val builtInsClass: Class, - val builtInsProvider: BuiltInsProvider, val modulesProvider: ModulesProvider, val dependeeModulesProvider: ModulesProvider? ) -interface BuiltInsProvider { - fun loadBuiltIns(): KotlinBuiltIns - - companion object { - val defaultBuiltInsProvider = object : BuiltInsProvider { - override fun loadBuiltIns() = DefaultBuiltIns.Instance - } - } -} - interface ModulesProvider { - class ModuleInfo( + open class ModuleInfo( val name: String, val originalLocation: File, val cInteropAttributes: CInteropModuleAttributes? @@ -40,6 +27,17 @@ interface ModulesProvider { val exportForwardDeclarations: Collection ) - fun loadModuleInfos(): Map + /** + * Returns information about all modules that can be loaded by this [ModulesProvider] in the form of [ModuleInfo]s. + * This function is relatively light-weight and does not have significant impact on performance. + */ + fun loadModuleInfos(): Collection + + /** + * Loads metadata for the specified module. + */ + fun loadModuleMetadata(name: String): SerializedMetadata + + @Deprecated("To be replaced by loadModuleMetadata()") fun loadModules(dependencies: Collection): Map } diff --git a/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/builder/CommonizedAnnotationDescriptor.kt b/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/builder/CommonizedAnnotationDescriptor.kt deleted file mode 100644 index e3f01500670..00000000000 --- a/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/builder/CommonizedAnnotationDescriptor.kt +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright 2010-2019 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. - */ - -package org.jetbrains.kotlin.descriptors.commonizer.builder - -import org.jetbrains.kotlin.descriptors.SourceElement -import org.jetbrains.kotlin.descriptors.annotations.AnnotationDescriptor -import org.jetbrains.kotlin.descriptors.commonizer.cir.CirAnnotation -import org.jetbrains.kotlin.descriptors.commonizer.utils.compactConcat -import org.jetbrains.kotlin.descriptors.commonizer.utils.compactMapValues -import org.jetbrains.kotlin.resolve.constants.AnnotationValue -import org.jetbrains.kotlin.storage.getValue - -class CommonizedAnnotationDescriptor( - targetComponents: TargetDeclarationsBuilderComponents, - cirAnnotation: CirAnnotation -) : AnnotationDescriptor { - override val type by targetComponents.storageManager.createLazyValue { - cirAnnotation.type.buildType(targetComponents, TypeParameterResolver.EMPTY, expandTypeAliases = true) - } - - override val allValueArguments by targetComponents.storageManager.createLazyValue { - cirAnnotation.constantValueArguments compactConcat cirAnnotation.annotationValueArguments.compactMapValues { (_, nestedCirAnnotation) -> - AnnotationValue(CommonizedAnnotationDescriptor(targetComponents, nestedCirAnnotation)) - } - } - - override val source: SourceElement get() = SourceElement.NO_SOURCE -} diff --git a/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/builder/CommonizedClassDescriptor.kt b/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/builder/CommonizedClassDescriptor.kt deleted file mode 100644 index cc1fd67a432..00000000000 --- a/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/builder/CommonizedClassDescriptor.kt +++ /dev/null @@ -1,166 +0,0 @@ -/* - * Copyright 2010-2019 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. - */ - -package org.jetbrains.kotlin.descriptors.commonizer.builder - -import org.jetbrains.kotlin.descriptors.* -import org.jetbrains.kotlin.descriptors.annotations.Annotations -import org.jetbrains.kotlin.descriptors.commonizer.cir.CirType -import org.jetbrains.kotlin.descriptors.commonizer.cir.CirTypeParameter -import org.jetbrains.kotlin.descriptors.impl.ClassConstructorDescriptorImpl -import org.jetbrains.kotlin.descriptors.impl.ClassDescriptorBase -import org.jetbrains.kotlin.incremental.components.NoLookupLocation -import org.jetbrains.kotlin.name.Name -import org.jetbrains.kotlin.resolve.DescriptorFactory.createPrimaryConstructorForObject -import org.jetbrains.kotlin.resolve.CliSealedClassInheritorsProvider -import org.jetbrains.kotlin.resolve.descriptorUtil.fqNameSafe -import org.jetbrains.kotlin.resolve.scopes.MemberScope -import org.jetbrains.kotlin.resolve.scopes.StaticScopeForKotlinEnum -import org.jetbrains.kotlin.types.AbstractClassTypeConstructor -import org.jetbrains.kotlin.types.TypeConstructor -import org.jetbrains.kotlin.types.checker.KotlinTypeRefiner - -class CommonizedClassDescriptor( - targetComponents: TargetDeclarationsBuilderComponents, - containingDeclaration: DeclarationDescriptor, - override val annotations: Annotations, - name: Name, - private val kind: ClassKind, - private val modality: Modality, - private val visibility: DescriptorVisibility, - private val isCompanion: Boolean, - private val isData: Boolean, - private val isInline: Boolean, - private val isInner: Boolean, - isExternal: Boolean, - private val isExpect: Boolean, - private val isActual: Boolean, - cirDeclaredTypeParameters: List, - companionObjectName: Name?, - cirSupertypes: Collection -) : ClassDescriptorBase(targetComponents.storageManager, containingDeclaration, name, SourceElement.NO_SOURCE, isExternal) { - private lateinit var _unsubstitutedMemberScope: CommonizedMemberScope - private lateinit var constructors: Collection - private var primaryConstructor: ClassConstructorDescriptor? = null - - private val staticScope = if (kind == ClassKind.ENUM_CLASS) - StaticScopeForKotlinEnum(targetComponents.storageManager, this) - else - MemberScope.Empty - - private val typeConstructor = CommonizedClassTypeConstructor(targetComponents, cirSupertypes) - private val sealedSubclasses = targetComponents.storageManager.createLazyValue { - // TODO: pass proper language version settings - if (modality == Modality.SEALED) { - CliSealedClassInheritorsProvider.computeSealedSubclasses(this, allowSealedInheritorsInDifferentFilesOfSamePackage = false) - } else { - emptyList() - } - } - - private val declaredTypeParametersAndTypeParameterResolver = targetComponents.storageManager.createLazyValue { - val parent = if (isInner) (containingDeclaration as? ClassDescriptor)?.getTypeParameterResolver() else null - - cirDeclaredTypeParameters.buildDescriptorsAndTypeParameterResolver( - targetComponents, - parent ?: TypeParameterResolver.EMPTY, - this - ) - } - - private val companionObjectDescriptor = targetComponents.storageManager.createNullableLazyValue { - if (companionObjectName != null) - unsubstitutedMemberScope.getContributedClassifier(companionObjectName, NoLookupLocation.FOR_ALREADY_TRACKED) as? ClassDescriptor - else - null - } - - override fun getKind() = kind - override fun getModality() = modality - override fun getVisibility() = visibility - override fun isCompanionObject() = isCompanion - override fun isData() = isData - override fun isInline() = isInline - override fun isInner() = isInner - override fun isExpect() = isExpect - override fun isActual() = isActual - override fun isFun() = false // TODO: modifier "fun" should be accessible from here too - override fun isValue() = false // TODO: modifier "value" should be accessible from here too - - override fun getUnsubstitutedMemberScope(kotlinTypeRefiner: KotlinTypeRefiner): CommonizedMemberScope { - check(kotlinTypeRefiner == KotlinTypeRefiner.Default) { - "${kotlinTypeRefiner::class.java} is not supported in ${this::class.java}" - } - return _unsubstitutedMemberScope - } - - override fun getUnsubstitutedMemberScope(): CommonizedMemberScope = super.getUnsubstitutedMemberScope() as CommonizedMemberScope - - fun setUnsubstitutedMemberScope(unsubstitutedMemberScope: CommonizedMemberScope) { - _unsubstitutedMemberScope = unsubstitutedMemberScope - } - - override fun getDeclaredTypeParameters() = declaredTypeParametersAndTypeParameterResolver().first - val typeParameterResolver: TypeParameterResolver get() = declaredTypeParametersAndTypeParameterResolver().second - override fun getConstructors() = constructors - override fun getUnsubstitutedPrimaryConstructor() = primaryConstructor - override fun getStaticScope(): MemberScope = staticScope - override fun getTypeConstructor(): TypeConstructor = typeConstructor - override fun getCompanionObjectDescriptor() = companionObjectDescriptor() - override fun getSealedSubclasses() = sealedSubclasses() - - fun initialize(constructors: Collection) { - if (isExpect && kind.isSingleton) { - check(constructors.isEmpty()) - - primaryConstructor = if (kind == ClassKind.ENUM_ENTRY) - createPrimaryConstructorForObject(this, SourceElement.NO_SOURCE).apply { returnType = getDefaultType() } - else - null - - this.constructors = listOfNotNull(primaryConstructor) - } else { - constructors.forEach { it.returnType = getDefaultType() } - - primaryConstructor = constructors.firstOrNull { it.isPrimary } - this.constructors = constructors - } - } - - override fun toString() = (if (isExpect) "expect " else if (isActual) "actual " else "") + "class " + name.toString() - - private inner class CommonizedClassTypeConstructor( - targetComponents: TargetDeclarationsBuilderComponents, - cirSupertypes: Collection - ) : AbstractClassTypeConstructor(targetComponents.storageManager) { - private val parameters = targetComponents.storageManager.createLazyValue { - this@CommonizedClassDescriptor.computeConstructorTypeParameters() - } - - private val supertypes = targetComponents.storageManager.createLazyValue { - cirSupertypes.map { it.buildType(targetComponents, this@CommonizedClassDescriptor.typeParameterResolver) } - } - - override fun getParameters() = parameters() - override fun computeSupertypes() = supertypes() - override fun isDenotable() = true - override fun getDeclarationDescriptor() = this@CommonizedClassDescriptor - override val supertypeLoopChecker get() = SupertypeLoopChecker.EMPTY - override fun toString() = declarationDescriptor.fqNameSafe.asString() - } -} - -class CommonizedClassConstructorDescriptor( - containingDeclaration: ClassDescriptor, - annotations: Annotations, - isPrimary: Boolean -) : ClassConstructorDescriptorImpl( - containingDeclaration, - null, - annotations, - isPrimary, - CallableMemberDescriptor.Kind.DECLARATION, - SourceElement.NO_SOURCE -) diff --git a/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/builder/CommonizedMemberScope.kt b/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/builder/CommonizedMemberScope.kt deleted file mode 100644 index 1aa74ac7e78..00000000000 --- a/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/builder/CommonizedMemberScope.kt +++ /dev/null @@ -1,107 +0,0 @@ -/* - * Copyright 2010-2019 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. - */ - -package org.jetbrains.kotlin.descriptors.commonizer.builder - -import gnu.trove.THashMap -import org.jetbrains.kotlin.descriptors.* -import org.jetbrains.kotlin.incremental.components.LookupLocation -import org.jetbrains.kotlin.name.Name -import org.jetbrains.kotlin.resolve.scopes.DescriptorKindFilter -import org.jetbrains.kotlin.resolve.scopes.MemberScope -import org.jetbrains.kotlin.utils.Printer - -class CommonizedMemberScope : MemberScope { - private val functions = THashMap>() - private val variables = THashMap>() - private val classifiers = THashMap() - - private fun addMember(member: DeclarationDescriptor) { - when (member) { - is SimpleFunctionDescriptor -> functions.getOrPut(member.name) { ArrayList(INITIAL_CAPACITY_FOR_CALLABLES) } += member - is PropertyDescriptor -> variables.getOrPut(member.name) { ArrayList(INITIAL_CAPACITY_FOR_CALLABLES) } += member - is ClassifierDescriptorWithTypeParameters -> classifiers[member.name] = member - else -> error("Unsupported member type: ${member::class.java}, $member") - } - } - - override fun getFunctionNames(): Set = functions.keys - override fun getVariableNames(): Set = variables.keys - override fun getClassifierNames(): Set = classifiers.keys - - override fun getContributedFunctions(name: Name, location: LookupLocation): Collection = - functions[name].orEmpty() - - override fun getContributedVariables(name: Name, location: LookupLocation): Collection = - variables[name].orEmpty() - - override fun getContributedClassifier(name: Name, location: LookupLocation): ClassifierDescriptor? = - classifiers[name] - - override fun getContributedDescriptors( - kindFilter: DescriptorKindFilter, - nameFilter: (Name) -> Boolean - ): Collection { - val result = ArrayList(INITIAL_CAPACITY_FOR_CONTRIBUTED_DESCRIPTORS) - - if (kindFilter.acceptsKinds(DescriptorKindFilter.CLASSIFIERS_MASK)) { - classifiers.values.filterTo(result) { nameFilter(it.name) } - } - - if (kindFilter.acceptsKinds(DescriptorKindFilter.FUNCTIONS_MASK)) { - functions.forEach { (name, callables) -> - if (nameFilter(name)) - result.addAll(callables) - } - } - - if (kindFilter.acceptsKinds(DescriptorKindFilter.VARIABLES_MASK)) { - variables.forEach { (name, callables) -> - if (nameFilter(name)) - result.addAll(callables) - } - } - - return result - } - - override fun printScopeStructure(p: Printer) { - p.println(this::class.java.simpleName, " {") - p.pushIndent() - - p.println("functions = $functions") - p.println("variables = $variables") - p.println("classifiers = $classifiers") - - p.popIndent() - p.println("}") - } - - companion object { - fun createArray(size: Int) = Array(size) { CommonizedMemberScope() } - - operator fun Array.plusAssign(members: List) { - members.forEachIndexed { index, member -> - if (member != null) - this[index].addMember(member) - } - } - - operator fun List.plusAssign(members: List) { - members.forEachIndexed { index, member -> - if (member != null) - this[index]?.addMember(member) - } - } - - // Heuristic memory usage optimization. During commonization of ios_x64 and ios_arm64 only about 3% of functions are overloaded - // (and therefore have the same name in the same scope). For the remaining 97% the capacity of 1 is enough. - private const val INITIAL_CAPACITY_FOR_CALLABLES = 1 - - // Heuristic memory usage optimization. During commonization of ios_x64 and ios_arm64 the getContributedDescriptors() call - // returns empty list in 27% times and list of size 1 in 63% times. The default capacity of 0 looks reasonable. - private const val INITIAL_CAPACITY_FOR_CONTRIBUTED_DESCRIPTORS = 0 - } -} diff --git a/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/builder/CommonizedPackageFragmentProvider.kt b/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/builder/CommonizedPackageFragmentProvider.kt deleted file mode 100644 index 1da0bb061d4..00000000000 --- a/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/builder/CommonizedPackageFragmentProvider.kt +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2010-2019 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. - */ - -package org.jetbrains.kotlin.descriptors.commonizer.builder - -import org.jetbrains.kotlin.descriptors.PackageFragmentDescriptor -import org.jetbrains.kotlin.descriptors.PackageFragmentProvider -import org.jetbrains.kotlin.descriptors.PackageFragmentProviderOptimized -import org.jetbrains.kotlin.name.FqName -import org.jetbrains.kotlin.name.Name - -internal class CommonizedPackageFragmentProvider : PackageFragmentProviderOptimized { - private val packageFragments = ArrayList() - - operator fun plusAssign(packageFragment: PackageFragmentDescriptor) { - this.packageFragments += packageFragment - } - - override fun collectPackageFragments(fqName: FqName, packageFragments: MutableCollection) { - this.packageFragments.filterTo(packageFragments) { it.fqName == fqName } - } - - override fun getPackageFragments(fqName: FqName): List = - packageFragments.filter { it.fqName == fqName } - - override fun getSubPackagesOf(fqName: FqName, nameFilter: (Name) -> Boolean): Collection = - packageFragments.asSequence() - .map { it.fqName } - .filter { !it.isRoot && it.parent() == fqName } - .toList() - - companion object { - fun createArray(size: Int) = Array(size) { CommonizedPackageFragmentProvider() } - - operator fun Array.plusAssign(packageFragments: List) { - packageFragments.forEachIndexed { index, packageFragment -> - this[index] += packageFragment ?: return@forEachIndexed - } - } - } -} diff --git a/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/builder/CommonizedTypeAliasDescriptor.kt b/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/builder/CommonizedTypeAliasDescriptor.kt deleted file mode 100644 index 976c0dd2152..00000000000 --- a/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/builder/CommonizedTypeAliasDescriptor.kt +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright 2010-2019 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. - */ - -package org.jetbrains.kotlin.descriptors.commonizer.builder - -import org.jetbrains.kotlin.descriptors.* -import org.jetbrains.kotlin.descriptors.annotations.Annotations -import org.jetbrains.kotlin.descriptors.impl.AbstractTypeAliasDescriptor -import org.jetbrains.kotlin.name.Name -import org.jetbrains.kotlin.storage.NotNullLazyValue -import org.jetbrains.kotlin.storage.StorageManager -import org.jetbrains.kotlin.types.SimpleType -import org.jetbrains.kotlin.types.TypeSubstitutor -import org.jetbrains.kotlin.types.Variance -import org.jetbrains.kotlin.types.asSimpleType - -class CommonizedTypeAliasDescriptor( - override val storageManager: StorageManager, - containingDeclaration: DeclarationDescriptor, - annotations: Annotations, - name: Name, - visibility: DescriptorVisibility, - private val isActual: Boolean -) : AbstractTypeAliasDescriptor(containingDeclaration, annotations, name, SourceElement.NO_SOURCE, visibility) { - - private lateinit var underlyingTypeImpl: NotNullLazyValue - override val underlyingType get() = underlyingTypeImpl() - - private lateinit var expandedTypeImpl: NotNullLazyValue - override val expandedType: SimpleType get() = expandedTypeImpl() - - private val defaultTypeImpl = storageManager.createLazyValue { computeDefaultType() } - override fun getDefaultType() = defaultTypeImpl() - - override val classDescriptor get() = expandedType.constructor.declarationDescriptor as? ClassDescriptor - - private val typeConstructorParametersImpl = storageManager.createLazyValue { computeConstructorTypeParameters() } - override fun getTypeConstructorTypeParameters() = typeConstructorParametersImpl() - - private val constructorsImpl = storageManager.createLazyValue { getTypeAliasConstructors() } - override val constructors get() = constructorsImpl() - - override fun isActual() = isActual - - fun initialize( - declaredTypeParameters: List, - underlyingType: NotNullLazyValue, - expandedType: NotNullLazyValue - ) { - super.initialize(declaredTypeParameters) - underlyingTypeImpl = underlyingType - expandedTypeImpl = expandedType - } - - override fun substitute(substitutor: TypeSubstitutor): ClassifierDescriptorWithTypeParameters { - if (substitutor.isEmpty) return this - val substituted = CommonizedTypeAliasDescriptor( - storageManager = storageManager, - containingDeclaration = containingDeclaration, - annotations = annotations, - name = name, - visibility = visibility, - isActual = isActual - ) - substituted.initialize( - declaredTypeParameters, - storageManager.createLazyValue { substitutor.safeSubstitute(underlyingType, Variance.INVARIANT).asSimpleType() }, - storageManager.createLazyValue { substitutor.safeSubstitute(expandedType, Variance.INVARIANT).asSimpleType() } - ) - return substituted - } -} diff --git a/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/builder/CommonizedTypeParameterDescriptor.kt b/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/builder/CommonizedTypeParameterDescriptor.kt deleted file mode 100644 index 41afa3f784b..00000000000 --- a/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/builder/CommonizedTypeParameterDescriptor.kt +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2010-2019 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. - */ - -package org.jetbrains.kotlin.descriptors.commonizer.builder - -import org.jetbrains.kotlin.descriptors.DeclarationDescriptor -import org.jetbrains.kotlin.descriptors.SourceElement -import org.jetbrains.kotlin.descriptors.SupertypeLoopChecker -import org.jetbrains.kotlin.descriptors.annotations.Annotations -import org.jetbrains.kotlin.descriptors.commonizer.cir.CirType -import org.jetbrains.kotlin.descriptors.commonizer.utils.compactMap -import org.jetbrains.kotlin.descriptors.impl.AbstractLazyTypeParameterDescriptor -import org.jetbrains.kotlin.name.Name -import org.jetbrains.kotlin.types.KotlinType -import org.jetbrains.kotlin.types.UnwrappedType -import org.jetbrains.kotlin.types.Variance - -class CommonizedTypeParameterDescriptor( - private val targetComponents: TargetDeclarationsBuilderComponents, - private val typeParameterResolver: TypeParameterResolver, - containingDeclaration: DeclarationDescriptor, - override val annotations: Annotations, - name: Name, - variance: Variance, - isReified: Boolean, - index: Int, - private val cirUpperBounds: List -) : AbstractLazyTypeParameterDescriptor( - targetComponents.storageManager, - containingDeclaration, - name, - variance, - isReified, - index, - SourceElement.NO_SOURCE, - SupertypeLoopChecker.EMPTY -) { - override fun resolveUpperBounds(): List { - return if (cirUpperBounds.isEmpty()) - listOf(targetComponents.builtIns.defaultBound) - else - cirUpperBounds.compactMap { it.buildType(targetComponents, typeParameterResolver) } - } - - override fun reportSupertypeLoopError(type: KotlinType) = - error("There should be no cycles for commonized type parameters, but found for: $type in $this") -} diff --git a/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/builder/DeclarationsBuilderVisitor1.kt b/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/builder/DeclarationsBuilderVisitor1.kt deleted file mode 100644 index 326ba29e08d..00000000000 --- a/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/builder/DeclarationsBuilderVisitor1.kt +++ /dev/null @@ -1,144 +0,0 @@ -/* - * Copyright 2010-2019 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. - */ - -package org.jetbrains.kotlin.descriptors.commonizer.builder - -import org.jetbrains.kotlin.descriptors.* -import org.jetbrains.kotlin.descriptors.commonizer.CommonizerTarget -import org.jetbrains.kotlin.descriptors.commonizer.builder.CommonizedMemberScope.Companion.plusAssign -import org.jetbrains.kotlin.descriptors.commonizer.builder.CommonizedPackageFragmentProvider.Companion.plusAssign -import org.jetbrains.kotlin.descriptors.commonizer.mergedtree.* -import org.jetbrains.kotlin.descriptors.commonizer.mergedtree.CirNode.Companion.dimension -import org.jetbrains.kotlin.descriptors.commonizer.mergedtree.CirNode.Companion.indexOfCommon -import org.jetbrains.kotlin.descriptors.commonizer.utils.CommonizedGroup -import org.jetbrains.kotlin.descriptors.impl.ModuleDescriptorImpl - -/** - * Serves two goals: - * 1. Builds and initializes descriptors that do not depend on Kotlin types, such as [ModuleDescriptor], [PackageFragmentDescriptor], etc. - * 2. Builds BUT not initializes classifier descriptors, so that they can be used during the next phase for construction of Kotlin types. - */ -internal class DeclarationsBuilderVisitor1( - private val components: GlobalDeclarationsBuilderComponents -) : CirNodeVisitor, List> { - override fun visitRootNode(node: CirRootNode, data: List): List { - check(data.isEmpty()) // root node may not have containing declarations - check(components.targetComponents.size == node.dimension) - - val allTargets: List = (node.targetDeclarations + node.commonDeclaration()).map { it!!.target } - val modulesByTargets: Map> = - allTargets.associateWithTo(HashMap()) { mutableListOf() } - - // collect module descriptors: - for (moduleNode in node.modules.values) { - val modules = moduleNode.accept(this, noContainingDeclarations()).asListContaining() - modules.forEachIndexed { index, module -> - if (module != null) { - val target = allTargets[index] - modulesByTargets.getValue(target) += module - } - } - } - - // return result (preserving order of targets): - allTargets.forEachIndexed { index, target -> - components.cache.cache(index, modulesByTargets.getValue(target)) - } - - return noReturningDeclarations() - } - - override fun visitModuleNode(node: CirModuleNode, data: List): List { - // build module descriptors: - val moduleDescriptorsGroup = CommonizedGroup(node.dimension) - node.buildDescriptors(components, moduleDescriptorsGroup) - - // build package fragments: - val packageFragmentProviders = CommonizedPackageFragmentProvider.createArray(node.dimension) - for (packageNode in node.packages.values) { - val packageFragments = packageNode.accept(this, moduleDescriptorsGroup).asListContaining() - packageFragmentProviders += packageFragments - } - - // initialize module descriptors: - moduleDescriptorsGroup.forEachIndexed { index, moduleDescriptor -> - moduleDescriptor?.initialize(packageFragmentProviders[index]) - } - - return moduleDescriptorsGroup - } - - override fun visitPackageNode(node: CirPackageNode, data: List): List { - val containingDeclarations = data.asListContaining() - - // build package fragments: - val packageFragments = CommonizedGroup(node.dimension) - node.buildDescriptors(components, packageFragments, containingDeclarations) - - // build package members: - val packageMemberScopes = CommonizedMemberScope.createArray(node.dimension) - for (classNode in node.classes.values) { - packageMemberScopes += classNode.accept(this, packageFragments) - } - for (typeAliasNode in node.typeAliases.values) { - packageMemberScopes += typeAliasNode.accept(this, packageFragments) - } - - // initialize package fragments: - packageFragments.forEachIndexed { index, packageFragment -> - packageFragment?.initialize(packageMemberScopes[index]) - } - - return packageFragments - } - - override fun visitPropertyNode(node: CirPropertyNode, data: List) = - error("This method should not be called in ${this::class.java}") - - override fun visitFunctionNode(node: CirFunctionNode, data: List) = - error("This method should not be called in ${this::class.java}") - - override fun visitClassNode(node: CirClassNode, data: List): List { - val classifiers = CommonizedGroup(node.dimension) - node.buildDescriptors(components, classifiers, data) - val classes = classifiers.asListContaining() - - // build class members: - val classMemberScopes = CommonizedMemberScope.createArray(node.dimension) - for (classNode in node.classes.values) { - classMemberScopes += classNode.accept(this, classes) - } - - // save member scope - classes.forEachIndexed { index, clazz -> - clazz?.unsubstitutedMemberScope = classMemberScopes[index] - } - - return classes - } - - override fun visitClassConstructorNode(node: CirClassConstructorNode, data: List) = - error("This method should not be called in ${this::class.java}") - - override fun visitTypeAliasNode(node: CirTypeAliasNode, data: List): List { - val classifiers = CommonizedGroup(node.dimension) - node.buildDescriptors(components, classifiers, data) - - val commonClass = classifiers[node.indexOfCommon] as? CommonizedClassDescriptor? - commonClass?.unsubstitutedMemberScope = CommonizedMemberScope() // empty member scope - commonClass?.initialize(emptyList()) // no constructors - - return classifiers - } - - companion object { - internal inline fun noContainingDeclarations() = emptyList() - internal inline fun noReturningDeclarations() = emptyList() - - @Suppress("UNCHECKED_CAST") - internal inline fun List.asListContaining(): List = - this as List - } -} diff --git a/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/builder/DeclarationsBuilderVisitor2.kt b/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/builder/DeclarationsBuilderVisitor2.kt deleted file mode 100644 index 37e86ce2359..00000000000 --- a/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/builder/DeclarationsBuilderVisitor2.kt +++ /dev/null @@ -1,126 +0,0 @@ -/* - * Copyright 2010-2019 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. - */ - -package org.jetbrains.kotlin.descriptors.commonizer.builder - -import org.jetbrains.kotlin.descriptors.* -import org.jetbrains.kotlin.descriptors.commonizer.builder.CommonizedMemberScope.Companion.plusAssign -import org.jetbrains.kotlin.descriptors.commonizer.builder.DeclarationsBuilderVisitor1.Companion.asListContaining -import org.jetbrains.kotlin.descriptors.commonizer.builder.DeclarationsBuilderVisitor1.Companion.noContainingDeclarations -import org.jetbrains.kotlin.descriptors.commonizer.builder.DeclarationsBuilderVisitor1.Companion.noReturningDeclarations -import org.jetbrains.kotlin.descriptors.commonizer.mergedtree.* -import org.jetbrains.kotlin.descriptors.commonizer.mergedtree.CirNode.Companion.dimension -import org.jetbrains.kotlin.descriptors.commonizer.utils.CommonizedGroup -import org.jetbrains.kotlin.descriptors.impl.ModuleDescriptorImpl - -/** Builds and initializes the new tree of common descriptors */ - -/** - * This visitor should be applied right after [DeclarationsBuilderVisitor1]. It does the following: - * 1. Builds and initializes descriptors that depend on Kotlin types, such as [PropertyDescriptor], [SimpleFunctionDescriptor], etc. - * 2. Initializes classifier descriptors. - */ -internal class DeclarationsBuilderVisitor2( - private val components: GlobalDeclarationsBuilderComponents -) : CirNodeVisitor, List> { - override fun visitRootNode(node: CirRootNode, data: List): List { - check(data.isEmpty()) // root node may not have containing declarations - check(components.targetComponents.size == node.dimension) - - // visit module descriptors: - for (moduleNode in node.modules.values) { - moduleNode.accept(this, noContainingDeclarations()) - } - - return noReturningDeclarations() - } - - override fun visitModuleNode(node: CirModuleNode, data: List): List { - // visit package fragment descriptors: - for (packageNode in node.packages.values) { - packageNode.accept(this, noContainingDeclarations()) - } - - return noReturningDeclarations() - } - - override fun visitPackageNode(node: CirPackageNode, data: List): List { - val packageFragments = components.cache.getCachedPackageFragments(node.moduleName, node.fqName) - - // build non-classifier package members: - val packageMemberScopes = packageFragments.map { it?.getMemberScope() } - for (propertyNode in node.properties.values) { - packageMemberScopes += propertyNode.accept(this, packageFragments) - } - for (functionNode in node.functions.values) { - packageMemberScopes += functionNode.accept(this, packageFragments) - } - - for (classNode in node.classes.values) { - classNode.accept(this, noContainingDeclarations()) - } - - return noReturningDeclarations() - } - - override fun visitPropertyNode(node: CirPropertyNode, data: List): List { - val propertyDescriptors = CommonizedGroup(node.dimension) - node.buildDescriptors(components, propertyDescriptors, data) - - return propertyDescriptors - } - - override fun visitFunctionNode(node: CirFunctionNode, data: List): List { - val functionDescriptors = CommonizedGroup(node.dimension) - node.buildDescriptors(components, functionDescriptors, data) - - return functionDescriptors - } - - override fun visitClassNode(node: CirClassNode, data: List): List { - val classes = components.cache.getCachedClasses(node.classId) - - // build class constructors: - val allConstructorsByTargets = Array>(node.dimension) { ArrayList() } - for (constructorNode in node.constructors.values) { - val constructorsByTargets = constructorNode.accept(this, classes).asListContaining() - constructorsByTargets.forEachIndexed { index, constructor -> - if (constructor != null) allConstructorsByTargets[index].add(constructor) - } - } - - // initialize classes - classes.forEachIndexed { index, clazz -> - clazz?.initialize(allConstructorsByTargets[index]) - } - - // build class members: - val classMemberScopes = classes.map { it?.unsubstitutedMemberScope } - for (propertyNode in node.properties.values) { - classMemberScopes += propertyNode.accept(this, classes) - } - for (functionNode in node.functions.values) { - classMemberScopes += functionNode.accept(this, classes) - } - - for (classNode in node.classes.values) { - classNode.accept(this, noContainingDeclarations()) - } - - return noReturningDeclarations() - } - - override fun visitClassConstructorNode(node: CirClassConstructorNode, data: List): List { - val containingDeclarations = data.asListContaining() - - val constructors = CommonizedGroup(node.dimension) - node.buildDescriptors(components, constructors, containingDeclarations) - - return constructors - } - - override fun visitTypeAliasNode(node: CirTypeAliasNode, data: List) = - error("This method should not be called in ${this::class.java}") -} diff --git a/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/builder/builderUtils.kt b/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/builder/builderUtils.kt deleted file mode 100644 index 9a5c7b5996a..00000000000 --- a/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/builder/builderUtils.kt +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Copyright 2010-2019 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. - */ - -package org.jetbrains.kotlin.descriptors.commonizer.builder - -import org.jetbrains.kotlin.descriptors.* -import org.jetbrains.kotlin.descriptors.annotations.Annotations -import org.jetbrains.kotlin.descriptors.commonizer.cir.* -import org.jetbrains.kotlin.descriptors.commonizer.utils.compact -import org.jetbrains.kotlin.descriptors.commonizer.utils.compactMap -import org.jetbrains.kotlin.descriptors.commonizer.utils.compactMapIndexed -import org.jetbrains.kotlin.descriptors.impl.ValueParameterDescriptorImpl -import org.jetbrains.kotlin.resolve.DescriptorFactory -import org.jetbrains.kotlin.resolve.DescriptorUtils -import org.jetbrains.kotlin.types.* -import org.jetbrains.kotlin.types.KotlinTypeFactory.flexibleType -import org.jetbrains.kotlin.types.KotlinTypeFactory.simpleType - -internal fun List.buildDescriptorsAndTypeParameterResolver( - targetComponents: TargetDeclarationsBuilderComponents, - parentTypeParameterResolver: TypeParameterResolver, - containingDeclaration: DeclarationDescriptor, - typeParametersIndexOffset: Int = 0 -): Pair, TypeParameterResolver> { - val ownTypeParameters = ArrayList(size) - - val typeParameterResolver = TypeParameterResolverImpl( - ownTypeParameters = ownTypeParameters, - parent = parentTypeParameterResolver - ) - - forEachIndexed { index, param -> - ownTypeParameters += CommonizedTypeParameterDescriptor( - targetComponents = targetComponents, - typeParameterResolver = typeParameterResolver, - containingDeclaration = containingDeclaration, - annotations = param.annotations.buildDescriptors(targetComponents), - name = param.name, - variance = param.variance, - isReified = param.isReified, - index = typeParametersIndexOffset + index, - cirUpperBounds = param.upperBounds - ) - } - - return ownTypeParameters to typeParameterResolver -} - -internal fun List.buildDescriptors( - targetComponents: TargetDeclarationsBuilderComponents, - typeParameterResolver: TypeParameterResolver, - containingDeclaration: CallableDescriptor -): List = compactMapIndexed { index, param -> - ValueParameterDescriptorImpl( - containingDeclaration, - null, - index, - param.annotations.buildDescriptors(targetComponents), - param.name, - param.returnType.buildType(targetComponents, typeParameterResolver), - param.declaresDefaultValue, - param.isCrossinline, - param.isNoinline, - param.varargElementType?.buildType(targetComponents, typeParameterResolver), - SourceElement.NO_SOURCE - ) -} - -internal fun List.buildDescriptors(targetComponents: TargetDeclarationsBuilderComponents): Annotations = - Annotations.create(compactMap { CommonizedAnnotationDescriptor(targetComponents, it) }) - -internal fun CirExtensionReceiver.buildExtensionReceiver( - targetComponents: TargetDeclarationsBuilderComponents, - typeParameterResolver: TypeParameterResolver, - containingDeclaration: CallableDescriptor -) = DescriptorFactory.createExtensionReceiverParameterForCallable( - containingDeclaration, - type.buildType(targetComponents, typeParameterResolver), - annotations.buildDescriptors(targetComponents) -) - -internal fun buildDispatchReceiver(callableDescriptor: CallableDescriptor) = - DescriptorUtils.getDispatchReceiverParameterIfNeeded(callableDescriptor.containingDeclaration) - -internal fun CirType.buildType( - targetComponents: TargetDeclarationsBuilderComponents, - typeParameterResolver: TypeParameterResolver, - expandTypeAliases: Boolean = true -): UnwrappedType = when (this) { - is CirSimpleType -> buildType(targetComponents, typeParameterResolver, expandTypeAliases) - is CirFlexibleType -> flexibleType( - lowerBound = lowerBound.buildType(targetComponents, typeParameterResolver, expandTypeAliases), - upperBound = upperBound.buildType(targetComponents, typeParameterResolver, expandTypeAliases) - ) -} - -internal fun CirSimpleType.buildType( - targetComponents: TargetDeclarationsBuilderComponents, - typeParameterResolver: TypeParameterResolver, - expandTypeAliases: Boolean -): SimpleType = when (this) { - is CirClassType -> buildSimpleType( - classifier = targetComponents.findClassOrTypeAlias(classifierId).checkClassifierType(), - arguments = collectArguments(targetComponents, typeParameterResolver, expandTypeAliases), - isMarkedNullable = isMarkedNullable - ) - is CirTypeAliasType -> { - val typeAliasDescriptor = targetComponents.findClassOrTypeAlias(classifierId).checkClassifierType() - val arguments = this.arguments.compactMap { it.buildArgument(targetComponents, typeParameterResolver, expandTypeAliases) } - - if (expandTypeAliases) - buildExpandedType(typeAliasDescriptor, arguments, isMarkedNullable) - else - buildSimpleType(typeAliasDescriptor, arguments, isMarkedNullable) - } - is CirTypeParameterType -> buildSimpleType( - classifier = typeParameterResolver.resolve(index) - ?: error("Type parameter with index=$index not found in ${typeParameterResolver::class.java}, $typeParameterResolver for ${targetComponents.target}"), - arguments = emptyList(), - isMarkedNullable = isMarkedNullable - ) -} - -private fun buildSimpleType(classifier: ClassifierDescriptor, arguments: List, isMarkedNullable: Boolean): SimpleType { - val reorderedArguments = if (arguments.isNotEmpty() && classifier is ClassDescriptor && classifier.isInner) { - val totalArguments = arguments.size - var remainingArguments = totalArguments - - ArrayList(totalArguments).also { reorderedArguments -> - var currentClassifier: ClassDescriptor = classifier - - while (true) { - val argumentsForCurrentClassifier = currentClassifier.declaredTypeParameters.size - for (i in 0 until argumentsForCurrentClassifier) { - reorderedArguments += arguments[remainingArguments - argumentsForCurrentClassifier + i] - } - remainingArguments -= argumentsForCurrentClassifier - - if (remainingArguments == 0) break - currentClassifier = currentClassifier.containingDeclaration as ClassDescriptor - } - } - } else arguments - - return simpleType( - annotations = Annotations.EMPTY, - constructor = classifier.typeConstructor, - arguments = reorderedArguments, - nullable = isMarkedNullable, - kotlinTypeRefiner = null - ) -} - -private fun buildExpandedType(classifier: TypeAliasDescriptor, arguments: List, isMarkedNullable: Boolean): SimpleType { - return TypeAliasExpander.NON_REPORTING.expand( - TypeAliasExpansion.create(null, classifier, arguments), - Annotations.EMPTY - ).makeNullableAsSpecified(isMarkedNullable) -} - - -private inline fun ClassifierDescriptorWithTypeParameters.checkClassifierType(): T { - check(this is T) { "Mismatched classifier kinds.\nFound: ${this::class.java}, $this\nShould be: ${T::class.java}" } - return this -} - -private fun CirClassType.collectArguments( - targetComponents: TargetDeclarationsBuilderComponents, - typeParameterResolver: TypeParameterResolver, - expandTypeAliases: Boolean -): List { - return if (outerType == null) { - arguments.compactMap { it.buildArgument(targetComponents, typeParameterResolver, expandTypeAliases) } - } else { - val allTypes = generateSequence(this) { it.outerType }.toList() - val arguments = mutableListOf() - - for (index in allTypes.size - 1 downTo 0) { - allTypes[index].arguments.mapTo(arguments) { it.buildArgument(targetComponents, typeParameterResolver, expandTypeAliases) } - } - - arguments.compact() - } -} - -private fun CirTypeProjection.buildArgument( - targetComponents: TargetDeclarationsBuilderComponents, - typeParameterResolver: TypeParameterResolver, - expandTypeAliases: Boolean -): TypeProjection = when (this) { - is CirStarTypeProjection -> StarProjectionForAbsentTypeParameter(targetComponents.builtIns) - is CirTypeProjectionImpl -> TypeProjectionImpl( - projectionKind, - type.buildType(targetComponents, typeParameterResolver, expandTypeAliases) - ) -} diff --git a/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/builder/classDescriptors.kt b/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/builder/classDescriptors.kt deleted file mode 100644 index b19d2b33103..00000000000 --- a/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/builder/classDescriptors.kt +++ /dev/null @@ -1,131 +0,0 @@ -/* - * Copyright 2010-2019 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. - */ - -package org.jetbrains.kotlin.descriptors.commonizer.builder - -import org.jetbrains.kotlin.descriptors.ClassConstructorDescriptor -import org.jetbrains.kotlin.descriptors.ClassKind -import org.jetbrains.kotlin.descriptors.ClassifierDescriptorWithTypeParameters -import org.jetbrains.kotlin.descriptors.DeclarationDescriptor -import org.jetbrains.kotlin.descriptors.commonizer.cir.CirClass -import org.jetbrains.kotlin.descriptors.commonizer.cir.CirClassConstructor -import org.jetbrains.kotlin.descriptors.commonizer.mergedtree.CirClassConstructorNode -import org.jetbrains.kotlin.descriptors.commonizer.mergedtree.CirClassNode -import org.jetbrains.kotlin.descriptors.commonizer.mergedtree.CirNode.Companion.indexOfCommon -import org.jetbrains.kotlin.descriptors.commonizer.utils.CommonizedGroup -import org.jetbrains.kotlin.name.ClassId - -internal fun CirClassNode.buildDescriptors( - components: GlobalDeclarationsBuilderComponents, - output: CommonizedGroup, - containingDeclarations: List -) { - val commonClass = commonDeclaration() - val markAsActual = commonClass != null && commonClass.kind != ClassKind.ENUM_ENTRY - - targetDeclarations.forEachIndexed { index, clazz -> - clazz?.buildDescriptor(components, output, index, containingDeclarations, classId, isActual = markAsActual) - } - - commonClass?.buildDescriptor(components, output, indexOfCommon, containingDeclarations, classId, isExpect = true) - - // log stats - components.statsCollector?.logStats(output) -} - -internal fun CirClass.buildDescriptor( - components: GlobalDeclarationsBuilderComponents, - output: CommonizedGroup, - index: Int, - containingDeclarations: List, - classId: ClassId, - isExpect: Boolean = false, - isActual: Boolean = false -) { - val targetComponents = components.targetComponents[index] - val containingDeclaration = containingDeclarations[index] ?: error("No containing declaration for class $this") - - val classDescriptor = CommonizedClassDescriptor( - targetComponents = targetComponents, - containingDeclaration = containingDeclaration, - annotations = annotations.buildDescriptors(targetComponents), - name = name, - kind = kind, - modality = modality, - visibility = visibility, - isCompanion = isCompanion, - isData = isData, - isInline = isInline, - isInner = isInner, - isExternal = isExternal, - isExpect = isExpect, - isActual = isActual, - cirDeclaredTypeParameters = typeParameters, - companionObjectName = companion, - cirSupertypes = supertypes - ) - - // cache created class descriptor: - components.cache.cache(classId, index, classDescriptor) - - output[index] = classDescriptor -} - -internal fun CirClassConstructorNode.buildDescriptors( - components: GlobalDeclarationsBuilderComponents, - output: CommonizedGroup, - containingDeclarations: List -) { - val commonConstructor = commonDeclaration() - val markAsActual = commonConstructor != null - - targetDeclarations.forEachIndexed { index, constructor -> - constructor?.buildDescriptor(components, output, index, containingDeclarations, isActual = markAsActual) - } - - commonConstructor?.buildDescriptor(components, output, indexOfCommon, containingDeclarations, isExpect = true) - - // log stats - components.statsCollector?.logStats(output) -} - -private fun CirClassConstructor.buildDescriptor( - components: GlobalDeclarationsBuilderComponents, - output: CommonizedGroup, - index: Int, - containingDeclarations: List, - isExpect: Boolean = false, - isActual: Boolean = false -) { - val targetComponents = components.targetComponents[index] - val containingDeclaration = containingDeclarations[index] ?: error("No containing declaration for constructor $this") - - val constructorDescriptor = CommonizedClassConstructorDescriptor( - containingDeclaration = containingDeclaration, - annotations = annotations.buildDescriptors(targetComponents), - isPrimary = isPrimary - ) - - constructorDescriptor.isExpect = isExpect - constructorDescriptor.isActual = isActual - - constructorDescriptor.setHasStableParameterNames(hasStableParameterNames) - - val classTypeParameters = containingDeclaration.declaredTypeParameters - val (constructorTypeParameters, typeParameterResolver) = typeParameters.buildDescriptorsAndTypeParameterResolver( - targetComponents = targetComponents, - parentTypeParameterResolver = containingDeclaration.typeParameterResolver, - containingDeclaration = constructorDescriptor, - typeParametersIndexOffset = classTypeParameters.size - ) - - constructorDescriptor.initialize( - valueParameters.buildDescriptors(targetComponents, typeParameterResolver, constructorDescriptor), - visibility, - classTypeParameters + constructorTypeParameters - ) - - output[index] = constructorDescriptor -} diff --git a/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/builder/context.kt b/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/builder/context.kt deleted file mode 100644 index f7304d7e9b3..00000000000 --- a/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/builder/context.kt +++ /dev/null @@ -1,318 +0,0 @@ -/* - * Copyright 2010-2019 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. - */ - -package org.jetbrains.kotlin.descriptors.commonizer.builder - -import gnu.trove.THashMap -import org.jetbrains.kotlin.builtins.KotlinBuiltIns -import org.jetbrains.kotlin.builtins.StandardNames -import org.jetbrains.kotlin.descriptors.* -import org.jetbrains.kotlin.descriptors.commonizer.CommonizerParameters -import org.jetbrains.kotlin.descriptors.commonizer.CommonizerTarget -import org.jetbrains.kotlin.descriptors.commonizer.mergedtree.CirNode.Companion.dimension -import org.jetbrains.kotlin.descriptors.commonizer.mergedtree.CirNode.Companion.indexOfCommon -import org.jetbrains.kotlin.descriptors.commonizer.mergedtree.CirRootNode -import org.jetbrains.kotlin.descriptors.commonizer.stats.StatsCollector -import org.jetbrains.kotlin.descriptors.commonizer.utils.* -import org.jetbrains.kotlin.descriptors.commonizer.utils.CommonizedGroupMap -import org.jetbrains.kotlin.descriptors.commonizer.utils.createKotlinNativeForwardDeclarationsModule -import org.jetbrains.kotlin.descriptors.commonizer.utils.isUnderKotlinNativeSyntheticPackages -import org.jetbrains.kotlin.descriptors.impl.ModuleDescriptorImpl -import org.jetbrains.kotlin.name.ClassId -import org.jetbrains.kotlin.name.FqName -import org.jetbrains.kotlin.name.Name -import org.jetbrains.kotlin.storage.NotNullLazyValue -import org.jetbrains.kotlin.storage.StorageManager - -/** - * Temporary caches for constructed descriptors. - */ -class DeclarationsBuilderCache(private val dimension: Int) { - init { - check(dimension > 0) - } - - private val modules = CommonizedGroup>(dimension) - private val packageFragments = CommonizedGroupMap, CommonizedPackageFragmentDescriptor>(dimension) - private val classes = CommonizedGroupMap(dimension) - private val typeAliases = CommonizedGroupMap(dimension) - - private val forwardDeclarationsModules = CommonizedGroup(dimension) - private val allModulesWithDependencies = CommonizedGroup>(dimension) - - fun getCachedPackageFragments(moduleName: Name, packageFqName: FqName): List = - packageFragments.getOrFail(moduleName to packageFqName) - - fun getCachedClasses(classId: ClassId): List = classes.getOrFail(classId) - - fun getCachedClassifier(classId: ClassId, index: Int): ClassifierDescriptorWithTypeParameters? { - // first, look up for class - val classes: CommonizedGroup? = classes.getOrNull(classId) - classes?.get(index)?.let { return it } - - // then, for type alias - val typeAliases: CommonizedGroup? = typeAliases.getOrNull(classId) - typeAliases?.get(index)?.let { return it } - - val indexOfCommon = dimension - 1 - if (indexOfCommon != index) { - // then, for class from the common fragment - classes?.get(indexOfCommon)?.let { return it } - - // then, for type alias from the common fragment - typeAliases?.get(indexOfCommon)?.let { return it } - } - - return null - } - - fun cache(index: Int, modules: List) { - this.modules[index] = modules - } - - fun cache(moduleName: Name, packageFqName: FqName, index: Int, descriptor: CommonizedPackageFragmentDescriptor) { - packageFragments[moduleName to packageFqName][index] = descriptor - } - - fun cache(classId: ClassId, index: Int, descriptor: CommonizedClassDescriptor) { - classes[classId][index] = descriptor - } - - fun cache(classId: ClassId, index: Int, descriptor: CommonizedTypeAliasDescriptor) { - typeAliases[classId][index] = descriptor - } - - fun getOrPutForwardDeclarationsModule(index: Int, computable: () -> ModuleDescriptorImpl): ModuleDescriptorImpl { - forwardDeclarationsModules[index]?.let { return it } - - val module = computable() - forwardDeclarationsModules[index] = module - return module - } - - fun getAllModules(index: Int): List { - allModulesWithDependencies[index]?.let { return it } - - val modulesForTarget = modules[index] ?: error("No module descriptors found for index $index") - val forwardDeclarationsModule = forwardDeclarationsModules[index] - - // forward declarations module is created on demand (and only when commonizing Kotlin/Native target) - // so, don't return it if it's not necessary - val allModules = if (forwardDeclarationsModule != null) - modulesForTarget + forwardDeclarationsModule - else - modulesForTarget - - // set dependencies for target modules and cache them - modulesForTarget.forEach { it.setDependencies(allModules) } - allModulesWithDependencies[index] = allModules - - return allModules - } - - companion object { - private inline fun CommonizedGroupMap.getOrFail(key: K): List = - getOrNull(key) ?: error("No cached ${V::class.java} with key $key found") - } -} - -class GlobalDeclarationsBuilderComponents( - val storageManager: StorageManager, - val targetComponents: List, - val cache: DeclarationsBuilderCache, - val statsCollector: StatsCollector? -) { - init { - check(targetComponents.size > 1) - targetComponents.forEachIndexed { index, targetComponent -> check(index == targetComponent.index) } - } -} - -class TargetDeclarationsBuilderComponents( - val storageManager: StorageManager, - val target: CommonizerTarget, - val builtIns: KotlinBuiltIns, - val lazyClassifierLookupTable: NotNullLazyValue, - val index: Int, - private val cache: DeclarationsBuilderCache -) { - // N.B. this function may create new classifiers for types from Kotlin/Native forward declarations packages - fun findClassOrTypeAlias(classifierId: ClassId): ClassifierDescriptorWithTypeParameters { - return if (classifierId.packageFqName.isUnderKotlinNativeSyntheticPackages) { - // that's a synthetic Kotlin/Native classifier that was exported as forward declaration in one or more modules, - // but did not match any existing class or typealias - cache.getOrPutForwardDeclarationsModule(index) { - // N.B. forward declarations module is created only on demand - createKotlinNativeForwardDeclarationsModule( - storageManager = storageManager, - builtIns = builtIns - ) - }.resolveClassOrTypeAlias(classifierId) - ?: error("Classifier ${classifierId.asString()} not found for $target") - } else { - cache.getCachedClassifier(classifierId, index) // first, look up in created descriptors cache - ?: lazyClassifierLookupTable().resolveClassOrTypeAlias(classifierId) // then, attempt to load the original classifier - ?: error("Classifier ${classifierId.asString()} not found for $target") - } - } -} - -class LazyClassifierLookupTable(lazyModules: Map>) { - private val table = THashMap>() - private val allModules: Collection - - init { - // add "module:" prefix for each key representing a module name, not a package name - lazyModules.forEach { (moduleName, modules) -> table[MODULE_NAME_PREFIX + moduleName.toLowerCase()] = modules } - allModules = lazyModules.values.flatten() - } - - fun resolveClassOrTypeAlias(classifierId: ClassId): ClassifierDescriptorWithTypeParameters? { - if (table.isEmpty) return null - - val packageFqName = classifierId.packageFqName - if (packageFqName.isRoot) return null - - val packageFqNameRaw = packageFqName.asString() - table[packageFqNameRaw]?.let { modules -> - for (module in modules) - return module.resolveClassOrTypeAlias(classifierId) ?: continue - } - - val packageFqNameFragments = packageFqNameRaw.split('.') - val moduleNameForLookup = when (packageFqNameFragments[0]) { - "kotlin" -> "kotlin" - "platform" -> if (packageFqNameFragments.size == 2) packageFqNameFragments[1].toLowerCase() else null - else -> null - } - - // try to find the classifier by guessing its container module - if (moduleNameForLookup != null) { - table[MODULE_NAME_PREFIX + moduleNameForLookup]?.let { modules -> - for (module in modules) { - val classifier = module.resolveClassOrTypeAlias(classifierId) ?: continue - table[packageFqNameRaw] = modules // cache to speed-up the further look-ups - return classifier - } - } - } - - // last resort: brute force - for (module in allModules) { - val classifier = module.resolveClassOrTypeAlias(classifierId) ?: continue - table[packageFqNameRaw] = listOf(module) // cache to speed-up the further look-ups - return classifier - } - - table[packageFqNameRaw] = null // cache to speed-up the further look-ups - return null - } - - companion object { - private const val MODULE_NAME_PREFIX = "module:" - } -} - -fun CirRootNode.createGlobalBuilderComponents( - storageManager: StorageManager, - parameters: CommonizerParameters -): GlobalDeclarationsBuilderComponents { - val cache = DeclarationsBuilderCache(dimension) - - val lazyCommonDependeeModules = storageManager.createLazyValue { - parameters.dependeeModulesProvider?.loadModules(emptyList()).orEmpty() - } - - val targetContexts = (0 until dimension).map { index -> - val isCommon = index == indexOfCommon - - // do not leak root inside of createLazyValue {} closures!! - val root = if (isCommon) commonDeclaration()!! else targetDeclarations[index]!! - - val builtIns = root.builtInsProvider.loadBuiltIns() - check(builtIns::class.java.name == root.builtInsClass) { - "Unexpected built-ins class: ${builtIns::class.java}, $builtIns\nExpected: ${root.builtInsClass}" - } - - val lazyModulesLookupTable = storageManager.createLazyValue { - val result = mutableMapOf>() - - val commonDependeeModules: Map = lazyCommonDependeeModules() - - if (!isCommon) { - with(parameters.targetProviders[index]) { - val targetDependeeModules: Map = - dependeeModulesProvider?.loadModules(commonDependeeModules.values).orEmpty() - - val targetModules: Map = - modulesProvider.loadModules(targetDependeeModules.values + commonDependeeModules.values) - - targetModules.forEach { (moduleName, module) -> result.getOrPut(moduleName) { mutableListOf() } += module } - targetDependeeModules.forEach { (moduleName, module) -> result.getOrPut(moduleName) { mutableListOf() } += module } - } - } - - commonDependeeModules.forEach { (moduleName, module) -> result.getOrPut(moduleName) { mutableListOf() } += module } - - result.getOrPut(StandardNames.BUILT_INS_PACKAGE_FQ_NAME.asString()) { mutableListOf() } += builtIns.builtInsModule - - LazyClassifierLookupTable(result) - } - - TargetDeclarationsBuilderComponents( - storageManager = storageManager, - target = root.target, - builtIns = builtIns, - lazyClassifierLookupTable = lazyModulesLookupTable, - index = index, - cache = cache - ) - } - - return GlobalDeclarationsBuilderComponents(storageManager, targetContexts, cache, parameters.statsCollector) -} - -interface TypeParameterResolver { - val parametersCount: Int - fun resolve(index: Int): TypeParameterDescriptor? - - companion object { - val EMPTY = object : TypeParameterResolver { - override val parametersCount get() = 0 - override fun resolve(index: Int): TypeParameterDescriptor? = null - } - } -} - -class TypeParameterResolverImpl( - private val ownTypeParameters: List, - private val parent: TypeParameterResolver = TypeParameterResolver.EMPTY -) : TypeParameterResolver { - override val parametersCount: Int - get() = ownTypeParameters.size + parent.parametersCount - - @Suppress("ConvertTwoComparisonsToRangeCheck") - override fun resolve(index: Int): TypeParameterDescriptor? { - val parentParametersCount = parent.parametersCount - if (index >= 0 && index < parentParametersCount) - return parent.resolve(index) - - val localIndex = index - parentParametersCount - if (localIndex < ownTypeParameters.size) - return ownTypeParameters[localIndex] - - error("Illegal type parameter index: $index. Should be between 0 and ${parametersCount - 1}") - } -} - -fun DeclarationDescriptor.getTypeParameterResolver(): TypeParameterResolver = - when (this) { - is CommonizedClassDescriptor -> typeParameterResolver - is ClassDescriptor -> { - // all class descriptors must be instances of CommonizedClassDescriptor, and therefore must implement ContainerWithTypeParameterResolver - error("Class descriptor that is not instance of ${CommonizedClassDescriptor::class.java}: ${this::class.java}, $this") - } - else -> TypeParameterResolver.EMPTY - } diff --git a/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/builder/functionDescriptors.kt b/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/builder/functionDescriptors.kt deleted file mode 100644 index cef90307746..00000000000 --- a/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/builder/functionDescriptors.kt +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright 2010-2019 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. - */ - -package org.jetbrains.kotlin.descriptors.commonizer.builder - -import org.jetbrains.kotlin.descriptors.CallableMemberDescriptor -import org.jetbrains.kotlin.descriptors.DeclarationDescriptor -import org.jetbrains.kotlin.descriptors.SimpleFunctionDescriptor -import org.jetbrains.kotlin.descriptors.SourceElement -import org.jetbrains.kotlin.descriptors.commonizer.cir.CirFunction -import org.jetbrains.kotlin.descriptors.commonizer.mergedtree.CirFunctionNode -import org.jetbrains.kotlin.descriptors.commonizer.mergedtree.CirNode.Companion.indexOfCommon -import org.jetbrains.kotlin.descriptors.commonizer.utils.CommonizedGroup -import org.jetbrains.kotlin.descriptors.impl.SimpleFunctionDescriptorImpl - -internal fun CirFunctionNode.buildDescriptors( - components: GlobalDeclarationsBuilderComponents, - output: CommonizedGroup, - containingDeclarations: List -) { - val commonFunction = commonDeclaration() - val markAsExpectAndActual = commonFunction != null && commonFunction.kind != CallableMemberDescriptor.Kind.SYNTHESIZED - - targetDeclarations.forEachIndexed { index, function -> - function?.buildDescriptor(components, output, index, containingDeclarations, isActual = markAsExpectAndActual) - } - - commonFunction?.buildDescriptor(components, output, indexOfCommon, containingDeclarations, isExpect = markAsExpectAndActual) - - // log stats - components.statsCollector?.logStats(output) -} - -private fun CirFunction.buildDescriptor( - components: GlobalDeclarationsBuilderComponents, - output: CommonizedGroup, - index: Int, - containingDeclarations: List, - isExpect: Boolean = false, - isActual: Boolean = false -) { - val targetComponents = components.targetComponents[index] - val containingDeclaration = containingDeclarations[index] ?: error("No containing declaration for function $this") - - val functionDescriptor = SimpleFunctionDescriptorImpl.create( - containingDeclaration, - annotations.buildDescriptors(targetComponents), - name, - kind, - SourceElement.NO_SOURCE - ) - - functionDescriptor.isOperator = modifiers.isOperator - functionDescriptor.isInfix = modifiers.isInfix - functionDescriptor.isInline = modifiers.isInline - functionDescriptor.isTailrec = modifiers.isTailrec - functionDescriptor.isSuspend = modifiers.isSuspend - functionDescriptor.isExternal = modifiers.isExternal - - functionDescriptor.isExpect = isExpect - functionDescriptor.isActual = isActual - - functionDescriptor.setHasStableParameterNames(hasStableParameterNames) - - val (typeParameters, typeParameterResolver) = typeParameters.buildDescriptorsAndTypeParameterResolver( - targetComponents, - containingDeclaration.getTypeParameterResolver(), - functionDescriptor - ) - - functionDescriptor.initialize( - extensionReceiver?.buildExtensionReceiver(targetComponents, typeParameterResolver, functionDescriptor), - buildDispatchReceiver(functionDescriptor), - typeParameters, - valueParameters.buildDescriptors(targetComponents, typeParameterResolver, functionDescriptor), - returnType.buildType(targetComponents, typeParameterResolver), - modality, - visibility - ) - - output[index] = functionDescriptor -} diff --git a/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/builder/moduleDescriptors.kt b/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/builder/moduleDescriptors.kt deleted file mode 100644 index e8e2db550ac..00000000000 --- a/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/builder/moduleDescriptors.kt +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2010-2019 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. - */ - -package org.jetbrains.kotlin.descriptors.commonizer.builder - -import org.jetbrains.kotlin.descriptors.commonizer.cir.CirModule -import org.jetbrains.kotlin.descriptors.commonizer.mergedtree.CirModuleNode -import org.jetbrains.kotlin.descriptors.commonizer.mergedtree.CirNode.Companion.indexOfCommon -import org.jetbrains.kotlin.descriptors.commonizer.utils.CommonizedGroup -import org.jetbrains.kotlin.descriptors.impl.ModuleDescriptorImpl - -internal fun CirModuleNode.buildDescriptors( - components: GlobalDeclarationsBuilderComponents, - output: CommonizedGroup -) { - targetDeclarations.forEachIndexed { index, module -> - module?.buildDescriptor(components, output, index) - } - - commonDeclaration()?.buildDescriptor(components, output, indexOfCommon) - - // log stats - components.statsCollector?.logStats(output) -} - -private fun CirModule.buildDescriptor( - components: GlobalDeclarationsBuilderComponents, - output: CommonizedGroup, - index: Int -) { - val moduleDescriptor = ModuleDescriptorImpl( - moduleName = name, - storageManager = components.storageManager, - builtIns = components.targetComponents[index].builtIns, - capabilities = emptyMap() // TODO: preserve capabilities from the original module descriptors, KT-33998 - ) - - output[index] = moduleDescriptor -} diff --git a/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/builder/packageFragments.kt b/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/builder/packageFragments.kt deleted file mode 100644 index cf7706d1a25..00000000000 --- a/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/builder/packageFragments.kt +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright 2010-2019 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. - */ - -package org.jetbrains.kotlin.descriptors.commonizer.builder - -import org.jetbrains.kotlin.descriptors.ModuleDescriptor -import org.jetbrains.kotlin.descriptors.commonizer.cir.CirPackage -import org.jetbrains.kotlin.descriptors.commonizer.mergedtree.CirPackageNode -import org.jetbrains.kotlin.descriptors.commonizer.mergedtree.CirNode.Companion.indexOfCommon -import org.jetbrains.kotlin.descriptors.commonizer.utils.CommonizedGroup -import org.jetbrains.kotlin.descriptors.impl.ModuleDescriptorImpl -import org.jetbrains.kotlin.descriptors.impl.PackageFragmentDescriptorImpl -import org.jetbrains.kotlin.name.FqName - -internal fun CirPackageNode.buildDescriptors( - components: GlobalDeclarationsBuilderComponents, - output: CommonizedGroup, - modules: List -) { - targetDeclarations.forEachIndexed { index, pkg -> - pkg?.buildDescriptor(components, output, index, modules) - } - - commonDeclaration()?.buildDescriptor(components, output, indexOfCommon, modules) -} - -private fun CirPackage.buildDescriptor( - components: GlobalDeclarationsBuilderComponents, - output: CommonizedGroup, - index: Int, - modules: List -) { - val module = modules[index] ?: error("No containing declaration for package $this") - - val packageFragment = CommonizedPackageFragmentDescriptor(module, fqName) - - // cache created package fragment descriptor: - components.cache.cache(module.name, fqName, index, packageFragment) - - output[index] = packageFragment -} - -class CommonizedPackageFragmentDescriptor( - module: ModuleDescriptor, - fqName: FqName -) : PackageFragmentDescriptorImpl(module, fqName) { - private lateinit var memberScope: CommonizedMemberScope - - fun initialize(memberScope: CommonizedMemberScope) { - this.memberScope = memberScope - } - - override fun getMemberScope(): CommonizedMemberScope = memberScope -} diff --git a/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/builder/propertyDescriptors.kt b/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/builder/propertyDescriptors.kt deleted file mode 100644 index 27b1e01a971..00000000000 --- a/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/builder/propertyDescriptors.kt +++ /dev/null @@ -1,134 +0,0 @@ -/* - * Copyright 2010-2019 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. - */ - -package org.jetbrains.kotlin.descriptors.commonizer.builder - -import org.jetbrains.kotlin.descriptors.CallableMemberDescriptor -import org.jetbrains.kotlin.descriptors.DeclarationDescriptor -import org.jetbrains.kotlin.descriptors.PropertyDescriptor -import org.jetbrains.kotlin.descriptors.SourceElement -import org.jetbrains.kotlin.descriptors.commonizer.cir.CirProperty -import org.jetbrains.kotlin.descriptors.commonizer.mergedtree.CirPropertyNode -import org.jetbrains.kotlin.descriptors.commonizer.mergedtree.CirNode.Companion.indexOfCommon -import org.jetbrains.kotlin.descriptors.commonizer.utils.CommonizedGroup -import org.jetbrains.kotlin.descriptors.impl.FieldDescriptorImpl -import org.jetbrains.kotlin.descriptors.impl.PropertyDescriptorImpl -import org.jetbrains.kotlin.resolve.DescriptorFactory -import org.jetbrains.kotlin.resolve.constants.AnnotationValue - -internal fun CirPropertyNode.buildDescriptors( - components: GlobalDeclarationsBuilderComponents, - output: CommonizedGroup, - containingDeclarations: List -) { - val commonProperty = commonDeclaration() - - val isLiftedUp = commonProperty?.isLiftedUp == true - val markAsExpectAndActual = commonProperty != null - && commonProperty.kind != CallableMemberDescriptor.Kind.SYNTHESIZED - && !isLiftedUp - - if (!isLiftedUp) { - targetDeclarations.forEachIndexed { index, property -> - property?.buildDescriptor(components, output, index, containingDeclarations, isActual = markAsExpectAndActual) - } - } - - commonProperty?.buildDescriptor(components, output, indexOfCommon, containingDeclarations, isExpect = markAsExpectAndActual) - - // log stats - components.statsCollector?.logStats(output) -} - -private fun CirProperty.buildDescriptor( - components: GlobalDeclarationsBuilderComponents, - output: CommonizedGroup, - index: Int, - containingDeclarations: List, - isExpect: Boolean = false, - isActual: Boolean = false -) { - val targetComponents = components.targetComponents[index] - val containingDeclaration = containingDeclarations[index] ?: error("No containing declaration for property $this") - - val propertyDescriptor = PropertyDescriptorImpl.create( - containingDeclaration, - annotations.buildDescriptors(targetComponents), - modality, - visibility, - isVar, - name, - kind, - SourceElement.NO_SOURCE, - isLateInit, - isConst, - isExpect, - isActual, - isExternal, - isDelegate - ) - - val (typeParameters, typeParameterResolver) = typeParameters.buildDescriptorsAndTypeParameterResolver( - targetComponents, - containingDeclaration.getTypeParameterResolver(), - propertyDescriptor - ) - - propertyDescriptor.setType( - returnType.buildType(targetComponents, typeParameterResolver), - typeParameters, - buildDispatchReceiver(propertyDescriptor), - extensionReceiver?.buildExtensionReceiver(targetComponents, typeParameterResolver, propertyDescriptor) - ) - - val getterDescriptor = getter?.let { getter -> - DescriptorFactory.createGetter( - propertyDescriptor, - getter.annotations.buildDescriptors(targetComponents), - getter.isDefault, - getter.isExternal, - getter.isInline - ).apply { - initialize(null) // use return type from the property descriptor - } - } - - val setterDescriptor = setter?.let { setter -> - DescriptorFactory.createSetter( - propertyDescriptor, - setter.annotations.buildDescriptors(targetComponents), - setter.parameterAnnotations.buildDescriptors(targetComponents), - setter.isDefault, - setter.isExternal, - setter.isInline, - setter.visibility, - SourceElement.NO_SOURCE - ) - } - - val backingField = backingFieldAnnotations?.let { annotations -> - FieldDescriptorImpl(annotations.buildDescriptors(targetComponents), propertyDescriptor) - } - - val delegateField = delegateFieldAnnotations?.let { annotations -> - FieldDescriptorImpl(annotations.buildDescriptors(targetComponents), propertyDescriptor) - } - - propertyDescriptor.initialize( - getterDescriptor, - setterDescriptor, - backingField, - delegateField - ) - - compileTimeInitializer?.let { constantValue -> - check(constantValue !is AnnotationValue) { - "Unexpected type of compile time constant: ${constantValue::class.java}, $constantValue" - } - propertyDescriptor.setCompileTimeInitializer(targetComponents.storageManager.createNullableLazyValue { constantValue }) - } - - output[index] = propertyDescriptor -} diff --git a/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/builder/typeAliasDescriptors.kt b/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/builder/typeAliasDescriptors.kt deleted file mode 100644 index 23c8bc29060..00000000000 --- a/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/builder/typeAliasDescriptors.kt +++ /dev/null @@ -1,97 +0,0 @@ -/* - * Copyright 2010-2019 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. - */ - -package org.jetbrains.kotlin.descriptors.commonizer.builder - -import org.jetbrains.kotlin.descriptors.ClassifierDescriptorWithTypeParameters -import org.jetbrains.kotlin.descriptors.DeclarationDescriptor -import org.jetbrains.kotlin.descriptors.annotations.Annotations -import org.jetbrains.kotlin.descriptors.commonizer.cir.CirClass -import org.jetbrains.kotlin.descriptors.commonizer.cir.CirClassifier -import org.jetbrains.kotlin.descriptors.commonizer.cir.CirTypeAlias -import org.jetbrains.kotlin.descriptors.commonizer.mergedtree.CirTypeAliasNode -import org.jetbrains.kotlin.descriptors.commonizer.mergedtree.CirNode.Companion.indexOfCommon -import org.jetbrains.kotlin.descriptors.commonizer.utils.CommonizedGroup -import org.jetbrains.kotlin.name.ClassId -import org.jetbrains.kotlin.types.TypeAliasExpander -import org.jetbrains.kotlin.types.TypeAliasExpansion - -internal fun CirTypeAliasNode.buildDescriptors( - components: GlobalDeclarationsBuilderComponents, - output: CommonizedGroup, - containingDeclarations: List -) { - val commonClassifier: CirClassifier? = commonDeclaration() - // Note: 'expect class' and lifted up 'typealias' both can't be non-null - val commonTypeAlias: CirTypeAlias? = commonClassifier as? CirTypeAlias? - - val isLiftedUp = commonTypeAlias?.isLiftedUp == true - val markAsActual = commonClassifier != null - - if (!isLiftedUp) { - targetDeclarations.forEachIndexed { index, typeAlias -> - typeAlias?.buildDescriptor(components, output, index, containingDeclarations, classId, isActual = markAsActual) - } - } - - if (commonTypeAlias != null) { - commonTypeAlias.buildDescriptor(components, output, indexOfCommon, containingDeclarations, classId) - } else if (commonClassifier != null && commonClassifier is CirClass) { - commonClassifier.buildDescriptor(components, output, indexOfCommon, containingDeclarations, classId, isExpect = true) - } - - // log stats - components.statsCollector?.logStats(output) -} - -private fun CirTypeAlias.buildDescriptor( - components: GlobalDeclarationsBuilderComponents, - output: CommonizedGroup, - index: Int, - containingDeclarations: List, - classId: ClassId, - isActual: Boolean = false -) { - val targetComponents = components.targetComponents[index] - val storageManager = targetComponents.storageManager - val containingDeclaration = containingDeclarations[index] ?: error("No containing declaration for type alias $this") - - val typeAliasDescriptor = CommonizedTypeAliasDescriptor( - storageManager = storageManager, - containingDeclaration = containingDeclaration, - annotations = annotations.buildDescriptors(targetComponents), - name = name, - visibility = visibility, - isActual = isActual - ) - - val (declaredTypeParameters, typeParameterResolver) = typeParameters.buildDescriptorsAndTypeParameterResolver( - targetComponents, - TypeParameterResolver.EMPTY, - typeAliasDescriptor - ) - - val lazyUnderlyingType = storageManager.createLazyValue { - underlyingType.buildType(targetComponents, typeParameterResolver, expandTypeAliases = false) - } - - val lazyExpandedType = storageManager.createLazyValue { - TypeAliasExpander.NON_REPORTING.expandWithoutAbbreviation( - TypeAliasExpansion.createWithFormalArguments(typeAliasDescriptor), - Annotations.EMPTY - ) - } - - typeAliasDescriptor.initialize( - declaredTypeParameters = declaredTypeParameters, - underlyingType = lazyUnderlyingType, - expandedType = lazyExpandedType - ) - - // cache created type alias descriptor: - components.cache.cache(classId, index, typeAliasDescriptor) - - output[index] = typeAliasDescriptor -} diff --git a/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/cir/CirRoot.kt b/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/cir/CirRoot.kt index 584d867dfb5..493b88c5f88 100644 --- a/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/cir/CirRoot.kt +++ b/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/cir/CirRoot.kt @@ -5,11 +5,8 @@ package org.jetbrains.kotlin.descriptors.commonizer.cir -import org.jetbrains.kotlin.descriptors.commonizer.BuiltInsProvider import org.jetbrains.kotlin.descriptors.commonizer.CommonizerTarget interface CirRoot : CirDeclaration { val target: CommonizerTarget - val builtInsClass: String - val builtInsProvider: BuiltInsProvider } diff --git a/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/cir/factory/CirRootFactory.kt b/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/cir/factory/CirRootFactory.kt index fe3011ace1e..b2c53dfffdb 100644 --- a/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/cir/factory/CirRootFactory.kt +++ b/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/cir/factory/CirRootFactory.kt @@ -5,27 +5,10 @@ package org.jetbrains.kotlin.descriptors.commonizer.cir.factory -import org.jetbrains.kotlin.builtins.konan.KonanBuiltIns -import org.jetbrains.kotlin.descriptors.commonizer.BuiltInsProvider -import org.jetbrains.kotlin.descriptors.commonizer.LeafTarget import org.jetbrains.kotlin.descriptors.commonizer.CommonizerTarget import org.jetbrains.kotlin.descriptors.commonizer.cir.CirRoot import org.jetbrains.kotlin.descriptors.commonizer.cir.impl.CirRootImpl object CirRootFactory { - fun create( - target: CommonizerTarget, - builtInsClass: String, - builtInsProvider: BuiltInsProvider - ): CirRoot { - if (target is LeafTarget) { - check((target.konanTarget != null) == (builtInsClass == KonanBuiltIns::class.java.name)) - } - - return CirRootImpl( - target = target, - builtInsClass = builtInsClass, - builtInsProvider = builtInsProvider - ) - } + fun create(target: CommonizerTarget): CirRoot = CirRootImpl(target = target) } diff --git a/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/cir/factory/CirTypeFactory.kt b/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/cir/factory/CirTypeFactory.kt index 2041142cef2..688baeef93a 100644 --- a/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/cir/factory/CirTypeFactory.kt +++ b/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/cir/factory/CirTypeFactory.kt @@ -11,13 +11,20 @@ import org.jetbrains.kotlin.descriptors.commonizer.cir.* import org.jetbrains.kotlin.descriptors.commonizer.cir.impl.CirClassTypeImpl import org.jetbrains.kotlin.descriptors.commonizer.cir.impl.CirTypeAliasTypeImpl import org.jetbrains.kotlin.descriptors.commonizer.utils.* -import org.jetbrains.kotlin.descriptors.commonizer.utils.declarationDescriptor -import org.jetbrains.kotlin.descriptors.commonizer.utils.extractExpandedType -import org.jetbrains.kotlin.descriptors.commonizer.utils.internedClassId import org.jetbrains.kotlin.name.ClassId import org.jetbrains.kotlin.types.* object CirTypeFactory { + object StandardTypes { + val ANY: CirClassType = createClassType( + classId = ANY_CLASS_ID, + outerType = null, + visibility = DescriptorVisibilities.PUBLIC, + arguments = emptyList(), + isMarkedNullable = false + ) + } + private val classTypeInterner = Interner() private val typeAliasTypeInterner = Interner() private val typeParameterTypeInterner = Interner() @@ -57,9 +64,14 @@ object CirTypeFactory { Annotations.EMPTY ) as AbbreviatedType + val expandedType = extractExpandedType(abbreviatedType) + + val cirExpandedType = create(expandedType, useAbbreviation = true) as CirClassOrTypeAliasType + val cirExpandedTypeWithProperNullability = if (source.isMarkedNullable) makeNullable(cirExpandedType) else cirExpandedType + createTypeAliasType( typeAliasId = classifierDescriptor.internedClassId, - underlyingType = create(extractExpandedType(abbreviatedType), useAbbreviation = true) as CirClassOrTypeAliasType, + underlyingType = cirExpandedTypeWithProperNullability, arguments = createArguments(source.arguments, useAbbreviation = true), isMarkedNullable = source.isMarkedNullable ) @@ -103,6 +115,7 @@ object CirTypeFactory { ) } + @Suppress("MemberVisibilityCanBePrivate") fun createTypeParameterType( index: Int, isMarkedNullable: Boolean @@ -182,7 +195,12 @@ object CirTypeFactory { var index = index var parent = containingDeclaration - while ((parent as? ClassifierDescriptorWithTypeParameters)?.isInner != false) { + if (parent is CallableMemberDescriptor) { + parent = parent.containingDeclaration as? ClassifierDescriptorWithTypeParameters ?: return index + index += parent.declaredTypeParameters.size + } + + while (parent is ClassifierDescriptorWithTypeParameters) { parent = parent.containingDeclaration as? ClassifierDescriptorWithTypeParameters ?: break index += parent.declaredTypeParameters.size } diff --git a/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/cir/factory/CirTypeParameterFactory.kt b/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/cir/factory/CirTypeParameterFactory.kt index e52130ac410..ad6c008945e 100644 --- a/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/cir/factory/CirTypeParameterFactory.kt +++ b/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/cir/factory/CirTypeParameterFactory.kt @@ -14,15 +14,21 @@ import org.jetbrains.kotlin.descriptors.commonizer.utils.compactMap import org.jetbrains.kotlin.descriptors.commonizer.utils.intern import org.jetbrains.kotlin.name.Name import org.jetbrains.kotlin.types.Variance +import org.jetbrains.kotlin.types.typeUtil.isNullableAny object CirTypeParameterFactory { - fun create(source: TypeParameterDescriptor): CirTypeParameter = create( - annotations = source.annotations.compactMap(CirAnnotationFactory::create), - name = source.name.intern(), - isReified = source.isReified, - variance = source.variance, - upperBounds = source.upperBounds.compactMap(CirTypeFactory::create) - ) + fun create(source: TypeParameterDescriptor): CirTypeParameter { + val upperBounds = source.upperBounds + val filteredUpperBounds = if (upperBounds.singleOrNull()?.isNullableAny() == true) emptyList() else upperBounds + + return create( + annotations = source.annotations.compactMap(CirAnnotationFactory::create), + name = source.name.intern(), + isReified = source.isReified, + variance = source.variance, + upperBounds = filteredUpperBounds.compactMap(CirTypeFactory::create) + ) + } @Suppress("NOTHING_TO_INLINE") inline fun create( diff --git a/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/cir/impl/CirRootImpl.kt b/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/cir/impl/CirRootImpl.kt index 5253e65394b..a316fc9d8bd 100644 --- a/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/cir/impl/CirRootImpl.kt +++ b/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/cir/impl/CirRootImpl.kt @@ -5,12 +5,9 @@ package org.jetbrains.kotlin.descriptors.commonizer.cir.impl -import org.jetbrains.kotlin.descriptors.commonizer.BuiltInsProvider import org.jetbrains.kotlin.descriptors.commonizer.CommonizerTarget import org.jetbrains.kotlin.descriptors.commonizer.cir.CirRoot data class CirRootImpl( - override val target: CommonizerTarget, - override val builtInsClass: String, - override val builtInsProvider: BuiltInsProvider + override val target: CommonizerTarget ) : CirRoot diff --git a/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/core/AnnotationsCommonizer.kt b/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/core/AnnotationsCommonizer.kt index 747560f9224..9d2be91f9d1 100644 --- a/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/core/AnnotationsCommonizer.kt +++ b/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/core/AnnotationsCommonizer.kt @@ -10,7 +10,7 @@ import org.jetbrains.kotlin.descriptors.commonizer.cir.CirAnnotation import org.jetbrains.kotlin.descriptors.commonizer.cir.factory.CirAnnotationFactory import org.jetbrains.kotlin.descriptors.commonizer.cir.factory.CirTypeFactory import org.jetbrains.kotlin.descriptors.commonizer.core.AnnotationsCommonizer.Companion.FALLBACK_MESSAGE -import org.jetbrains.kotlin.descriptors.commonizer.utils.DEPRECATED_ANNOTATION_CID +import org.jetbrains.kotlin.descriptors.commonizer.utils.DEPRECATED_ANNOTATION_CLASS_ID import org.jetbrains.kotlin.descriptors.commonizer.utils.compactMap import org.jetbrains.kotlin.descriptors.commonizer.utils.compactMapOf import org.jetbrains.kotlin.descriptors.commonizer.utils.intern @@ -38,7 +38,7 @@ class AnnotationsCommonizer : AbstractStandardCommonizer, Li override fun initialize(first: List) = Unit override fun doCommonizeWith(next: List): Boolean { - val nextDeprecatedAnnotation = next.firstOrNull { it.type.classifierId == DEPRECATED_ANNOTATION_CID } ?: return true + val nextDeprecatedAnnotation = next.firstOrNull { it.type.classifierId == DEPRECATED_ANNOTATION_CLASS_ID } ?: return true val deprecatedAnnotationCommonizer = deprecatedAnnotationCommonizer ?: DeprecatedAnnotationCommonizer().also { this.deprecatedAnnotationCommonizer = it } @@ -148,14 +148,14 @@ private class DeprecatedAnnotationCommonizer : Commonizer = DeprecationLevel.values().associate { - it.name to EnumValue(DEPRECATION_LEVEL_CID, Name.identifier(it.name).intern()) + it.name to EnumValue(DEPRECATION_LEVEL_CLASS_ID, Name.identifier(it.name).intern()) } private fun buildAnnotationType(classId: ClassId) = CirTypeFactory.createClassType( diff --git a/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/core/CommonizationVisitor.kt b/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/core/CommonizationVisitor.kt index 366833e705b..d69afd980bf 100644 --- a/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/core/CommonizationVisitor.kt +++ b/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/core/CommonizationVisitor.kt @@ -7,10 +7,12 @@ package org.jetbrains.kotlin.descriptors.commonizer.core import org.jetbrains.kotlin.descriptors.commonizer.cir.CirClass import org.jetbrains.kotlin.descriptors.commonizer.cir.CirType +import org.jetbrains.kotlin.descriptors.commonizer.cir.factory.CirTypeFactory import org.jetbrains.kotlin.descriptors.commonizer.mergedtree.* -import org.jetbrains.kotlin.descriptors.commonizer.utils.CommonizedGroup +import org.jetbrains.kotlin.descriptors.commonizer.utils.* import org.jetbrains.kotlin.descriptors.commonizer.utils.compactMapNotNull import org.jetbrains.kotlin.descriptors.commonizer.utils.internedClassId +import org.jetbrains.kotlin.name.ClassId internal class CommonizationVisitor( private val classifiers: CirKnownClassifiers, @@ -97,7 +99,7 @@ internal class CommonizationVisitor( } // find out common (and commonized) supertypes - commonClass.commonizeSupertypes(node.collectCommonSupertypes()) + commonClass.commonizeSupertypes(node.classId, node.collectCommonSupertypes()) } } @@ -110,7 +112,7 @@ internal class CommonizationVisitor( if (commonClassifier is CirClass) { // find out common (and commonized) supertypes - commonClassifier.commonizeSupertypes(node.collectCommonSupertypes()) + commonClassifier.commonizeSupertypes(node.classId, node.collectCommonSupertypes()) } } @@ -142,12 +144,19 @@ internal class CommonizationVisitor( return supertypesMap } - private fun CirClass.commonizeSupertypes(supertypesMap: Map>?) { + private fun CirClass.commonizeSupertypes( + classId: ClassId, + supertypesMap: Map>? + ) { + val commonSupertypes = supertypesMap?.values?.compactMapNotNull { supertypesGroup -> + commonize(supertypesGroup, TypeCommonizer(classifiers)) + }.orEmpty() + setSupertypes( - if (supertypesMap.isNullOrEmpty()) - emptyList() + if (commonSupertypes.isEmpty() && classId !in SPECIAL_CLASS_WITHOUT_SUPERTYPES_CLASS_IDS) + listOf(CirTypeFactory.StandardTypes.ANY) else - supertypesMap.values.compactMapNotNull { supertypesGroup -> commonize(supertypesGroup, TypeCommonizer(classifiers)) } + commonSupertypes ) } } diff --git a/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/core/RootCommonizer.kt b/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/core/RootCommonizer.kt index 8c86b1104d9..6a684c9272a 100644 --- a/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/core/RootCommonizer.kt +++ b/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/core/RootCommonizer.kt @@ -5,9 +5,6 @@ package org.jetbrains.kotlin.descriptors.commonizer.core -import org.jetbrains.kotlin.builtins.DefaultBuiltIns -import org.jetbrains.kotlin.builtins.konan.KonanBuiltIns -import org.jetbrains.kotlin.descriptors.commonizer.BuiltInsProvider import org.jetbrains.kotlin.descriptors.commonizer.LeafTarget import org.jetbrains.kotlin.descriptors.commonizer.SharedTarget import org.jetbrains.kotlin.descriptors.commonizer.cir.CirRoot @@ -15,31 +12,17 @@ import org.jetbrains.kotlin.descriptors.commonizer.cir.factory.CirRootFactory class RootCommonizer : AbstractStandardCommonizer() { private val leafTargets = mutableSetOf() - private var konanBuiltInsProvider: BuiltInsProvider? = null override fun commonizationResult() = CirRootFactory.create( - target = SharedTarget(leafTargets), - builtInsClass = if (konanBuiltInsProvider != null) KonanBuiltIns::class.java.name else DefaultBuiltIns::class.java.name, - builtInsProvider = konanBuiltInsProvider ?: BuiltInsProvider.defaultBuiltInsProvider + target = SharedTarget(leafTargets) ) override fun initialize(first: CirRoot) { leafTargets += first.target as LeafTarget - konanBuiltInsProvider = first.konanBuiltInsProvider } override fun doCommonizeWith(next: CirRoot): Boolean { leafTargets += next.target as LeafTarget - - // keep the first met KonanBuiltIns when all targets are Kotlin/Native - // otherwise use DefaultBuiltIns - if (konanBuiltInsProvider != null && next.konanBuiltInsProvider == null) { - konanBuiltInsProvider = null - } - return true } - - private inline val CirRoot.konanBuiltInsProvider - get() = if (builtInsClass == KonanBuiltIns::class.java.name) builtInsProvider else null } diff --git a/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/core/TypeAliasCommonizer.kt b/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/core/TypeAliasCommonizer.kt index 5b49a0cac4b..1c3d6629fd5 100644 --- a/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/core/TypeAliasCommonizer.kt +++ b/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/core/TypeAliasCommonizer.kt @@ -10,7 +10,6 @@ import org.jetbrains.kotlin.descriptors.Modality import org.jetbrains.kotlin.descriptors.commonizer.cir.* import org.jetbrains.kotlin.descriptors.commonizer.cir.factory.CirClassFactory import org.jetbrains.kotlin.descriptors.commonizer.cir.factory.CirTypeAliasFactory -import org.jetbrains.kotlin.descriptors.commonizer.cir.factory.CirTypeFactory import org.jetbrains.kotlin.descriptors.commonizer.mergedtree.CirKnownClassifiers import org.jetbrains.kotlin.name.Name @@ -70,70 +69,13 @@ private class TypeAliasShortCircuitingCommonizer( override fun doCommonizeWith(next: CirTypeAlias): Boolean { if (underlyingType == null) { - underlyingType = computeUnderlyingType(next.underlyingType) ?: return false + underlyingType = computeSuitableUnderlyingType(classifiers, next.underlyingType) ?: return false } return typeParameters.commonizeWith(next.typeParameters) && expandedType.commonizeWith(next.expandedType) && visibility.commonizeWith(next) } - - private tailrec fun computeUnderlyingType(underlyingType: CirClassOrTypeAliasType): CirClassOrTypeAliasType? { - return when (underlyingType) { - is CirClassType -> underlyingType.withCommonizedArguments() - is CirTypeAliasType -> if (classifiers.commonDependeeLibraries.hasClassifier(underlyingType.classifierId)) - underlyingType.withCommonizedArguments() - else - computeUnderlyingType(underlyingType.underlyingType) - } - } - - private fun CirClassType.withCommonizedArguments(): CirClassType? { - val existingArguments = arguments - val newArguments = existingArguments.toCommonizedArguments() ?: return null - - val existingOuterType = outerType - val newOuterType = existingOuterType?.let { it.withCommonizedArguments() ?: return null } - - return if (newArguments !== existingArguments || newOuterType !== existingOuterType) - CirTypeFactory.createClassType( - classId = classifierId, - outerType = newOuterType, - visibility = visibility, - arguments = newArguments, - isMarkedNullable = isMarkedNullable - ) - else - this - } - - private fun CirTypeAliasType.withCommonizedArguments(): CirTypeAliasType? { - val existingArguments = arguments - val newArguments = existingArguments.toCommonizedArguments() ?: return null - - val existingUnderlyingType = underlyingType - val newUnderlyingType = when (existingUnderlyingType) { - is CirClassType -> existingUnderlyingType.withCommonizedArguments() - is CirTypeAliasType -> existingUnderlyingType.withCommonizedArguments() - } ?: return null - - return if (newArguments !== existingArguments || newUnderlyingType !== existingUnderlyingType) - CirTypeFactory.createTypeAliasType( - typeAliasId = classifierId, - underlyingType = newUnderlyingType, - arguments = newArguments, - isMarkedNullable = isMarkedNullable - ) - else - this - } - - @Suppress("NOTHING_TO_INLINE") - private inline fun List.toCommonizedArguments(): List? = - if (isEmpty()) - this - else - TypeArgumentListCommonizer(classifiers).let { if (it.commonizeWith(this)) it.result else null } } private class TypeAliasLiftingUpCommonizer(classifiers: CirKnownClassifiers) : AbstractStandardCommonizer() { @@ -151,7 +93,7 @@ private class TypeAliasLiftingUpCommonizer(classifiers: CirKnownClassifiers) : A typeParameters = typeParameters.result, visibility = visibility.result, underlyingType = underlyingType, - expandedType = computeCommonizedExpandedType(underlyingType) + expandedType = computeExpandedType(underlyingType) ) } @@ -166,13 +108,6 @@ private class TypeAliasLiftingUpCommonizer(classifiers: CirKnownClassifiers) : A typeParameters.commonizeWith(next.typeParameters) && underlyingType.commonizeWith(next.underlyingType) && visibility.commonizeWith(next) - - private tailrec fun computeCommonizedExpandedType(underlyingType: CirClassOrTypeAliasType): CirClassType { - return when (underlyingType) { - is CirClassType -> underlyingType - is CirTypeAliasType -> computeCommonizedExpandedType(underlyingType.underlyingType) - } - } } private class TypeAliasExpectClassCommonizer : AbstractStandardCommonizer() { diff --git a/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/core/TypeCommonizer.kt b/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/core/TypeCommonizer.kt index 1cdc893683c..114d9d3c0e0 100644 --- a/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/core/TypeCommonizer.kt +++ b/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/core/TypeCommonizer.kt @@ -109,7 +109,10 @@ private class TypeAliasTypeCommonizer(private val classifiers: CirKnownClassifie commonizedTypeBuilder = when (val commonClassifier = answer.commonClassifier) { is CirClass -> CommonizedTypeAliasTypeBuilder.forClass(commonClassifier) is CirTypeAlias -> CommonizedTypeAliasTypeBuilder.forTypeAlias(commonClassifier) - null -> CommonizedTypeAliasTypeBuilder.forKnownUnderlyingType(next.underlyingType) + null -> { + val underlyingType = computeSuitableUnderlyingType(classifiers, next.underlyingType) ?: return false + CommonizedTypeAliasTypeBuilder.forKnownUnderlyingType(underlyingType) + } else -> error("Unexpected common classifier type: ${commonClassifier::class.java}, $commonClassifier") } } diff --git a/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/core/typeAliasUtils.kt b/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/core/typeAliasUtils.kt new file mode 100644 index 00000000000..7d3dcd81241 --- /dev/null +++ b/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/core/typeAliasUtils.kt @@ -0,0 +1,80 @@ +/* + * Copyright 2010-2021 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. + */ + +package org.jetbrains.kotlin.descriptors.commonizer.core + +import org.jetbrains.kotlin.descriptors.commonizer.cir.CirClassOrTypeAliasType +import org.jetbrains.kotlin.descriptors.commonizer.cir.CirClassType +import org.jetbrains.kotlin.descriptors.commonizer.cir.CirTypeAliasType +import org.jetbrains.kotlin.descriptors.commonizer.cir.CirTypeProjection +import org.jetbrains.kotlin.descriptors.commonizer.cir.factory.CirTypeFactory +import org.jetbrains.kotlin.descriptors.commonizer.mergedtree.CirKnownClassifiers + +tailrec fun computeExpandedType(underlyingType: CirClassOrTypeAliasType): CirClassType { + return when (underlyingType) { + is CirClassType -> underlyingType + is CirTypeAliasType -> computeExpandedType(underlyingType.underlyingType) + } +} + +internal tailrec fun computeSuitableUnderlyingType( + classifiers: CirKnownClassifiers, + underlyingType: CirClassOrTypeAliasType +): CirClassOrTypeAliasType? { + return when (underlyingType) { + is CirClassType -> underlyingType.withCommonizedArguments(classifiers) + is CirTypeAliasType -> if (classifiers.commonDependeeLibraries.hasClassifier(underlyingType.classifierId)) + underlyingType.withCommonizedArguments(classifiers) + else + computeSuitableUnderlyingType(classifiers, underlyingType.underlyingType) + } +} + +private fun CirClassType.withCommonizedArguments(classifiers: CirKnownClassifiers): CirClassType? { + val existingArguments = arguments + val newArguments = existingArguments.toCommonizedArguments(classifiers) ?: return null + + val existingOuterType = outerType + val newOuterType = existingOuterType?.let { it.withCommonizedArguments(classifiers) ?: return null } + + return if (newArguments !== existingArguments || newOuterType !== existingOuterType) + CirTypeFactory.createClassType( + classId = classifierId, + outerType = newOuterType, + visibility = visibility, + arguments = newArguments, + isMarkedNullable = isMarkedNullable + ) + else + this +} + +private fun CirTypeAliasType.withCommonizedArguments(classifiers: CirKnownClassifiers): CirTypeAliasType? { + val existingArguments = arguments + val newArguments = existingArguments.toCommonizedArguments(classifiers) ?: return null + + val existingUnderlyingType = underlyingType + val newUnderlyingType = when (existingUnderlyingType) { + is CirClassType -> existingUnderlyingType.withCommonizedArguments(classifiers) + is CirTypeAliasType -> existingUnderlyingType.withCommonizedArguments(classifiers) + } ?: return null + + return if (newArguments !== existingArguments || newUnderlyingType !== existingUnderlyingType) + CirTypeFactory.createTypeAliasType( + typeAliasId = classifierId, + underlyingType = newUnderlyingType, + arguments = newArguments, + isMarkedNullable = isMarkedNullable + ) + else + this +} + +@Suppress("NOTHING_TO_INLINE") +private inline fun List.toCommonizedArguments(classifiers: CirKnownClassifiers): List? = + if (isEmpty()) + this + else + TypeArgumentListCommonizer(classifiers).let { if (it.commonizeWith(this)) it.result else null } diff --git a/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/facade.kt b/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/facade.kt index 9a8dbbe6f1f..2fb60d174ca 100644 --- a/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/facade.kt +++ b/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/facade.kt @@ -5,46 +5,35 @@ package org.jetbrains.kotlin.descriptors.commonizer -import org.jetbrains.kotlin.descriptors.commonizer.builder.DeclarationsBuilderVisitor1 -import org.jetbrains.kotlin.descriptors.commonizer.builder.DeclarationsBuilderVisitor2 -import org.jetbrains.kotlin.descriptors.commonizer.builder.createGlobalBuilderComponents +import kotlinx.metadata.klib.ChunkedKlibModuleFragmentWriteStrategy +import org.jetbrains.kotlin.descriptors.commonizer.ResultsConsumer.ModuleResult +import org.jetbrains.kotlin.descriptors.commonizer.ResultsConsumer.Status import org.jetbrains.kotlin.descriptors.commonizer.core.CommonizationVisitor import org.jetbrains.kotlin.descriptors.commonizer.mergedtree.* +import org.jetbrains.kotlin.descriptors.commonizer.mergedtree.CirNode.Companion.dimension import org.jetbrains.kotlin.descriptors.commonizer.mergedtree.CirTreeMerger.CirTreeMergeResult +import org.jetbrains.kotlin.descriptors.commonizer.metadata.MetadataBuilder +import org.jetbrains.kotlin.library.SerializedMetadata import org.jetbrains.kotlin.storage.LockBasedStorageManager import org.jetbrains.kotlin.storage.StorageManager -fun runCommonization(parameters: CommonizerParameters): CommonizerResult { - if (!parameters.hasAnythingToCommonize()) - return CommonizerResult.NothingToDo +fun runCommonization(parameters: CommonizerParameters) { + if (!parameters.hasAnythingToCommonize()) { + parameters.resultsConsumer.allConsumed(Status.NOTHING_TO_DO) + return + } - val storageManager = LockBasedStorageManager("Declaration descriptors commonization") + val storageManager = LockBasedStorageManager("Declarations commonization") val mergeResult = mergeAndCommonize(storageManager, parameters) val mergedTree = mergeResult.root - // build resulting descriptors: - val components = mergedTree.createGlobalBuilderComponents(storageManager, parameters) - mergedTree.accept(DeclarationsBuilderVisitor1(components), emptyList()) - mergedTree.accept(DeclarationsBuilderVisitor2(components), emptyList()) - - val modulesByTargets = LinkedHashMap>() // use linked hash map to preserve order - components.targetComponents.forEach { component -> - val target = component.target - check(target !in modulesByTargets) - - val commonizedModules: List = components.cache.getAllModules(component.index).map(ModuleResult::Commonized) - - val missingModules: List = if (target is LeafTarget) - mergeResult.missingModuleInfos.getValue(target).map { ModuleResult.Missing(it.originalLocation) } - else emptyList() - - modulesByTargets[target] = commonizedModules + missingModules + // build resulting declarations: + for (targetIndex in 0 until mergedTree.dimension) { + serializeTarget(mergeResult, targetIndex, parameters) } - parameters.progressLogger?.invoke("Prepared new descriptors") - - return CommonizerResult.Done(modulesByTargets) + parameters.resultsConsumer.allConsumed(Status.DONE) } private fun mergeAndCommonize(storageManager: StorageManager, parameters: CommonizerParameters): CirTreeMergeResult { @@ -68,3 +57,27 @@ private fun mergeAndCommonize(storageManager: StorageManager, parameters: Common return mergeResult } + +private fun serializeTarget(mergeResult: CirTreeMergeResult, targetIndex: Int, parameters: CommonizerParameters) { + val mergedTree = mergeResult.root + val target = mergedTree.getTarget(targetIndex) + + MetadataBuilder.build(mergedTree, targetIndex, parameters.statsCollector) { metadataModule -> + val libraryName = metadataModule.name + val serializedMetadata = with(metadataModule.write(KLIB_FRAGMENT_WRITE_STRATEGY)) { + SerializedMetadata(header, fragments, fragmentNames) + } + + parameters.resultsConsumer.consume(target, ModuleResult.Commonized(libraryName, serializedMetadata)) + } + + if (target is LeafTarget) { + mergeResult.missingModuleInfos.getValue(target).forEach { + parameters.resultsConsumer.consume(target, ModuleResult.Missing(it.originalLocation)) + } + } + + parameters.resultsConsumer.targetConsumed(target) +} + +private val KLIB_FRAGMENT_WRITE_STRATEGY = ChunkedKlibModuleFragmentWriteStrategy() diff --git a/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/konan/NativeDistributionCommonizer.kt b/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/konan/NativeDistributionCommonizer.kt index 318fa2a1bd6..4e831df93d2 100644 --- a/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/konan/NativeDistributionCommonizer.kt +++ b/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/konan/NativeDistributionCommonizer.kt @@ -5,31 +5,17 @@ package org.jetbrains.kotlin.descriptors.commonizer.konan -import org.jetbrains.kotlin.backend.common.serialization.metadata.KlibMetadataMonolithicSerializer import org.jetbrains.kotlin.backend.common.serialization.metadata.KlibMetadataVersion import org.jetbrains.kotlin.backend.common.serialization.metadata.metadataVersion -import org.jetbrains.kotlin.builtins.konan.KonanBuiltIns -import org.jetbrains.kotlin.config.LanguageVersionSettingsImpl -import org.jetbrains.kotlin.descriptors.ModuleDescriptor import org.jetbrains.kotlin.descriptors.commonizer.* import org.jetbrains.kotlin.descriptors.commonizer.konan.NativeDistributionCommonizer.StatsType.* -import org.jetbrains.kotlin.descriptors.commonizer.stats.AggregatedStatsCollector -import org.jetbrains.kotlin.descriptors.commonizer.stats.FileStatsOutput -import org.jetbrains.kotlin.descriptors.commonizer.stats.RawStatsCollector +import org.jetbrains.kotlin.descriptors.commonizer.stats.* import org.jetbrains.kotlin.descriptors.commonizer.utils.ResettableClockMark -import org.jetbrains.kotlin.descriptors.konan.NATIVE_STDLIB_MODULE_NAME import org.jetbrains.kotlin.konan.library.* import org.jetbrains.kotlin.konan.target.KonanTarget import org.jetbrains.kotlin.library.KotlinLibrary -import org.jetbrains.kotlin.library.SerializedMetadata import org.jetbrains.kotlin.library.ToolingSingleFileKlibResolveStrategy -import org.jetbrains.kotlin.library.impl.BaseWriterImpl -import org.jetbrains.kotlin.library.impl.BuiltInsPlatform -import org.jetbrains.kotlin.library.impl.KotlinLibraryLayoutForWriter -import org.jetbrains.kotlin.library.impl.KotlinLibraryWriterImpl import org.jetbrains.kotlin.library.resolveSingleFileKlib -import org.jetbrains.kotlin.name.Name -import org.jetbrains.kotlin.serialization.konan.impl.KlibResolvedModuleDescriptorsFactoryImpl import org.jetbrains.kotlin.storage.LockBasedStorageManager import org.jetbrains.kotlin.util.Logger import java.io.File @@ -44,9 +30,7 @@ class NativeDistributionCommonizer( private val statsType: StatsType, private val logger: Logger ) { - enum class StatsType { - RAW, AGGREGATED, NONE - } + enum class StatsType { RAW, AGGREGATED, NONE } private val clockMark = ResettableClockMark() @@ -57,11 +41,8 @@ class NativeDistributionCommonizer( // 1. load libraries val allLibraries = loadLibraries() - // 2. run commonization - val result = commonize(allLibraries) - - // 3. write new libraries - saveModules(allLibraries, result) + // 2. run commonization & write new libraries + commonizeAndSaveResults(allLibraries) logTotal() } @@ -101,7 +82,7 @@ class NativeDistributionCommonizer( .orEmpty() if (platformLibs.isEmpty()) - logger.warning("No platform libraries found for target $target. This target will be excluded from commonization.") + logger.warning("No platform libraries found for target ${leafTarget.prettyName}. This target will be excluded from commonization.") leafTarget to NativeLibrariesToCommonize(platformLibs) } @@ -136,203 +117,48 @@ class NativeDistributionCommonizer( return library } - private fun commonize(allLibraries: AllNativeLibraries): CommonizerResult { + private fun commonizeAndSaveResults(allLibraries: AllNativeLibraries) { val statsCollector = when (statsType) { - RAW -> RawStatsCollector(targets, FileStatsOutput(destination, "raw")) - AGGREGATED -> AggregatedStatsCollector(targets, FileStatsOutput(destination, "aggregated")) + RAW -> RawStatsCollector(targets) + AGGREGATED -> AggregatedStatsCollector(targets) NONE -> null } - statsCollector.use { - val parameters = CommonizerParameters(statsCollector, ::logProgress).apply { - val storageManager = LockBasedStorageManager("Commonized modules") - val stdlibProvider = NativeDistributionStdlibProvider(storageManager, allLibraries.stdlib) - dependeeModulesProvider = stdlibProvider + val parameters = CommonizerParameters(statsCollector, ::logProgress).apply { + val storageManager = LockBasedStorageManager("Commonized modules") - allLibraries.librariesByTargets.forEach { (target, librariesToCommonize) -> - if (librariesToCommonize.libraries.isEmpty()) return@forEach + resultsConsumer = NativeDistributionResultsConsumer( + repository = repository, + originalLibraries = allLibraries, + destination = destination, + copyStdlib = copyStdlib, + copyEndorsedLibs = copyEndorsedLibs, + logProgress = ::logProgress + ) + dependeeModulesProvider = NativeDistributionModulesProvider.forStandardLibrary(storageManager, allLibraries.stdlib) - val modulesProvider = NativeDistributionModulesProvider(storageManager, librariesToCommonize) + allLibraries.librariesByTargets.forEach { (target, librariesToCommonize) -> + if (librariesToCommonize.libraries.isEmpty()) return@forEach - addTarget( - TargetProvider( - target = target, - builtInsClass = KonanBuiltIns::class.java, - builtInsProvider = stdlibProvider, - modulesProvider = modulesProvider, - dependeeModulesProvider = null // stdlib is already set as common dependency - ) + val modulesProvider = NativeDistributionModulesProvider.platformLibraries(storageManager, librariesToCommonize) + + addTarget( + TargetProvider( + target = target, + modulesProvider = modulesProvider, + dependeeModulesProvider = null // stdlib is already set as common dependency ) - } - } - - return runCommonization(parameters) - } - } - - private fun saveModules(originalLibraries: AllNativeLibraries, result: CommonizerResult) { - // optimization: stdlib and endorsed libraries effectively remain the same across all Kotlin/Native targets, - // so they can be just copied to the new destination without running serializer - copyCommonStandardLibraries() - - when (result) { - is CommonizerResult.NothingToDo -> { - // It may happen that all targets to be commonized (or at least all but one target) miss platform libraries. - // In such case commonizer will do nothing and return a special result value 'NothingToCommonize'. - // So, let's just copy platform libraries from the target where they are to the new destination. - originalLibraries.librariesByTargets.forEach { (target, librariesToCommonize) -> - copyTargetAsIs(target, librariesToCommonize.libraries.size) - } - } - - is CommonizerResult.Done -> { - val serializer = KlibMetadataMonolithicSerializer( - languageVersionSettings = LanguageVersionSettingsImpl.DEFAULT, - metadataVersion = KlibMetadataVersion.INSTANCE, - skipExpects = false, - project = null ) - - // 'targetsToCopy' are some targets with empty set of platform libraries - val targetsToCopy = originalLibraries.librariesByTargets.keys - result.leafTargets - if (targetsToCopy.isNotEmpty()) { - targetsToCopy.forEach { target -> - val librariesToCommonize = originalLibraries.librariesByTargets.getValue(target) - copyTargetAsIs(target, librariesToCommonize.libraries.size) - } - } - - val leafTargetNames = result.leafTargets.map { it.name } - val targetsToSerialize = result.leafTargets + result.sharedTarget - targetsToSerialize.forEach { target -> - val moduleResults: Collection = result.modulesByTargets.getValue(target) - val newModules: Collection = moduleResults.mapNotNull { (it as? ModuleResult.Commonized)?.module } - val missingModuleLocations: List = - moduleResults.mapNotNull { (it as? ModuleResult.Missing)?.originalLocation } - - val manifestProvider: NativeManifestDataProvider - val starredTarget: String? - when (target) { - is LeafTarget -> { - manifestProvider = originalLibraries.librariesByTargets.getValue(target) - starredTarget = target.name - } - is SharedTarget -> { - manifestProvider = CommonNativeManifestDataProvider(originalLibraries.librariesByTargets.values) - starredTarget = null - } - } - - val targetName = leafTargetNames.joinToString { if (it == starredTarget) "$it(*)" else it } - serializeTarget(target, targetName, newModules, missingModuleLocations, manifestProvider, serializer) - } } } - } - private fun copyCommonStandardLibraries() { - if (copyStdlib || copyEndorsedLibs) { - repository.resolve(KONAN_DISTRIBUTION_KLIB_DIR) - .resolve(KONAN_DISTRIBUTION_COMMON_LIBS_DIR) - .listFiles() - ?.filter { it.isDirectory } - ?.let { - if (copyStdlib) { - if (copyEndorsedLibs) it else it.filter { dir -> dir.endsWith(KONAN_STDLIB_NAME) } - } else - it.filter { dir -> !dir.endsWith(KONAN_STDLIB_NAME) } - }?.forEach { libraryOrigin -> - val libraryDestination = destination.resolve(KONAN_DISTRIBUTION_COMMON_LIBS_DIR).resolve(libraryOrigin.name) - libraryOrigin.copyRecursively(libraryDestination) - } + runCommonization(parameters) - val what = listOfNotNull( - "standard library".takeIf { copyStdlib }, - "endorsed libraries".takeIf { copyEndorsedLibs } - ).joinToString(separator = " and ") - - logProgress("Copied $what") - } - } - - private fun copyTargetAsIs(leafTarget: LeafTarget, librariesCount: Int) { - val librariesDestination = leafTarget.librariesDestination - librariesDestination.mkdirs() // always create an empty directory even if there is nothing to copy - - val librariesSource = leafTarget.platformLibrariesSource - if (librariesSource.isDirectory) librariesSource.copyRecursively(librariesDestination) - - logProgress("Copied $librariesCount libraries for [${leafTarget.name}]") - } - - private fun serializeTarget( - target: CommonizerTarget, - targetName: String, - newModules: Collection, - missingModuleLocations: List, - manifestProvider: NativeManifestDataProvider, - serializer: KlibMetadataMonolithicSerializer - ) { - val librariesDestination = target.librariesDestination - librariesDestination.mkdirs() // always create an empty directory even if there is nothing to copy - - for (newModule in newModules) { - val libraryName = newModule.name - - if (!shouldBeSerialized(libraryName)) - continue - - val metadata = serializer.serializeModule(newModule) - val plainName = libraryName.asString().removePrefix("<").removeSuffix(">") - - val manifestData = manifestProvider.getManifest(plainName) - val libraryDestination = librariesDestination.resolve(plainName) - - writeLibrary(metadata, manifestData, libraryDestination) - } - - for (missingModuleLocation in missingModuleLocations) { - val libraryName = missingModuleLocation.name - missingModuleLocation.copyRecursively(librariesDestination.resolve(libraryName)) - } - - logProgress("Written libraries for [$targetName]") - } - - private fun writeLibrary( - metadata: SerializedMetadata, - manifestData: NativeSensitiveManifestData, - destination: File - ) { - val kDestination = KFile(destination.path) - val layout = KotlinLibraryLayoutForWriter(kDestination, kDestination) - val library = KotlinLibraryWriterImpl( - moduleName = manifestData.uniqueName, - versions = manifestData.versions, - builtInsPlatform = BuiltInsPlatform.NATIVE, - nativeTargets = emptyList(), // will be overwritten with NativeSensitiveManifestData.applyTo() below - nopack = true, - shortName = manifestData.shortName, - layout = layout - ) - library.addMetadata(metadata) - manifestData.applyTo(library.base as BaseWriterImpl) - library.commit() + statsCollector?.writeTo(FileStatsOutput(destination, statsType.name.toLowerCase())) } private val LeafTarget.platformLibrariesSource: File get() = repository.resolve(KONAN_DISTRIBUTION_KLIB_DIR) .resolve(KONAN_DISTRIBUTION_PLATFORM_LIBS_DIR) .resolve(name) - - private val CommonizerTarget.librariesDestination: File - get() = when (this) { - is LeafTarget -> destination.resolve(KONAN_DISTRIBUTION_PLATFORM_LIBS_DIR).resolve(name) - is SharedTarget -> destination.resolve(KONAN_DISTRIBUTION_COMMON_LIBS_DIR) - } - - private companion object { - fun shouldBeSerialized(libraryName: Name) = - libraryName != NATIVE_STDLIB_MODULE_NAME && libraryName != KlibResolvedModuleDescriptorsFactoryImpl.FORWARD_DECLARATIONS_MODULE_NAME - } } diff --git a/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/konan/NativeDistributionModulesProvider.kt b/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/konan/NativeDistributionModulesProvider.kt index f05e72f196e..5dbd7c2546d 100644 --- a/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/konan/NativeDistributionModulesProvider.kt +++ b/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/konan/NativeDistributionModulesProvider.kt @@ -15,20 +15,36 @@ import org.jetbrains.kotlin.descriptors.commonizer.utils.createKotlinNativeForwa import org.jetbrains.kotlin.descriptors.commonizer.utils.strip import org.jetbrains.kotlin.descriptors.impl.ModuleDescriptorImpl import org.jetbrains.kotlin.incremental.components.LookupTracker +import org.jetbrains.kotlin.konan.library.KONAN_STDLIB_NAME +import org.jetbrains.kotlin.library.SerializedMetadata +import org.jetbrains.kotlin.library.metadata.parseModuleHeader import org.jetbrains.kotlin.storage.StorageManager import org.jetbrains.kotlin.utils.addIfNotNull import java.io.File -internal class NativeDistributionModulesProvider( - private val storageManager: StorageManager, - private val librariesToCommonize: NativeLibrariesToCommonize -) : ModulesProvider { - override fun loadModuleInfos(): Map { - return librariesToCommonize.libraries.associate { library -> +internal abstract class NativeDistributionModulesProvider(libraries: Collection) : ModulesProvider { + internal class NativeModuleInfo( + name: String, + originalLocation: File, + val dependencies: Set, + cInteropAttributes: CInteropModuleAttributes? + ) : ModuleInfo(name, originalLocation, cInteropAttributes) + + protected val libraryMap: Map + protected val moduleInfoMap: Map + + init { + check(libraries.isNotEmpty()) { "No libraries supplied" } + + val libraryMap = mutableMapOf() + val moduleInfoMap = mutableMapOf() + + libraries.forEach { library -> val manifestData = library.manifestData val name = manifestData.uniqueName val location = File(library.library.libraryFile.path) + val dependencies = manifestData.dependencies.toSet() val cInteropAttributes = if (manifestData.isInterop) { val packageFqName = manifestData.packageFqName @@ -38,54 +54,105 @@ internal class NativeDistributionModulesProvider( CInteropModuleAttributes(packageFqName, manifestData.exportForwardDeclarations) } else null - name to ModuleInfo(name, location, cInteropAttributes) + libraryMap.put(name, library)?.let { error("Duplicated libraries: $name") } + moduleInfoMap[name] = NativeModuleInfo(name, location, dependencies, cInteropAttributes) } + + this.libraryMap = libraryMap + this.moduleInfoMap = moduleInfoMap } - override fun loadModules(dependencies: Collection): Map { - check(dependencies.isNotEmpty()) { "At least Kotlin/Native stdlib should be provided" } + final override fun loadModuleInfos(): Collection = moduleInfoMap.values - val dependenciesMap = mutableMapOf>() - dependencies.forEach { dependency -> - val name = dependency.name.strip() - dependenciesMap.getOrPut(name) { mutableListOf() } += dependency as ModuleDescriptorImpl + final override fun loadModuleMetadata(name: String): SerializedMetadata { + val library = libraryMap[name]?.library ?: error("No such library: $name") + + val moduleHeader = library.moduleHeaderData + val fragmentNames = parseModuleHeader(moduleHeader).packageFragmentNameList.toSet() + val fragments = fragmentNames.map { fragmentName -> + val partNames = library.packageMetadataParts(fragmentName) + partNames.map { partName -> library.packageMetadata(fragmentName, partName) } } - val builtIns = dependencies.first().builtIns - - val platformModulesMap = librariesToCommonize.libraries.associate { library -> - val name = library.manifestData.uniqueName - val module = NativeFactories.DefaultDeserializedDescriptorFactory.createDescriptorOptionalBuiltIns( - library = library.library, - languageVersionSettings = LanguageVersionSettingsImpl.DEFAULT, - storageManager = storageManager, - builtIns = builtIns, - packageAccessHandler = null, - lookupTracker = LookupTracker.DO_NOTHING - ) - - name to module - } - - val forwardDeclarations = createKotlinNativeForwardDeclarationsModule( - storageManager = storageManager, - builtIns = builtIns + return SerializedMetadata( + module = moduleHeader, + fragments = fragments, + fragmentNames = fragmentNames.toList() ) + } - platformModulesMap.forEach { (name, module) -> - val moduleDependencies = mutableListOf() - moduleDependencies += module + companion object { + fun forStandardLibrary( + storageManager: StorageManager, + stdlib: NativeLibrary + ): ModulesProvider { + check(stdlib.manifestData.uniqueName == KONAN_STDLIB_NAME) - librariesToCommonize.getManifest(name).dependencies.forEach { - moduleDependencies.addIfNotNull(platformModulesMap[it]) - moduleDependencies += dependenciesMap[it].orEmpty() + return object : NativeDistributionModulesProvider(listOf(stdlib)) { + override fun loadModules(dependencies: Collection): Map { + check(dependencies.isEmpty()) + + val stdlibModule = NativeFactories.DefaultDeserializedDescriptorFactory.createDescriptorAndNewBuiltIns( + library = stdlib.library, + languageVersionSettings = LanguageVersionSettingsImpl.DEFAULT, + storageManager = storageManager, + packageAccessHandler = null + ).apply { + setDependencies(listOf(this)) + } + + return mapOf(KONAN_STDLIB_NAME to stdlibModule) + } } - - moduleDependencies += forwardDeclarations - - module.setDependencies(moduleDependencies) } - return platformModulesMap + fun platformLibraries( + storageManager: StorageManager, + librariesToCommonize: NativeLibrariesToCommonize + ): ModulesProvider = object : NativeDistributionModulesProvider(librariesToCommonize.libraries) { + override fun loadModules(dependencies: Collection): Map { + check(dependencies.isNotEmpty()) { "At least Kotlin/Native stdlib should be provided" } + + val dependenciesMap = mutableMapOf>() + dependencies.forEach { dependency -> + val name = dependency.name.strip() + dependenciesMap.getOrPut(name) { mutableListOf() } += dependency as ModuleDescriptorImpl + } + + val builtIns = dependencies.first().builtIns + + val platformModulesMap = libraryMap.mapValues { (_, library) -> + NativeFactories.DefaultDeserializedDescriptorFactory.createDescriptorOptionalBuiltIns( + library = library.library, + languageVersionSettings = LanguageVersionSettingsImpl.DEFAULT, + storageManager = storageManager, + builtIns = builtIns, + packageAccessHandler = null, + lookupTracker = LookupTracker.DO_NOTHING + ) + } + + val forwardDeclarations = createKotlinNativeForwardDeclarationsModule( + storageManager = storageManager, + builtIns = builtIns + ) + + platformModulesMap.forEach { (name, module) -> + val moduleDependencies = mutableListOf() + moduleDependencies += module + + moduleInfoMap.getValue(name).dependencies.forEach { + moduleDependencies.addIfNotNull(platformModulesMap[it]) + moduleDependencies += dependenciesMap[it].orEmpty() + } + + moduleDependencies += forwardDeclarations + + module.setDependencies(moduleDependencies) + } + + return platformModulesMap + } + } } } diff --git a/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/konan/NativeDistributionResultsConsumer.kt b/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/konan/NativeDistributionResultsConsumer.kt new file mode 100644 index 00000000000..4bed4d2c4e9 --- /dev/null +++ b/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/konan/NativeDistributionResultsConsumer.kt @@ -0,0 +1,172 @@ +/* + * Copyright 2010-2021 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. + */ + +package org.jetbrains.kotlin.descriptors.commonizer.konan + +import com.intellij.util.containers.FactoryMap +import org.jetbrains.kotlin.descriptors.commonizer.ResultsConsumer +import org.jetbrains.kotlin.descriptors.commonizer.ResultsConsumer.ModuleResult +import org.jetbrains.kotlin.descriptors.commonizer.ResultsConsumer.Status +import org.jetbrains.kotlin.descriptors.commonizer.CommonizerTarget +import org.jetbrains.kotlin.descriptors.commonizer.LeafTarget +import org.jetbrains.kotlin.descriptors.commonizer.SharedTarget +import org.jetbrains.kotlin.konan.library.KONAN_DISTRIBUTION_COMMON_LIBS_DIR +import org.jetbrains.kotlin.konan.library.KONAN_DISTRIBUTION_KLIB_DIR +import org.jetbrains.kotlin.konan.library.KONAN_DISTRIBUTION_PLATFORM_LIBS_DIR +import org.jetbrains.kotlin.konan.library.KONAN_STDLIB_NAME +import org.jetbrains.kotlin.library.SerializedMetadata +import org.jetbrains.kotlin.library.impl.BaseWriterImpl +import org.jetbrains.kotlin.library.impl.BuiltInsPlatform +import org.jetbrains.kotlin.library.impl.KotlinLibraryLayoutForWriter +import org.jetbrains.kotlin.library.impl.KotlinLibraryWriterImpl +import java.io.File +import org.jetbrains.kotlin.konan.file.File as KFile + +internal class NativeDistributionResultsConsumer( + private val repository: File, + private val originalLibraries: AllNativeLibraries, + private val destination: File, + private val copyStdlib: Boolean, + private val copyEndorsedLibs: Boolean, + private val logProgress: (String) -> Unit +) : ResultsConsumer { + private val allLeafTargets = originalLibraries.librariesByTargets.keys + + private val allLeafCommonizedTargets = originalLibraries.librariesByTargets.filterValues { it.libraries.isNotEmpty() }.keys + private val sharedTarget = SharedTarget(allLeafCommonizedTargets) + + private val consumedTargets = LinkedHashSet() + + private val cachedManifestProviders = FactoryMap.create { target -> + when (target) { + is LeafTarget -> originalLibraries.librariesByTargets.getValue(target) + is SharedTarget -> CommonNativeManifestDataProvider(originalLibraries.librariesByTargets.values) + } + } + + private val cachedLibrariesDestination = FactoryMap.create { target -> + val librariesDestination = when (target) { + is LeafTarget -> destination.resolve(KONAN_DISTRIBUTION_PLATFORM_LIBS_DIR).resolve(target.name) + is SharedTarget -> destination.resolve(KONAN_DISTRIBUTION_COMMON_LIBS_DIR) + } + + librariesDestination.mkdirs() // always create an empty directory even if there is nothing to copy + librariesDestination + } + + override fun consume(target: CommonizerTarget, moduleResult: ModuleResult) { + check(target in allLeafCommonizedTargets || target == sharedTarget) + consumedTargets += target + + serializeModule(target, moduleResult) + } + + override fun targetConsumed(target: CommonizerTarget) { + check(target in consumedTargets) + + logProgress("Written libraries for ${target.prettyCommonizedName(sharedTarget)}") + } + + override fun allConsumed(status: Status) { + // optimization: stdlib and endorsed libraries effectively remain the same across all Kotlin/Native targets, + // so they can be just copied to the new destination without running serializer + copyCommonStandardLibraries() + + when (status) { + Status.NOTHING_TO_DO -> { + // It may happen that all targets to be commonized (or at least all but one target) miss platform libraries. + // In such case commonizer will do nothing and raise a special status value 'NOTHING_TO_DO'. + // So, let's just copy platform libraries from the target where they are to the new destination. + allLeafTargets.forEach(::copyTargetAsIs) + } + Status.DONE -> { + // 'targetsToCopy' are some leaf targets with empty set of platform libraries + val targetsToCopy = allLeafTargets - consumedTargets.filterIsInstance() + targetsToCopy.forEach(::copyTargetAsIs) + } + } + } + + private fun copyCommonStandardLibraries() { + if (copyStdlib || copyEndorsedLibs) { + repository.resolve(KONAN_DISTRIBUTION_KLIB_DIR) + .resolve(KONAN_DISTRIBUTION_COMMON_LIBS_DIR) + .listFiles() + ?.filter { it.isDirectory } + ?.let { + if (copyStdlib) { + if (copyEndorsedLibs) it else it.filter { dir -> dir.endsWith(KONAN_STDLIB_NAME) } + } else + it.filter { dir -> !dir.endsWith(KONAN_STDLIB_NAME) } + }?.forEach { libraryOrigin -> + val libraryDestination = destination.resolve(KONAN_DISTRIBUTION_COMMON_LIBS_DIR).resolve(libraryOrigin.name) + libraryOrigin.copyRecursively(libraryDestination) + } + + val what = listOfNotNull( + "standard library".takeIf { copyStdlib }, + "endorsed libraries".takeIf { copyEndorsedLibs } + ).joinToString(separator = " and ") + + logProgress("Copied $what") + } + } + + private fun copyTargetAsIs(leafTarget: LeafTarget) { + val librariesCount = originalLibraries.librariesByTargets.getValue(leafTarget).libraries.size + val librariesDestination = cachedLibrariesDestination.getValue(leafTarget) + + val librariesSource = leafTarget.platformLibrariesSource + if (librariesSource.isDirectory) librariesSource.copyRecursively(librariesDestination) + + logProgress("Copied $librariesCount libraries for ${leafTarget.prettyName}") + } + + private fun serializeModule(target: CommonizerTarget, moduleResult: ModuleResult) { + val librariesDestination = cachedLibrariesDestination.getValue(target) + + when (moduleResult) { + is ModuleResult.Commonized -> { + val libraryName = moduleResult.libraryName + + val manifestData = cachedManifestProviders.getValue(target).getManifest(libraryName) + val libraryDestination = librariesDestination.resolve(libraryName) + + writeLibrary(moduleResult.metadata, manifestData, libraryDestination) + } + is ModuleResult.Missing -> { + val libraryName = moduleResult.libraryName + val missingModuleLocation = moduleResult.originalLocation + + missingModuleLocation.copyRecursively(librariesDestination.resolve(libraryName)) + } + } + } + + private fun writeLibrary( + metadata: SerializedMetadata, + manifestData: NativeSensitiveManifestData, + libraryDestination: File + ) { + val layout = KFile(libraryDestination.path).let { KotlinLibraryLayoutForWriter(it, it) } + val library = KotlinLibraryWriterImpl( + moduleName = manifestData.uniqueName, + versions = manifestData.versions, + builtInsPlatform = BuiltInsPlatform.NATIVE, + nativeTargets = emptyList(), // will be overwritten with NativeSensitiveManifestData.applyTo() below + nopack = true, + shortName = manifestData.shortName, + layout = layout + ) + library.addMetadata(metadata) + manifestData.applyTo(library.base as BaseWriterImpl) + library.commit() + } + + private val LeafTarget.platformLibrariesSource: File + get() = repository.resolve(KONAN_DISTRIBUTION_KLIB_DIR) + .resolve(KONAN_DISTRIBUTION_PLATFORM_LIBS_DIR) + .resolve(name) +} diff --git a/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/konan/NativeDistributionStdlibProvider.kt b/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/konan/NativeDistributionStdlibProvider.kt deleted file mode 100644 index 02b2b469258..00000000000 --- a/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/konan/NativeDistributionStdlibProvider.kt +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2010-2020 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. - */ - -package org.jetbrains.kotlin.descriptors.commonizer.konan - -import org.jetbrains.kotlin.builtins.KotlinBuiltIns -import org.jetbrains.kotlin.config.LanguageVersionSettingsImpl -import org.jetbrains.kotlin.descriptors.ModuleDescriptor -import org.jetbrains.kotlin.descriptors.commonizer.BuiltInsProvider -import org.jetbrains.kotlin.descriptors.commonizer.ModulesProvider -import org.jetbrains.kotlin.descriptors.commonizer.ModulesProvider.ModuleInfo -import org.jetbrains.kotlin.descriptors.commonizer.utils.NativeFactories -import org.jetbrains.kotlin.konan.library.KONAN_STDLIB_NAME -import org.jetbrains.kotlin.storage.StorageManager -import java.io.File - -internal class NativeDistributionStdlibProvider( - private val storageManager: StorageManager, - private val stdlib: NativeLibrary -) : BuiltInsProvider, ModulesProvider { - private val moduleInfo = ModuleInfo( - name = KONAN_STDLIB_NAME, - originalLocation = File(stdlib.library.libraryFile.absolutePath), - cInteropAttributes = null - ) - - override fun loadBuiltIns(): KotlinBuiltIns = loadStdlibModule().builtIns - override fun loadModuleInfos(): Map = mapOf(KONAN_STDLIB_NAME to moduleInfo) - - override fun loadModules(dependencies: Collection): Map { - check(dependencies.isEmpty()) - return mapOf(KONAN_STDLIB_NAME to loadStdlibModule()) - } - - private fun loadStdlibModule() = - NativeFactories.DefaultDeserializedDescriptorFactory.createDescriptorAndNewBuiltIns( - library = stdlib.library, - languageVersionSettings = LanguageVersionSettingsImpl.DEFAULT, - storageManager = storageManager, - packageAccessHandler = null - ).apply { - setDependencies(listOf(this)) - } -} \ No newline at end of file diff --git a/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/mergedtree/CirNodeWithLiftingUp.kt b/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/mergedtree/CirNodeWithLiftingUp.kt new file mode 100644 index 00000000000..864728f4497 --- /dev/null +++ b/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/mergedtree/CirNodeWithLiftingUp.kt @@ -0,0 +1,14 @@ +/* + * Copyright 2010-2020 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. + */ + +package org.jetbrains.kotlin.descriptors.commonizer.mergedtree + +import org.jetbrains.kotlin.descriptors.commonizer.cir.CirDeclaration +import org.jetbrains.kotlin.descriptors.commonizer.cir.CirLiftedUpDeclaration + +interface CirNodeWithLiftingUp : CirNode { + val isLiftedUp: Boolean + get() = (commonDeclaration() as? CirLiftedUpDeclaration)?.isLiftedUp == true +} diff --git a/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/mergedtree/CirPropertyNode.kt b/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/mergedtree/CirPropertyNode.kt index 31d903c5291..2557608e587 100644 --- a/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/mergedtree/CirPropertyNode.kt +++ b/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/mergedtree/CirPropertyNode.kt @@ -12,7 +12,7 @@ import org.jetbrains.kotlin.storage.NullableLazyValue class CirPropertyNode( override val targetDeclarations: CommonizedGroup, override val commonDeclaration: NullableLazyValue -) : CirNode { +) : CirNodeWithLiftingUp { override fun accept(visitor: CirNodeVisitor, data: T) = visitor.visitPropertyNode(this, data) diff --git a/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/mergedtree/CirRootNode.kt b/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/mergedtree/CirRootNode.kt index 44bcba6293a..df6d0c66263 100644 --- a/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/mergedtree/CirRootNode.kt +++ b/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/mergedtree/CirRootNode.kt @@ -6,7 +6,9 @@ package org.jetbrains.kotlin.descriptors.commonizer.mergedtree import gnu.trove.THashMap +import org.jetbrains.kotlin.descriptors.commonizer.CommonizerTarget import org.jetbrains.kotlin.descriptors.commonizer.cir.CirRoot +import org.jetbrains.kotlin.descriptors.commonizer.mergedtree.CirNode.Companion.indexOfCommon import org.jetbrains.kotlin.descriptors.commonizer.utils.CommonizedGroup import org.jetbrains.kotlin.name.Name import org.jetbrains.kotlin.storage.NullableLazyValue @@ -17,6 +19,9 @@ class CirRootNode( ) : CirNode { val modules: MutableMap = THashMap() + fun getTarget(targetIndex: Int): CommonizerTarget = + (if (targetIndex == indexOfCommon) commonDeclaration() else targetDeclarations[targetIndex])!!.target + override fun accept(visitor: CirNodeVisitor, data: T): R = visitor.visitRootNode(this, data) diff --git a/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/mergedtree/CirTreeMerger.kt b/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/mergedtree/CirTreeMerger.kt index 6a8159759b2..b26574d092f 100644 --- a/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/mergedtree/CirTreeMerger.kt +++ b/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/mergedtree/CirTreeMerger.kt @@ -68,18 +68,20 @@ class CirTreeMerger( val rootNode: CirRootNode = buildRootNode(storageManager, size) // remember any exported forward declarations from common fragments of dependee modules - parameters.dependeeModulesProvider?.loadModuleInfos()?.values?.forEach(::processCInteropModuleAttributes) + parameters.dependeeModulesProvider?.loadModuleInfos()?.forEach(::processCInteropModuleAttributes) // load common dependencies val dependeeModules = parameters.dependeeModulesProvider?.loadModules(emptyList())?.values.orEmpty() - val allModuleInfos: List> = parameters.targetProviders.map { it.modulesProvider.loadModuleInfos() } + val allModuleInfos: List> = parameters.targetProviders.map { targetProvider -> + targetProvider.modulesProvider.loadModuleInfos().associateBy { it.name } + } val commonModuleNames = allModuleInfos.map { it.keys }.reduce { a, b -> a intersect b } parameters.targetProviders.forEachIndexed { targetIndex, targetProvider -> val commonModuleInfos = allModuleInfos[targetIndex].filterKeys { it in commonModuleNames } processTarget(rootNode, targetIndex, targetProvider, commonModuleInfos, dependeeModules) - parameters.progressLogger?.invoke("Loaded declarations for [${targetProvider.target.name}]") + parameters.progressLogger?.invoke("Loaded declarations for ${targetProvider.target.prettyName}") System.gc() } @@ -102,11 +104,7 @@ class CirTreeMerger( commonModuleInfos: Map, dependeeModules: Collection ) { - rootNode.targetDeclarations[targetIndex] = CirRootFactory.create( - targetProvider.target, - targetProvider.builtInsClass.name, - targetProvider.builtInsProvider - ) + rootNode.targetDeclarations[targetIndex] = CirRootFactory.create(targetProvider.target) val targetDependeeModules = targetProvider.dependeeModulesProvider?.loadModules(dependeeModules)?.values.orEmpty() val allDependeeModules = targetDependeeModules + dependeeModules @@ -222,7 +220,11 @@ class CirTreeMerger( val functions: MutableMap = classNode.functions val nestedClasses: MutableMap = classNode.classes - classDescriptor.constructors.forEach { processClassConstructor(constructors, targetIndex, it, parentCommonDeclarationForMembers) } + if (classDescriptor.kind != ClassKind.ENUM_ENTRY) { + classDescriptor.constructors.forEach { constructorDescriptor -> + processClassConstructor(constructors, targetIndex, constructorDescriptor, parentCommonDeclarationForMembers) + } + } classDescriptor.unsubstitutedMemberScope.collectMembers( PropertyCollector { propertyDescriptor -> diff --git a/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/mergedtree/CirTypeAliasNode.kt b/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/mergedtree/CirTypeAliasNode.kt index 723eebbb162..06f0a464fbd 100644 --- a/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/mergedtree/CirTypeAliasNode.kt +++ b/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/mergedtree/CirTypeAliasNode.kt @@ -15,7 +15,7 @@ class CirTypeAliasNode( override val targetDeclarations: CommonizedGroup, override val commonDeclaration: NullableLazyValue, override val classId: ClassId -) : CirNodeWithClassId { +) : CirNodeWithClassId, CirNodeWithLiftingUp { override fun accept(visitor: CirNodeVisitor, data: T): R = visitor.visitTypeAliasNode(this, data) diff --git a/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/mergedtree/approximationKeys.kt b/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/mergedtree/approximationKeys.kt index c10d2af88ba..8679475a246 100644 --- a/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/mergedtree/approximationKeys.kt +++ b/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/mergedtree/approximationKeys.kt @@ -15,8 +15,8 @@ import org.jetbrains.kotlin.name.Name /** Used for approximation of [PropertyDescriptor]s before running concrete [Commonizer]s */ data class PropertyApproximationKey( - private val name: Name, - private val extensionReceiverParameterType: CirTypeSignature? + val name: Name, + val extensionReceiverParameterType: CirTypeSignature? ) { constructor(property: PropertyDescriptor) : this( property.name.intern(), @@ -26,10 +26,10 @@ data class PropertyApproximationKey( /** Used for approximation of [SimpleFunctionDescriptor]s before running concrete [Commonizer]s */ data class FunctionApproximationKey( - private val name: Name, - private val valueParametersTypes: Array, + val name: Name, + val valueParametersTypes: Array, private val additionalValueParametersNamesHash: Int, - private val extensionReceiverParameterType: CirTypeSignature? + val extensionReceiverParameterType: CirTypeSignature? ) { constructor(function: SimpleFunctionDescriptor) : this( function.name.intern(), @@ -56,7 +56,7 @@ data class FunctionApproximationKey( /** Used for approximation of [ConstructorDescriptor]s before running concrete [Commonizer]s */ data class ConstructorApproximationKey( - private val valueParametersTypes: Array, + val valueParametersTypes: Array, private val additionalValueParametersNamesHash: Int ) { constructor(constructor: ConstructorDescriptor) : this( diff --git a/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/mergedtree/collectors.kt b/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/mergedtree/collectors.kt index 5dd1ca3718e..2f7a34f7033 100644 --- a/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/mergedtree/collectors.kt +++ b/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/mergedtree/collectors.kt @@ -57,7 +57,6 @@ internal inline fun FunctionCollector( if (candidate.kind.isReal && !candidate.isKniBridgeFunction() && !candidate.isDeprecatedTopLevelFunction() - && !candidate.isIgnoredDarwinFunction() ) { typedCollector(candidate) } diff --git a/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/metadata/entityBuilders.kt b/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/metadata/entityBuilders.kt new file mode 100644 index 00000000000..bf0f33c0724 --- /dev/null +++ b/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/metadata/entityBuilders.kt @@ -0,0 +1,358 @@ +/* + * Copyright 2010-2020 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. + */ + +package org.jetbrains.kotlin.descriptors.commonizer.metadata + +import kotlinx.metadata.* +import kotlinx.metadata.klib.* +import org.jetbrains.kotlin.backend.common.serialization.metadata.DynamicTypeDeserializer +import org.jetbrains.kotlin.descriptors.CallableMemberDescriptor +import org.jetbrains.kotlin.descriptors.commonizer.cir.* +import org.jetbrains.kotlin.descriptors.commonizer.cir.impl.CirValueParameterImpl +import org.jetbrains.kotlin.descriptors.commonizer.core.computeExpandedType +import org.jetbrains.kotlin.descriptors.commonizer.mergedtree.* +import org.jetbrains.kotlin.descriptors.commonizer.metadata.TypeAliasExpansion.* +import org.jetbrains.kotlin.descriptors.commonizer.utils.DEFAULT_SETTER_VALUE_NAME +import org.jetbrains.kotlin.descriptors.commonizer.utils.strip +import org.jetbrains.kotlin.name.FqName +import org.jetbrains.kotlin.name.Name +import org.jetbrains.kotlin.resolve.constants.* +import org.jetbrains.kotlin.types.Variance + +internal fun CirModule.buildModule( + fragments: Collection +): KlibModuleMetadata = KlibModuleMetadata( + name = name.strip(), + fragments = fragments.toList(), + annotations = emptyList() +) + +internal fun CirPackage.buildModuleFragment( + allClasses: Collection, + topLevelTypeAliases: Collection, + topLevelFunctions: Collection, + topLevelProperties: Collection +): KmModuleFragment = KmModuleFragment().also { fragment -> + fragment.fqName = fqName.asString() + allClasses.forEach { + fragment.classes += it + fragment.className += it.name + } + + if (topLevelTypeAliases.isNotEmpty() || topLevelFunctions.isNotEmpty() || topLevelProperties.isNotEmpty()) { + fragment.pkg = KmPackage().also { pkg -> + pkg.fqName = fqName.asString() + pkg.typeAliases += topLevelTypeAliases + pkg.functions += topLevelFunctions + pkg.properties += topLevelProperties + } + } +} + +internal fun addEmptyFragments(fragments: MutableCollection) { + val existingPackageFqNames: Set = fragments.mapTo(HashSet()) { it.fqName!! } + + val missingPackageFqNames: Set = existingPackageFqNames.flatMapTo(HashSet()) { fqName -> + fqName.mapIndexedNotNull { index, ch -> + if (ch == '.') { + val parentFqName = fqName.substring(0, index) + if (parentFqName !in existingPackageFqNames) + return@mapIndexedNotNull parentFqName + } + + null + } + } + + missingPackageFqNames.forEach { fqName -> + fragments += KmModuleFragment().also { fragment -> + fragment.fqName = fqName + } + } +} + +internal fun CirClass.buildClass( + context: MetadataBuildingVisitorContext, + className: ClassName, + directNestedClasses: Collection, + nestedConstructors: Collection, + nestedFunctions: Collection, + nestedProperties: Collection +): KmClass = KmClass().also { clazz -> + clazz.flags = classFlags(isExpect = context.isCommon) + annotations.mapTo(clazz.annotations) { it.buildAnnotation() } + typeParameters.buildTypeParameters(context, output = clazz.typeParameters) + clazz.name = className + + clazz.constructors += nestedConstructors + clazz.functions += nestedFunctions + clazz.properties += nestedProperties + + directNestedClasses.forEach { directNestedClass -> + val shortClassName = directNestedClass.name.substringAfterLast('.') + + if (Flag.Class.IS_ENUM_ENTRY(directNestedClass.flags)) { + clazz.enumEntries += shortClassName + clazz.klibEnumEntries += KlibEnumEntry(name = shortClassName, annotations = directNestedClass.annotations) + } else { + clazz.nestedClasses += shortClassName + } + } + + clazz.companionObject = companion?.asString() + supertypes.mapTo(clazz.supertypes) { it.buildType(context) } +} + +internal fun linkSealedClassesWithSubclasses(packageFqName: FqName, classConsumer: ClassConsumer) { + if (classConsumer.allClasses.isEmpty() || classConsumer.sealedClasses.isEmpty()) return + + val packageName = packageFqName.asString().replace('.', '/') + fun ClassName.isInSamePackage(): Boolean = substringBeforeLast('/', "") == packageName + + val sealedClassesMap: Map = classConsumer.sealedClasses.associateBy { it.name } + + classConsumer.allClasses.forEach { clazz -> + clazz.supertypes.forEach supertype@{ supertype -> + val superclassName = (supertype.classifier as? KmClassifier.Class)?.name ?: return@supertype + if (!superclassName.isInSamePackage()) return@supertype + val sealedClass = sealedClassesMap[superclassName] ?: return@supertype + sealedClass.sealedSubclasses += clazz.name + } + } +} + +internal fun CirClassConstructor.buildClassConstructor( + context: MetadataBuildingVisitorContext +): KmConstructor = KmConstructor( + flags = classConstructorFlags() +).also { constructor -> + annotations.mapTo(constructor.annotations) { it.buildAnnotation() } + valueParameters.mapTo(constructor.valueParameters) { it.buildValueParameter(context) } +} + +internal fun CirTypeAlias.buildTypeAlias( + context: MetadataBuildingVisitorContext +): KmTypeAlias = KmTypeAlias( + flags = typeAliasFlags(), + name = name.asString() +).also { typeAlias -> + annotations.mapTo(typeAlias.annotations) { it.buildAnnotation() } + typeParameters.buildTypeParameters(context, output = typeAlias.typeParameters) + typeAlias.underlyingType = underlyingType.buildType(context, expansion = ONLY_ABBREVIATIONS) + typeAlias.expandedType = underlyingType.buildType(context, expansion = FOR_TOP_LEVEL_TYPE) +} + +internal fun CirProperty.buildProperty( + context: MetadataBuildingVisitorContext, +): KmProperty = KmProperty( + flags = propertyFlags(isExpect = context.isCommon && !isLiftedUp), + name = name.asString(), + getterFlags = getter?.propertyAccessorFlags(this, this) ?: NO_FLAGS, + setterFlags = setter?.let { setter -> setter.propertyAccessorFlags(setter, this) } ?: NO_FLAGS +).also { property -> + // TODO unclear where to write backing/delegate field annotations, see KT-44625 + annotations.mapTo(property.annotations) { it.buildAnnotation() } + getter?.annotations?.mapTo(property.getterAnnotations) { it.buildAnnotation() } + setter?.annotations?.mapTo(property.setterAnnotations) { it.buildAnnotation() } + property.compileTimeValue = compileTimeInitializer?.takeIf { it !is NullValue }?.buildAnnotationArgument() + typeParameters.buildTypeParameters(context, output = property.typeParameters) + extensionReceiver?.let { receiver -> + // TODO nowhere to write receiver annotations, see KT-42490 + property.receiverParameterType = receiver.type.buildType(context) + } + setter?.takeIf { !it.isDefault }?.let { setter -> + property.setterParameter = CirValueParameterImpl( + annotations = setter.parameterAnnotations, + name = DEFAULT_SETTER_VALUE_NAME, + returnType = returnType, + varargElementType = null, + declaresDefaultValue = false, + isCrossinline = false, + isNoinline = false + ).buildValueParameter(context) + } + property.returnType = returnType.buildType(context) +} + +internal fun CirFunction.buildFunction( + context: MetadataBuildingVisitorContext, +): KmFunction = KmFunction( + flags = functionFlags(isExpect = context.isCommon && kind != CallableMemberDescriptor.Kind.SYNTHESIZED), + name = name.asString() +).also { function -> + annotations.mapTo(function.annotations) { it.buildAnnotation() } + typeParameters.buildTypeParameters(context, output = function.typeParameters) + valueParameters.mapTo(function.valueParameters) { it.buildValueParameter(context) } + extensionReceiver?.let { receiver -> + // TODO nowhere to write receiver annotations, see KT-42490 + function.receiverParameterType = receiver.type.buildType(context) + } + function.returnType = returnType.buildType(context) +} + +private fun CirAnnotation.buildAnnotation(): KmAnnotation { + val arguments = LinkedHashMap>(constantValueArguments.size + annotationValueArguments.size, 1F) + + constantValueArguments.forEach { (name: Name, value: ConstantValue<*>) -> + arguments[name.asString()] = value.buildAnnotationArgument() + } + + annotationValueArguments.forEach { (name: Name, nested: CirAnnotation) -> + arguments[name.asString()] = KmAnnotationArgument.AnnotationValue(nested.buildAnnotation()) + } + + return KmAnnotation( + className = type.classifierId.asString(), + arguments = arguments + ) +} + +private fun ConstantValue<*>.buildAnnotationArgument(): KmAnnotationArgument<*> = when (this) { + is StringValue -> KmAnnotationArgument.StringValue(value) + is CharValue -> KmAnnotationArgument.CharValue(value) + + is ByteValue -> KmAnnotationArgument.ByteValue(value) + is ShortValue -> KmAnnotationArgument.ShortValue(value) + is IntValue -> KmAnnotationArgument.IntValue(value) + is LongValue -> KmAnnotationArgument.LongValue(value) + + is UByteValue -> KmAnnotationArgument.UByteValue(value) + is UShortValue -> KmAnnotationArgument.UShortValue(value) + is UIntValue -> KmAnnotationArgument.UIntValue(value) + is ULongValue -> KmAnnotationArgument.ULongValue(value) + + is FloatValue -> KmAnnotationArgument.FloatValue(value) + is DoubleValue -> KmAnnotationArgument.DoubleValue(value) + is BooleanValue -> KmAnnotationArgument.BooleanValue(value) + + is EnumValue -> KmAnnotationArgument.EnumValue(enumClassId.asString(), enumEntryName.asString()) + is ArrayValue -> KmAnnotationArgument.ArrayValue(value.map { it.buildAnnotationArgument() }) + + else -> error("Unsupported annotation argument type: ${this::class.java}, $this") +} + +private fun CirValueParameter.buildValueParameter( + context: MetadataBuildingVisitorContext +): KmValueParameter = KmValueParameter( + flags = valueParameterFlags(), + name = name.asString() +).also { parameter -> + annotations.mapTo(parameter.annotations) { it.buildAnnotation() } + parameter.type = returnType.buildType(context) + varargElementType?.let { varargElementType -> + parameter.varargElementType = varargElementType.buildType(context) + } +} + +private fun List.buildTypeParameters( + context: MetadataBuildingVisitorContext, + output: MutableList +) { + mapIndexedTo(output) { index, cirTypeParameter -> + KmTypeParameter( + flags = cirTypeParameter.typeParameterFlags(), + name = cirTypeParameter.name.asString(), + id = context.typeParameterIndexOffset + index, + variance = cirTypeParameter.variance.buildVariance() + ).also { parameter -> + cirTypeParameter.upperBounds.mapTo(parameter.upperBounds) { it.buildType(context) } + cirTypeParameter.annotations.mapTo(parameter.annotations) { it.buildAnnotation() } + } + } +} + +private fun CirType.buildType( + context: MetadataBuildingVisitorContext, + expansion: TypeAliasExpansion = FOR_TOP_LEVEL_TYPE +): KmType = when (this) { + is CirClassType -> buildType(context, expansion) + is CirTypeAliasType -> buildType(context, expansion) + is CirTypeParameterType -> buildType() + is CirFlexibleType -> { + lowerBound.buildType(context, expansion).also { + it.flexibleTypeUpperBound = KmFlexibleTypeUpperBound( + type = upperBound.buildType(context, expansion), + typeFlexibilityId = DynamicTypeDeserializer.id + ) + } + } +} + +private fun CirTypeParameterType.buildType(): KmType = + KmType(typeFlags()).also { type -> + type.classifier = KmClassifier.TypeParameter(index) + } + +private fun CirClassType.buildType( + context: MetadataBuildingVisitorContext, + expansion: TypeAliasExpansion +): KmType = KmType(typeFlags()).also { type -> + type.classifier = KmClassifier.Class(classifierId.asString()) + arguments.mapTo(type.arguments) { it.buildArgument(context, expansion) } + outerType?.let { type.outerType = it.buildType(context, expansion) } +} + +private fun CirTypeAliasType.buildType( + context: MetadataBuildingVisitorContext, + expansion: TypeAliasExpansion +): KmType = when (expansion) { + ONLY_ABBREVIATIONS -> buildAbbreviationType(context, expansion) + EXPANDED_WITHOUT_ABBREVIATIONS -> buildExpandedType(context, expansion) + FOR_TOP_LEVEL_TYPE -> buildExpandedType(context, EXPANDED_WITHOUT_ABBREVIATIONS).apply { + abbreviatedType = buildAbbreviationType(context, expansion) + } + FOR_NESTED_TYPE -> buildExpandedType(context, expansion).apply { + abbreviatedType = buildAbbreviationType(context, expansion) + } +} + +private fun CirTypeAliasType.buildAbbreviationType( + context: MetadataBuildingVisitorContext, + expansion: TypeAliasExpansion +): KmType { + val abbreviationType = KmType(typeFlags()) + abbreviationType.classifier = KmClassifier.TypeAlias(classifierId.asString()) + arguments.mapTo(abbreviationType.arguments) { it.buildArgument(context, expansion) } + return abbreviationType +} + +@Suppress("UnnecessaryVariable") +private fun CirTypeAliasType.buildExpandedType( + context: MetadataBuildingVisitorContext, + expansion: TypeAliasExpansion +): KmType { + val cirExpandedType = computeExpandedType(underlyingType) + val expandedType = cirExpandedType.buildType(context, expansion) + return expandedType +} + +private fun CirTypeProjection.buildArgument( + context: MetadataBuildingVisitorContext, + expansion: TypeAliasExpansion +): KmTypeProjection { + val effectiveExpansion = if (expansion == FOR_TOP_LEVEL_TYPE) FOR_NESTED_TYPE else expansion + return when (this) { + CirStarTypeProjection -> KmTypeProjection.STAR + is CirTypeProjectionImpl -> KmTypeProjection( + variance = projectionKind.buildVariance(), + type = type.buildType(context, effectiveExpansion) + ) + } +} + +@Suppress("NOTHING_TO_INLINE") +private inline fun Variance.buildVariance(): KmVariance = when (this) { + Variance.INVARIANT -> KmVariance.INVARIANT + Variance.IN_VARIANCE -> KmVariance.IN + Variance.OUT_VARIANCE -> KmVariance.OUT +} + +@Suppress("SpellCheckingInspection") +private enum class TypeAliasExpansion { + ONLY_ABBREVIATIONS, + EXPANDED_WITHOUT_ABBREVIATIONS, + FOR_TOP_LEVEL_TYPE, + FOR_NESTED_TYPE +} diff --git a/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/metadata/flags.kt b/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/metadata/flags.kt new file mode 100644 index 00000000000..ea8a338be6f --- /dev/null +++ b/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/metadata/flags.kt @@ -0,0 +1,190 @@ +/* + * Copyright 2010-2020 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. + */ + +package org.jetbrains.kotlin.descriptors.commonizer.metadata + +import kotlinx.metadata.Flag +import kotlinx.metadata.Flags +import kotlinx.metadata.flagsOf +import org.jetbrains.kotlin.descriptors.CallableMemberDescriptor +import org.jetbrains.kotlin.descriptors.ClassKind +import org.jetbrains.kotlin.descriptors.DescriptorVisibilities +import org.jetbrains.kotlin.descriptors.Modality +import org.jetbrains.kotlin.descriptors.commonizer.cir.* +import org.jetbrains.kotlin.resolve.constants.NullValue + +internal const val NO_FLAGS: Flags = 0 + +internal fun CirFunction.functionFlags(isExpect: Boolean): Flags = + flagsOfNotNull( + hasAnnotationsFlag, + visibilityFlag, + modalityFlag, + memberKindFlag, + Flag.Function.HAS_NON_STABLE_PARAMETER_NAMES.takeIf { !hasStableParameterNames }, + Flag.Function.IS_EXPECT.takeIf { isExpect } + ) or modifiers.modifiersFlags + +internal fun CirProperty.propertyFlags(isExpect: Boolean): Flags = + flagsOfNotNull( + hasAnnotationsFlag, + visibilityFlag, + modalityFlag, + memberKindFlag, + Flag.Property.HAS_GETTER.takeIf { getter != null }, + Flag.Property.HAS_SETTER.takeIf { setter != null }, + Flag.Property.IS_DELEGATED.takeIf { isDelegate }, + Flag.Property.IS_EXPECT.takeIf { isExpect } + ) or modifiersFlags + +internal fun CirPropertyAccessor.propertyAccessorFlags( + visibilityHolder: CirHasVisibility, + modalityHolder: CirHasModality +): Flags { + return flagsOfNotNull( + hasAnnotationsFlag, + visibilityHolder.visibilityFlag, + modalityHolder.modalityFlag, + Flag.PropertyAccessor.IS_NOT_DEFAULT.takeIf { !isDefault }, + Flag.PropertyAccessor.IS_EXTERNAL.takeIf { isExternal }, + Flag.PropertyAccessor.IS_INLINE.takeIf { isInline } + ) +} + +internal fun CirClassConstructor.classConstructorFlags(): Flags = + flagsOfNotNull( + hasAnnotationsFlag, + visibilityFlag, + Flag.Constructor.IS_SECONDARY.takeIf { !isPrimary }, + Flag.Constructor.HAS_NON_STABLE_PARAMETER_NAMES.takeIf { !hasStableParameterNames } + ) + +internal fun CirType.typeFlags(): Flags = + flagsOfNotNull( + nullableFlag, + //Flag.Type.IS_SUSPEND.takeIf { false } + ) + +internal fun CirTypeParameter.typeParameterFlags(): Flags = + flagsOfNotNull( + Flag.TypeParameter.IS_REIFIED.takeIf { isReified } + ) + +internal fun CirValueParameter.valueParameterFlags(): Flags = + flagsOfNotNull( + hasAnnotationsFlag, + Flag.ValueParameter.DECLARES_DEFAULT_VALUE.takeIf { declaresDefaultValue }, + Flag.ValueParameter.IS_CROSSINLINE.takeIf { isCrossinline }, + Flag.ValueParameter.IS_NOINLINE.takeIf { isNoinline } + ) + +internal fun CirClass.classFlags(isExpect: Boolean): Flags = + flagsOfNotNull( + hasAnnotationsFlag, + visibilityFlag, + modalityFlag, + classKindFlag, + Flag.Class.IS_COMPANION_OBJECT.takeIf { isCompanion }, + Flag.Class.IS_INNER.takeIf { isInner }, + Flag.Class.IS_DATA.takeIf { isData }, + Flag.Class.IS_EXTERNAL.takeIf { isExternal }, + Flag.Class.IS_EXPECT.takeIf { isExpect }, + Flag.Class.IS_INLINE.takeIf { isInline }, + //Flag.Class.IS_FUN.takeIf { false } + ) + +internal fun CirTypeAlias.typeAliasFlags(): Flags = + flagsOfNotNull( + hasAnnotationsFlag, + visibilityFlag + ) + +private inline val CirHasAnnotations.hasAnnotationsFlag: Flag? + get() = if (annotations.isNotEmpty()) Flag.Common.HAS_ANNOTATIONS else null + +// Since 1.4.30 a special @JvmInline annotation is generated to distinguish JVM-inline from value classes. +// This has an effect on class serialization: Every class with isInline == true automatically gets HAS_ANNOTATIONS flag. +private inline val CirClass.hasAnnotationsFlag: Flag? + get() = if (annotations.isNotEmpty() || isInline) Flag.Common.HAS_ANNOTATIONS else null + +private inline val CirProperty.hasAnnotationsFlag: Flag? + get() = if (annotations.isNotEmpty() || !backingFieldAnnotations.isNullOrEmpty() || !delegateFieldAnnotations.isNullOrEmpty()) + Flag.Common.HAS_ANNOTATIONS + else + null + +private inline val CirHasVisibility.visibilityFlag: Flag + get() = when (visibility) { + DescriptorVisibilities.PUBLIC -> Flag.Common.IS_PUBLIC + DescriptorVisibilities.PROTECTED -> Flag.Common.IS_PROTECTED + DescriptorVisibilities.INTERNAL -> Flag.Common.IS_INTERNAL + DescriptorVisibilities.PRIVATE -> Flag.Common.IS_PRIVATE + else -> error("Unexpected visibility: $this") + } + +private inline val CirHasModality.modalityFlag: Flag + get() = when (modality) { + Modality.FINAL -> Flag.Common.IS_FINAL + Modality.ABSTRACT -> Flag.Common.IS_ABSTRACT + Modality.OPEN -> Flag.Common.IS_OPEN + Modality.SEALED -> Flag.Common.IS_SEALED + } + +private inline val CirFunction.memberKindFlag: Flag + get() = when (kind) { + CallableMemberDescriptor.Kind.DECLARATION -> Flag.Function.IS_DECLARATION + CallableMemberDescriptor.Kind.FAKE_OVERRIDE -> Flag.Function.IS_FAKE_OVERRIDE + CallableMemberDescriptor.Kind.DELEGATION -> Flag.Function.IS_DELEGATION + CallableMemberDescriptor.Kind.SYNTHESIZED -> Flag.Function.IS_SYNTHESIZED + } + +private inline val CirProperty.memberKindFlag: Flag + get() = when (kind) { + CallableMemberDescriptor.Kind.DECLARATION -> Flag.Property.IS_DECLARATION + CallableMemberDescriptor.Kind.FAKE_OVERRIDE -> Flag.Property.IS_FAKE_OVERRIDE + CallableMemberDescriptor.Kind.DELEGATION -> Flag.Property.IS_DELEGATION + CallableMemberDescriptor.Kind.SYNTHESIZED -> Flag.Property.IS_SYNTHESIZED + } + +private inline val CirClass.classKindFlag: Flag + get() = when (kind) { + ClassKind.CLASS -> Flag.Class.IS_CLASS + ClassKind.INTERFACE -> Flag.Class.IS_INTERFACE + ClassKind.ENUM_CLASS -> Flag.Class.IS_ENUM_CLASS + ClassKind.ENUM_ENTRY -> Flag.Class.IS_ENUM_ENTRY + ClassKind.ANNOTATION_CLASS -> Flag.Class.IS_ANNOTATION_CLASS + ClassKind.OBJECT -> Flag.Class.IS_OBJECT + } + +private inline val CirFunctionModifiers.modifiersFlags: Flags + get() = flagsOfNotNull( + Flag.Function.IS_OPERATOR.takeIf { isOperator }, + Flag.Function.IS_INFIX.takeIf { isInfix }, + Flag.Function.IS_INLINE.takeIf { isInline }, + Flag.Function.IS_TAILREC.takeIf { isTailrec }, + Flag.Function.IS_SUSPEND.takeIf { isSuspend }, + Flag.Function.IS_EXTERNAL.takeIf { isExternal } + ) + +private inline val CirProperty.modifiersFlags: Flags + get() = flagsOfNotNull( + Flag.Property.IS_VAR.takeIf { isVar }, + Flag.Property.IS_CONST.takeIf { isConst }, + Flag.Property.HAS_CONSTANT.takeIf { compileTimeInitializer.takeIf { it !is NullValue } != null }, + Flag.Property.IS_LATEINIT.takeIf { isLateInit }, + Flag.Property.IS_EXTERNAL.takeIf { isExternal } + ) + +private inline val CirType.nullableFlag: Flag? + get() { + val isNullable = when (this) { + is CirSimpleType -> isMarkedNullable + is CirFlexibleType -> lowerBound.isMarkedNullable + } + + return if (isNullable) Flag.Type.IS_NULLABLE else null + } + +private fun flagsOfNotNull(vararg flags: Flag?): Flags = flagsOf(*listOfNotNull(*flags).toTypedArray()) diff --git a/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/metadata/metadataBuilder.kt b/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/metadata/metadataBuilder.kt new file mode 100644 index 00000000000..443ca93498b --- /dev/null +++ b/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/metadata/metadataBuilder.kt @@ -0,0 +1,449 @@ +/* + * Copyright 2010-2020 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. + */ + +package org.jetbrains.kotlin.descriptors.commonizer.metadata + +import kotlinx.metadata.* +import kotlinx.metadata.klib.KlibModuleMetadata +import org.jetbrains.kotlin.descriptors.commonizer.CommonizerTarget +import org.jetbrains.kotlin.descriptors.commonizer.cir.* +import org.jetbrains.kotlin.descriptors.commonizer.mergedtree.* +import org.jetbrains.kotlin.descriptors.commonizer.mergedtree.CirNode.Companion.indexOfCommon +import org.jetbrains.kotlin.descriptors.commonizer.stats.DeclarationType +import org.jetbrains.kotlin.descriptors.commonizer.stats.StatsCollector +import org.jetbrains.kotlin.descriptors.commonizer.stats.StatsCollector.StatsKey +import org.jetbrains.kotlin.descriptors.commonizer.utils.DEFAULT_CONSTRUCTOR_NAME +import org.jetbrains.kotlin.descriptors.commonizer.utils.strip +import org.jetbrains.kotlin.name.ClassId +import org.jetbrains.kotlin.name.FqName +import org.jetbrains.kotlin.name.Name +import org.jetbrains.kotlin.utils.addToStdlib.cast +import org.jetbrains.kotlin.descriptors.commonizer.utils.firstNonNull +import org.jetbrains.kotlin.descriptors.commonizer.metadata.MetadataBuildingVisitorContext.Path + +internal object MetadataBuilder { + fun build( + node: CirRootNode, + targetIndex: Int, + statsCollector: StatsCollector?, + moduleConsumer: (KlibModuleMetadata) -> Unit + ) { + node.accept( + MetadataBuildingVisitor(statsCollector, moduleConsumer), + MetadataBuildingVisitorContext.rootContext(node, targetIndex) + ) + } +} + +@Suppress("PARAMETER_NAME_CHANGED_ON_OVERRIDE") +private class MetadataBuildingVisitor( + private val statsCollector: StatsCollector?, + private val moduleConsumer: (KlibModuleMetadata) -> Unit +) : CirNodeVisitor { + private val classConsumer = ClassConsumer() + + override fun visitRootNode( + node: CirRootNode, + rootContext: MetadataBuildingVisitorContext + ) { + node.modules.forEach { (moduleName, moduleNode) -> + val moduleContext = rootContext.moduleContext(moduleName) + val module: KlibModuleMetadata = moduleNode.accept(this, moduleContext)?.cast() ?: return@forEach + statsCollector?.logModule(moduleContext) + moduleConsumer(module) + } + + System.gc() + } + + override fun visitModuleNode( + node: CirModuleNode, + moduleContext: MetadataBuildingVisitorContext + ): KlibModuleMetadata? { + val cirModule = moduleContext.get(node) ?: return null + + val fragments: MutableCollection = mutableListOf() + node.packages.mapNotNullTo(fragments) { (packageFqName, packageNode) -> + val packageContext = moduleContext.packageContext(packageFqName) + packageNode.accept(this, packageContext)?.cast() + } + + addEmptyFragments(fragments) + + return cirModule.buildModule(fragments) + } + + override fun visitPackageNode( + node: CirPackageNode, + packageContext: MetadataBuildingVisitorContext + ): KmModuleFragment? { + val cirPackage = packageContext.get(node) ?: return null + + try { + node.classes.forEach { (className, classNode) -> + val classContext = packageContext.classifierContext(className) + val clazz: KmClass = classNode.accept(this, classContext)?.cast() ?: return@forEach + classConsumer.consume(clazz) + statsCollector?.logClass(clazz, classContext) + } + + val topLevelTypeAliases = mutableListOf() + node.typeAliases.forEach { (typeAliasName, typeAliasNode) -> + val typeAliasContext = packageContext.classifierContext(typeAliasName) + when (val classifier = typeAliasNode.accept(this, typeAliasContext)) { + null -> Unit + is KmClass -> { + classConsumer.consume(classifier) + statsCollector?.logClass(classifier, typeAliasContext) + } + is KmTypeAlias -> { + topLevelTypeAliases += classifier + statsCollector?.logTypeAlias(typeAliasContext) + } + else -> error("Unexpected classifier: ${classifier::class.java}, $classifier") + } + } + + linkSealedClassesWithSubclasses(cirPackage.fqName, classConsumer) + + val topLevelFunctions: Collection = node.functions.mapNotNull { (functionKey, functionNode) -> + val functionContext = packageContext.callableMemberContext(functionKey.name) + val function: KmFunction = functionNode.accept(this, functionContext)?.cast() ?: return@mapNotNull null + statsCollector?.logFunction(function, functionContext, functionKey) + function + } + + val topLevelProperties: Collection = node.properties.mapNotNull { (propertyKey, propertyNode) -> + val propertyContext = packageContext.callableMemberContext(propertyKey.name) + val property: KmProperty = propertyNode.accept(this, propertyContext)?.cast() ?: return@mapNotNull null + statsCollector?.logProperty(propertyContext, propertyKey, propertyNode) + property + } + + return cirPackage.buildModuleFragment(classConsumer.allClasses, topLevelTypeAliases, topLevelFunctions, topLevelProperties) + } finally { + // Important: clean-up class consumer every time when leaving package + classConsumer.reset() + } + } + + override fun visitPropertyNode( + node: CirPropertyNode, + propertyContext: MetadataBuildingVisitorContext + ): KmProperty? { + return propertyContext.get(node)?.buildProperty(propertyContext) + } + + override fun visitFunctionNode( + node: CirFunctionNode, + functionContext: MetadataBuildingVisitorContext + ): KmFunction? { + return functionContext.get(node)?.buildFunction(functionContext) + } + + override fun visitClassNode( + node: CirClassNode, + classContext: MetadataBuildingVisitorContext + ): KmClass? { + val cirClass = classContext.get(node) ?: return null + val classTypeParametersCount = cirClass.typeParameters.size + val fullClassName = classContext.currentPath.toString() + + val directNestedClasses: Collection = node.classes.mapNotNull { (nestedClassName, nestedClassNode) -> + val nestedClassContext = classContext.classifierContext(nestedClassName, classTypeParametersCount) + val nestedClass: KmClass = nestedClassNode.accept(this, nestedClassContext)?.cast() ?: return@mapNotNull null + classConsumer.consume(nestedClass) + statsCollector?.logClass(nestedClass, nestedClassContext) + nestedClass + } + + val nestedConstructors: Collection = node.constructors.mapNotNull { (constructorKey, constructorNode) -> + val constructorContext = classContext.callableMemberContext(DEFAULT_CONSTRUCTOR_NAME, classTypeParametersCount) + val constructor: KmConstructor = constructorNode.accept(this, constructorContext)?.cast() ?: return@mapNotNull null + statsCollector?.logClassConstructor(constructor, constructorContext, constructorKey) + constructor + } + + val nestedFunctions: Collection = node.functions.mapNotNull { (functionKey, functionNode) -> + val functionContext = classContext.callableMemberContext(functionKey.name, classTypeParametersCount) + val function: KmFunction = functionNode.accept(this, functionContext)?.cast() ?: return@mapNotNull null + statsCollector?.logFunction(function, functionContext, functionKey) + function + } + + val nestedProperties: Collection = node.properties.mapNotNull { (propertyKey, propertyNode) -> + val propertyContext = classContext.callableMemberContext(propertyKey.name, classTypeParametersCount) + val property: KmProperty = propertyNode.accept(this, propertyContext)?.cast() ?: return@mapNotNull null + statsCollector?.logProperty(propertyContext, propertyKey, propertyNode) + property + } + + return cirClass.buildClass(classContext, fullClassName, directNestedClasses, nestedConstructors, nestedFunctions, nestedProperties) + } + + override fun visitClassConstructorNode( + node: CirClassConstructorNode, + constructorContext: MetadataBuildingVisitorContext + ): KmConstructor? { + return constructorContext.get(node)?.buildClassConstructor(constructorContext) + } + + override fun visitTypeAliasNode( + node: CirTypeAliasNode, + typeAliasContext: MetadataBuildingVisitorContext + ): Any? { + val cirClassifier = typeAliasContext.get(node) ?: return null + + return when (cirClassifier) { + is CirTypeAlias -> cirClassifier.buildTypeAlias(typeAliasContext) + is CirClass -> { + val fullClassName = typeAliasContext.currentPath.toString() + cirClassifier.buildClass(typeAliasContext, fullClassName, emptyList(), emptyList(), emptyList(), emptyList()) + } + else -> error("Unexpected CIR classifier: ${cirClassifier::class.java}, $cirClassifier") + } + } + + companion object { + private fun StatsCollector.logModule( + moduleContext: MetadataBuildingVisitorContext + ) = logDeclaration(moduleContext.targetIndex) { + StatsKey(moduleContext.currentPath.toString(), DeclarationType.MODULE) + } + + private fun StatsCollector.logClass( + clazz: KmClass, + classContext: MetadataBuildingVisitorContext + ) = logDeclaration(classContext.targetIndex) { + val declarationType = when { + Flag.Class.IS_ENUM_CLASS(clazz.flags) -> DeclarationType.ENUM_CLASS + Flag.Class.IS_ENUM_ENTRY(clazz.flags) -> DeclarationType.ENUM_ENTRY + Flag.Class.IS_INTERFACE(clazz.flags) -> when { + (classContext.currentPath as Path.Classifier).classifierId.isNestedClass -> DeclarationType.NESTED_INTERFACE + else -> DeclarationType.TOP_LEVEL_INTERFACE + } + else -> when { + Flag.Class.IS_COMPANION_OBJECT(clazz.flags) -> DeclarationType.COMPANION_OBJECT + (classContext.currentPath as Path.Classifier).classifierId.isNestedClass -> DeclarationType.NESTED_CLASS + else -> DeclarationType.TOP_LEVEL_CLASS + } + } + + StatsKey(classContext.currentPath.toString(), declarationType) + } + + private fun StatsCollector.logTypeAlias( + typeAliasContext: MetadataBuildingVisitorContext + ) = logDeclaration(typeAliasContext.targetIndex) { + StatsKey(typeAliasContext.currentPath.toString(), DeclarationType.TYPE_ALIAS) + } + + private fun StatsCollector.logProperty( + propertyContext: MetadataBuildingVisitorContext, + propertyKey: PropertyApproximationKey, + propertyNode: CirPropertyNode + ) = logDeclaration(propertyContext.targetIndex) { + val declarationType = when { + (propertyContext.currentPath as Path.CallableMember).memberId.isNestedClass -> DeclarationType.NESTED_VAL + propertyNode.targetDeclarations.firstNonNull().isConst -> DeclarationType.TOP_LEVEL_CONST_VAL + else -> DeclarationType.TOP_LEVEL_VAL + } + + StatsKey( + id = propertyContext.currentPath.toString(), + extensionReceiver = propertyKey.extensionReceiverParameterType, + parameterNames = emptyList(), + parameterTypes = emptyList(), + declarationType = declarationType + ) + } + + private fun StatsCollector.logFunction( + function: KmFunction, + functionContext: MetadataBuildingVisitorContext, + functionKey: FunctionApproximationKey + ) = logDeclaration(functionContext.targetIndex) { + val declarationType = when { + (functionContext.currentPath as Path.CallableMember).memberId.isNestedClass -> DeclarationType.NESTED_FUN + else -> DeclarationType.TOP_LEVEL_FUN + } + + StatsKey( + id = functionContext.currentPath.toString(), + extensionReceiver = functionKey.extensionReceiverParameterType, + parameterNames = function.valueParameters.map { it.name }, + parameterTypes = functionKey.valueParametersTypes.asList(), + declarationType = declarationType + ) + } + + private fun StatsCollector.logClassConstructor( + constructor: KmConstructor, + constructorContext: MetadataBuildingVisitorContext, + constructorKey: ConstructorApproximationKey + ) = logDeclaration(constructorContext.targetIndex) { + StatsKey( + id = constructorContext.currentPath.toString(), + extensionReceiver = null, + parameterNames = constructor.valueParameters.map { it.name }, + parameterTypes = constructorKey.valueParametersTypes.asList(), + declarationType = DeclarationType.CLASS_CONSTRUCTOR + ) + } + } +} + +internal data class MetadataBuildingVisitorContext( + val targetIndex: Int, + val target: CommonizerTarget, + val isCommon: Boolean, + val typeParameterIndexOffset: Int, + val currentPath: Path +) { + sealed class Path { + object Empty : Path() { + override fun toString() = "" + } + + @Suppress("MemberVisibilityCanBePrivate") + class Module(val moduleName: Name) : Path() { + override fun toString() = moduleName.strip() + } + + class Package(val packageFqName: FqName) : Path() { + fun nestedClassifier(classifierName: Name) = Classifier(ClassId(packageFqName, classifierName)) + fun nestedCallableMember(memberName: Name) = CallableMember(ClassId(packageFqName, memberName)) + + override fun toString() = packageFqName.asString() + } + + class Classifier(val classifierId: ClassId) : Path() { + fun nestedClassifier(classifierName: Name) = Classifier(classifierId.createNestedClassId(classifierName)) + fun nestedCallableMember(memberName: Name) = CallableMember(classifierId.createNestedClassId(memberName)) + + override fun toString() = classifierId.asString() + } + + class CallableMember(val memberId: ClassId) : Path() { + override fun toString() = memberId.asString() + } + } + + fun moduleContext(moduleName: Name): MetadataBuildingVisitorContext { + check(moduleName.isSpecial) + check(currentPath is Path.Empty) + + return MetadataBuildingVisitorContext( + targetIndex = targetIndex, + target = target, + isCommon = isCommon, + typeParameterIndexOffset = 0, + currentPath = Path.Module(moduleName) + ) + } + + fun packageContext(packageFqName: FqName): MetadataBuildingVisitorContext { + check(currentPath is Path.Module) + + return MetadataBuildingVisitorContext( + targetIndex = targetIndex, + target = target, + isCommon = isCommon, + typeParameterIndexOffset = 0, + currentPath = Path.Package(packageFqName) + ) + } + + fun classifierContext( + classifierName: Name, + outerClassTypeParametersCount: Int = 0 + ): MetadataBuildingVisitorContext { + val newPath = when (currentPath) { + is Path.Package -> { + check(outerClassTypeParametersCount == 0) + currentPath.nestedClassifier(classifierName) + } + is Path.Classifier -> { + check(outerClassTypeParametersCount >= 0) + currentPath.nestedClassifier(classifierName) + } + else -> error("Illegal state") + } + + return MetadataBuildingVisitorContext( + targetIndex = targetIndex, + target = target, + isCommon = isCommon, + typeParameterIndexOffset = typeParameterIndexOffset + outerClassTypeParametersCount, + currentPath = newPath + ) + } + + fun callableMemberContext( + memberName: Name, + ownerClassTypeParametersCount: Int = 0 + ): MetadataBuildingVisitorContext { + val newPath = when (currentPath) { + is Path.Package -> { + check(ownerClassTypeParametersCount == 0) + currentPath.nestedCallableMember(memberName) + } + is Path.Classifier -> { + check(ownerClassTypeParametersCount >= 0) + currentPath.nestedCallableMember(memberName) + } + else -> error("Illegal state") + } + + return MetadataBuildingVisitorContext( + targetIndex = targetIndex, + target = target, + isCommon = isCommon, + typeParameterIndexOffset = typeParameterIndexOffset + ownerClassTypeParametersCount, + currentPath = newPath + ) + } + + inline fun get(node: CirNode<*, *>): T? { + return (if (isCommon) node.commonDeclaration() else node.targetDeclarations[targetIndex]) as T? + } + + inline fun get(node: CirNodeWithLiftingUp<*, *>): T? { + return when { + isCommon -> node.commonDeclaration() as T? + node.isLiftedUp -> null + else -> node.targetDeclarations[targetIndex] as T? + } + } + + companion object { + fun rootContext(rootNode: CirRootNode, targetIndex: Int): MetadataBuildingVisitorContext = + MetadataBuildingVisitorContext( + targetIndex = targetIndex, + target = rootNode.getTarget(targetIndex), + isCommon = rootNode.indexOfCommon == targetIndex, + typeParameterIndexOffset = 0, + currentPath = Path.Empty + ) + } +} + +internal class ClassConsumer { + private val _allClasses = mutableListOf() + private val _sealedClasses = mutableListOf() + + val allClasses: Collection get() = _allClasses + val sealedClasses: Collection get() = _sealedClasses + + fun consume(clazz: KmClass) { + _allClasses += clazz + if (Flag.Common.IS_SEALED(clazz.flags)) _sealedClasses += clazz + } + + fun reset() { + _allClasses.clear() + _sealedClasses.clear() + } +} diff --git a/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/metadata/utils/KotlinMetadataLibraryProvider.kt b/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/metadata/utils/KotlinMetadataLibraryProvider.kt new file mode 100644 index 00000000000..7bc2dcad001 --- /dev/null +++ b/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/metadata/utils/KotlinMetadataLibraryProvider.kt @@ -0,0 +1,37 @@ +/* + * Copyright 2010-2021 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. + */ + +package org.jetbrains.kotlin.descriptors.commonizer.metadata.utils + +import kotlinx.metadata.klib.KlibModuleMetadata +import org.jetbrains.kotlin.library.MetadataLibrary +import org.jetbrains.kotlin.library.ToolingSingleFileKlibResolveStrategy +import org.jetbrains.kotlin.library.resolveSingleFileKlib +import java.io.File +import org.jetbrains.kotlin.konan.file.File as KFile + +/** + * Provides access to metadata using default compiler's routine. + */ +// TODO: extract to a separate module (kotlin-native-utils-metadata?) to share with C-interop tool? +class KotlinMetadataLibraryProvider(private val library: MetadataLibrary) : KlibModuleMetadata.MetadataLibraryProvider { + override val moduleHeaderData: ByteArray + get() = library.moduleHeaderData + + override fun packageMetadata(fqName: String, partName: String): ByteArray = + library.packageMetadata(fqName, partName) + + override fun packageMetadataParts(fqName: String): Set = + library.packageMetadataParts(fqName) + + companion object { + fun readLibraryMetadata(libraryPath: File): KlibModuleMetadata { + check(libraryPath.exists()) { "Library does not exist: $libraryPath" } + + val library = resolveSingleFileKlib(KFile(libraryPath.absolutePath), strategy = ToolingSingleFileKlibResolveStrategy) + return KlibModuleMetadata.read(KotlinMetadataLibraryProvider(library)) + } + } +} diff --git a/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/metadata/utils/MetadataDeclarationsComparator.kt b/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/metadata/utils/MetadataDeclarationsComparator.kt new file mode 100644 index 00000000000..b073ecb2d76 --- /dev/null +++ b/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/metadata/utils/MetadataDeclarationsComparator.kt @@ -0,0 +1,905 @@ +/* + * Copyright 2010-2020 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. + */ + +package org.jetbrains.kotlin.descriptors.commonizer.metadata.utils + +import kotlinx.metadata.* +import kotlinx.metadata.klib.* +import org.jetbrains.kotlin.descriptors.commonizer.utils.KNI_BRIDGE_FUNCTION_PREFIX +import java.util.* +import kotlin.reflect.KProperty0 + +/** + * Compares two metadata modules ([KlibModuleMetadata]). Returns [Result], which may hold a list + * of found [Mismatch]s. + * + * The entry point is [MetadataDeclarationsComparator.Companion.compareModules] function. + */ +// TODO: extract to kotlinx-metadata-klib library? +class MetadataDeclarationsComparator private constructor(private val config: Config) { + + interface Config { + val rootPathElement: String + get() = "" + + /** + * Certain auxiliary metadata entities may be intentionally excluded from comparison. + * Ex: Kotlin/Native interface bridge functions. + */ + fun shouldCheckDeclaration(declaration: Any): Boolean = + when (declaration) { + is KmFunction -> !declaration.name.startsWith(KNI_BRIDGE_FUNCTION_PREFIX) + else -> true + } + + companion object Default : Config + } + + sealed class Result { + object Success : Result() { + override fun toString() = "Success" + } + + class Failure(val mismatches: Collection) : Result() { + init { + check(mismatches.isNotEmpty()) + } + + override fun toString() = "Failure (${mismatches.size} mismatches)" + } + } + + sealed class Mismatch { + abstract val kind: String + abstract val name: String + abstract val path: List + + // an entity has different non-nullable values + data class DifferentValues( + override val kind: String, + override val name: String, + override val path: List, + val valueA: Any, + val valueB: Any + ) : Mismatch() + + // an entity is missing at one side and present at another side, + // or: an entity has nullable value at one side and non-nullable value at another side + data class MissingEntity( + override val kind: String, + override val name: String, + override val path: List, + val existentValue: Any, + val missingInA: Boolean + ) : Mismatch() { + val missingInB: Boolean + get() = !missingInA + } + } + + private val mismatches = mutableListOf() + + private class Context(pathElement: String, parent: Context? = null) { + val path: List = parent?.path.orEmpty() + pathElement + fun next(pathElement: String): Context = Context(pathElement, this) + } + + private fun toResult() = if (mismatches.isEmpty()) Result.Success else Result.Failure(mismatches) + + private fun compareModules( + metadataA: KlibModuleMetadata, + metadataB: KlibModuleMetadata + ): Result { + val rootContext = Context(config.rootPathElement) + + compareValues(rootContext, metadataA.name, metadataB.name, "ModuleName") + if (mismatches.isNotEmpty()) + return toResult() + + val moduleContext = rootContext.next("Module ${metadataA.name}") + + compareAnnotationLists(moduleContext, metadataA.annotations, metadataB.annotations) + compareModuleFragmentLists(moduleContext, metadataA.fragments, metadataB.fragments) + + return toResult() + } + + private fun compareAnnotationLists( + containerContext: Context, + annotationListA: List, + annotationListB: List, + annotationKind: String = "Annotation" + ) { + compareRepetitiveEntityLists( + entityListA = annotationListA, + entityListB = annotationListB, + groupingKeySelector = { _, annotation -> annotation.className }, + groupedEntityListsComparator = { annotationClassName: ClassName, annotationsA: List, annotationsB: List -> + @Suppress("NAME_SHADOWING") val annotationsB: Deque = LinkedList(annotationsB) + + // TODO: compare annotation arguments? + + for (annotationA in annotationsA) { + val removed = annotationsB.removeFirstOccurrence(annotationA) + if (!removed) + mismatches += Mismatch.MissingEntity(annotationKind, annotationClassName, containerContext.path, annotationA, false) + } + + for (annotationB in annotationsB) { + mismatches += Mismatch.MissingEntity(annotationKind, annotationClassName, containerContext.path, annotationB, true) + } + } + ) + } + + private fun compareModuleFragmentLists( + moduleContext: Context, + fragmentListA: List, + fragmentListB: List + ) { + compareRepetitiveEntityLists( + entityListA = fragmentListA, + entityListB = fragmentListB, + groupingKeySelector = { _, fragment -> fragment.fqName.orEmpty() }, + groupedEntityListsComparator = { packageFqName: String, fragmentsA: List, fragmentsB: List -> + val packageContext = moduleContext.next("Package ${packageFqName.ifEmpty { "" }}") + + val classesA: List = fragmentsA.flatMap { it.classes } + val classesB: List = fragmentsB.flatMap { it.classes } + compareClassLists(packageContext, classesA, classesB) + + val typeAliasesA: List = fragmentsA.flatMap { it.pkg?.typeAliases.orEmpty() } + val typeAliasesB: List = fragmentsB.flatMap { it.pkg?.typeAliases.orEmpty() } + compareTypeAliasLists(packageContext, typeAliasesA, typeAliasesB) + + val propertiesA: List = fragmentsA.flatMap { it.pkg?.properties.orEmpty() } + val propertiesB: List = fragmentsB.flatMap { it.pkg?.properties.orEmpty() } + comparePropertyLists(packageContext, propertiesA, propertiesB) + + val functionsA: List = fragmentsA.flatMap { it.pkg?.functions.orEmpty() } + val functionsB: List = fragmentsB.flatMap { it.pkg?.functions.orEmpty() } + compareFunctionLists(packageContext, functionsA, functionsB) + } + ) + } + + private fun compareClassLists( + containerContext: Context, + classListA: List, + classListB: List + ) { + compareUniqueEntityLists( + containerContext = containerContext, + entityListA = classListA, + entityListB = classListB, + entityKind = "Class", + groupingKeySelector = { _, clazz -> clazz.name }, + entitiesComparator = ::compareClasses + ) + } + + private fun compareTypeAliasLists( + containerContext: Context, + typeAliasListA: List, + typeAliasListB: List + ) { + compareUniqueEntityLists( + containerContext = containerContext, + entityListA = typeAliasListA, + entityListB = typeAliasListB, + entityKind = "TypeAlias", + groupingKeySelector = { _, typeAlias -> typeAlias.name }, + entitiesComparator = ::compareTypeAliases + ) + } + + private fun comparePropertyLists( + containerContext: Context, + propertyListA: List, + propertyListB: List + ) { + compareUniqueEntityLists( + containerContext = containerContext, + entityListA = propertyListA, + entityListB = propertyListB, + entityKind = "Property", + groupingKeySelector = { _, property -> property.name }, + entitiesComparator = ::compareProperties + ) + } + + private fun compareFunctionLists( + containerContext: Context, + functionListA: List, + functionListB: List + ) { + compareUniqueEntityLists( + containerContext = containerContext, + entityListA = functionListA, + entityListB = functionListB, + entityKind = "Function", + groupingKeySelector = { _, function -> function.mangle() }, + entitiesComparator = ::compareFunctions + ) + } + + private fun compareConstructorLists( + containerContext: Context, + constructorListA: List, + constructorListB: List + ) { + compareUniqueEntityLists( + containerContext = containerContext, + entityListA = constructorListA, + entityListB = constructorListB, + entityKind = "Constructor", + groupingKeySelector = { _, constructor -> constructor.mangle() }, + entitiesComparator = ::compareConstructors + ) + } + + private fun compareValueParameterLists( + containerContext: Context, + valueParameterListA: List, + valueParameterListB: List + ) { + compareUniqueEntityLists( + containerContext = containerContext, + entityListA = valueParameterListA, + entityListB = valueParameterListB, + entityKind = "ValueParameter", + groupingKeySelector = { index, _ -> index.toString() }, + entitiesComparator = ::compareValueParameters + ) + } + + private fun compareTypeLists( + containerContext: Context, + typeListA: List, + typeListB: List, + typeKind: String + ) { + compareUniqueEntityLists( + containerContext = containerContext, + entityListA = typeListA, + entityListB = typeListB, + entityKind = typeKind, + groupingKeySelector = { index, _ -> index.toString() }, + entitiesComparator = ::compareTypes + ) + } + + private fun compareTypeParameterLists( + containerContext: Context, + typeParameterListA: List, + typeParameterListB: List + ) { + compareUniqueEntityLists( + containerContext = containerContext, + entityListA = typeParameterListA, + entityListB = typeParameterListB, + entityKind = "TypeParameter", + groupingKeySelector = { index, _ -> index.toString() }, + entitiesComparator = ::compareTypeParameters + ) + } + + private fun compareEffectExpressionLists( + containerContext: Context, + effectExpressionListA: List, + effectExpressionListB: List, + effectExpressionKind: String + ) { + compareUniqueEntityLists( + containerContext = containerContext, + entityListA = effectExpressionListA, + entityListB = effectExpressionListB, + entityKind = effectExpressionKind, + groupingKeySelector = { index, _ -> index.toString() }, + entitiesComparator = ::compareEffectExpressions + ) + } + + private fun compareClasses( + classContext: Context, + classA: KmClass, + classB: KmClass + ) { + compareFlags(classContext, classA.flags, classB.flags, CLASS_FLAGS) + compareAnnotationLists(classContext, classA.annotations, classB.annotations) + + compareTypeParameterLists(classContext, classA.typeParameters, classB.typeParameters) + + compareTypeLists(classContext, classA.supertypes, classB.supertypes, "Supertype") + + compareConstructorLists(classContext, classA.constructors, classB.constructors) + compareTypeAliasLists(classContext, classA.typeAliases, classB.typeAliases) + comparePropertyLists(classContext, classA.properties, classB.properties) + compareFunctionLists(classContext, classA.functions, classB.functions) + + compareNullableValues(classContext, classA.companionObject, classB.companionObject, "CompanionObject") + compareValueLists(classContext, classA.nestedClasses, classB.nestedClasses, "NestedClass") + compareValueLists(classContext, classA.sealedSubclasses, classB.sealedSubclasses, "SealedSubclass") + compareValueLists(classContext, classA.enumEntries, classB.enumEntries, "EnumEntry") + + compareUniqueEntityLists( + containerContext = classContext, + entityListA = classA.klibEnumEntries, + entityListB = classB.klibEnumEntries, + entityKind = "KlibEnumEntry", + groupingKeySelector = { _, enumEntry -> enumEntry.name } + ) { klibEnumEntryContext, entryA, entryB -> + compareAnnotationLists(klibEnumEntryContext, entryA.annotations, entryB.annotations) + compareNullableValues(klibEnumEntryContext, entryA.ordinal, entryB.ordinal, "Ordinal") + } + } + + private fun compareTypeAliases( + typeAliasContext: Context, + typeAliasA: KmTypeAlias, + typeAliasB: KmTypeAlias + ) { + compareFlags(typeAliasContext, typeAliasA.flags, typeAliasB.flags, TYPE_ALIAS_FLAGS) + compareAnnotationLists(typeAliasContext, typeAliasA.annotations, typeAliasB.annotations) + + compareTypeParameterLists(typeAliasContext, typeAliasA.typeParameters, typeAliasB.typeParameters) + + compareEntities( + containerContext = typeAliasContext, + entityA = typeAliasA.underlyingType, + entityB = typeAliasB.underlyingType, + entityKind = "UnderlyingType", + entitiesComparator = ::compareTypes + ) + compareEntities( + containerContext = typeAliasContext, + entityA = typeAliasA.expandedType, + entityB = typeAliasB.expandedType, + entityKind = "ExpandedType", + entitiesComparator = ::compareTypes + ) + } + + @Suppress("DuplicatedCode") + private fun compareProperties( + propertyContext: Context, + propertyA: KmProperty, + propertyB: KmProperty + ) { + compareFlags(propertyContext, propertyA.flags, propertyB.flags, PROPERTY_FLAGS) + compareFlags(propertyContext, propertyA.getterFlags, propertyB.getterFlags, PROPERTY_ACCESSOR_FLAGS, "GetterFlag") + compareFlags(propertyContext, propertyA.setterFlags, propertyB.setterFlags, PROPERTY_ACCESSOR_FLAGS, "SetterFlag") + + compareAnnotationLists(propertyContext, propertyA.annotations, propertyB.annotations) + compareAnnotationLists(propertyContext, propertyA.getterAnnotations, propertyB.getterAnnotations, "GetterAnnotation") + compareAnnotationLists(propertyContext, propertyA.setterAnnotations, propertyB.setterAnnotations, "SetterAnnotation") + + compareTypeParameterLists(propertyContext, propertyA.typeParameters, propertyB.typeParameters) + + compareNullableEntities( + containerContext = propertyContext, + entityA = propertyA.receiverParameterType, + entityB = propertyB.receiverParameterType, + entityKind = "ReceiverParameterType", + entitiesComparator = ::compareTypes + ) + compareEntities( + containerContext = propertyContext, + entityA = propertyA.returnType, + entityB = propertyB.returnType, + entityKind = "ReturnType", + entitiesComparator = ::compareTypes + ) + + compareNullableEntities( + containerContext = propertyContext, + entityA = propertyA.setterParameter, + entityB = propertyB.setterParameter, + entityKind = "SetterValueParameter", + entitiesComparator = ::compareValueParameters + ) + + compareNullableValues(propertyContext, propertyA.compileTimeValue, propertyB.compileTimeValue, "CompileTimeValue") + } + + @Suppress("DuplicatedCode") + private fun compareFunctions( + functionContext: Context, + functionA: KmFunction, + functionB: KmFunction + ) { + compareFlags(functionContext, functionA.flags, functionB.flags, FUNCTION_FLAGS) + compareAnnotationLists(functionContext, functionA.annotations, functionB.annotations) + + compareTypeParameterLists(functionContext, functionA.typeParameters, functionB.typeParameters) + + compareNullableEntities( + containerContext = functionContext, + entityA = functionA.receiverParameterType, + entityB = functionB.receiverParameterType, + entityKind = "ReceiverParameterType", + entitiesComparator = ::compareTypes + ) + compareEntities( + containerContext = functionContext, + entityA = functionA.returnType, + entityB = functionB.returnType, + entityKind = "ReturnType", + entitiesComparator = ::compareTypes + ) + + compareValueParameterLists(functionContext, functionA.valueParameters, functionB.valueParameters) + + compareNullableEntities( + containerContext = functionContext, + entityA = functionA.contract, + entityB = functionB.contract, + entityKind = "Contract" + ) { contractContext, contractA, contractB -> + compareUniqueEntityLists( + containerContext = contractContext, + entityListA = contractA.effects, + entityListB = contractB.effects, + entityKind = "Effect", + groupingKeySelector = { index, _ -> index.toString() } + ) { effectContext, effectA, effectB -> + compareValues(effectContext, effectA.type, effectB.type, "EffectType") + compareNullableValues(effectContext, effectA.invocationKind, effectB.invocationKind, "EffectInvocationKind") + + compareEffectExpressionLists( + containerContext = effectContext, + effectExpressionListA = effectA.constructorArguments, + effectExpressionListB = effectB.constructorArguments, + effectExpressionKind = "ConstructorArguments" + ) + compareNullableEntities( + containerContext = effectContext, + entityA = effectA.conclusion, + entityB = effectB.conclusion, + entityKind = "Conclusion", + entitiesComparator = ::compareEffectExpressions + ) + } + } + } + + private fun compareConstructors( + constructorContext: Context, + constructorA: KmConstructor, + constructorB: KmConstructor + ) { + compareFlags(constructorContext, constructorA.flags, constructorB.flags, CONSTRUCTOR_FLAGS) + compareAnnotationLists(constructorContext, constructorA.annotations, constructorB.annotations) + + compareValueParameterLists(constructorContext, constructorA.valueParameters, constructorB.valueParameters) + } + + private fun compareValueParameters( + valueParameterContext: Context, + valueParameterA: KmValueParameter, + valueParameterB: KmValueParameter + ) { + compareFlags(valueParameterContext, valueParameterA.flags, valueParameterB.flags, VALUE_PARAMETER_FLAGS) + compareAnnotationLists(valueParameterContext, valueParameterA.annotations, valueParameterB.annotations) + + compareNullableEntities( + containerContext = valueParameterContext, + entityA = valueParameterA.type, + entityB = valueParameterB.type, + entityKind = "Type", + entitiesComparator = ::compareTypes + ) + compareNullableEntities( + containerContext = valueParameterContext, + entityA = valueParameterA.varargElementType, + entityB = valueParameterB.varargElementType, + entityKind = "VarargElementType", + entitiesComparator = ::compareTypes + ) + } + + private fun compareTypes( + typeContext: Context, + typeA: KmType, + typeB: KmType + ) { + compareFlags(typeContext, typeA.flags, typeB.flags, TYPE_FLAGS) + compareAnnotationLists(typeContext, typeA.annotations, typeB.annotations) + + compareValues(typeContext, typeA.classifier, typeB.classifier, "Classifier") + + compareUniqueEntityLists( + containerContext = typeContext, + entityListA = typeA.arguments, + entityListB = typeB.arguments, + entityKind = "TypeProjection", + groupingKeySelector = { index, _ -> index.toString() } + ) { typeProjectionContext, typeProjectionA, typeProjectionB -> + compareNullableEntities( + containerContext = typeProjectionContext, + entityA = typeProjectionA.type, + entityB = typeProjectionB.type, + entityKind = "Type", + entitiesComparator = ::compareTypes + ) + compareNullableValues(typeProjectionContext, typeProjectionA.variance, typeProjectionB.variance, "Variance") + } + + compareNullableEntities( + containerContext = typeContext, + entityA = typeA.abbreviatedType, + entityB = typeB.abbreviatedType, + entityKind = "AbbreviatedType", + entitiesComparator = ::compareTypes + ) + compareNullableEntities( + containerContext = typeContext, + entityA = typeA.outerType, + entityB = typeB.outerType, + entityKind = "OuterType", + entitiesComparator = ::compareTypes + ) + + compareNullableEntities( + containerContext = typeContext, + entityA = typeA.flexibleTypeUpperBound, + entityB = typeB.flexibleTypeUpperBound, + entityKind = "FlexibleTypeUpperBounds", + ) { typeUpperBoundContext, upperBoundA, upperBoundB -> + compareEntities( + containerContext = typeUpperBoundContext, + entityA = upperBoundA.type, + entityB = upperBoundB.type, + entityKind = "Type", + entitiesComparator = ::compareTypes + ) + compareNullableValues(typeUpperBoundContext, upperBoundA.typeFlexibilityId, upperBoundB.typeFlexibilityId, "TypeFlexibilityId") + } + } + + private fun compareTypeParameters( + typeParameterContext: Context, + typeParameterA: KmTypeParameter, + typeParameterB: KmTypeParameter + ) { + compareFlags(typeParameterContext, typeParameterA.flags, typeParameterB.flags, TYPE_PARAMETER_FLAGS) + compareAnnotationLists(typeParameterContext, typeParameterA.annotations, typeParameterB.annotations) + + compareValues(typeParameterContext, typeParameterA.id, typeParameterB.id, "Id") + compareValues(typeParameterContext, typeParameterA.name, typeParameterB.name, "Name") + + compareValues(typeParameterContext, typeParameterA.variance, typeParameterB.variance, "Variance") + compareTypeLists(typeParameterContext, typeParameterA.upperBounds, typeParameterB.upperBounds, "UpperBoundType") + } + + private fun compareEffectExpressions( + effectExpressionContext: Context, + effectExpressionA: KmEffectExpression, + effectExpressionB: KmEffectExpression + ) { + compareFlags(effectExpressionContext, effectExpressionA.flags, effectExpressionB.flags, EFFECT_EXPRESSION_FLAGS) + compareNullableValues(effectExpressionContext, effectExpressionA.parameterIndex, effectExpressionB.parameterIndex, "ParameterIndex") + compareNullableValues(effectExpressionContext, effectExpressionA.constantValue, effectExpressionB.constantValue, "ConstantValue") + + compareNullableEntities( + containerContext = effectExpressionContext, + entityA = effectExpressionA.isInstanceType, + entityB = effectExpressionB.isInstanceType, + entityKind = "IsInstanceType", + entitiesComparator = ::compareTypes + ) + + compareEffectExpressionLists( + containerContext = effectExpressionContext, + effectExpressionListA = effectExpressionA.andArguments, + effectExpressionListB = effectExpressionB.andArguments, + effectExpressionKind = "AndArguments" + ) + compareEffectExpressionLists( + containerContext = effectExpressionContext, + effectExpressionListA = effectExpressionA.orArguments, + effectExpressionListB = effectExpressionB.orArguments, + effectExpressionKind = "OrArguments" + ) + } + + private fun compareValues( + containerContext: Context, + valueA: E, + valueB: E, + valueKind: String, + valueName: String? = null + ) { + if (valueA != valueB) + mismatches += Mismatch.DifferentValues(valueKind, valueName.orEmpty(), containerContext.path, valueA, valueB) + } + + private fun compareValueLists( + containerContext: Context, + listA: Collection, + listB: Collection, + valueKind: String + ) { + if (listA.isEmpty() && listB.isEmpty()) + return + + for (missingInA in listB subtract listA) { + mismatches += Mismatch.MissingEntity(valueKind, missingInA.toString(), containerContext.path, missingInA, true) + } + + for (missingInB in listA subtract listB) { + mismatches += Mismatch.MissingEntity(valueKind, missingInB.toString(), containerContext.path, missingInB, false) + } + } + + private fun compareNullableValues( + containerContext: Context, + valueA: E?, + valueB: E?, + valueKind: String + ) { + when { + valueA == null && valueB != null -> { + mismatches += Mismatch.MissingEntity(valueKind, "", containerContext.path, valueB, true) + } + valueA != null && valueB == null -> { + mismatches += Mismatch.MissingEntity(valueKind, "", containerContext.path, valueA, false) + } + valueA != null && valueB != null -> { + compareValues(containerContext, valueA, valueB, valueKind) + } + } + } + + private fun compareEntities( + containerContext: Context, + entityA: E, + entityB: E, + entityKind: String, + entityKey: String? = null, + entitiesComparator: (Context, E, E) -> Unit + ) { + val entityContext = containerContext.next("$entityKind${if (entityKey.isNullOrEmpty()) "" else " $entityKey"}") + entitiesComparator(entityContext, entityA, entityB) + } + + private fun compareNullableEntities( + containerContext: Context, + entityA: E?, + entityB: E?, + entityKind: String, + entityKey: String? = null, + entitiesComparator: (Context, E, E) -> Unit + ) { + when { + entityA == null && entityB != null -> { + mismatches += Mismatch.MissingEntity(entityKind, entityKey.orEmpty(), containerContext.path, entityB, true) + } + entityA != null && entityB == null -> { + mismatches += Mismatch.MissingEntity(entityKind, entityKey.orEmpty(), containerContext.path, entityA, false) + } + entityA != null && entityB != null -> { + compareEntities(containerContext, entityA, entityB, entityKind, entityKey, entitiesComparator) + } + } + } + + private fun compareUniqueEntityLists( + containerContext: Context, + entityListA: List, + entityListB: List, + entityKind: String, + groupingKeySelector: (index: Int, E) -> String, + entitiesComparator: (Context, E, E) -> Unit + ) { + compareRepetitiveEntityLists( + entityListA = entityListA, + entityListB = entityListB, + groupingKeySelector = groupingKeySelector, + groupedEntityListsComparator = { entityKey: String, entitiesA: List, entitiesB: List -> + compareNullableEntities( + containerContext = containerContext, + entityA = entitiesA.singleOrNull(), + entityB = entitiesB.singleOrNull(), + entityKind = entityKind, + entityKey = entityKey, + entitiesComparator = entitiesComparator + ) + } + ) + } + + private fun compareRepetitiveEntityLists( + entityListA: List, + entityListB: List, + groupingKeySelector: (index: Int, E) -> String, + groupedEntityListsComparator: (entityKey: String, List, List) -> Unit + ) { + val filteredEntityListA: List = entityListA.filter(config::shouldCheckDeclaration) + val filteredEntityListB: List = entityListB.filter(config::shouldCheckDeclaration) + + if (filteredEntityListA.isEmpty() && filteredEntityListB.isEmpty()) + return + + val groupedEntitiesA: Map> = + filteredEntityListA.groupByIndexed { index, entity -> groupingKeySelector(index, entity) } + val groupedEntitiesB: Map> = + filteredEntityListB.groupByIndexed { index, entity -> groupingKeySelector(index, entity) } + + val entityKeys = groupedEntitiesA.keys union groupedEntitiesB.keys + + for (entityKey in entityKeys) { + val entitiesA: List = groupedEntitiesA[entityKey].orEmpty() + val entitiesB: List = groupedEntitiesB[entityKey].orEmpty() + + groupedEntityListsComparator(entityKey, entitiesA, entitiesB) + } + } + + private fun compareFlags( + containerContext: Context, + flagsA: Flags, + flagsB: Flags, + flagsToCompare: Array>, + flagKind: String = "Flag" + ) { + for (flag in flagsToCompare) { + val valueA = flag.get()(flagsA) + val valueB = flag.get()(flagsB) + + compareValues(containerContext, valueA, valueB, flagKind, flag.name) + } + } + + companion object { + fun compare( + metadataA: KlibModuleMetadata, + metadataB: KlibModuleMetadata, + config: Config = Config.Default + ): Result = MetadataDeclarationsComparator(config).compareModules(metadataA, metadataB) + + private val VISIBILITY_FLAGS: Array> = arrayOf( + Flag.Common::IS_INTERNAL, + Flag.Common::IS_PRIVATE, + Flag.Common::IS_PROTECTED, + Flag.Common::IS_PUBLIC, + Flag.Common::IS_PRIVATE_TO_THIS, + Flag.Common::IS_LOCAL + ) + + private val MODALITY_FLAGS: Array> = arrayOf( + Flag.Common::IS_FINAL, + Flag.Common::IS_OPEN, + Flag.Common::IS_ABSTRACT, + Flag.Common::IS_SEALED + ) + + private val CLASS_FLAGS: Array> = arrayOf( + Flag.Common::HAS_ANNOTATIONS, + *VISIBILITY_FLAGS, + *MODALITY_FLAGS, + Flag.Class::IS_CLASS, + Flag.Class::IS_INTERFACE, + Flag.Class::IS_ENUM_CLASS, + Flag.Class::IS_ENUM_ENTRY, + Flag.Class::IS_ANNOTATION_CLASS, + Flag.Class::IS_OBJECT, + Flag.Class::IS_COMPANION_OBJECT, + Flag.Class::IS_INNER, + Flag.Class::IS_DATA, + Flag.Class::IS_EXTERNAL, + Flag.Class::IS_EXPECT, + Flag.Class::IS_INLINE, + Flag.Class::IS_FUN + ) + + private val TYPE_ALIAS_FLAGS: Array> = arrayOf( + Flag.Common::HAS_ANNOTATIONS, + *VISIBILITY_FLAGS + ) + + private val CONSTRUCTOR_FLAGS: Array> = arrayOf( + Flag.Common::HAS_ANNOTATIONS, + *VISIBILITY_FLAGS, + Flag.Constructor::IS_SECONDARY, + Flag.Constructor::HAS_NON_STABLE_PARAMETER_NAMES + ) + + private val FUNCTION_FLAGS: Array> = arrayOf( + Flag.Common::HAS_ANNOTATIONS, + *VISIBILITY_FLAGS, + *MODALITY_FLAGS, + Flag.Function::IS_DECLARATION, + Flag.Function::IS_FAKE_OVERRIDE, + Flag.Function::IS_DELEGATION, + Flag.Function::IS_SYNTHESIZED, + Flag.Function::IS_OPERATOR, + Flag.Function::IS_INFIX, + Flag.Function::IS_INLINE, + Flag.Function::IS_TAILREC, + Flag.Function::IS_EXTERNAL, + Flag.Function::IS_SUSPEND, + Flag.Function::IS_EXPECT, + Flag.Function::HAS_NON_STABLE_PARAMETER_NAMES + ) + + private val PROPERTY_FLAGS: Array> = arrayOf( + Flag.Common::HAS_ANNOTATIONS, + *VISIBILITY_FLAGS, + *MODALITY_FLAGS, + Flag.Property::IS_DECLARATION, + Flag.Property::IS_FAKE_OVERRIDE, + Flag.Property::IS_DELEGATION, + Flag.Property::IS_SYNTHESIZED, + Flag.Property::IS_VAR, + Flag.Property::HAS_GETTER, + Flag.Property::HAS_SETTER, + Flag.Property::IS_CONST, + Flag.Property::IS_LATEINIT, + Flag.Property::HAS_CONSTANT, + Flag.Property::IS_EXTERNAL, + Flag.Property::IS_DELEGATED, + Flag.Property::IS_EXPECT + ) + + private val PROPERTY_ACCESSOR_FLAGS: Array> = arrayOf( + Flag.Common::HAS_ANNOTATIONS, + *VISIBILITY_FLAGS, + *MODALITY_FLAGS, + Flag.PropertyAccessor::IS_NOT_DEFAULT, + Flag.PropertyAccessor::IS_EXTERNAL, + Flag.PropertyAccessor::IS_INLINE + ) + + private val TYPE_FLAGS: Array> = arrayOf( + Flag.Type::IS_NULLABLE, + Flag.Type::IS_SUSPEND + ) + + private val TYPE_PARAMETER_FLAGS: Array> = arrayOf( + Flag.TypeParameter::IS_REIFIED + ) + + private val VALUE_PARAMETER_FLAGS: Array> = arrayOf( + Flag.Common::HAS_ANNOTATIONS, + Flag.ValueParameter::DECLARES_DEFAULT_VALUE, + Flag.ValueParameter::IS_CROSSINLINE, + Flag.ValueParameter::IS_NOINLINE + ) + + private val EFFECT_EXPRESSION_FLAGS: Array> = arrayOf( + Flag.EffectExpression::IS_NEGATED, + Flag.EffectExpression::IS_NULL_CHECK_PREDICATE + ) + + /** + * We need a stable order for overloaded functions. + */ + private fun KmFunction.mangle(): String { + return buildString { + receiverParameterType?.classifier?.let(::append) + append('.') + append(name) + append('.') + typeParameters.joinTo(this, prefix = "<", postfix = ">", transform = KmTypeParameter::name) + append('.') + valueParameters.joinTo(this, prefix = "(", postfix = ")", transform = KmValueParameter::name) + } + } + + private fun KmConstructor.mangle(): String { + return valueParameters.joinToString(prefix = "(", postfix = ")", transform = KmValueParameter::name) + } + + private inline fun Iterable.groupByIndexed(keySelector: (Int, T) -> K): Map> { + return mutableMapOf>().apply { + this@groupByIndexed.forEachIndexed { index, element -> + val key = keySelector(index, element) + getOrPut(key) { mutableListOf() } += element + } + } + } + } +} diff --git a/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/metadata/utils/SerializedMetadataLibraryProvider.kt b/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/metadata/utils/SerializedMetadataLibraryProvider.kt new file mode 100644 index 00000000000..7620167fd9e --- /dev/null +++ b/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/metadata/utils/SerializedMetadataLibraryProvider.kt @@ -0,0 +1,55 @@ +/* + * Copyright 2010-2020 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. + */ + +package org.jetbrains.kotlin.descriptors.commonizer.metadata.utils + +import kotlinx.metadata.klib.KlibModuleMetadata +import org.jetbrains.kotlin.library.SerializedMetadata + +private typealias FragmentPartContents = ByteArray +private typealias ListOfFragmentParts = List +private typealias MapOfFragmentParts = Map + +class SerializedMetadataLibraryProvider( + override val moduleHeaderData: ByteArray, + fragments: List, + fragmentNames: List +) : KlibModuleMetadata.MetadataLibraryProvider { + private val fragmentMap: Map + + init { + check(fragments.size == fragmentNames.size) + + fragmentMap = fragmentNames.mapIndexed { fragmentIndex, fragmentName -> + // fragmentName is package FQ name, fragmentShortName is right-most part of package FQ name + val fragmentShortName = fragmentName.substringAfterLast('.') + + val fragmentParts: ListOfFragmentParts = fragments[fragmentIndex] + val digitCount = fragmentParts.size.toString().length + + // N.B. the same fragment part numbering scheme as in org.jetbrains.kotlin.library.impl.MetadataWriterImpl + val fragmentPartMap: MapOfFragmentParts = fragmentParts.mapIndexed { partIndex, part -> + val partName = partIndex.toString().padStart(digitCount, '0') + "_" + fragmentShortName + partName to part + }.toMap() + + fragmentName to fragmentPartMap + }.toMap() + } + + constructor(serializedMetadata: SerializedMetadata) : this( + serializedMetadata.module, + serializedMetadata.fragments, + serializedMetadata.fragmentNames + ) + + override fun packageMetadataParts(fqName: String): Set { + return fragmentMap.getValue(fqName).keys + } + + override fun packageMetadata(fqName: String, partName: String): FragmentPartContents { + return fragmentMap.getValue(fqName).getValue(partName) + } +} diff --git a/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/stats/AggregatedStatsCollector.kt b/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/stats/AggregatedStatsCollector.kt index 241cc876ba4..5c3f1e4b6dc 100644 --- a/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/stats/AggregatedStatsCollector.kt +++ b/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/stats/AggregatedStatsCollector.kt @@ -5,36 +5,34 @@ package org.jetbrains.kotlin.descriptors.commonizer.stats -import org.jetbrains.kotlin.descriptors.DeclarationDescriptor -import org.jetbrains.kotlin.descriptors.commonizer.stats.AggregatedStatsCollector.AggregatedStatsRow import org.jetbrains.kotlin.descriptors.commonizer.stats.RawStatsCollector.CommonDeclarationStatus.* import org.jetbrains.kotlin.konan.target.KonanTarget class AggregatedStatsCollector( - targets: List, - private val output: StatsOutput + targets: List ) : StatsCollector { - private val aggregatingOutput = AggregatingOutput() - private val wrappedCollector = RawStatsCollector(targets, aggregatingOutput) + private val wrappedCollector = RawStatsCollector(targets) - override fun logStats(result: List) { - wrappedCollector.logStats(result) + override fun logDeclaration(targetIndex: Int, lazyStatsKey: () -> StatsCollector.StatsKey) { + wrappedCollector.logDeclaration(targetIndex, lazyStatsKey) } - override fun close() { - output.writeHeader(AggregatedStatsHeader) + override fun writeTo(statsOutput: StatsOutput) { + val aggregatingOutput = AggregatingOutput() + wrappedCollector.writeTo(aggregatingOutput) - aggregatingOutput.aggregatedStats.keys.sortedBy { it }.forEach { key -> - val row = aggregatingOutput.aggregatedStats.getValue(key) - output.writeRow(row) + statsOutput.use { + statsOutput.writeHeader(AggregatedStatsHeader) + + aggregatingOutput.aggregatedStats.keys.sortedBy { it }.forEach { key -> + val row = aggregatingOutput.aggregatedStats.getValue(key) + statsOutput.writeRow(row) + } } - - output.close() - wrappedCollector.close() } object AggregatedStatsHeader : StatsOutput.StatsHeader { - private val headerItems = listOf( + override fun toList(): List = listOf( "Declaration Type", "Lifted Up", "Lifted Up, %%", @@ -46,11 +44,9 @@ class AggregatedStatsCollector( "Failed: Other, %%", "Total" ) - - override fun toList(): List = headerItems } - class AggregatedStatsRow( + private class AggregatedStatsRow( private val declarationType: DeclarationType ) : StatsOutput.StatsRow { var liftedUp: Int = 0 @@ -78,33 +74,32 @@ class AggregatedStatsCollector( } } -} + private class AggregatingOutput : StatsOutput { + val aggregatedStats = HashMap() -@Suppress("MoveVariableDeclarationIntoWhen") -private class AggregatingOutput : StatsOutput { - val aggregatedStats = HashMap() + override fun writeHeader(header: StatsOutput.StatsHeader) { + check(header is RawStatsCollector.RawStatsHeader) + // do nothing + } - override fun writeHeader(header: StatsOutput.StatsHeader) { - check(header is RawStatsCollector.RawStatsHeader) - // do nothing - } + override fun writeRow(row: StatsOutput.StatsRow) { + check(row is RawStatsCollector.RawStatsRow) - override fun writeRow(row: StatsOutput.StatsRow) { - check(row is RawStatsCollector.RawStatsRow) - - val aggregatedStatsRow = aggregatedStats.getOrPut(row.declarationType) { AggregatedStatsRow(row.declarationType) } - when (row.common) { - LIFTED_UP -> aggregatedStatsRow.liftedUp++ - EXPECT -> aggregatedStatsRow.successfullyCommonized++ - MISSING -> { - if (row.platform.any { it == RawStatsCollector.PlatformDeclarationStatus.MISSING }) { - aggregatedStatsRow.failedBecauseMissing++ - } else { - aggregatedStatsRow.failedOther++ + val declarationType = row.statsKey.declarationType + val aggregatedStatsRow = aggregatedStats.getOrPut(declarationType) { AggregatedStatsRow(declarationType) } + when (row.common) { + LIFTED_UP -> aggregatedStatsRow.liftedUp++ + EXPECT -> aggregatedStatsRow.successfullyCommonized++ + MISSING -> { + if (row.platform.any { it == RawStatsCollector.PlatformDeclarationStatus.MISSING }) { + aggregatedStatsRow.failedBecauseMissing++ + } else { + aggregatedStatsRow.failedOther++ + } } } } - } - override fun close() = Unit + override fun close() = Unit + } } diff --git a/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/stats/DeclarationType.kt b/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/stats/DeclarationType.kt index ef510c4e964..529c2e11264 100644 --- a/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/stats/DeclarationType.kt +++ b/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/stats/DeclarationType.kt @@ -5,9 +5,6 @@ package org.jetbrains.kotlin.descriptors.commonizer.stats -import org.jetbrains.kotlin.descriptors.* -import org.jetbrains.kotlin.resolve.DescriptorUtils - enum class DeclarationType(val alias: String) { TOP_LEVEL_CONST_VAL("TOP-LEVEL CONST-VAL"), TOP_LEVEL_VAL("TOP-LEVEL VAL"), @@ -23,30 +20,5 @@ enum class DeclarationType(val alias: String) { TYPE_ALIAS("TYPE_ALIAS"), ENUM_ENTRY("ENUM_ENTRY"), ENUM_CLASS("ENUM_CLASS"), - MODULE("MODULE"), - UNKNOWN("UNKNOWN"); - - companion object { - val DeclarationDescriptor.declarationType: DeclarationType - get() = when (this) { - is ClassDescriptor -> { - if (isCompanionObject) { - COMPANION_OBJECT - } else when (kind) { - ClassKind.ENUM_CLASS -> ENUM_CLASS - ClassKind.ENUM_ENTRY -> ENUM_ENTRY - ClassKind.INTERFACE -> if (DescriptorUtils.isTopLevelDeclaration(this)) TOP_LEVEL_INTERFACE else NESTED_INTERFACE - else -> if (DescriptorUtils.isTopLevelDeclaration(this)) TOP_LEVEL_CLASS else NESTED_CLASS - } - } - is TypeAliasDescriptor -> TYPE_ALIAS - is ClassConstructorDescriptor -> CLASS_CONSTRUCTOR - is FunctionDescriptor -> if (DescriptorUtils.isTopLevelDeclaration(this)) TOP_LEVEL_FUN else NESTED_FUN - is PropertyDescriptor -> if (DescriptorUtils.isTopLevelDeclaration(this)) { - if (isConst) TOP_LEVEL_CONST_VAL else TOP_LEVEL_VAL - } else NESTED_VAL - is ModuleDescriptor -> MODULE - else -> UNKNOWN - } - } + MODULE("MODULE") } diff --git a/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/stats/RawStatsCollector.kt b/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/stats/RawStatsCollector.kt index 098e8d90670..2142e3aa1ab 100644 --- a/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/stats/RawStatsCollector.kt +++ b/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/stats/RawStatsCollector.kt @@ -5,19 +5,21 @@ package org.jetbrains.kotlin.descriptors.commonizer.stats +import com.intellij.util.containers.FactoryMap import org.jetbrains.kotlin.descriptors.* -import org.jetbrains.kotlin.descriptors.commonizer.stats.DeclarationType.Companion.declarationType -import org.jetbrains.kotlin.descriptors.commonizer.utils.firstNonNull -import org.jetbrains.kotlin.descriptors.commonizer.utils.signature +import org.jetbrains.kotlin.descriptors.commonizer.stats.StatsCollector.StatsKey +import org.jetbrains.kotlin.descriptors.commonizer.stats.StatsOutput.StatsHeader +import org.jetbrains.kotlin.descriptors.commonizer.stats.StatsOutput.StatsRow import org.jetbrains.kotlin.konan.target.KonanTarget -import org.jetbrains.kotlin.resolve.descriptorUtil.fqNameSafe +import java.util.* +import kotlin.collections.ArrayList /** * Allows printing commonization statistics to the file system. * - * Output format is defined in [RawStatsCollector.output]. + * Output format is defined in [StatsOutput]. * - * Header row: "FQ Name, Extension Receiver, Parameter Names, Parameter Types, Declaration Type, common, , [...]" + * Header row: "ID, Extension Receiver, Parameter Names, Parameter Types, Declaration Type, common, , [...]" * * Possible values for "Declaration Type": * - MODULE @@ -44,113 +46,109 @@ import org.jetbrains.kotlin.resolve.descriptorUtil.fqNameSafe * * Example of output: -FQ Name|Extension Receiver|Parameter Names|Parameter Types|Declaration Type|common|macos_x64|ios_x64 -||||MODULE|E|A|A -platform.SystemConfiguration.SCPreferencesContext||||CLASS|E|A|A -platform.SystemConfiguration.SCPreferencesContext.Companion||||COMPANION_OBJECT|E|A|A -platform.SystemConfiguration.SCNetworkConnectionContext||||CLASS|E|A|A -platform.SystemConfiguration.SCNetworkConnectionContext.Companion||||COMPANION_OBJECT|E|A|A -platform.SystemConfiguration.SCDynamicStoreRefVar||||TYPE_ALIAS|-|O|O -platform.SystemConfiguration.SCVLANInterfaceRef||||TYPE_ALIAS|-|O|O +ID|Extension Receiver|Parameter Names|Parameter Types|Declaration Type|common|macos_x64|ios_x64 +SystemConfiguration||||MODULE|E|A|A +platform/SystemConfiguration/SCPreferencesContext||||CLASS|E|A|A +platform/SystemConfiguration/SCPreferencesContext.Companion||||COMPANION_OBJECT|E|A|A +platform/SystemConfiguration/SCNetworkConnectionContext||||CLASS|E|A|A +platform/SystemConfiguration/SCNetworkConnectionContext.Companion||||COMPANION_OBJECT|E|A|A +platform/SystemConfiguration/SCDynamicStoreRefVar||||TYPE_ALIAS|-|O|O +platform/SystemConfiguration/SCVLANInterfaceRef||||TYPE_ALIAS|-|O|O */ -class RawStatsCollector( - private val targets: List, - private val output: StatsOutput -) : StatsCollector { - private var headerWritten = false +class RawStatsCollector(private val targets: List) : StatsCollector { + private inline val dimension get() = targets.size + 1 + private inline val targetNames get() = targets.map { it.name } - override fun logStats(result: List) { - if (!headerWritten) { - writeHeader() - headerWritten = true - } + private inline val indexOfCommon get() = targets.size + private inline val platformDeclarationsCount get() = targets.size - val firstNotNull = result.firstNonNull() - val lastIsNull = result.last() == null + private val stats = FactoryMap.create { StatsValue(dimension) } - val statsRow = RawStatsRow( - dimension = targets.size, - fqName = if (firstNotNull is ModuleDescriptor) firstNotNull.name.asString() else firstNotNull.fqNameSafe.asString(), - declarationType = firstNotNull.declarationType - ) + override fun logDeclaration(targetIndex: Int, lazyStatsKey: () -> StatsKey) { + stats.getValue(lazyStatsKey())[targetIndex] = true + } - // extension receiver - if (firstNotNull is PropertyDescriptor || firstNotNull is SimpleFunctionDescriptor) { - statsRow.extensionReceiver = - (firstNotNull as CallableDescriptor).extensionReceiverParameter?.type?.signature.orEmpty() - } - - if (firstNotNull is ConstructorDescriptor || firstNotNull is SimpleFunctionDescriptor) { - val functionDescriptor = (firstNotNull as FunctionDescriptor) - // parameter names - statsRow.parameterNames = functionDescriptor.valueParameters.joinToString { it.name.asString() } - // parameter types - statsRow.parameterTypes = functionDescriptor.valueParameters.joinToString { it.type.signature } - } - - var isLiftedUp = !lastIsNull - for (index in 0 until result.size - 1) { - statsRow.platform += when { - result[index] == null -> PlatformDeclarationStatus.MISSING - lastIsNull -> PlatformDeclarationStatus.ORIGINAL - else -> { - isLiftedUp = false - PlatformDeclarationStatus.ACTUAL - } + override fun writeTo(statsOutput: StatsOutput) { + val mergedStats = stats.filterTo(mutableMapOf()) { (statsKey, _) -> + when (statsKey.declarationType) { + DeclarationType.TOP_LEVEL_CLASS, DeclarationType.TOP_LEVEL_INTERFACE -> false + else -> true } } - statsRow.common = when { - isLiftedUp -> CommonDeclarationStatus.LIFTED_UP - lastIsNull -> CommonDeclarationStatus.MISSING - else -> CommonDeclarationStatus.EXPECT + stats.forEach { (statsKey, statsValue) -> + when (statsKey.declarationType) { + DeclarationType.TOP_LEVEL_CLASS, DeclarationType.TOP_LEVEL_INTERFACE -> { + if (statsValue[indexOfCommon]) { + val alternativeKey = statsKey.copy(declarationType = DeclarationType.TYPE_ALIAS) + val alternativeValue = mergedStats[alternativeKey] + if (alternativeValue != null && !alternativeValue[indexOfCommon]) { + alternativeValue[indexOfCommon] = true + return@forEach + } + } + + mergedStats[statsKey] = statsValue + } + else -> Unit + } } - output.writeRow(statsRow) - } + statsOutput.use { + statsOutput.writeHeader(RawStatsHeader(targetNames)) - override fun close() { - output.close() - } + mergedStats.forEach { (statsKey, statsValue) -> + val commonIsMissing = !statsValue[indexOfCommon] - private fun writeHeader() { - output.writeHeader(RawStatsHeader(targets.map { it.name })) - } + var isLiftedUp = !commonIsMissing + val platform = ArrayList(platformDeclarationsCount) - class RawStatsHeader( - private val targetNames: List - ) : StatsOutput.StatsHeader { - override fun toList(): List = mutableListOf().apply { - this += "FQ Name" - this += "Extension Receiver" - this += "Parameter Names" - this += "Parameter Types" - this += "Declaration Type" - this += "common" - this += targetNames + for (index in 0 until platformDeclarationsCount) { + platform += when { + !statsValue[index] -> PlatformDeclarationStatus.MISSING + commonIsMissing -> PlatformDeclarationStatus.ORIGINAL + else -> { + isLiftedUp = false + PlatformDeclarationStatus.ACTUAL + } + } + } + + val common = when { + isLiftedUp -> CommonDeclarationStatus.LIFTED_UP + commonIsMissing -> CommonDeclarationStatus.MISSING + else -> CommonDeclarationStatus.EXPECT + } + + statsOutput.writeRow(RawStatsRow(statsKey, common, platform)) + } } } + class RawStatsHeader(private val targetNames: List) : StatsHeader { + override fun toList() = + listOf("ID", "Extension Receiver", "Parameter Names", "Parameter Types", "Declaration Type", "common") + targetNames + } + class RawStatsRow( - dimension: Int, - val fqName: String, - val declarationType: DeclarationType - ) : StatsOutput.StatsRow { - var extensionReceiver: String = "" - var parameterNames: String = "" - var parameterTypes: String = "" - lateinit var common: CommonDeclarationStatus - val platform: MutableList = ArrayList(dimension) + val statsKey: StatsKey, + val common: CommonDeclarationStatus, + val platform: List + ) : StatsRow { + override fun toList(): List { + val result = mutableListOf( + statsKey.id, + statsKey.extensionReceiver.orEmpty(), + statsKey.parameterNames.joinToString(), + statsKey.parameterTypes.joinToString(), + statsKey.declarationType.alias, + common.alias.toString() + ) - override fun toList(): List = mutableListOf().apply { - this += fqName - this += extensionReceiver - this += parameterNames - this += parameterTypes - this += declarationType.alias - this += common.alias.toString() - platform.forEach { this += it.alias.toString() } + platform.mapTo(result) { it.alias.toString() } + + return result } } @@ -166,3 +164,5 @@ class RawStatsCollector( MISSING('-') } } + +private typealias StatsValue = BitSet diff --git a/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/stats/StatsCollector.kt b/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/stats/StatsCollector.kt index c7872277fc0..6a67558db9d 100644 --- a/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/stats/StatsCollector.kt +++ b/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/stats/StatsCollector.kt @@ -5,9 +5,17 @@ package org.jetbrains.kotlin.descriptors.commonizer.stats -import org.jetbrains.kotlin.descriptors.DeclarationDescriptor -import java.io.Closeable +interface StatsCollector { + data class StatsKey( + val id: String, + val extensionReceiver: String?, + val parameterNames: List, + val parameterTypes: List, + val declarationType: DeclarationType + ) { + constructor(id: String, declarationType: DeclarationType) : this(id, null, emptyList(), emptyList(), declarationType) + } -interface StatsCollector : Closeable { - fun logStats(result: List) + fun logDeclaration(targetIndex: Int, lazyStatsKey: () -> StatsKey) + fun writeTo(statsOutput: StatsOutput) } diff --git a/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/utils/commonizedGroup.kt b/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/utils/commonizedGroup.kt index 9ec2cb375a2..41688d394cf 100644 --- a/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/utils/commonizedGroup.kt +++ b/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/utils/commonizedGroup.kt @@ -5,8 +5,6 @@ package org.jetbrains.kotlin.descriptors.commonizer.utils -import gnu.trove.THashMap - /** Fixed-size ordered collection with no extra space that represents a commonized group of same-rank elements */ class CommonizedGroup( override val size: Int, @@ -32,13 +30,3 @@ class CommonizedGroup( elements[index] = value } } - -internal class CommonizedGroupMap(val size: Int) : Iterable>> { - private val wrapped: MutableMap> = THashMap() - - operator fun get(key: K): CommonizedGroup = wrapped.getOrPut(key) { CommonizedGroup(size) } - - fun getOrNull(key: K): CommonizedGroup? = wrapped[key] - - override fun iterator(): Iterator>> = wrapped.iterator() -} diff --git a/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/utils/excludes.kt b/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/utils/excludes.kt index c81bac42d13..47ab197c7c9 100644 --- a/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/utils/excludes.kt +++ b/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/utils/excludes.kt @@ -7,29 +7,11 @@ package org.jetbrains.kotlin.descriptors.commonizer.utils import org.jetbrains.kotlin.descriptors.PackageFragmentDescriptor import org.jetbrains.kotlin.descriptors.SimpleFunctionDescriptor -import org.jetbrains.kotlin.types.getAbbreviation + +internal const val KNI_BRIDGE_FUNCTION_PREFIX = "kniBridge" internal fun SimpleFunctionDescriptor.isKniBridgeFunction() = - name.asString().startsWith("kniBridge") + name.asString().startsWith(KNI_BRIDGE_FUNCTION_PREFIX) internal fun SimpleFunctionDescriptor.isDeprecatedTopLevelFunction() = containingDeclaration is PackageFragmentDescriptor && annotations.hasAnnotation(DEPRECATED_ANNOTATION_FQN) - -// the following logic determines Kotlin functions with conflicting overloads in Darwin library: -internal fun SimpleFunctionDescriptor.isIgnoredDarwinFunction(): Boolean { - if ((containingDeclaration as? PackageFragmentDescriptor)?.fqName?.isUnderDarwinPackage != true) - return false - - val name = name.asString() - if (!name.startsWith("simd_") && !name.startsWith("__")) - return false - - return valueParameters.any { parameter -> - val type = parameter.type - val abbreviationType = type.getAbbreviation() - - abbreviationType != null - && abbreviationType.declarationDescriptor.name.asString().startsWith("simd_") - && type.declarationDescriptor.name.asString() == "Vector128" - } -} diff --git a/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/utils/fqName.kt b/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/utils/fqName.kt index 05b3c364828..ef3085ea234 100644 --- a/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/utils/fqName.kt +++ b/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/utils/fqName.kt @@ -14,7 +14,15 @@ import org.jetbrains.kotlin.name.Name import org.jetbrains.kotlin.serialization.konan.impl.ForwardDeclarationsFqNames internal val DEPRECATED_ANNOTATION_FQN: FqName = FqName(Deprecated::class.java.name).intern() -internal val DEPRECATED_ANNOTATION_CID: ClassId = internedClassId(DEPRECATED_ANNOTATION_FQN) +internal val DEPRECATED_ANNOTATION_CLASS_ID: ClassId = internedClassId(DEPRECATED_ANNOTATION_FQN) + +internal val ANY_CLASS_ID: ClassId = internedClassId(StandardNames.FqNames.any.toSafe().intern()) +private val NOTHING_CLASS_ID: ClassId = internedClassId(StandardNames.FqNames.nothing.toSafe().intern()) + +internal val SPECIAL_CLASS_WITHOUT_SUPERTYPES_CLASS_IDS = listOf( + ANY_CLASS_ID, + NOTHING_CLASS_ID +) private val STANDARD_KOTLIN_PACKAGES = listOf( StandardNames.BUILT_INS_PACKAGE_FQ_NAME.asString(), @@ -28,7 +36,6 @@ private val KOTLIN_NATIVE_SYNTHETIC_PACKAGES = ForwardDeclarationsFqNames.synthe } private const val CINTEROP_PACKAGE = "kotlinx.cinterop" -private const val DARWIN_PACKAGE = "platform.darwin" private val OBJC_INTEROP_CALLABLE_ANNOTATIONS = listOf( "ObjCMethod", @@ -36,6 +43,9 @@ private val OBJC_INTEROP_CALLABLE_ANNOTATIONS = listOf( "ObjCFactory" ) +internal val DEFAULT_CONSTRUCTOR_NAME = Name.identifier("").intern() +internal val DEFAULT_SETTER_VALUE_NAME = Name.identifier("value").intern() + internal fun Name.strip(): String = asString().removeSurrounding("<", ">") @@ -45,9 +55,6 @@ internal val FqName.isUnderStandardKotlinPackages: Boolean internal val FqName.isUnderKotlinNativeSyntheticPackages: Boolean get() = hasAnyPrefix(KOTLIN_NATIVE_SYNTHETIC_PACKAGES) -internal val FqName.isUnderDarwinPackage: Boolean - get() = asString().hasPrefix(DARWIN_PACKAGE) - @Suppress("NOTHING_TO_INLINE") private inline fun FqName.hasAnyPrefix(prefixes: List): Boolean = asString().let { fqName -> prefixes.any(fqName::hasPrefix) } diff --git a/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/utils/moduleDescriptor.kt b/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/utils/moduleDescriptor.kt index 70c754fdc95..6a621fe419e 100644 --- a/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/utils/moduleDescriptor.kt +++ b/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/utils/moduleDescriptor.kt @@ -13,7 +13,6 @@ import org.jetbrains.kotlin.incremental.components.NoLookupLocation import org.jetbrains.kotlin.konan.util.KlibMetadataFactories import org.jetbrains.kotlin.library.metadata.NativeTypeTransformer import org.jetbrains.kotlin.library.metadata.NullFlexibleTypeDeserializer -import org.jetbrains.kotlin.name.ClassId import org.jetbrains.kotlin.name.FqName import org.jetbrains.kotlin.resolve.scopes.MemberScope import org.jetbrains.kotlin.serialization.konan.impl.KlibResolvedModuleDescriptorsFactoryImpl @@ -32,17 +31,6 @@ internal fun createKotlinNativeForwardDeclarationsModule( storageManager = storageManager ) -// similar to org.jetbrains.kotlin.descriptors.DescriptorUtilKt#resolveClassByFqName, but resolves also type aliases -internal fun ModuleDescriptor.resolveClassOrTypeAlias(classId: ClassId): ClassifierDescriptorWithTypeParameters? { - val relativeClassName: FqName = classId.relativeClassName - if (relativeClassName.isRoot) - return null - - return packageFragmentProvider.packageFragments(classId.packageFqName).asSequence().mapNotNull { packageFragment -> - packageFragment.getMemberScope().resolveClassOrTypeAlias(relativeClassName) - }.firstOrNull() -} - internal fun MemberScope.resolveClassOrTypeAlias(relativeClassName: FqName): ClassifierDescriptorWithTypeParameters? { var memberScope: MemberScope = this if (memberScope is MemberScope.Empty) @@ -68,6 +56,4 @@ internal fun MemberScope.resolveClassOrTypeAlias(relativeClassName: FqName): Cla ) as? ClassifierDescriptorWithTypeParameters } -internal const val MODULE_NAME_PREFIX = "module:" - internal val NativeFactories = KlibMetadataFactories(::KonanBuiltIns, NullFlexibleTypeDeserializer, NativeTypeTransformer()) diff --git a/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/utils/type.kt b/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/utils/type.kt index d55607fe847..afea96fd00a 100644 --- a/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/utils/type.kt +++ b/native/commonizer/src/org/jetbrains/kotlin/descriptors/commonizer/utils/type.kt @@ -58,12 +58,15 @@ private fun StringBuilder.buildTypeSignature(type: KotlinType, exploredTypeParam } append("]") } + + if (type.isMarkedNullable) + append("?") } else { // N.B. this is classifier type val abbreviation = (type as? AbbreviatedType)?.abbreviation ?: type append(abbreviation.declarationDescriptor.classId!!.asString()) - val arguments = type.arguments + val arguments = abbreviation.arguments if (arguments.isNotEmpty()) { append("<") arguments.forEachIndexed { index, argument -> @@ -81,10 +84,10 @@ private fun StringBuilder.buildTypeSignature(type: KotlinType, exploredTypeParam } append(">") } - } - if (type.isMarkedNullable) - append("?") + if (abbreviation.isMarkedNullable) + append("?") + } } // dedicated to hold unique entries of "signature" diff --git a/native/commonizer/tests/org/jetbrains/kotlin/descriptors/commonizer/AbstractCommonizationFromSourcesTest.kt b/native/commonizer/tests/org/jetbrains/kotlin/descriptors/commonizer/AbstractCommonizationFromSourcesTest.kt index 098f985a000..dc9aef06856 100644 --- a/native/commonizer/tests/org/jetbrains/kotlin/descriptors/commonizer/AbstractCommonizationFromSourcesTest.kt +++ b/native/commonizer/tests/org/jetbrains/kotlin/descriptors/commonizer/AbstractCommonizationFromSourcesTest.kt @@ -20,6 +20,8 @@ import org.jetbrains.kotlin.config.languageVersionSettings import org.jetbrains.kotlin.descriptors.CallableMemberDescriptor import org.jetbrains.kotlin.descriptors.ModuleDescriptor import org.jetbrains.kotlin.descriptors.PackageFragmentProvider +import org.jetbrains.kotlin.descriptors.commonizer.ResultsConsumer.ModuleResult +import org.jetbrains.kotlin.descriptors.commonizer.ResultsConsumer.Status import org.jetbrains.kotlin.descriptors.commonizer.SourceModuleRoot.Companion.SHARED_TARGET_NAME import org.jetbrains.kotlin.descriptors.commonizer.mergedtree.ClassCollector import org.jetbrains.kotlin.descriptors.commonizer.mergedtree.FunctionCollector @@ -30,6 +32,7 @@ import org.jetbrains.kotlin.descriptors.impl.DeclarationDescriptorVisitorEmptyBo import org.jetbrains.kotlin.descriptors.impl.FunctionDescriptorImpl import org.jetbrains.kotlin.descriptors.impl.ModuleDescriptorImpl import org.jetbrains.kotlin.js.resolve.diagnostics.findPsi +import org.jetbrains.kotlin.library.SerializedMetadata import org.jetbrains.kotlin.name.Name import org.jetbrains.kotlin.platform.CommonPlatforms import org.jetbrains.kotlin.psi.KtFile @@ -68,31 +71,28 @@ abstract class AbstractCommonizationFromSourcesTest : KtUsefulTestCase() { val sourceModuleRoots: SourceModuleRoots = SourceModuleRoots.load(getTestDataDir()) val analyzedModules: AnalyzedModules = AnalyzedModules.create(sourceModuleRoots, testRootDisposable) - val result: CommonizerResult = runCommonization(analyzedModules.toCommonizationParameters()) - assertCommonizationPerformed(result) + val results = MockResultsConsumer() + runCommonization(analyzedModules.toCommonizerParameters(results)) + assertEquals(Status.DONE, results.status) val sharedTarget: SharedTarget = analyzedModules.sharedTarget - assertEquals(sharedTarget, result.sharedTarget) + assertEquals(sharedTarget, results.sharedTarget) - val sharedModuleAsExpected: ModuleDescriptor = analyzedModules.commonizedModules.getValue(sharedTarget) - val sharedModuleByCommonizer: ModuleDescriptor = - (result.modulesByTargets.getValue(sharedTarget).single() as ModuleResult.Commonized).module + val sharedModuleAsExpected: SerializedMetadata = analyzedModules.commonizedModules.getValue(sharedTarget) + val sharedModuleByCommonizer: SerializedMetadata = + (results.modulesByTargets.getValue(sharedTarget).single() as ModuleResult.Commonized).metadata - assertValidModule(sharedModuleAsExpected) - assertValidModule(sharedModuleByCommonizer) - assertModulesAreEqual(sharedModuleAsExpected, sharedModuleByCommonizer, "\"$sharedTarget\" target") + assertModulesAreEqual(sharedModuleAsExpected, sharedModuleByCommonizer, sharedTarget) val leafTargets: Set = analyzedModules.leafTargets - assertEquals(leafTargets, result.leafTargets) + assertEquals(leafTargets, results.leafTargets) for (leafTarget in leafTargets) { - val leafTargetModuleAsExpected: ModuleDescriptor = analyzedModules.commonizedModules.getValue(leafTarget) - val leafTargetModuleByCommonizer: ModuleDescriptor = - (result.modulesByTargets.getValue(leafTarget).single() as ModuleResult.Commonized).module + val leafTargetModuleAsExpected: SerializedMetadata = analyzedModules.commonizedModules.getValue(leafTarget) + val leafTargetModuleByCommonizer: SerializedMetadata = + (results.modulesByTargets.getValue(leafTarget).single() as ModuleResult.Commonized).metadata - assertValidModule(leafTargetModuleAsExpected) - assertValidModule(leafTargetModuleByCommonizer) - assertModulesAreEqual(leafTargetModuleAsExpected, leafTargetModuleByCommonizer, "\"$leafTarget\" target") + assertModulesAreEqual(leafTargetModuleAsExpected, leafTargetModuleByCommonizer, leafTarget) } } } @@ -182,7 +182,7 @@ private class AnalyzedModuleDependencies( private class AnalyzedModules( val originalModules: Map, - val commonizedModules: Map, + val commonizedModules: Map, val dependeeModules: Map> ) { val leafTargets: Set @@ -203,39 +203,42 @@ private class AnalyzedModules( check(allTargets.containsAll(dependeeModules.keys)) } - fun toCommonizationParameters(): CommonizerParameters { - val parameters = CommonizerParameters() + fun toCommonizerParameters(resultsConsumer: ResultsConsumer) = + CommonizerParameters().also { parameters -> + parameters.resultsConsumer = resultsConsumer + parameters.dependeeModulesProvider = dependeeModules[sharedTarget]?.let(MockModulesProvider::create) - leafTargets.forEach { leafTarget -> - val originalModule = originalModules.getValue(leafTarget) + leafTargets.forEach { leafTarget -> + val originalModule = originalModules.getValue(leafTarget) - parameters.addTarget( - TargetProvider( - target = leafTarget, - builtInsClass = originalModule.builtIns::class.java, - builtInsProvider = MockBuiltInsProvider(originalModule.builtIns), - modulesProvider = MockModulesProvider.create(originalModule), - dependeeModulesProvider = dependeeModules[leafTarget]?.let(MockModulesProvider::create) + parameters.addTarget( + TargetProvider( + target = leafTarget, + modulesProvider = MockModulesProvider.create(originalModule), + dependeeModulesProvider = dependeeModules[leafTarget]?.let(MockModulesProvider::create) + ) ) - ) + } } - parameters.dependeeModulesProvider = dependeeModules[sharedTarget]?.let(MockModulesProvider::create) - - return parameters - } - companion object { fun create( sourceModuleRoots: SourceModuleRoots, parentDisposable: Disposable ): AnalyzedModules = with(sourceModuleRoots) { // phase 1: provide the modules that are the dependencies for "original" and "commonized" modules - val (dependeeModules, dependencies) = createDependeeModules(sharedTarget, dependeeRoots, parentDisposable) + val (dependeeModules: Map>, dependencies: AnalyzedModuleDependencies) = + createDependeeModules(sharedTarget, dependeeRoots, parentDisposable) // phase 2: build "original" and "commonized" modules - val originalModules = createModules(sharedTarget, originalRoots, dependencies, parentDisposable) - val commonizedModules = createModules(sharedTarget, commonizedRoots, dependencies, parentDisposable) + val originalModules: Map = + createModules(sharedTarget, originalRoots, dependencies, parentDisposable) + + val commonizedModules: Map = + createModules(sharedTarget, commonizedRoots, dependencies, parentDisposable) + .mapValues { (_, moduleDescriptor) -> MockModulesProvider.SERIALIZER.serializeModule(moduleDescriptor) } + + return AnalyzedModules(originalModules, commonizedModules, dependeeModules) } diff --git a/native/commonizer/tests/org/jetbrains/kotlin/descriptors/commonizer/CommonizerFacadeTest.kt b/native/commonizer/tests/org/jetbrains/kotlin/descriptors/commonizer/CommonizerFacadeTest.kt index 34a02d43c75..1263e206da8 100644 --- a/native/commonizer/tests/org/jetbrains/kotlin/descriptors/commonizer/CommonizerFacadeTest.kt +++ b/native/commonizer/tests/org/jetbrains/kotlin/descriptors/commonizer/CommonizerFacadeTest.kt @@ -5,12 +5,14 @@ package org.jetbrains.kotlin.descriptors.commonizer -import org.jetbrains.kotlin.builtins.DefaultBuiltIns +import org.jetbrains.kotlin.descriptors.commonizer.ResultsConsumer.ModuleResult +import org.jetbrains.kotlin.descriptors.commonizer.ResultsConsumer.Status +import org.jetbrains.kotlin.descriptors.commonizer.utils.MockResultsConsumer import org.jetbrains.kotlin.descriptors.commonizer.utils.MockModulesProvider -import org.jetbrains.kotlin.descriptors.commonizer.utils.assertCommonizationPerformed import org.junit.Test import kotlin.contracts.ExperimentalContracts import kotlin.test.assertEquals +import kotlin.test.assertTrue @ExperimentalContracts class CommonizerFacadeTest { @@ -44,7 +46,7 @@ class CommonizerFacadeTest { ) @Test - fun commonizedWithDifferentModules() = doTestSuccessfulCommonization( + fun commonizedWithDifferentModules() = doTestNothingToCommonize( mapOf( "target1" to listOf("foo"), "target2" to listOf("bar") @@ -60,28 +62,32 @@ class CommonizerFacadeTest { ) companion object { - private fun Map>.toCommonizationParameters() = CommonizerParameters().also { - forEach { (targetName, moduleNames) -> - it.addTarget( - TargetProvider( - target = LeafTarget(targetName), - builtInsClass = DefaultBuiltIns::class.java, - builtInsProvider = BuiltInsProvider.defaultBuiltInsProvider, - modulesProvider = MockModulesProvider.create(moduleNames), - dependeeModulesProvider = null + private fun Map>.toCommonizerParameters(resultsConsumer: ResultsConsumer) = + CommonizerParameters().also { parameters -> + parameters.resultsConsumer = resultsConsumer + + forEach { (targetName, moduleNames) -> + parameters.addTarget( + TargetProvider( + target = LeafTarget(targetName), + modulesProvider = MockModulesProvider.create(moduleNames), + dependeeModulesProvider = null + ) ) - ) + } } - } private fun doTestNothingToCommonize(originalModules: Map>) { - val result = runCommonization(originalModules.toCommonizationParameters()) - assertEquals(CommonizerResult.NothingToDo, result) + val results = MockResultsConsumer() + runCommonization(originalModules.toCommonizerParameters(results)) + assertEquals(results.status, Status.NOTHING_TO_DO) + assertTrue(results.modulesByTargets.isEmpty()) } private fun doTestSuccessfulCommonization(originalModules: Map>) { - val result = runCommonization(originalModules.toCommonizationParameters()) - assertCommonizationPerformed(result) + val results = MockResultsConsumer() + runCommonization(originalModules.toCommonizerParameters(results)) + assertEquals(results.status, Status.DONE) val expectedCommonModuleNames = mutableSetOf() originalModules.values.forEachIndexed { index, moduleNames -> @@ -93,17 +99,17 @@ class CommonizerFacadeTest { assertModulesMatch( expectedCommonizedModuleNames = expectedCommonModuleNames, expectedMissingModuleNames = emptySet(), - actualModuleResults = result.modulesByTargets.getValue(result.sharedTarget) + actualModuleResults = results.modulesByTargets.getValue(results.sharedTarget) ) - result.leafTargets.forEach { target -> + results.leafTargets.forEach { target -> val allModuleNames = originalModules.getValue(target.name).toSet() val expectedMissingModuleNames = allModuleNames - expectedCommonModuleNames assertModulesMatch( expectedCommonizedModuleNames = expectedCommonModuleNames, expectedMissingModuleNames = expectedMissingModuleNames, - actualModuleResults = result.modulesByTargets.getValue(target) + actualModuleResults = results.modulesByTargets.getValue(target) ) } } @@ -120,12 +126,8 @@ class CommonizerFacadeTest { actualModuleResults.forEach { moduleResult -> when (moduleResult) { - is ModuleResult.Commonized -> { - actualCommonizedModuleNames += moduleResult.module.name.asString().removeSurrounding("<", ">") - } - is ModuleResult.Missing -> { - actualMissingModuleNames += moduleResult.originalLocation.name - } + is ModuleResult.Commonized -> actualCommonizedModuleNames += moduleResult.libraryName + is ModuleResult.Missing -> actualMissingModuleNames += moduleResult.libraryName } } diff --git a/native/commonizer/tests/org/jetbrains/kotlin/descriptors/commonizer/CommonizerTargetTest.kt b/native/commonizer/tests/org/jetbrains/kotlin/descriptors/commonizer/CommonizerTargetTest.kt new file mode 100644 index 00000000000..f56e791652f --- /dev/null +++ b/native/commonizer/tests/org/jetbrains/kotlin/descriptors/commonizer/CommonizerTargetTest.kt @@ -0,0 +1,70 @@ +/* + * Copyright 2010-2021 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. + */ + +package org.jetbrains.kotlin.descriptors.commonizer + +import org.jetbrains.kotlin.konan.target.KonanTarget +import org.junit.Test +import kotlin.test.assertEquals + +class CommonizerTargetTest { + + @Test + fun leafTargetNames() { + listOf( + Triple("foo", "[foo]", FOO), + Triple("bar", "[bar]", BAR), + Triple("baz_123", "[baz_123]", BAZ), + ).forEach { (name, prettyName, target: LeafTarget) -> + assertEquals(name, target.name) + assertEquals(prettyName, target.prettyName) + } + } + + @Test + fun sharedTargetNames() { + listOf( + "[foo]" to SharedTarget(FOO), + "[foo, bar]" to SharedTarget(FOO, BAR), + "[foo, bar, baz_123]" to SharedTarget(FOO, BAR, BAZ), + "[foo, bar, baz_123, [foo, bar]]" to SharedTarget(FOO, BAR, BAZ, SharedTarget(FOO, BAR)) + ).forEach { (prettyName, target: SharedTarget) -> + assertEquals(prettyName, target.prettyName) + assertEquals(prettyName, target.name) + } + } + + @Test + fun prettyCommonizedName() { + val sharedTarget = SharedTarget(FOO, BAR, BAZ) + listOf( + "[foo(*), bar, baz_123]" to FOO, + "[foo, bar(*), baz_123]" to BAR, + "[foo, bar, baz_123(*)]" to BAZ, + "[foo, bar, baz_123]" to sharedTarget + ).forEach { (prettyCommonizerName, target: CommonizerTarget) -> + assertEquals(prettyCommonizerName, target.prettyCommonizedName(sharedTarget)) + } + } + + @Test(expected = IllegalStateException::class) + fun prettyCommonizedNameFailure() { + FOO.prettyCommonizedName(SharedTarget(BAR, BAZ)) + } + + @Test(expected = IllegalArgumentException::class) + fun sharedTargetNoInnerTargets() { + SharedTarget(emptySet()) + } + + private companion object { + val FOO = LeafTarget("foo") + val BAR = LeafTarget("bar", KonanTarget.IOS_X64) + val BAZ = LeafTarget("baz_123", KonanTarget.MACOS_X64) + + @Suppress("TestFunctionName") + fun SharedTarget(vararg targets: CommonizerTarget) = SharedTarget(linkedSetOf(*targets)) + } +} diff --git a/native/commonizer/tests/org/jetbrains/kotlin/descriptors/commonizer/core/AbstractCommonizerTest.kt b/native/commonizer/tests/org/jetbrains/kotlin/descriptors/commonizer/core/AbstractCommonizerTest.kt index 12bccbaa3b3..d9385de90de 100644 --- a/native/commonizer/tests/org/jetbrains/kotlin/descriptors/commonizer/core/AbstractCommonizerTest.kt +++ b/native/commonizer/tests/org/jetbrains/kotlin/descriptors/commonizer/core/AbstractCommonizerTest.kt @@ -12,6 +12,8 @@ import kotlin.test.fail abstract class AbstractCommonizerTest { + class ObjectsNotEqual(message: String) : Throwable(message) + @Test(expected = IllegalCommonizerStateException::class) fun failOnNoVariantsSubmitted() { createCommonizer().result @@ -32,7 +34,7 @@ abstract class AbstractCommonizerTest { } val actual = commonized.result - if (!isEqual(expected, actual)) fail("Expected: $expected\nActual: $actual") + if (!isEqual(expected, actual)) throw ObjectsNotEqual("Expected: $expected\nActual: $actual") } protected fun doTestFailure( diff --git a/native/commonizer/tests/org/jetbrains/kotlin/descriptors/commonizer/core/RootCommonizerTest.kt b/native/commonizer/tests/org/jetbrains/kotlin/descriptors/commonizer/core/RootCommonizerTest.kt index c7a62caad23..a78996b49fb 100644 --- a/native/commonizer/tests/org/jetbrains/kotlin/descriptors/commonizer/core/RootCommonizerTest.kt +++ b/native/commonizer/tests/org/jetbrains/kotlin/descriptors/commonizer/core/RootCommonizerTest.kt @@ -5,169 +5,133 @@ package org.jetbrains.kotlin.descriptors.commonizer.core -import org.jetbrains.kotlin.builtins.DefaultBuiltIns -import org.jetbrains.kotlin.builtins.KotlinBuiltIns -import org.jetbrains.kotlin.builtins.jvm.JvmBuiltIns -import org.jetbrains.kotlin.builtins.konan.KonanBuiltIns +import org.jetbrains.kotlin.descriptors.commonizer.CommonizerTarget import org.jetbrains.kotlin.descriptors.commonizer.LeafTarget import org.jetbrains.kotlin.descriptors.commonizer.SharedTarget -import org.jetbrains.kotlin.descriptors.commonizer.CommonizerTarget import org.jetbrains.kotlin.descriptors.commonizer.cir.CirRoot import org.jetbrains.kotlin.descriptors.commonizer.cir.factory.CirRootFactory -import org.jetbrains.kotlin.descriptors.commonizer.utils.MockBuiltInsProvider import org.jetbrains.kotlin.konan.target.KonanTarget -import org.jetbrains.kotlin.storage.LockBasedStorageManager import org.junit.Test class RootCommonizerTest : AbstractCommonizerTest() { @Test fun allAreNative() = doTestSuccess( - expected = KONAN_BUILT_INS.toMock( - SharedTarget( - setOf( - LeafTarget("ios_x64", KonanTarget.IOS_X64), - LeafTarget("ios_arm64", KonanTarget.IOS_ARM64), - LeafTarget("ios_arm32", KonanTarget.IOS_ARM32) - ) + expected = SharedTarget( + setOf( + LeafTarget("ios_x64", KonanTarget.IOS_X64), + LeafTarget("ios_arm64", KonanTarget.IOS_ARM64), + LeafTarget("ios_arm32", KonanTarget.IOS_ARM32) ) - ), - KONAN_BUILT_INS.toMock(LeafTarget("ios_x64", KonanTarget.IOS_X64)), - KONAN_BUILT_INS.toMock(LeafTarget("ios_arm64", KonanTarget.IOS_ARM64)), - KONAN_BUILT_INS.toMock(LeafTarget("ios_arm32", KonanTarget.IOS_ARM32)) + ).toMock(), + LeafTarget("ios_x64", KonanTarget.IOS_X64).toMock(), + LeafTarget("ios_arm64", KonanTarget.IOS_ARM64).toMock(), + LeafTarget("ios_arm32", KonanTarget.IOS_ARM32).toMock() ) @Test fun jvmAndNative1() = doTestSuccess( - expected = DEFAULT_BUILT_INS.toMock( - SharedTarget( - setOf( - LeafTarget("jvm1"), - LeafTarget("ios_x64", KonanTarget.IOS_X64), - LeafTarget("jvm2") - ) + expected = SharedTarget( + setOf( + LeafTarget("jvm1"), + LeafTarget("ios_x64", KonanTarget.IOS_X64), + LeafTarget("jvm2") ) - ), - JVM_BUILT_INS.toMock(LeafTarget("jvm1")), - KONAN_BUILT_INS.toMock(LeafTarget("ios_x64", KonanTarget.IOS_X64)), - JVM_BUILT_INS.toMock(LeafTarget("jvm2")) + ).toMock(), + LeafTarget("jvm1").toMock(), + LeafTarget("ios_x64", KonanTarget.IOS_X64).toMock(), + LeafTarget("jvm2").toMock() ) @Test fun jvmAndNative2() = doTestSuccess( - expected = DEFAULT_BUILT_INS.toMock( - SharedTarget( - setOf( - LeafTarget("ios_x64", KonanTarget.IOS_X64), - LeafTarget("jvm"), - LeafTarget("ios_arm64", KonanTarget.IOS_ARM64) - ) + expected = SharedTarget( + setOf( + LeafTarget("ios_x64", KonanTarget.IOS_X64), + LeafTarget("jvm"), + LeafTarget("ios_arm64", KonanTarget.IOS_ARM64) ) - ), - KONAN_BUILT_INS.toMock(LeafTarget("ios_x64", KonanTarget.IOS_X64)), - JVM_BUILT_INS.toMock(LeafTarget("jvm")), - KONAN_BUILT_INS.toMock(LeafTarget("ios_arm64", KonanTarget.IOS_ARM64)) + ).toMock(), + LeafTarget("ios_x64", KonanTarget.IOS_X64).toMock(), + LeafTarget("jvm").toMock(), + LeafTarget("ios_arm64", KonanTarget.IOS_ARM64).toMock() ) @Test fun noNative1() = doTestSuccess( - expected = DEFAULT_BUILT_INS.toMock( - SharedTarget( - setOf( - LeafTarget("default1"), - LeafTarget("default2"), - LeafTarget("default3") - ) + expected = SharedTarget( + setOf( + LeafTarget("default1"), + LeafTarget("default2"), + LeafTarget("default3") ) - ), - DEFAULT_BUILT_INS.toMock(LeafTarget("default1")), - DEFAULT_BUILT_INS.toMock(LeafTarget("default2")), - DEFAULT_BUILT_INS.toMock(LeafTarget("default3")) + ).toMock(), + LeafTarget("default1").toMock(), + LeafTarget("default2").toMock(), + LeafTarget("default3").toMock() ) @Test fun noNative2() = doTestSuccess( - expected = DEFAULT_BUILT_INS.toMock( - SharedTarget( - setOf( - LeafTarget("jvm1"), - LeafTarget("default"), - LeafTarget("jvm2") - ) + expected = SharedTarget( + setOf( + LeafTarget("jvm1"), + LeafTarget("default"), + LeafTarget("jvm2") ) - ), - JVM_BUILT_INS.toMock(LeafTarget("jvm1")), - DEFAULT_BUILT_INS.toMock(LeafTarget("default")), - JVM_BUILT_INS.toMock(LeafTarget("jvm2")) + ).toMock(), + LeafTarget("jvm1").toMock(), + LeafTarget("default").toMock(), + LeafTarget("jvm2").toMock() ) @Test fun noNative3() = doTestSuccess( - expected = DEFAULT_BUILT_INS.toMock( - SharedTarget( - setOf( - LeafTarget("jvm1"), - LeafTarget("jvm2"), - LeafTarget("jvm3") - ) + expected = SharedTarget( + setOf( + LeafTarget("jvm1"), + LeafTarget("jvm2"), + LeafTarget("jvm3") ) - ), - JVM_BUILT_INS.toMock(LeafTarget("jvm1")), - JVM_BUILT_INS.toMock(LeafTarget("jvm2")), - JVM_BUILT_INS.toMock(LeafTarget("jvm3")) + ).toMock(), + LeafTarget("jvm1").toMock(), + LeafTarget("jvm2").toMock(), + LeafTarget("jvm3").toMock() ) - @Test(expected = IllegalStateException::class) + @Test(expected = ObjectsNotEqual::class) fun misconfiguration1() = doTestSuccess( - expected = KONAN_BUILT_INS.toMock( - SharedTarget( - setOf( - LeafTarget("ios_x64", KonanTarget.IOS_X64), - LeafTarget("ios_arm64", KonanTarget.IOS_ARM64), - LeafTarget("ios_arm32", KonanTarget.IOS_ARM32) - ) + expected = SharedTarget( + setOf( + LeafTarget("ios_x64", KonanTarget.IOS_X64), + LeafTarget("ios_arm64", KonanTarget.IOS_ARM64), + LeafTarget("ios_arm32", KonanTarget.IOS_ARM32) ) - ), - KONAN_BUILT_INS.toMock(LeafTarget("ios_x64")), - KONAN_BUILT_INS.toMock(LeafTarget("ios_arm64", KonanTarget.IOS_ARM64)), - KONAN_BUILT_INS.toMock(LeafTarget("ios_arm32", KonanTarget.IOS_ARM32)) + ).toMock(), + LeafTarget("ios_x64").toMock(), // KonanTarget is missing here! + LeafTarget("ios_arm64", KonanTarget.IOS_ARM64).toMock(), + LeafTarget("ios_arm32", KonanTarget.IOS_ARM32).toMock() ) - @Test(expected = IllegalStateException::class) + @Test(expected = ObjectsNotEqual::class) fun misconfiguration2() = doTestSuccess( - expected = DEFAULT_BUILT_INS.toMock( - SharedTarget( - setOf( - LeafTarget("jvm1"), - LeafTarget("jvm2"), - LeafTarget("jvm3") - ) + expected = SharedTarget( + setOf( + LeafTarget("jvm1"), + LeafTarget("jvm2"), + LeafTarget("jvm3") ) - ), - JVM_BUILT_INS.toMock(LeafTarget("jvm1", KonanTarget.IOS_X64)), - JVM_BUILT_INS.toMock(LeafTarget("jvm2")), - JVM_BUILT_INS.toMock(LeafTarget("jvm3")) + ).toMock(), + LeafTarget("jvm1", KonanTarget.IOS_X64).toMock(), // mistakenly specified KonanTarget! + LeafTarget("jvm2").toMock(), + LeafTarget("jvm3").toMock() ) override fun createCommonizer() = RootCommonizer() - override fun isEqual(a: CirRoot?, b: CirRoot?) = - (a === b) - || (a != null && b != null - && a.target == b.target - && a.builtInsClass == b.builtInsClass - && a.builtInsClass == a.builtInsProvider.loadBuiltIns()::class.java.name - && a.builtInsProvider.loadBuiltIns()::class.java == b.builtInsProvider.loadBuiltIns()::class.java) + override fun isEqual(a: CirRoot?, b: CirRoot?) = (a === b) || (a != null && b != null && a.target == b.target) private companion object { - inline val KONAN_BUILT_INS get() = KonanBuiltIns(LockBasedStorageManager.NO_LOCKS) - inline val JVM_BUILT_INS get() = JvmBuiltIns(LockBasedStorageManager.NO_LOCKS, JvmBuiltIns.Kind.FROM_CLASS_LOADER) - inline val DEFAULT_BUILT_INS get() = DefaultBuiltIns.Instance - - fun KotlinBuiltIns.toMock(target: CommonizerTarget) = CirRootFactory.create( - target = target, - builtInsClass = this::class.java.name, - builtInsProvider = MockBuiltInsProvider(this) - ) + fun CommonizerTarget.toMock() = CirRootFactory.create(target = this) } } diff --git a/native/commonizer/tests/org/jetbrains/kotlin/descriptors/commonizer/utils/ComparingDeclarationsVisitor.kt b/native/commonizer/tests/org/jetbrains/kotlin/descriptors/commonizer/utils/ComparingDeclarationsVisitor.kt deleted file mode 100644 index f3777515570..00000000000 --- a/native/commonizer/tests/org/jetbrains/kotlin/descriptors/commonizer/utils/ComparingDeclarationsVisitor.kt +++ /dev/null @@ -1,577 +0,0 @@ -/* - * Copyright 2010-2019 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. - */ - -package org.jetbrains.kotlin.descriptors.commonizer.utils - -import org.jetbrains.kotlin.descriptors.* -import org.jetbrains.kotlin.descriptors.annotations.AnnotationDescriptor -import org.jetbrains.kotlin.descriptors.annotations.Annotations -import org.jetbrains.kotlin.descriptors.commonizer.mergedtree.* -import org.jetbrains.kotlin.name.FqName -import org.jetbrains.kotlin.name.Name -import org.jetbrains.kotlin.resolve.constants.AnnotationValue -import org.jetbrains.kotlin.resolve.constants.ConstantValue -import org.jetbrains.kotlin.resolve.descriptorUtil.classId -import org.jetbrains.kotlin.resolve.descriptorUtil.fqNameSafe -import org.jetbrains.kotlin.resolve.scopes.MemberScope -import org.jetbrains.kotlin.types.AbbreviatedType -import org.jetbrains.kotlin.types.KotlinType -import kotlin.contracts.ExperimentalContracts -import kotlin.reflect.KCallable -import kotlin.test.fail - -@ExperimentalContracts -internal class ComparingDeclarationsVisitor( - val designatorMessage: String -) : DeclarationDescriptorVisitor { - - inner class Context private constructor( - private val actual: DeclarationDescriptor?, - private val path: List - ) { - constructor(actual: DeclarationDescriptor?) : this(actual, listOf(actual.toString())) - - fun nextLevel(nextActual: DeclarationDescriptor?) = Context(nextActual, path + nextActual.toString()) - - fun nextLevel(customPathElement: String) = Context(actual, path + customPathElement) - - inline fun getActualAs() = actual as T - - override fun toString() = - """ - |Context: ${this@ComparingDeclarationsVisitor.designatorMessage} - |Path: ${path.joinToString(separator = " ->\n\t")}" - """.trimMargin() - } - - override fun visitModuleDeclaration(expected: ModuleDescriptor, context: Context) { - val actual = context.getActualAs() - - context.assertFieldsEqual(expected::getName, actual::getName) - - fun collectPackageMemberScopes(module: ModuleDescriptor): Map = mutableMapOf().also { - module.collectNonEmptyPackageMemberScopes { packageFqName, memberScope -> - if (memberScope.getContributedDescriptors().isNotEmpty()) - it[packageFqName] = memberScope - } - } - - val expectedPackageMemberScopes = collectPackageMemberScopes(expected) - val actualPackageMemberScopes = collectPackageMemberScopes(actual) - - context.assertSetsEqual(expectedPackageMemberScopes.keys, actualPackageMemberScopes.keys, "sets of packages") - - for (packageFqName in expectedPackageMemberScopes.keys) { - val expectedMemberScope = expectedPackageMemberScopes.getValue(packageFqName) - val actualMemberScope = actualPackageMemberScopes.getValue(packageFqName) - - visitMemberScopes(expectedMemberScope, actualMemberScope, context.nextLevel("package member scope [$packageFqName]")) - } - } - - private fun visitMemberScopes(expected: MemberScope, actual: MemberScope, context: Context) { - val expectedProperties = mutableMapOf() - val expectedFunctions = mutableMapOf() - val expectedClasses = mutableMapOf() - val expectedTypeAliases = mutableMapOf() - - expected.collectMembers( - PropertyCollector { expectedProperties[PropertyApproximationKey(it)] = it }, - FunctionCollector { expectedFunctions[FunctionApproximationKey(it)] = it }, - ClassCollector { expectedClasses[it.fqNameSafe] = it }, - TypeAliasCollector { expectedTypeAliases[it.fqNameSafe] = it } - ) - - val actualProperties = mutableMapOf() - val actualFunctions = mutableMapOf() - val actualClasses = mutableMapOf() - val actualTypeAliases = mutableMapOf() - - actual.collectMembers( - PropertyCollector { actualProperties[PropertyApproximationKey(it)] = it }, - FunctionCollector { actualFunctions[FunctionApproximationKey(it)] = it }, - ClassCollector { actualClasses[it.fqNameSafe] = it }, - TypeAliasCollector { actualTypeAliases[it.fqNameSafe] = it } - ) - - context.assertSetsEqual(expectedProperties.keys, actualProperties.keys, "sets of properties") - - expectedProperties.forEach { (propertyKey, expectedProperty) -> - val actualProperty = actualProperties.getValue(propertyKey) - expectedProperty.accept(this, context.nextLevel(actualProperty)) - } - - context.assertSetsEqual(expectedFunctions.keys, actualFunctions.keys, "sets of functions") - - expectedFunctions.forEach { (functionKey, expectedFunction) -> - val actualFunction = actualFunctions.getValue(functionKey) - expectedFunction.accept(this, context.nextLevel(actualFunction)) - } - - context.assertSetsEqual(expectedClasses.keys, actualClasses.keys, "sets of classes") - - expectedClasses.forEach { (classFqName, expectedClass) -> - val actualClass = actualClasses.getValue(classFqName) - expectedClass.accept(this, context.nextLevel(actualClass)) - } - - context.assertSetsEqual(expectedTypeAliases.keys, actualTypeAliases.keys, "sets of type aliases") - - expectedTypeAliases.forEach { (typeAliasFqName, expectedTypeAlias) -> - val actualTypeAlias = actualTypeAliases.getValue(typeAliasFqName) - expectedTypeAlias.accept(this, context.nextLevel(actualTypeAlias)) - } - } - - override fun visitFunctionDescriptor(expected: FunctionDescriptor, context: Context) { - @Suppress("NAME_SHADOWING") - val expected = expected as SimpleFunctionDescriptor - val actual = context.getActualAs() - - visitAnnotations(expected.annotations, actual.annotations, context.nextLevel("Function annotations")) - context.assertFieldsEqual(expected::getName, actual::getName) - context.assertFieldsEqual(expected::getVisibility, actual::getVisibility) - context.assertFieldsEqual(expected::getModality, actual::getModality) - context.assertFieldsEqual(expected::getKind, actual::getKind) - context.assertFieldsEqual(expected::isOperator, actual::isOperator) - context.assertFieldsEqual(expected::isInfix, actual::isInfix) - context.assertFieldsEqual(expected::isInline, actual::isInline) - context.assertFieldsEqual(expected::isTailrec, actual::isTailrec) - context.assertFieldsEqual(expected::isSuspend, actual::isSuspend) - context.assertFieldsEqual(expected::isExternal, actual::isExternal) - context.assertFieldsEqual(expected::isExpect, actual::isExpect) - context.assertFieldsEqual(expected::hasStableParameterNames, actual::hasStableParameterNames) - context.assertFieldsEqual(expected::hasSynthesizedParameterNames, actual::hasSynthesizedParameterNames) - - if (!expected.isActual || actual.kind != CallableMemberDescriptor.Kind.DELEGATION) { - context.assertFieldsEqual(expected::isActual, actual::isActual) - } /* else { - // don't check, because there can be any value in expect.isActual - // see org.jetbrains.kotlin.resolve.DelegationResolver - } */ - - visitType(expected.returnType, actual.returnType, context.nextLevel("Function type")) - - visitValueParameterDescriptorList(expected.valueParameters, actual.valueParameters, context.nextLevel("Function value parameters")) - - visitReceiverParameterDescriptor(expected.extensionReceiverParameter, context.nextLevel(actual.extensionReceiverParameter)) - visitReceiverParameterDescriptor(expected.dispatchReceiverParameter, context.nextLevel(actual.dispatchReceiverParameter)) - - visitTypeParameters(expected.typeParameters, actual.typeParameters, context.nextLevel("Function type parameters")) - } - - private fun visitValueParameterDescriptorList( - expected: List, - actual: List, - context: Context - ) { - context.assertEquals(expected.size, actual.size, "Size of value parameters list") - - expected.forEachIndexed { index, expectedParam -> - val actualParam = actual[index] - expectedParam.accept(this, context.nextLevel(actualParam)) - } - } - - override fun visitValueParameterDescriptor(expected: ValueParameterDescriptor, context: Context) { - val actual = context.getActualAs() - - visitAnnotations(expected.annotations, actual.annotations, context.nextLevel("Value parameter annotations")) - context.assertFieldsEqual(expected::getName, actual::getName) - context.assertFieldsEqual(expected::index, actual::index) - context.assertFieldsEqual(expected::declaresDefaultValue, actual::declaresDefaultValue) - context.assertFieldsEqual(expected::isCrossinline, actual::isCrossinline) - context.assertFieldsEqual(expected::isNoinline, actual::isNoinline) - visitType(expected.type, actual.type, context.nextLevel("Value parameter type")) - visitType(expected.varargElementType, actual.varargElementType, context.nextLevel("Value parameter vararg element type")) - } - - private fun visitTypeParameters(expected: List, actual: List, context: Context) { - context.assertEquals(expected.size, actual.size, "Type parameters list size") - - expected.forEachIndexed { index, expectedParam -> - val actualParam = actual[index] - visitTypeParameterDescriptor(expectedParam, context.nextLevel(actualParam)) - } - } - - override fun visitTypeParameterDescriptor(expected: TypeParameterDescriptor, context: Context) { - val actual = context.getActualAs() - - visitAnnotations(expected.annotations, actual.annotations, context.nextLevel("Type parameter annotations")) - context.assertFieldsEqual(expected::getName, actual::getName) - context.assertFieldsEqual(expected::getIndex, actual::getIndex) - context.assertFieldsEqual(expected::isCapturedFromOuterDeclaration, actual::isCapturedFromOuterDeclaration) - context.assertFieldsEqual(expected::isReified, actual::isReified) - context.assertFieldsEqual(expected::getVariance, actual::getVariance) - - val expectedUpperBounds = expected.upperBounds - val actualUpperBounds = actual.upperBounds - - context.assertEquals(expectedUpperBounds.size, actualUpperBounds.size, "Size of upper bound types") - - expectedUpperBounds.forEachIndexed { index, expectedType -> - val actualType = actualUpperBounds[index] - visitType(expectedType, actualType, context.nextLevel("Type parameter type")) - } - } - - override fun visitClassDescriptor(expected: ClassDescriptor, context: Context) { - val actual = context.getActualAs() - - visitAnnotations(expected.annotations, actual.annotations, context.nextLevel("Class annotations")) - context.assertFieldsEqual(expected::getName, actual::getName) - context.assertFieldsEqual(expected::getVisibility, actual::getVisibility) - context.assertFieldsEqual(expected::getModality, actual::getModality) - context.assertFieldsEqual(expected::getKind, actual::getKind) - context.assertFieldsEqual(expected::isCompanionObject, actual::isCompanionObject) - context.assertFieldsEqual(expected::isData, actual::isData) - context.assertFieldsEqual(expected::isInline, actual::isInline) - context.assertFieldsEqual(expected::isValue, actual::isValue) - context.assertFieldsEqual(expected::isInner, actual::isInner) - context.assertFieldsEqual(expected::isExternal, actual::isExternal) - context.assertFieldsEqual(expected::isExpect, actual::isExpect) - context.assertFieldsEqual(expected::isActual, actual::isActual) - - visitTypeParameters( - expected.declaredTypeParameters, - actual.declaredTypeParameters, - context.nextLevel("Class declared type parameters") - ) - - if (expected.sealedSubclasses.isNotEmpty() || actual.sealedSubclasses.isNotEmpty()) { - val expectedSealedSubclassesFqNames = expected.sealedSubclasses.mapTo(HashSet()) { it.fqNameSafe } - val actualSealedSubclassesFqNames = actual.sealedSubclasses.mapTo(HashSet()) { it.fqNameSafe } - - context.assertSetsEqual(expectedSealedSubclassesFqNames, actualSealedSubclassesFqNames, "Sealed subclasses FQ names") - } - - val expectedSupertypeSignatures = expected.typeConstructor.supertypes.mapTo(HashSet()) { it.signature } - val actualSupertypeSignatures = actual.typeConstructor.supertypes.mapTo(HashSet()) { it.signature } - - context.assertSetsEqual(expectedSupertypeSignatures, actualSupertypeSignatures, "Supertypes signatures") - - if (expected.constructors.isNotEmpty() || actual.constructors.isNotEmpty()) { - val expectedConstructors = expected.constructors.associateBy { ConstructorApproximationKey(it) } - val actualConstructors = actual.constructors.associateBy { ConstructorApproximationKey(it) } - - context.assertSetsEqual(expectedConstructors.keys, actualConstructors.keys, "sets of class constructors") - - for (key in expectedConstructors.keys) { - val expectedConstructor = expectedConstructors.getValue(key) - val actualConstructor = actualConstructors.getValue(key) - - visitConstructorDescriptor(expectedConstructor, context.nextLevel(actualConstructor)) - } - } - - visitMemberScopes( - expected.unsubstitutedMemberScope, - actual.unsubstitutedMemberScope, - context.nextLevel("class member scope [${expected.fqNameSafe}]") - ) - } - - override fun visitConstructorDescriptor(expected: ConstructorDescriptor, context: Context) { - val actual = context.getActualAs() - - visitAnnotations(expected.annotations, actual.annotations, context.nextLevel("Constructor annotations")) - context.assertFieldsEqual(expected::getVisibility, actual::getVisibility) - context.assertFieldsEqual(expected::isPrimary, actual::isPrimary) - context.assertFieldsEqual(expected::getKind, actual::getKind) - context.assertFieldsEqual(expected::hasStableParameterNames, actual::hasStableParameterNames) - context.assertFieldsEqual(expected::hasSynthesizedParameterNames, actual::hasSynthesizedParameterNames) - context.assertFieldsEqual(expected::isExpect, actual::isExpect) - context.assertFieldsEqual(expected::isActual, actual::isActual) - - visitValueParameterDescriptorList( - expected.valueParameters, - actual.valueParameters, - context.nextLevel("Constructor value parameters") - ) - - visitTypeParameters(expected.typeParameters, actual.typeParameters, context.nextLevel("Constructor type parameters")) - } - - override fun visitTypeAliasDescriptor(expected: TypeAliasDescriptor, context: Context) { - val actual = context.getActualAs() - - visitAnnotations(expected.annotations, actual.annotations, context.nextLevel("Type alias annotations")) - context.assertFieldsEqual(expected::getName, actual::getName) - context.assertFieldsEqual(expected::getVisibility, actual::getVisibility) - context.assertFieldsEqual(expected::isActual, actual::isActual) - - visitTypeParameters( - expected.declaredTypeParameters, - actual.declaredTypeParameters, - context.nextLevel("Type alias declared type parameters") - ) - - visitType(expected.underlyingType, actual.underlyingType, context.nextLevel("Type alias underlying type")) - visitType(expected.expandedType, actual.expandedType, context.nextLevel("Type alias expanded type")) - } - - override fun visitPropertyDescriptor(expected: PropertyDescriptor, context: Context) { - val actual = context.getActualAs() - - visitAnnotations(expected.annotations, actual.annotations, context.nextLevel("Property annotations")) - context.assertFieldsEqual(expected::getName, actual::getName) - context.assertFieldsEqual(expected::getVisibility, actual::getVisibility) - context.assertFieldsEqual(expected::getModality, actual::getModality) - context.assertFieldsEqual(expected::isVar, actual::isVar) - context.assertFieldsEqual(expected::getKind, actual::getKind) - context.assertFieldsEqual(expected::isLateInit, actual::isLateInit) - context.assertFieldsEqual(expected::isConst, actual::isConst) - context.assertFieldsEqual(expected::isExternal, actual::isExternal) - context.assertFieldsEqual(expected::isExpect, actual::isExpect) - - if (!expected.isActual || actual.kind != CallableMemberDescriptor.Kind.DELEGATION) { - context.assertFieldsEqual(expected::isActual, actual::isActual) - } /* else { - // don't check, because there can be any value in expect.isActual - // see org.jetbrains.kotlin.resolve.DelegationResolver - } */ - - context.assertFieldsEqual(expected::isDelegated, actual::isDelegated) - - visitAnnotations( - expected.delegateField?.annotations, - actual.delegateField?.annotations, - context.nextLevel("Property delegate field annotations") - ) - visitAnnotations( - expected.backingField?.annotations, - actual.backingField?.annotations, - context.nextLevel("Property backing field annotations") - ) - - context.assertEquals(expected.compileTimeInitializer.isNull(), actual.compileTimeInitializer.isNull(), "compile-time initializers") - visitType(expected.type, actual.type, context.nextLevel("Property type")) - - visitPropertyGetterDescriptor(expected.getter, context.nextLevel(actual.getter)) - visitPropertySetterDescriptor(expected.setter, context.nextLevel(actual.setter)) - - visitReceiverParameterDescriptor(expected.extensionReceiverParameter, context.nextLevel(actual.extensionReceiverParameter)) - visitReceiverParameterDescriptor(expected.dispatchReceiverParameter, context.nextLevel(actual.dispatchReceiverParameter)) - - visitTypeParameters(expected.typeParameters, actual.typeParameters, context.nextLevel("Property type parameters")) - } - - override fun visitPropertyGetterDescriptor(expected: PropertyGetterDescriptor?, context: Context) { - val actual = context.getActualAs() - if (expected === actual) return - - check(actual != null && expected != null) - - visitAnnotations(expected.annotations, actual.annotations, context.nextLevel("Property getter annotations")) - context.assertFieldsEqual(expected::isDefault, actual::isDefault) - context.assertFieldsEqual(expected::isExternal, actual::isExternal) - context.assertFieldsEqual(expected::isInline, actual::isInline) - } - - override fun visitPropertySetterDescriptor(expected: PropertySetterDescriptor?, context: Context) { - val actual = context.getActualAs() - if (expected === actual) return - - check(actual != null && expected != null) - - visitAnnotations(expected.annotations, actual.annotations, context.nextLevel("Property setter annotations")) - context.assertFieldsEqual(expected::isDefault, actual::isDefault) - context.assertFieldsEqual(expected::isExternal, actual::isExternal) - context.assertFieldsEqual(expected::isInline, actual::isInline) - context.assertFieldsEqual(expected::getVisibility, actual::getVisibility) - visitAnnotations( - expected.valueParameters.single().annotations, - actual.valueParameters.single().annotations, - context.nextLevel("Property setter value parameter annotations") - ) - } - - override fun visitReceiverParameterDescriptor(expected: ReceiverParameterDescriptor?, context: Context) { - val actual = context.getActualAs() - if (expected === actual) return - - check(actual != null && expected != null) - - visitType(expected.type, actual.type, context.nextLevel("Receiver parameter type")) - visitAnnotations(expected.annotations, actual.annotations, context.nextLevel("Receiver parameter annotations")) - } - - private fun visitAnnotations(expected: Annotations?, actual: Annotations?, context: Context) { - if (expected === actual || (expected?.isEmpty() != false && actual?.isEmpty() != false)) return - - fun AnnotationDescriptor.getMandatoryFqName(): FqName = fqName ?: context.fail("No FQ name for annotation $this") - - val expectedAnnotations: Map = expected?.associateBy { it.getMandatoryFqName() }.orEmpty() - val actualAnnotations: Map = actual?.associateBy { it.getMandatoryFqName() }.orEmpty() - - context.assertSetsEqual(expectedAnnotations.keys, actualAnnotations.keys, "annotation FQ names") - - for (annotationFqName in expectedAnnotations.keys) { - val expectedAnnotation = expectedAnnotations.getValue(annotationFqName) - val actualAnnotation = actualAnnotations.getValue(annotationFqName) - - visitAnnotation(expectedAnnotation, actualAnnotation, context.nextLevel("Annotation $annotationFqName")) - } - } - - private fun visitAnnotation(expected: AnnotationDescriptor, actual: AnnotationDescriptor, context: Context) { - visitType(expected.type, actual.type, context.nextLevel("annotation type")) - - val expectedValueArguments: Map> = expected.allValueArguments - val actualValueArguments: Map> = actual.allValueArguments - - context.assertSetsEqual(expectedValueArguments.keys, actualValueArguments.keys, "annotation value argument names") - - for (name in expectedValueArguments.keys) { - val expectedValueArgument = expectedValueArguments.getValue(name) - checkConstantSupportedInCommonization( - constantValue = expectedValueArgument, - constantName = name, - owner = expected, - allowAnnotationValues = true, - onError = { context.fail(it) } - ) - - val actualValueArgument = actualValueArguments.getValue(name) - checkConstantSupportedInCommonization( - constantValue = actualValueArgument, - constantName = name, - owner = actual, - allowAnnotationValues = true, - onError = { context.fail(it) } - ) - - context.assertEquals(expectedValueArgument::class, actualValueArgument::class, "annotation value argument value") - if (expectedValueArgument is AnnotationValue && actualValueArgument is AnnotationValue) { - context.assertEquals( - expectedValueArgument.value.fqName, - actualValueArgument.value.fqName, - "nested annotation FQ name" - ) - - visitAnnotation( - expectedValueArgument.value, - actualValueArgument.value, - context.nextLevel("Annotation ${expectedValueArgument.value.fqName}") - ) - } else { - context.assertEquals(expectedValueArgument.value, actualValueArgument.value, "annotation value argument value") - } - } - } - - private fun visitType(expected: KotlinType?, actual: KotlinType?, context: Context) { - if (expected === actual) return - - check(actual != null && expected != null) - - val expectedUnwrapped = expected.unwrap() - val actualUnwrapped = actual.unwrap() - - if (expectedUnwrapped === actualUnwrapped) return - - val expectedAbbreviated = expectedUnwrapped as? AbbreviatedType - val actualAbbreviated = actualUnwrapped as? AbbreviatedType - - context.assertEquals(!expectedAbbreviated.isNull(), !actualAbbreviated.isNull(), "type is abbreviated") - - if (expectedAbbreviated != null && actualAbbreviated != null) { - visitType( - expectedAbbreviated.abbreviation, - actualAbbreviated.abbreviation, - context.nextLevel("Abbreviation type") - ) - visitType( - extractExpandedType(expectedAbbreviated), - extractExpandedType(actualAbbreviated), - context.nextLevel("Expanded type") - ) - } else { - visitAnnotations( - expectedUnwrapped.annotations, - actualUnwrapped.annotations, - context.nextLevel("Type annotations") - ) - - val expectedId = expectedUnwrapped.declarationDescriptor.run { classId?.asString() ?: name.asString() } - val actualId = actualUnwrapped.declarationDescriptor.run { classId?.asString() ?: name.asString() } - - context.assertEquals(expectedId, actualId, "type class ID / name") - - val expectedArguments = expectedUnwrapped.arguments - val actualArguments = actualUnwrapped.arguments - - context.assertEquals(expectedArguments.size, actualArguments.size, "size of type arguments list") - - expectedArguments.forEachIndexed { index, expectedArgument -> - val actualArgument = actualArguments[index] - - context.assertFieldsEqual(expectedArgument::isStarProjection, actualArgument::isStarProjection) - if (!expectedArgument.isStarProjection) { - context.assertFieldsEqual(expectedArgument::getProjectionKind, actualArgument::getProjectionKind) - visitType(expectedArgument.type, actualArgument.type, context.nextLevel("Type argument type")) - } - } - } - } - - private fun Context.assertEquals(expected: T?, actual: T?, subject: String) { - if (expected != actual) - fail( - buildString { - append("Comparing <$subject>:\n") - append("\"$expected\" is not equal to \"$actual\"\n") - } - ) - } - - private fun Context.assertFieldsEqual(expected: KCallable, actual: KCallable) { - val expectedValue = expected.call() - val actualValue = actual.call() - - assertEquals(expectedValue, actualValue, "fields \"$expected\"") - } - - private fun Context.assertSetsEqual(expected: Set, actual: Set, subject: String) { - val expectedMinusActual = expected.subtract(actual) - val actualMinusExpected = actual.subtract(expected) - - if (expectedMinusActual.isNotEmpty() || actualMinusExpected.isNotEmpty()) - fail( - buildString { - appendLine("Comparing $subject:") - appendLine("$expected is not equal to $actual") - appendLine("Expected size: ${expected.size}") - appendLine("Actual size: ${actual.size}") - appendLine("Expected minus actual: $expectedMinusActual") - appendLine("Actual minus expected: $actualMinusExpected") - } - ) - } - - private fun Context.fail(message: String): Nothing { - kotlin.test.fail( - buildString { - if (message.isNotEmpty()) { - if (message.last() != '\n') appendLine(message) else append(message) - } - append(this@fail.toString()) - } - ) - } - - override fun visitPackageViewDescriptor(expected: PackageViewDescriptor, context: Context) = - fail("Comparison of package views not supported") - - override fun visitPackageFragmentDescriptor(expected: PackageFragmentDescriptor, context: Context) = - fail("Comparison of package fragments not supported") - - override fun visitScriptDescriptor(expected: ScriptDescriptor, context: Context) = - fail("Comparison of script descriptors not supported") - - override fun visitVariableDescriptor(expected: VariableDescriptor, context: Context) = - fail("Comparison of variables not supported") -} diff --git a/native/commonizer/tests/org/jetbrains/kotlin/descriptors/commonizer/utils/assertions.kt b/native/commonizer/tests/org/jetbrains/kotlin/descriptors/commonizer/utils/assertions.kt index a61a2ee6ee6..d7ff7ad7c44 100644 --- a/native/commonizer/tests/org/jetbrains/kotlin/descriptors/commonizer/utils/assertions.kt +++ b/native/commonizer/tests/org/jetbrains/kotlin/descriptors/commonizer/utils/assertions.kt @@ -5,15 +5,15 @@ package org.jetbrains.kotlin.descriptors.commonizer.utils -import org.jetbrains.kotlin.descriptors.* -import org.jetbrains.kotlin.descriptors.commonizer.CommonizerResult -import org.jetbrains.kotlin.resolve.scopes.MemberScope -import org.jetbrains.kotlin.test.util.DescriptorValidator.* -import org.jetbrains.kotlin.types.ErrorUtils +import kotlinx.metadata.klib.KlibModuleMetadata +import org.jetbrains.kotlin.descriptors.commonizer.CommonizerTarget +import org.jetbrains.kotlin.descriptors.commonizer.metadata.utils.MetadataDeclarationsComparator +import org.jetbrains.kotlin.descriptors.commonizer.metadata.utils.MetadataDeclarationsComparator.Mismatch +import org.jetbrains.kotlin.descriptors.commonizer.metadata.utils.MetadataDeclarationsComparator.Result +import org.jetbrains.kotlin.descriptors.commonizer.metadata.utils.SerializedMetadataLibraryProvider +import org.jetbrains.kotlin.library.SerializedMetadata import java.io.File import kotlin.contracts.ExperimentalContracts -import kotlin.contracts.contract -import kotlin.test.assertFalse import kotlin.test.fail fun assertIsDirectory(file: File) { @@ -22,57 +22,36 @@ fun assertIsDirectory(file: File) { } @ExperimentalContracts -fun assertCommonizationPerformed(result: CommonizerResult) { - contract { - returns() implies (result is CommonizerResult.Done) +fun assertModulesAreEqual(reference: SerializedMetadata, generated: SerializedMetadata, target: CommonizerTarget) { + val referenceModule = KlibModuleMetadata.read(SerializedMetadataLibraryProvider(reference)) + val generatedModule = KlibModuleMetadata.read(SerializedMetadataLibraryProvider(generated)) + + when (val result = MetadataDeclarationsComparator.compare(referenceModule, generatedModule)) { + is Result.Success -> Unit + is Result.Failure -> { + val mismatches = result.mismatches + .filter(FILTER_OUR_ACCEPTABLE_MISMATCHES) + .sortedBy { it::class.java.simpleName + "_" + it.kind } + + if (mismatches.isEmpty()) return + + val digitCount = mismatches.size.toString().length + + val failureMessage = buildString { + appendLine("${mismatches.size} mismatches found while comparing reference module ${referenceModule.name} (A) and generated module ${generatedModule.name} (B) for target ${target.prettyName}:") + mismatches.forEachIndexed { index, mismatch -> + appendLine((index + 1).toString().padStart(digitCount, ' ') + ". " + mismatch) + } + } + + fail(failureMessage) + } } - - if (result !is CommonizerResult.Done) - fail("$result is not instance of ${CommonizerResult.Done::class}") } -@ExperimentalContracts -fun assertModulesAreEqual(expected: ModuleDescriptor, actual: ModuleDescriptor, designatorMessage: String) { - val visitor = ComparingDeclarationsVisitor(designatorMessage) - val context = visitor.Context(actual) - - expected.accept(visitor, context) -} - -fun assertValidModule(module: ModuleDescriptor) = validate( - object : ValidationVisitor() { - override fun validateScope(scopeOwner: DeclarationDescriptor?, scope: MemberScope, collector: DiagnosticCollector) = Unit - - override fun visitModuleDeclaration(descriptor: ModuleDescriptor, collector: DiagnosticCollector): Boolean { - assertValid(descriptor) - return super.visitModuleDeclaration(descriptor, collector) - } - - override fun visitClassDescriptor(descriptor: ClassDescriptor, collector: DiagnosticCollector): Boolean { - assertValid(descriptor) - return super.visitClassDescriptor(descriptor, collector) - } - - override fun visitFunctionDescriptor(descriptor: FunctionDescriptor, collector: DiagnosticCollector): Boolean { - assertValid(descriptor) - return super.visitFunctionDescriptor(descriptor, collector) - } - - override fun visitPropertyDescriptor(descriptor: PropertyDescriptor, collector: DiagnosticCollector): Boolean { - assertValid(descriptor) - return super.visitPropertyDescriptor(descriptor, collector) - } - - override fun visitConstructorDescriptor(constructorDescriptor: ConstructorDescriptor, collector: DiagnosticCollector): Boolean { - assertValid(constructorDescriptor) - return super.visitConstructorDescriptor(constructorDescriptor, collector) - } - }, - module -) - -@Suppress("NOTHING_TO_INLINE") -private inline fun assertValid(descriptor: DeclarationDescriptor) = when (descriptor) { - is ModuleDescriptor -> descriptor.assertValid() - else -> assertFalse(ErrorUtils.isError(descriptor), "$descriptor is error") +private val FILTER_OUR_ACCEPTABLE_MISMATCHES: (Mismatch) -> Boolean = { mismatch -> + when (mismatch) { + is Mismatch.MissingEntity -> mismatch.kind == "AbbreviationType" && mismatch.missingInA + is Mismatch.DifferentValues -> false + } } diff --git a/native/commonizer/tests/org/jetbrains/kotlin/descriptors/commonizer/utils/mocks.kt b/native/commonizer/tests/org/jetbrains/kotlin/descriptors/commonizer/utils/mocks.kt index d27be2a2171..62f37b967d5 100644 --- a/native/commonizer/tests/org/jetbrains/kotlin/descriptors/commonizer/utils/mocks.kt +++ b/native/commonizer/tests/org/jetbrains/kotlin/descriptors/commonizer/utils/mocks.kt @@ -5,17 +5,19 @@ package org.jetbrains.kotlin.descriptors.commonizer.utils -import org.jetbrains.kotlin.builtins.DefaultBuiltIns -import org.jetbrains.kotlin.builtins.KotlinBuiltIns +import org.jetbrains.kotlin.backend.common.serialization.metadata.KlibMetadataMonolithicSerializer +import org.jetbrains.kotlin.backend.common.serialization.metadata.KlibMetadataVersion +import org.jetbrains.kotlin.config.LanguageVersionSettingsImpl import org.jetbrains.kotlin.descriptors.* import org.jetbrains.kotlin.descriptors.annotations.Annotations -import org.jetbrains.kotlin.descriptors.commonizer.BuiltInsProvider -import org.jetbrains.kotlin.descriptors.commonizer.LeafTarget -import org.jetbrains.kotlin.descriptors.commonizer.ModulesProvider +import org.jetbrains.kotlin.descriptors.commonizer.* +import org.jetbrains.kotlin.descriptors.commonizer.ResultsConsumer.ModuleResult import org.jetbrains.kotlin.descriptors.commonizer.ModulesProvider.ModuleInfo -import org.jetbrains.kotlin.descriptors.commonizer.builder.* import org.jetbrains.kotlin.descriptors.commonizer.cir.factory.CirClassFactory import org.jetbrains.kotlin.descriptors.commonizer.mergedtree.* +import org.jetbrains.kotlin.descriptors.impl.AbstractTypeAliasDescriptor +import org.jetbrains.kotlin.descriptors.impl.ClassDescriptorImpl +import org.jetbrains.kotlin.library.SerializedMetadata import org.jetbrains.kotlin.name.ClassId import org.jetbrains.kotlin.name.FqName import org.jetbrains.kotlin.name.Name @@ -26,11 +28,13 @@ import org.jetbrains.kotlin.test.KotlinTestUtils import org.jetbrains.kotlin.types.* import java.io.File import kotlin.random.Random +import org.jetbrains.kotlin.storage.getValue // expected special name for module internal fun mockEmptyModule(moduleName: String): ModuleDescriptor { val module = KotlinTestUtils.createEmptyModule(moduleName) module.initialize(PackageFragmentProvider.Empty) + module.setDependencies(module) return module } @@ -40,39 +44,23 @@ internal fun mockClassType( ): KotlinType = LazyWrappedType(LockBasedStorageManager.NO_LOCKS) { val classFqName = FqName(fqName) - val targetComponents = TargetDeclarationsBuilderComponents( - storageManager = LockBasedStorageManager.NO_LOCKS, - target = LeafTarget("Arbitrary target"), - builtIns = DefaultBuiltIns.Instance, - lazyClassifierLookupTable = LockBasedStorageManager.NO_LOCKS.createLazyValue { LazyClassifierLookupTable(emptyMap()) }, - index = 0, - cache = DeclarationsBuilderCache(1) + val classDescriptor = ClassDescriptorImpl( + /* containingDeclaration = */ createPackageFragmentForClassifier(classFqName), + /* name = */ classFqName.shortName(), + /* modality = */ Modality.FINAL, + /* classKind = */ ClassKind.CLASS, + /* supertypes = */ emptyList(), + /* source = */ SourceElement.NO_SOURCE, + /* isExternal = */ false, + /* storageManager = */ LockBasedStorageManager.NO_LOCKS ) - val classDescriptor = CommonizedClassDescriptor( - targetComponents = targetComponents, - containingDeclaration = createPackageFragmentForClassifier(classFqName), - annotations = Annotations.EMPTY, - name = classFqName.shortName(), - kind = ClassKind.CLASS, - modality = Modality.FINAL, - visibility = DescriptorVisibilities.PUBLIC, - isCompanion = false, - isData = false, - isInline = false, - isInner = false, - isExternal = false, - isExpect = false, - isActual = false, - cirDeclaredTypeParameters = emptyList(), - companionObjectName = null, - cirSupertypes = emptyList() + classDescriptor.initialize( + /* unsubstitutedMemberScope = */ MemberScope.Empty, + /* constructors = */ emptySet(), + /* primaryConstructor = */ null ) - classDescriptor.unsubstitutedMemberScope = CommonizedMemberScope() - - classDescriptor.initialize(constructors = emptyList()) - classDescriptor.defaultType.makeNullableAsSpecified(nullable) } @@ -85,20 +73,31 @@ internal fun mockTAType( val rightHandSideType = rightHandSideTypeProvider().lowerIfFlexible() - val typeAliasDescriptor = CommonizedTypeAliasDescriptor( - storageManager = LockBasedStorageManager.NO_LOCKS, + val typeAliasDescriptor = object : AbstractTypeAliasDescriptor( containingDeclaration = createPackageFragmentForClassifier(typeAliasFqName), annotations = Annotations.EMPTY, name = typeAliasFqName.shortName(), - visibility = DescriptorVisibilities.PUBLIC, - isActual = false - ) + sourceElement = SourceElement.NO_SOURCE, + visibilityImpl = DescriptorVisibilities.PUBLIC + ) { + override val storageManager get() = LockBasedStorageManager.NO_LOCKS - typeAliasDescriptor.initialize( - declaredTypeParameters = emptyList(), - underlyingType = LockBasedStorageManager.NO_LOCKS.createLazyValue { rightHandSideType.getAbbreviation() ?: rightHandSideType }, - expandedType = LockBasedStorageManager.NO_LOCKS.createLazyValue { rightHandSideType } - ) + private val defaultTypeImpl = storageManager.createLazyValue { computeDefaultType() } + override fun getDefaultType() = defaultTypeImpl() + + override val underlyingType by storageManager.createLazyValue { rightHandSideType.getAbbreviation() ?: rightHandSideType } + override val expandedType by storageManager.createLazyValue { rightHandSideType } + + override val classDescriptor get() = expandedType.constructor.declarationDescriptor as? ClassDescriptor + override val constructors by storageManager.createLazyValue { getTypeAliasConstructors() } + + private val typeConstructorTypeParametersImpl by storageManager.createLazyValue { computeConstructorTypeParameters() } + override fun getTypeConstructorTypeParameters() = typeConstructorTypeParametersImpl + + override fun substitute(substitutor: TypeSubstitutor) = error("Unsupported") + } + + typeAliasDescriptor.initialize(declaredTypeParameters = emptyList()) (rightHandSideType.getAbbreviatedType()?.expandedType ?: rightHandSideType) .withAbbreviation(typeAliasDescriptor.defaultType) @@ -155,17 +154,19 @@ internal val MOCK_CLASSIFIERS = CirKnownClassifiers( dependeeLibraries = emptyMap() ) -internal class MockBuiltInsProvider(private val builtIns: KotlinBuiltIns) : BuiltInsProvider { - override fun loadBuiltIns() = builtIns -} - internal class MockModulesProvider private constructor( private val modules: Map, ) : ModulesProvider { - private val moduleInfos: Map = modules.mapValues { (name, _) -> fakeModuleInfo(name) } + private val moduleInfos = modules.keys.map { name -> fakeModuleInfo(name) } override fun loadModuleInfos() = moduleInfos - override fun loadModules(dependencies: Collection): Map = modules + + override fun loadModuleMetadata(name: String): SerializedMetadata { + val module = modules[name] ?: error("No such module: $name") + return SERIALIZER.serializeModule(module) + } + + override fun loadModules(dependencies: Collection) = modules private fun fakeModuleInfo(name: String) = ModuleInfo(name, File("/tmp/commonizer/mocks/$name"), null) @@ -184,5 +185,49 @@ internal class MockModulesProvider private constructor( fun create(module: ModuleDescriptor) = MockModulesProvider( mapOf(module.name.strip() to module) ) + + val SERIALIZER = KlibMetadataMonolithicSerializer( + languageVersionSettings = LanguageVersionSettingsImpl.DEFAULT, + metadataVersion = KlibMetadataVersion.INSTANCE, + skipExpects = false, + project = null + ) + } +} + +private typealias ModuleName = String +private typealias ModuleResults = HashMap + +internal class MockResultsConsumer : ResultsConsumer { + private val _modulesByTargets = LinkedHashMap() // use linked hash map to preserve order + val modulesByTargets: Map> + get() = _modulesByTargets.mapValues { it.value.values } + + val sharedTarget: SharedTarget by lazy { modulesByTargets.keys.filterIsInstance().single() } + val leafTargets: Set by lazy { modulesByTargets.keys.filterIsInstance().toSet() } + + private val finishedTargets = mutableSetOf() + + lateinit var status: ResultsConsumer.Status + + override fun consume(target: CommonizerTarget, moduleResult: ModuleResult) { + check(!this::status.isInitialized) + check(target !in finishedTargets) + val moduleResults: ModuleResults = _modulesByTargets.getOrPut(target) { ModuleResults() } + val oldResult = moduleResults.put(moduleResult.libraryName, moduleResult) + check(oldResult == null) // to avoid accidental overwriting + } + + override fun targetConsumed(target: CommonizerTarget) { + check(!this::status.isInitialized) + check(target in _modulesByTargets.keys) + check(target !in finishedTargets) + finishedTargets += target + } + + override fun allConsumed(status: ResultsConsumer.Status) { + check(!this::status.isInitialized) + check(finishedTargets.containsAll(_modulesByTargets.keys)) + this.status = status } } diff --git a/native/utils/src/org/jetbrains/kotlin/konan/target/HostManager.kt b/native/utils/src/org/jetbrains/kotlin/konan/target/HostManager.kt index f0c887d2cea..9dce6872ac3 100644 --- a/native/utils/src/org/jetbrains/kotlin/konan/target/HostManager.kt +++ b/native/utils/src/org/jetbrains/kotlin/konan/target/HostManager.kt @@ -73,6 +73,7 @@ open class HostManager( ), MACOS_X64 to setOf( MACOS_X64, + MACOS_ARM64, IOS_ARM32, IOS_ARM64, IOS_X64, diff --git a/native/utils/src/org/jetbrains/kotlin/konan/target/KonanTarget.kt b/native/utils/src/org/jetbrains/kotlin/konan/target/KonanTarget.kt index e0f7658d425..db3d41be7e3 100644 --- a/native/utils/src/org/jetbrains/kotlin/konan/target/KonanTarget.kt +++ b/native/utils/src/org/jetbrains/kotlin/konan/target/KonanTarget.kt @@ -26,6 +26,7 @@ sealed class KonanTarget(override val name: String, val family: Family, val arch object MINGW_X86 : KonanTarget("mingw_x86", Family.MINGW, Architecture.X86) object MINGW_X64 : KonanTarget("mingw_x64", Family.MINGW, Architecture.X64) object MACOS_X64 : KonanTarget("macos_x64", Family.OSX, Architecture.X64) + object MACOS_ARM64 : KonanTarget("macos_arm64", Family.OSX, Architecture.ARM64) object LINUX_ARM64 : KonanTarget("linux_arm64", Family.LINUX, Architecture.ARM64) object LINUX_ARM32_HFP : KonanTarget("linux_arm32_hfp", Family.LINUX, Architecture.ARM32) object LINUX_MIPS32 : KonanTarget("linux_mips32", Family.LINUX, Architecture.MIPS32) @@ -48,7 +49,7 @@ sealed class KonanTarget(override val name: String, val family: Family, val arch TVOS_ARM64, TVOS_X64, LINUX_X64, MINGW_X86, MINGW_X64, - MACOS_X64, + MACOS_X64, MACOS_ARM64, LINUX_ARM64, LINUX_ARM32_HFP, LINUX_MIPS32, LINUX_MIPSEL32, WASM32 ).associateBy { it.name } diff --git a/plugins/android-extensions/android-extensions-runtime/build.gradle.kts b/plugins/android-extensions/android-extensions-runtime/build.gradle.kts index 848ee98aa31..3e144b350d1 100644 --- a/plugins/android-extensions/android-extensions-runtime/build.gradle.kts +++ b/plugins/android-extensions/android-extensions-runtime/build.gradle.kts @@ -22,3 +22,9 @@ publish() runtimeJar() sourcesJar() javadocJar() + +tasks.withType().configureEach { + kotlinOptions { + freeCompilerArgs += "-Xsuppress-deprecated-jvm-target-warning" + } +} diff --git a/plugins/fir/fir-plugin-prototype/src/org/jetbrains/kotlin/fir/plugin/checkers/DummyNameChecker.kt b/plugins/fir/fir-plugin-prototype/src/org/jetbrains/kotlin/fir/plugin/checkers/DummyNameChecker.kt index 652871e080d..0c207ed8a4e 100644 --- a/plugins/fir/fir-plugin-prototype/src/org/jetbrains/kotlin/fir/plugin/checkers/DummyNameChecker.kt +++ b/plugins/fir/fir-plugin-prototype/src/org/jetbrains/kotlin/fir/plugin/checkers/DummyNameChecker.kt @@ -7,8 +7,7 @@ package org.jetbrains.kotlin.fir.plugin.checkers import org.jetbrains.kotlin.fir.analysis.checkers.context.CheckerContext import org.jetbrains.kotlin.fir.analysis.checkers.declaration.FirMemberDeclarationChecker -import org.jetbrains.kotlin.fir.analysis.diagnostics.DiagnosticReporter -import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors +import org.jetbrains.kotlin.fir.analysis.diagnostics.* import org.jetbrains.kotlin.fir.declarations.FirMemberDeclaration import org.jetbrains.kotlin.fir.declarations.FirSimpleFunction @@ -16,7 +15,7 @@ object DummyNameChecker : FirMemberDeclarationChecker() { override fun check(declaration: FirMemberDeclaration, context: CheckerContext, reporter: DiagnosticReporter) { if (declaration !is FirSimpleFunction) return if (declaration.name.asString() == "dummy") { - declaration.source?.let { reporter.report(FirErrors.SYNTAX.on(it)) } + reporter.reportOn(declaration.source, FirErrors.SYNTAX, context) } } } diff --git a/plugins/kapt3/kapt3-base/src/org/jetbrains/kotlin/kapt3/base/javac/KaptJavaLog.kt b/plugins/kapt3/kapt3-base/src/org/jetbrains/kotlin/kapt3/base/javac/KaptJavaLog.kt index 546415fc22f..b43e68d34f1 100644 --- a/plugins/kapt3/kapt3-base/src/org/jetbrains/kotlin/kapt3/base/javac/KaptJavaLog.kt +++ b/plugins/kapt3/kapt3-base/src/org/jetbrains/kotlin/kapt3/base/javac/KaptJavaLog.kt @@ -152,7 +152,7 @@ class KaptJavaLog( val formattedMessage = diagnosticFormatter.format(diagnostic, javacMessages.currentLocale) .lines() - .joinToString(LINE_SEPARATOR) { original -> + .joinToString(LINE_SEPARATOR, postfix = LINE_SEPARATOR) { original -> // Kotlin location is put as a sub-diagnostic, so the formatter indents it with four additional spaces (6 in total). // It looks weird, especially in the build log inside IntelliJ, so let's make things a bit better. val trimmed = original.trimStart() @@ -263,4 +263,4 @@ private data class KotlinFileObject(val file: File) : SimpleJavaFileObject(file. override fun getLastModified() = file.lastModified() override fun openReader(ignoreEncodingErrors: Boolean) = file.reader() override fun delete() = file.delete() -} \ No newline at end of file +} diff --git a/plugins/kapt3/kapt3-compiler/src/org/jetbrains/kotlin/kapt3/KaptAnonymousTypeTransformer.kt b/plugins/kapt3/kapt3-compiler/src/org/jetbrains/kotlin/kapt3/KaptAnonymousTypeTransformer.kt index 3c7a86e7132..91140fbc707 100644 --- a/plugins/kapt3/kapt3-compiler/src/org/jetbrains/kotlin/kapt3/KaptAnonymousTypeTransformer.kt +++ b/plugins/kapt3/kapt3-compiler/src/org/jetbrains/kotlin/kapt3/KaptAnonymousTypeTransformer.kt @@ -5,17 +5,12 @@ package org.jetbrains.kotlin.kapt3 -import org.jetbrains.kotlin.builtins.KotlinBuiltIns -import org.jetbrains.kotlin.descriptors.ClassDescriptor import org.jetbrains.kotlin.descriptors.DeclarationDescriptorWithVisibility +import org.jetbrains.kotlin.kapt3.util.replaceAnonymousTypeWithSuperType import org.jetbrains.kotlin.resolve.DeclarationSignatureAnonymousTypeTransformer -import org.jetbrains.kotlin.resolve.DescriptorUtils -import org.jetbrains.kotlin.resolve.DescriptorUtils.* +import org.jetbrains.kotlin.resolve.DescriptorUtils.isLocal import org.jetbrains.kotlin.resolve.jvm.extensions.PartialAnalysisHandlerExtension import org.jetbrains.kotlin.types.KotlinType -import org.jetbrains.kotlin.types.TypeProjectionImpl -import org.jetbrains.kotlin.types.replace -import org.jetbrains.kotlin.types.typeUtil.builtIns class KaptAnonymousTypeTransformer( private val analysisExtension: PartialAnalysisHandlerExtension @@ -29,46 +24,6 @@ class KaptAnonymousTypeTransformer( return type } - return convertPossiblyAnonymousType(type) + return replaceAnonymousTypeWithSuperType(type) } -} - -internal fun convertPossiblyAnonymousType(type: KotlinType): KotlinType { - val declaration = type.constructor.declarationDescriptor as? ClassDescriptor ?: return type - - if (KotlinBuiltIns.isArray(type)) { - val elementTypeProjection = type.arguments.singleOrNull() - if (elementTypeProjection != null && !elementTypeProjection.isStarProjection) { - return type.builtIns.getArrayType( - elementTypeProjection.projectionKind, - convertPossiblyAnonymousType(elementTypeProjection.type) - ) - } - } - - val actualType = when { - isAnonymousObject(declaration) || DescriptorUtils.isLocal(declaration) -> { - if (type.constructor.supertypes.size == 1) { - convertPossiblyAnonymousType(type.constructor.supertypes.iterator().next()) - } else { - /* - Frontend reports an error on public properties in this case, - but we ignore errors when making stubs, so there should be a reasonable fallback. - */ - type.builtIns.anyType - } - } - else -> type - } - - if (actualType.arguments.isEmpty()) return actualType - - val arguments = actualType.arguments.map { typeArg -> - if (typeArg.isStarProjection) - return@map typeArg - - TypeProjectionImpl(typeArg.projectionKind, convertPossiblyAnonymousType(typeArg.type)) - } - - return actualType.replace(newArguments = arguments) } \ No newline at end of file diff --git a/plugins/kapt3/kapt3-compiler/src/org/jetbrains/kotlin/kapt3/stubs/ClassFileToSourceStubConverter.kt b/plugins/kapt3/kapt3-compiler/src/org/jetbrains/kotlin/kapt3/stubs/ClassFileToSourceStubConverter.kt index c6b0cf5bff8..3b414ca500a 100644 --- a/plugins/kapt3/kapt3-compiler/src/org/jetbrains/kotlin/kapt3/stubs/ClassFileToSourceStubConverter.kt +++ b/plugins/kapt3/kapt3-compiler/src/org/jetbrains/kotlin/kapt3/stubs/ClassFileToSourceStubConverter.kt @@ -49,6 +49,7 @@ import org.jetbrains.kotlin.kapt3.stubs.ErrorTypeCorrector.TypeKind.METHOD_PARAM import org.jetbrains.kotlin.kapt3.stubs.ErrorTypeCorrector.TypeKind.RETURN_TYPE import org.jetbrains.kotlin.kapt3.util.* import org.jetbrains.kotlin.load.java.sources.JavaSourceElement +import org.jetbrains.kotlin.load.kotlin.TypeMappingMode import org.jetbrains.kotlin.name.FqName import org.jetbrains.kotlin.psi.* import org.jetbrains.kotlin.resolve.BindingContext @@ -62,6 +63,7 @@ import org.jetbrains.kotlin.resolve.descriptorUtil.fqNameOrNull import org.jetbrains.kotlin.resolve.descriptorUtil.fqNameSafe import org.jetbrains.kotlin.resolve.descriptorUtil.getSuperClassOrAny import org.jetbrains.kotlin.resolve.descriptorUtil.isCompanionObject +import org.jetbrains.kotlin.resolve.jvm.diagnostics.JvmDeclarationOrigin import org.jetbrains.kotlin.resolve.source.PsiSourceElement import org.jetbrains.kotlin.types.ErrorUtils import org.jetbrains.kotlin.types.KotlinType @@ -94,8 +96,7 @@ class ClassFileToSourceStubConverter(val kaptContext: KaptContextForStubGenerati private val BLACKLISTED_ANNOTATIONS = listOf( "java.lang.Deprecated", "kotlin.Deprecated", // Deprecated annotations "java.lang.Synthetic", - "synthetic.kotlin.jvm.GeneratedByJvmOverloads", // kapt3-related annotation for marking JvmOverloads-generated methods - "kotlin.jvm." // Kotlin annotations from runtime + "synthetic.kotlin.jvm.GeneratedByJvmOverloads" // kapt3-related annotation for marking JvmOverloads-generated methods ) private val KOTLIN_METADATA_ANNOTATION = Metadata::class.java.name @@ -690,7 +691,8 @@ class ClassFileToSourceStubConverter(val kaptContext: KaptContextForStubGenerati val name = field.name if (!isValidIdentifier(name)) return null - val type = Type.getType(field.desc) + val type = getFieldType(field, origin) + if (!checkIfValidTypeName(containingClass, type)) { return null } @@ -1420,6 +1422,25 @@ class ClassFileToSourceStubConverter(val kaptContext: KaptContextForStubGenerati lineMappings.registerSignature(this, node) return this } + + private fun getFieldType(field: FieldNode, origin: JvmDeclarationOrigin?): Type { + val fieldType = Type.getType(field.desc) + return when (val declaration = origin?.element) { + is KtProperty -> { + //replace anonymous type in delegate (if any) + val delegateType = kaptContext.bindingContext[BindingContext.EXPRESSION_TYPE_INFO, declaration.delegateExpression]?.type + delegateType?.let { + val replaced = replaceAnonymousTypeWithSuperType(it) + //not changed => not anonymous type => use type from field + if (replaced != it) replaced else null + }?.let(::convertKotlinType) ?: fieldType + } + else -> fieldType + } + } + + private fun convertKotlinType(type: KotlinType): Type = typeMapper.mapType(type, null, TypeMappingMode.GENERIC_ARGUMENT) + } private fun Any?.isOfPrimitiveType(): Boolean = when (this) { diff --git a/plugins/kapt3/kapt3-compiler/src/org/jetbrains/kotlin/kapt3/util/typeUtils.kt b/plugins/kapt3/kapt3-compiler/src/org/jetbrains/kotlin/kapt3/util/typeUtils.kt new file mode 100644 index 00000000000..534b6e1f68d --- /dev/null +++ b/plugins/kapt3/kapt3-compiler/src/org/jetbrains/kotlin/kapt3/util/typeUtils.kt @@ -0,0 +1,54 @@ +/* + * Copyright 2010-2021 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. + */ + +package org.jetbrains.kotlin.kapt3.util + +import org.jetbrains.kotlin.builtins.KotlinBuiltIns +import org.jetbrains.kotlin.descriptors.ClassDescriptor +import org.jetbrains.kotlin.resolve.DescriptorUtils +import org.jetbrains.kotlin.types.KotlinType +import org.jetbrains.kotlin.types.TypeProjectionImpl +import org.jetbrains.kotlin.types.replace +import org.jetbrains.kotlin.types.typeUtil.builtIns + +fun replaceAnonymousTypeWithSuperType(type: KotlinType): KotlinType { + val declaration = type.constructor.declarationDescriptor as? ClassDescriptor ?: return type + + if (KotlinBuiltIns.isArray(type)) { + val elementTypeProjection = type.arguments.singleOrNull() + if (elementTypeProjection != null && !elementTypeProjection.isStarProjection) { + return type.builtIns.getArrayType( + elementTypeProjection.projectionKind, + replaceAnonymousTypeWithSuperType(elementTypeProjection.type) + ) + } + } + + val actualType = when { + DescriptorUtils.isAnonymousObject(declaration) || DescriptorUtils.isLocal(declaration) -> { + if (type.constructor.supertypes.size == 1) { + replaceAnonymousTypeWithSuperType(type.constructor.supertypes.iterator().next()) + } else { + /* + Frontend reports an error on public properties in this case, + but we ignore errors when making stubs, so there should be a reasonable fallback. + */ + type.builtIns.anyType + } + } + else -> type + } + + if (actualType.arguments.isEmpty()) return actualType + + val arguments = actualType.arguments.map { typeArg -> + if (typeArg.isStarProjection) + return@map typeArg + + TypeProjectionImpl(typeArg.projectionKind, replaceAnonymousTypeWithSuperType(typeArg.type)) + } + + return actualType.replace(newArguments = arguments) +} diff --git a/plugins/kapt3/kapt3-compiler/test/org/jetbrains/kotlin/kapt3/test/ClassFileToSourceStubConverterTestGenerated.java b/plugins/kapt3/kapt3-compiler/test/org/jetbrains/kotlin/kapt3/test/ClassFileToSourceStubConverterTestGenerated.java index 5c4b619d774..90cbc6b0d38 100644 --- a/plugins/kapt3/kapt3-compiler/test/org/jetbrains/kotlin/kapt3/test/ClassFileToSourceStubConverterTestGenerated.java +++ b/plugins/kapt3/kapt3-compiler/test/org/jetbrains/kotlin/kapt3/test/ClassFileToSourceStubConverterTestGenerated.java @@ -69,6 +69,11 @@ public class ClassFileToSourceStubConverterTestGenerated extends AbstractClassFi runTest("plugins/kapt3/kapt3-compiler/testData/converter/annotationsWithTargets.kt"); } + @TestMetadata("anonymousDelegate.kt") + public void testAnonymousDelegate() throws Exception { + runTest("plugins/kapt3/kapt3-compiler/testData/converter/anonymousDelegate.kt"); + } + @TestMetadata("comments.kt") public void testComments() throws Exception { runTest("plugins/kapt3/kapt3-compiler/testData/converter/comments.kt"); diff --git a/plugins/kapt3/kapt3-compiler/test/org/jetbrains/kotlin/kapt3/test/IrClassFileToSourceStubConverterTestGenerated.java b/plugins/kapt3/kapt3-compiler/test/org/jetbrains/kotlin/kapt3/test/IrClassFileToSourceStubConverterTestGenerated.java index d9de74b45ed..752f8d3aae8 100644 --- a/plugins/kapt3/kapt3-compiler/test/org/jetbrains/kotlin/kapt3/test/IrClassFileToSourceStubConverterTestGenerated.java +++ b/plugins/kapt3/kapt3-compiler/test/org/jetbrains/kotlin/kapt3/test/IrClassFileToSourceStubConverterTestGenerated.java @@ -70,6 +70,11 @@ public class IrClassFileToSourceStubConverterTestGenerated extends AbstractIrCla runTest("plugins/kapt3/kapt3-compiler/testData/converter/annotationsWithTargets.kt"); } + @TestMetadata("anonymousDelegate.kt") + public void testAnonymousDelegate() throws Exception { + runTest("plugins/kapt3/kapt3-compiler/testData/converter/anonymousDelegate.kt"); + } + @TestMetadata("comments.kt") public void testComments() throws Exception { runTest("plugins/kapt3/kapt3-compiler/testData/converter/comments.kt"); diff --git a/plugins/kapt3/kapt3-compiler/test/org/jetbrains/kotlin/kapt3/test/java9TestUtils.kt b/plugins/kapt3/kapt3-compiler/test/org/jetbrains/kotlin/kapt3/test/java9TestUtils.kt index 32ea35b60e6..6b7e2f94bfb 100644 --- a/plugins/kapt3/kapt3-compiler/test/org/jetbrains/kotlin/kapt3/test/java9TestUtils.kt +++ b/plugins/kapt3/kapt3-compiler/test/org/jetbrains/kotlin/kapt3/test/java9TestUtils.kt @@ -35,7 +35,7 @@ interface CustomJdkTestLauncher { fun doTestWithJdk11(mainClass: Class<*>, arg: String) { if (isJava9OrLater()) return - KtTestUtil.getJdk11Home()?.let { doTestCustomJdk(mainClass, arg, it) } + KtTestUtil.getJdk11Home().let { doTestCustomJdk(mainClass, arg, it) } } private fun doTestCustomJdk(mainClass: Class<*>, arg: String, javaHome: File) { diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/annotations2.txt b/plugins/kapt3/kapt3-compiler/testData/converter/annotations2.txt index 3b7f23b51ba..c857fa819a7 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/annotations2.txt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/annotations2.txt @@ -16,6 +16,7 @@ package test; import java.lang.System; +@kotlin.jvm.JvmName(name = "AnnotationsTest") @kotlin.Metadata() public final class AnnotationsTest { diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/annotationsWithTargets.txt b/plugins/kapt3/kapt3-compiler/testData/converter/annotationsWithTargets.txt index 741bdac2ba0..d32aaf05056 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/annotationsWithTargets.txt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/annotationsWithTargets.txt @@ -40,6 +40,7 @@ import java.lang.System; @kotlin.Metadata() public final class Baz { @org.jetbrains.annotations.NotNull() + @kotlin.jvm.JvmField() @FieldAnno() public final java.lang.String a = ""; diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/anonymousDelegate.kt b/plugins/kapt3/kapt3-compiler/testData/converter/anonymousDelegate.kt new file mode 100644 index 00000000000..e289ea94614 --- /dev/null +++ b/plugins/kapt3/kapt3-compiler/testData/converter/anonymousDelegate.kt @@ -0,0 +1,34 @@ +import kotlin.reflect.KProperty + +class Test { + + var broken by object { + operator fun getValue(obj: Test, property: KProperty<*>) = Any() + + operator fun setValue(obj: Test, property: KProperty<*>, any: Any) { + + } + } + + var overridden by object : java.io.Serializable { + operator fun getValue(obj: Test, property: KProperty<*>) = Any() + + operator fun setValue(obj: Test, property: KProperty<*>, any: Any) { + + } + } + + private val lazyProp by lazy { + object : Runnable { + override fun run() {} + } + } + +} + +var delegate by object { + operator fun getValue(nothing: Nothing?, property: KProperty<*>) = Any() + operator fun setValue(nothing: Nothing?, property: KProperty<*>, any: Any) { + //empty + } +} diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/anonymousDelegate.txt b/plugins/kapt3/kapt3-compiler/testData/converter/anonymousDelegate.txt new file mode 100644 index 00000000000..1db03cc8f11 --- /dev/null +++ b/plugins/kapt3/kapt3-compiler/testData/converter/anonymousDelegate.txt @@ -0,0 +1,60 @@ +import java.lang.System; + +@kotlin.Metadata() +public final class AnonymousDelegateKt { + + public AnonymousDelegateKt() { + super(); + } + @org.jetbrains.annotations.NotNull() + private static final java.lang.Object delegate$delegate = null; + + @org.jetbrains.annotations.NotNull() + public static final java.lang.Object getDelegate() { + return null; + } + + public static final void setDelegate(@org.jetbrains.annotations.NotNull() + java.lang.Object p0) { + } +} + +//////////////////// + + +import java.lang.System; + +@kotlin.Metadata() +public final class Test { + @org.jetbrains.annotations.NotNull() + private final java.lang.Object broken$delegate = null; + @org.jetbrains.annotations.NotNull() + private final java.io.Serializable overridden$delegate = null; + private final kotlin.Lazy lazyProp$delegate = null; + + public Test() { + super(); + } + + @org.jetbrains.annotations.NotNull() + public final java.lang.Object getBroken() { + return null; + } + + public final void setBroken(@org.jetbrains.annotations.NotNull() + java.lang.Object p0) { + } + + @org.jetbrains.annotations.NotNull() + public final java.lang.Object getOverridden() { + return null; + } + + public final void setOverridden(@org.jetbrains.annotations.NotNull() + java.lang.Object p0) { + } + + private final java.lang.Runnable getLazyProp() { + return null; + } +} diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/fileFacadeJvmName.txt b/plugins/kapt3/kapt3-compiler/testData/converter/fileFacadeJvmName.txt index 7d6df94c44b..d86c85059ea 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/fileFacadeJvmName.txt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/fileFacadeJvmName.txt @@ -2,6 +2,7 @@ package a.b.c; import java.lang.System; +@kotlin.jvm.JvmName(name = "FacadeName") @kotlin.Metadata() public final class FacadeName { diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/inlineClasses.txt b/plugins/kapt3/kapt3-compiler/testData/converter/inlineClasses.txt index 2af3842137d..9281276aa5f 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/inlineClasses.txt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/inlineClasses.txt @@ -1,6 +1,7 @@ import java.lang.System; @kotlin.Metadata() +@kotlin.jvm.JvmInline() public final class Cl { public Cl() { diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/jvmDefaultDisable.txt b/plugins/kapt3/kapt3-compiler/testData/converter/jvmDefaultDisable.txt index 7459312db60..034dede7791 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/jvmDefaultDisable.txt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/jvmDefaultDisable.txt @@ -5,6 +5,7 @@ public abstract interface Foo { public abstract void foo(); + @kotlin.jvm.JvmDefault() public default void foo2(int a) { } diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/jvmDefaultEnable.txt b/plugins/kapt3/kapt3-compiler/testData/converter/jvmDefaultEnable.txt index 7459312db60..034dede7791 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/jvmDefaultEnable.txt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/jvmDefaultEnable.txt @@ -5,6 +5,7 @@ public abstract interface Foo { public abstract void foo(); + @kotlin.jvm.JvmDefault() public default void foo2(int a) { } diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/jvmOverloads.txt b/plugins/kapt3/kapt3-compiler/testData/converter/jvmOverloads.txt index 1faa41a7b2c..fed19dfc015 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/jvmOverloads.txt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/jvmOverloads.txt @@ -7,10 +7,12 @@ public final class State { @org.jetbrains.annotations.NotNull() private final java.lang.String someString = null; + @kotlin.jvm.JvmOverloads() public State(int someInt, long someLong) { super(); } + @kotlin.jvm.JvmOverloads() public State(int someInt, long someLong, @org.jetbrains.annotations.NotNull() java.lang.String someString) { super(); @@ -37,32 +39,41 @@ import java.lang.System; @kotlin.Metadata() public final class State2 { + @kotlin.jvm.JvmField() public final int someInt = 0; + @kotlin.jvm.JvmField() public final long someLong = 0L; @org.jetbrains.annotations.NotNull() + @kotlin.jvm.JvmField() public final java.lang.String someString = null; + @kotlin.jvm.JvmOverloads() public State2(int someInt) { super(); } + @kotlin.jvm.JvmOverloads() public State2(int someInt, long someLong) { super(); } + @kotlin.jvm.JvmOverloads() public State2(int someInt, long someLong, @org.jetbrains.annotations.NotNull() java.lang.String someString) { super(); } + @kotlin.jvm.JvmOverloads() public final int test(int someInt) { return 0; } + @kotlin.jvm.JvmOverloads() public final int test(int someInt, long someLong) { return 0; } + @kotlin.jvm.JvmOverloads() public final int test(int someInt, long someLong, @org.jetbrains.annotations.NotNull() java.lang.String someString) { return 0; diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/jvmStatic.txt b/plugins/kapt3/kapt3-compiler/testData/converter/jvmStatic.txt index 61b7d421d7f..c6a5f377623 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/jvmStatic.txt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/jvmStatic.txt @@ -6,6 +6,7 @@ public abstract interface FooComponent { public static final FooComponent.Companion Companion = null; @org.jetbrains.annotations.NotNull() + @kotlin.jvm.JvmStatic() public static java.lang.String create(@org.jetbrains.annotations.NotNull() java.lang.String context) { return null; @@ -19,6 +20,7 @@ public abstract interface FooComponent { } @org.jetbrains.annotations.NotNull() + @kotlin.jvm.JvmStatic() public final java.lang.String create(@org.jetbrains.annotations.NotNull() java.lang.String context) { return null; @@ -60,6 +62,7 @@ public final class JvmStaticTest { return 0; } + @kotlin.jvm.JvmStatic() @java.lang.Deprecated() public static void getOne$annotations() { } diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/jvmStaticFieldInParent.txt b/plugins/kapt3/kapt3-compiler/testData/converter/jvmStaticFieldInParent.txt index 72350b059c0..a35166291f5 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/jvmStaticFieldInParent.txt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/jvmStaticFieldInParent.txt @@ -28,6 +28,7 @@ public final class Test { return null; } + @kotlin.jvm.JvmStatic() @java.lang.Deprecated() public static void getTest$annotations() { } diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/kt18791.txt b/plugins/kapt3/kapt3-compiler/testData/converter/kt18791.txt index 13e41a64a9a..e0258881d9b 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/kt18791.txt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/kt18791.txt @@ -132,7 +132,9 @@ public final class MyActivity { public final int propA = app.B.id.textView; private final int propB = app.B.id.textView; private int propC = app.B.id.textView; + @kotlin.jvm.JvmField() public final int propD = app.B.id.textView; + @kotlin.jvm.JvmField() public int propE = app.B.id.textView; private final int propF = 0; diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/modifiers.txt b/plugins/kapt3/kapt3-compiler/testData/converter/modifiers.txt index 8f1af9fe7bd..f9249661acb 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/modifiers.txt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/modifiers.txt @@ -29,8 +29,10 @@ import java.lang.System; @kotlin.Metadata() public final class Modifiers { @org.jetbrains.annotations.NotNull() + @kotlin.jvm.Transient() private final transient java.lang.String transientField = ""; @org.jetbrains.annotations.NotNull() + @kotlin.jvm.Volatile() private volatile java.lang.String volatileField = ""; public Modifiers() { @@ -51,21 +53,25 @@ public final class Modifiers { java.lang.String p0) { } + @kotlin.jvm.Strictfp() public final strictfp void strictFp() { } @org.jetbrains.annotations.NotNull() + @kotlin.jvm.JvmOverloads() public final java.lang.String overloads() { return null; } @org.jetbrains.annotations.NotNull() + @kotlin.jvm.JvmOverloads() public final java.lang.String overloads(@org.jetbrains.annotations.NotNull() java.lang.String a) { return null; } @org.jetbrains.annotations.NotNull() + @kotlin.jvm.JvmOverloads() public final java.lang.String overloads(@org.jetbrains.annotations.NotNull() java.lang.String a, int n) { return null; diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/nestedClasses2.txt b/plugins/kapt3/kapt3-compiler/testData/converter/nestedClasses2.txt index 613554429f4..d59a60be5cd 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/nestedClasses2.txt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/nestedClasses2.txt @@ -2,13 +2,21 @@ import java.lang.System; @kotlin.Metadata() public final class A$B { + @kotlin.jvm.JvmField() public A$B.C c; + @kotlin.jvm.JvmField() public A$B.D$E de; + @kotlin.jvm.JvmField() public J$B.C jc; + @kotlin.jvm.JvmField() public J$B.D$E jde; + @kotlin.jvm.JvmField() public A$B.D$$E dee; + @kotlin.jvm.JvmField() public A$B.D$$$E deee; + @kotlin.jvm.JvmField() public J$B.D$$E jdee; + @kotlin.jvm.JvmField() public J$B.D$$$E jdeee; public A$B() { @@ -25,9 +33,13 @@ public final class A$B { @kotlin.Metadata() public static final class D$E { + @kotlin.jvm.JvmField() public A$B.D$E.F f; + @kotlin.jvm.JvmField() public A$B.D$E.F$G fg; + @kotlin.jvm.JvmField() public J$B.D$E.F jf; + @kotlin.jvm.JvmField() public J$B.D$E.F$G jfg; public D$E() { diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/nestedClassesNonRootPackage.txt b/plugins/kapt3/kapt3-compiler/testData/converter/nestedClassesNonRootPackage.txt index 2360182ec51..d720558f1e6 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/nestedClassesNonRootPackage.txt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/nestedClassesNonRootPackage.txt @@ -4,13 +4,21 @@ import java.lang.System; @kotlin.Metadata() public final class A$B { + @kotlin.jvm.JvmField() public test.A$B.C c; + @kotlin.jvm.JvmField() public test.A$B.D$E de; + @kotlin.jvm.JvmField() public test.J$B.C jc; + @kotlin.jvm.JvmField() public test.J$B.D$E jde; + @kotlin.jvm.JvmField() public test.A$B.D$$E dee; + @kotlin.jvm.JvmField() public test.A$B.D$$$E deee; + @kotlin.jvm.JvmField() public test.J$B.D$$E jdee; + @kotlin.jvm.JvmField() public test.J$B.D$$$E jdeee; public A$B() { @@ -27,9 +35,13 @@ public final class A$B { @kotlin.Metadata() public static final class D$E { + @kotlin.jvm.JvmField() public test.A$B.D$E.F f; + @kotlin.jvm.JvmField() public test.A$B.D$E.F$G fg; + @kotlin.jvm.JvmField() public test.J$B.D$E.F jf; + @kotlin.jvm.JvmField() public test.J$B.D$E.F$G jfg; public D$E() { diff --git a/plugins/kapt3/kapt3-compiler/testData/kotlinRunner/Overloads.it.txt b/plugins/kapt3/kapt3-compiler/testData/kotlinRunner/Overloads.it.txt index 4ad07e8b2c4..d3dcd9f97b2 100644 --- a/plugins/kapt3/kapt3-compiler/testData/kotlinRunner/Overloads.it.txt +++ b/plugins/kapt3/kapt3-compiler/testData/kotlinRunner/Overloads.it.txt @@ -28,10 +28,12 @@ public final class State { @org.jetbrains.annotations.NotNull() private final java.lang.String someString = null; + @kotlin.jvm.JvmOverloads() public State(int someInt, long someLong) { super(); } + @kotlin.jvm.JvmOverloads() public State(int someInt, long someLong, @org.jetbrains.annotations.NotNull() java.lang.String someString) { super(); diff --git a/plugins/kapt3/kapt3-runtime/build.gradle.kts b/plugins/kapt3/kapt3-runtime/build.gradle.kts index b720973b74b..6ee8ab12434 100644 --- a/plugins/kapt3/kapt3-runtime/build.gradle.kts +++ b/plugins/kapt3/kapt3-runtime/build.gradle.kts @@ -21,3 +21,9 @@ publish() runtimeJar() sourcesJar() javadocJar() + +tasks.withType().configureEach { + kotlinOptions { + freeCompilerArgs += "-Xsuppress-deprecated-jvm-target-warning" + } +} diff --git a/plugins/parcelize/parcelize-compiler/src/org/jetbrains/kotlin/parcelize/ParcelizeCodegenExtension.kt b/plugins/parcelize/parcelize-compiler/src/org/jetbrains/kotlin/parcelize/ParcelizeCodegenExtension.kt index 13e25be12cd..4f65535c98f 100644 --- a/plugins/parcelize/parcelize-compiler/src/org/jetbrains/kotlin/parcelize/ParcelizeCodegenExtension.kt +++ b/plugins/parcelize/parcelize-compiler/src/org/jetbrains/kotlin/parcelize/ParcelizeCodegenExtension.kt @@ -34,6 +34,7 @@ import org.jetbrains.kotlin.storage.LockBasedStorageManager import org.jetbrains.kotlin.types.KotlinType import org.jetbrains.kotlin.types.TypeUtils import org.jetbrains.kotlin.types.Variance +import org.jetbrains.kotlin.types.typeUtil.replaceArgumentsWithStarProjections import org.jetbrains.org.objectweb.asm.Opcodes.* import org.jetbrains.org.objectweb.asm.Type @@ -220,7 +221,7 @@ open class ParcelizeCodegenExtension : ParcelizeExtensionBase, ExpressionCodegen createMethod( creatorClass, CREATE_FROM_PARCEL, Modality.FINAL, - parcelableClass.defaultType, "in" to parcelClassType + parcelableClass.defaultType.replaceArgumentsWithStarProjections(), "in" to parcelClassType ).write(codegen, overriddenFunction) { if (parcelerObject != null) { val (companionAsmType, companionFieldName) = getCompanionClassType(containerAsmType, parcelerObject) @@ -368,7 +369,7 @@ open class ParcelizeCodegenExtension : ParcelizeExtensionBase, ExpressionCodegen createMethod( creatorClass, NEW_ARRAY, Modality.FINAL, - builtIns.getArrayType(Variance.INVARIANT, parcelableClass.defaultType), + builtIns.getArrayType(Variance.INVARIANT, parcelableClass.defaultType.replaceArgumentsWithStarProjections()), "size" to builtIns.intType ).write(codegen, overriddenFunction) { if (parcelerObject != null) { diff --git a/plugins/parcelize/parcelize-compiler/testData/box/generics.kt b/plugins/parcelize/parcelize-compiler/testData/box/generics.kt new file mode 100644 index 00000000000..3d9ec8fb6fe --- /dev/null +++ b/plugins/parcelize/parcelize-compiler/testData/box/generics.kt @@ -0,0 +1,27 @@ +// WITH_RUNTIME + +@file:JvmName("TestKt") +package test + +import kotlinx.parcelize.* +import android.os.Parcel +import android.os.Parcelable + +@Parcelize +data class Foo(val value: Int) : Parcelable + +@Parcelize +data class Box(val box: T) : Parcelable + +fun box() = parcelTest { parcel -> + val foo = Foo(42) + val box = Box(foo) + box.writeToParcel(parcel, 0) + + val bytes = parcel.marshall() + parcel.unmarshall(bytes, 0, bytes.size) + parcel.setDataPosition(0) + + val boxLoaded = readFromParcel>(parcel) + assert(box == boxLoaded) +} \ No newline at end of file diff --git a/plugins/parcelize/parcelize-compiler/testData/codegen/generics.ir.txt b/plugins/parcelize/parcelize-compiler/testData/codegen/generics.ir.txt new file mode 100644 index 00000000000..bad5e36bceb --- /dev/null +++ b/plugins/parcelize/parcelize-compiler/testData/codegen/generics.ir.txt @@ -0,0 +1,72 @@ +public final class Box$Creator : java/lang/Object, android/os/Parcelable$Creator { + public void () + + public final Box createFromParcel(android.os.Parcel parcel) { + LABEL (L0) + ALOAD (1) + LDC (parcel) + INVOKESTATIC (kotlin/jvm/internal/Intrinsics, checkNotNullParameter, (Ljava/lang/Object;Ljava/lang/String;)V) + NEW + DUP + ALOAD (1) + LDC (LBox;) + INVOKEVIRTUAL (java/lang/Class, getClassLoader, ()Ljava/lang/ClassLoader;) + INVOKEVIRTUAL (android/os/Parcel, readParcelable, (Ljava/lang/ClassLoader;)Landroid/os/Parcelable;) + INVOKESPECIAL (Box, , (Landroid/os/Parcelable;)V) + ARETURN + LABEL (L1) + } + + public java.lang.Object createFromParcel(android.os.Parcel source) { + LABEL (L0) + ALOAD (0) + ALOAD (1) + INVOKEVIRTUAL (Box$Creator, createFromParcel, (Landroid/os/Parcel;)LBox;) + ARETURN + LABEL (L1) + } + + public final Box[] newArray(int size) + + public java.lang.Object[] newArray(int size) +} + +public final class Box : java/lang/Object, android/os/Parcelable { + public final static android.os.Parcelable$Creator CREATOR + + private final android.os.Parcelable box + + static void () + + public void (android.os.Parcelable box) + + public final android.os.Parcelable component1() + + public final Box copy(android.os.Parcelable box) + + public static Box copy$default(Box p0, android.os.Parcelable p1, int p2, java.lang.Object p3) + + public int describeContents() + + public boolean equals(java.lang.Object other) + + public final android.os.Parcelable getBox() + + public int hashCode() + + public java.lang.String toString() + + public void writeToParcel(android.os.Parcel out, int flags) { + LABEL (L0) + ALOAD (1) + LDC (out) + INVOKESTATIC (kotlin/jvm/internal/Intrinsics, checkNotNullParameter, (Ljava/lang/Object;Ljava/lang/String;)V) + ALOAD (1) + ALOAD (0) + GETFIELD (box, Landroid/os/Parcelable;) + ILOAD (2) + INVOKEVIRTUAL (android/os/Parcel, writeParcelable, (Landroid/os/Parcelable;I)V) + RETURN + LABEL (L1) + } +} diff --git a/plugins/parcelize/parcelize-compiler/testData/codegen/generics.kt b/plugins/parcelize/parcelize-compiler/testData/codegen/generics.kt new file mode 100644 index 00000000000..f31138e1923 --- /dev/null +++ b/plugins/parcelize/parcelize-compiler/testData/codegen/generics.kt @@ -0,0 +1,8 @@ +// CURIOUS_ABOUT writeToParcel, createFromParcel +// WITH_RUNTIME + +import kotlinx.parcelize.* +import android.os.Parcelable + +@Parcelize +data class Box(val box: T) : Parcelable diff --git a/plugins/parcelize/parcelize-compiler/testData/codegen/generics.txt b/plugins/parcelize/parcelize-compiler/testData/codegen/generics.txt new file mode 100644 index 00000000000..5154afa5390 --- /dev/null +++ b/plugins/parcelize/parcelize-compiler/testData/codegen/generics.txt @@ -0,0 +1,72 @@ +public final class Box$Creator : java/lang/Object, android/os/Parcelable$Creator { + public void () + + public final Box createFromParcel(android.os.Parcel in) { + LABEL (L0) + ALOAD (1) + LDC (in) + INVOKESTATIC (kotlin/jvm/internal/Intrinsics, checkNotNullParameter, (Ljava/lang/Object;Ljava/lang/String;)V) + NEW + DUP + ALOAD (1) + LDC (LBox;) + INVOKEVIRTUAL (java/lang/Class, getClassLoader, ()Ljava/lang/ClassLoader;) + INVOKEVIRTUAL (android/os/Parcel, readParcelable, (Ljava/lang/ClassLoader;)Landroid/os/Parcelable;) + INVOKESPECIAL (Box, , (Landroid/os/Parcelable;)V) + ARETURN + LABEL (L1) + } + + public java.lang.Object createFromParcel(android.os.Parcel p0) { + LABEL (L0) + LINENUMBER (8) + ALOAD (0) + ALOAD (1) + INVOKEVIRTUAL (Box$Creator, createFromParcel, (Landroid/os/Parcel;)LBox;) + ARETURN + } + + public final Box[] newArray(int size) + + public java.lang.Object[] newArray(int p0) +} + +public final class Box : java/lang/Object, android/os/Parcelable { + public final static android.os.Parcelable$Creator CREATOR + + private final android.os.Parcelable box + + static void () + + public void (android.os.Parcelable box) + + public final android.os.Parcelable component1() + + public final Box copy(android.os.Parcelable box) + + public static Box copy$default(Box p0, android.os.Parcelable p1, int p2, java.lang.Object p3) + + public int describeContents() + + public boolean equals(java.lang.Object p0) + + public final android.os.Parcelable getBox() + + public int hashCode() + + public java.lang.String toString() + + public void writeToParcel(android.os.Parcel parcel, int flags) { + LABEL (L0) + ALOAD (1) + LDC (parcel) + INVOKESTATIC (kotlin/jvm/internal/Intrinsics, checkNotNullParameter, (Ljava/lang/Object;Ljava/lang/String;)V) + ALOAD (1) + ALOAD (0) + GETFIELD (box, Landroid/os/Parcelable;) + ILOAD (2) + INVOKEVIRTUAL (android/os/Parcel, writeParcelable, (Landroid/os/Parcelable;I)V) + RETURN + LABEL (L1) + } +} diff --git a/plugins/parcelize/parcelize-compiler/tests/org/jetbrains/kotlin/parcelize/test/ParcelizeBoxTestGenerated.java b/plugins/parcelize/parcelize-compiler/tests/org/jetbrains/kotlin/parcelize/test/ParcelizeBoxTestGenerated.java index 4b64f286f96..d925874e8c4 100644 --- a/plugins/parcelize/parcelize-compiler/tests/org/jetbrains/kotlin/parcelize/test/ParcelizeBoxTestGenerated.java +++ b/plugins/parcelize/parcelize-compiler/tests/org/jetbrains/kotlin/parcelize/test/ParcelizeBoxTestGenerated.java @@ -120,6 +120,11 @@ public class ParcelizeBoxTestGenerated extends AbstractParcelizeBoxTest { runTest("plugins/parcelize/parcelize-compiler/testData/box/functions.kt"); } + @TestMetadata("generics.kt") + public void testGenerics() throws Exception { + runTest("plugins/parcelize/parcelize-compiler/testData/box/generics.kt"); + } + @TestMetadata("intArray.kt") public void testIntArray() throws Exception { runTest("plugins/parcelize/parcelize-compiler/testData/box/intArray.kt"); diff --git a/plugins/parcelize/parcelize-compiler/tests/org/jetbrains/kotlin/parcelize/test/ParcelizeBytecodeListingTestGenerated.java b/plugins/parcelize/parcelize-compiler/tests/org/jetbrains/kotlin/parcelize/test/ParcelizeBytecodeListingTestGenerated.java index 8c0a40e1c8a..b911563ed58 100644 --- a/plugins/parcelize/parcelize-compiler/tests/org/jetbrains/kotlin/parcelize/test/ParcelizeBytecodeListingTestGenerated.java +++ b/plugins/parcelize/parcelize-compiler/tests/org/jetbrains/kotlin/parcelize/test/ParcelizeBytecodeListingTestGenerated.java @@ -70,6 +70,11 @@ public class ParcelizeBytecodeListingTestGenerated extends AbstractParcelizeByte runTest("plugins/parcelize/parcelize-compiler/testData/codegen/efficientParcelable.kt"); } + @TestMetadata("generics.kt") + public void testGenerics() throws Exception { + runTest("plugins/parcelize/parcelize-compiler/testData/codegen/generics.kt"); + } + @TestMetadata("IBinderIInterface.kt") public void testIBinderIInterface() throws Exception { runTest("plugins/parcelize/parcelize-compiler/testData/codegen/IBinderIInterface.kt"); diff --git a/plugins/parcelize/parcelize-compiler/tests/org/jetbrains/kotlin/parcelize/test/ParcelizeIrBoxTestGenerated.java b/plugins/parcelize/parcelize-compiler/tests/org/jetbrains/kotlin/parcelize/test/ParcelizeIrBoxTestGenerated.java index cf4ba8134ec..6a2385d51e8 100644 --- a/plugins/parcelize/parcelize-compiler/tests/org/jetbrains/kotlin/parcelize/test/ParcelizeIrBoxTestGenerated.java +++ b/plugins/parcelize/parcelize-compiler/tests/org/jetbrains/kotlin/parcelize/test/ParcelizeIrBoxTestGenerated.java @@ -120,6 +120,11 @@ public class ParcelizeIrBoxTestGenerated extends AbstractParcelizeIrBoxTest { runTest("plugins/parcelize/parcelize-compiler/testData/box/functions.kt"); } + @TestMetadata("generics.kt") + public void testGenerics() throws Exception { + runTest("plugins/parcelize/parcelize-compiler/testData/box/generics.kt"); + } + @TestMetadata("intArray.kt") public void testIntArray() throws Exception { runTest("plugins/parcelize/parcelize-compiler/testData/box/intArray.kt"); diff --git a/plugins/parcelize/parcelize-compiler/tests/org/jetbrains/kotlin/parcelize/test/ParcelizeIrBytecodeListingTestGenerated.java b/plugins/parcelize/parcelize-compiler/tests/org/jetbrains/kotlin/parcelize/test/ParcelizeIrBytecodeListingTestGenerated.java index a9b3944abc1..60ebcfeff55 100644 --- a/plugins/parcelize/parcelize-compiler/tests/org/jetbrains/kotlin/parcelize/test/ParcelizeIrBytecodeListingTestGenerated.java +++ b/plugins/parcelize/parcelize-compiler/tests/org/jetbrains/kotlin/parcelize/test/ParcelizeIrBytecodeListingTestGenerated.java @@ -70,6 +70,11 @@ public class ParcelizeIrBytecodeListingTestGenerated extends AbstractParcelizeIr runTest("plugins/parcelize/parcelize-compiler/testData/codegen/efficientParcelable.kt"); } + @TestMetadata("generics.kt") + public void testGenerics() throws Exception { + runTest("plugins/parcelize/parcelize-compiler/testData/codegen/generics.kt"); + } + @TestMetadata("IBinderIInterface.kt") public void testIBinderIInterface() throws Exception { runTest("plugins/parcelize/parcelize-compiler/testData/codegen/IBinderIInterface.kt"); diff --git a/plugins/parcelize/parcelize-ide/tests/org/jetbrains/kotlin/pacelize/ide/test/AbstractParcelizeCheckerTest.kt b/plugins/parcelize/parcelize-ide/tests/org/jetbrains/kotlin/pacelize/ide/test/AbstractParcelizeCheckerTest.kt index d88f705b2ed..cc5cca8bcf3 100644 --- a/plugins/parcelize/parcelize-ide/tests/org/jetbrains/kotlin/pacelize/ide/test/AbstractParcelizeCheckerTest.kt +++ b/plugins/parcelize/parcelize-ide/tests/org/jetbrains/kotlin/pacelize/ide/test/AbstractParcelizeCheckerTest.kt @@ -5,11 +5,9 @@ package org.jetbrains.kotlin.pacelize.ide.test -import org.jetbrains.kotlin.checkers.AbstractPsiCheckerTest -import org.jetbrains.kotlin.idea.test.ConfigLibraryUtil -import org.jetbrains.kotlin.test.KotlinTestUtils +import org.jetbrains.kotlin.checkers.AbstractKotlinHighlightingPassTest -abstract class AbstractParcelizeCheckerTest : AbstractPsiCheckerTest() { +abstract class AbstractParcelizeCheckerTest : AbstractKotlinHighlightingPassTest() { override fun setUp() { super.setUp() addParcelizeLibraries(module) diff --git a/plugins/parcelize/parcelize-runtime/build.gradle.kts b/plugins/parcelize/parcelize-runtime/build.gradle.kts index ce059b633c3..ac00368bef9 100644 --- a/plugins/parcelize/parcelize-runtime/build.gradle.kts +++ b/plugins/parcelize/parcelize-runtime/build.gradle.kts @@ -24,4 +24,10 @@ publish { runtimeJar() sourcesJar() -javadocJar() \ No newline at end of file +javadocJar() + +tasks.withType().configureEach { + kotlinOptions { + freeCompilerArgs += "-Xsuppress-deprecated-jvm-target-warning" + } +} diff --git a/plugins/scripting/scripting-compiler/src/org/jetbrains/kotlin/scripting/repl/js/JsCoreScriptingCompiler.kt b/plugins/scripting/scripting-compiler/src/org/jetbrains/kotlin/scripting/repl/js/JsCoreScriptingCompiler.kt index 6407fca3ef7..2e606576383 100644 --- a/plugins/scripting/scripting-compiler/src/org/jetbrains/kotlin/scripting/repl/js/JsCoreScriptingCompiler.kt +++ b/plugins/scripting/scripting-compiler/src/org/jetbrains/kotlin/scripting/repl/js/JsCoreScriptingCompiler.kt @@ -84,8 +84,7 @@ class JsCoreScriptingCompiler( irModuleFragment.descriptor, psi2irContext.irBuiltIns, psi2irContext.symbolTable - ), - environment.configuration.languageVersionSettings + ) ).generateUnboundSymbolsAsDependencies() environment.configuration.put(JSConfigurationKeys.MODULE_KIND, ModuleKind.PLAIN) diff --git a/plugins/scripting/scripting-compiler/src/org/jetbrains/kotlin/scripting/repl/js/JsScriptDependencyCompiler.kt b/plugins/scripting/scripting-compiler/src/org/jetbrains/kotlin/scripting/repl/js/JsScriptDependencyCompiler.kt index 7e11703b8c1..eac1a5c4fc9 100644 --- a/plugins/scripting/scripting-compiler/src/org/jetbrains/kotlin/scripting/repl/js/JsScriptDependencyCompiler.kt +++ b/plugins/scripting/scripting-compiler/src/org/jetbrains/kotlin/scripting/repl/js/JsScriptDependencyCompiler.kt @@ -8,17 +8,14 @@ package org.jetbrains.kotlin.scripting.repl.js import org.jetbrains.kotlin.builtins.KotlinBuiltIns import org.jetbrains.kotlin.config.CompilerConfiguration import org.jetbrains.kotlin.config.LanguageVersionSettingsImpl -import org.jetbrains.kotlin.config.languageVersionSettings import org.jetbrains.kotlin.descriptors.ModuleDescriptor import org.jetbrains.kotlin.descriptors.PackageFragmentProvider import org.jetbrains.kotlin.descriptors.impl.ModuleDescriptorImpl import org.jetbrains.kotlin.descriptors.konan.kotlinLibrary import org.jetbrains.kotlin.ir.backend.js.JsIrBackendContext -import org.jetbrains.kotlin.ir.backend.js.emptyLoggingContext import org.jetbrains.kotlin.ir.backend.js.generateJsCode import org.jetbrains.kotlin.ir.backend.js.lower.serialization.ir.JsIrLinker import org.jetbrains.kotlin.ir.backend.js.utils.NameTables -import org.jetbrains.kotlin.ir.declarations.impl.IrModuleFragmentImpl import org.jetbrains.kotlin.ir.descriptors.IrBuiltIns import org.jetbrains.kotlin.ir.descriptors.IrFunctionFactory import org.jetbrains.kotlin.ir.util.* @@ -36,6 +33,7 @@ class JsScriptDependencyCompiler( fun compile(dependencies: List): String { val builtIns: KotlinBuiltIns = dependencies.single { it.allDependencyModules.isEmpty() }.builtIns val languageVersionSettings = LanguageVersionSettingsImpl.DEFAULT + val messageLogger = configuration[IrMessageLogger.IR_MESSAGE_LOGGER] ?: IrMessageLogger.None val moduleName = Name.special("") val storageManager = LockBasedStorageManager.NO_LOCKS val moduleDescriptor = ModuleDescriptorImpl(moduleName, storageManager, builtIns, null).also { @@ -50,7 +48,7 @@ class JsScriptDependencyCompiler( val irBuiltIns = IrBuiltIns(builtIns, typeTranslator, symbolTable) val functionFactory = IrFunctionFactory(irBuiltIns, symbolTable) irBuiltIns.functionFactory = functionFactory - val jsLinker = JsIrLinker(null, emptyLoggingContext, irBuiltIns, symbolTable, functionFactory, null) + val jsLinker = JsIrLinker(null, messageLogger, irBuiltIns, symbolTable, functionFactory, null) val irDependencies = dependencies.map { jsLinker.deserializeFullModule(it, it.kotlinLibrary) } val moduleFragment = irDependencies.last() @@ -58,7 +56,7 @@ class JsScriptDependencyCompiler( jsLinker.init(null, emptyList()) - ExternalDependenciesGenerator(symbolTable, irProviders, configuration.languageVersionSettings) + ExternalDependenciesGenerator(symbolTable, irProviders) .generateUnboundSymbolsAsDependencies() moduleFragment.patchDeclarationParents() @@ -72,7 +70,7 @@ class JsScriptDependencyCompiler( true ) - ExternalDependenciesGenerator(symbolTable, irProviders, configuration.languageVersionSettings) + ExternalDependenciesGenerator(symbolTable, irProviders) .generateUnboundSymbolsAsDependencies() moduleFragment.patchDeclarationParents() jsLinker.postProcess() diff --git a/plugins/scripting/scripting-ide-services/src/org/jetbrains/kotlin/scripting/ide_services/compiler/impl/KotlinResolutionFacadeForRepl.kt b/plugins/scripting/scripting-ide-services/src/org/jetbrains/kotlin/scripting/ide_services/compiler/impl/KotlinResolutionFacadeForRepl.kt index 218befbfda1..a4865652e55 100644 --- a/plugins/scripting/scripting-ide-services/src/org/jetbrains/kotlin/scripting/ide_services/compiler/impl/KotlinResolutionFacadeForRepl.kt +++ b/plugins/scripting/scripting-ide-services/src/org/jetbrains/kotlin/scripting/ide_services/compiler/impl/KotlinResolutionFacadeForRepl.kt @@ -15,6 +15,7 @@ import org.jetbrains.kotlin.container.ComponentProvider import org.jetbrains.kotlin.container.getService import org.jetbrains.kotlin.descriptors.DeclarationDescriptor import org.jetbrains.kotlin.descriptors.ModuleDescriptor +import org.jetbrains.kotlin.diagnostics.DiagnosticSink import org.jetbrains.kotlin.idea.FrontendInternals import org.jetbrains.kotlin.idea.resolve.ResolutionFacade import org.jetbrains.kotlin.psi.KtDeclaration @@ -72,7 +73,10 @@ class KotlinResolutionFacadeForRepl( throw UnsupportedOperationException() } - override fun analyzeWithAllCompilerChecks(elements: Collection): AnalysisResult { + override fun analyzeWithAllCompilerChecks( + elements: Collection, + callback: DiagnosticSink.DiagnosticsCallback? + ): AnalysisResult { throw UnsupportedOperationException() } diff --git a/plugins/uast-kotlin/tests/AbstractKotlinRenderLogTest.kt b/plugins/uast-kotlin/tests/AbstractKotlinRenderLogTest.kt index bfe90246da6..5a03238a2da 100644 --- a/plugins/uast-kotlin/tests/AbstractKotlinRenderLogTest.kt +++ b/plugins/uast-kotlin/tests/AbstractKotlinRenderLogTest.kt @@ -1,6 +1,5 @@ package org.jetbrains.uast.test.kotlin -import com.intellij.openapi.util.Conditions import com.intellij.psi.PsiElement import com.intellij.psi.PsiFile import com.intellij.psi.PsiRecursiveElementVisitor @@ -9,6 +8,7 @@ import com.intellij.util.PairProcessor import com.intellij.util.ref.DebugReflectionUtil import junit.framework.TestCase import junit.framework.TestCase.* +import org.jetbrains.kotlin.cli.jvm.compiler.CliTraceHolder import org.jetbrains.kotlin.descriptors.DeclarationDescriptor import org.jetbrains.kotlin.descriptors.annotations.AnnotationDescriptor import org.jetbrains.kotlin.psi.KtElement @@ -152,7 +152,7 @@ fun checkDescriptorsLeak(node: UElement) { 10, mapOf(node to node.javaClass.name), Any::class.java, - Conditions.alwaysTrue(), + { it !is CliTraceHolder }, PairProcessor { value, backLink -> descriptorsClasses.find { it.isInstance(value) }?.let { TestCase.fail("""Leaked descriptor ${it.qualifiedName} in ${node.javaClass.name}\n$backLink""") diff --git a/settings.gradle b/settings.gradle index 3dfe1de7956..5e9da894abf 100644 --- a/settings.gradle +++ b/settings.gradle @@ -210,7 +210,6 @@ include ":benchmarks", ":kotlin-script-runtime", ":plugins:fir:fir-plugin-prototype", ":plugins:fir:fir-plugin-prototype:plugin-annotations", - ":kotlin-test", ":kotlin-test:kotlin-test-common", ":kotlin-test:kotlin-test-annotations-common", ":kotlin-test:kotlin-test-jvm", @@ -415,6 +414,7 @@ if (buildProperties.inJpsBuildIdeaSync) { ":include:kotlin-stdlib-common-sources", + ":kotlin-test", ":kotlin-test:kotlin-test-js", ":kotlin-test:kotlin-test-js-ir", ":kotlin-test:kotlin-test-js:kotlin-test-js-it" @@ -433,6 +433,7 @@ if (buildProperties.inJpsBuildIdeaSync) { project(':tools:binary-compatibility-validator').projectDir = "$rootDir/libraries/tools/binary-compatibility-validator" as File project(':tools:kotlin-stdlib-gen').projectDir = "$rootDir/libraries/tools/kotlin-stdlib-gen" as File + project(':kotlin-test').projectDir = "$rootDir/libraries/kotlin.test" as File project(':kotlin-test:kotlin-test-js').projectDir = "$rootDir/libraries/kotlin.test/js" as File project(':kotlin-test:kotlin-test-js-ir').projectDir = "$rootDir/libraries/kotlin.test/js-ir" as File project(':kotlin-test:kotlin-test-js:kotlin-test-js-it').projectDir = "$rootDir/libraries/kotlin.test/js/it" as File @@ -441,7 +442,6 @@ if (buildProperties.inJpsBuildIdeaSync) { rootProject.name = "kotlin" project(':kotlin-script-runtime').projectDir = "$rootDir/libraries/tools/script-runtime" as File -project(':kotlin-test').projectDir = "$rootDir/libraries/kotlin.test" as File project(':kotlin-test:kotlin-test-common').projectDir = "$rootDir/libraries/kotlin.test/common" as File project(':kotlin-test:kotlin-test-annotations-common').projectDir = "$rootDir/libraries/kotlin.test/annotations-common" as File project(':kotlin-test:kotlin-test-jvm').projectDir = "$rootDir/libraries/kotlin.test/jvm" as File diff --git a/tests/mute-common.csv b/tests/mute-common.csv index fa22ea62e40..edb53357168 100644 --- a/tests/mute-common.csv +++ b/tests/mute-common.csv @@ -79,7 +79,7 @@ org.jetbrains.kotlin.idea.caches.resolve.IdeLightClassTestGenerated.Facades.test org.jetbrains.kotlin.idea.caches.resolve.IdeLightClassTestGenerated.CompilationErrors.testActualTypeAliasCustomJvmPackageName, Invalid behavior of old lightclasses in common tests,, org.jetbrains.kotlin.idea.caches.resolve.IdeLightClassTestGenerated.CompilationErrors.testJvmPackageName, Invalid behavior of old lightclasses in common tests,, org.jetbrains.uast.test.kotlin.SimpleKotlinRenderLogTest.testReceiverFun, Analysing of facade annotation with receiver site is broken (connected with KT-40403),, -org.jetbrains.kotlin.checkers.FirPsiCheckerTestGenerated.Regression.testJet53,,, FLAKY +org.jetbrains.kotlin.checkers.FirKotlinHighlightingPassTestGenerated.Regression.testJet53,,, FLAKY org.jetbrains.kotlin.idea.caches.resolve.MultiModuleHighlightingTest.testLanguageVersionsViaFacets,,, FLAKY org.jetbrains.kotlin.jps.build.IncrementalJvmJpsTestGenerated.Jvm.testCircular, Temporary muted due to problems with IC and JVM IR backend,, org.jetbrains.kotlin.jps.build.IncrementalJvmJpsTestGenerated.Jvm.testCircularDependencyClasses, Temporary muted due to problems with IC and JVM IR backend,,